xmb.api.v1.ContentService
ContentService is the operator's view of what a server holds.
postAdd title
Creates a title in a library from a provider record. Its episodes start missing; files matched later attach to it. **Required scopes:** `xmb:admin`
postRemove a title, season or episode
Removes a whole title, one season (`season_number`), or one episode (`season_number` with `episode_uuid` or `episode_number`, not both) from the server's library. An exclusion is recorded at the same level so a later scan does not rebuild it from the files; a removed title is listed by `ListRemovedSeries` and can be restored. Watch progress tied only to the removed episodes is deleted. With `delete_files`, every available file in the selection is first deleted from its hub through the same guarded operation as `DeleteMediaFile`. The purge is refused when a file also belongs to episodes outside the selection, is shared with another server, or sits on another server's hub (`PERMISSION_DENIED`). If it stops partway, the error says how many files were deleted and the library entry stays so the call can be retried. `files_deleted` counts the files the hubs removed. Refused with `FAILED_PRECONDITION` while the title has an open request, an active download, a playback in progress or an active offline download, or when a selected file has not been fingerprinted. `INVALID_ARGUMENT` for an episode without a season, both episode selectors, or negative numbers. Requires an administrator of the server. Audited as `content.deleted`. **Required scopes:** `xmb:admin`
postDelete one media file from its hub
Permanently deletes one file from the hub that holds it, then marks that copy missing. `expected_fingerprint` must equal the file's current fingerprint, so a file that changed since the page was loaded is never deleted; the hub checks the fingerprint again before unlinking. `deleted` is false when the hub found the file already gone, which makes a retry harmless. With `remove_episode_from_library` and `episode_uuid`, the episode the file is linked to is also removed from the library and excluded from later scans, under the same in-flight checks as `DeleteContent`. Refused with `FAILED_PRECONDITION` when the file is no longer available, has not been fingerprinted, has changed, is used by another server, is playing, or has an active offline download. `PERMISSION_DENIED` when the hub belongs to another server, `UNAVAILABLE` when the hub cannot be reached, `NOT_FOUND` for a file not on this server or not linked to the named episode, `INVALID_ARGUMENT` when episode removal is asked for without an episode. Requires an administrator of the server. Audited as `media_file.deleted`. **Required scopes:** `xmb:admin`
postRemove title from library
Removes a title and its library episodes, including watch progress keyed only to those episodes. Media files remain on their hubs. **Required scopes:** `xmb:admin`
postContent overview
Returns each library with how many titles it holds, what they take up, and how much of it is missing. **Required scopes:** `xmb:admin`
postGet title
Returns one title, its seasons and what a person has overridden on it. **Required scopes:** `xmb:admin`
postList episodes
Returns a season's episodes — or a whole title's — with what is here, what is missing and what has not aired. **Required scopes:** `xmb:admin`
postList removed titles
Returns the titles removed from this server's libraries whose exclusion still stands, newest first, each with the slug of the library it was removed from. Their files may still be on the hubs; the exclusion is what keeps scans from rebuilding them. Season and episode exclusions are not listed. The list is not paged. Requires an administrator of the server. **Required scopes:** `xmb:admin`
postList titles
Returns a library's titles, or the whole server's, with what each is missing. **Required scopes:** `xmb:admin`
postRefresh title
Re-fetches the title's provider record and re-applies it, skipping locked fields. **Required scopes:** `xmb:admin`
postRestore a removed title
Lifts one title exclusion, named by the `uuid` from `ListRemovedSeries`, and returns the library's excluded files to the matcher. It then queues a library scan, which rebuilds the title from the files still on the hubs. `scan_queued` is false when the scan could not be queued now; the exclusion is lifted anyway and the next regular scan rebuilds the title. Watch progress deleted with the title is not recovered. `NOT_FOUND` for an exclusion not on this server. Requires an administrator of the server. Audited as `series.restored`. **Required scopes:** `xmb:admin`
postUpdate title
Sets fields on a title and locks them against refreshes, or reverts named fields to the provider's values. **Required scopes:** `xmb:admin`
List reachable hubs POST
The hubs a server can play from, with what the caller would need to reach each one directly. **Required scopes:** `xmb:user:read`
Add title POST
Creates a title in a library from a provider record. Its episodes start missing; files matched later attach to it. **Required scopes:** `xmb:admin`