This commit is contained in:
50/50 2025-12-06 17:28:33 +01:00
parent 329228799a
commit bfe9f060c0
16 changed files with 113 additions and 113 deletions

View file

@ -20,17 +20,17 @@ async function searchResults(query) {
let baseUrl = null;
if (matchesKeyword(query, keywordGroups.trending)) {
baseUrl = `https://api.themoviedb.org/3/trending/all/week?api_key=9801b6b0548ad57581d111ea690c85c8&include_adult=false&page=`;
baseUrl = `https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent('https://api.themoviedb.org/3/trending/all/week?api_key=9801b6b0548ad57581d111ea690c85c8&include_adult=false&page=')}`;
} else if (matchesKeyword(query, keywordGroups.topRatedMovie)) {
baseUrl = `https://api.themoviedb.org/3/movie/top_rated?api_key=9801b6b0548ad57581d111ea690c85c8&include_adult=false&page=`;
baseUrl = `https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent('https://api.themoviedb.org/3/movie/top_rated?api_key=9801b6b0548ad57581d111ea690c85c8&include_adult=false&page=')}`;
} else if (matchesKeyword(query, keywordGroups.topRatedTV)) {
baseUrl = `https://api.themoviedb.org/3/tv/top_rated?api_key=9801b6b0548ad57581d111ea690c85c8&include_adult=false&page=`;
baseUrl = `https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent('https://api.themoviedb.org/3/tv/top_rated?api_key=9801b6b0548ad57581d111ea690c85c8&include_adult=false&page=')}`;
} else if (matchesKeyword(query, keywordGroups.popularMovie)) {
baseUrl = `https://api.themoviedb.org/3/movie/popular?api_key=9801b6b0548ad57581d111ea690c85c8&include_adult=false&page=`;
baseUrl = `https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent('https://api.themoviedb.org/3/movie/popular?api_key=9801b6b0548ad57581d111ea690c85c8&include_adult=false&page=')}`;
} else if (matchesKeyword(query, keywordGroups.popularTV)) {
baseUrl = `https://api.themoviedb.org/3/tv/popular?api_key=9801b6b0548ad57581d111ea690c85c8&include_adult=false&page=`;
baseUrl = `https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent('https://api.themoviedb.org/3/tv/popular?api_key=9801b6b0548ad57581d111ea690c85c8&include_adult=false&page=')}`;
} else {
baseUrl = `https://api.themoviedb.org/3/search/multi?api_key=9801b6b0548ad57581d111ea690c85c8&query=${encodedQuery}&include_adult=false&page=`;
baseUrl = `https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent(`https://api.themoviedb.org/3/search/multi?api_key=9801b6b0548ad57581d111ea690c85c8&query=${encodedQuery}&include_adult=false&page=`)}&simple=true`;
}
const fuzzyMatch = (query, title) => {
@ -221,7 +221,7 @@ async function extractDetails(url) {
if (!match) throw new Error("Invalid URL format");
const movieId = match[1];
const responseText = await soraFetch(`https://api.themoviedb.org/3/movie/${movieId}?api_key=ad301b7cc82ffe19273e55e4d4206885`);
const responseText = await soraFetch(`https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent(`https://api.themoviedb.org/3/movie/${movieId}?api_key=ad301b7cc82ffe19273e55e4d4206885`)}&simple=true`);
const data = await responseText.json();
const transformedResults = [{
@ -236,7 +236,7 @@ async function extractDetails(url) {
if (!match) throw new Error("Invalid URL format");
const showId = match[1];
const responseText = await soraFetch(`https://api.themoviedb.org/3/tv/${showId}?api_key=ad301b7cc82ffe19273e55e4d4206885`);
const responseText = await soraFetch(`https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent(`https://api.themoviedb.org/3/tv/${showId}?api_key=ad301b7cc82ffe19273e55e4d4206885`)}&simple=true`);
const data = await responseText.json();
const transformedResults = [{
@ -282,7 +282,7 @@ async function extractEpisodes(url) {
const showId = match[1];
const showResponseText = await soraFetch(`https://api.themoviedb.org/3/tv/${showId}?api_key=ad301b7cc82ffe19273e55e4d4206885`);
const showResponseText = await soraFetch(`https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent(`https://api.themoviedb.org/3/tv/${showId}?api_key=ad301b7cc82ffe19273e55e4d4206885`)}&simple=true`);
const showData = await showResponseText.json();
let allEpisodes = [];
@ -291,7 +291,7 @@ async function extractEpisodes(url) {
if(seasonNumber === 0) continue;
const seasonResponseText = await soraFetch(`https://api.themoviedb.org/3/tv/${showId}/season/${seasonNumber}?api_key=ad301b7cc82ffe19273e55e4d4206885`);
const seasonResponseText = await soraFetch(`https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent(`https://api.themoviedb.org/3/tv/${showId}/season/${seasonNumber}?api_key=ad301b7cc82ffe19273e55e4d4206885`)}&simple=true`);
const seasonData = await seasonResponseText.json();
if (seasonData.episodes && seasonData.episodes.length) {
@ -561,7 +561,7 @@ async function beta(ID) {
"X-Requested-With": "XMLHttpRequest",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/"
};
const tmdbResponse = await fetchv2(`https://api.themoviedb.org/3/movie/${tmdbID}?append_to_response=external_ids`, headersOne);
const tmdbResponse = await fetchv2(`https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent(`https://api.themoviedb.org/3/movie/${tmdbID}?append_to_response=external_ids`)}&simple=true`, headersOne);
const tmdbData = await tmdbResponse.json();
const imdbID = tmdbData.imdb_id;
@ -602,7 +602,7 @@ async function beta(ID) {
"X-Requested-With": "XMLHttpRequest",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/"
};
const tmdbResponse = await fetchv2(`https://api.themoviedb.org/3/tv/${tmdbID}?append_to_response=external_ids`, headersOne);
const tmdbResponse = await fetchv2(`https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent(`https://api.themoviedb.org/3/tv/${tmdbID}?append_to_response=external_ids`)}&simple=true`, headersOne);
const tmdbData = await tmdbResponse.json();
const imdbID = tmdbData.external_ids.imdb_id;
@ -690,7 +690,7 @@ async function delta(ID) {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",
"X-Api-Key": "24ef089ebcab51d107a4e4709e87861ef609bace89ac23af13235f6ea743488f"
};
const response = await fetchv2(`https://themoviedb.hexa.watch/api/tmdb/movie/${ID.split('/')[2]}/images`, headersOne);
const response = await fetchv2(`https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent(`https://themoviedb.hexa.watch/api/tmdb/movie/${ID.split('/')[2]}/images`)}&simple=true`, headersOne);
const data = await response.text();
const headers = {
@ -737,7 +737,7 @@ async function delta(ID) {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",
"X-Api-Key": "24ef089ebcab51d107a4e4709e87861ef609bace89ac23af13235f6ea743488f"
};
const response = await fetchv2(`https://themoviedb.hexa.watch/api/tmdb/tv/${tmdbID}/season/${seasonNumber}/episode/${episodeNumber}/images`, headersOne);
const response = await fetchv2(`https://post-eosin.vercel.app/api/proxy?url=${encodeURIComponent(`https://themoviedb.hexa.watch/api/tmdb/tv/${tmdbID}/season/${seasonNumber}/episode/${episodeNumber}/images`)}&simple=true`, headersOne);
const data = await response.text();
const headers = {