mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
feat(StreamSB) stream break: support audiotracks
This commit is contained in:
parent
6b8008f460
commit
078caf9f88
1 changed files with 17 additions and 8 deletions
|
@ -3,9 +3,10 @@ package com.lagradost.cloudstream3.extractors
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
import com.lagradost.cloudstream3.SubtitleFile
|
import com.lagradost.cloudstream3.SubtitleFile
|
||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
|
import com.lagradost.cloudstream3.mvvm.safeApiCall
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.M3u8Helper
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
|
||||||
class Sbspeed : StreamSB() {
|
class Sbspeed : StreamSB() {
|
||||||
override var name = "Sbspeed"
|
override var name = "Sbspeed"
|
||||||
|
@ -140,14 +141,22 @@ open class StreamSB : ExtractorApi() {
|
||||||
referer = url,
|
referer = url,
|
||||||
).parsedSafe<Main>()
|
).parsedSafe<Main>()
|
||||||
// val urlmain = mapped.streamData.file.substringBefore("/hls/")
|
// val urlmain = mapped.streamData.file.substringBefore("/hls/")
|
||||||
M3u8Helper.generateM3u8(
|
|
||||||
name,
|
|
||||||
mapped?.streamData?.file ?: return,
|
|
||||||
url,
|
|
||||||
headers = headers
|
|
||||||
).forEach(callback)
|
|
||||||
|
|
||||||
mapped.streamData.subs?.map {sub ->
|
safeApiCall {
|
||||||
|
callback.invoke(
|
||||||
|
ExtractorLink(
|
||||||
|
name,
|
||||||
|
name,
|
||||||
|
mapped?.streamData?.file ?: return@safeApiCall,
|
||||||
|
url,
|
||||||
|
Qualities.Unknown.value,
|
||||||
|
true,
|
||||||
|
headers
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
mapped?.streamData?.subs?.map {sub ->
|
||||||
subtitleCallback.invoke(
|
subtitleCallback.invoke(
|
||||||
SubtitleFile(
|
SubtitleFile(
|
||||||
sub.label.toString(),
|
sub.label.toString(),
|
||||||
|
|
Loading…
Reference in a new issue