diff --git a/Tranga/Jobs/JobJsonConverter.cs b/Tranga/Jobs/JobJsonConverter.cs index eaca679..d3ca6e0 100644 --- a/Tranga/Jobs/JobJsonConverter.cs +++ b/Tranga/Jobs/JobJsonConverter.cs @@ -38,6 +38,9 @@ public class JobJsonConverter : JsonConverter jo.GetValue("parentJobId")!.Value()); }else if ((jo.ContainsKey("jobType") && jo["jobType"]!.Value() == (byte)Job.JobType.DownloadNewChaptersJob) || jo.ContainsKey("translatedLanguage"))//TODO change to jobType { + DateTime lastExecution = jo.GetValue("lastExecution") is {} le + ? le.ToObject() + : DateTime.UnixEpoch; return new DownloadNewChapters(this._clone, jo.GetValue("mangaConnector")!.ToObject(JsonSerializer.Create(new JsonSerializerSettings() { @@ -47,7 +50,7 @@ public class JobJsonConverter : JsonConverter } }))!, jo.GetValue("manga")!.ToObject(), - jo.GetValue("lastExecution")!.ToObject(), + lastExecution, jo.GetValue("recurring")!.Value(), jo.GetValue("recurrenceTime")!.ToObject(), jo.GetValue("parentJobId")!.Value());