Fix minor display issues

This commit is contained in:
ahjephson
2025-10-18 16:01:53 +01:00
parent 8796cc0f24
commit 7370d73c59
4 changed files with 11 additions and 12 deletions

View File

@@ -62,7 +62,7 @@
<MudCardContent Class="pt-0"> <MudCardContent Class="pt-0">
<MudGrid> <MudGrid>
<MudItem xs="12"> <MudItem xs="12">
<MudSelect T="bool" Label="Default Torrent Management Mode" Value="AutoTmmEnabled" ValueChanged="AutoDeleteModeChanged" Variant="Variant.Outlined"> <MudSelect T="bool" Label="Default Torrent Management Mode" Value="AutoTmmEnabled" ValueChanged="AutoTmmEnabledChanged" Variant="Variant.Outlined">
<MudSelectItem Value="false">Manual</MudSelectItem> <MudSelectItem Value="false">Manual</MudSelectItem>
<MudSelectItem Value="true">Automatic</MudSelectItem> <MudSelectItem Value="true">Automatic</MudSelectItem>
</MudSelect> </MudSelect>

View File

@@ -25,7 +25,7 @@ namespace Lantean.QBTMud.Helpers
const long InfiniteEtaSentinelSeconds = 8_640_000; // ~100 days, used by qBittorrent for "infinite" ETA. const long InfiniteEtaSentinelSeconds = 8_640_000; // ~100 days, used by qBittorrent for "infinite" ETA.
var value = seconds.Value; var value = seconds.Value;
if (value >= long.MaxValue || value >= (long)TimeSpan.MaxValue.TotalSeconds || value == InfiniteEtaSentinelSeconds) if (value >= long.MaxValue || value >= TimeSpan.MaxValue.TotalSeconds || value == InfiniteEtaSentinelSeconds)
{ {
return "∞"; return "∞";
} }

View File

@@ -207,7 +207,7 @@ namespace Lantean.QBTMud.Helpers
break; break;
case Status.Paused: case Status.Paused:
if (!state.Contains("paused") || !state.Contains("stopped")) if (!state.Contains("paused") && !state.Contains("stopped"))
{ {
return false; return false;
} }

View File

@@ -220,12 +220,11 @@ namespace Lantean.QBTMud.Services
} }
torrentList.Tags.Add(normalizedTag); torrentList.Tags.Add(normalizedTag);
if (!torrentList.TagState.ContainsKey(normalizedTag)) var matchingHashes = torrentList.Torrents
{ .Where(pair => FilterHelper.FilterTag(pair.Value, normalizedTag))
torrentList.TagState[normalizedTag] = torrentList.Torrents.Values .Select(pair => pair.Key)
.Where(t => FilterHelper.FilterTag(t, normalizedTag)) .ToHashSet();
.ToHashesHashSet(); torrentList.TagState[normalizedTag] = matchingHashes;
}
} }
} }