Repository navigation
Conversation
Compositor::saveAll forces every composited output filename to end in .png and then skips it only when QFileInfo::exists() finds that exact .png path. A resource that already exists as .jpg (an ES-DE/theme default, an older Skyscraper run with no artwork.xml, or a user-placed image) is invisible to that check, so a skipExisting* rerun writes a second, redundant .png beside it instead of recognizing the file as present. AbstractFrontend::doCopy, the raw-copy path used for resources the artwork.xml does not layer, already builds a .jpg<->.png altTgt and treats either as present; saveAll had no equivalent. Add Compositor::existsWithAltSuffix, used at all five per-type skip checks in saveAll (cover, screenshot/miximage, wheel, marquee, texture), mirroring doCopy's suffix swap. On skip, the gamelist field is still set to the forced .png path, same as doCopy leaves tgt unchanged on its own skip path. With the shipped, unmodified artwork.xml this only reaches two output types: the ES-DE miximage (type="screenshot", three layered resources) and marquee (type="marquee" resource="wheel", no <layer> children, a 1:1 remap rather than a real composite). Cover, plain screenshot, wheel, backcover, fanart, manual, texture and video are not composited under that file and already go through doCopy's correct check. Measured with retrodeck-scraper's tools/verify/measure_media_reuse.py (120 synthetic games, -t 1, offscreen QPA): renaming an existing miximage .png to .jpg and rerunning with skipExisting* set previously wrote 1 new file / 30,703 bytes and left both suffixes on disk (binary 48317d63e55ae37ea2dd3853ccb707a4409759d41630c88555de896697f4ad17, this branch's parent, 9a26d43). This build writes 0 files / 0 bytes and leaves only the .jpg. Every other measured case (cold build, reuse rerun, missing-cover repair, raw-copy .jpg survival, miximage gamelist fields) is unchanged, including byte counts. Not yet run against the real library on Bazzite - both documented SSH addresses timed out this session. docs/TODO.md in retrodeck-scraper carries the follow-up to build and test this branch there before it is considered for upstream. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Compositor::saveAllforces every composited output filename to end in.pngandskips a resource only when
QFileInfo::exists()finds that exact.pngpath.A resource that already exists as
.jpg(an ES-DE/theme default, an olderSkyscraper run with no
artwork.xml, or a user-placed image) is invisible tothat check, so a
skipExisting*rerun writes a second, redundant.pngbesideit instead of recognizing the file as present.
AbstractFrontend::doCopy, the raw-copy path used for resources theartwork.xmldoes not layer, already builds a.jpg<->.pngaltTgtandtreats either as present;
saveAllhad no equivalent for composited output.Fix
Adds
Compositor::existsWithAltSuffix, used at all five per-type skip checksin
saveAll(cover, screenshot/miximage, wheel, marquee, texture), mirroringdoCopy's suffix swap. On skip, the gamelist field is still set to the forced.pngpath, matchingdoCopy's own behavior of leavingtgtunchanged on itsskip path.
With the shipped, unmodified
artwork.xmlthis only reaches two output types:the ES-DE "screenshot"-type output (the composited screenshot+cover+wheel
image - either the
miximagesfolder under--flags miximages, or the plainscreenshotsfolder without it) andmarquee(resource="wheel", no<layer>children, a 1:1 remap rather than a real composite). Cover, plain screenshot,
wheel, backcover, fanart, manual, texture and video are not composited under
that file and already go through
doCopy's correct check.Testing
master, upstream's owntest/suite passesunchanged.
existing composited output's
.pngto.jpgand rerunning withskipExisting*set previously wrote a new, byte-identical duplicate fileand left both suffixes on disk; with this fix it writes nothing and leaves
only the
.jpg. Every other measured case (cold build, reuse rerun,missing-cover repair, raw-copy
.jpgsurvival, gamelist fields) isunchanged.
library (not just the synthetic fixture): a real, fully-cached game's
composited screenshot and marquee output, renamed to
.jpg, is duplicatedby the pre-fix binary and left untouched by the patched one, byte-identical
hash before and after.
Skyscraperbinary against a real library'sgenerate --reuse-media: unaffected systems produce byte-identicalgamelists to their pre-fix backups, no new
.png/.jpgsuffix duplicatesintroduced anywhere.
Opened separately from #271, which this does not depend on or build toward.
🤖 Generated with Claude Code