beetbox / beetbox/beets

Use disc number in matching penalties

Open
#3,499 3 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

### Problem

Running this command in verbose (`-vv`) mode:

```sh
$ beet -vv import .
```

Led to this problem:

While trying to import the following release, 1 particular song is mis-tagged, overriding correct information from musicbrainz. This is a bit of a complicated candidate but `beets` is doing really well with it, with this one exception.

https://musicbrainz.org/release/62a7f053-e65d-4842-8da2-291c0b7f346c

So this is a 9 CD release, where the first 7 CDs are music, then a DVD and a Vinyl... Right. I am trying to import only the CD music part, the first 7 CDs or 91 tracks.

The problematic song is no. 81 = CD 6, track 8: `Lonely Soul (7" version)`. It's a rather tricky one, this last music CD is a "best of", and the artist is different as well. The track that was selected instead was 8 from the DVD album `Lonely Soul`, which for some reason won the race (it has no length listed on musicbrainz, so not sure why this wasn't penalty enough).

First I tried to "fix" this by manually overriding the track number (Edit Candidate) but of course because of the other metadata still being wrong, players respecting disc numbers would still play this song in the wrong order...

Then I realized i can use `ignored_media: ["DVD"]`, and indeed, the import is correct this way.

But for the sake of conversation, let's say the medium was also `CD` with a similar length and title, would it make sense to add a distance based on `item["disc"] == track_info.medium_index`? I think that's a very strong indicator for a tracks identity and place...

### Setup

* OS: macos
* Python version: 3.7.6
* beets version: 1.4.9
* Turning off plugins made problem go away (yes/no):

My configuration (output of `beet config`) is:

```yaml
directory: /Volumes/256/sonoteque

format_item: $artist - $album - $title - $length - $track

paths:
default: '%lower{$albumartist/$original_year-$album/$track-$title}'
genre:anime: '%lower{ost-anime/$album-$original_year/$track-$title}'
genre:game: '%lower{ost-game/$album-$original_year/$track-$title}'
genre:classic: '%lower{$composer/$album-$original_year/$track-$title}'
albumtype:soundtrack: '%lower{ost/$album-$original_year/$track-$title}'
comp: '%lower{various/$album-$original_year/$track-$title}'

import:
from_scratch: yes

replace:
\s*&\s*: -and-
'[\\/]': ''
'[\x00-\x1f]': '-'
'[<>:,"\?\*\|!#\$]': ''
\.\.: ''
^\.\.: ''
\.$: ''
\.\s: '-'
\s\.: '-'
^\s+: ''
\s+$: ''
\s: '-'
^-: ''
-$: ''
-\.: '-'
'[\[\]\(\)]': ''
'''': ''
-_-: '-'
'---': '-'
asciify_paths: yes

plugins: edit fetchart ftintitle play scrub random mpdupdate
fetchart:
sources: [filesystem]
auto: yes
minwidth: 0
maxwidth: 0
enforce_ratio: no
cautious: no
cover_names:
- cover
- front
- art
- album
- folder
google_key: REDACTED
google_engine: 001442825323518660753:hrh5ch1gjzm
fanarttv_key: REDACTED
store_source: no
play:
command: /Users/fholop/bin/m
raw: yes
use_folders: no
relative_to:
warning_threshold: 100
bom: no
mpdupdate:
host: localhost
port: 6600
edit:
albumfields: album albumartist
itemfields: track title artist album
ignore_fields: id path
scrub:
auto: yes
ftintitle:
auto: yes
drop: no
format: feat. {0}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.