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

ftintitle: does not gracefully handle duplicate artist name #1179

Closed
marcaddeo opened this issue Dec 28, 2014 · 1 comment · Fixed by #1181
Closed

ftintitle: does not gracefully handle duplicate artist name #1179

marcaddeo opened this issue Dec 28, 2014 · 1 comment · Fixed by #1181
Labels
bug bugs that are confirmed and actionable

Comments

@marcaddeo
Copy link
Contributor

Using ftintitle on one of my tracks, it seemed to get tripped up and not be able to fix it. I've tracked it down to being a problem with the fact that the Album Artist's name is in the Artist field twice.

Artist: The Roots feat. Talib Kweli / The Roots
Album Artist: The Roots

When trying to find the album artist in the artist field, it does a string split using the album artist as a separator. This returns a list with the following values ['', 'feat. Talib Kweli / ', ''].

The code that tries to find the feat_part is then only expecting a two element list, but is instead given a three. It then checks if the -1th element, 2 in this case, is blank. If it's not, it extracts the featured artist.

If it is blank, it goes on to assume the featured artist must be on the left-hand side of the split and checks element 0.

Both elements 0 and 2 are blank, so no featured part is found.

I've thought of two solutions, but am not sure which one would make more sense

  • Attempt to remove duplicate album artists from the artist string before splitting
  • Add another/change the current case to iterate over the split parts to find the first non-blank item

Either way, these methods would presumably still leave the trailing slash on the feat. Talib Kweli / and add the extraneous trailing slash to the track title. This, I'm not quite sure how to handle if at all.

Thoughts?

@sampsyo sampsyo added the bug bugs that are confirmed and actionable label Dec 28, 2014
@sampsyo
Copy link
Member

sampsyo commented Dec 28, 2014

Thanks for investigating; this does look like a problem. Perhaps we should just split on the first occurrence? I don't know why the Roots are in there twice, but I suppose the most reasonable thing would be to move the entire string "Talib Kweli / The Roots" to the title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs that are confirmed and actionable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants