Compare commits

...

3 Commits

Author SHA1 Message Date
Sir Aguacata 616602643f
Merge branch 'recloudstream:master' into master 2023-04-09 16:31:54 -07:00
Sarlay 94e7eb8e9d
added a mirror to streamsb (#439) 2023-04-09 14:21:41 +00:00
Shif-Jess 4f9016713f
CS3Player: fixed ERROR_CODE_BEHIND_LIVE_WINDOW (#447) 2023-04-09 09:37:27 +02:00
2 changed files with 17 additions and 6 deletions

View File

@ -81,6 +81,10 @@ class StreamSB11 : StreamSB() {
override var mainUrl = "https://sbbrisk.com"
}
class Sblongvu : StreamSB() {
override var mainUrl = "https://sblongvu.com"
}
// This is a modified version of https://github.com/jmir1/aniyomi-extensions/blob/master/src/en/genoanime/src/eu/kanade/tachiyomi/animeextension/en/genoanime/extractors/StreamSBExtractor.kt
// The following code is under the Apache License 2.0 https://github.com/jmir1/aniyomi-extensions/blob/master/LICENSE
open class StreamSB : ExtractorApi() {

View File

@ -985,12 +985,19 @@ class CS3IPlayer : IPlayer {
// If the Network fails then ignore the exception if the duration is set.
// This is to switch mirrors automatically if the stream has not been fetched, but
// allow playing the buffer without internet as then the duration is fetched.
if (error.errorCode == PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_FAILED
&& exoPlayer?.duration != TIME_UNSET
) {
exoPlayer?.prepare()
} else {
playerError?.invoke(error)
when {
error.errorCode == PlaybackException.ERROR_CODE_IO_NETWORK_CONNECTION_FAILED
&& exoPlayer?.duration != TIME_UNSET -> {
exoPlayer?.prepare()
}
error.errorCode == PlaybackException.ERROR_CODE_BEHIND_LIVE_WINDOW -> {
// Re-initialize player at the current live window default position.
exoPlayer?.seekToDefaultPosition()
exoPlayer?.prepare()
}
else -> {
playerError?.invoke(error)
}
}
super.onPlayerError(error)