Merged with dark25 (#636)
* merge merged lib, lib-multisrc, all, ar, de, en, es, fr, hi, id, it, pt, tr src from dark25 * patch
This commit is contained in:
parent
9f385108fc
commit
1384df62f3
350 changed files with 12176 additions and 1064 deletions
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'Anime Saturn'
|
||||
extClass = '.AnimeSaturn'
|
||||
extVersionCode = 9
|
||||
extVersionCode = 10
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -25,7 +25,12 @@ class AnimeSaturn : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||
|
||||
override val name = "AnimeSaturn"
|
||||
|
||||
override val baseUrl by lazy { preferences.getString("preferred_domain", "https://anisaturn.com")!! }
|
||||
override val baseUrl by lazy {
|
||||
preferences.getString(
|
||||
"preferred_domain",
|
||||
"https://anisaturn.com",
|
||||
)!!
|
||||
}
|
||||
|
||||
private fun isNewDomain(): Boolean = baseUrl == "https://anisaturn.com"
|
||||
|
||||
|
@ -39,7 +44,8 @@ class AnimeSaturn : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||
|
||||
override fun popularAnimeSelector(): String = "div.sebox"
|
||||
|
||||
override fun popularAnimeRequest(page: Int): Request = GET(if (isNewDomain()) "$baseUrl/ongoing?page=$page" else "$baseUrl/animeincorso?page=$page")
|
||||
override fun popularAnimeRequest(page: Int): Request =
|
||||
GET(if (isNewDomain()) "$baseUrl/ongoing?page=$page" else "$baseUrl/animeincorso?page=$page")
|
||||
|
||||
private fun formatTitle(titlestring: String): String = titlestring.replace("(ITA) ITA", "Dub ITA").replace("(ITA)", "Dub ITA").replace("Sub ITA", "")
|
||||
|
||||
|
@ -48,9 +54,13 @@ class AnimeSaturn : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||
anime.setUrlWithoutDomain(element.selectFirst("div.msebox div.headsebox div.tisebox h2 a")!!.attr("href"))
|
||||
anime.title = formatTitle(element.selectFirst("div.msebox div.headsebox div.tisebox h2 a")!!.text())
|
||||
if (isNewDomain()) {
|
||||
anime.thumbnail_url = element.selectFirst("div.msebox div.bigsebox div.l a img.image-animation")!!.attr("src")
|
||||
anime.thumbnail_url =
|
||||
element.selectFirst("div.msebox div.bigsebox div.l a img.image-animation")!!
|
||||
.attr("src")
|
||||
} else
|
||||
anime.thumbnail_url = element.selectFirst("div.msebox div.bigsebox div.l img.attachment-post-thumbnail.size-post-thumbnail.wp-post-image")!!.attr("src")
|
||||
anime.thumbnail_url =
|
||||
element.selectFirst("div.msebox div.bigsebox div.l img.attachment-post-thumbnail.size-post-thumbnail.wp-post-image")!!
|
||||
.attr("src")
|
||||
return anime
|
||||
}
|
||||
|
||||
|
@ -158,11 +168,23 @@ class AnimeSaturn : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||
} else {
|
||||
// word search
|
||||
if (isNewDomain()) {
|
||||
anime.setUrlWithoutDomain(element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.text-left.badge-purple")!!.attr("href"))
|
||||
anime.title = formatTitle(element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.text-left.badge-purple")!!.text())
|
||||
anime.setUrlWithoutDomain(
|
||||
element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.text-left.badge-purple")!!
|
||||
.attr("href"),
|
||||
)
|
||||
anime.title = formatTitle(
|
||||
element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.text-left.badge-purple")!!
|
||||
.text(),
|
||||
)
|
||||
} else {
|
||||
anime.setUrlWithoutDomain(element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.badge-light")!!.attr("href"))
|
||||
anime.title = formatTitle(element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.badge-light")!!.text())
|
||||
anime.setUrlWithoutDomain(
|
||||
element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.badge-light")!!
|
||||
.attr("href"),
|
||||
)
|
||||
anime.title = formatTitle(
|
||||
element.selectFirst("li.list-group-item.bg-dark-as-box-shadow div.item-archivio div.info-archivio h3 a.badge.badge-archivio.badge-light")!!
|
||||
.text(),
|
||||
)
|
||||
}
|
||||
anime.thumbnail_url = element.select("li.list-group-item.bg-dark-as-box-shadow div.item-archivio a.thumb.image-wrapper img.rounded.locandina-archivio").attr("src")
|
||||
}
|
||||
|
@ -219,9 +241,11 @@ class AnimeSaturn : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||
}
|
||||
description2 == null -> {
|
||||
anime.description = description1
|
||||
} description1.length > description2.length -> {
|
||||
}
|
||||
description1.length > description2.length -> {
|
||||
anime.description = description1
|
||||
} else -> {
|
||||
}
|
||||
else -> {
|
||||
anime.description = description2
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue