From a5aea5adcf55d3cc1ec47ec1c390f081da3ef1f6 Mon Sep 17 00:00:00 2001 From: hl-valdemar Date: Sun, 25 Oct 2026 17:01:14 +0100 Subject: [PATCH] feat: enrich AniList episode metadata rows --- README.md | 2 ++ src/miruro_ui.rs | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ba4df99..832c43f 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,8 @@ Choose **AniList** or use `--anilist`. Search/detail metadata comes directly fro Rows, metadata and selection prompts label availability UNVERIFIED. Terebi resolves the current selection fresh; unavailable episodes, malformed/protected pages and network failures appear as distinct player errors, while launch/catalog errors remain visible in Tubular. A successful handoff does not mark an episode watched. +AniList episode metadata rows lead with the available series-average runtime (`25 min avg`), format and series year, followed by `sub · UNVERIFIED` and collection/watch markers. Missing or zero average runtimes are omitted. These are explicitly series-level facts, not measured episode durations or individual air dates; legacy Miruro retains its returned episode-specific dates and durations. + Identities are `anilist::`, with both numbers bounded by Int32. The stable handoff is `https://zokoanime.video/stream/ani/ID/EPISODE/sub` (`ani`, not the broken `anilist` route). Sources, tokens and subtitle URLs are never stored in collections or playback snapshots. Queues use the same stable URL and per-item private progress files; version-2 reports identify `provider = "anilist"`, decimal-string `media_id`, and numeric `episode`. `anilist-library.toml` stores AniList shows/tags separately from the untouched `miruro-library.toml`. Shared episode collection/state files use exact provider-qualified keys and filter each catalog independently; `miruro:1:1` is not `anilist:1:1`. No opaque Miruro IDs, saved show metadata or old playback sessions are mapped or reinterpreted. diff --git a/src/miruro_ui.rs b/src/miruro_ui.rs index 5adfc48..9ee1b72 100644 --- a/src/miruro_ui.rs +++ b/src/miruro_ui.rs @@ -281,7 +281,25 @@ impl Screen { details.push(format!("{}:{:02}", seconds / 60, seconds % 60)); } if self.provider == Provider::AniList { - details.push("UNVERIFIED · sub".into()); + if let Some(minutes) = media + .metadata + .get("episode_duration_minutes") + .and_then(Value::as_u64) + .filter(|minutes| *minutes > 0) + { + details.push(format!("{minutes} min avg")); + } + if let Some(format) = + media.metadata.get("format").and_then(Value::as_str) + { + details.push(safe(format)); + } + if let Some(year) = + media.metadata.get("season_year").and_then(Value::as_u64) + { + details.push(format!("{year} series")); + } + details.push("sub · UNVERIFIED".into()); } let details = details.join(" · "); let mut metadata = title.clone();