Provider availability and performance can vary based on your network environment. When self-hosting, providers may work differently than on residential connections due to IP-based blocking from upstream sources.
How Providers Are Used
On every/movie or /tv request:
- All active (non-disabled) providers are queried simultaneously with per-source random jitter to stagger upstream requests
- Each provider has its own timeout, retry count, and backoff delay
- Every returned URL is verified — first via a HEAD request to the raw upstream URL, then via a proxied HLS playability check
- Only URLs that pass both verification steps appear in the response as
sourceevents
Provider Configuration
Each provider is defined with the following properties:
Providers with
disabled: true are completely skipped — they won’t appear in health checks or fanout responses.
Response Time
The firstsource event typically arrives within 3–8 seconds. Subsequent sources stream in as each provider resolves. The stream closes once the slowest configured provider times out — in the worst case this can be 60+ seconds (e.g. cinezo has a 60 s timeout), though most sources emit well before then.
Best practice: always show a loading state, begin playback on the first source event, and implement a client-side timeout for the overall stream. See the Error Handling guide.
Caching
Results are cached in-memory with a 5-minute TTL. The per-source stream cache is keyed bysource_key + tmdb_id + season + episode; the aggregate source-results cache is keyed by tmdb_id + season + episode + base. Cache hits skip the provider fetch entirely and return near-instantly.
/api/health response under the cache field.
The HLS Proxy
All provider stream URLs are wrapped in the server proxy (unlessskipProxy: true):
- Fetches the upstream M3U8 with the correct
Referer,Origin, and any provider-specific headers - Rewrites all segment URLs and encryption key URIs in the playlist to route through the same proxy
- Returns the rewritten playlist with
Access-Control-Allow-Origin: *
Stream Verification
Before a URL is emitted as asource event, it passes two verification steps:
verifyStream— a HEAD request to the raw upstream URL (skipped forSKIP_VERIFYsources). Must return HTTP< 400.verifyPlayable— fetches the proxied URL, validates#EXTM3U, checks for#EXTINFor#EXT-X-STREAM-INF, then fetches the first segment with a range request.
#EXTM3U check and are verified via HEAD + content-type inspection instead. HTTP 429 responses and timeout/abort errors are treated as passing (stream exists but is rate-limited).
/test runs the same two-step verification pipeline as /movie and /tv. Check the ok field in the response body — HTTP status is always 200 regardless of result.Disabled Providers
Providers markeddisabled: true in config are completely excluded from:
/api/movieand/api/tvfanout/api/healthprobesGET /api?sources_metalistings
Multi-URL Sources
Some providers return multiple candidate stream URLs (viaallUrls). For these, verification runs through each candidate in order and returns the first one that passes. If none pass, the source is dropped.
For providers with SKIP_VERIFY, all candidate URLs are returned as separate source events without verification. These are not distinguished by numbered labels in the response.
