An item with no path of its own reports none of its images #65
Loading…
Reference in a new issue
No description provided.
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?
An item with no path of its own reports none of its images.
tag::image(crates/jellyfin-http/src/map/tag.rs:28) gives up when the itemrow has no
Path:so every image on such an item vanishes from
ImageTags. On the measuredlibrary that is 405 of 1113 seasons, each of which does have a stored poster
row — one season carries
poster.jpgat 2000×3000 and reports noPrimarytagat all, where upstream reports
ed44e03ca1dd098812982e98f75254d0.Upstream hashes
item.Path + image.DateModified.Ticks(
ImageProcessor.cs:408-413). C# concatenates a null string as empty, so apath-less item still produces a tag — it just hashes the ticks alone.
Naively hashing the empty path does not reproduce it. MD5 of
"" + ticksover the stored
DateModifiedmatches neither in UTF-16LE nor UTF-8, so theexact input has to be derived against upstream's served tags rather than assumed
— the tick conversion or the stored precision is the likely difference.
This also makes a second thing wrong. A season whose own poster goes unreported
looks to
inherited::borrow_poster_shapelike a season with no poster, so itborrows the series' shape and reports a
PrimaryImageAspectRatioupstream doesnot send. That is measurable in the large:
/Items?Recursive=trueis now412,095 bytes longer than upstream's, having been 254,898 shorter before the
inheritance landed.
Fixing the tag closes both.
Fixed, and the negative result in this issue was mine and wrong.
The empty path does reproduce upstream's tag.
Seasondoes not overrideBaseItem.Path, so a virtual season's path really is null, C# concatenates itas empty, and the hash input is the ticks alone —
"638982150964481748"inUTF-16LE, MD5, read back as a little-endian guid, giving
ed44e03ca1dd098812982e98f75254d0. That is whatGuid::hashedalready does.The only defect was
tag::imagegiving up on a null path before reaching it. Myinability to reproduce it by hand was a tick-conversion slip.
Match rate, checked against live upstream rather than reasoned:
ImageTagsFields differing from upstream over the whole 21,895-item response:
ImageTagsPrimaryImageAspectRatioParentPrimaryImageTag/ParentPrimaryImageItemIdImageBlurHashesItems differing in any field: 12,854 → 7,444, with none newly broken.
The body grew rather than shrank, and that is right: the earlier +412 KB was a
net of ~484 KB we were wrongly omitting against ~900 KB we were wrongly
emitting. Removing the omission stops the two cancelling. Byte-count-toward-
upstream was never the right measure here; per-field differing-item counts are,
and every one moved down or held.