From a90fd0fcb74b7849bcba92ac860626d536923441 Mon Sep 17 00:00:00 2001 From: Flaminel Date: Sun, 10 Nov 2024 19:44:22 +0200 Subject: [PATCH] moved series refresh at the end --- .../Verticals/BlockedTorrent/BlockedTorrentHandler.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/Infrastructure/Verticals/BlockedTorrent/BlockedTorrentHandler.cs b/code/Infrastructure/Verticals/BlockedTorrent/BlockedTorrentHandler.cs index 3940e9b..ca70605 100644 --- a/code/Infrastructure/Verticals/BlockedTorrent/BlockedTorrentHandler.cs +++ b/code/Infrastructure/Verticals/BlockedTorrent/BlockedTorrentHandler.cs @@ -64,11 +64,6 @@ public sealed class BlockedTorrentHandler await DeleteTorrentFromQueueAsync(sonarrInstance, record); } - - foreach (int id in seriesToBeRefreshed) - { - await RefreshSeriesAsync(sonarrInstance, id); - } if (queueResponse.Records.Count is 0) { @@ -89,6 +84,11 @@ public sealed class BlockedTorrentHandler page++; } while (processedRecords < totalRecords); + + foreach (int id in seriesToBeRefreshed) + { + await RefreshSeriesAsync(sonarrInstance, id); + } } }