From e9ccee56211ad9dd854482cc4c2fba0bc5901996 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Sun, 15 Jun 2025 11:31:23 +0000 Subject: [PATCH] chore: increase tmdb queuing limits --- src/utils/tmdb.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/utils/tmdb.ts b/src/utils/tmdb.ts index 4838086..8970f0c 100644 --- a/src/utils/tmdb.ts +++ b/src/utils/tmdb.ts @@ -1,6 +1,6 @@ import { ImdbId, TmdbId } from './id'; import { Context } from '../types'; -import { Fetcher } from './Fetcher'; +import { CustomRequestInit, Fetcher } from './Fetcher'; import { envGet } from './env'; import { NotFoundError } from '../error'; @@ -28,7 +28,14 @@ interface TvDetailsResponsePartial { } export const tmdbFetch = async (ctx: Context, fetcher: Fetcher, path: string, searchParams?: Record): Promise => { - const config = { 'headers': { Authorization: 'Bearer ' + envGet('TMDB_ACCESS_TOKEN') }, 'Content-Type': 'application/json' }; + const config: CustomRequestInit = { + headers: { + 'Authorization': 'Bearer ' + envGet('TMDB_ACCESS_TOKEN'), + 'Content-Type': 'application/json', + }, + queueLimit: 50, + queueErrorLimit: 100, + }; const url = new URL(`https://api.themoviedb.org/3${path}`);