mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: remove smashy1 from anime
This commit is contained in:
parent
b08c3a3204
commit
560648da29
3 changed files with 12 additions and 23 deletions
|
@ -920,18 +920,16 @@ object SoraExtractor : SoraStream() {
|
|||
)
|
||||
}
|
||||
|
||||
app.get("https://api.bilibili.tv/intl/gateway/web/v2/subtitle?s_locale=en_US&platform=web&episode_id=${res.sourceEpisodeId}&spm_id=bstar-web.pgc-video-detail.0.0&from_spm_id=bstar-web.homepage.anime.all")
|
||||
.parsedSafe<BiliBiliSubtitlesResponses>()?.data?.subtitles?.map { sub ->
|
||||
sources?.subtitles?.map { sub ->
|
||||
subtitleCallback.invoke(
|
||||
SubtitleFile(
|
||||
SubtitleHelper.fromTwoLettersToLanguage(sub.lang_key ?: "") ?: sub.lang
|
||||
SubtitleHelper.fromTwoLettersToLanguage(sub.lang ?: "") ?: sub.language
|
||||
?: return@map null,
|
||||
sub.url ?: return@map null
|
||||
sub.file ?: return@map null
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private suspend fun invokeZoro(
|
||||
|
@ -1875,6 +1873,7 @@ object SoraExtractor : SoraStream() {
|
|||
imdbId: String? = null,
|
||||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
isAnime: Boolean = false,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit,
|
||||
) {
|
||||
|
@ -1891,7 +1890,7 @@ object SoraExtractor : SoraStream() {
|
|||
it.attr("data-id") to it.text()
|
||||
}.apmap {
|
||||
when {
|
||||
it.first.contains("/ffix") -> {
|
||||
it.first.contains("/ffix") && !isAnime -> {
|
||||
invokeSmashyFfix(it.second, it.first, callback)
|
||||
}
|
||||
it.first.contains("/gtop") -> {
|
||||
|
@ -3156,9 +3155,7 @@ data class BiliBiliDetails(
|
|||
|
||||
data class BiliBiliSubtitles(
|
||||
@JsonProperty("file") val file: String? = null,
|
||||
@JsonProperty("url") val url: String? = null,
|
||||
@JsonProperty("lang") val lang: String? = null,
|
||||
@JsonProperty("lang_key") val lang_key: String? = null,
|
||||
@JsonProperty("language") val language: String? = null,
|
||||
)
|
||||
|
||||
|
@ -3172,14 +3169,6 @@ data class BiliBiliSourcesResponse(
|
|||
@JsonProperty("subtitles") val subtitles: ArrayList<BiliBiliSubtitles>? = arrayListOf(),
|
||||
)
|
||||
|
||||
data class BiliBiliSubtitlesData(
|
||||
@JsonProperty("subtitles") val subtitles: ArrayList<BiliBiliSubtitles>? = arrayListOf(),
|
||||
)
|
||||
|
||||
data class BiliBiliSubtitlesResponses(
|
||||
@JsonProperty("data") val data: BiliBiliSubtitlesData? = BiliBiliSubtitlesData(),
|
||||
)
|
||||
|
||||
data class WatchOnlineItems(
|
||||
@JsonProperty("slug") val slug: String? = null,
|
||||
@JsonProperty("tmdb_id") val tmdb_id: Int? = null,
|
||||
|
|
|
@ -609,7 +609,7 @@ open class SoraStream : TmdbProvider() {
|
|||
invokeMovie123Net(res.title, res.season, res.episode, subtitleCallback, callback)
|
||||
},
|
||||
{
|
||||
invokeSmashyStream(res.imdbId, res.season, res.episode, subtitleCallback, callback)
|
||||
invokeSmashyStream(res.imdbId, res.season, res.episode, res.isAnime, subtitleCallback, callback)
|
||||
},
|
||||
{
|
||||
invokeWatchsomuch(
|
||||
|
|
|
@ -174,7 +174,7 @@ class SoraStreamLite : SoraStream() {
|
|||
invokeKimcartoon(res.title, res.season, res.episode, subtitleCallback, callback)
|
||||
},
|
||||
{
|
||||
invokeSmashyStream(res.imdbId, res.season, res.episode, subtitleCallback, callback)
|
||||
invokeSmashyStream(res.imdbId, res.season, res.episode, res.isAnime, subtitleCallback, callback)
|
||||
},
|
||||
{
|
||||
invokeXmovies(
|
||||
|
|
Loading…
Reference in a new issue