A scanned playlist is filed with no members and a null blob #230
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?
#212 files a
[playlist]directory and a loose.m3uas aPlaylistrow. The row is empty and its blob is null, where upstream's carries both its members and its own fields.What is missing
crates/ephyra-core/src/item/write/blob.rs:30-110has no arm forKind::Playlist, soDatais NULL. Upstream serialisesOwnerUserId,OpenAccess: true,SharesandPlaylistMediaTypeinto it.OpenAccessis read back out of that blob incrates/ephyra-core/src/rows/item.rs:212.LinkedChildrenfrom the.m3uorplaylist.xml. Nothing incrates/ephyra-db/src/scan/writes a manual link, so a scanned playlist stays empty.What it costs
A user opening a scanned playlist sees nothing in it. Nothing leaks:
library::views::openablejudges a playlist outside the program data directory by its ancestors, so it is visible to whoever may see the library, which is what upstream'sOpenAccess = trueamounts to.Why the answer key does not show it
Resolvedcompares neitherDatanor type-0 links, so both the null blob and the empty membership pass. A whole-database diff shows them.Verifying
Give the library-kinds tree a
.m3unaming two files that exist and a[playlist]directory holding a couple, then compare the blob and the links against upstream's rows — which means extending what the key records, not only the tree.Found reviewing #212.
Fixed, and landed on
mainat94f7a924.A scanned playlist carries what its list names and the blob upstream writes for one. The answer key now records both, so the port is held to upstream's own rows rather than to our reading of the provider.
What the key settles:
.m3unaming the same track twice — once through../— files it twice, as upstream does.Unknown, because the provider builds a fresh playlist and its merge overwrites the resolver'sAudio; a list that resolved none keepsAudio.Sizeis the document's own length, and a folder-shaped playlist has none.The generator also records the text of every list, so our reader is held against the same bytes upstream read.
Two things the review caught, both fixed: the blob took its size from a field a folder kind can never carry, so
Sizewas never written — the key had upstream's value all along; and the test compared a blob it built itself rather than the one a scan produces, which is why it could not see that. It asserts through the real write now, with a scan-level test beside it that reads the filed row'sData.A member from a library upstream will not draw from is still kept here. Filed as #237.