mirror of
https://github.com/beetbox/beets.git
synced 2025-12-23 17:13:30 +01:00
Rename the discogs max rec setting to non_mb_source, so it can apply to all data source plugins.
This commit is contained in:
parent
feb1d8631d
commit
e66a865f17
4 changed files with 14 additions and 27 deletions
|
|
@ -359,7 +359,7 @@ def _recommendation(results):
|
|||
if isinstance(results[0], hooks.AlbumMatch):
|
||||
# Load the configured recommendation maxima.
|
||||
max_rec = {}
|
||||
for trigger in 'discogs', 'partial', 'tracklength', 'tracknumber':
|
||||
for trigger in 'non_mb_source', 'partial', 'tracklength', 'tracknumber':
|
||||
max_rec[trigger] = \
|
||||
config['match']['max_rec'][trigger].as_choice({
|
||||
'strong': recommendation.strong,
|
||||
|
|
@ -368,10 +368,10 @@ def _recommendation(results):
|
|||
'none': recommendation.none,
|
||||
})
|
||||
|
||||
# Discogs.
|
||||
if rec > max_rec['discogs'] and \
|
||||
results[0].info.data_source == 'Discogs':
|
||||
rec = max_rec['discogs']
|
||||
# Non-MusicBrainz source.
|
||||
if rec > max_rec['non_mb_source'] and \
|
||||
results[0].info.data_source != 'MusicBrainz':
|
||||
rec = max_rec['non_mb_source']
|
||||
|
||||
# Partial match.
|
||||
if rec > max_rec['partial'] and \
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ match:
|
|||
medium_rec_thresh: 0.25
|
||||
rec_gap_thresh: 0.25
|
||||
max_rec:
|
||||
discogs: strong
|
||||
non_mb_source: strong
|
||||
partial: medium
|
||||
tracklength: strong
|
||||
tracknumber: strong
|
||||
|
|
|
|||
|
|
@ -14,21 +14,7 @@ install the `discogs-client`_ library by typing::
|
|||
|
||||
pip install discogs-client
|
||||
|
||||
Matches from Discogs will now show up during import alongside matches from
|
||||
MusicBrainz.
|
||||
That's it! Matches from Discogs will now show up during import alongside
|
||||
matches from MusicBrainz.
|
||||
|
||||
.. _discogs-client: https://github.com/discogs/discogs_client
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
You can use the :ref:`max_rec` setting to define a maximum recommendation level
|
||||
for matches from Discogs::
|
||||
|
||||
match:
|
||||
max_rec:
|
||||
discogs: medium
|
||||
|
||||
This example would prevent the auto-tagger from automatically applying a
|
||||
strong match from Discogs, and give you a chance to confirm the changes. The
|
||||
default is ``strong``.
|
||||
|
|
|
|||
|
|
@ -398,16 +398,17 @@ match is usually based on the distance calculation. But you can also control
|
|||
the recommendation for certain specific situations by defining *maximum*
|
||||
recommendations when:
|
||||
|
||||
* a match has missing/extra tracks;
|
||||
* the track number for at least one track differs;
|
||||
* the track length for at least one track differs; or
|
||||
* a match came from the optional :doc:`Discogs </plugins/discogs>` plugin.
|
||||
* a match came from a source other than MusicBrainz, e.g. the
|
||||
:doc:`Discogs </plugins/discogs>` plugin;
|
||||
* a match has missing or extra tracks;
|
||||
* the length (duration) of at least one track differs; or
|
||||
* at least one track number differs;
|
||||
|
||||
To define maxima, use keys under ``max_rec:`` in the ``match`` section::
|
||||
|
||||
match:
|
||||
max_rec:
|
||||
discogs: strong
|
||||
non_mb_source: strong
|
||||
partial: medium
|
||||
tracklength: strong
|
||||
tracknumber: strong
|
||||
|
|
|
|||
Loading…
Reference in a new issue