Initial GOG integration

This commit is contained in:
Philip
2021-10-04 22:43:38 +02:00
parent 642dd15ff4
commit ef0bca983c
8 changed files with 274 additions and 2 deletions
+10
View File
@@ -1,11 +1,13 @@
use crate::{
itch::ItchPlatform,
origin::OriginPlatform,
gog::GogPlatform,
steamgriddb::{download_images, CachedSearch},
};
#[cfg(feature = "ui")]
use std::{cell::RefCell, rc::Rc};
use std::{fs::File, io::Write, path::Path};
mod gog;
mod egs;
mod itch;
mod legendary;
@@ -221,6 +223,14 @@ async fn run_sync(settings: &Settings) -> Result<(), Box<dyn Error>> {
&mut new_user_shortcuts,
);
update_platform_shortcuts(
&GogPlatform{
settings: settings.gog.clone(),
},
&mut new_user_shortcuts,
);
let shortcuts = new_user_shortcuts.iter().map(|f| f.borrow()).collect();
save_shortcuts(&shortcuts, Path::new(&shortcut_info.path));