Skip to content

update: continue when an item or album can't be moved (#2419) - #7076

Merged
snejus merged 9 commits into
beetbox:masterfrom
Tub-slug:fix-2419-update-move-errors
Oct 21, 2026
Merged

snejus merged 9 commits into
beetbox:masterfrom
Tub-slug:fix-2419-update-move-errors

Conversation

@Tub-slug

@Tub-slug Tub-slug commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #2419.

beet update -m used to stop on the first file it couldn't move, so everything after it was left half-updated in the DB (album record still had the old name, files not moved). Now a FilesystemError during a move gets logged and the update keeps going with the rest, like suggested in the issue.

  • Album loop: if moving an album fails, the error is logged and it moves on to the next album.
  • Item loop: if moving an item fails, the error is logged and the item is skipped without storing it. That way its mtime isn't updated, so the next update picks it up again and retries. Same pattern as the existing ReadError handling right above it.
  • Only FilesystemError is caught, so anything else still surfaces.

Added two regression tests, one for albums and one for singletons. Both fail without the fix and pass with it. Left beet move (#1926) out of this PR to keep it small, happy to look at it on its own.

AI disclosure: I used Claude Code to help write the code, tests and changelog entry. I reproduced the bug on current master, decided the approach and scope (following the discussion in the issue), had the fix extended to the item loop after reviewing the first version, and verified everything with the tests and the repro. Happy to explain or rework any part of it.

To Do

  • Documentation.
  • Changelog.
  • Tests.

@Tub-slug
Tub-slug requested a review from a team as a code owner October 4, 2026 14:16
@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.49%. Comparing base (929788f) to head (d12aeb7).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7076      +/-   ##
==========================================
- Coverage   80.49%   80.49%   -0.01%     
==========================================
  Files         149      149              
  Lines       21248    21255       +7     
  Branches     3282     3282              
==========================================
+ Hits        17104    17109       +5     
- Misses       3315     3316       +1     
- Partials      829      830       +1     
Files with missing lines Coverage Δ
beets/ui/commands/update.py 78.70% <100.00%> (+1.47%) ⬆️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Tub-slug

Copy link
Copy Markdown
Contributor Author

Hi @snejus, just checking in on this one. All checks are green and the changelog is synced with master. Happy to adjust anything if you’d like a different approach.

@Serene-Arc Serene-Arc self-assigned this Oct 15, 2026
Comment thread docs/changelog.rst Outdated
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
@Tub-slug

Copy link
Copy Markdown
Contributor Author

Applied, thanks for the feedback

@Tub-slug
Tub-slug requested a review from snejus October 21, 2026 14:17

@snejus snejus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@snejus
snejus added this pull request to the merge queue Oct 21, 2026
Merged via the queue into beetbox:master with commit 4442a42 Oct 21, 2026
19 checks passed
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.

beet update: Do not stop when files (including album art) cannot be moved

3 participants