1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

Proxied tmdb to circumvent censorship

This commit is contained in:
Paradox 2024-03-16 22:34:24 +05:30 committed by GitHub
parent 6069dd97dd
commit 28f146b965
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,7 +17,7 @@ import {
TMDBShowData,
TMDBShowSearchResult,
} from "./types/tmdb";
import { mwFetch } from "../helpers/fetch";
import { proxiedFetch } from "../helpers/fetch";
export function mediaTypeToTMDB(type: MWMediaType): TMDBContentTypes {
if (type === MWMediaType.MOVIE) return TMDBContentTypes.MOVIE;
@ -154,7 +154,7 @@ const headers = {
async function get<T>(url: string, params?: object): Promise<T> {
if (!apiKey) throw new Error("TMDB API key not set");
const res = await mwFetch<any>(encodeURI(url), {
const res = await proxiedFetch<any>(encodeURI(url), {
headers,
baseURL,
params: {