Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add time-synced lyrics tab #1076

Open
sophronesis opened this issue Mar 6, 2023 · 8 comments · May be fixed by #1123
Open

Add time-synced lyrics tab #1076

sophronesis opened this issue Mar 6, 2023 · 8 comments · May be fixed by #1123
Labels
enhancement New feature or request

Comments

@sophronesis
Copy link

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 sophronesis added the enhancement New feature or request label Mar 6, 2023
@hrkfdn
Copy link
Owner

hrkfdn commented Mar 9, 2023

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.

@Naapperas
Copy link

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?

@sophronesis
Copy link
Author

sophronesis commented Mar 10, 2023

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.

@Naapperas
Copy link

Naapperas commented Mar 13, 2023

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.

@sophronesis
Copy link
Author

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

@Naapperas
Copy link

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

@Naapperas Naapperas linked a pull request Apr 15, 2023 that will close this issue
5 tasks
@Cabbasca
Copy link

Cabbasca commented Jul 9, 2023

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

@ThomasFrans
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants