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()
|
tmId = TsuminoSearchMetadata.tmIdFromUrl(input.location())!!.toInt()
|
||||||
tags.clear()
|
tags.clear()
|
||||||
|
|
||||||
input.getElementById("Title")?.text()?.let {
|
input.select("meta[property=og:title]").firstOrNull()?.attr("content")?.let {
|
||||||
title = it.trim()
|
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 {
|
artistString.split("|").trimAll().dropBlank().forEach {
|
||||||
tags.add(RaisedTag("artist", it, TAG_TYPE_DEFAULT))
|
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()
|
category = it.trim()
|
||||||
tags.add(RaisedTag("genre", it, TAG_TYPE_VIRTUAL))
|
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()
|
collection = it.trim()
|
||||||
tags.add(RaisedTag("collection", it, TAG_TYPE_DEFAULT))
|
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()
|
group = it.trim()
|
||||||
tags.add(RaisedTag("group", it, TAG_TYPE_DEFAULT))
|
tags.add(RaisedTag("group", it, TAG_TYPE_DEFAULT))
|
||||||
}
|
}
|
||||||
|
|
||||||
val newParody = mutableListOf<String>()
|
parody = input.getElementById("Parody")?.children()?.map {
|
||||||
input.getElementById("Parody")?.children()?.forEach {
|
val entry = it.attr("data-define").trim()
|
||||||
val entry = it.text().trim()
|
|
||||||
newParody.add(entry)
|
|
||||||
tags.add(RaisedTag("parody", entry, TAG_TYPE_DEFAULT))
|
tags.add(RaisedTag("parody", entry, TAG_TYPE_DEFAULT))
|
||||||
}
|
entry
|
||||||
parody = newParody
|
}.orEmpty()
|
||||||
|
|
||||||
val newCharacter = mutableListOf<String>()
|
character = input.getElementById("Character")?.children()?.map {
|
||||||
input.getElementById("Character")?.children()?.forEach {
|
val entry = it.attr("data-define").trim()
|
||||||
val entry = it.text().trim()
|
|
||||||
newCharacter.add(entry)
|
|
||||||
tags.add(RaisedTag("character", entry, TAG_TYPE_DEFAULT))
|
tags.add(RaisedTag("character", entry, TAG_TYPE_DEFAULT))
|
||||||
}
|
entry
|
||||||
character = newCharacter
|
}.orEmpty()
|
||||||
|
|
||||||
input.getElementById("Tag")?.children()?.let { tagElements ->
|
input.getElementById("Tag")?.children()?.let { tagElements ->
|
||||||
tags.addAll(
|
tags.addAll(
|
||||||
tagElements.map {
|
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