Skip to content

Commit

Permalink
fix: fix ios
Browse files Browse the repository at this point in the history
  • Loading branch information
lostb1t committed Oct 28, 2023
1 parent 92da44e commit 61597bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ pub enum Platform {
#[serde(rename = "iOS")]
#[strum(serialize = "iOS")]
Ios,
#[serde(rename = "tvOS")]
#[strum(serialize = "tvOS")]
TvOS,
Safari,
Chrome,
Roku,
Expand Down
10 changes: 10 additions & 0 deletions src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,8 @@ impl ClientHeroStyle {
}
}
Platform::Roku => ClientHeroStyle::roku(),
Platform::Ios => ClientHeroStyle::ios_style(),
Platform::TvOS => ClientHeroStyle::tvos_style(),
_ => {
ClientHeroStyle::default()
}
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 61597bc

Please sign in to comment.