Skip to content

Fix anime streaming reliability across One Piece, Dragon Ball, packs - #6

Closed
aneeshtigga wants to merge 1 commit into
masterfrom
fix/anime-streaming-reliability
Closed

Fix anime streaming reliability across One Piece, Dragon Ball, packs#6
aneeshtigga wants to merge 1 commit into
masterfrom
fix/anime-streaming-reliability

Conversation

@aneeshtigga

Copy link
Copy Markdown
Owner

Summary

  • Fixes missing streams for One Piece, Dragon Ball, Dragon Ball Super
  • Unlocks pack-only old episodes (001-574 batches)
  • Ongoing multi-season anime now resolves via best-effort ordinal (labeled )
  • Anime indexers (AnimeTosho, AniDex, TokyoTosho, Nyaa) auto-added to all setups

Root Cause

Absolute episode resolution failed → queries degraded to SxxEyy-only → anime releases (named by absolute number) didn't match → zero streams.

Technical Changes

  • anilist.js: Per-fetch 3s timeouts, TTL'd caches (60s transient / 24h positive), animeSeasonInfo()
  • cinemeta.js: Season shape signals (seasonMax/hasSpecials/seasonsContiguous), 5 absolute query variants
  • addon.js: trustOrdinal() with 3 safety rules, uncertain labeling (), real sub-budgets, pack gate
  • util.js: matchesAbsolute strips S23E09/v2/1st, packCovers handles E01-E131 ranges
  • jackett-setup.js: Anime indexer reconciliation + EACCES diagnostic
  • jackett.js: Static fan-out fallback (not slow all aggregate)
  • test/: 15 tests guard no-wrong-episode invariant

Test Plan

  • Tests pass (npm test)
  • One Piece S3E5 returns pack streams (episode 35, labeled )
  • One Piece S23E9 returns multiple streams (recent episode, certain match)
  • Dragon Ball / Dragon Ball Super episodes resolve
  • Windows/Linux: Jackett bootstrap + indexer reconcile logs clean

Verification

npm test
npm start
curl http://127.0.0.1:11472/stream/series/tt0388629:3:5.json | jq '.streams | length'

🤖 Generated with Claude Code

Root cause: absolute episode resolution failed for ongoing/old anime →
queries degraded to SxxEyy-only (anime releases never use) → zero streams.

Changes:
- anilist.js: 3s fetch timeouts, TTL'd positive/negative caches (60s
  transient, 24h positive), animeSeasonInfo({episodes,status,format})
- cinemeta.js: seasonMax/Min/hasSpecials/seasonsContiguous signals,
  5 absolute query variants (bare, pad2, dash, pad3, E-prefix)
- addon.js: trustOrdinal() with 3 rules (single-season, exact-total,
  ongoing-contiguous-prefix), certain flag, label uncertain matches ≈,
  real sub-budgets (3.5s AniList/TVDB, 8s packs), pack gate to isAnime
- util.js: matchesAbsolute strips S23E09/S23/v2/1st, packCovers strips
  E01-E131 ranges
- jackett-setup.js: anime indexers (animetosho/tokyotoshokan/anidex),
  ensureAnimeIndexers() reconciles into existing setups, EACCES diagnostic
- jackett.js: static FALLBACK_FANOUT_IDS before slow 'all' aggregate
- index.js: warm Fribb map on startup
- test/: 15 tests guard trustOrdinal + matchesAbsolute/packCovers

Coverage: old/pack-only episodes, ongoing multi-season anime (labeled),
completed anime, weird naming (dash/E-prefix), cross-OS Jackett setup.

Speed: 3.5s caps (not 25s), static fan-out (not slow aggregate),
self-healing 60s transient cache.

Safety: uncertain matches labeled ≈, tests guard off-by-one traps,
pack gate requires trustworthy absolute.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant