mirror of
https://github.com/lantean-code/qbtmud.git
synced 2025-10-23 16:14:11 +00:00
Merge pull request #8 from ehaughee/develop
Fix MaxRatio to allow float values
This commit is contained in:
@@ -92,7 +92,9 @@
|
|||||||
<FieldSwitch Label="When ratio reaches" Value="MaxRatioEnabled" ValueChanged="MaxRatioEnabledChanged" />
|
<FieldSwitch Label="When ratio reaches" Value="MaxRatioEnabled" ValueChanged="MaxRatioEnabledChanged" />
|
||||||
</MudItem>
|
</MudItem>
|
||||||
<MudItem xs="9">
|
<MudItem xs="9">
|
||||||
<MudNumericField T="int" Label="" Value="MaxRatio" ValueChanged="MaxRatioChanged" Disabled="@(!MaxRatioEnabled)" Min="0" Max="9998" Variant="Variant.Outlined" Validation="MaxRatioValidation" />
|
<MudNumericField T="float" Label="" Value="MaxRatio" ValueChanged="MaxRatioChanged"
|
||||||
|
Disabled="@(!MaxRatioEnabled)" Min="0" Max="9998" Variant="Variant.Outlined"
|
||||||
|
Validation="MaxRatioValidation" />
|
||||||
</MudItem>
|
</MudItem>
|
||||||
<MudItem xs="3">
|
<MudItem xs="3">
|
||||||
<FieldSwitch Label="When total seeding time reaches" Value="MaxSeedingTimeEnabled" ValueChanged="MaxSeedingTimeEnabledChanged" />
|
<FieldSwitch Label="When total seeding time reaches" Value="MaxSeedingTimeEnabled" ValueChanged="MaxSeedingTimeEnabledChanged" />
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
protected int SlowTorrentUlRateThreshold { get; private set; }
|
protected int SlowTorrentUlRateThreshold { get; private set; }
|
||||||
protected int SlowTorrentInactiveTimer { get; private set; }
|
protected int SlowTorrentInactiveTimer { get; private set; }
|
||||||
protected bool MaxRatioEnabled { 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 bool MaxSeedingTimeEnabled { get; private set; }
|
||||||
protected int MaxSeedingTime { get; private set; }
|
protected int MaxSeedingTime { get; private set; }
|
||||||
protected int MaxRatioAct { get; private set; }
|
protected int MaxRatioAct { get; private set; }
|
||||||
@@ -275,7 +275,7 @@
|
|||||||
await PreferencesChanged.InvokeAsync(UpdatePreferences);
|
await PreferencesChanged.InvokeAsync(UpdatePreferences);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task MaxRatioChanged(int value)
|
protected async Task MaxRatioChanged(float value)
|
||||||
{
|
{
|
||||||
MaxRatio = value;
|
MaxRatio = value;
|
||||||
UpdatePreferences.MaxRatio = value;
|
UpdatePreferences.MaxRatio = value;
|
||||||
|
@@ -112,7 +112,7 @@ namespace Lantean.QBitTorrentClient.Models
|
|||||||
int maxConnecPerTorrent,
|
int maxConnecPerTorrent,
|
||||||
int maxInactiveSeedingTime,
|
int maxInactiveSeedingTime,
|
||||||
bool maxInactiveSeedingTimeEnabled,
|
bool maxInactiveSeedingTimeEnabled,
|
||||||
int maxRatio,
|
float maxRatio,
|
||||||
int maxRatioAct,
|
int maxRatioAct,
|
||||||
bool maxRatioEnabled,
|
bool maxRatioEnabled,
|
||||||
int maxSeedingTime,
|
int maxSeedingTime,
|
||||||
@@ -745,7 +745,7 @@ namespace Lantean.QBitTorrentClient.Models
|
|||||||
public bool MaxInactiveSeedingTimeEnabled { get; }
|
public bool MaxInactiveSeedingTimeEnabled { get; }
|
||||||
|
|
||||||
[JsonPropertyName("max_ratio")]
|
[JsonPropertyName("max_ratio")]
|
||||||
public int MaxRatio { get; }
|
public float MaxRatio { get; }
|
||||||
|
|
||||||
[JsonPropertyName("max_ratio_act")]
|
[JsonPropertyName("max_ratio_act")]
|
||||||
public int MaxRatioAct { get; }
|
public int MaxRatioAct { get; }
|
||||||
|
@@ -323,7 +323,7 @@ namespace Lantean.QBitTorrentClient.Models
|
|||||||
public bool? MaxInactiveSeedingTimeEnabled { get; set; }
|
public bool? MaxInactiveSeedingTimeEnabled { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("max_ratio")]
|
[JsonPropertyName("max_ratio")]
|
||||||
public int? MaxRatio { get; set; }
|
public float? MaxRatio { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("max_ratio_act")]
|
[JsonPropertyName("max_ratio_act")]
|
||||||
public int? MaxRatioAct { get; set; }
|
public int? MaxRatioAct { get; set; }
|
||||||
|
@@ -68,11 +68,13 @@ cd qbtmud
|
|||||||
dotnet restore
|
dotnet restore
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. Build the Application
|
### 3. Build and Publish the Application
|
||||||
```sh
|
```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
|
### 4. Configure qBittorrent to Use qbtmud
|
||||||
Follow the same steps as in the **Installation** section to set qbtmud as your WebUI.
|
Follow the same steps as in the **Installation** section to set qbtmud as your WebUI.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user