ncspot
ncspot copied to clipboard
Add time-synced lyrics tab
Describe the solution you'd like:
View lyrics like in official app. Bonus points if time-synced, but no so necessary. I can make this myself using author+song_name from dbus, but would be highly appreciated to see this as native feature.
I like the idea, however I'm not sure but I don't think the Spotify web API exposes the lyrics, which would be a requirement, especially if we want to display it time-synced.
I also came looking for this feature: since it was not yet being done I started working on it, if that's OK with you. I am however a Rust newbie so any tips are welcome.
Regarding your comment @hrkfdn, I arrived at ncspot
from ncmcpp
, which has built-in lyrics fetching. I just searched their repository and they are using cURL: I believe this could be an early solution, at least while Spotify does not expose lyric data through their API (if they ever will). What do you think? It does not allow us to keep the lyrics time-synced tho. I also just checked and Spotify uses Musixmatch, could that be something we explore?
I don't think I found an universal fix (not anyone appreciate python scripts), but my current solution is just to use lyrics-in-terminal. Best thing is that it is music-player-agnostic solution (it fetches author and track from mpris/dbus
). And as @Naapperas mentioned, ncmpcpp
have fetching from five different sources, so this is not a technical issue. Hope someone will find this helpful.
I have found a wall while working on this: is there any way for a view to know that the current song has ended and a new song has started? I've been looking and the only thing I found was the end of the main
function which has an event loop, but I'm sure there must be a better way that I'm just not seeing. Any tips?
Also, I did not find anything regarding this in the Cursive docs: is there any event regarding when a view has been rendered for the first time? Kinda like an on_enter
call.
Diverse and time synced lyrics are already available in this spotify client, just need to convert it from JS to Rust
Found this one, this time written in Go. Need to investigate.
https://github.com/akashrchandran/spotify-lyrics-api
Public lyrics APIs for reference: https://github.com/public-apis/public-apis