mirror of
https://github.com/C9Glax/tranga.git
synced 2025-03-14 17:13:02 +01:00
Merge pull request #365 from merlinmarijn/manganato-domain-switch
Some checks are pending
Docker Image CI / build (push) Waiting to run
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:
commit
d56f0b383a
@ -167,8 +167,9 @@ public class Manganato : MangaConnector
|
|||||||
foreach (HtmlNode chapterInfo in chapterList.Descendants("div").Where(x => x.HasClass("row")))
|
foreach (HtmlNode chapterInfo in chapterList.Descendants("div").Where(x => x.HasClass("row")))
|
||||||
{
|
{
|
||||||
string url = chapterInfo.Descendants("a").First().GetAttributeValue("href", "");
|
string url = chapterInfo.Descendants("a").First().GetAttributeValue("href", "");
|
||||||
string chapterName = chapterInfo.Descendants("a").First().GetAttributeValue("title", "");
|
var name = chapterInfo.Descendants("a").First().InnerText.Trim();
|
||||||
string chapterNumber = Regex.Match(chapterName, @"Chapter ([0-9]+(\.[0-9]+)*)").Groups[1].Value;
|
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;
|
string? volumeNumber = Regex.Match(chapterName, @"Vol\.([0-9]+)").Groups[1].Value;
|
||||||
if (string.IsNullOrWhiteSpace(volumeNumber))
|
if (string.IsNullOrWhiteSpace(volumeNumber))
|
||||||
volumeNumber = "0";
|
volumeNumber = "0";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user