ncspot icon indicating copy to clipboard operation
ncspot copied to clipboard

Add time-synced lyrics tab

Open sophronesis opened this issue 1 year ago • 8 comments

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.

sophronesis avatar Mar 06 '23 01:03 sophronesis

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.

hrkfdn avatar Mar 09 '23 18:03 hrkfdn

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?

Naapperas avatar Mar 09 '23 20:03 Naapperas

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.

sophronesis avatar Mar 10 '23 16:03 sophronesis

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.

Naapperas avatar Mar 13 '23 16:03 Naapperas

Diverse and time synced lyrics are already available in this spotify client, just need to convert it from JS to Rust

sophronesis avatar Mar 13 '23 21:03 sophronesis

Found this one, this time written in Go. Need to investigate.

Naapperas avatar Apr 13 '23 22:04 Naapperas

https://github.com/akashrchandran/spotify-lyrics-api

Cabbasca avatar Jul 09 '23 13:07 Cabbasca

Public lyrics APIs for reference: https://github.com/public-apis/public-apis

ThomasFrans avatar Oct 28 '23 17:10 ThomasFrans