Merge branch 'refs/heads/cuttingedge-merge-ServerV2' into Server-V2

This commit is contained in:
Glax 2024-11-28 21:35:48 +01:00
commit 29f3f1a16e
2 changed files with 5 additions and 3 deletions

View File

@ -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;
}

View File

@ -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,