beetbox / beetbox/beets

Autoimport with lastgenre

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

Description

When importing albums with autotagger and lastgenre the plugin does not respect the "wait for input" when a album doens't have a high enough % match for auto import.

Image

The LastGenre inputs in the genre from the last album into the next album being imported and it makes the input continue without waiting as it should. After the the second album it hangs and does not continue unless something is pushed. This makes the import process very slow.

The bug is clearest on the last album where it shown twice after each other.

Image

Due to this LastGenre is not waiting for user input and after second input, but continues inputting the next album information. This impacts the import flow negatively and in many cases stopping.
It hangs with this screen indicating a Genre is added, but no clear indication that something needs to be inputted by the end user.

Image

Any input will trigger it to move to the next album (enter, a, s, u, etc..)

### Beets -VV

user configuration: /mnt/XXXX/beets/config.yaml
data directory: /mnt/XXXX/beets
plugin paths: []
Loading plugins: albumtypes, beatport4, deezer, lastgenre, musicbrainz, zero
lastgenre: Loading whitelist /usr/share/beets/beetsplug/lastgenre/genres.txt
Sending event: pluginload
library database: /mnt/XXXX/beets/library.db
library directory: /mnt/XXXX/XXXX
Sending event: library_opened

### Setup

* OS: Debian 13.6 (Trixie)
* Python version: 3.13.5
* beets version: 2.12.0
* Turning off plugins made problem go away (yes/no): yes, disabling LastGenre makes import flow work rapid and as it should

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

--------------- Plugins ---------------

plugins:
- musicbrainz
- albumtypes
- deezer
- lastgenre
- zero
- beatport4

pluginpath: []

raise_on_error: no

--------------- Import ---------------

clutter: [Thumbs.DB, .DS_Store]
ignore:
- .*
- '*~'
- System Volume Information
- lost+found
ignore_hidden: yes

import:
write: yes
copy: no
move: yes
timid: no
quiet: no
log:
default_action: apply
languages: []
quiet_fallback: skip
none_rec_action: ask
link: no
hardlink: no
reflink: no
delete: no
resume: ask
incremental: no
incremental_skip_later: no
from_scratch: no
autotag: yes
singletons: no
detail: no
flat: no
group_albums: no
pretend: no
search_ids: []
duplicate_keys:
album: albumartist album
item: artist title
duplicate_action: ask
duplicate_verbose_prompt: no
bell: no
set_fields: {}
ignored_alias_types: []
singleton_album_disambig: yes
fix_ext_inplace: no

--------------- Paths ---------------

path_sep_replace: _
drive_sep_replace: _
asciify_paths: no
art_filename: cover
max_filename_length: 0
replace:
'[<>:\?\*\|]': _
\": _
'[\\/]': _
^\.: _
\.$: _
'[\x00-\x1f]': _
^-: _
\s+$: ''
^\s+: ''

aunique:
keys: albumartist album
disambiguators: albumtype year label catalognum albumdisambig releasegroupdisambig
bracket: '[]'

sunique:
keys: artist title
disambiguators: year trackdisambig
bracket: '[]'

--------------- Tagging ---------------

per_disc_numbering: no
original_date: no
artist_credit: no
id3v23: no
va_name: Various Artists
paths:
default: $albumartist/$album%aunique{}/$track - $title
singleton: Non-Album/$artist/$title
comp: Compilations/$album%aunique{}/$track - $title

-------------- Performance ---------------

threaded: yes
timeout: 5.0
zero:
fields: composer lyricist comments
comments:
- EAC
- LAME
- from.+collection
- ripped by
genres: []
update_database: yes
auto: yes
keep_fields: []
omit_single_disc: no

--------------- UI ---------------

verbose: 0
terminal_encoding:

ui:
terminal_width: 80
length_diff_thresh: 10.0
color: yes
colors:
text_success: [bold, green]
text_warning: [bold, yellow]
text_error: [bold, red]
text_highlight: [bold, red]
text_highlight_minor: [white]
action_default: [bold, cyan]
action: [bold, cyan]
text_faint: [faint]
import_path: [bold, blue]
import_path_items: [bold, blue]
changed: [yellow]
text_diff_added: [bold, green]
text_diff_removed: [bold, red]
action_description: [white]

import:
indentation:
match_header: 2
match_details: 2
match_tracklist: 5
layout: column

--------------- Search ---------------

format_item: $artist - $album - $title
format_album: $albumartist - $album
time_format: '%Y-%m-%d %H:%M:%S'
format_raw_length: no

sort_album: albumartist+ album+
sort_item: artist+ album+ disc+ track+
sort_case_insensitive: yes

--------------- Autotagger ---------------

overwrite_null:
album: []
track: []

match:
strong_rec_thresh: 0.04
medium_rec_thresh: 0.25
rec_gap_thresh: 0.25
max_rec:
missing_tracks: medium
unmatched_tracks: medium
distance_weights:
data_source: 2.0
artist: 3.0
album: 3.0
media: 1.0
mediums: 1.0
year: 1.0
country: 0.5
label: 0.5
catalognum: 0.5
albumdisambig: 0.5
album_id: 5.0
tracks: 2.0
missing_tracks: 0.9
unmatched_tracks: 0.6
track_title: 3.0
track_artist: 2.0
track_index: 1.0
track_length: 2.0
track_id: 5.0
medium: 1.0
preferred:
countries: []
media: []
original_year: no
ignored: []
required: []
ignored_media: []
ignore_data_tracks: yes
ignore_video_tracks: yes
track_length_grace: 10
track_length_max: 30
album_disambig_fields: data_source media year country label catalognum albumdisambig
singleton_disambig_fields: data_source index track_alt album
musicbrainz:
host: musicbrainz.org
https: no
ratelimit: 1
ratelimit_interval: 1.0
extra_tags:
- barcode
- catalognum
- country
- label
- tracks
- year
genres: yes
genres_tag: genre
external_ids:
discogs: yes
bandcamp: no
spotify: yes
deezer: yes
beatport: yes
tidal: no
data_source_mismatch_penalty: 0.5
search_limit: 5
search_query_ascii: no
aliases_as_credits: no
albumtypes:
types:
- ep: EP
- single: Single
- soundtrack: OST
- live: Live
- compilation: Anthology
- remix: Remix
ignore_va: compilation
bracket: '[]'
lastgenre:
auto: yes
force: yes
source: artist
keep_existing: no
whitelist: yes
min_weight: 10
count: 1
fallback:
canonical: no
cleanup_existing: no
prefer_specific: no
title_case: yes
pretend: no
ignorelist: {}
beatport4:
username: zunoz
password: everglide85!
art: no
art_width: 500
art_height: 500
singletons_with_album_metadata:
enabled: no
year: yes
album: yes
label: yes
catalognum: yes
albumartist: yes
track_number: yes
search_limit: 5
data_source_mismatch_penalty: 0.5
tokenfile: beatport_token.json
client_id:
art_overwrite: no
disabled_plugins: []
deezer:
search_limit: 5
data_source_mismatch_penalty: 0.5
search_query_ascii: no

Contributor guide

Open the contributing guide

Research direction

Reproduce the import with the reported lastgenre and autotagger configuration, using `beet -VV` to follow the prompt flow. Start with the lastgenre plugin and import interaction, then verify that each low-match album waits for user input and that the next album does not inherit or consume the previous response.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.