diff --git a/src/models.rs b/src/models.rs index 586fb67..d219884 100644 --- a/src/models.rs +++ b/src/models.rs @@ -76,6 +76,9 @@ pub enum Platform { #[serde(rename = "iOS")] #[strum(serialize = "iOS")] Ios, + #[serde(rename = "tvOS")] + #[strum(serialize = "tvOS")] + TvOS, Safari, Chrome, Roku, diff --git a/src/transform.rs b/src/transform.rs index a26b854..1ba82f0 100644 --- a/src/transform.rs +++ b/src/transform.rs @@ -566,6 +566,8 @@ impl ClientHeroStyle { } } Platform::Roku => ClientHeroStyle::roku(), + Platform::Ios => ClientHeroStyle::ios_style(), + Platform::TvOS => ClientHeroStyle::tvos_style(), _ => { ClientHeroStyle::default() } @@ -607,6 +609,14 @@ impl ClientHeroStyle { } } + pub fn tvos_style() -> Self { + Self { + cover_art_as_art: true, + cover_art_as_thumb: false, // ios doesnt load the subview as hero. + ..ClientHeroStyle::default() + } + } + // pub fn for_client(platform: Platform, product: String, platform_version: String) -> Self { // match platform { // Platform::Android => PlatformHeroStyle::android(product, platform_version),