Fix albumtypes plugin and its tests

The new database type DelimitedString does list to string and vice versa
conversions itself.
This commit is contained in:
J0J0 Todos 2023-02-25 07:46:33 +01:00
parent 27218a9490
commit 93fa19f493
2 changed files with 2 additions and 2 deletions

View file

@ -55,7 +55,7 @@ class AlbumTypesPlugin(BeetsPlugin):
bracket_r = '' bracket_r = ''
res = '' res = ''
albumtypes = item.albumtypes.split('; ') albumtypes = item.albumtypes
is_va = item.mb_albumartistid == VARIOUS_ARTISTS_ID is_va = item.mb_albumartistid == VARIOUS_ARTISTS_ID
for type in types: for type in types:
if type[0] in albumtypes and type[1]: if type[0] in albumtypes and type[1]:

View file

@ -106,6 +106,6 @@ class AlbumTypesPluginTest(unittest.TestCase, TestHelper):
def _create_album(self, album_types: [str], artist_id: str = 0): def _create_album(self, album_types: [str], artist_id: str = 0):
return self.add_album( return self.add_album(
albumtypes='; '.join(album_types), albumtypes=album_types,
mb_albumartistid=artist_id mb_albumartistid=artist_id
) )