mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Refactor downloadi mages
This commit is contained in:
+2
-2
@@ -19,11 +19,11 @@ nom = "^7.0.*"
|
||||
nom_locate = "^3.0.*"
|
||||
flate2 = "^1.0.22"
|
||||
toml = { version = "^0.5.8", optional = true }
|
||||
futures = { version = "*", optional = true }
|
||||
futures = { version = "^0.3.17" }
|
||||
|
||||
[build-dependencies]
|
||||
fl2rust = { version = "0.4", optional = true }
|
||||
|
||||
[features]
|
||||
# default = ["ui"]
|
||||
ui = ["fltk", "fl2rust", "toml", "futures"]
|
||||
ui = ["fltk", "fl2rust", "toml"]
|
||||
@@ -47,11 +47,11 @@ pub async fn download_images<'b>(
|
||||
.filter_map(|s| search_results.get(&s.app_id))
|
||||
.map(|search| *search)
|
||||
.collect();
|
||||
|
||||
use steamgriddb_api::query_parameters::QueryType::*;
|
||||
let query_type = match image_type {
|
||||
ImageType::Hero => steamgriddb_api::query_parameters::QueryType::Hero(None),
|
||||
ImageType::Grid => steamgriddb_api::query_parameters::QueryType::Grid(None),
|
||||
ImageType::Logo => steamgriddb_api::query_parameters::QueryType::Logo(None),
|
||||
ImageType::Hero => Hero(None),
|
||||
ImageType::Grid => Grid(None),
|
||||
ImageType::Logo => Logo(None),
|
||||
};
|
||||
|
||||
match client
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
#[derive(Debug,Clone,Copy)]
|
||||
pub enum ImageType {
|
||||
Hero,
|
||||
Grid,
|
||||
|
||||
Reference in New Issue
Block a user