From 78a1632e2f5d75a212a85a0da24bf325a1153426 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 3 Feb 2025 00:40:42 +0100 Subject: fix import aspect --- import/src/lib.rs | 1 + server/src/routes/ui/node.rs | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/import/src/lib.rs b/import/src/lib.rs index 4d39565..bc4b2ee 100644 --- a/import/src/lib.rs +++ b/import/src/lib.rs @@ -365,6 +365,7 @@ fn import_media_file( } if let Some((data, people)) = trakt_data { node.title = Some(data.title.clone()); + node.kind = NodeKind::Movie; // TODO if let Some(overview) = &data.overview { node.description = Some(overview.clone()) } diff --git a/server/src/routes/ui/node.rs b/server/src/routes/ui/node.rs index 63578be..7c89462 100644 --- a/server/src/routes/ui/node.rs +++ b/server/src/routes/ui/node.rs @@ -283,10 +283,12 @@ markup::define! { } pub fn aspect_class(kind: NodeKind) -> &'static str { + use NodeKind::*; match kind { - NodeKind::Video => "aspect-thumb", - NodeKind::Collection => "aspect-land", - NodeKind::Channel | NodeKind::Music | _ => "aspect-square", + Video | Episode => "aspect-thumb", + Collection => "aspect-land", + Season | Show | Series | Movie | ShortFormVideo => "aspect-port", + Channel | Music | Unknown => "aspect-square", } } -- cgit v1.2.3-70-g09d2