Corrected order of constructor (GlobalBase clone)
This commit is contained in:
parent
a8f0f1af15
commit
f916cda0f1
@ -7,7 +7,7 @@ public class DownloadNewChapters : Job
|
||||
{
|
||||
public Publication publication { get; init; }
|
||||
|
||||
public DownloadNewChapters(GlobalBase clone, MangaConnector connector, Publication publication, bool recurring = false) : base (clone, connector, recurring)
|
||||
public DownloadNewChapters(GlobalBase clone, MangaConnector connector, Publication publication, bool recurring = false, TimeSpan? recurrence = null) : base (clone, connector, recurring, recurrence)
|
||||
{
|
||||
this.publication = publication;
|
||||
}
|
||||
|
@ -7,13 +7,13 @@ namespace Tranga.LibraryConnectors;
|
||||
public class Kavita : LibraryConnector
|
||||
{
|
||||
|
||||
public Kavita(string baseUrl, string username, string password, GlobalBase clone) :
|
||||
base(baseUrl, GetToken(baseUrl, username, password), LibraryType.Kavita, clone)
|
||||
public Kavita(GlobalBase clone, string baseUrl, string username, string password) :
|
||||
base(clone, baseUrl, GetToken(baseUrl, username, password), LibraryType.Kavita)
|
||||
{
|
||||
}
|
||||
|
||||
[JsonConstructor]
|
||||
public Kavita(string baseUrl, string auth, GlobalBase clone) : base(baseUrl, auth, LibraryType.Kavita, clone)
|
||||
public Kavita(GlobalBase clone, string baseUrl, string auth) : base(clone, baseUrl, auth, LibraryType.Kavita)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -10,13 +10,13 @@ namespace Tranga.LibraryConnectors;
|
||||
/// </summary>
|
||||
public class Komga : LibraryConnector
|
||||
{
|
||||
public Komga(string baseUrl, string username, string password, GlobalBase clone)
|
||||
: base(baseUrl, Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes($"{username}:{password}")), LibraryType.Komga, clone)
|
||||
public Komga(GlobalBase clone, string baseUrl, string username, string password)
|
||||
: base(clone, baseUrl, Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes($"{username}:{password}")), LibraryType.Komga)
|
||||
{
|
||||
}
|
||||
|
||||
[JsonConstructor]
|
||||
public Komga(string baseUrl, string auth, GlobalBase clone) : base(baseUrl, auth, LibraryType.Komga, clone)
|
||||
public Komga(GlobalBase clone, string baseUrl, string auth) : base(clone, baseUrl, auth, LibraryType.Komga)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ public abstract class LibraryConnector : GlobalBase
|
||||
// ReSharper disable once MemberCanBeProtected.Global
|
||||
public string auth { get; } //Base64 encoded, if you use your password everywhere, you have problems
|
||||
|
||||
protected LibraryConnector(string baseUrl, string auth, LibraryType libraryType, GlobalBase clone) : base(clone)
|
||||
protected LibraryConnector(GlobalBase clone, string baseUrl, string auth, LibraryType libraryType) : base(clone)
|
||||
{
|
||||
this.baseUrl = baseUrl;
|
||||
this.auth = auth;
|
||||
|
@ -11,7 +11,7 @@ public class Gotify : NotificationConnector
|
||||
private readonly HttpClient _client = new();
|
||||
|
||||
[JsonConstructor]
|
||||
public Gotify(string endpoint, string appToken, GlobalBase clone) : base(NotificationManagerType.Gotify, clone)
|
||||
public Gotify(GlobalBase clone, string endpoint, string appToken) : base(clone, NotificationManagerType.Gotify)
|
||||
{
|
||||
this.endpoint = endpoint;
|
||||
this.appToken = appToken;
|
||||
|
@ -10,7 +10,7 @@ public class LunaSea : NotificationConnector
|
||||
private readonly HttpClient _client = new();
|
||||
|
||||
[JsonConstructor]
|
||||
public LunaSea(string id, GlobalBase clone) : base(NotificationManagerType.LunaSea, clone)
|
||||
public LunaSea(GlobalBase clone, string id) : base(clone, NotificationManagerType.LunaSea)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ public abstract class NotificationConnector : GlobalBase
|
||||
{
|
||||
public NotificationManagerType notificationManagerType;
|
||||
|
||||
protected NotificationConnector(NotificationManagerType notificationManagerType, GlobalBase clone) : base(clone)
|
||||
protected NotificationConnector(GlobalBase clone, NotificationManagerType notificationManagerType) : base(clone)
|
||||
{
|
||||
this.notificationManagerType = notificationManagerType;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user