Skip to main content

Module endpoints

Module endpoints 

Source
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. People is 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, MediaStreams and MediaSources are 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 /Items operations rather than /Playlists ones.
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.