Expand description
Every Jellyfin route the online repository speaks, in one place.
Before this module the endpoints were 57 inline format! literals scattered
through online.rs, query strings baked in at the point of use. That is
workable against exactly one server, and hostile to anything else: a second
route shape means a conditional at every one of them.
Each function here takes &ServerCapabilities and returns a path
(/Users/…), except the handful documented as returning an absolute URL
because they are handed to a media player rather than to the JSON helpers.
§Percent-encoding
Values are encoded, syntax is not. A genre named Drama & Romance or a
search for a?b must not split into another parameter. Endpoint::param
encodes; Endpoint::raw_param does not and is for values this module
itself composed (numbers, and lists whose separator is meaningful to
Jellyfin — IncludeItemTypes splits on ,, Genres on |, so the
separator survives while each element is encoded).
TRACES: UR-085 | DR-279
Structs§
- Endpoint
- A path plus query string, which knows whether it needs
?or&next.
Constants§
- LIST_
FIELDS 🔒 - The standard field set for a list view.
Peopleis deliberately absent — it is only wanted in the detail view, and it is not small. - LIST_
FIELDS_ 🔒WITH_ GENRES - As
LIST_FIELDS, plus what the offline store needs to derive genre lists and per-genre counts from cached rows.
Functions§
- channels
- Generic channels.
- encode_
list 🔒 - Encode each element of a list while keeping the separator Jellyfin splits on.
- favorite_
item - Favourite / un-favourite an item (POST to set, DELETE to clear).
- favorites
- A favourites listing.
- genres
- Genres, with the item counts the frontend uses to pick a diverse subset.
- get_
items - A folder listing.
- item_
detail - One item, in detail.
People,MediaStreamsandMediaSourcesare named here and nowhere else — the detail view is the only place they are wanted. - items_
by_ person - A person’s filmography.
- jray_
context - The JRay plugin’s per-item context. Not core Jellyfin; absent servers 404 and the caller treats that as “no context”, so it needs no capability flag.
- latest_
items - A “recently added” listing.
- live_
tv_ channels - Live TV channels.
- next_up
- A Next Up listing.
- person
- A person as an item.
- playback_
info - Playback negotiation for one item.
- played_
item - Mark played / clear watch history (POST to set, DELETE to clear).
- played_
items_ by_ date - Items sorted by when they were last played, filtered to played ones.
- playlist_
as_ item - A playlist as an item — used for rename and delete, which are
/Itemsoperations rather than/Playlistsones. - playlist_
item_ move - TRACES: UR-062, UR-085 | DR-279
- playlist_
items - TRACES: UR-062, UR-085 | DR-279
- playlist_
items_ add - TRACES: UR-062, UR-085 | DR-279
- playlist_
items_ remove - TRACES: UR-062, UR-085 | DR-279
- playlists
- TRACES: UR-062, UR-085 | DR-279
- resume_
items - The resume (“Continue Watching”) listing.
- search
- A search.
- sessions_
playing - Playback reporting.
- sessions_
playing_ progress - sessions_
playing_ stopped - similar_
items - Items similar to one item.
- user_
items_ 🔒root - The base for a user-scoped item query.
- user_
views - The user’s library views.