-
-
Notifications
You must be signed in to change notification settings - Fork 700
Open
Description
Bug
getTraktAliases() in packages/core/src/metadata/trakt.ts sends trakt-api-version: '1' (line 57), but Trakt has sunset API v1 and returns 403 Forbidden for all v1 requests.
Affected Code
// packages/core/src/metadata/trakt.ts, line 51-61
const response = await makeRequest(
`${TRAKT_API_BASE_URL}/${parsedId.mediaType === 'movie' ? 'movies' : 'shows'}/${imdbId}/aliases`,
{
timeout: 5000,
headers: {
'Content-Type': 'application/json',
'trakt-api-version': '1', // ← bug: should be '2'
'trakt-api-key': Env.TRAKT_CLIENT_ID,
},
}
);Fix
Change line 57 from:
'trakt-api-version': '1',to:
'trakt-api-version': '2',Proof
With v1 (current code) — 403:
❌ ERROR | trakt | Failed to retrieve Trakt aliases: Error: Failed to retrieve Trakt aliases: 403 - Forbidden
This error fires on every stream request when TRAKT_CLIENT_ID is configured.
With v2 (manual curl test) — 200 OK:
curl -s -w '%{http_code}' \
-H 'Content-Type: application/json' \
-H 'trakt-api-version: 2' \
-H 'trakt-api-key: <redacted>' \
'https://api.trakt.tv/movies/tt1375666/aliases'
# Returns 200 with alias dataEnvironment
- AIOStreams v2.25.4 (commit cb48739, built 2026-03-12)
- Docker image:
ghcr.io/viren070/aiostreams:latest
Workaround
Set FETCH_TRAKT_ALIASES=false in .env to suppress the errors. TMDB handles title matching as a fallback.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels