From fa44de0c8d1ac11b9925581497912d3cf74a0c47 Mon Sep 17 00:00:00 2001 From: glax Date: Sat, 20 May 2023 14:18:17 +0200 Subject: [PATCH] Moved _chapterCollection initialization --- Tranga/TaskManager.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Tranga/TaskManager.cs b/Tranga/TaskManager.cs index 06128b6..8efd325 100644 --- a/Tranga/TaskManager.cs +++ b/Tranga/TaskManager.cs @@ -9,7 +9,7 @@ namespace Tranga; /// public class TaskManager { - private readonly Dictionary> _chapterCollection; + private readonly Dictionary> _chapterCollection = new(); private readonly HashSet _allTasks; private bool _continueRunning = true; private readonly Connector[] _connectors; @@ -26,7 +26,6 @@ public class TaskManager if (komgaBaseUrl != null && komgaUsername != null && komgaPassword != null) this.komga = new Komga(komgaBaseUrl, komgaUsername, komgaPassword); this._connectors = new Connector[]{ new MangaDex(folderPath) }; - _chapterCollection = new(); _allTasks = new HashSet(); Thread taskChecker = new(TaskCheckerThread); @@ -36,7 +35,6 @@ public class TaskManager public TaskManager(SettingsData settings) { this._connectors = new Connector[]{ new MangaDex(settings.downloadLocation) }; - _chapterCollection = new(); this.downloadLocation = settings.downloadLocation; this.komga = settings.komga; _allTasks = settings.allTasks;