Skip to content

convert: skip missing album art instead of crashing#6749

Open
cycsmail wants to merge 1 commit into
beetbox:masterfrom
cycsmail:fix-convert-missing-album-art
Open

convert: skip missing album art instead of crashing#6749
cycsmail wants to merge 1 commit into
beetbox:masterfrom
cycsmail:fix-convert-missing-album-art

Conversation

@cycsmail

Copy link
Copy Markdown

Description

Fixes #4692.

convert -a with copy_album_art enabled crashes with a FileNotFoundError when the album's stored art path points at a file that no longer exists on disk (for example a multi-disc album whose cover lives in the album root rather than in each per-disc directory). This adds an os.path.isfile guard in copy_album_art so a missing source is logged and skipped instead of aborting the conversion, using the same util.syspath convention already used for the destination check just below.

To Do

  • Documentation. (No new flags or behaviour to document.)
  • Changelog.
  • Tests. (Added test_copy_album_art_missing_source, which reproduces the crash without this change and passes with it.)

@cycsmail cycsmail requested a review from a team as a code owner June 17, 2026 15:35
@github-actions github-actions Bot added the convert convert plugin label Jun 17, 2026
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 74.57%. Comparing base (cb564a6) to head (4017906).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
beetsplug/convert.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6749      +/-   ##
==========================================
+ Coverage   74.52%   74.57%   +0.05%     
==========================================
  Files         162      162              
  Lines       20818    20821       +3     
  Branches     3295     3296       +1     
==========================================
+ Hits        15515    15528      +13     
+ Misses       4547     4536      -11     
- Partials      756      757       +1     
Files with missing lines Coverage Δ
beetsplug/convert.py 77.05% <66.66%> (+2.28%) ⬆️

... and 1 file 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

convert convert plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Converting with copying album artwork breaks if album artwork is missing

1 participant