Skip to content

Commit 32e9e58

Browse files
Fix SACD Imports
1 parent ef328ed commit 32e9e58

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

beets/autotag/match.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ def track_distance(
208208
if item.mb_trackid:
209209
dist.add_expr("track_id", item.mb_trackid != track_info.track_id)
210210

211+
# Penalize mismatching disc numbers.
212+
if track_info.medium and item.disc:
213+
dist.add_expr("medium", item.disc != track_info.medium)
214+
211215
# Plugins.
212216
dist.update(plugins.track_distance(item, track_info))
213217

beets/config_default.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ match:
207207
track_index: 1.0
208208
track_length: 2.0
209209
track_id: 5.0
210+
medium: 1.0
210211
preferred:
211212
countries: []
212213
media: []

docs/changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ Bug fixes:
1717
* Check if running python from the Microsoft Store and provide feedback to install
1818
from python.org.
1919
:bug:`5467`
20+
* Fix bug where matcher doesn't consider medium number when importing. This makes
21+
it difficult to import hybrid SACDs and other releases with duplicate tracks.
22+
:bug:`5148`
2023

2124
For packagers:
2225

0 commit comments

Comments
 (0)