Clean up retired metadata path
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.52.9 - 2026-08-10
|
||||||
|
|
||||||
|
- Removed the unused legacy AllManga/AllAnime GraphQL metadata helper and constants from active code.
|
||||||
|
- Logged best-effort Watchlist thumbnail refresh failures instead of silently swallowing them.
|
||||||
|
|
||||||
## 0.52.8 - 2026-08-09
|
## 0.52.8 - 2026-08-09
|
||||||
|
|
||||||
- Added default Docker Jellyfin TV and movie mount points at `/jellyfin/tv` and `/jellyfin/movies`.
|
- Added default Docker Jellyfin TV and movie mount points at `/jellyfin/tv` and `/jellyfin/movies`.
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ Kaizoku is a local web app for searching, tracking, and downloading anime from A
|
|||||||
- Search anime through the configured provider and tag results with available `SUB` and `DUB` episode languages.
|
- Search anime through the configured provider and tag results with available `SUB` and `DUB` episode languages.
|
||||||
- Choose the active search provider directly from the Search page.
|
- Choose the active search provider directly from the Search page.
|
||||||
- Prefer provider-supplied search artwork, with a local title-based thumbnail fallback when provider artwork is missing or broken.
|
- Prefer provider-supplied search artwork, with a local title-based thumbnail fallback when provider artwork is missing or broken.
|
||||||
|
- Fill Watchlist thumbnails from AnimeSchedule or AniDB title metadata when provider artwork is missing.
|
||||||
- Queue single episodes or batches in subbed or dubbed mode.
|
- Queue single episodes or batches in subbed or dubbed mode.
|
||||||
- Monitor active Queue jobs with per-episode progress, segment counts, and live downloader output.
|
- Monitor active Queue jobs with per-episode progress, segment counts, and live downloader output.
|
||||||
- Open result actions in a floating window for watchlist, media type, subbed/dubbed mode, library name, season, episode range, and download folder choices.
|
- Open result actions in a floating window for watchlist, media type, subbed/dubbed mode, library name, season, episode range, and download folder choices.
|
||||||
|
|||||||
@@ -35,8 +35,6 @@ from app_support import (
|
|||||||
CONFIG_PATH,
|
CONFIG_PATH,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
MAX_JSON_BODY_BYTES,
|
MAX_JSON_BODY_BYTES,
|
||||||
METADATA_API,
|
|
||||||
METADATA_REFERER,
|
|
||||||
MODE_CHOICES,
|
MODE_CHOICES,
|
||||||
QUALITY_CHOICES,
|
QUALITY_CHOICES,
|
||||||
send_discord_webhook_event,
|
send_discord_webhook_event,
|
||||||
@@ -101,37 +99,6 @@ WATCHLIST_JELLYFIN_SYNC = None
|
|||||||
WATCHLIST_BACKUP_FORMAT_VERSION = 1
|
WATCHLIST_BACKUP_FORMAT_VERSION = 1
|
||||||
|
|
||||||
|
|
||||||
def graph_request(query, variables, timeout=25):
|
|
||||||
payload = json.dumps({"variables": variables, "query": query}).encode("utf-8")
|
|
||||||
request = urllib.request.Request(
|
|
||||||
f"{METADATA_API}/api",
|
|
||||||
data=payload,
|
|
||||||
headers={
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
"Referer": METADATA_REFERER,
|
|
||||||
"User-Agent": AGENT,
|
|
||||||
},
|
|
||||||
method="POST",
|
|
||||||
)
|
|
||||||
try:
|
|
||||||
with urllib.request.urlopen(request, timeout=timeout) as response:
|
|
||||||
raw = response.read().decode("utf-8")
|
|
||||||
except urllib.error.URLError as exc:
|
|
||||||
raise RuntimeError(f"Could not reach metadata service: {exc}") from exc
|
|
||||||
except TimeoutError as exc:
|
|
||||||
raise RuntimeError("Metadata request timed out") from exc
|
|
||||||
|
|
||||||
try:
|
|
||||||
data = json.loads(raw)
|
|
||||||
except json.JSONDecodeError as exc:
|
|
||||||
raise RuntimeError("Metadata service returned an unreadable response") from exc
|
|
||||||
|
|
||||||
if data.get("errors"):
|
|
||||||
message = data["errors"][0].get("message", "Metadata service returned an error")
|
|
||||||
raise RuntimeError(message)
|
|
||||||
return data.get("data", {})
|
|
||||||
|
|
||||||
|
|
||||||
def parse_iso_timestamp(value):
|
def parse_iso_timestamp(value):
|
||||||
text = str(value or "").strip()
|
text = str(value or "").strip()
|
||||||
if not text:
|
if not text:
|
||||||
@@ -2209,8 +2176,8 @@ class WatchlistStore:
|
|||||||
if include_thumbnail and self.has_show(normalized_show_id):
|
if include_thumbnail and self.has_show(normalized_show_id):
|
||||||
try:
|
try:
|
||||||
self.ensure_thumbnail(normalized_show_id)
|
self.ensure_thumbnail(normalized_show_id)
|
||||||
except Exception:
|
except Exception as exc:
|
||||||
pass
|
debug_log("watchlist.refresh.thumbnail_failed", show_id=normalized_show_id, error=exc)
|
||||||
item = self.get(normalized_show_id)
|
item = self.get(normalized_show_id)
|
||||||
item["previous_sub_count"] = previous_sub_count
|
item["previous_sub_count"] = previous_sub_count
|
||||||
item["previous_dub_count"] = previous_dub_count
|
item["previous_dub_count"] = previous_dub_count
|
||||||
@@ -2802,8 +2769,8 @@ class WatchlistStore:
|
|||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
self.ensure_thumbnail(show_id, force=force)
|
self.ensure_thumbnail(show_id, force=force)
|
||||||
except Exception:
|
except Exception as exc:
|
||||||
pass
|
debug_log("watchlist.ensure_thumbnails.failed", show_id=show_id, error=exc)
|
||||||
try:
|
try:
|
||||||
updated.append(self.get(show_id))
|
updated.append(self.get(show_id))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|||||||
@@ -41,10 +41,6 @@ KAIZOKU_DOWNLOADER = configured_cli_command("KAIZOKU_DOWNLOADER_BIN", "provider_
|
|||||||
APP_NAME = "Kaizoku"
|
APP_NAME = "Kaizoku"
|
||||||
VERSION_FILE = PROJECT_ROOT / "VERSION"
|
VERSION_FILE = PROJECT_ROOT / "VERSION"
|
||||||
CHANGELOG_FILE = PROJECT_ROOT / "CHANGELOG.md"
|
CHANGELOG_FILE = PROJECT_ROOT / "CHANGELOG.md"
|
||||||
METADATA_API_HOST = "allanime.day"
|
|
||||||
METADATA_API = f"https://api.{METADATA_API_HOST}"
|
|
||||||
METADATA_REFERER = "https://allmanga.to"
|
|
||||||
METADATA_SITE_BASE = "https://allmanga.to"
|
|
||||||
ANIMESCHEDULE_API = "https://animeschedule.net/api/v3"
|
ANIMESCHEDULE_API = "https://animeschedule.net/api/v3"
|
||||||
ANIMESCHEDULE_IMAGE_BASE = "https://img.animeschedule.net/production/assets/public/img/"
|
ANIMESCHEDULE_IMAGE_BASE = "https://img.animeschedule.net/production/assets/public/img/"
|
||||||
ANIDB_TITLES_URL = "https://anidb.net/api/anime-titles.xml.gz"
|
ANIDB_TITLES_URL = "https://anidb.net/api/anime-titles.xml.gz"
|
||||||
|
|||||||
@@ -4090,6 +4090,14 @@ class TemplateHelperTests(unittest.TestCase):
|
|||||||
self.assertIn("mkdir -p /downloads /jellyfin/tv /jellyfin/movies /app/.kaizoku", dockerfile)
|
self.assertIn("mkdir -p /downloads /jellyfin/tv /jellyfin/movies /app/.kaizoku", dockerfile)
|
||||||
self.assertIn("chown \"$uid:$gid\" /downloads /jellyfin/tv /jellyfin/movies", entrypoint)
|
self.assertIn("chown \"$uid:$gid\" /downloads /jellyfin/tv /jellyfin/movies", entrypoint)
|
||||||
|
|
||||||
|
def test_active_code_does_not_reference_retired_metadata_source(self):
|
||||||
|
active_files = ("app.py", "app_support.py", "http_handler.py", "provider_bridge.py", "provider_downloader.py")
|
||||||
|
active_text = "\n".join((ROOT / filename).read_text(encoding="utf-8") for filename in active_files)
|
||||||
|
|
||||||
|
self.assertNotIn("allmanga", active_text.lower())
|
||||||
|
self.assertNotIn("allanime", active_text.lower())
|
||||||
|
self.assertNotIn("METADATA_API", active_text)
|
||||||
|
|
||||||
def test_queue_page_formats_jellyfin_handoff_jobs(self):
|
def test_queue_page_formats_jellyfin_handoff_jobs(self):
|
||||||
self.assertIn('job.job_type === "jellyfin_handoff"', APP.QUEUE_HTML)
|
self.assertIn('job.job_type === "jellyfin_handoff"', APP.QUEUE_HTML)
|
||||||
self.assertIn('const progress = `${job.completed || 0}/${job.total || 0} entries`;', APP.QUEUE_HTML)
|
self.assertIn('const progress = `${job.completed || 0}/${job.total || 0} entries`;', APP.QUEUE_HTML)
|
||||||
|
|||||||
Reference in New Issue
Block a user