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
executable: Ginger.exe
type: default
"817628":
state: outdated
"817628": {}
"817630":
installDir: Island Tribe 3
launch:

View file

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