Skip to content

nightly-e5504825-ls273

Pre-release
Pre-release

Choose a tag to compare

@LinuxServer-CI LinuxServer-CI released this 21 Apr 21:42
· 1 commit to nightly since this release
b1fe91e

CI Report:

https://ci-tests.linuxserver.io/linuxserver/beets/nightly-e5504825-ls273/index.html

LinuxServer Changes:

No changes

Remote Changes:

Replace old cover art instead of creating suffixed new entries / fetchart (#6554)

Summary

  • Fix duplicate album art files (cover.2.jpg, cover.3.jpg, ...)
    accumulating when re-importing albums with the fetchart plugin enabled.
  • ImportTask.remove_duplicates now operates at the album level and
    explicitly deletes album art files from disk when removing duplicate
    albums during import.
  • Album.set_art now unconditionally removes old art and any existing
    file at the destination, instead of appending a numeric suffix via
    unique_path. This matches the method's documented behavior of
    "replacing any existing art".
  • SingletonImportTask gets its own remove_duplicates override
    preserving the original item-level behavior, since find_duplicates
    returns items (not albums) for singletons.

Root cause

Two issues contributed to the bug:

1. remove_duplicates never deleted album art files.

When a user imports a duplicate album and chooses "Remove old",
remove_duplicates iterated over items and called item.remove(). When
the last item was removed, this cascaded to
Album.remove(delete=False), which skipped art deletion due to
delete=False. The old cover.jpg remained on disk as an orphan.

2. set_art created unique paths instead of replacing.

set_art only removed the old art file when oldart == artdest (exact
byte equality). When oldart was None (new album, no inherited
artpath) or pointed to a different path (e.g. different extension), the
existing file was left in place and unique_path generated
cover.2.jpg.

Fixes #6205