mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-06-12 06:47:53 +02:00
Add field "url" to Chapter to know where to download.
This commit is contained in:
@ -123,6 +123,8 @@ public class MangaDex : Connector
|
||||
foreach (JsonObject chapter in chaptersInResult)
|
||||
{
|
||||
JsonObject attributes = chapter!["attributes"]!.AsObject();
|
||||
string chapterId = attributes["id"]!.GetValue<string>();
|
||||
|
||||
string? title = attributes.ContainsKey("title") && attributes["title"] is not null
|
||||
? attributes["title"]!.GetValue<string>()
|
||||
: null;
|
||||
@ -135,7 +137,7 @@ public class MangaDex : Connector
|
||||
? attributes["chapter"]!.GetValue<string>()
|
||||
: null;
|
||||
|
||||
chapters.Add(new Chapter(publication, title, volume, chapterNum));
|
||||
chapters.Add(new Chapter(publication, title, volume, chapterNum, chapterId));
|
||||
}
|
||||
}
|
||||
return chapters.OrderBy(chapter => chapter.chapterNumber).ToArray();
|
||||
|
Reference in New Issue
Block a user