Skip to content

fixes #78, but maybe we rethink this together:#90

Merged
semohr merged 3 commits intomainfrom
#78_auto_import
Jun 12, 2025
Merged

fixes #78, but maybe we rethink this together:#90
semohr merged 3 commits intomainfrom
#78_auto_import

Conversation

@pSpitzner
Copy link
Owner

our progress levels / stages are not super intuitive.
we already modify the library at the end of "waiting for user selection" - at which point apply_choice is invoked (does not move files, but adds to library)

we should consider to split the user_query stage into more parts.
currently it contains:

  • choose_match logic
  • duplicate resolution
  • potentially merge duplicates (not tested)
  • apply_choice (which modified beets lib, without moving files)

my fix was to check the threshold before the user_query stage alltogether, but im puzzled this works, as candidate selection (on which thresholding should depend) only happens during choose_match.

we already modify the library at the end of "waiting for user selection" -
at which point apply_choice is invoked (does not move files, but adds to library)
@semohr
Copy link
Collaborator

semohr commented Jun 11, 2025

Kinda makes sense that it should happen before or during user selection. Maybe it would make more sense to overwrite the choose_match function in the AutoImportSession instead of having a stage for it altogether?

  • offer matches: gets all candidate (best one is the first one)
  • match threshold: checks distance of best candidate against the config threshold
  • user query: too much logic including choose_match

@semohr semohr merged commit aa29c81 into main Jun 12, 2025
2 checks passed
@semohr semohr deleted the #78_auto_import branch June 13, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants