tranxuanthang / lrcget

Utility for mass-downloading LRC synced lyrics for your offline music library.
MIT License
540 stars 20 forks source link

False successful retrievals #1

Closed dextre closed 1 year ago

dextre commented 1 year ago

Thanks for making this tool!

Whenever I run this on any folder tree I get a number of missing .lrc files for tracks it says 'Retrieved lyrics successfully', for example:

folder1
total items 154
successed 144
not found 10
.lrc saved 94
folder2
total items 61
successed 58
not found 3
.lrc saved 54
folder3
total items 825
successed 560
not found 265
.lrc saved 411

When I rerun it again on folders with some missing "successed" lrcs, it will show the same few songs as succeeding again, but not save any lrcs. The missing lrcs should be in albums where some .lrcs do save, so not a permission issue.

Is there a way to run this and see some verbose logs?

Edit - more info: The very first time I ran this (on album Views by Drake), I remember it showing "Failed to find" on the tracks titled "9", "Hotline Bling", and "Views", but most other tracks on this album saving fine. Then when I rerun it again on this album, it says these 3 tracks were found successfully, but no new .lrcs show up. (also, on this album I still get a couple other failed tracks every time, so this failed -> success status change isn't happening for every failed search)

Could it be lrclib is hitting some error and caching blank/corrupt .lrcs on the first (failed) try, then showing successes on future searches, but failing to serve those bad .lrcs? My folder3 run with 411 saved .lrcs for 560 "successed" suggests this could be 2 different issues, but I don't know how big your existing .lrc cache is already.

tranxuanthang commented 1 year ago

Currently, a "successed" item means that it found the track in the lrclib's database, and there is basic information of the song (metadata, isrc, spotify ID,...), and the server returns a 200 OK status code.

There are a few situations when a "successed" item like that won't save the lrc file:

tranxuanthang commented 1 year ago

I've released v0.0.5. Now a "successed" item actually means that a LRC file is created. Could you try it?

A more verbose logs feature/option will come later. Alternatively, you can clone the source code and run the application in development mode to be able to access the devtool by the spider icon in titlebar (like in the screenshots in README). With the devtool, you will see the exact response of lrclib service when retrieving lyrics for each track.

dextre commented 1 year ago

OK that makes it more clear

according to your comment on reddit:

Lrclib only returns the exact match (meaning song must match both track name, album name, and artist name, and your song's duration can only differ by ± 2 seconds from database).

I realized the 3 specific failing songs I was testing against were CD ripped and all differ from the streaming versions by 10+ seconds, so that explains why it wasn't getting the lrc, but not sure why it was showing a successful match on those mistimed tracks. My fault 🙃. A way to manually select a result from a partial match would be useful for those cases, or a button to preview the lrc on a fuzzy match. I think most of my failed matches for songs that should have synced lyrics would be due to non-exact titles (ie Ft. or Feat. in title tags, vs streaming versions which instead have multiple artist tags).

I will keep testing, is this OK to run on large collections (200k+ tracks)? I don't want to make it hit some API limit and spoil it for everyone.

tranxuanthang commented 1 year ago

I will keep testing, is this OK to run on large collections (200k+ tracks)? I don't want to make it hit some API limit and spoil it for everyone.

Thank you for your forewarn. I've done some preparation, so I suggest that you try it anyway ;-)