mirror of
https://github.com/beetbox/beets.git
synced 2026-11-30 09:44:33 -06:00
When beets can't confidently match an album, the interactive import prompt now offers a "Rescan directory" option alongside Skip/Use as-is/etc. It re-reads the task's directories from disk and re-runs the match, so files can be cleaned up (duplicates, junk) mid-import without restarting the whole beet import run. - New Action.RESCAN enum member (actions.py) and set_choice wiring (tasks.py). - New "r" PromptChoice, shown for album tasks with a toppath, added to both the "no candidates" and "pick a candidate" prompt variants since they share the same choice list (session.py). - New rescan_tasks() generator and a RESCAN branch in the user_query pipeline stage that re-extends the pipeline with freshly-discovered tasks, mirroring the existing TRACKS/ALBUMS branches (stages.py). Discovery is delegated to ImportTaskFactory.paths(), the same logic the initial scan uses; rescan_tasks only scopes the walk and keeps the original toppath on the emitted tasks (for move pruning and resume bookkeeping). - Handles nested multi-disc albums, flattened sibling discs, the "Group albums" choice (withheld -- no directory scope to rescan), and a plugin forcing Action.RESCAN onto a task with no valid rescan scope (singleton, toppath-less, or grouped). - Tests, auto-tagger guide entry, changelog entry. Comments and docstrings are kept deliberately brief per review feedback; see the PR description for the fuller design rationale and the known limitations (sibling-disc/loose-parent edge cases). Fixes #166 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019mndYhbgqCtkRY3wppFoQb