Update torrent state to error when all files excluded by filters.

Only affects PM, TB and DL
This commit is contained in:
Cucumberrbob 2025-03-06 19:57:10 +00:00
parent 706be01a40
commit 1034f342ed
No known key found for this signature in database
GPG key ID: 2B935C47401C3614

View file

@ -242,6 +242,20 @@ public class Torrents(
return;
}
if (downloadLinks.Count == 0)
{
logger.LogInformation("All files excluded by filters (IncludeRegex: {includeRegex}, ExcludeRegex: {excludeRegex}, DownloadMinSize: {downloadMinSize} {torrentInfo}",
torrent.IncludeRegex,
torrent.ExcludeRegex,
torrent.DownloadMinSize,
torrent.ToLog());
await torrentData.UpdateRetry(torrentId, null, torrent.TorrentRetryAttempts);
await torrentData.UpdateComplete(torrentId, "All files excluded", DateTimeOffset.Now, false);
return;
}
foreach (var downloadLink in downloadLinks)
{
// Make sure downloads don't get added multiple times