diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py index 7765e970c..e6a2e277f 100644 --- a/beets/autotag/mb.py +++ b/beets/autotag/mb.py @@ -18,8 +18,6 @@ import musicbrainzngs import re import traceback -from collections import Counter -from six.moves.urllib.parse import urljoin from beets import logging from beets import plugins diff --git a/beets/library.py b/beets/library.py index 79e84e3e6..d94468800 100644 --- a/beets/library.py +++ b/beets/library.py @@ -455,47 +455,47 @@ class Item(LibModel): 'path': PathType(), 'album_id': types.FOREIGN_ID, - 'title': types.STRING, - 'artist': types.STRING, - 'artist_sort': types.STRING, - 'artist_credit': types.STRING, - 'album': types.STRING, - 'albumartist': types.STRING, - 'albumartist_sort': types.STRING, - 'albumartist_credit': types.STRING, - 'genre': types.STRING, - 'style': types.STRING, - 'discogs_albumid': types.INTEGER, - 'discogs_artistid': types.INTEGER, - 'discogs_labelid': types.INTEGER, - 'lyricist': types.STRING, - 'composer': types.STRING, - 'composer_sort': types.STRING, - 'work': types.STRING, - 'mb_workid': types.STRING, - 'work_disambig': types.STRING, - 'arranger': types.STRING, - 'grouping': types.STRING, - 'year': types.PaddedInt(4), - 'month': types.PaddedInt(2), - 'day': types.PaddedInt(2), - 'track': types.PaddedInt(2), - 'tracktotal': types.PaddedInt(2), - 'disc': types.PaddedInt(2), - 'disctotal': types.PaddedInt(2), - 'lyrics': types.STRING, - 'comments': types.STRING, - 'bpm': types.INTEGER, - 'comp': types.BOOLEAN, - 'mb_trackid': types.STRING, - 'mb_albumid': types.STRING, - 'mb_artistid': types.STRING, - 'mb_albumartistid': types.STRING, - 'mb_releasetrackid': types.STRING, - 'trackdisambig': types.STRING, - 'albumtype': types.STRING, - 'albumtypes': types.STRING, - 'label': types.STRING, + 'title': types.STRING, + 'artist': types.STRING, + 'artist_sort': types.STRING, + 'artist_credit': types.STRING, + 'album': types.STRING, + 'albumartist': types.STRING, + 'albumartist_sort': types.STRING, + 'albumartist_credit': types.STRING, + 'genre': types.STRING, + 'style': types.STRING, + 'discogs_albumid': types.INTEGER, + 'discogs_artistid': types.INTEGER, + 'discogs_labelid': types.INTEGER, + 'lyricist': types.STRING, + 'composer': types.STRING, + 'composer_sort': types.STRING, + 'work': types.STRING, + 'mb_workid': types.STRING, + 'work_disambig': types.STRING, + 'arranger': types.STRING, + 'grouping': types.STRING, + 'year': types.PaddedInt(4), + 'month': types.PaddedInt(2), + 'day': types.PaddedInt(2), + 'track': types.PaddedInt(2), + 'tracktotal': types.PaddedInt(2), + 'disc': types.PaddedInt(2), + 'disctotal': types.PaddedInt(2), + 'lyrics': types.STRING, + 'comments': types.STRING, + 'bpm': types.INTEGER, + 'comp': types.BOOLEAN, + 'mb_trackid': types.STRING, + 'mb_albumid': types.STRING, + 'mb_artistid': types.STRING, + 'mb_albumartistid': types.STRING, + 'mb_releasetrackid': types.STRING, + 'trackdisambig': types.STRING, + 'albumtype': types.STRING, + 'albumtypes': types.STRING, + 'label': types.STRING, 'acoustid_fingerprint': types.STRING, 'acoustid_id': types.STRING, 'mb_releasegroupid': types.STRING, @@ -1024,35 +1024,35 @@ class Album(LibModel): _fields = { 'id': types.PRIMARY_ID, 'artpath': PathType(True), - 'added': DateType(), + 'added': DateType(), - 'albumartist': types.STRING, - 'albumartist_sort': types.STRING, - 'albumartist_credit': types.STRING, - 'album': types.STRING, - 'genre': types.STRING, - 'style': types.STRING, - 'discogs_albumid': types.INTEGER, - 'discogs_artistid': types.INTEGER, - 'discogs_labelid': types.INTEGER, - 'year': types.PaddedInt(4), - 'month': types.PaddedInt(2), - 'day': types.PaddedInt(2), - 'disctotal': types.PaddedInt(2), - 'comp': types.BOOLEAN, - 'mb_albumid': types.STRING, - 'mb_albumartistid': types.STRING, - 'albumtype': types.STRING, - 'albumtypes': types.STRING, - 'label': types.STRING, - 'mb_releasegroupid': types.STRING, - 'asin': types.STRING, - 'catalognum': types.STRING, - 'script': types.STRING, - 'language': types.STRING, - 'country': types.STRING, - 'albumstatus': types.STRING, - 'albumdisambig': types.STRING, + 'albumartist': types.STRING, + 'albumartist_sort': types.STRING, + 'albumartist_credit': types.STRING, + 'album': types.STRING, + 'genre': types.STRING, + 'style': types.STRING, + 'discogs_albumid': types.INTEGER, + 'discogs_artistid': types.INTEGER, + 'discogs_labelid': types.INTEGER, + 'year': types.PaddedInt(4), + 'month': types.PaddedInt(2), + 'day': types.PaddedInt(2), + 'disctotal': types.PaddedInt(2), + 'comp': types.BOOLEAN, + 'mb_albumid': types.STRING, + 'mb_albumartistid': types.STRING, + 'albumtype': types.STRING, + 'albumtypes': types.STRING, + 'label': types.STRING, + 'mb_releasegroupid': types.STRING, + 'asin': types.STRING, + 'catalognum': types.STRING, + 'script': types.STRING, + 'language': types.STRING, + 'country': types.STRING, + 'albumstatus': types.STRING, + 'albumdisambig': types.STRING, 'releasegroupdisambig': types.STRING, 'rg_album_gain': types.NULL_FLOAT, 'rg_album_peak': types.NULL_FLOAT, diff --git a/beetsplug/albumtypes.py b/beetsplug/albumtypes.py index 4d7948c7b..47f8dc64e 100644 --- a/beetsplug/albumtypes.py +++ b/beetsplug/albumtypes.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - # This file is part of beets. # Copyright 2021, Edgars Supe. # @@ -16,7 +14,6 @@ """Adds an album template field for formatted album types.""" -from __future__ import division, absolute_import, print_function from beets.autotag.mb import VARIOUS_ARTISTS_ID from beets.library import Album diff --git a/docs/changelog.rst b/docs/changelog.rst index ecf43b803..22a3e7120 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,13 +7,6 @@ Changelog This release now requires Python 3.6 or later (it removes support for Python 2.7, 3.4, and 3.5). -* Primary and secondary release types from MusicBrainz are now stored in - ``albumtypes`` field. Thanks to :user:`edgars-supe`. - :bug:`2200` - -* :doc:`/plugins/albumtypes`: An accompanying plugin for formatting - ``albumtypes``. Thanks to :user:`edgars-supe`. - For packagers: * We fixed a flaky test, named `test_album_art` in the `test_zero.py` file, diff --git a/test/test_albumtypes.py b/test/test_albumtypes.py index a9db12c30..91808553d 100644 --- a/test/test_albumtypes.py +++ b/test/test_albumtypes.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2021, Edgars Supe. # @@ -15,7 +14,6 @@ """Tests for the 'albumtypes' plugin.""" -from __future__ import division, absolute_import, print_function import unittest