feat: enrich AniList episode metadata rows
This commit is contained in:
+19
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user