mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fix video download (#453)
This commit is contained in:
parent
56a680fa9c
commit
fb3576ea52
1 changed files with 3 additions and 1 deletions
|
@ -1388,7 +1388,7 @@ object VideoDownloadManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (link.isM3u8 || URI(link.url).path.endsWith(".m3u8")) {
|
if (link.isM3u8 || URL(link.url).path.endsWith(".m3u8")) {
|
||||||
val startIndex = if (tryResume) {
|
val startIndex = if (tryResume) {
|
||||||
context.getKey<DownloadedFileInfo>(
|
context.getKey<DownloadedFileInfo>(
|
||||||
KEY_DOWNLOAD_INFO,
|
KEY_DOWNLOAD_INFO,
|
||||||
|
@ -1474,6 +1474,8 @@ object VideoDownloadManager {
|
||||||
if (connectionResult != null && connectionResult > 0) { // SUCCESS
|
if (connectionResult != null && connectionResult > 0) { // SUCCESS
|
||||||
removeKey(KEY_RESUME_PACKAGES, id.toString())
|
removeKey(KEY_RESUME_PACKAGES, id.toString())
|
||||||
break
|
break
|
||||||
|
} else if (index == item.links.lastIndex) {
|
||||||
|
downloadStatusEvent.invoke(Pair(id, DownloadType.IsFailed))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
|
Loading…
Reference in a new issue