Skip to content
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

Changing Artist Name to Wrong Artist #118

Closed
danielcliu opened this issue Oct 30, 2019 · 2 comments
Closed

Changing Artist Name to Wrong Artist #118

danielcliu opened this issue Oct 30, 2019 · 2 comments

Comments

@danielcliu
Copy link
Contributor

danielcliu commented Oct 30, 2019

Describe the bug
There is a bug where if a desired Artist is queried and they were/are part of a more well known musical act the package will change the artist name to the more well known act.

Expected behavior
When running

genius = Genius(token)
genius.search_artist('Swae Lee', max_songs=10 )

The search return the top 10 most popular songs for the artist "Swae Lee".

To Reproduce
As implied above

  1. Create a Genius object
  2. Run search_artist('Swae Lee') with the Genius object

You should get output

Searching for songs by Swae Lee...

Changing artist name to 'Rae Sremmurd'
Song 1: "Black Beatles"
Song 2: ...

Version info

  • Package version lyricsgenius-1.7.0
  • OS: Windows 10, but using WSL Ubuntu 18.04

Additional context
This behavior seems to be happening because in _get_time_from_search_response() in api.py, if the first result is the correct "type", then it is automatically returned. I suspect, in this particular case, Genius is returning the artist "Rae Sremmurd" first because I guess Swae Lee isn't as well known for his solo stuff.

Proposed solution
I think a way to fix this is to not return the top hit, but instead check all the hits for type and to see if the 'id' matches the artist_name. It will mean a performance hit, but seeing as the precedent is set by #32, speed doesn't seem to be the biggest focus of this package.

I am willing to work on this and open a PR if you are ok with it

@johnwmillr
Copy link
Owner

Thanks for the detailed issue report! Please feel free to work on a PR, this is an ongoing issue that I'd like to get sorted out.

@johnwmillr
Copy link
Owner

Resolved by #123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants