sentriz / gonic

music streaming server / free-software subsonic server API implementation
ircs://irc.libera.chat/#gonic
GNU General Public License v3.0
1.49k stars 105 forks source link

Add support for lyrics #519

Open danielepintore opened 2 weeks ago

danielepintore commented 2 weeks ago

In this pull request I've added support for lyrics.

When we make a scan now we check for lyrics inside the file using taglib, once the scan process in finished we have all lyrics saved on the db so we can retrieve them faster. When we are looking for a lyrics it first checks if there is a embedded lyric, if there is we return that, otherwise it looks for a file SONG_NAME.lrc and reads the lyrics from it. If there isn't a .lrc file an empty response is provided.

I've added support for both getLyrics and getLyricsBySongId methods. I have even created a migration, but i'm not so sure if that works fine maybe give that a double check.

Let me know if there is something to change. P.S. I have used some code from #488

sentriz commented 2 weeks ago

thanks for work here, but is this a dupe of https://github.com/sentriz/gonic/pull/488 ?

danielepintore commented 2 weeks ago

Not exactly a dupe since I've added also the possibility of fetching the lyrics from the embedded tag. Since i couldn't work on that pull request I've decided to make a new one. I should have implemented all things that weren't implemented on the other pull request