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">
<MudGrid>
<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="true">Automatic</MudSelectItem>
</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.
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 "∞";
}
@@ -419,4 +419,4 @@ namespace Lantean.QBTMud.Helpers
};
}
}
}
}

View File

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

View File

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