Latest items under a parent that names nothing answer with nothing #69
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?
/Items/Latestunder a parent that names nothing answers with nothing./Items/Latest?ParentId=<unknown>&Limit=16UserViewManager.GetItemsForLatestItems(UserViewManager.cs:236-265) resolvesthe parent with
GetItemByIdand adds it toparentsonly where it is aFolder(or dispatches to the channel manager where it is aChannel). An idthat resolves to nothing takes neither branch, so
parentsstays empty — and anempty
parentsis every library the user can see, not none of them.This server narrows to the named parent and finds nothing under it.
Same shape as #64, which was about an unknown user: an id upstream cannot
resolve narrows nothing, where this port narrows to something that does not
exist. Worth checking the other routes that take a
parentIdfor the samepattern while fixing this one — #48 established which of them refuse outright,
and those are not in question.
Accounts for 3 of the 7 differences the
browsingscenario reports.Fixed.
UserViewManager.cs:270falls back when the parents list is empty:An id that resolves to nothing — and equally one that resolves to something
that is not a folder — takes neither branch above it, so it is answered over
every library the user can see. Verified live: an unknown id and an episode's id
each give upstream the same 4 entries a request with no parent gives.
The music played-state exemption is now keyed on the parent the request named
rather than on the fallback, which matters: an unknown id widening to a set
containing a music library must still keep the filter.
The audit of every
parentIdroute outside the refusing set of #48:/Items/Latest,/Users/{id}/Items/Latest/Shows/NextUpTVSeriesManagerhas no fallback, so nothing really is nothing/UserItems/Resume,/Search/Hints,/Items/Suggestions,/Items/Filters2/YearsOne regression of mine that it caught.
/Persons?ParentId=<unknown>wasanswering 400 here where upstream answers 200 with nothing:
PersonsControllerhands the id to the people query and never resolves it, alone among the by-name
listings. I had over-applied #48's refusal. Fixed separately, with a test.