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.*"
|
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"]
|
||||||
@@ -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,4 +1,5 @@
|
|||||||
|
|
||||||
|
#[derive(Debug,Clone,Copy)]
|
||||||
pub enum ImageType {
|
pub enum ImageType {
|
||||||
Hero,
|
Hero,
|
||||||
Grid,
|
Grid,
|
||||||
|
|||||||
Reference in New Issue
Block a user