Don't keep retrying Steam IDs that didn't yield any info

This commit is contained in:
mtkennerly 2023-12-02 00:16:51 +08:00
parent ed4a1a0287
commit c08436225e
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408
2 changed files with 9 additions and 7 deletions

View file

@ -370876,8 +370876,7 @@
oslist: windows oslist: windows
executable: Ginger.exe executable: Ginger.exe
type: default type: default
"817628": "817628": {}
state: outdated
"817630": "817630":
installDir: Island Tribe 3 installDir: Island Tribe 3
launch: launch:

View file

@ -23,10 +23,14 @@ impl SteamCache {
}); });
for app_id in app_ids { for app_id in app_ids {
let Some(latest) = SteamCacheEntry::fetch_from_id(app_id)? else { let latest = SteamCacheEntry::fetch_from_id(app_id)?;
continue; self.0.insert(
}; app_id.to_string(),
self.0.insert(app_id.to_string(), latest); latest.unwrap_or_else(|| SteamCacheEntry {
state: State::Handled,
..Default::default()
}),
);
i += 1; i += 1;
if i % SAVE_INTERVAL == 0 { if i % SAVE_INTERVAL == 0 {
@ -122,7 +126,6 @@ mod product_info {
use super::*; use super::*;
#[derive(Debug, Default, Clone, serde::Deserialize)] #[derive(Debug, Default, Clone, serde::Deserialize)]
#[serde(default)]
pub struct Response { pub struct Response {
pub apps: BTreeMap<String, App>, pub apps: BTreeMap<String, App>,
} }