Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/.vscode/
src/.vscode/
*.code-workspace
"UniGetUI Store.exe"
UniGetUI Store Installer.exe
UniGetUI Installer.exe
Expand Down
4 changes: 2 additions & 2 deletions UniGetUI.iss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
UninstallDisplayName="UniGetUI"
UninstallDisplayName="UniGetUI (PreRelease)"
AppId={{889610CC-4337-4BDB-AC3B-4F21806C0BDE}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
Expand All @@ -23,7 +23,7 @@ AppPublisher={#MyAppPublisher}
AppPublisherURL="https://www.marticliment.com/unigetui/"
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
VersionInfoVersion=3.3.7.0
VersionInfoVersion=3.3.7.1
DefaultDirName="{autopf64}\UniGetUI"
DisableProgramGroupPage=yes
DisableDirPage=no
Expand Down
2 changes: 1 addition & 1 deletion scripts/BuildNumber
Original file line number Diff line number Diff line change
@@ -1 +1 @@
106
114
4 changes: 2 additions & 2 deletions src/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[assembly: AssemblyTitle("UniGetUI")]
[assembly: AssemblyDefaultAlias("UniGetUI")]
[assembly: AssemblyCopyright("2025, Martí Climent")]
[assembly: AssemblyVersion("3.3.7.0")]
[assembly: AssemblyFileVersion("3.3.7.0")]
[assembly: AssemblyVersion("3.3.7.1")]
[assembly: AssemblyFileVersion("3.3.7.1")]
[assembly: AssemblyInformationalVersion("3.3.7")]
[assembly: SupportedOSPlatform("windows10.0.19041")]
2 changes: 1 addition & 1 deletion src/UniGetUI.Core.Data/CoreData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public static class CoreData
private static int? __code_page;
public static int CODE_PAGE { get => __code_page ??= GetCodePage(); }
public const string VersionName = "3.3.7"; // Do not modify this line, use file scripts/apply_versions.py
public const int BuildNumber = 106; // Do not modify this line, use file scripts/apply_versions.py
public const int BuildNumber = 114; // Do not modify this line, use file scripts/apply_versions.py

public const string UserAgentString = $"UniGetUI/{VersionName} (https://marticliment.com/unigetui/; contact@marticliment.com)";

Expand Down
26 changes: 24 additions & 2 deletions src/UniGetUI.Core.IconStore/IconCacheEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,20 @@ cachedIconFile is not null &&
using HttpClient client = new(CoreTools.GenericHttpClientParameters);
client.DefaultRequestHeaders.UserAgent.ParseAdd(CoreData.UserAgentString);

HttpResponseMessage response = client.GetAsync(icon.Url).GetAwaiter().GetResult();
using HttpResponseMessage response = client.GetAsync(icon.Url, HttpCompletionOption.ResponseHeadersRead).GetAwaiter().GetResult();
if (!response.IsSuccessStatusCode)
{
Logger.Warn($"Icon download attempt at {icon.Url} failed with code {response.StatusCode}");
return null;
}

string mimeType = response.Content.Headers.GetValues("Content-Type").First();
string? mimeType = response.Content.Headers.ContentType?.MediaType;
if (string.IsNullOrWhiteSpace(mimeType))
{
Logger.Warn($"No Content-Type was returned for icon {icon.Url}, aborting download");
return null;
}

if (!MimeToExtension.TryGetValue(mimeType, out string? extension))
{
Logger.Warn($"Unknown mimetype {mimeType} for icon {icon.Url}, aborting download");
Expand Down Expand Up @@ -243,6 +249,22 @@ cachedIconFile is not null &&
DeteteCachedFiles(iconLocation);
return null;
}
catch (HttpRequestException ex)
{
string socketData = "";
if (ex.InnerException is IOException ioEx && ioEx.InnerException is System.Net.Sockets.SocketException socketEx)
{
socketData = $" [SocketErrorCode={socketEx.SocketErrorCode}, NativeError={socketEx.NativeErrorCode}]";
}

Logger.Warn($"Failed to download icon from {icon.Url}: {ex.Message}{socketData}");
return null;
}
catch (IOException ex)
{
Logger.Warn($"I/O error while saving icon from {icon.Url}: {ex.Message}");
return null;
}
catch (Exception ex)
{
Logger.Error(ex);
Expand Down
2 changes: 2 additions & 0 deletions src/UniGetUI.Core.Settings/SettingsEngine_Names.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public enum K
KillProcessesThatRefuseToDie,
ManagerPaths,
GitHubUserLogin,
GitHubCliTrackedRepositories,
DisableNewProcessLineHandler,
InstallInstalledPackagesBundlesPage,
ProhibitElevation,
Expand Down Expand Up @@ -175,6 +176,7 @@ public static string ResolveKey(K key)
K.KillProcessesThatRefuseToDie => "KillProcessesThatRefuseToDie",
K.ManagerPaths => "ManagerPaths",
K.GitHubUserLogin => "GitHubUserLogin",
K.GitHubCliTrackedRepositories => "GitHubCliTrackedRepositories",
K.DisableNewProcessLineHandler => "DisableNewProcessLineHandler",
K.InstallInstalledPackagesBundlesPage => "InstallInstalledPackagesBundlesPage",
K.ProhibitElevation => "ProhibitElevation",
Expand Down
Loading