No search hint is ever a person #139
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?
/Search/Hintsreturns aPersonhint upstream and never here.Measured while reviewing #128:
GET /Search/Hints?SearchTerm=ereturnsSine Ensembletwice from upstream — once as theMusicArtistand once as thePerson— and once from us. It hits every account including the administrator, so it is a missing hint kind rather than anything to do with visibility.It has a practical cost beyond the row: a scenario naming
SearchTerm=ecannot be added tovisibility.jsonwithout an ignore entry, because this difference fires for every account. #128'sunratedentries had to useSearchTerm=tto route around it.Where to start
crates/jellyfin-http/src/routes/library/discover.rsand whatever builds a hint. Upstream's search returns people alongside items; the port's candidate set does not include them.Worth checking in the same pass: which other hint kinds upstream can return that this port never produces — the same measurement that found the person will find those, and one issue covering the set is better than four covering one each.
How to know it is done
/Search/Hintsreturns the same kinds upstream returns for the same term, andvisibility.jsoncan carry aSearchTerm=eentry without an ignore entry — which is the check that this is really closed.House rules
Tests run under
cargo nextest; upstream's source is the checkout inupstream/at the pin; generated artifacts are regenerated, never edited; comments say what the code does, not how it got there. The reference on:8096is read-only — andStudios=,Artists=andAlbums=are writes, because upstream resolves them throughCreateItemByName. Anything needing a write gets its own container from the pinned image over acp -acopy of a snapshot. Kill a server by the PIDss -lntpH 'sport = :NNNN'reports; neverpkill,killall, orpgrep -fwith a pattern your own command line contains.Closed by
149c0e5, withd4891bafor what the review found.A by-name row belongs to no library, so it carries no
TopParentId— and aquery narrowed to the caller's libraries matches on exactly that column. Ported
upstream's
IncludeItemsByNameexemption into the query builder, with thesecond pass an account that restricts anything is held to: a name is offered
only while something behind it is in reach, through
Peoples/PeopleBaseItemMapfor a person and
ItemValues/ItemValuesMapfor the other four.The wider question the issue asked for. Two more kinds of gap, both fixed:
include*flags cut both ways.includePeople=falseleft the person in,because the port read those flags only on the branch that turns media off.
parentId— which upstream binds asGuid?and reads as noparent — dropped every by-name hint. Found by the review; the port was
testing the string rather than the guid, while the narrowing two functions
away already read it upstream's way.
And one the review turned up that the fix itself introduced: a listing narrowed
to an empty set of libraries is given an id no row carries, and the exemption
read that as a place — so an empty box set asked for people would have answered
with every person on the server. Upstream answers nothing; measured.
Measured on the pair, as the administrator and as both restricted accounts:
ten forms of the request that disagreed now agree, including
includeMedia=falseand a
parentIdnaming a real library.visibility.jsonasksSearchTerm=eforthe account that had to route around this, and
SearchTerm=twas re-measured toconfirm the change was tidying rather than a walk-around.