mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
5414145d79
5 changed files with 13 additions and 11 deletions
|
@ -32,9 +32,8 @@ class APIRepository(val api: MainAPI) {
|
|||
val hasQuickSearch = api.hasQuickSearch
|
||||
|
||||
suspend fun load(url: String): Resource<LoadResponse> {
|
||||
if (isInvalidData(url)) throw ErrorLoadingException()
|
||||
|
||||
return safeApiCall {
|
||||
if (isInvalidData(url)) throw ErrorLoadingException()
|
||||
api.load(api.fixUrl(url)) ?: throw ErrorLoadingException()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1224,7 +1224,7 @@ class ResultFragment : ResultTrailerPlayer() {
|
|||
sortUrls(
|
||||
currentLinks ?: return@main
|
||||
),//(currentLinks ?: return@main).filter { !it.isM3u8 },
|
||||
getString(R.string.episode_action_download_mirror)
|
||||
context?.getString(R.string.episode_action_download_mirror) ?: ""
|
||||
) { link ->
|
||||
startDownload(
|
||||
context,
|
||||
|
|
|
@ -1602,11 +1602,15 @@ object VideoDownloadManager {
|
|||
}
|
||||
|
||||
private fun saveQueue() {
|
||||
val dQueue =
|
||||
downloadQueue.toList()
|
||||
.mapIndexed { index, any -> DownloadQueueResumePackage(index, any) }
|
||||
.toTypedArray()
|
||||
setKey(KEY_RESUME_QUEUE_PACKAGES, dQueue)
|
||||
try {
|
||||
val dQueue =
|
||||
downloadQueue.toList()
|
||||
.mapIndexed { index, any -> DownloadQueueResumePackage(index, any) }
|
||||
.toTypedArray()
|
||||
setKey(KEY_RESUME_QUEUE_PACKAGES, dQueue)
|
||||
} catch (e : Exception) {
|
||||
logError(e)
|
||||
}
|
||||
}
|
||||
|
||||
/*fun isMyServiceRunning(context: Context, serviceClass: Class<*>): Boolean {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue