mirror of
https://github.com/beetbox/beets.git
synced 2025-12-22 00:23:33 +01:00
Look at track penalties as well when downgrading recommendations for albums.
This commit is contained in:
parent
b02974f68f
commit
c12abb74ab
1 changed files with 5 additions and 1 deletions
|
|
@ -546,7 +546,11 @@ def _recommendation(results):
|
|||
|
||||
# Downgrade to the max rec if it is lower than the current rec for an
|
||||
# applied penalty.
|
||||
for _, key in results[0].distance.sorted:
|
||||
keys = set(key for _, key in min_dist.sorted)
|
||||
if isinstance(results[0], hooks.AlbumMatch):
|
||||
for track_dist in min_dist.tracks.values():
|
||||
keys.update(key for _, key in track_dist.sorted)
|
||||
for key in keys:
|
||||
max_rec = config['match']['max_rec'][key].as_choice({
|
||||
'strong': recommendation.strong,
|
||||
'medium': recommendation.medium,
|
||||
|
|
|
|||
Loading…
Reference in a new issue