Fixed link loading in SuperStream (disabled nsfw filter on link loading)

This commit is contained in:
Blatzar 2022-08-03 18:30:32 +02:00
parent 93c62a0298
commit 96226aa237

View file

@ -628,12 +628,13 @@ class SuperStream : MainAPI() {
val parsed = parseJson<LinkData>(data)
// No childmode when getting links
val query = if (parsed.type == TYPE_MOVIES) {
"""{"childmode":"$hideNsfw","uid":"","app_version":"11.5","appid":"$appId","module":"Movie_downloadurl_v3","channel":"Website","mid":"${parsed.id}","lang":"","expired_date":"${getExpiryDate()}","platform":"android","oss":"1","group":""}"""
"""{"childmode":"0","uid":"","app_version":"11.5","appid":"$appId","module":"Movie_downloadurl_v3","channel":"Website","mid":"${parsed.id}","lang":"","expired_date":"${getExpiryDate()}","platform":"android","oss":"1","group":""}"""
} else {
val episode = parsed.episode ?: throw RuntimeException("No episode number!")
val season = parsed.season ?: throw RuntimeException("No season number!")
"""{"childmode":"$hideNsfw","app_version":"11.5","module":"TV_downloadurl_v3","channel":"Website","episode":"$episode","expired_date":"${getExpiryDate()}","platform":"android","tid":"${parsed.id}","oss":"1","uid":"","appid":"$appId","season":"$season","lang":"en","group":""}"""
"""{"childmode":"0","app_version":"11.5","module":"TV_downloadurl_v3","channel":"Website","episode":"$episode","expired_date":"${getExpiryDate()}","platform":"android","tid":"${parsed.id}","oss":"1","uid":"","appid":"$appId","season":"$season","lang":"en","group":""}"""
}
val linkData = queryApiParsed<LinkDataProp>(query)
@ -645,9 +646,9 @@ class SuperStream : MainAPI() {
val fid = linkData.data?.list?.firstOrNull { it.fid != null }?.fid
val subtitleQuery = if (parsed.type == TYPE_MOVIES) {
"""{"childmode":"$hideNsfw","fid":"$fid","uid":"","app_version":"11.5","appid":"$appId","module":"Movie_srt_list_v2","channel":"Website","mid":"${parsed.id}","lang":"en","expired_date":"${getExpiryDate()}","platform":"android"}"""
"""{"childmode":"0","fid":"$fid","uid":"","app_version":"11.5","appid":"$appId","module":"Movie_srt_list_v2","channel":"Website","mid":"${parsed.id}","lang":"en","expired_date":"${getExpiryDate()}","platform":"android"}"""
} else {
"""{"childmode":"$hideNsfw","fid":"$fid","app_version":"11.5","module":"TV_srt_list_v2","channel":"Website","episode":"${parsed.episode}","expired_date":"${getExpiryDate()}","platform":"android","tid":"${parsed.id}","uid":"","appid":"$appId","season":"${parsed.season}","lang":"en"}"""
"""{"childmode":"0","fid":"$fid","app_version":"11.5","module":"TV_srt_list_v2","channel":"Website","episode":"${parsed.episode}","expired_date":"${getExpiryDate()}","platform":"android","tid":"${parsed.id}","uid":"","appid":"$appId","season":"${parsed.season}","lang":"en"}"""
}
val subtitles = queryApiParsed<SubtitleDataProp>(subtitleQuery).data