Skip to content

Commit

Permalink
Fix SACD Import
Browse files Browse the repository at this point in the history
  • Loading branch information
InvisibleFunction committed May 15, 2024
1 parent c75f07a commit 1faf9d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions beets/autotag/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ def track_distance(
if item.mb_trackid:
dist.add_expr("track_id", item.mb_trackid != track_info.track_id)

# Penalize mismatching disc numbers.
if track_info.medium and item.disc:
dist.add_expr("medium_index", item.disc != track_info.medium)

# Plugins.
dist.update(plugins.track_distance(item, track_info))

Expand Down
1 change: 1 addition & 0 deletions beets/config_default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ match:
track_index: 1.0
track_length: 2.0
track_id: 5.0
medium_index: 1.0
preferred:
countries: []
media: []
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ Bug fixes:
* Fix bug where unimported plugin would not ignore children directories of
ignored directories.
:bug:`5130`
* Fix bug where matcher doesn't consider medium number when importing making
it difficult to import hybrid SACDs
:bug:`5148`

For plugin developers:

Expand Down

0 comments on commit 1faf9d3

Please sign in to comment.