diff --git a/beets/config_default.yaml b/beets/config_default.yaml index 97c6c8c57..dcb244bbd 100644 --- a/beets/config_default.yaml +++ b/beets/config_default.yaml @@ -34,6 +34,7 @@ import: bell: no set_fields: {} ignored_alias_types: [] + singleton_album_disambig: yes clutter: ["Thumbs.DB", ".DS_Store"] ignore: [".*", "*~", "System Volume Information", "lost+found"] diff --git a/beets/ui/commands.py b/beets/ui/commands.py index e43726afb..1f0375b63 100755 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -220,6 +220,9 @@ def disambig_string(info): disambig.append("Index {}".format(str(info.index))) if info.track_alt: disambig.append("Track {}".format(info.track_alt)) + if (config['import']['singleton_album_disambig'].get() + and info.get('album')): + disambig.append("[{}]".format(info.album)) if disambig: return ', '.join(disambig) diff --git a/docs/reference/config.rst b/docs/reference/config.rst index beefcbbdf..9e3834720 100644 --- a/docs/reference/config.rst +++ b/docs/reference/config.rst @@ -760,6 +760,19 @@ Fields are persisted to the media files of each track. Default: ``{}`` (empty). +.. _singleton_album_disambig: + +singleton_album_disambig +~~~~~~~~~~~~~~~~~~~~~~~~ + +During singleton imports and if the metadata source provides it, album names +are appended to the disambiguation string of matching track candidates. For +example: ``The Artist - The Title (Discogs, Index 3, Track B1, [The Album]``. +This feature is currently supported by the :doc:`/plugins/discogs` and the +:doc:`/plugins/spotify`. + +Default: ``yes``. + .. _musicbrainz-config: MusicBrainz Options