fix(aniplay): Migrates to Aniwatch only

Removes Consumet and consolidates episode fetching to use Aniwatch as the sole provider.

This simplifies the codebase and ensures a consistent data source for episodes and URLs.
Also updates `wrangler` and sets `ENABLE_ANIFY` to false.
This commit is contained in:
2025-08-08 08:16:39 -07:00
parent d680c97bc6
commit 0b0078328c
13 changed files with 95 additions and 380 deletions

View File

@@ -97,12 +97,12 @@ async function fetchEpisodes(
.then(
(res) =>
res.json() as Promise<{
success: boolean;
status: number;
data: AniwatchEpisodesResponse;
}>,
)
.then(({ success, data }) => {
if (!success || data.totalEpisodes === 0) {
.then(({ status, data }) => {
if (status >= 300 || data.totalEpisodes === 0) {
console.error(
`Error trying to load episodes from aniwatch; aniListId: ${aniListId}, totalEpisodes: ${data.totalEpisodes}`,
);
@@ -164,12 +164,12 @@ function getAniwatchId(
}
const json = (await res.value.json()) as {
success: boolean;
status: number;
data: AniwatchSearchResponse;
};
const currentValue = await current;
return {
success: currentValue.success || json.success,
success: currentValue.success || json.status === 200,
data: {
...currentValue.data,
animes: [