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

@@ -6,14 +6,13 @@ import { server } from "~/mocks";
server.listen();
describe('requests the "/episodes/:id/url" route', () => {
it("with sources from Anify", async () => {
it("with sources from Aniwatch", async () => {
const response = await app.request(
"/episodes/1/url",
"/episodes/4/url",
{
method: "POST",
body: JSON.stringify({
provider: "anify",
id: "/ore-dake-level-up-na-ken-episode-2",
episodeNumber: 1,
}),
headers: { "Content-Type": "application/json" },
},
@@ -26,19 +25,18 @@ describe('requests the "/episodes/:id/url" route', () => {
success: true,
result: {
source:
"https://proxy.anify.tv/video/8CLGIJg8G3k%252BH%252BYV9xyOYVGZ8al8uZqqtbXk44wKRco%252BGATkCrqlkgdRiam3owmOU4f2MAB89GOblOuZbxifwbGsjvp32uxhRC4kZVYrWnZmP%252FrLxtqwi0n6zY%252BvrffUh6dbg6DADSLCWhd2bNUUIg%253D%253D/%7B%7D/.m3u8",
"https://www032.vipanicdn.net/streamhls/aa804a2400535d84dd59454b28d329fb/ep.1.1712504065.m3u8",
subtitles: [],
audio: [],
},
});
});
it("with no URL from Anify source", async () => {
it("with no URL from Aniwatch source", async () => {
const response = await app.request("/episodes/-1/url", {
method: "POST",
body: JSON.stringify({
provider: "anify",
id: "/ore-dake-level-up-na-ken-episode-2",
episodeNumber: -1,
}),
headers: { "Content-Type": "application/json" },
});
@@ -46,85 +44,4 @@ describe('requests the "/episodes/:id/url" route', () => {
expect(response.json()).resolves.toEqual({ success: false });
expect(response.status).toBe(404);
});
it("with sources from Consumet", async () => {
const response = await app.request(
"/episodes/1/url",
{
method: "POST",
body: JSON.stringify({
provider: "consumet",
id: "/ore-dake-level-up-na-ken-episode-2",
}),
headers: { "Content-Type": "application/json" },
},
{
ENABLE_ANIFY: "true",
},
);
expect(response.json()).resolves.toEqual({
success: true,
result: {
source: "https://consumet.com",
subtitles: [],
audio: [],
},
});
});
it("with no URL from Consumet source", async () => {
const response = await app.request("/episodes/-1/url", {
method: "POST",
body: JSON.stringify({
provider: "consumet",
id: "unknown",
}),
headers: { "Content-Type": "application/json" },
});
expect(response.json()).resolves.toEqual({ success: false });
expect(response.status).toBe(404);
});
// it("with sources from Aniwatch", async () => {
// const response = await app.request(
// "/episodes/1/url",
// {
// method: "POST",
// body: JSON.stringify({
// provider: "aniwatch",
// id: "ore-dake-level-up-na-ken-episode-2",
// }),
// headers: { "Content-Type": "application/json" },
// },
// {
// ENABLE_ANIFY: "true",
// },
// );
// expect(response.json()).resolves.toEqual({
// success: true,
// result: {
// source:
// "https://www032.vipanicdn.net/streamhls/aa804a2400535d84dd59454b28d329fb/ep.1.1712504065.m3u8",
// subtitles: [],
// audio: [],
// },
// });
// });
// it("with no URL from Aniwatch source", async () => {
// const response = await app.request("/episodes/-1/url", {
// method: "POST",
// body: JSON.stringify({
// provider: "aniwatch",
// id: "unknown",
// }),
// headers: { "Content-Type": "application/json" },
// });
// expect(response.json()).resolves.toEqual({ success: false });
// expect(response.status).toBe(404);
// });
});