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:
parent
6069dd97dd
commit
28f146b965
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ import {
|
||||||
TMDBShowData,
|
TMDBShowData,
|
||||||
TMDBShowSearchResult,
|
TMDBShowSearchResult,
|
||||||
} from "./types/tmdb";
|
} from "./types/tmdb";
|
||||||
import { mwFetch } from "../helpers/fetch";
|
import { proxiedFetch } from "../helpers/fetch";
|
||||||
|
|
||||||
export function mediaTypeToTMDB(type: MWMediaType): TMDBContentTypes {
|
export function mediaTypeToTMDB(type: MWMediaType): TMDBContentTypes {
|
||||||
if (type === MWMediaType.MOVIE) return TMDBContentTypes.MOVIE;
|
if (type === MWMediaType.MOVIE) return TMDBContentTypes.MOVIE;
|
||||||
|
@ -154,7 +154,7 @@ const headers = {
|
||||||
async function get<T>(url: string, params?: object): Promise<T> {
|
async function get<T>(url: string, params?: object): Promise<T> {
|
||||||
if (!apiKey) throw new Error("TMDB API key not set");
|
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,
|
headers,
|
||||||
baseURL,
|
baseURL,
|
||||||
params: {
|
params: {
|
||||||
|
|
Loading…
Reference in a new issue