Added ToString overrides
This commit is contained in:
parent
6e1a0ab06c
commit
bbd716383a
@ -35,8 +35,12 @@ public readonly struct Chapter
|
||||
chNameStr = IllegalStrings.Replace(chNameStr, "");
|
||||
this.fileName = $"{volStr}{chNumberStr}{chNameStr}";
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Chapter {parentPublication.sortName} {parentPublication.internalId} {chapterNumber} {name}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a chapter-archive is already present
|
||||
/// </summary>
|
||||
|
@ -17,6 +17,11 @@ public class DownloadChapter : Job
|
||||
return Convert.ToBase64String(Encoding.ASCII.GetBytes(string.Concat(this.GetType().ToString(), chapter.parentPublication.internalId, chapter.chapterNumber)));
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"DownloadChapter {id} {chapter}";
|
||||
}
|
||||
|
||||
protected override IEnumerable<Job> ExecuteReturnSubTasksInternal()
|
||||
{
|
||||
Task downloadTask = new(delegate
|
||||
|
@ -16,6 +16,11 @@ public class DownloadNewChapters : Job
|
||||
{
|
||||
return Convert.ToBase64String(Encoding.ASCII.GetBytes(string.Concat(this.GetType().ToString(), publication.internalId)));
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"DownloadChapter {id} {publication}";
|
||||
}
|
||||
|
||||
protected override IEnumerable<Job> ExecuteReturnSubTasksInternal()
|
||||
{
|
||||
|
@ -17,6 +17,11 @@ public class Kavita : LibraryConnector
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Kavita {baseUrl}";
|
||||
}
|
||||
|
||||
private static string GetToken(string baseUrl, string username, string password)
|
||||
{
|
||||
HttpClient client = new()
|
||||
|
@ -20,6 +20,11 @@ public class Komga : LibraryConnector
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Komga {baseUrl}";
|
||||
}
|
||||
|
||||
public override void UpdateLibrary()
|
||||
{
|
||||
Log("Updating libraries.");
|
||||
|
@ -16,7 +16,12 @@ public class Gotify : NotificationConnector
|
||||
this.endpoint = endpoint;
|
||||
this.appToken = appToken;
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Gotify {endpoint}";
|
||||
}
|
||||
|
||||
public override void SendNotification(string title, string notificationText)
|
||||
{
|
||||
Log($"Sending notification: {title} - {notificationText}");
|
||||
|
@ -15,6 +15,11 @@ public class LunaSea : NotificationConnector
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"LunaSea {id}";
|
||||
}
|
||||
|
||||
public override void SendNotification(string title, string notificationText)
|
||||
{
|
||||
Log($"Sending notification: {title} - {notificationText}");
|
||||
|
@ -58,6 +58,11 @@ public struct Publication
|
||||
this.ignoreChaptersBelow = ignoreChaptersBelow ?? 0f;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Publication {sortName} {internalId}";
|
||||
}
|
||||
|
||||
public string CreatePublicationFolder(string downloadDirectory)
|
||||
{
|
||||
string publicationFolder = Path.Join(downloadDirectory, this.folderName);
|
||||
|
Loading…
Reference in New Issue
Block a user