Update anime providers and verify Psyren dub resolution
This commit is contained in:
1 parent
a1628bf1ab
commit
b714e8ef30
7 files changed
+91
-15
No files matched your search
@@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## 0.55.13 — 2026-11-09
|
||||
|
||||
- Update Anikoto to 7.1.0 and AnimePahe to 7.0.2 from upstream revision `54500ef8df6917ffa606f7c05e2a444d770d13a7`. Include Anikoto language/media-type filter corrections and AnimePahe mirror cooldown and source retries.
|
||||
- Retain Kaizoku search recovery, dub detection, encrypted streams, CDN variants, subtitle referers, official mirror fallback, bounded search retries, UUID compatibility, and stderr logging. Recognize these patches as current in the provider update checker.
|
||||
- Verified all 439 tests and a live Psyren episode 4 dub playlist. Both dub playlists also returned HTTP 200 inside the existing 0.55.10 deployment; the original empty source response could not be reproduced.
|
||||
- Preserve all existing state, configuration, queue history, watchlists, thumbnails, downloads, and Jellyfin content.
|
||||
|
||||
## 0.55.12 — 2026-10-31
|
||||
|
||||
- Replace `KAIZOKU_SESSION_TTL_SECONDS` with `KAIZOKU_SESSION_TTL_HOURS` so Docker Compose and process configuration use whole hours. Default to 12 hours; invalid, fractional, or nonpositive values retain the default. Use `168` for seven days.
|
||||
|
||||
@@ -115,8 +115,10 @@ See the **[Kaizoku wiki](https://gitea.coreplay.eu/Dymas/kaizoku/wiki)** for det
|
||||
- [Data safety](https://gitea.coreplay.eu/Dymas/kaizoku/wiki/Data-Safety)
|
||||
- [Providers and upstream versions](https://gitea.coreplay.eu/Dymas/kaizoku/wiki/Providers)
|
||||
|
||||
Provider parsers are adapted from [TheYogMehta/extensions](https://github.com/TheYogMehta/extensions). Bundled active versions are Anikoto **7.0.0** and AnimePahe **7.0.1**, checked against upstream revision `5a1de84ad651d088cf427655573a96500151d862` on 2026-10-31. Anikoto includes upstream metadata and stream-domain updates plus Kaizoku's filter search recovery, dub detection, encrypted sources, CDN variants, subtitle referers, and support for the site's current metadata layout. AnimePahe includes upstream metadata, title matching, ID resolution, and extension database updates while retaining official `.pw`, `.com`, and `.org` mirrors, bounded search retries, and bridge-compatible logging. Without a StrawVerse mapping database, Kaizoku keeps AnimePahe's UUID-based search IDs and existing episode URLs so existing watchlists and queued jobs remain compatible. Browser and mapping lifecycle hooks stay inactive in Kaizoku's short-lived bridge.
|
||||
Provider parsers are adapted from [TheYogMehta/extensions](https://github.com/TheYogMehta/extensions). Bundled active versions are Anikoto **7.1.0** and AnimePahe **7.0.2**, checked against upstream revision `54500ef8df6917ffa606f7c05e2a444d770d13a7` on 2026-11-09. Anikoto includes upstream language/media-type filter, metadata, and stream-domain updates plus Kaizoku's filter search recovery, dub detection, encrypted sources, CDN variants, subtitle referers, and support for the site's current metadata layout. AnimePahe includes upstream mirror cooldown, source retry, metadata, title matching, ID resolution, and extension database updates while retaining official `.pw`, `.com`, and `.org` mirrors, bounded search retries, and bridge-compatible logging. Without a StrawVerse mapping database, Kaizoku keeps AnimePahe's UUID-based search IDs and existing episode URLs so existing watchlists and queued jobs remain compatible. Browser and mapping lifecycle hooks stay inactive in Kaizoku's short-lived bridge.
|
||||
|
||||
Upstream retired AniNeko on 2026-10-26. Its final **4.0.0** adapter remains available for compatibility with existing instances; provider selectors and Config's update status identify it as retired. It is no longer treated as a pending upstream update. Existing provider settings, watchlists, queue history, downloads, and thumbnails are preserved.
|
||||
|
||||
Live checks on 2026-10-27 confirmed Anikoto search, metadata, 12 episode entries with sub/dub availability, and a resolved dub source with eight subtitle tracks for The Iceblade Sorcerer Shall Rule the World. AniNeko returned HTTP 522, and all three AnimePahe mirrors returned HTTP 403 from the test host. Updating provider code does not remove those external service restrictions. Kaizoku does not host media.
|
||||
|
||||
Live diagnostics on 2026-11-09 resolved both Anikoto dub servers for Psyren episode 4 with bundled and current upstream provider code; a returned playlist responded with HTTP 200. Both dub playlists also returned HTTP 200 inside the existing 0.55.10 container on the deployment host. AnimePahe returned HTTP 403 on all official mirrors, and AniNeko timed out. Empty Anikoto source lists can reflect a temporary site response; retrying later may succeed. Provider updates do not remove external service restrictions.
|
||||
+2
-2
@@ -24,8 +24,8 @@ UPSTREAM_PROVIDER_PREFIX = "extensions/"
|
||||
# These providers retain Kaizoku bridge patches on exact upstream revisions.
|
||||
# A changed upstream hash must still report an update.
|
||||
LOCAL_PATCH_UPSTREAM_SHA256 = {
|
||||
"Anime/anikoto.js": "acde31d5fc2f26edf50b2083b685b62888252f4b2aaab33fa995ca84a239fea9",
|
||||
"Anime/pahe.js": "0ecc724c23ae981ba5dec470b66f01f9004e0e21994514aa38d021728f1f4fd2",
|
||||
"Anime/anikoto.js": "b7f5b27641fef5b8de941de5b0c172d32f2d41e2b6166777f2d672ede072527b",
|
||||
"Anime/pahe.js": "5eaa6f8099cdf528a7d17fac07bf4fd4e36dbd0414e7c0c19645820f05d526c3",
|
||||
}
|
||||
RETIRED_UPSTREAM_PROVIDERS = {"Anime/anineko.js"}
|
||||
|
||||
|
||||
@@ -262,12 +262,26 @@ async function fetchRecentEpisodes(filters = {}) {
|
||||
filters?.keyword !== undefined && filters?.keyword !== null
|
||||
? String(filters.keyword)
|
||||
: "";
|
||||
const language = String(filters?.language || "").toLowerCase();
|
||||
const hasLanguage = language === "sub" || language === "dub";
|
||||
const mediaType = filters?.type ? String(filters.type) : "";
|
||||
const hasType = [
|
||||
"TV",
|
||||
"TV_SHORT",
|
||||
"TV Special",
|
||||
"Movie",
|
||||
"ONA",
|
||||
"OVA",
|
||||
"Special",
|
||||
"Music",
|
||||
].includes(mediaType);
|
||||
let url;
|
||||
if (
|
||||
!keyword &&
|
||||
genreIds.length === 0 &&
|
||||
!status &&
|
||||
!filters?.type &&
|
||||
!hasType &&
|
||||
!hasLanguage &&
|
||||
!filters?.sort
|
||||
) {
|
||||
// Legacy default view (latest updated) when no filters are set.
|
||||
@@ -278,8 +292,9 @@ async function fetchRecentEpisodes(filters = {}) {
|
||||
for (const gid of genreIds) {
|
||||
params.append("genre[]", String(gid));
|
||||
}
|
||||
if (filters?.type) params.append("type", String(filters.type));
|
||||
if (hasType) params.append("term_type[]", mediaType);
|
||||
if (status) params.append("status[]", status);
|
||||
if (hasLanguage) params.append("language[]", language);
|
||||
if (filters?.sort) params.append("sort", String(filters.sort));
|
||||
params.append("page", String(page));
|
||||
url = `${baseUrl}/filter?${params.toString()}`;
|
||||
@@ -818,7 +833,7 @@ async function fetchEpisodeSources(episodeIdStr, category = null) {
|
||||
|
||||
module.exports = {
|
||||
name: "anikoto",
|
||||
version: "7.0.0",
|
||||
version: "7.1.0",
|
||||
baseUrl,
|
||||
headerRules: [
|
||||
{
|
||||
|
||||
@@ -35,6 +35,23 @@ const baseUrls = [
|
||||
];
|
||||
let baseUrl = baseUrls[0];
|
||||
|
||||
// Hosts that recently failed are tried last for a while, so one dead
|
||||
// mirror can't stall every call.
|
||||
const mirrorCooldownUntil = {};
|
||||
const MIRROR_COOLDOWN_MS = 5 * 60 * 1000;
|
||||
|
||||
function markMirrorDown(base) {
|
||||
try {
|
||||
mirrorCooldownUntil[String(base)] = Date.now() + MIRROR_COOLDOWN_MS;
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
function markMirrorOk(base) {
|
||||
try {
|
||||
delete mirrorCooldownUntil[String(base)];
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
function swapBase(url, base) {
|
||||
return String(url).replace(/https:\/\/animepahe\.[a-z]+/i, base);
|
||||
}
|
||||
@@ -63,7 +80,17 @@ function getBaseVariants(url) {
|
||||
out.push(v);
|
||||
}
|
||||
}
|
||||
return out;
|
||||
const now = Date.now();
|
||||
const fresh = [];
|
||||
const cooling = [];
|
||||
for (const v of out) {
|
||||
const host = (/https:\/\/animepahe\.[a-z]+/i.exec(v) || [])[0] || v;
|
||||
(mirrorCooldownUntil[host] && mirrorCooldownUntil[host] > now
|
||||
? cooling
|
||||
: fresh
|
||||
).push(v);
|
||||
}
|
||||
return [...fresh, ...cooling];
|
||||
}
|
||||
|
||||
function notifyRenderer(channel, payload) {
|
||||
@@ -414,6 +441,10 @@ async function safeGet(url, config = {}, maxRetries = 5, opts = {}) {
|
||||
const expectJson = !!opts.expectJson;
|
||||
let lastErr = null;
|
||||
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
||||
try {
|
||||
const u = new URL(url);
|
||||
console.error(`[AnimePahe] GET ${u.hostname}${u.pathname} (attempt ${attempt}/${maxRetries})`);
|
||||
} catch (_) {}
|
||||
const now = Date.now();
|
||||
const timeSinceLast = now - lastRequestTime;
|
||||
if (timeSinceLast < MIN_REQUEST_INTERVAL) {
|
||||
@@ -471,6 +502,7 @@ async function safeGet(url, config = {}, maxRetries = 5, opts = {}) {
|
||||
console.warn(
|
||||
`[AnimePahe] ${tryBase} returned non-API payload, trying next mirror...`,
|
||||
);
|
||||
markMirrorDown(tryBase);
|
||||
lastErr = Object.assign(
|
||||
new Error(`Invalid API response from ${tryBase}`),
|
||||
{ code: "BAD_MIRROR" },
|
||||
@@ -521,6 +553,7 @@ async function safeGet(url, config = {}, maxRetries = 5, opts = {}) {
|
||||
|
||||
// success -> remember working base
|
||||
baseUrl = tryBase;
|
||||
markMirrorOk(tryBase);
|
||||
notifyRenderer("catalog-loading-status", {
|
||||
text: "",
|
||||
});
|
||||
@@ -531,6 +564,7 @@ async function safeGet(url, config = {}, maxRetries = 5, opts = {}) {
|
||||
if (status === 404) {
|
||||
// Try remaining mirrors before surfacing 404 (preserves the
|
||||
// UUID auto-heal flow when every mirror agrees it is missing).
|
||||
markMirrorDown(tryBase);
|
||||
console.warn(`[AnimePahe] 404 on ${tryBase}, trying next mirror...`);
|
||||
continue;
|
||||
}
|
||||
@@ -549,6 +583,7 @@ async function safeGet(url, config = {}, maxRetries = 5, opts = {}) {
|
||||
"ECONNREFUSED",
|
||||
].some((c) => String(err?.code || err?.message || "").includes(c)));
|
||||
if (isMirrorDown) {
|
||||
markMirrorDown(tryBase);
|
||||
console.warn(
|
||||
`[AnimePahe] Mirror ${tryBase} is down (${err?.code || status || "Network"}), trying next mirror...`,
|
||||
);
|
||||
@@ -1349,7 +1384,7 @@ function extractQualityNumber(qualityString) {
|
||||
}
|
||||
|
||||
// helpers for extracting video links
|
||||
async function extract(videoUrl, retries = 2, delay = 1000) {
|
||||
async function extract(videoUrl, retries = 3, delay = 1000) {
|
||||
let sources = [];
|
||||
for (let attempt = 1; attempt <= retries; attempt++) {
|
||||
try {
|
||||
@@ -1369,12 +1404,9 @@ async function extract(videoUrl, retries = 2, delay = 1000) {
|
||||
});
|
||||
return sources;
|
||||
} catch (err) {
|
||||
if (
|
||||
(err.response?.status === 429 || err.message.includes("429")) &&
|
||||
attempt < retries
|
||||
) {
|
||||
if (attempt < retries) {
|
||||
console.warn(
|
||||
`Request to ${videoUrl.href} returned 429. Retrying in ${delay}ms (attempt ${attempt}/${retries})...`,
|
||||
`Resolving ${videoUrl.href} failed (${err.response?.status || err.message}). Retrying in ${delay}ms (attempt ${attempt}/${retries})...`,
|
||||
);
|
||||
await new Promise((resolve) => setTimeout(resolve, delay));
|
||||
delay *= 2;
|
||||
@@ -1665,7 +1697,7 @@ async function onInfoFetched({ id, info, api }) {
|
||||
|
||||
module.exports = {
|
||||
name: "pahe",
|
||||
version: "7.0.1",
|
||||
version: "7.0.2",
|
||||
baseUrl,
|
||||
headerRules: [
|
||||
{
|
||||
|
||||
+20
@@ -6545,6 +6545,26 @@ https://shard-102.snapcdn.top/anime/show/episode/seg-f1-00083.css
|
||||
|
||||
self.assertEqual(provider_downloader.concise_error(error), "Error: Request failed with status code 403")
|
||||
|
||||
def test_anikoto_recent_filters_use_current_site_parameters(self):
|
||||
script = r"""
|
||||
const urls = [];
|
||||
global.axios = { get: async url => { urls.push(url); return {data: ""}; } };
|
||||
const provider = require('./providers/extensions/Anime/anikoto.js');
|
||||
(async () => {
|
||||
await provider.fetchRecentEpisodes({type: 'TV', language: 'DUB', page: 2});
|
||||
await provider.fetchRecentEpisodes({type: 'invalid', language: 'invalid'});
|
||||
console.log(JSON.stringify(urls));
|
||||
})();
|
||||
"""
|
||||
proc = subprocess.run(["node", "-e", script], cwd=ROOT, text=True, capture_output=True)
|
||||
self.assertEqual(proc.returncode, 0, proc.stderr)
|
||||
urls = json.loads(proc.stdout)
|
||||
from urllib.parse import parse_qs, urlparse
|
||||
self.assertEqual(parse_qs(urlparse(urls[0]).query), {
|
||||
"term_type[]": ["TV"], "language[]": ["dub"], "page": ["2"],
|
||||
})
|
||||
self.assertIn("sort=latest-updated", urls[1])
|
||||
|
||||
def test_anikoto_search_uses_paginated_filter_endpoint(self):
|
||||
script = r"""
|
||||
global.axios = {
|
||||
|
||||
Reference in new issue
Block a user