Merge pull request #365 from merlinmarijn/manganato-domain-switch
Some checks are pending
Docker Image CI / build (push) Waiting to run

Manganato fix chapter naming format in CBZ files (i am sorry)
This commit is contained in:
Glax 2025-03-07 21:54:06 +01:00 committed by GitHub
commit d56f0b383a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -167,8 +167,9 @@ public class Manganato : MangaConnector
foreach (HtmlNode chapterInfo in chapterList.Descendants("div").Where(x => x.HasClass("row")))
{
string url = chapterInfo.Descendants("a").First().GetAttributeValue("href", "");
string chapterName = chapterInfo.Descendants("a").First().GetAttributeValue("title", "");
string chapterNumber = Regex.Match(chapterName, @"Chapter ([0-9]+(\.[0-9]+)*)").Groups[1].Value;
var name = chapterInfo.Descendants("a").First().InnerText.Trim();
string chapterName = nameRex.Match(name).Groups[3].Value;
string chapterNumber = Regex.Match(name, @"Chapter ([0-9]+(\.[0-9]+)*)").Groups[1].Value;
string? volumeNumber = Regex.Match(chapterName, @"Vol\.([0-9]+)").Groups[1].Value;
if (string.IsNullOrWhiteSpace(volumeNumber))
volumeNumber = "0";