mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Do not search for more than 99 images at a time
This commit is contained in:
@@ -43,7 +43,7 @@ pub async fn download_images_for_users<'b>(
|
||||
let shortcut_info = get_shortcuts_for_user(user);
|
||||
async move {
|
||||
let known_images = get_users_images(user).unwrap_or_default();
|
||||
let res = search_fo_to_download(
|
||||
let res = search_for_images_to_download(
|
||||
known_images,
|
||||
user.steam_user_data_folder.as_str(),
|
||||
&shortcut_info.shortcuts,
|
||||
@@ -113,7 +113,7 @@ pub struct PublicGameResponse {
|
||||
data: Option<PublicGameResponseData>,
|
||||
}
|
||||
|
||||
async fn search_fo_to_download(
|
||||
async fn search_for_images_to_download(
|
||||
known_images: Vec<String>,
|
||||
user_data_folder: &str,
|
||||
shortcuts: &[ShortcutOwned],
|
||||
@@ -196,6 +196,7 @@ async fn search_fo_to_download(
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for image_ids in image_ids.chunks(99){
|
||||
let image_search_result =
|
||||
get_images_for_ids(client, &image_ids, &image_type, download_animated).await;
|
||||
match image_search_result {
|
||||
@@ -229,6 +230,7 @@ async fn search_fo_to_download(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(to_download)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user