slonopot / Beenius

A proper Genius lyrics provider for MusicBee
34 stars 1 forks source link

Songs with parentheses #6

Closed bhankerson closed 1 year ago

bhankerson commented 1 year ago

Hi, I'm dumb. I've looked in MusicBee forums and other plugins, but I can't find an answer: why don't lyrics fetchers work on songs with parentheses? Is there an easy coding setting to change to make them work? I assume changing said coding must create an undesirable setup for normal operation, if so, what is it? Thank you for your time and effort, I really appreciate your plugin

slonopot commented 1 year ago

Wassup!

Great news for you actually, it's not you who's dumb today, and let me explain why exactly. So, the lyrics plugins use the MusicBee API interface to interact with the content. When you add and enable a new lyrics provider, MusicBee registers it as a subscriber to the lyrics fetching procedure. Once this procedure is called (if a user have autofetch enabled or if a user forces the lookup), MusicBee announces to all the subscribers that it needs to find lyrics for a certain bundle -- it passes the artist, the title and the album. Once it has some results, the first by priority will be chosen.

As you can see, the plugin is using whatever MusicBee passes to it, and that's where the issue is. For the reasons beyond my understanding MusicBee simply removes any text in parentheses from the title before passing it to the plugins. I've brought this up already some time ago but nothing was upgraded since then. Steven made it clear that it's intentional, my assumption is that it's done this way to reduce complaints from lazy people who won't spend an hour to tidy up their library and manually connect all the dots to make software handle their routines later on.

As I am unable to affect this behaviour in any way, I just gave up and never complained since then. With music tagging being a voluntary volatile thing I am just satisfied that my plugins can handle a fair amount of the recent albums without any manual interference.

bhankerson commented 1 year ago

Thank you for the swift response and info! So the "beenius.conf.template" file cannot be used for what I'm trying to do (get lyrics for songs that incorporate parentheses in their title)? What is that file for? I noticed you suggested editing it for Japanese text

slonopot commented 1 year ago

It's mainly used to tweak certain details specifically for your library, it's detailed explanation is available in the readme on the main page at this repo.

Without further details about your specific tag style I can only suggest bulk removing parentheses using the advanced regex tagging plugin or whatever it's called.

bhankerson commented 1 year ago

Ah, duh, yes, I saw that :) Bulk removing parentheses would remove parentheses from the physical file's song title, right (permanent loss of all parentheses everywhere)? I don't want that. Regarding song titles, I suppose my specific style would be: parentheses for text that is part of the song title, including (reprise), (interlude), (outro), etc., square brackets for text referring to a version of a song, including [Live], [Acoustic], [Take 1], [Studio Version], [Demo], etc. I don't use curly brackets, or put "feat. X" in the song title (that goes in as an additional artist). trimTitle would probably be good for me, then, right?

slonopot commented 1 year ago

There's a name of the file that is saved on your hard drive and then there are tags that are embedded in this file. Changing tags won't edit your physical file's name. If you don't have any song title outside parentheses, the plugin will not get a correct title. You can check the plugin's log file to see what does the plugin receive from MusicBee. You can try to enable trimTitle as well, yeah. Overall I'd recommend to do some tests and see what works for you. You can also tag your library in a different way and then reorganize the files from within MusicBee so your filenames are formatted using values from your tags, maybe this will work. The plugin is made for generic cases when you just got an artist and a title from Spotify and it's the first hit on Genius with these two.

bhankerson commented 1 year ago

If there is song title outside of parentheses (the case in 99.9% of my songs), could the allowedDistance parameter be increased to accept a lot of text within parentheses? An example could be Simple Minds - "Don't You (Forget About Me)", would an allowedDistance=15 allow a match on Genius? Or doesn't it work like that? Would a large allowed distance generally increase inaccuracy in getting the correct song's lyrics (or is there some problem that arises with a large allowedDistance)? I.e. would it be impractical to set a very large allowed distance so that a song such as Faces - "You Can Make Me Dance, Sing or Anything (Even Take the Dog for a Walk, Mend a Fuse, Fold Away the Ironing Board, or Any Other Domestic Shortcomings)" would find a match?

slonopot commented 1 year ago

Distance means the character difference between two text entries. Arbitrary high allowedDistance will just increase the probability of a false positive hit and that's it. Searches originally return random entries when the database has no better results to provide. Even though expected otherwise, high allowedDistance may even cause a match with a lyrics line from another track. Exclusively for your case I would recommend setting allowedDistance high once, fetching lyrics album by album while constantly verifying it's not terribly wrong and then returning the configuration value back to normal. Yes, audio tagging is a mess.

bhankerson commented 1 year ago

I will try that. Thank you very much for your time, knowledge and effort! I've been missing a successful lyrics finder for a couple years now, very glad to have one again