This commit is contained in:
parent
82688f96db
commit
0680e0120f
@ -59,11 +59,11 @@ class Tsumino(delegate: HttpSource, val context: Context) :
|
||||
tmId = TsuminoSearchMetadata.tmIdFromUrl(input.location())!!.toInt()
|
||||
tags.clear()
|
||||
|
||||
input.getElementById("Title")?.text()?.let {
|
||||
input.select("meta[property=og:title]").firstOrNull()?.attr("content")?.let {
|
||||
title = it.trim()
|
||||
}
|
||||
|
||||
input.getElementById("Artist")?.children()?.first()?.text()?.trim()?.let { artistString ->
|
||||
input.getElementById("Artist")?.children()?.first()?.attr("data-define")?.trim()?.let { artistString ->
|
||||
artistString.split("|").trimAll().dropBlank().forEach {
|
||||
tags.add(RaisedTag("artist", it, TAG_TYPE_DEFAULT))
|
||||
}
|
||||
@ -93,41 +93,37 @@ class Tsumino(delegate: HttpSource, val context: Context) :
|
||||
}
|
||||
}
|
||||
|
||||
input.getElementById("Category")?.children()?.first()?.text()?.let {
|
||||
input.getElementById("Category")?.children()?.first()?.attr("data-define")?.let {
|
||||
category = it.trim()
|
||||
tags.add(RaisedTag("genre", it, TAG_TYPE_VIRTUAL))
|
||||
}
|
||||
|
||||
input.getElementById("Collection")?.children()?.first()?.text()?.let {
|
||||
input.getElementById("Collection")?.children()?.first()?.attr("data-define")?.let {
|
||||
collection = it.trim()
|
||||
tags.add(RaisedTag("collection", it, TAG_TYPE_DEFAULT))
|
||||
}
|
||||
|
||||
input.getElementById("Group")?.children()?.first()?.text()?.let {
|
||||
input.getElementById("Group")?.children()?.first()?.attr("data-define")?.let {
|
||||
group = it.trim()
|
||||
tags.add(RaisedTag("group", it, TAG_TYPE_DEFAULT))
|
||||
}
|
||||
|
||||
val newParody = mutableListOf<String>()
|
||||
input.getElementById("Parody")?.children()?.forEach {
|
||||
val entry = it.text().trim()
|
||||
newParody.add(entry)
|
||||
parody = input.getElementById("Parody")?.children()?.map {
|
||||
val entry = it.attr("data-define").trim()
|
||||
tags.add(RaisedTag("parody", entry, TAG_TYPE_DEFAULT))
|
||||
}
|
||||
parody = newParody
|
||||
entry
|
||||
}.orEmpty()
|
||||
|
||||
val newCharacter = mutableListOf<String>()
|
||||
input.getElementById("Character")?.children()?.forEach {
|
||||
val entry = it.text().trim()
|
||||
newCharacter.add(entry)
|
||||
character = input.getElementById("Character")?.children()?.map {
|
||||
val entry = it.attr("data-define").trim()
|
||||
tags.add(RaisedTag("character", entry, TAG_TYPE_DEFAULT))
|
||||
}
|
||||
character = newCharacter
|
||||
entry
|
||||
}.orEmpty()
|
||||
|
||||
input.getElementById("Tag")?.children()?.let { tagElements ->
|
||||
tags.addAll(
|
||||
tagElements.map {
|
||||
RaisedTag("tags", it.text().trim(), TAG_TYPE_DEFAULT)
|
||||
RaisedTag("tags", it.attr("data-define").trim(), TAG_TYPE_DEFAULT)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user