mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Fix shortcuts by using acutal shortcut app_id (#245)
This commit is contained in:
@@ -178,21 +178,17 @@ fn fix_shortcut_icons(
|
|||||||
};
|
};
|
||||||
|
|
||||||
for shortcut in shortcuts {
|
for shortcut in shortcuts {
|
||||||
if shortcut.is_boilr_shortcut() {
|
let app_id = shortcut.app_id;
|
||||||
let app_id = steam_shortcuts_util::app_id_generator::calculate_app_id(
|
let icon_exsists = Path::new(&shortcut.icon).exists() && !shortcut.icon.is_empty();
|
||||||
&shortcut.exe,
|
|
||||||
&shortcut.app_name,
|
|
||||||
);
|
|
||||||
for ext in ["ico", "png", "jpg", "webp"] {
|
for ext in ["ico", "png", "jpg", "webp"] {
|
||||||
let path = image_folder.join(image_type.file_name(app_id, ext));
|
let path = image_folder.join(image_type.file_name(app_id, ext));
|
||||||
if path.exists() {
|
if !icon_exsists && path.exists() {
|
||||||
shortcut.icon = format!("\"{}\"", path.to_string_lossy().to_string());
|
shortcut.icon = format!("\"{}\"", path.to_string_lossy().to_string());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fn write_shortcut_collections<S: AsRef<str>>(
|
fn write_shortcut_collections<S: AsRef<str>>(
|
||||||
steam_id: S,
|
steam_id: S,
|
||||||
|
|||||||
Reference in New Issue
Block a user