-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
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?