Beet doesn't offer to merge albums when import run with --noautotag
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 2.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 31
Description
Beet is assigning unique album IDs to my self-tagged tracks, when those tracks are imported in a piecemeal (piecewise) fashion. I don't know if this is a bug or expected behavior. If the latter, I wonder if there is a way to force beet to join (merge) the new import with the old import.
Set up: to make a super simple, reproducible example, I create two dummy, empty mp3 files ([source](https://stackoverflow.com/a/16715419/310441)) and tagged them as follows:
```sh
$ ffmpeg -f lavfi -i anullsrc=r=44100:cl=mono -t 5 -q:a 9 -acodec libmp3lame foo.mp3
$ cp foo.mp3 bar.mp3
$ id3tag -s foo -a foobar -A foobar -t 1 foo.mp3
$ id3tag -s bar -a foobar -A foobar -t 2 bar.mp3
```
### Problem
Running this command in verbose (`-vv`) mode:
```sh
$ beet -vv import -AW foo.mp3
$ beet -vv import -AW bar.mp3
```
Led to this problem:
```
$ beet ls -p album:foobar
/mnt/media/music/foobar/foobar/01 foo.mp3
/mnt/media/music/foobar/foobar [3989]/02 bar.mp3
```
Since I imported the files with `--noautotag`, I expected/hoped beet would just use `foobar` as the album and naively combine (merge) it with the already imported album track. But I was never prompted about whether I wanted to merge the files!
May be related to https://github.com/beetbox/beets/issues/112 or https://github.com/beetbox/beets/issues/1861
### Setup
* OS: debian
* Python version: Python 3.9.2
* beets version: 1.6.0
* Turning off plugins made problem go away (yes/no): No
My configuration
```yaml
directory: /mnt/media/music
plugins:
- discogs
- duplicates
- edit
- info
- inline
- chroma
item_fields:
disc_and_track: u'%i-%02i' % (disc, track) if disctotal > 1 else u'%02i' % (track)
paths:
default: $albumartist/$album%aunique{}/$disc_and_track $title
comp: Compilations/$album%aunique{}/$disc_and_track $title
import:
move: yes
write: yes
autotag: yes
log: beetslog.txt
match:
preferred:
countries: [US, GB|UK, AU]
media: [CD, Digital Media|File]
original_year: yes
chroma:
auto: yes
art_filename: albumart
ui:
color: yes
per_disc_numbering: yes
edit:
itemfields:
- album
- albumartist
- artist
- track
- title
- year
albumfields:
- albumartist
- album
- year
- albumtype
- comp
ignore_fields: id path
duplicates:
album: no
checksum: ''
copy: ''
count: no
delete: no
format: ''
full: no
keys: []
merge: no
move: ''
path: no
tiebreak: {}
strict: no
tag: ''
pathfields: {}
album_fields: {}
discogs:
apikey: REDACTED
apisecret: REDACTED
tokenfile: discogs_token.json
source_weight: 0.5
user_token: REDACTED
separator: ', '
index_tracks: no
```
Contributor guide
Research direction
Reproduce the behavior with the two tagged MP3 files and the two `beet -vv import -AW` commands, then inspect how the import command handles `--noautotag` and album identity before `beet ls -p album:foobar`. Compare the behavior with issues 112 and 1861; done means piecewise imports either prompt to merge matching albums or clearly document the expected alternative.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100