Refactored code for TRUE multithreaded performance startup time decreased from 2 secs to 0.2 secs updates song time decreased from 3 secs to 0.1 secs introduced proper and full error handler, can fully recover from errors (including performing a full restart) implemented web server to push updates and restart application (flask) getting lyrics is truely mulithreaded now, all in memory.
101 lines
4.6 KiB
Plaintext
101 lines
4.6 KiB
Plaintext
update volume slider from spotify every 10 seconds (probably going to need a new function for it)
|
|
add clause for if nothing is playing is returend from spotify then present list of devices to chose where to start playback on
|
|
wrap all grid elements in a function, call that function from the start_playback_on_device function; right now it sometimes doesn't load the artist and title
|
|
selection resets after 1 second on devices list; need to remove root.after in update_song_label function and call that function from the start_playback_on_device function
|
|
and have that have a root.after to loop for refreshing devices... or find other way to make the root.after not deselect current selection in list.
|
|
|
|
last thing i was doing: BACKGROUND ALBUM ART IMAGE
|
|
|
|
|
|
01/14/23:
|
|
smooth progress bar
|
|
|
|
01/15/23:
|
|
turns off screen and stops polling api after inactivity, reauthenticates when
|
|
screen is turned back on
|
|
|
|
01/18/23:
|
|
turn off screen when holding down on album art.
|
|
|
|
01/20/2023:
|
|
background gradient
|
|
|
|
01/21/2023:
|
|
it errors on "track_name = current_playback["item"]["name"]"
|
|
'TypeError: NoneType', current_playback is None basically... even though there is already an if statement checking if it is None.
|
|
ERROR HAPPENS ON SOME KIDZ BOP SONGS???
|
|
|
|
01/21/2023:
|
|
add canvas videos to background if available. USE: https://github.com/Delitefully/spotify-canvas-downloader/blob/master/src/canvas.py
|
|
|
|
01/21/2023:
|
|
need to find out what the protobud error parsing message with type' error is about, probably use a try and except as e statement then print e to figure out the full error
|
|
|
|
SpotifyOAuthError
|
|
SpotifyException
|
|
|
|
02/23/2023:
|
|
Make try statement for update_song_label to get around this
|
|
|
|
Traceback (most recent call last):
|
|
File "C:\Users\spong\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 1921, in __call__
|
|
return self.func(*args)
|
|
File "C:\Users\spong\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 839, in callit
|
|
func(*args)
|
|
File "c:\Users\spong\Documents\Python Programs\Spotify\spotifycontroller.py", line 287, in update_song_label
|
|
track_name = current_playback["item"]["name"]
|
|
TypeError: 'NoneType' object is not subscriptable
|
|
|
|
|
|
02/23/2023:
|
|
add ability to like songs, by icon somewhere or maybe by double tapping or holding on track title... animation?? when adding to liked
|
|
|
|
is calling the functions directly causing the issues? ex. get_devices() should be root.after(0, get_devices) or root(get_devices) ???????
|
|
Exception in Tkinter callback
|
|
Traceback (most recent call last):
|
|
File "/usr/lib/python3.9/tkinter/__init__.py", line 1892, in __call__
|
|
return self.func(*args)
|
|
File "/usr/lib/python3.9/tkinter/__init__.py", line 814, in callit
|
|
func(*args)
|
|
File "<string>", line 287, in update_song_label
|
|
TypeError: 'NoneType' object is not subscriptable
|
|
|
|
03/04/2023:
|
|
switch to spotify web api for track information to avoid api limit???
|
|
|
|
03/04/2023:
|
|
new updater, use version numbering to pull updates if server has a newer version and dont update if newer version isnt available.
|
|
create a single json file that has a version list with download links to each version. have updater.py download the json file, read and compare to currently downloaded version.
|
|
if newer version is in json file, follow link in json file to download, otherwise continue to start the program.
|
|
|
|
03/04/2023:
|
|
redo background color algo. PROMINENT COLOR not average like it is now.
|
|
|
|
03/04/2023:
|
|
add shuffle and repeat buttons
|
|
|
|
03/07/2023:
|
|
make it so the displays turns off automatically after some time (maybe depending on time, ie. late at night)
|
|
|
|
04/03/2023:
|
|
make it so update.py that kills the main script after 6 hours and turn the display off, if the displays wakes up then it will restart the main script
|
|
|
|
04/08/2023:
|
|
background of artist image
|
|
hold previous button to start song over
|
|
|
|
04/10/2023:
|
|
if title is held for over 5 seconds then also shutdown the update.py by throwing an exception that the update.py will catch and then kill the update script
|
|
also, if you hold it for over 10 seconds then shutdown the pi entirely. all by sending certain sigterms with exit()
|
|
|
|
04/13/2023:
|
|
update.py modified to handle click (untested), spotify.py functions created. TODO: tie get_devices into sleep & kill functions as those are setup to kill script and handoff to update.py
|
|
|
|
04/28/2023:
|
|
periodically check the spotify api, if it is playing something then click a button to wake the display
|
|
|
|
04/29/2023:
|
|
experiment with converting project to flask/js and browser based.
|
|
|
|
05/07/2023:
|
|
detect previous song change by checking if song is at less than 5 seconds into song, if yes then go to previous song, if not then restart song. |