From bb90ce521666bedc449646f27f5492adcf879196 Mon Sep 17 00:00:00 2001 From: Eric Haughee Date: Sat, 20 Sep 2025 18:29:18 -0700 Subject: [PATCH] Fix MaxRatio to allow float values --- Lantean.QBTMud/Components/Options/BitTorrentOptions.razor | 4 +++- .../Components/Options/BitTorrentOptions.razor.cs | 4 ++-- Lantean.QBitTorrentClient/Models/Preferences.cs | 4 ++-- Lantean.QBitTorrentClient/Models/UpdatePreferences.cs | 2 +- readme.md | 6 ++++-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Lantean.QBTMud/Components/Options/BitTorrentOptions.razor b/Lantean.QBTMud/Components/Options/BitTorrentOptions.razor index 0a1e2e8..0db9bb9 100644 --- a/Lantean.QBTMud/Components/Options/BitTorrentOptions.razor +++ b/Lantean.QBTMud/Components/Options/BitTorrentOptions.razor @@ -92,7 +92,9 @@ - + diff --git a/Lantean.QBTMud/Components/Options/BitTorrentOptions.razor.cs b/Lantean.QBTMud/Components/Options/BitTorrentOptions.razor.cs index cbd2816..a2d6856 100644 --- a/Lantean.QBTMud/Components/Options/BitTorrentOptions.razor.cs +++ b/Lantean.QBTMud/Components/Options/BitTorrentOptions.razor.cs @@ -17,7 +17,7 @@ protected int SlowTorrentUlRateThreshold { get; private set; } protected int SlowTorrentInactiveTimer { get; private set; } protected bool MaxRatioEnabled { get; private set; } - protected int MaxRatio { get; private set; } + protected float MaxRatio { get; private set; } protected bool MaxSeedingTimeEnabled { get; private set; } protected int MaxSeedingTime { get; private set; } protected int MaxRatioAct { get; private set; } @@ -275,7 +275,7 @@ await PreferencesChanged.InvokeAsync(UpdatePreferences); } - protected async Task MaxRatioChanged(int value) + protected async Task MaxRatioChanged(float value) { MaxRatio = value; UpdatePreferences.MaxRatio = value; diff --git a/Lantean.QBitTorrentClient/Models/Preferences.cs b/Lantean.QBitTorrentClient/Models/Preferences.cs index 860ff36..555c477 100644 --- a/Lantean.QBitTorrentClient/Models/Preferences.cs +++ b/Lantean.QBitTorrentClient/Models/Preferences.cs @@ -112,7 +112,7 @@ namespace Lantean.QBitTorrentClient.Models int maxConnecPerTorrent, int maxInactiveSeedingTime, bool maxInactiveSeedingTimeEnabled, - int maxRatio, + float maxRatio, int maxRatioAct, bool maxRatioEnabled, int maxSeedingTime, @@ -745,7 +745,7 @@ namespace Lantean.QBitTorrentClient.Models public bool MaxInactiveSeedingTimeEnabled { get; } [JsonPropertyName("max_ratio")] - public int MaxRatio { get; } + public float MaxRatio { get; } [JsonPropertyName("max_ratio_act")] public int MaxRatioAct { get; } diff --git a/Lantean.QBitTorrentClient/Models/UpdatePreferences.cs b/Lantean.QBitTorrentClient/Models/UpdatePreferences.cs index a6ffef0..9423d28 100644 --- a/Lantean.QBitTorrentClient/Models/UpdatePreferences.cs +++ b/Lantean.QBitTorrentClient/Models/UpdatePreferences.cs @@ -323,7 +323,7 @@ namespace Lantean.QBitTorrentClient.Models public bool? MaxInactiveSeedingTimeEnabled { get; set; } [JsonPropertyName("max_ratio")] - public int? MaxRatio { get; set; } + public float? MaxRatio { get; set; } [JsonPropertyName("max_ratio_act")] public int? MaxRatioAct { get; set; } diff --git a/readme.md b/readme.md index ef09366..cbdd967 100644 --- a/readme.md +++ b/readme.md @@ -68,11 +68,13 @@ cd qbtmud dotnet restore ``` -### 3. Build the Application +### 3. Build and Publish the Application ```sh -dotnet build --configuration Release +dotnet publish --configuration Release ``` +This will output the Web UI files to `Lantean.QBTMud\bin\Release\net9.0\publish\wwwroot`. + ### 4. Configure qBittorrent to Use qbtmud Follow the same steps as in the **Installation** section to set qbtmud as your WebUI.