Merge pull request #794 from Cucumberrbob/fix/debrid-queue
Debrid Queue fixes (don't auto delete queued torrents, handle errors when dequeueing)
This commit is contained in:
commit
fa499395bd
2 changed files with 10 additions and 2 deletions
|
|
@ -333,7 +333,15 @@ public class TorrentRunner(ILogger<TorrentRunner> logger, Torrents torrents, Dow
|
|||
|
||||
foreach (var torrent in torrentsToAddToProvider.Take(dequeueCount))
|
||||
{
|
||||
await torrents.DequeueFromDebridQueue(torrent);
|
||||
try
|
||||
{
|
||||
await torrents.DequeueFromDebridQueue(torrent);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await torrents.UpdateComplete(torrent.TorrentId, $"Could not add to provider: {ex.Message}", DateTimeOffset.Now, true);
|
||||
logger.LogWarning(ex, "Could not dequeue torrent {torrentId}", torrent.TorrentId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -523,7 +523,7 @@ public class Torrents(
|
|||
{
|
||||
var rdTorrent = rdTorrents.FirstOrDefault(m => m.Id == torrent.RdId);
|
||||
|
||||
if (rdTorrent == null && Settings.Get.Provider.AutoDelete)
|
||||
if (rdTorrent == null && Settings.Get.Provider.AutoDelete && torrent.RdStatus != TorrentStatus.Queued)
|
||||
{
|
||||
await Delete(torrent.TorrentId, true, false, true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue