Skip to content

Commit

Permalink
v1.4.2.0 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
amakvana committed Feb 18, 2024
1 parent 5649df1 commit 4c3b78d
Show file tree
Hide file tree
Showing 28 changed files with 1,386 additions and 1,447 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ All notable changes to this project will be documented in this file.

<br>

## [1.4.2.0] - 2024-02-18

### Added

- YuzuModDownloader now skips downloading a particular mod if it cannot connect to the remote server

### Changed

- Improved `theboy181` download server choice performance
- Upgraded all project packages to their latest versions for even better performance
- Rewrote several classes & methods for improved performance
- Removed redundant code & shrunk overall codebase
- Small rewrite of `AppUpdater.cs` to improve startup performance
- Optimised several methods further to utilise await/async and increase performance

### Fixed

- Crashing when download URL host times out - thanks [@brolio](https://github.com/amakvana/YuzuModDownloader/issues/37)

<br>

## [1.4.1.0] - 2024-02-07

### Added
Expand Down
107 changes: 0 additions & 107 deletions source/YuzuModDownloader/AboutWindow.axaml.cs

This file was deleted.

76 changes: 36 additions & 40 deletions source/YuzuModDownloader/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,47 @@
using Avalonia.Markup.Xaml;
using Microsoft.Extensions.DependencyInjection;

namespace YuzuModDownloader
namespace YuzuModDownloader;

public partial class App : Application
{
public partial class App : Application
public override void Initialize() => AvaloniaXamlLoader.Load(this);

public override void OnFrameworkInitializationCompleted()
{
public override void Initialize()
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
AvaloniaXamlLoader.Load(this);
}
// prepare HttpClient for Dependency injection throughout application
var services = new ServiceCollection();
services.AddHttpClient();

public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
services.AddHttpClient("GitHub-YuzuModDownloader", client =>
{
client.BaseAddress = new Uri("https://raw.githubusercontent.com/amakvana/YuzuModDownloader/main/");
client.DefaultRequestHeaders.Add("accept", "application/vnd.github.raw");
client.DefaultRequestHeaders.Add("user-agent", "request");
//client.Timeout = TimeSpan.FromMinutes(5);
});

services.AddHttpClient("GitHub-OfficialSwitchMods", client =>
{
client.BaseAddress = new Uri("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods/");
client.DefaultRequestHeaders.Add("user-agent", "request");
//client.Timeout = TimeSpan.FromMinutes(5);
});

services.AddHttpClient("GitHub-Api", client =>
{
// prepare HttpClient for Dependency injection throughout application
var services = new ServiceCollection();
services.AddHttpClient();

services.AddHttpClient("GitHub-YuzuModDownloader", client =>
{
client.BaseAddress = new Uri("https://raw.githubusercontent.com/amakvana/YuzuModDownloader/main/");
client.DefaultRequestHeaders.Add("accept", "application/vnd.github.raw");
client.DefaultRequestHeaders.Add("user-agent", "request");
//client.Timeout = TimeSpan.FromMinutes(5);
});

services.AddHttpClient("GitHub-OfficialSwitchMods", client =>
{
client.BaseAddress = new Uri("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods/");
client.DefaultRequestHeaders.Add("user-agent", "request");
//client.Timeout = TimeSpan.FromMinutes(5);
});

services.AddHttpClient("GitHub-Api", client =>
{
client.BaseAddress = new Uri("https://api.github.com/");
client.DefaultRequestHeaders.Add("accept", "application/vnd.github+json");
client.DefaultRequestHeaders.Add("user-agent", "request");
//client.Timeout = TimeSpan.FromMinutes(5);
});

var serviceProvider = services.BuildServiceProvider();
desktop.MainWindow = new MainWindow(serviceProvider);
}

base.OnFrameworkInitializationCompleted();
client.BaseAddress = new Uri("https://api.github.com/");
client.DefaultRequestHeaders.Add("accept", "application/vnd.github+json");
client.DefaultRequestHeaders.Add("user-agent", "request");
//client.Timeout = TimeSpan.FromMinutes(5);
});

var serviceProvider = services.BuildServiceProvider();
desktop.MainWindow = new MainWindow(serviceProvider);
}

base.OnFrameworkInitializationCompleted();
}
}
Loading

0 comments on commit 4c3b78d

Please sign in to comment.