diff --git a/beetsplug/ftintitle.py b/beetsplug/ftintitle.py index bfeaf734d..d332b0c08 100644 --- a/beetsplug/ftintitle.py +++ b/beetsplug/ftintitle.py @@ -95,7 +95,7 @@ def find_feat_part(artist, albumartist): # featuring artist on the left-hand side. else: lhs, rhs = split_on_feat(albumartist_split[0]) - if rhs: + if lhs: feat_part = lhs return feat_part diff --git a/test/test_ftintitle.py b/test/test_ftintitle.py index cffa3332a..fa51dfc14 100644 --- a/test/test_ftintitle.py +++ b/test/test_ftintitle.py @@ -32,6 +32,8 @@ class FtInTitlePluginTest(unittest.TestCase): {'artist': 'Alice and Bob', 'album_artist': 'Alice', 'feat_part': 'Bob'}, {'artist': 'Alice With Bob', 'album_artist': 'Alice', 'feat_part': 'Bob'}, {'artist': 'Alice defeat Bob', 'album_artist': 'Alice', 'feat_part': None}, + {'artist': 'Alice & Bob', 'album_artist': 'Bob', 'feat_part': 'Alice'}, + {'artist': 'Alice ft. Bob', 'album_artist': 'Bob', 'feat_part': 'Alice'}, ] for test_case in test_cases: