diff --git a/Tranga/Migrator.cs b/Tranga/Migrator.cs index 3ebbf96..b15f1ff 100644 --- a/Tranga/Migrator.cs +++ b/Tranga/Migrator.cs @@ -52,8 +52,8 @@ public static class Migrator node["downloadLocation"]!.GetValue(), node["workingDirectory"]!.GetValue()); JsonArray libraryManagers = node["libraryManagers"]!.AsArray(); - JsonNode? komgaNode = libraryManagers.FirstOrDefault(lm => lm["libraryType"].GetValue() == LibraryManager.LibraryType.Komga); - JsonNode? kavitaNode = libraryManagers.FirstOrDefault(lm => lm["libraryType"].GetValue() == LibraryManager.LibraryType.Kavita); + JsonNode? komgaNode = libraryManagers.FirstOrDefault(lm => lm["libraryType"].GetValue() == (byte)LibraryManager.LibraryType.Komga); + JsonNode? kavitaNode = libraryManagers.FirstOrDefault(lm => lm["libraryType"].GetValue() == (byte)LibraryManager.LibraryType.Kavita); HashSet lms = new(); if (komgaNode is not null) lms.Add(new Komga(komgaNode["baseUrl"]!.GetValue(), komgaNode["auth"]!.GetValue(), null)); @@ -62,9 +62,9 @@ public static class Migrator JsonArray notificationManagers = node["libraryManagers"]!.AsArray(); JsonNode? gotifyNode = notificationManagers.FirstOrDefault(nm => - nm["notificationManagerType"].GetValue() == NotificationManager.NotificationManagerType.Gotify); + nm["notificationManagerType"].GetValue() == (byte)NotificationManager.NotificationManagerType.Gotify); JsonNode? lunaSeaNode = notificationManagers.FirstOrDefault(nm => - nm["notificationManagerType"].GetValue() == NotificationManager.NotificationManagerType.LunaSea); + nm["notificationManagerType"].GetValue() == (byte)NotificationManager.NotificationManagerType.LunaSea); HashSet nms = new(); if (gotifyNode is not null) nms.Add(new Gotify(gotifyNode["endpoint"]!.GetValue(), gotifyNode["appToken"]!.GetValue()));