mirror of
https://github.com/beetbox/beets.git
synced 2025-12-28 19:42:42 +01:00
Add ignored setting. Don't show matches with specified penalties applied, e.g. missing tracks or unmatched tracks.
If you know you never want these, they can clutter up the interface especially now that we have multiple data sources.
This commit is contained in:
parent
45dc99f1a9
commit
f3545860da
4 changed files with 22 additions and 1 deletions
|
|
@ -575,8 +575,15 @@ def _add_candidate(items, results, info):
|
|||
|
||||
# Get the change distance.
|
||||
dist = distance(items, info, mapping)
|
||||
log.debug('Success. Distance: %f' % dist)
|
||||
|
||||
# Skip matches with ignored penalties.
|
||||
penalties = [key for _, key in dist.sorted]
|
||||
for penalty in config['match']['ignored'].as_str_seq():
|
||||
if penalty in penalties:
|
||||
log.debug('Ignored. Penalty: %s' % penalty)
|
||||
return
|
||||
|
||||
log.debug('Success. Distance: %f' % dist)
|
||||
results[info.album_id] = hooks.AlbumMatch(dist, info, mapping,
|
||||
extra_items, extra_tracks)
|
||||
|
||||
|
|
|
|||
|
|
@ -115,3 +115,4 @@ match:
|
|||
countries: []
|
||||
media: []
|
||||
original_year: no
|
||||
ignored: []
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ Changelog
|
|||
number is still "correct", just in a different format.
|
||||
* Sort missing and unmatched tracks by index and title and group them
|
||||
together for better readability.
|
||||
* Don't show potential matches that have specific penalties applied, as
|
||||
configured by the :ref:`ignored` setting.
|
||||
|
||||
* Improve calculation of similarity score and recommendation:
|
||||
|
||||
|
|
|
|||
|
|
@ -458,6 +458,17 @@ Here's an example::
|
|||
|
||||
By default, none of these options are enabled.
|
||||
|
||||
.. _ignored:
|
||||
|
||||
ignored
|
||||
~~~~~~~
|
||||
|
||||
You can completely avoid matches that have certain penalties applied by adding
|
||||
the penalty name to the ``ignored`` setting::
|
||||
|
||||
match:
|
||||
ignored: missing_tracks unmatched_tracks
|
||||
|
||||
.. _path-format-config:
|
||||
|
||||
Path Format Configuration
|
||||
|
|
|
|||
Loading…
Reference in a new issue