mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fixed #709
This commit is contained in:
parent
428e97ab1c
commit
f7fcd69a46
2 changed files with 16 additions and 7 deletions
|
@ -2,6 +2,7 @@ package com.lagradost.cloudstream3.animeproviders
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
|
import com.lagradost.cloudstream3.mvvm.logError
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||||
|
@ -257,11 +258,16 @@ class NineAnimeProvider : MainAPI() {
|
||||||
jsonservers.mp4upload,
|
jsonservers.mp4upload,
|
||||||
jsonservers.streamtape
|
jsonservers.streamtape
|
||||||
).mapNotNull {
|
).mapNotNull {
|
||||||
|
try {
|
||||||
val epserver = app.get("$mainUrl/ajax/anime/episode?id=$it").text
|
val epserver = app.get("$mainUrl/ajax/anime/episode?id=$it").text
|
||||||
(if (epserver.contains("url")) {
|
(if (epserver.contains("url")) {
|
||||||
parseJson<Links>(epserver)
|
parseJson<Links>(epserver)
|
||||||
} else null)?.url?.let { it1 -> getLink(it1.replace("=", "")) }
|
} else null)?.url?.let { it1 -> getLink(it1.replace("=", "")) }
|
||||||
?.replace("/embed/", "/e/")
|
?.replace("/embed/", "/e/")
|
||||||
|
} catch (e : Exception) {
|
||||||
|
logError(e)
|
||||||
|
null
|
||||||
|
}
|
||||||
}.apmap { url ->
|
}.apmap { url ->
|
||||||
loadExtractor(
|
loadExtractor(
|
||||||
url, data, callback
|
url, data, callback
|
||||||
|
|
|
@ -480,6 +480,7 @@ class GeneratorPlayer : FullScreenPlayer() {
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
fun setTitle() {
|
fun setTitle() {
|
||||||
var headerName: String? = null
|
var headerName: String? = null
|
||||||
|
var subName : String? = null
|
||||||
var episode: Int? = null
|
var episode: Int? = null
|
||||||
var season: Int? = null
|
var season: Int? = null
|
||||||
var tvType: TvType? = null
|
var tvType: TvType? = null
|
||||||
|
@ -489,12 +490,14 @@ class GeneratorPlayer : FullScreenPlayer() {
|
||||||
is ResultEpisode -> {
|
is ResultEpisode -> {
|
||||||
isFiller = meta.isFiller
|
isFiller = meta.isFiller
|
||||||
headerName = meta.headerName
|
headerName = meta.headerName
|
||||||
|
subName = meta.name
|
||||||
episode = meta.episode
|
episode = meta.episode
|
||||||
season = meta.season
|
season = meta.season
|
||||||
tvType = meta.tvType
|
tvType = meta.tvType
|
||||||
}
|
}
|
||||||
is ExtractorUri -> {
|
is ExtractorUri -> {
|
||||||
headerName = meta.headerName
|
headerName = meta.headerName
|
||||||
|
subName = meta.name
|
||||||
episode = meta.episode
|
episode = meta.episode
|
||||||
season = meta.season
|
season = meta.season
|
||||||
tvType = meta.tvType
|
tvType = meta.tvType
|
||||||
|
@ -504,13 +507,13 @@ class GeneratorPlayer : FullScreenPlayer() {
|
||||||
player_episode_filler_holder?.isVisible = isFiller ?: false
|
player_episode_filler_holder?.isVisible = isFiller ?: false
|
||||||
|
|
||||||
player_video_title?.text = if (headerName != null) {
|
player_video_title?.text = if (headerName != null) {
|
||||||
headerName +
|
(headerName +
|
||||||
if (tvType.isEpisodeBased() && episode != null)
|
if (tvType.isEpisodeBased() && episode != null)
|
||||||
if (season == null)
|
if (season == null)
|
||||||
" - ${getString(R.string.episode)} $episode"
|
" - ${getString(R.string.episode)} $episode"
|
||||||
else
|
else
|
||||||
" \"${getString(R.string.season_short)}${season}:${getString(R.string.episode_short)}${episode}\""
|
" \"${getString(R.string.season_short)}${season}:${getString(R.string.episode_short)}${episode}\""
|
||||||
else ""
|
else "") + if(subName.isNullOrBlank()) "" else " - $subName"
|
||||||
} else {
|
} else {
|
||||||
""
|
""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue