-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
feat: implement lyrics #488
Conversation
Awesome! |
I'm glad you also implemented |
No, see the |
Should this also pick up .txt files? I noticed that lrcget will download unsynced lyrics as .txt files. |
this looks great. i think we can get stuff merged incrementally here wdyt? for example just shipping support for .lrc files first in one PR. like you have here without extra stuff |
I can exclude the embedded lyrics but can you give some guidance on how to query the artist in the database for /getLyrics search to be done? |
@TorchedSammy hi sorry for delay. regarding quering for artist, maybe ServeGetTopSongs could help. it does artistName, err := params.Get("artist")
if err != nil {
return spec.NewError(10, "please provide an `artist` parameter")
}
var artist db.Artist
if err := c.dbc.Where("name=?", artistName).Find(&artist).Error; err != nil {
return spec.NewError(0, "finding artist by name: %v", err)
}
// ...
var tracks []*db.Track
err = c.dbc.
// ...
Joins("JOIN track_artists ON track_artists.track_id=tracks.id").
Joins("JOIN artists ON artists.id=track_artists.artist_id").
Where("artists.id=?", artist.ID).
// ...
Error |
c5b3a1c
to
86fd590
Compare
looks like someone else is working on a pr for this, awesome. |
closes #371
Implements both /getLyrics and OpenSubsonic /getLyricsBySongId
TODO: