{"id":26351220,"url":"https://github.com/focusthen/music-player.nvim","last_synced_at":"2025-03-16T10:19:44.807Z","repository":{"id":281413344,"uuid":"945198294","full_name":"FocusThen/music-player.nvim","owner":"FocusThen","description":"Spotify tracking songs for neovim","archived":false,"fork":false,"pushed_at":"2025-03-16T06:32:49.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T07:25:49.890Z","etag":null,"topics":["neovim","spotify"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FocusThen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-08T22:02:20.000Z","updated_at":"2025-03-16T06:32:52.000Z","dependencies_parsed_at":"2025-03-08T23:21:21.469Z","dependency_job_id":"63c8d6fa-9e2c-4cc0-bc7f-06bad094b630","html_url":"https://github.com/FocusThen/music-player.nvim","commit_stats":null,"previous_names":["focusthen/music-player.nvim"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FocusThen%2Fmusic-player.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FocusThen%2Fmusic-player.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FocusThen%2Fmusic-player.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FocusThen%2Fmusic-player.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FocusThen","download_url":"https://codeload.github.com/FocusThen/music-player.nvim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243853189,"owners_count":20358385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["neovim","spotify"],"created_at":"2025-03-16T10:19:43.866Z","updated_at":"2025-03-16T10:19:44.799Z","avatar_url":"https://github.com/FocusThen.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Music player (Spotify) for neovim\n\n* authorize\n    * For `Code` code opens default browser but behind the scene i make lua server so i can get the code.\n    * `access_token` and `refresh_token` saved in `.config/nvim/music-player-credentials.json`\n\n* `:MPlayer` \u0026 `require(\"music-player\").authorize()`\n* `:MPlayerCurrentSong` \u0026 `require(\"music-player\").get_current_song()`\n    * Notify about song state and artist - song name\n* `:MPlayerStart` \u0026 `require(\"music-player\").start_polling()`\n    * Creates timer and checks `:MPlayerCurrentSong` every 5 secs\n* `:MPlayerStop` \u0026 `require(\"music-player\").stop_polling()`\n    * Stops timer\n\n\n### Player\n* `:MPlayerPlay`\n* `:MPlayerPause`\n* `:MPlayerNext`\n* `:MPlayerPrev`\n\n### FILE\n* `:MPlayerClean`\n    * removes saved file.\n\n# TODOS\n### Building Steps\n- [x] Create repo\n- [x] Create basic folder structure\n- [ ] Naming is hard what should I name it\n---\n### Login stuff\n\n- [x] login spotify is pain in the ass\n- [x] redirect user to get code or something\n- [x] get Code somehow and connect the spotify\n- [x] save the data what we have given\n- [x] create server that lisen on that redirect url and get the code(be smart).\n- [x] Get information `https://api.spotify.com/v1/me/player/currently-playing`\n- [x] Print console basic information such as what is playing\n- [x] Instead using console, toast it information with `vim.notify`\n- [x] PKCE ????????? you don't need something like client secret ?\n\n---\n### Functions\n\n- [x] create fn that shows currently playing\n- [x] create fn maybe goes next or prev?\n- [x] create fn maybe pause?\n- [x] create track last song every 5 sec if changed notify!\n- [x] right now we are checking every 5 sec songs, we might need check if user inactive if user afk we should stop requesting.\n---\n### Finishing\n- [x] Bind fn's together so anyone can use\n- [ ] After learn LUA refactor this garbage\n\n\n### Bugs!\n- [x] Some times in `utils.timer` -\u003e `vim.schedule_wrap` fails and gives error about currently playing unfinished or something.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffocusthen%2Fmusic-player.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffocusthen%2Fmusic-player.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffocusthen%2Fmusic-player.nvim/lists"}