fixed #311
This commit is contained in:
parent
e61c1b63c5
commit
5718b80f3f
|
@ -1,7 +1,7 @@
|
||||||
import org.jetbrains.kotlin.konan.properties.Properties
|
import org.jetbrains.kotlin.konan.properties.Properties
|
||||||
|
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 181
|
version = 182
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -1031,33 +1031,41 @@ object SoraExtractor : SoraStream() {
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
year: Int? = null,
|
year: Int? = null,
|
||||||
season: Int? = null,
|
season: Int? = null,
|
||||||
|
lastSeason: Int? = null,
|
||||||
episode: Int? = null,
|
episode: Int? = null,
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
invokeWpredis(title, year, season, episode, subtitleCallback, callback, dotmoviesAPI)
|
invokeWpredis(title, year, season, lastSeason, episode, subtitleCallback, callback, dotmoviesAPI)
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invokeVegamovies(
|
suspend fun invokeVegamovies(
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
year: Int? = null,
|
year: Int? = null,
|
||||||
season: Int? = null,
|
season: Int? = null,
|
||||||
|
lastSeason: Int? = null,
|
||||||
episode: Int? = null,
|
episode: Int? = null,
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
invokeWpredis(title, year, season, episode, subtitleCallback, callback, vegaMoviesAPI)
|
invokeWpredis(title, year, season, lastSeason, episode, subtitleCallback, callback, vegaMoviesAPI)
|
||||||
}
|
}
|
||||||
private suspend fun invokeWpredis(
|
private suspend fun invokeWpredis(
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
year: Int? = null,
|
year: Int? = null,
|
||||||
season: Int? = null,
|
season: Int? = null,
|
||||||
|
lastSeason: Int? = null,
|
||||||
episode: Int? = null,
|
episode: Int? = null,
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
api: String
|
api: String
|
||||||
) {
|
) {
|
||||||
var res = app.get("$api/search/$title").document
|
var res = app.get("$api/search/$title").document
|
||||||
val match = if (season == null) "$year" else "Season $season"
|
val match = when (season) {
|
||||||
|
null -> "$year"
|
||||||
|
1 -> "Season 1"
|
||||||
|
else -> "Season 1 – $lastSeason"
|
||||||
|
}
|
||||||
val media =
|
val media =
|
||||||
res.selectFirst("div.blog-items article:has(h3.entry-title:matches((?i)$title.*$match)) a")
|
res.selectFirst("div.blog-items article:has(h3.entry-title:matches((?i)$title.*$match)) a")
|
||||||
?.attr("href")
|
?.attr("href")
|
||||||
|
@ -1065,7 +1073,9 @@ object SoraExtractor : SoraStream() {
|
||||||
res = app.get(media ?: return).document
|
res = app.get(media ?: return).document
|
||||||
val hTag = if (season == null) "h5" else "h3"
|
val hTag = if (season == null) "h5" else "h3"
|
||||||
val aTag = if (season == null) "Download Now" else "V-Cloud"
|
val aTag = if (season == null) "Download Now" else "V-Cloud"
|
||||||
res.select("div.entry-content > $hTag:matches(1080p|2160p)").apmap {
|
val sTag = if (season == null) "" else "Season $season"
|
||||||
|
res.select("div.entry-content > $hTag:matches((?i)$sTag.*1080p|2160p)").
|
||||||
|
filter { element -> !element.text().contains("Download", true) }.apmap {
|
||||||
val tags =
|
val tags =
|
||||||
"""(?:1080p|2160p)(.*)""".toRegex().find(it.text())?.groupValues?.get(1)?.trim()
|
"""(?:1080p|2160p)(.*)""".toRegex().find(it.text())?.groupValues?.get(1)?.trim()
|
||||||
val href =
|
val href =
|
||||||
|
@ -1090,7 +1100,6 @@ object SoraExtractor : SoraStream() {
|
||||||
getIndexQuality(it.text())
|
getIndexQuality(it.text())
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invokePobmovies(
|
suspend fun invokePobmovies(
|
||||||
|
|
|
@ -643,6 +643,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
res.title,
|
res.title,
|
||||||
res.year,
|
res.year,
|
||||||
res.season,
|
res.season,
|
||||||
|
res.lastSeason,
|
||||||
res.episode,
|
res.episode,
|
||||||
subtitleCallback,
|
subtitleCallback,
|
||||||
callback
|
callback
|
||||||
|
@ -653,6 +654,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
res.title,
|
res.title,
|
||||||
res.year,
|
res.year,
|
||||||
res.season,
|
res.season,
|
||||||
|
res.lastSeason,
|
||||||
res.episode,
|
res.episode,
|
||||||
subtitleCallback,
|
subtitleCallback,
|
||||||
callback
|
callback
|
||||||
|
|
Loading…
Reference in New Issue