diff --git a/server/RdtClient.Service/Services/TorrentRunner.cs b/server/RdtClient.Service/Services/TorrentRunner.cs index 555e49f..ea828f9 100644 --- a/server/RdtClient.Service/Services/TorrentRunner.cs +++ b/server/RdtClient.Service/Services/TorrentRunner.cs @@ -333,7 +333,15 @@ public class TorrentRunner(ILogger 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); + } } } diff --git a/server/RdtClient.Service/Services/Torrents.cs b/server/RdtClient.Service/Services/Torrents.cs index 96ac155..94d12f2 100644 --- a/server/RdtClient.Service/Services/Torrents.cs +++ b/server/RdtClient.Service/Services/Torrents.cs @@ -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); }