mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
small fix
This commit is contained in:
parent
e999b97a00
commit
3ea91518ef
3 changed files with 8 additions and 4 deletions
|
@ -2243,14 +2243,18 @@ object SoraExtractor : SoraStream() {
|
|||
|
||||
suspend fun invokeNowTv(
|
||||
tmdbId: Int? = null,
|
||||
imdbId: String? = null,
|
||||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
val referer = "https://bflix.gs/"
|
||||
val slug = getEpisodeSlug(season, episode)
|
||||
val url = if (season == null) "$nowTvAPI/$tmdbId.mp4" else "$nowTvAPI/tv/$tmdbId/s${season}e${slug.second}.mp4"
|
||||
if (!app.get(url, referer = referer).isSuccessful) return
|
||||
var url = if (season == null) "$nowTvAPI/$tmdbId.mp4" else "$nowTvAPI/tv/$tmdbId/s${season}e${slug.second}.mp4"
|
||||
if (!app.get(url, referer = referer).isSuccessful) {
|
||||
url = if (season == null) "$nowTvAPI/$imdbId.mp4" else "$nowTvAPI/tv/$imdbId/s${season}e${slug.second}.mp4"
|
||||
if (!app.get(url, referer = referer).isSuccessful) return
|
||||
}
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
"NowTv",
|
||||
|
|
|
@ -571,7 +571,7 @@ open class SoraStream : TmdbProvider() {
|
|||
)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeNowTv(res.id, res.season, res.episode, callback)
|
||||
if (!res.isAnime) invokeNowTv(res.id, res.imdbId, res.season, res.episode, callback)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime && res.season == null) invokeRidomovies(
|
||||
|
|
|
@ -209,7 +209,7 @@ class SoraStreamLite : SoraStream() {
|
|||
)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeNowTv(res.id, res.season, res.episode, callback)
|
||||
if (!res.isAnime) invokeNowTv(res.id, res.imdbId, res.season, res.episode, callback)
|
||||
},
|
||||
{
|
||||
invokeNavy(res.imdbId, res.season, res.episode, callback)
|
||||
|
|
Loading…
Reference in a new issue