C9Glax / tranga

Docker-Container to monitor (Manga) Scanlation-Sites for download new chapters.
GNU General Public License v3.0
156 stars 15 forks source link

[It broke]: Manganato connector breaks if queried manga does not have any chapters. #281

Open sametguzeldev opened 1 week ago

sametguzeldev commented 1 week ago

What is broken?

Go to tranga and search for "Jujutsu Kaisen" in "en" category. You will see that it will get stuck at some point.

I did pinpoint the issue and fixed it for myself since I build my own images.

Manganato.cs file

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)!;

This throws exception with "Value cannot be null" because there is no 'chapter-time' at all in any document nodes. Because there are no chapters available.

This is the manga link that it tries to parse from.

Log-output

No response

Additional stuff

I am building it from master branch, not cuttingedge.