diff --git a/beets/config_default.yaml b/beets/config_default.yaml index c0bab8056..b0b495a22 100644 --- a/beets/config_default.yaml +++ b/beets/config_default.yaml @@ -7,7 +7,6 @@ statefile: state.pickle # --------------- Plugins --------------- plugins: [musicbrainz] - pluginpath: [] # --------------- Import --------------- diff --git a/beets/library/models.py b/beets/library/models.py index cbee2a411..f3cab6ae9 100644 --- a/beets/library/models.py +++ b/beets/library/models.py @@ -265,6 +265,7 @@ class Album(LibModel): "language": types.STRING, "country": types.STRING, "albumstatus": types.STRING, + "media": types.STRING, "albumdisambig": types.STRING, "releasegroupdisambig": types.STRING, "rg_album_gain": types.NULL_FLOAT, @@ -320,6 +321,7 @@ class Album(LibModel): "language", "country", "albumstatus", + "media", "albumdisambig", "releasegroupdisambig", "release_group_title", @@ -361,6 +363,7 @@ class Album(LibModel): getters = plugins.album_field_getters() getters["path"] = Album.item_dir getters["albumtotal"] = Album._albumtotal + return getters def items(self): diff --git a/test/test_media_field.py b/test/test_media_field.py new file mode 100644 index 000000000..3d405cc31 --- /dev/null +++ b/test/test_media_field.py @@ -0,0 +1,11 @@ +from beets.library import Item +from beets import library + +def test_album_media_field(tmp_path): + lib = library.Library(path=str(tmp_path / "library.db"), + directory=str(tmp_path / "music")) + + item = Item(title="Test Song", album="Test Album", media="Vinyl") + album = lib.add_album([item]) + + assert album.media == "Vinyl" \ No newline at end of file