Enums as string

This commit is contained in:
2025-10-15 23:41:26 +02:00
parent 565cf01114
commit 626131b9b8
15 changed files with 838 additions and 44 deletions

View File

@@ -42,16 +42,15 @@ public abstract class LibraryConnector : Identifiable
internal abstract Task<bool> Test(CancellationToken ct);
}
[JsonConverter(typeof(StringEnumConverter))]
public enum LibraryType : byte
public enum LibraryType
{
/// <summary>
/// <seealso cref="Komga"/>
/// </summary>
Komga = 0,
Komga,
/// <summary>
/// <seealso cref="Kavita"/>
/// </summary>
Kavita = 1
Kavita
}

View File

@@ -146,12 +146,11 @@ public class Manga : Identifiable
public override string ToString() => $"{base.ToString()} {Name}";
}
[JsonConverter(typeof(StringEnumConverter))]
public enum MangaReleaseStatus : byte
public enum MangaReleaseStatus
{
Continuing = 0,
Completed = 1,
OnHiatus = 2,
Cancelled = 3,
Unreleased = 4
Continuing,
Completed,
OnHiatus,
Cancelled,
Unreleased
}

View File

@@ -50,10 +50,9 @@ public class Notification : Identifiable
public override string ToString() => $"{base.ToString()} {Urgency} {Title} {Message}";
}
[JsonConverter(typeof(StringEnumConverter))]
public enum NotificationUrgency : byte
public enum NotificationUrgency
{
Low = 1,
Normal = 3,
High = 5
Low,
Normal,
High
}