Skip to content

fix(images): restore custom placeholder for coverless items - #156

Open
ArtwoXYZ wants to merge 1 commit into
Kyonew:mainfrom
ArtwoXYZ:codex/fix-custom-plugin-default-image
Open

ArtwoXYZ wants to merge 1 commit into
Kyonew:mainfrom
ArtwoXYZ:codex/fix-custom-plugin-default-image

Conversation

@ArtwoXYZ

@ArtwoXYZ ArtwoXYZ commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Restores the configured default image for coverless items in custom plugins.

Root cause

The custom plugin formatter historically turns an empty cover_image into the generic DVinyl logo. Since the image gallery change, the shared formatter reads that value back as if it were a real item image, so it wins over the custom plugin placeholder after saving. The add-item preview is not affected because it reads the plugin placeholder directly.

Fix

Ignore the generic and plugin-specific placeholders when building the list of actual item images. Real covers keep their priority, while a coverless item falls back to the plugin default at render time as intended. No data migration is needed.

Related issue

Fixes #154

Type of change

  • 🐛 Bug fix
  • ✨ New feature
  • 🧩 New or updated plugin
  • 📖 Documentation
  • 🌍 Translation
  • 🧹 Refactor or chore

Checklist

  • make typecheck passes
  • I tested my changes locally
  • I updated the docs or translations if needed
  • My change is focused on a single thing

Screenshots

Not applicable, there is no UI layout change.

Anything else?

Validation performed:

  • npx tsc --noEmit
  • Targeted runtime check for both a coverless custom item and an item with a real cover
  • Docker build and application smoke test with an isolated MongoDB

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.

[Bug]: Default image is not propagated to items with no images

1 participant