An episode's playback state is filed under the wrong key #66
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 episode's playback state is filed under its own id rather than its series'.
/Items/Latestover a production library:UserData.Keyon an episode369844607cef76-ab4e-fcd8-2248-60d94ce6cfa1An episode's key is built from its series' external ids — this port already
knows that (
user_data::keys::episodetakesseries_providers), and a movie'skey agrees with upstream exactly. What is missing is the loading: on the routes
that do not ask for provider ids, the series' rows are not read, so the
derivation falls back to the guid.
Upstream never has this problem — a
BaseItemcarries itsProviderIdsinmemory from its
Datablob, soGetUserDataKeys()always has them whatever therequest asked for.
Measured 3 occurrences in the
browsingscenario, all episodes, all on/Items/Latest. A movie on the same response matches.This matters beyond a field: the key is what playback state is filed under, so
an episode's watched state is recorded against a different key from the one
upstream uses.
Fixed — and the issue text was wrong about which items were affected.
Episodes already agreed. The four failing keys were the series containers
that
/Items/Latestreports a batch of episodes under.The rule:
BaseItemRepository.RetrieveItemalways includes the provider rows,where a query includes them only when
DtoOptionsasks(
BaseItemRepository.QueryBuilding.cs:227)./Items/Latestwith no parentgroups by
LatestItemsIndexContainer, which resolves the series throughGetItemById— a by-id read, so it carries its external ids whatever therequest asked for.
The
Data-blob explanation in the issue does not hold: the series' blob in thisdatabase carries no provider ids at all.
Verified without trusting a possibly-cached key — upstream's
UserItemDatacache is per user and item, so the check ran against three user ids that had
never been browsed. Cold, upstream still reports
369844for the container, andthe same series reached through a query reports its guid. Both now match.
Providers are loaded when a row was read by id or the request asked for them, so
assemble::manyis untouched:/Items?Recursive=true&Limit=5000is 1.89 sbefore and 1.72 s after, within noise.
Upstream's typed-library latest paths fetch their entities without provider
rows, so those containers key on the guid — which is what this port already did,
and it is left alone.