-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Genius lyrics provider not finding track #3446
Comments
Hi! Looking at the code, it doesn’t look like the Genius backend logs any messages in the success case or in several possible failure cases. So if the plug-in were making requests and not finding anything for some reason, it’s possible that you wouldn’t see anything in the log. So: is your diagnosis that the plugin isn’t making requests based on the log alone, or some other evidence like network traffic? If the former, something could indeed be broken, but we’ll need to add more logging to find out what. |
@sampsyo Spot on, I just expected a log like the other matchers but do not know for sure. How can I generate more logs to further debug this issue? Happy to help! As you saw, the link to the song matches all the fields from my metadata, so not sure why it wouldn't be working. |
Great! I think we should add a few Lines 366 to 367 in 60bba37
…elsewhere throughout the backend's logic. For example, I think the most likely culprit is that this condition is false: Lines 402 to 404 in 60bba37
So, after that, we could put something like: else:
self._log.debug('No matching artist.')
return None or similar. Then, maybe it would make sense to log something about the contents of If you do go about adding this extra logging (thanks!!), could I ask you the favor of opening a pull request so other users can benefit too? |
@sampsyo I wasn't expecting to patch this up, but I'd be happy to try! I love this project and my Python is passable 😄 . I'll start looking into dev setup and see what I can do! Thanks for the pointers. |
@sampsyo Cool, made a little progress so far. I added debuggers as suggested and I believe I've landed myself smack dab in one of Python (2)'s most infamous headaches: string encodings! What I'm seeing when I print out the primary artist of the Genius response:
In fact, the I tried a couple things:
I'm sure by just trying a bunch of different options I could get it to work, but two questions for you:
Cheers! |
Wow!! That's quite a thing! According to your cut n' paste, that's Unicode character U+200B ZERO WIDTH SPACE. I have no clue why Genius would include that on that artist. It definitely seems like a data issue in Genius. If it affects more than this specific single artist, maybe it's worth adding a fix that strips this specific character, i.e., Regardless, however, adding the extra logging to make this problem more visible seems like a good idea! |
@sampsyo Nice find! Makes sense.. I guess? I can think of a few different ways to maintain capitalization without weird characters though 🤔 So if it's a consistent pattern, can we add the |
Yeah, that sounds great! Indeed, I don't think we need to log every artist. Just logging that a match wasn't found seems good. |
Fixed! |
Hey there, first off thanks for the software, it's very useful! I'm trying to get some lyrics for a new album I added to my library. I originally noticed more 'edge' hip-hop lyrics not importing despite Genius being enabled, and Genius having a TON of rap lyrics. It does not seem like the plugin is making a request to Genius like the other providers (which do not have the song)
Specific song I am trying to import below: https://genius.com/Billy-woods-marlow-lyrics
Problem
Running this command in verbose (
-vv
) mode:File: http://www.mediafire.com/file/0rfq90y1v77mejf/01_Marlow.mp3/file
Setup
My configuration (output of
beet config
) is:The text was updated successfully, but these errors were encountered: