fixMissingThumbnails assumes every file is a JPEG
#17
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
fixMissingThumbnails(src/thumbnails.ts) callsjpeg.decodeon whatever bytes itdownloaded, regardless of the file's actual type. A PNG, HEIC, or video file throws inside the
decoder and is recorded as a failure with an opaque message, so the user is told thumbnail
repair failed without being told the real reason is "this is not a JPEG and quak cannot
generate a thumbnail for it".
Ente libraries contain plenty of non-JPEG files. This is not a correctness bug so much as a
capability gap being reported as an error.
Definition of done
fixMissingThumbnailschecks the file type before attempting to decode, and reportsunsupported types with a distinct, self-explanatory reason rather than a decoder stack
trace.
ThumbnailFixResultdistinguishes "failed" from "skipped, unsupported type", and the CLI's--jsonoutput reflects that distinction.unsupported rather than failed, and a mixed run reporting both categories.
make checkgreen.Not a 1.0.0 blocker
Deliberately outside the
1.0.0milestone — the current behaviour is unhelpful but notincorrect, and the helper subcommands are explicitly secondary to the backup path.