Skip to Content
Xeonr Developer Docs
API Specificationxmb.api.v1.ContentService

Delete one media file from its hub

POST
/xmb.api.v1.ContentService/DeleteMediaFile

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

Authorization

BearerAuth
AuthorizationBearer <token>

An access token issued by the xeonr identity provider.

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

serverSlug?string
Length1 <= length
mediaFileUuid?string
Formatuuid
expectedFingerprint?string
Length1 <= length
removeEpisodeFromLibrary?boolean

One confirmation can also exclude the containing episode from the library.

episodeUuid?string
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://xmb.gg/xmb.api.v1.ContentService/DeleteMediaFile" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "deleted": "true",
  "episodeRemoved": "true"
}

Remove a title, season or episode POST

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`

Remove title from library POST

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`