Media sources are the connections Tunarr maintains to your media servers—Plex, Jellyfin, Emby, or local file paths. Once connected, Tunarr scans each source’s libraries and indexes the programs available for scheduling. The Media Sources API lets you add, inspect, update, and remove sources, manage individual library settings, and monitor scan progress.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/chrisbenincasa/tunarr/llms.txt
Use this file to discover all available pages before exploring further.
List Media Sources
Returns all configured media sources. Access tokens are not included in the response for security.200 — array of MediaSourceSettings objects.
Unique identifier for the media source.
Display name of the media source.
Source type:
plex | jellyfin | emby | local.Base URL of the media server (Plex/Jellyfin/Emby only).
Username used to connect (Plex/Jellyfin/Emby only).
Known libraries within this source, each with
id, name, type, enabled, lastScannedAt, isLocked, and mediaType.List of
{ localPath, serverPath } pairs for path-rewriting (remote media sources).Whether the source sends guide updates automatically.
Get Media Source
Returns a single media source by its UUID.UUID of the media source.
200 — MediaSourceSettings object.
Response 404 — media source not found.
Add Media Source
Registers a new media source. For remote sources (Plex, Jellyfin, Emby) provide the server URL and access token. Forlocal sources provide one or more filesystem paths.
plex | jellyfin | emby | local.A human-readable label for this source.
Base URL of the media server (required for
plex, jellyfin, emby).API/access token for authentication (required for
plex, jellyfin, emby).Username associated with the access token.
Filesystem paths (required for
local type, e.g. ["/media/movies"]).Enable automatic guide updates from this source.
201 — { "id": "<new-uuid>" }.
Response 500 — server error (e.g. duplicate name, unreachable server).
Update Media Source
Replaces the configuration of an existing media source. Forlocal sources, updating triggers an immediate re-scan.
UUID of the media source to update.
UpdateMediaSourceRequest object with the same fields as Add Media Source plus the required id field.
Response 200 — success (no body).
Response 500 — server error.
Delete Media Source
Removes a media source and regenerates the XMLTV guide to drop programs from that source.UUID of the media source to delete.
200 — source deleted.
Response 500 — deletion failed.
List Libraries for a Media Source
Returns all libraries (sections) discovered within a media source.UUID of the media source.
200 — array of MediaSourceLibrary objects.
Library UUID.
Library name as reported by the media server.
Source type inherited from the parent media source.
Content type:
movie, show, music, etc.Whether Tunarr actively syncs this library.
Epoch timestamp of the last successful scan (milliseconds).
true when a scan is currently in progress.The library’s key or ID as reported by the upstream media server.
400 — cannot list libraries for a local source.
Response 404 — media source not found.
Update Library
Enables or disables a specific library within a media source. Enabling triggers an immediate background scan.UUID of the media source.
UUID of the library to update.
Set
true to enable the library and schedule it for scanning, false to disable it.200 — updated MediaSourceLibrary object.
Response 400 — operation not supported (e.g. local source).
Response 404 — source or library not found.
Refresh Libraries
Triggers a discovery pass that detects newly-added or removed libraries on the media source without performing a full content scan.UUID of the media source.
200 — refresh enqueued.
Response 404 — media source not found.
Scan a Library
Triggers a content scan of one or all enabled libraries in a media source. The scan runs asynchronously.UUID of the media source.
UUID of the library to scan, or the special value
"all" to scan every enabled library.When
true, rescan even items that have not changed since the last scan.202 — scan scheduled.
Response 404 — source not found.
Get Media Source Health Status
Pings the upstream media server and returns whether it is reachable. Times out after 60 seconds.UUID of the media source.
200 — { "healthy": true } or { "healthy": false, "status": "unreachable" | "timeout" }.
Response 404 — source not found.
Check Foreign Source Status
Tests reachability for a media server that has not been saved to Tunarr yet. Useful for validating credentials before calling Add Media Source.plex | jellyfin | emby | local.Server URL (required for
plex, jellyfin, emby).Access token to test (required for
plex, jellyfin, emby).Filesystem paths to check (required for
local).200 — { "healthy": true } or { "healthy": false, "status": "unreachable" | "timeout" }.
Get Library by ID
Retrieves a single library record along with its parent media source details. Accepts the library UUID directly without needing the media source UUID.UUID of the library.
200 — MediaSourceLibrary with an embedded mediaSource field.
Response 404 — library not found.
Get Library Programs
Returns all content programs indexed from a specific library.UUID of the library.
200 — array of ContentProgram objects.
Response 404 — library not found.