diff --git a/src/UniGetUI.PackageEngine.Package/Package.cs b/src/UniGetUI.PackageEngine.Package/Package.cs index 6812ef7d5..bcdc7798a 100644 --- a/src/UniGetUI.PackageEngine.Package/Package.cs +++ b/src/UniGetUI.PackageEngine.Package/Package.cs @@ -197,6 +197,8 @@ public string GetIconId() iconId = iconId.Replace(".install", "").Replace(".portable", ""); else if (Manager.Name == "Scoop") iconId = iconId.Replace(".app", ""); + else if (Manager.Name == "vcpkg") + iconId = iconId.split(":")[0].Split("[")[0]; return iconId; } diff --git a/src/UniGetUI.PackageEngine.PackageManagerClasses/Packages/Package.cs b/src/UniGetUI.PackageEngine.PackageManagerClasses/Packages/Package.cs index b8fd0f5f7..5d212a637 100644 --- a/src/UniGetUI.PackageEngine.PackageManagerClasses/Packages/Package.cs +++ b/src/UniGetUI.PackageEngine.PackageManagerClasses/Packages/Package.cs @@ -103,6 +103,7 @@ public Package( "Winget" => string.Join('.', id.ToLower().Split(".")[1..]), "Scoop" => id.ToLower().Replace(".app", ""), "Chocolatey" => id.ToLower().Replace(".install", "").Replace(".portable", ""), + "vcpkg" => id.ToLower().Split(":")[0].Split("[")[0], _ => id.ToLower() }; } @@ -173,7 +174,7 @@ public virtual Uri GetIconUrl() try { CacheableIcon? icon = TaskRecycler.RunOrAttach(Manager.DetailsHelper.GetIcon, this); - string? path = IconCacheEngine.GetCacheOrDownloadIcon(icon, Manager.Name, Id); + string? path = IconCacheEngine.GetCacheOrDownloadIcon(icon, Manager.Name, _iconId); return path is null? null: new Uri("file:///" + path); } catch (Exception ex)