diff --git a/Makefile b/Makefile index e484a1d..d86f6c2 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ run: REPLEX_ENABLE_CONSOLE=0 \ REPLEX_CACHE_TTL=0 \ RUST_LOG="info,replex=debug" \ - cargo watch -x run + cargo run fix: cargo fix diff --git a/src/models.rs b/src/models.rs index d4cd4af..ea5c766 100644 --- a/src/models.rs +++ b/src/models.rs @@ -943,6 +943,9 @@ pub struct MetaData { #[yaserde(attribute)] #[serde(skip_serializing_if = "Option::is_none")] pub composite: Option, + #[yaserde(attribute, rename = "playlistType")] + #[serde(skip_serializing_if = "Option::is_none")] + pub playlist_type: Option, #[yaserde(attribute)] #[serde(skip_serializing_if = "Option::is_none")] pub banner: Option, @@ -1327,6 +1330,15 @@ impl MetaData { self.hub_identifier.is_some() } + pub fn is_playlist(&self) -> bool { + self.context.is_some() + && self + .context + .clone() + .unwrap() + .starts_with("hub.home.playlists") + } + pub fn is_media(&self) -> bool { !self.is_hub() && (self.r#type == "movie" || self.r#type == "show") } diff --git a/src/transform.rs b/src/transform.rs index 64e42c0..11c50f0 100644 --- a/src/transform.rs +++ b/src/transform.rs @@ -550,7 +550,7 @@ impl ClientHeroStyle { Self { style: Some("hero".to_string()), // clip wil make the item info disappear on TV - r#type: "mixed".to_string(), + r#type: "clip".to_string(), // using clip makes it load thumbs instead of art as cover art. So we don't have to touch the background child_type: Some("clip".to_string()), cover_art_as_art: false, @@ -893,10 +893,7 @@ impl Transform for HubKeyTransform { plex_client: PlexClient, options: PlexContext, ) { - // if item.is_hub() { - // dbg!(&item.key); - // } - // let key = item.key.clone().unwrap(); + if item.is_hub() && item.key.is_some() && !item.key.clone().unwrap().starts_with("/replex")