mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Fix icon overwrite (#128)
* run sync twive to fix up images * Update dependencies versions * update cargo-lock dependencies * Adding spinners to ui * Fix icons for gog games * Run fix shortcuts for all boilr shortcuts * Update flatpak release notes
This commit is contained in:
@@ -142,20 +142,15 @@ fn fix_shortcut_icons(
|
||||
|
||||
for shortcut in shortcuts {
|
||||
if shortcut.is_boilr_shortcut() {
|
||||
let replace_icon = shortcut.icon.trim().eq("")
|
||||
|| !Path::new(shortcut.icon.trim()).exists()
|
||||
|| shortcut.icon.eq(&shortcut.exe);
|
||||
if replace_icon {
|
||||
let app_id = steam_shortcuts_util::app_id_generator::calculate_app_id(
|
||||
&shortcut.exe,
|
||||
&shortcut.app_name,
|
||||
);
|
||||
for ext in ["ico", "png", "jpg", "webp"] {
|
||||
let path = image_folder.join(image_type.file_name(app_id, ext));
|
||||
if path.exists() {
|
||||
shortcut.icon = path.to_string_lossy().to_string();
|
||||
break;
|
||||
}
|
||||
let app_id = steam_shortcuts_util::app_id_generator::calculate_app_id(
|
||||
&shortcut.exe,
|
||||
&shortcut.app_name,
|
||||
);
|
||||
for ext in ["ico", "png", "jpg", "webp"] {
|
||||
let path = image_folder.join(image_type.file_name(app_id, ext));
|
||||
if path.exists() {
|
||||
shortcut.icon = path.to_string_lossy().to_string();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user