A library list and a made-up folder disagree with upstream #51

Closed
opened 2026-08-03 22:22:09 +02:00 by Claude · 1 comment
Collaborator

Two collections come back in a different order from upstream's.

/System/Info/Storage — the libraries:

upstream ours
Movies, Music, Shows Movies, Shows, Music

/Library/MediaFolders — the synthesized Playlists folder carries no
DateCreated here, where upstream sends the zero date:

upstream ours
Playlists DateCreated 0001-01-01T00:00:00.0000000Z absent

The three real libraries agree on their dates exactly. Absent and a value are
different answers to a client, and the zero date is what upstream gives a folder
it made up rather than read.

Both measured against a production database with three libraries; the reference
library has too few for an ordering to disagree.

Two collections come back in a different order from upstream's. **`/System/Info/Storage`** — the libraries: | upstream | ours | |---|---| | Movies, Music, Shows | Movies, **Shows, Music** | **`/Library/MediaFolders`** — the synthesized Playlists folder carries no `DateCreated` here, where upstream sends the zero date: | | upstream | ours | |---|---|---| | Playlists `DateCreated` | `0001-01-01T00:00:00.0000000Z` | *absent* | The three real libraries agree on their dates exactly. Absent and a value are different answers to a client, and the zero date is what upstream gives a folder it made up rather than read. Both measured against a production database with three libraries; the reference library has too few for an ordering to disagree.
Author
Collaborator

Both halves fixed, and the second turned out to be far wider than this issue
said.

The library list is ordered by name. Upstream builds it from a listing of
the directory its views live in — one directory per library, named after it —
so the names are what order them. This server was ordering by creation date,
which put Shows before Music because the shows library is older.

The dateless row was not one folder. DateCreated is read into a type that
cannot be absent, so upstream answers 0001-01-01T00:00:00.0000000Z for every
row storing nothing, and this server omitted the field for all of them —
1032 rows of the measured library, not the one Playlists folder this issue
named:

type rows with no stored date
Studio 747
MusicGenre 138
MusicArtist 102
Genre 41
Person 2
the playlists folder 1

Confirmed against upstream live for studios, music genres and the playlists
folder before changing anything — absent against a value is a difference a
client can see, and every by-name listing carried it.

All three now agree with a running upstream over a production database.

Both halves fixed, and the second turned out to be far wider than this issue said. **The library list** is ordered by name. Upstream builds it from a listing of the directory its views live in — one directory per library, named after it — so the names are what order them. This server was ordering by creation date, which put `Shows` before `Music` because the shows library is older. **The dateless row** was not one folder. `DateCreated` is read into a type that cannot be absent, so upstream answers `0001-01-01T00:00:00.0000000Z` for every row storing nothing, and this server omitted the field for all of them — **1032 rows** of the measured library, not the one Playlists folder this issue named: | type | rows with no stored date | |---|---| | Studio | 747 | | MusicGenre | 138 | | MusicArtist | 102 | | Genre | 41 | | Person | 2 | | the playlists folder | 1 | Confirmed against upstream live for studios, music genres and the playlists folder before changing anything — absent against a value is a difference a client can see, and every by-name listing carried it. All three now agree with a running upstream over a production database.
Sign in to join this conversation.
No description provided.