Compare commits

..

No commits in common. "940c6e9de2abf3e56f04772b7d59a70af3954948" and "aaca8c7f3cb304a24976d2d4f789430e4b1a49d7" have entirely different histories.

2 changed files with 5 additions and 10 deletions

View file

@ -112,20 +112,15 @@ const _anixart_baseUrlList = [
];
export async function getAnixartApiBaseUrl() {
if (process.env.ANIXART_BASE_URL) {
ANIXART_API = process.env.ANIXART_BASE_URL
logger.info(`Using predefined anixart base url: ${process.env.ANIXART_BASE_URL}`);
return;
};
logger.info("Finding working anixart base url...");
if (process.env.ANIXART_BASE_URL) return process.env.ANIXART_BASE_URL;
logger.info("FINDING WORKING ANIXART API BASE URL...");
for (const url of _anixart_baseUrlList) {
try {
const res = await fetch(`${url}/config/toggles?version_code=25062213&is_beta=true&is_api_alt=false&token=`, { method: "GET" });
await res.json();
ANIXART_API = url;
logger.info(`Found anixart base url: ${url}`);
logger.info(`FOUND WORKING ANIXART API BASE URL: ${url}`);
break;
} catch {
continue;
@ -133,7 +128,7 @@ export async function getAnixartApiBaseUrl() {
}
if (!ANIXART_API) {
logger.error("FATAL: Failed to find working anixart base url!");
logger.error("FAILED TO FIND WORKING ANIXART API BASE URL!");
process.exit(1);
}
}

View file

@ -97,7 +97,7 @@ export const ReleasePlayerCustom = (props: {
}
return;
}
if (["Libria", "Liberty"].includes(source.selected.name)) {
if (source.selected.name == "Libria") {
const { manifest, poster } = await _fetchAnilibriaManifest(
episode.selected.url,
setPlayerError