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.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.mvvm.logError
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||
|
@ -257,11 +258,16 @@ class NineAnimeProvider : MainAPI() {
|
|||
jsonservers.mp4upload,
|
||||
jsonservers.streamtape
|
||||
).mapNotNull {
|
||||
try {
|
||||
val epserver = app.get("$mainUrl/ajax/anime/episode?id=$it").text
|
||||
(if (epserver.contains("url")) {
|
||||
parseJson<Links>(epserver)
|
||||
} else null)?.url?.let { it1 -> getLink(it1.replace("=", "")) }
|
||||
?.replace("/embed/", "/e/")
|
||||
} catch (e : Exception) {
|
||||
logError(e)
|
||||
null
|
||||
}
|
||||
}.apmap { url ->
|
||||
loadExtractor(
|
||||
url, data, callback
|
||||
|
|
|
@ -480,6 +480,7 @@ class GeneratorPlayer : FullScreenPlayer() {
|
|||
@SuppressLint("SetTextI18n")
|
||||
fun setTitle() {
|
||||
var headerName: String? = null
|
||||
var subName : String? = null
|
||||
var episode: Int? = null
|
||||
var season: Int? = null
|
||||
var tvType: TvType? = null
|
||||
|
@ -489,12 +490,14 @@ class GeneratorPlayer : FullScreenPlayer() {
|
|||
is ResultEpisode -> {
|
||||
isFiller = meta.isFiller
|
||||
headerName = meta.headerName
|
||||
subName = meta.name
|
||||
episode = meta.episode
|
||||
season = meta.season
|
||||
tvType = meta.tvType
|
||||
}
|
||||
is ExtractorUri -> {
|
||||
headerName = meta.headerName
|
||||
subName = meta.name
|
||||
episode = meta.episode
|
||||
season = meta.season
|
||||
tvType = meta.tvType
|
||||
|
@ -504,13 +507,13 @@ class GeneratorPlayer : FullScreenPlayer() {
|
|||
player_episode_filler_holder?.isVisible = isFiller ?: false
|
||||
|
||||
player_video_title?.text = if (headerName != null) {
|
||||
headerName +
|
||||
(headerName +
|
||||
if (tvType.isEpisodeBased() && episode != null)
|
||||
if (season == null)
|
||||
" - ${getString(R.string.episode)} $episode"
|
||||
else
|
||||
" \"${getString(R.string.season_short)}${season}:${getString(R.string.episode_short)}${episode}\""
|
||||
else ""
|
||||
else "") + if(subName.isNullOrBlank()) "" else " - $subName"
|
||||
} else {
|
||||
""
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue