diff --git a/Tranga/MangaConnectors/MangaConnector.cs b/Tranga/MangaConnectors/MangaConnector.cs index f87e4bf..72c23c7 100644 --- a/Tranga/MangaConnectors/MangaConnector.cs +++ b/Tranga/MangaConnectors/MangaConnector.cs @@ -306,7 +306,9 @@ public abstract class MangaConnector : GlobalBase File.SetUnixFileMode(saveArchiveFilePath, UserRead | UserWrite | UserExecute | GroupRead | GroupWrite | GroupExecute | OtherRead | OtherExecute); Directory.Delete(tempFolder, true); //Cleanup + Log("Created archive."); progressToken?.Complete(); + Log("Download complete."); return HttpStatusCode.OK; } diff --git a/Tranga/MangaConnectors/Manganato.cs b/Tranga/MangaConnectors/Manganato.cs index 033f6a4..6303ba1 100644 --- a/Tranga/MangaConnectors/Manganato.cs +++ b/Tranga/MangaConnectors/Manganato.cs @@ -130,13 +130,13 @@ public class Manganato : MangaConnector string pattern = "MMM dd,yyyy HH:mm"; - HtmlNode oldestChapter = document.DocumentNode + HtmlNode? oldestChapter = document.DocumentNode .SelectNodes("//span[contains(concat(' ',normalize-space(@class),' '),' chapter-time ')]").MaxBy( node => DateTime.ParseExact(node.GetAttributeValue("title", "Dec 31 2400, 23:59"), pattern, - CultureInfo.InvariantCulture).Millisecond)!; + CultureInfo.InvariantCulture).Millisecond); - int year = DateTime.ParseExact(oldestChapter.GetAttributeValue("title", "Dec 31 2400, 23:59"), pattern, + int year = DateTime.ParseExact(oldestChapter?.GetAttributeValue("title", "Dec 31 2400, 23:59")??"Dec 31 2400, 23:59", pattern, CultureInfo.InvariantCulture).Year; Manga manga = new (this, sortName, authors.ToList(), description, altTitles, tags.ToArray(), posterUrl, coverFileNameInCache, links,