Skip to content

Send library_id on item detail and watch reads for library-scoped versions #309

Closed

Description

@Quick104

Goal

Send library_id on item detail and watch reads so the server setting catalog.scope_versions_to_library (Silo-Server/silo-server#1111, from Silo-Server/silo-server#1032) can take effect on Android clients.

Background

When an admin enables that setting, GET /api/v2/catalog/items/{id}?library_id=… and the versions/season/episode reads return only the versions stored in the named library. A read without library_id still returns every accessible version. The client decides whether it is browsing a library; the server cannot infer it.

Today CatalogApi.getItemDetail(id) (shared/src/commonMain/kotlin/org/siloserver/silo/network/api/CatalogApi.kt) and the watch read send no library_id, so the setting has no effect on Android phone or TV.

Work

  1. Thread the browse-context library ID from the library screens through to the detail and watch reads. Home, search, and deep links stay unscoped.
  2. Pass it as library_id on getCatalogItem, listCatalogItemVersions, listCatalogItemEpisodes, listSeriesSeasons, getSeriesSeason, listSeasonEpisodes, and getWatchDetail. The server applies membership validation and presentation-language fallback either way; the versions scope only applies when the setting is on.
  3. The client's version picker should render whatever comes back; no capability probe is needed.

Not in scope

Playback and watch-together never narrow on the server regardless of library_id; nothing to do there.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions