diff --git a/beets/autotag/__init__.py b/beets/autotag/__init__.py index ef775f6ec..b3cfa9541 100644 --- a/beets/autotag/__init__.py +++ b/beets/autotag/__init__.py @@ -97,8 +97,9 @@ def apply_metadata(album_info, mapping): if config['per_disc_numbering']: # We want to let the track number be zero, but if the medium index # is not provided we need to fall back to the overall index. - item.track = track_info.medium_index - if item.track is None: + if track_info.medium_index is not None: + item.track = track_info.medium_index + else: item.track = track_info.index item.tracktotal = track_info.medium_total or len(album_info.tracks) else: diff --git a/docs/changelog.rst b/docs/changelog.rst index 7e51aabbc..6bf4a9681 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -23,6 +23,9 @@ Fixes: * :doc:`/plugins/permissions`: Fix a regression in the previous release where the plugin would always fail to set permissions (and log a warning). :bug:`2089` +* With :ref:`per_disc_numbering` enabled, some metadata sources (notably, the + :doc:`/plugins/beatport`) would not set the track number at all. This is + fixed. :bug:`2085` The last release, 1.3.19, also erroneously reported its version as "1.3.18" when you typed ``beet version``. This has been corrected.