diff --git a/beets/autotag/match.py b/beets/autotag/match.py index 7975b9bf0..de347f604 100644 --- a/beets/autotag/match.py +++ b/beets/autotag/match.py @@ -357,7 +357,7 @@ def _recommendation(results): if isinstance(results[0], hooks.AlbumMatch): # Load the configured recommendation maxima. max_rec = {} - for trigger in 'partial', 'tracklength', 'tracknumber': + for trigger in 'discogs', 'partial', 'tracklength', 'tracknumber': max_rec[trigger] = \ config['match']['max_rec'][trigger].as_choice({ 'strong': recommendation.strong, @@ -366,6 +366,11 @@ def _recommendation(results): 'none': recommendation.none, }) + # Discogs. + if rec > max_rec['discogs'] and \ + results[0].info.data_source == 'Discogs': + rec = max_rec['discogs'] + # Partial match. if rec > max_rec['partial'] and \ (results[0].extra_items or results[0].extra_tracks): diff --git a/beets/config_default.yaml b/beets/config_default.yaml index d7b14175f..15397908b 100644 --- a/beets/config_default.yaml +++ b/beets/config_default.yaml @@ -68,6 +68,7 @@ match: medium_rec_thresh: 0.25 rec_gap_thresh: 0.25 max_rec: + discogs: strong partial: medium tracklength: strong tracknumber: strong diff --git a/docs/changelog.rst b/docs/changelog.rst index 8951b6113..8c060dd38 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -40,7 +40,7 @@ Changelog that go missing. * More consistent display and colorization of album and track metadata. -.. _discogs: http://discogs.com/ +.. _Discogs: http://discogs.com/ 1.1.0 (April 29, 203) --------------------- diff --git a/docs/plugins/discogs.rst b/docs/plugins/discogs.rst index 2a9fb48bd..14fe1bbd6 100644 --- a/docs/plugins/discogs.rst +++ b/docs/plugins/discogs.rst @@ -4,7 +4,7 @@ Discogs Plugin The ``discogs`` plugin extends the autotagger's search capabilities to include matches from the `Discogs`_ database. -.. _discogs: http://discogs.com +.. _Discogs: http://discogs.com Installation ------------ @@ -14,7 +14,21 @@ install the `discogs-client`_ library by typing:: pip install discogs-client -That's it! Matches from Discogs will now show up during import alongside -matches from MusicBrainz. +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``.