mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
save location
This commit is contained in:
parent
fca8a55e05
commit
bef34c33e9
3 changed files with 6 additions and 3 deletions
|
@ -265,7 +265,9 @@ abstract class AbstractPlayerFragment(
|
|||
context?.getString(R.string.no_links_found_toast) + "\n" + message,
|
||||
Toast.LENGTH_LONG
|
||||
)
|
||||
activity?.popCurrentPage()
|
||||
activity?.runOnUiThread {
|
||||
activity?.popCurrentPage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1396,7 +1396,7 @@ class CS3IPlayer : IPlayer {
|
|||
|| error.errorCode == PlaybackException.ERROR_CODE_PARSING_CONTAINER_UNSUPPORTED
|
||||
|| error.errorCode == PlaybackException.ERROR_CODE_IO_UNSPECIFIED
|
||||
) -> {
|
||||
|
||||
val position = exoPlayer?.currentPosition ?: 0L
|
||||
val gid = DownloadListener.sessionIdToGid[aria2cRequestId]
|
||||
Log.i(TAG, "Aria2 error $error error ${error.errorCode}")
|
||||
if(gid == null) {
|
||||
|
@ -1432,6 +1432,7 @@ class CS3IPlayer : IPlayer {
|
|||
// shitty solution to release it every time, however we will get timeout otherwise
|
||||
CommonActivity.activity?.let { act ->
|
||||
try {
|
||||
playbackPosition = position
|
||||
awaitAria2c(act, loadedLink, aria2cRequestId)
|
||||
} catch (t : Throwable) {
|
||||
event(ErrorEvent(t))
|
||||
|
|
|
@ -278,7 +278,7 @@ enum class ExtractorLinkType {
|
|||
}
|
||||
|
||||
private fun inferTypeFromUrl(url: String): ExtractorLinkType {
|
||||
val path = normalSafeApiCall { URL(url).path }
|
||||
val path = try { URL(url).path } catch (_ : Throwable) { null }
|
||||
return when {
|
||||
path?.endsWith(".m3u8") == true || path?.endsWith(".m3u") == true -> ExtractorLinkType.M3U8
|
||||
path?.endsWith(".mpd") == true -> ExtractorLinkType.DASH
|
||||
|
|
Loading…
Reference in a new issue