Resolve proper chapter URL for ComicInfo "Web" field

Requires extensions to be updated to lib 1.4 to have proper URLs for some of them, which will
happen soon in the future.
This commit is contained in:
arkon
2022-11-12 09:54:24 -05:00
parent bdf035d60a
commit 262f8449b4
2 changed files with 15 additions and 6 deletions

View File

@@ -12,11 +12,11 @@ const val COMIC_INFO_FILE = "ComicInfo.xml"
/**
* Creates a ComicInfo instance based on the manga and chapter metadata.
*/
fun getComicInfo(manga: Manga, chapter: Chapter): ComicInfo {
fun getComicInfo(manga: Manga, chapter: Chapter, chapterUrl: String): ComicInfo {
return ComicInfo(
title = ComicInfo.Title(chapter.name),
series = ComicInfo.Series(manga.title),
web = ComicInfo.Web(manga.url),
web = ComicInfo.Web(chapterUrl),
summary = manga.description?.let { ComicInfo.Summary(it) },
writer = manga.author?.let { ComicInfo.Writer(it) },
penciller = manga.artist?.let { ComicInfo.Penciller(it) },