From 3f5c99c30efabf29a77d8a62593851760bdd577b Mon Sep 17 00:00:00 2001 From: Philip Kristoffersen Date: Tue, 15 Mar 2022 22:16:13 +0100 Subject: [PATCH] Add support for WideGrid images (#45) --- src/steamgriddb/downloader.rs | 3 +++ src/steamgriddb/image_type.rs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/steamgriddb/downloader.rs b/src/steamgriddb/downloader.rs index a200911..985f3bb 100644 --- a/src/steamgriddb/downloader.rs +++ b/src/steamgriddb/downloader.rs @@ -86,6 +86,7 @@ async fn search_fo_to_download( let images = vec![ format!("{}_hero.png", s.app_id), format!("{}p.png", s.app_id), + format!("{}.png", s.app_id), format!("{}_logo.png", s.app_id), format!("{}_bigpicture.png", s.app_id), ]; @@ -118,6 +119,7 @@ async fn search_fo_to_download( ImageType::Logo, ImageType::Hero, ImageType::Grid, + ImageType::WideGrid, ImageType::BigPicture, ]; let mut to_download = vec![]; @@ -168,6 +170,7 @@ async fn search_fo_to_download( ImageType::Hero => Hero(Some(hero_parameters)), ImageType::BigPicture => Grid(Some(big_picture_parameters)), ImageType::Grid => Grid(Some(grid_parameters)), + ImageType::WideGrid => Grid(Some(big_picture_parameters)), ImageType::Logo => Logo(Some(logo_parameters)), }; diff --git a/src/steamgriddb/image_type.rs b/src/steamgriddb/image_type.rs index a5e790a..427ab78 100644 --- a/src/steamgriddb/image_type.rs +++ b/src/steamgriddb/image_type.rs @@ -2,6 +2,7 @@ pub enum ImageType { Hero, Grid, + WideGrid, Logo, BigPicture, } @@ -11,6 +12,7 @@ impl ImageType { match self { ImageType::Hero => format!("{}_hero.png", app_id), ImageType::Grid => format!("{}p.png", app_id), + ImageType::WideGrid => format!("{}.png", app_id), ImageType::Logo => format!("{}_logo.png", app_id), ImageType::BigPicture => format!("{}_bigpicture.png", app_id), }