-
authorize
- For
Codecode opens default browser but behind the scene i make lua server so i can get the code. access_tokenandrefresh_tokensaved in.config/nvim/music-player-credentials.json
- For
-
:MPlayer&require("music-player").authorize() -
:MPlayerCurrentSong&require("music-player").get_current_song()- Notify about song state and artist - song name
-
:MPlayerStart&require("music-player").start_polling()- Creates timer and checks
:MPlayerCurrentSongevery 5 secs
- Creates timer and checks
-
:MPlayerStop&require("music-player").stop_polling()- Stops timer
:MPlayerPlay:MPlayerPause:MPlayerNext:MPlayerPrev
:MPlayerClean- removes saved file.
- Create repo
- Create basic folder structure
- Naming is hard what should I name it
- login spotify is pain in the ass
- redirect user to get code or something
- get Code somehow and connect the spotify
- save the data what we have given
- create server that lisen on that redirect url and get the code(be smart).
- Get information
https://api.spotify.com/v1/me/player/currently-playing - Print console basic information such as what is playing
- Instead using console, toast it information with
vim.notify - PKCE ????????? you don't need something like client secret ?
- create fn that shows currently playing
- create fn maybe goes next or prev?
- create fn maybe pause?
- create track last song every 5 sec if changed notify!
- right now we are checking every 5 sec songs, we might need check if user inactive if user afk we should stop requesting.
- Bind fn's together so anyone can use
- After learn LUA refactor this garbage
- Some times in
utils.timer->vim.schedule_wrapfails and gives error about currently playing unfinished or something.