Fixed some nullable types
This commit is contained in:
parent
a71d65e666
commit
eddf50483f
@ -20,6 +20,10 @@ public abstract class Connector
|
||||
{
|
||||
this.downloadLocation = downloadLocation;
|
||||
this.logger = logger;
|
||||
this.downloadClient = new DownloadClient(new Dictionary<byte, int>()
|
||||
{
|
||||
//RequestTypes for RateLimits
|
||||
}, logger);
|
||||
}
|
||||
|
||||
public abstract string name { get; } //Name of the Connector (e.g. Website)
|
||||
@ -219,6 +223,7 @@ public abstract class Connector
|
||||
}
|
||||
catch (HttpRequestException e)
|
||||
{
|
||||
logger?.WriteLine(this.GetType().ToString(), e.Message);
|
||||
Thread.Sleep(_rateLimit[requestType] * 2);
|
||||
}
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ public class MangaDex : Connector
|
||||
return;
|
||||
}
|
||||
|
||||
if (publication.posterUrl is null || !(bool)publication.posterUrl?.Contains("http"))
|
||||
if (publication.posterUrl is null || publication.posterUrl!.Contains("http"))
|
||||
{
|
||||
logger?.WriteLine(this.GetType().ToString(), $"No Poster-URL in publication");
|
||||
return;
|
||||
|
@ -25,7 +25,7 @@ public class TaskManager
|
||||
/// <param name="komgaUsername">The Komga username</param>
|
||||
/// <param name="komgaPassword">The Komga password</param>
|
||||
/// <param name="logger"></param>
|
||||
public TaskManager(string downloadFolderPath, string? workingDirectory = null, string? komgaBaseUrl = null, string? komgaUsername = null, string? komgaPassword = null, Logger? logger = null)
|
||||
public TaskManager(string downloadFolderPath, string workingDirectory, string? komgaBaseUrl = null, string? komgaUsername = null, string? komgaPassword = null, Logger? logger = null)
|
||||
{
|
||||
this.logger = logger;
|
||||
_allTasks = new HashSet<TrangaTask>();
|
||||
@ -170,7 +170,7 @@ public class TaskManager
|
||||
_allTasks.Add(newTask);
|
||||
}
|
||||
else
|
||||
logger.WriteLine(this.GetType().ToString(), $"Publication already exists {publication?.internalId}");
|
||||
logger?.WriteLine(this.GetType().ToString(), $"Publication already exists {publication?.internalId}");
|
||||
}
|
||||
logger?.WriteLine(this.GetType().ToString(), $"Added new Task {newTask.ToString()}");
|
||||
ExportData();
|
||||
|
Loading…
Reference in New Issue
Block a user