Skip to main content

Module offline

Module offline 

Source

Macros§

library_type_matches_item 🔒
The Jellyfin taxonomy half of “does cached item i belong to library l”: the library’s collection_type against the item’s item_type.

Structs§

CachedItem 🔒
ContainerPlaceholder 🔒
A container row to create if it was never cached. See save_to_cache.
OfflineRepository

Constants§

CONTAINER_TYPES 🔒
Item types that are available when something below them is downloaded.
PLAYABLE_TYPES 🔒
Item types that can be downloaded themselves.

Statics§

INCLUDE_CATALOG_BROWSE 🔒
Whether offline library queries may include catalog items that are merely browsed/synced but not downloaded (the greyed-out “browse the whole server” view). Defaults to true so online browsing (which reads this same cache as a fast path) still sees the full catalog.

Functions§

available_sql 🔒
SQL predicate: the row alias can be shown — downloaded (see downloaded_sql) or, with include_catalog, cached for browsing. include_catalog is the catalog-browse flag; offline with “Show all server media” off it is false and only downloaded media shows (set_include_catalog_browse).
build_fts_prefix_query 🔒
Build a safe FTS5 prefix query from raw user input.
container_placeholders 🔒
The logical containers item lists under, as far as its own fields name them — the same rule as container_id in migration 027: an episode’s season and series, a season’s series, a track’s album.
downloaded_sql 🔒
SQL predicate: the row alias is on the device — a playable item with a completed download, or a container with a downloaded descendant.
include_catalog_browse
Whether offline get_items currently includes the synced-but-not-downloaded catalog (the greyed-out browse view). Mirrors set_include_catalog_browse.
items_listing_sql 🔒
The listing query behind get_items: the cached children of one parent that are available to show.
row_to_cached_item 🔒
row_to_user_data 🔒
A user_data row’s columns, starting at offset, in the order playback_position_ticks, is_played, is_favorite, play_count, last_played_at, playback_context_type, playback_context_id.
set_include_catalog_browse
Set whether offline get_items includes non-downloaded (synced-only) catalog items. Called from the frontend: true when online or when the offline “Show all server media” toggle is on; false when offline with the toggle off (show downloaded/local media only).