[DocTruyen3Q] Fix covers

Koitharu 1 year ago
parent 91e53e4872
commit ebcce4f2ec
Signed by: Koitharu
GPG Key ID: 676DEE768C17A9D7

@ -43,6 +43,9 @@ internal abstract class WpComicsParser(
isSearchSupported = true, isSearchSupported = true,
) )
@JvmField
protected val coverSrcAttrs = arrayOf("data-original", "src")
override suspend fun getFilterOptions() = MangaListFilterOptions( override suspend fun getFilterOptions() = MangaListFilterOptions(
availableTags = fetchAvailableTags(), availableTags = fetchAvailableTags(),
availableStates = EnumSet.of(MangaState.ONGOING, MangaState.FINISHED), availableStates = EnumSet.of(MangaState.ONGOING, MangaState.FINISHED),
@ -161,7 +164,7 @@ internal abstract class WpComicsParser(
publicUrl = absUrl, publicUrl = absUrl,
rating = RATING_UNKNOWN, rating = RATING_UNKNOWN,
isNsfw = false, isNsfw = false,
coverUrl = item.selectFirst("div.image a img")?.absUrl("data-original").orEmpty(), coverUrl = item.selectFirst("div.image a img")?.src(coverSrcAttrs).orEmpty(),
largeCoverUrl = null, largeCoverUrl = null,
tags = mangaTags, tags = mangaTags,
state = mangaState, state = mangaState,

@ -98,7 +98,7 @@ internal class DocTruyen3Q(context: MangaLoaderContext) :
id = generateUid(href), id = generateUid(href),
url = href, url = href,
publicUrl = href.toAbsoluteUrl(div.host ?: domain), publicUrl = href.toAbsoluteUrl(div.host ?: domain),
coverUrl = div.selectFirst("div.image-item img")?.src().orEmpty(), coverUrl = div.selectFirst("div.image-item img")?.src(coverSrcAttrs).orEmpty(),
title = div.selectFirst("h3 a")?.text().orEmpty(), title = div.selectFirst("h3 a")?.text().orEmpty(),
altTitle = null, altTitle = null,
rating = RATING_UNKNOWN, rating = RATING_UNKNOWN,

Loading…
Cancel
Save