diff --git a/Tranga/Connector.cs b/Tranga/Connector.cs
index cc60293..a3913fd 100644
--- a/Tranga/Connector.cs
+++ b/Tranga/Connector.cs
@@ -1,5 +1,4 @@
using System.IO.Compression;
-using System.Net;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Xml.Linq;
@@ -20,7 +19,7 @@ public abstract class Connector
protected readonly Logger? logger;
- protected readonly string imageCachePath;
+ private readonly string _imageCachePath;
protected Connector(string downloadLocation, string imageCachePath, Logger? logger)
{
@@ -30,9 +29,9 @@ public abstract class Connector
{
//RequestTypes for RateLimits
}, logger);
- this.imageCachePath = imageCachePath;
+ this._imageCachePath = imageCachePath;
if (!Directory.Exists(imageCachePath))
- Directory.CreateDirectory(this.imageCachePath);
+ Directory.CreateDirectory(this._imageCachePath);
}
public abstract string name { get; } //Name of the Connector (e.g. Website)
@@ -233,6 +232,7 @@ public abstract class Connector
/// Path of the generate Chapter ComicInfo.xml, if it was generated
/// RequestType for RateLimits
/// Used in http request header
+ ///
protected bool DownloadChapterImages(string[] imageUrls, string saveArchiveFilePath, byte requestType, DownloadChapterTask parentTask, string? comicInfoPath = null, string? referrer = null, CancellationToken? cancellationToken = null)
{
if (cancellationToken?.IsCancellationRequested??false)
@@ -279,7 +279,7 @@ public abstract class Connector
{
string[] split = url.Split('/');
string filename = split[^1];
- string saveImagePath = Path.Join(imageCachePath, filename);
+ string saveImagePath = Path.Join(_imageCachePath, filename);
if (File.Exists(saveImagePath))
return filename;
@@ -301,7 +301,8 @@ public abstract class Connector
private readonly Dictionary _lastExecutedRateLimit;
private readonly Dictionary _rateLimit;
- private Logger? logger;
+ // ReSharper disable once InconsistentNaming
+ private readonly Logger? logger;
///
/// Creates a httpClient
diff --git a/Tranga/LibraryManager.cs b/Tranga/LibraryManager.cs
index 1b731d3..b0dcb70 100644
--- a/Tranga/LibraryManager.cs
+++ b/Tranga/LibraryManager.cs
@@ -23,6 +23,7 @@ public abstract class LibraryManager
/// Base-URL of Komga instance, no trailing slashes(/)
/// Base64 string of username and password (username):(password)
///
+ ///
protected LibraryManager(string baseUrl, string auth, Logger? logger, LibraryType libraryType)
{
this.baseUrl = baseUrl;
diff --git a/Tranga/NotificationManager.cs b/Tranga/NotificationManager.cs
index 2612725..65ad36d 100644
--- a/Tranga/NotificationManager.cs
+++ b/Tranga/NotificationManager.cs
@@ -7,8 +7,8 @@ namespace Tranga;
public abstract class NotificationManager
{
- protected Logger? logger;
- public NotificationManagerType notificationManagerType { get; }
+ protected readonly Logger? logger;
+ public NotificationManagerType notificationManagerType;
protected NotificationManager(NotificationManagerType notificationManagerType, Logger? logger = null)
{
diff --git a/Tranga/TrangaTask.cs b/Tranga/TrangaTask.cs
index a2d66f8..863d5d7 100644
--- a/Tranga/TrangaTask.cs
+++ b/Tranga/TrangaTask.cs
@@ -1,5 +1,4 @@
-using System.Globalization;
-using System.Text.Json.Serialization;
+using System.Text.Json.Serialization;
using Logging;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
diff --git a/Tranga/TrangaTasks/DownloadChapterTask.cs b/Tranga/TrangaTasks/DownloadChapterTask.cs
index f998be6..e60c51a 100644
--- a/Tranga/TrangaTasks/DownloadChapterTask.cs
+++ b/Tranga/TrangaTasks/DownloadChapterTask.cs
@@ -1,5 +1,4 @@
using Logging;
-using Newtonsoft.Json;
namespace Tranga.TrangaTasks;