Initial parser for butlerdb

This commit is contained in:
Philip Kristoffersen
2021-09-29 21:40:35 +02:00
parent 1f66856e46
commit 750379202e
11 changed files with 236 additions and 10 deletions
+10 -1
View File
@@ -1,6 +1,10 @@
use crate::steamgriddb::{download_images, CachedSearch};
use crate::{
itch::ItchPlatform,
steamgriddb::{download_images, CachedSearch},
};
use std::{fs::File, io::Write, path::Path};
mod egs;
mod itch;
mod legendary;
mod platform;
mod settings;
@@ -84,6 +88,11 @@ async fn run_sync() -> Result<(), Box<dyn Error>> {
&mut new_user_shortcuts,
);
update_platform_shortcuts(
&ItchPlatform::new(settings.itch.clone()),
&mut new_user_shortcuts,
);
let shortcuts = new_user_shortcuts.iter().map(|f| f.borrow()).collect();
save_shortcuts(&shortcuts, Path::new(&shortcut_info.path));