first push to GitPUSH

This commit is contained in:
Brandon4466
2023-06-04 22:14:08 -07:00
parent 1e40570d57
commit 2163e5120c
4 changed files with 11 additions and 10 deletions

2
.cache
View File

@@ -1 +1 @@
{"access_token": "BQAPv3RjiQEQ5b-JCwQelxSZraGjsil9xLAlyVJfTXqYAiRYpM6tXEbY2KgICsgoG0N8Cal51hGasiPpw4GGILK0f4YcXYzblcmDrWILRzOCfZ5ju0VjByNCEOjVgJWoAQoalmBuXRwNhC30TI7v9oKkB2kmmmTRdWFPvHgSsRdGqZ1UOaqntt-X3arhUFjm6BiJqFim9n8SYfBTJmc", "token_type": "Bearer", "expires_in": 3600, "scope": "user-library-modify user-library-read user-modify-playback-state user-read-playback-state", "expires_at": 1685062757, "refresh_token": "AQAby3zEGc-H8o8zciCRMZm-O6Gj3FAup6Vb0sRrbtiO48VyMTJMzU4DoJ_wrhk8LmOiN8Hvt0Fb_Ag-09XVEDgQe3VUBDD3HdoMk6aZA1n02VLygxQNMNUQgAGw6oUUdI0"}
{"access_token": "BQCJWwTXh76cuyzzWvBtUE6WQ_i7f7FyS5bEUH8ZjVT9ZGTJujaAdgZhwSP_OQckJo7Ayb8PMatvwpLYWFbj-WP32maO8hM-C_Og_Sch6Otf5s7v23vhT_B9q3As2xpZJN-15eSj2kRFSB6XTLNKkC3v4Wv0pDeLCEXBZeo-6EsqyB12v2ymzT4IOsmAYCP_cTpOD77Hz6rIxkpgGx8", "token_type": "Bearer", "expires_in": 3600, "scope": "user-library-modify user-library-read user-modify-playback-state user-read-playback-state", "expires_at": 1685945575, "refresh_token": "AQAby3zEGc-H8o8zciCRMZm-O6Gj3FAup6Vb0sRrbtiO48VyMTJMzU4DoJ_wrhk8LmOiN8Hvt0Fb_Ag-09XVEDgQe3VUBDD3HdoMk6aZA1n02VLygxQNMNUQgAGw6oUUdI0"}

View File

@@ -21,7 +21,7 @@ from sys import exit
if os.name == 'posix':
client_id = "df61ecadf09941eb87e693d37f3ad178"
client_secret = "ba97992d614e48d6b0d023998b2957cb"
os.system("xset -display :0 s 1800")
os.system("xset -display :0 s 86400")
if os.path.isfile("updated.cfg"):
print("NEW VER")
os.remove("updated.cfg")
@@ -183,7 +183,6 @@ def start_playback_on_device():
# wait_time = 6500
device_selections = devices_list.curselection()
list_of_devices = spotify.devices()
list_of_devices = spotify.devices()
device_id = list_of_devices["devices"][device_selections[0]]["id"]
spotify.transfer_playback(device_id=device_id)
@@ -216,14 +215,16 @@ def get_devices():
root.after(800, update_song_label)
else:
count += 1
if count > 210:
if count > 420:
kill(kill=sleep)
# unloadSearching_Devices()
# loadDevices_list()
else:
devices_list.delete(0, ttk.END)
# list_of_devices = spotify.devices()
list_of_devices = spotify.devices()
for num_of_device, garbage in enumerate(list_of_devices["devices"]):
# exec(f'dev_{num_of_device} = tk.Button(root, text=list_of_devices["devices"][num_of_device]["name"], command=start_playback_on_device(device_id=num_of_device))')
# exec(f'dev_{num_of_device}.grid(row={num_of_device}, column=1)')
devices_list.insert(num_of_device, list_of_devices["devices"][num_of_device]["name"])
root.after(8500, get_devices)
@@ -454,7 +455,6 @@ def update_song_label():
# threading.Thread(target=upNext).start()
root.after(800, update_song_label)
else:
start_time = time()
artist_name = current_playback["item"]["artists"][0]["name"]
threading.Thread(target=getLyrics, args=(artist_name, track_name)).start()
track_id = current_playback["item"]["id"]
@@ -495,7 +495,6 @@ def update_song_label():
# canvas_url = canvas.get_canvas_for_track(access_token=oauth.get_cached_token()["access_token"], track_id=current_playback["item"]["id"])
# print(canvas_url)
# lrc = q.get()
print(time() - start_time)
root.after(500, update_song_label)
if playing_status == True:
play_button.grid_forget()
@@ -538,8 +537,9 @@ def unloadNow_playing():
album_art_label.grid_forget()
def loadDevices_list():
devices_list.grid(row=1, column=1, pady=10)
start_playback_on_device_button.grid(row=0, column=1, ipadx=40, ipady=40)
pass
# devices_list.grid(row=1, column=1, pady=10)
# start_playback_on_device_button.grid(row=0, column=1, ipadx=40, ipady=40)
def unloadDevices_list():
devices_list.grid_forget()

View File

@@ -6,7 +6,7 @@ from time import sleep
import subprocess
from pynput import mouse
from functools import partial
from os import name, path, remove
from os import name, path, remove, system
# while True:
@@ -58,6 +58,7 @@ while True:
except Exception as e:
if e.args[0] == 1:
print("Program has requested sleep mode.")
system("xset -display :0 s 30")
with mouse.Listener(on_move=bar, on_click=bar, on_scroll=bar) as listener:
listener.join()
else:

BIN
update.zip Normal file

Binary file not shown.