Skip to content

Commit e439c04

Browse files
authored
Make mb_albumartistids available at the album level. (#4909)
As this is a field related to albums, it probably should be accessible as `album.mb_albumartistids`.
2 parents 9584216 + 43b20f2 commit e439c04

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

beets/library.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,7 @@ class Album(LibModel):
11791179
"comp": types.BOOLEAN,
11801180
"mb_albumid": types.STRING,
11811181
"mb_albumartistid": types.STRING,
1182+
"mb_albumartistids": types.MULTI_VALUE_DSV,
11821183
"albumtype": types.STRING,
11831184
"albumtypes": types.SEMICOLON_SPACE_DSV,
11841185
"label": types.STRING,
@@ -1235,6 +1236,7 @@ class Album(LibModel):
12351236
"comp",
12361237
"mb_albumid",
12371238
"mb_albumartistid",
1239+
"mb_albumartistids",
12381240
"albumtype",
12391241
"albumtypes",
12401242
"label",

test/test_importer.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ def test_import_with_delete_prunes_directory_empty(self):
129129
self.run_asis_importer(delete=True)
130130
self.assertNotExists(os.path.join(self.import_dir, b"album"))
131131

132+
def test_album_mb_albumartistids(self):
133+
self.run_asis_importer()
134+
album = self.lib.albums()[0]
135+
assert album.mb_albumartistids == album.items()[0].mb_albumartistids
136+
132137
@unittest.skipUnless(_common.HAVE_SYMLINK, "need symlinks")
133138
def test_import_link_arrives(self):
134139
self.run_asis_importer(link=True)

0 commit comments

Comments
 (0)