Refactor downloadi mages

This commit is contained in:
Philip Kristoffersen
2021-10-06 22:34:42 +02:00
parent 6124ee426d
commit 1ba24183c3
3 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -19,11 +19,11 @@ nom = "^7.0.*"
nom_locate = "^3.0.*" nom_locate = "^3.0.*"
flate2 = "^1.0.22" flate2 = "^1.0.22"
toml = { version = "^0.5.8", optional = true } toml = { version = "^0.5.8", optional = true }
futures = { version = "*", optional = true } futures = { version = "^0.3.17" }
[build-dependencies] [build-dependencies]
fl2rust = { version = "0.4", optional = true } fl2rust = { version = "0.4", optional = true }
[features] [features]
# default = ["ui"] # default = ["ui"]
ui = ["fltk", "fl2rust", "toml", "futures"] ui = ["fltk", "fl2rust", "toml"]
+4 -4
View File
@@ -47,11 +47,11 @@ pub async fn download_images<'b>(
.filter_map(|s| search_results.get(&s.app_id)) .filter_map(|s| search_results.get(&s.app_id))
.map(|search| *search) .map(|search| *search)
.collect(); .collect();
use steamgriddb_api::query_parameters::QueryType::*;
let query_type = match image_type { let query_type = match image_type {
ImageType::Hero => steamgriddb_api::query_parameters::QueryType::Hero(None), ImageType::Hero => Hero(None),
ImageType::Grid => steamgriddb_api::query_parameters::QueryType::Grid(None), ImageType::Grid => Grid(None),
ImageType::Logo => steamgriddb_api::query_parameters::QueryType::Logo(None), ImageType::Logo => Logo(None),
}; };
match client match client
+1
View File
@@ -1,4 +1,5 @@
#[derive(Debug,Clone,Copy)]
pub enum ImageType { pub enum ImageType {
Hero, Hero,
Grid, Grid,