Fixed all sources, rewrote, made test easier for developers to test everything

This commit is contained in:
endoverdosing
2026-07-30 09:25:08 -07:00
parent 902326bdcd
commit 3247f3a731
19 changed files with 705 additions and 577 deletions

View File

@@ -4,10 +4,10 @@ const ORIGIN = 'https://www3.fsonline.app';
const AJAX_URL = `${ORIGIN}/wp-admin/admin-ajax.php`;
const HEADERS = { 'User-Agent': USER_AGENT, 'Origin': ORIGIN, 'Referer': `${ORIGIN}/` };
export async function getStream({ id, s, e }) {
export async function getStream({ id, s, e, tmdbApiKey }) {
try {
const isTv = s != null && e != null;
const info = await getTmdbInfo(id, isTv ? 'tv' : 'movie');
const info = await getTmdbInfo(tmdbApiKey, id, isTv ? 'tv' : 'movie');
if (!info?.titles?.length) return null;
const searchHtml = await fetchText(`${ORIGIN}/?s=${encodeURIComponent(info.titles[0] + (info.year ? ' ' + info.year : ''))}`, { headers: HEADERS });
const typeFolder = isTv ? 'seriale' : 'film';