chore: increase tmdb queuing limits

This commit is contained in:
WebStreamr 2025-06-15 11:31:23 +00:00
parent 3a28de46bd
commit e9ccee5621
No known key found for this signature in database

View file

@ -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<string, string | undefined>): Promise<unknown> => {
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}`);