Append album to singleton disambiguation string

- New config option for the importer 'singleton_album_disambig' lets
  users choose whether they want to display [album names] in the list of
  candidates. Enabled by default but ony applicable if the candidate provides
  an album attribute.
- Add docs describing the new option and which source plugins currently support
  it.
This commit is contained in:
J0J0 Todos 2023-07-20 09:14:07 +02:00
parent 4087e8c790
commit a374977953
3 changed files with 17 additions and 0 deletions

View file

@ -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"]

View file

@ -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)

View file

@ -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