Compare commits
No commits in common. "6fb4098c161da75baa0f7f74cc30824a01af85ec" and "df8538c3b4055f03641436eb453cb1020e389460" have entirely different histories.
6fb4098c16
...
df8538c3b4
@ -42,7 +42,6 @@ public class CommonObjects
|
||||
|
||||
if (logger is not null)
|
||||
{
|
||||
settings.co.logger = logger;
|
||||
foreach (LibraryManager lm in settings.co.libraryManagers)
|
||||
lm.AddLogger(logger);
|
||||
foreach(NotificationManager nm in settings.co.notificationManagers)
|
||||
|
@ -16,8 +16,8 @@ public static class Migrator
|
||||
return;
|
||||
JsonNode settingsNode = JsonNode.Parse(File.ReadAllText(settingsFilePath))!;
|
||||
ushort version = settingsNode["version"] is not null
|
||||
? settingsNode["version"]!.GetValue<ushort>()
|
||||
: settingsNode["ts"]!["version"]!.GetValue<ushort>();
|
||||
? settingsNode["version"].GetValue<ushort>()
|
||||
: settingsNode["ts"]["version"].GetValue<ushort>();
|
||||
logger?.WriteLine("Migrator", $"Migrating {version} -> {CurrentVersion}");
|
||||
switch (version)
|
||||
{
|
||||
@ -91,7 +91,7 @@ public static class Migrator
|
||||
if (lunaSeaNode is not null)
|
||||
nms.Add(new LunaSea(lunaSeaNode["id"]!.GetValue<string>()));
|
||||
|
||||
CommonObjects co = new (lms, nms, logger, settingsFilePath);
|
||||
CommonObjects co = new (lms, nms, null, settingsFilePath);
|
||||
|
||||
TrangaSettings.SettingsJsonObject sjo = new(ts, co);
|
||||
File.WriteAllText(settingsFilePath, JsonConvert.SerializeObject(sjo));
|
||||
|
@ -21,7 +21,7 @@ public class TaskManager
|
||||
public TaskManager(TrangaSettings settings, Logging.Logger? logger)
|
||||
{
|
||||
commonObjects = CommonObjects.LoadSettings(settings.settingsFilePath, logger);
|
||||
commonObjects.logger?.WriteLine(this.GetType().ToString(), value: "\n"+
|
||||
commonObjects.logger?.WriteLine("Tranga", value: "\n"+
|
||||
@"-----------------------------------------------------------------"+"\n"+
|
||||
@" |¯¯¯¯¯¯|°|¯¯¯¯¯¯\ /¯¯¯¯¯¯| |¯¯¯\|¯¯¯| /¯¯¯¯¯¯\' /¯¯¯¯¯¯| "+"\n"+
|
||||
@" | | | x <|' / ! | | '| | (/¯¯¯\° / ! | "+ "\n"+
|
||||
@ -205,6 +205,8 @@ public class TaskManager
|
||||
{
|
||||
switch (taskType)
|
||||
{
|
||||
case TrangaTask.Task.UpdateLibraries:
|
||||
return _allTasks.Where(tTask => tTask.task == TrangaTask.Task.UpdateLibraries);
|
||||
case TrangaTask.Task.MonitorPublication:
|
||||
if(connectorName is null)
|
||||
return _allTasks.Where(tTask => tTask.task == taskType);
|
||||
|
@ -1,4 +1,6 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using Logging;
|
||||
using Newtonsoft.Json;
|
||||
using Tranga.LibraryManagers;
|
||||
using Tranga.NotificationManagers;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user