[MangaLib][HentaiLib] Do not parse tags as genres

pull/6/head
Koitharu 4 years ago
parent 5554165e2c
commit a116906d61
No known key found for this signature in database
GPG Key ID: 8E861F8CE6E7CE27

@ -148,12 +148,15 @@ internal open class MangaLibParser(
author = info?.getElementsMatchingOwnText("Автор")?.firstOrNull() author = info?.getElementsMatchingOwnText("Автор")?.firstOrNull()
?.nextElementSibling()?.text() ?: manga.author, ?.nextElementSibling()?.text() ?: manga.author,
tags = info?.selectFirst("div.media-tags") tags = info?.selectFirst("div.media-tags")
?.select("a.media-tag-item")?.mapToSet { a -> ?.select("a.media-tag-item")?.mapNotNullToSet { a ->
val href = a.attr("href")
if (href.contains("genres")) {
MangaTag( MangaTag(
title = a.text().toTitleCase(), title = a.text().toTitleCase(),
key = a.attr("href").substringAfterLast('='), key = href.substringAfterLast('='),
source = source, source = source,
) )
} else null
} ?: manga.tags, } ?: manga.tags,
isNsfw = isNsfw(doc), isNsfw = isNsfw(doc),
description = info?.selectFirst("div.media-description__text")?.html(), description = info?.selectFirst("div.media-description__text")?.html(),

Loading…
Cancel
Save