ftintitle: Clarify indexing

This can only be a two-element array, so just use the index 1. This matches
better with the comments, that say "right-hand side" instead of "the last
value in the list."
This commit is contained in:
Adrian Sampson 2017-04-19 19:08:15 -04:00
parent 9d42728f7f
commit fae8fcc932

View file

@ -58,9 +58,9 @@ def find_feat_part(artist, albumartist):
# If the last element of the split (the right-hand side of the
# album artist) is nonempty, then it probably contains the
# featured artist.
elif albumartist_split[-1] != '':
elif albumartist_split[1] != '':
# Extract the featured artist from the right-hand side.
_, feat_part = split_on_feat(albumartist_split[-1])
_, feat_part = split_on_feat(albumartist_split[1])
return feat_part
# Otherwise, if there's nothing on the right-hand side, look for a