Note: Updated video will be posted at some point
Instructions:
-
Input client_id and client_secret from your spotify developer dashboard. Make sure to check off on the 'Web API' option.
-
Click on the explorer's top bar, type 'cmd', run these commands, one by one. This will initialise your credentials into the code:
python -m venv env
set env/bin/activate
python -m pip install spotipy --upgrade pip
$env:SPOTIPY_CLIENT_ID="YOUR_CLIENT_ID"
$env:SPOTIPY_CLIENT_SECRET="YOUR_CLIENT_SECRET"
$env:SPOTIPY_REDIRECT_URI="http://localhost:8888/callback"
NOTE: Use 'export' instead of set if you use mac or linux.
NOTE: Above instructions are for windows 10 powershell / terminal, in VSCode.
If this doesn't work, kindly open main.py, then open the 'spotipy' library, and set the credentials in there. -
Make sure to 'pip install ' from requirements.txt, or manually pip installing each requirement.
-
Run main.py by opening command at the containing folder (click on the top bar and type 'cmd'), then: python main.py
-
Click on 'Approve' when asked for authorization.
#color text and background dynamically to the song image.
#inlcude non-contextual / Jisho pop up definitions.
[Jisho API available: https://jisho.org/api/v1/search/words?keyword=house or JishoAPI library: https://pypi.org/project/jisho-api/]
#include a little loading gif?
#maybe other languages? +Toggleable settings w/ icon.
#synced time -> highlights current lyrical text. [+try syncing skips and rewinds]
#custom icon #Implement user selectable API options. [+in settings cog.]
#MUCH improved multi-threaded translation. Without: 12-30 seconds, with: 2-10 seconds!
#Spotify, LRC LIB, Google Translate API calls and response + errors handling with information displayed about errors to user.
#GUI showing translated, original, and update button. Scrollable textboxes.
#Virtualised environment variables for credentials.
#Update button function: Update and show current playing song, artist, album. Also used to save API calls by comparing previously playing song and current request updated song: if same APIs not called.
#Terminal updates on what's happening, making it easier to debug.
#Fully commented, organised code.
#If starting program and no songs playing, update pressed, program freezes.
#Thread-7 execute_after_loop keeps UI responsive, but not Thread-6 (ui) to the same extent?
#Translation times are very erratic, the same song may take between 2-5 seconds. Why? Google translate?
spotipy: https://github.com/spotipy-dev/spotipy
deep-translator: https://github.com/nidhaloff/deep-translator?tab=readme-ov-file
customtkinter: https://github.com/TomSchimansky/CustomTkinter