mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-29 09:39:03 +03:00
Fix downloads being deleted after finishing
This commit is contained in:
parent
aacb29b2eb
commit
4a0549883e
2 changed files with 4 additions and 3 deletions
|
@ -252,7 +252,9 @@ class AnimeDownloader(
|
|||
runningRelay.call(false)
|
||||
|
||||
isFFmpegRunning = false
|
||||
FFmpegKitConfig.getSessions().forEach {
|
||||
FFmpegKitConfig.getSessions().filter {
|
||||
it.state == SessionState.CREATED || it.state == SessionState.RUNNING
|
||||
}.forEach {
|
||||
it.executeCallback.apply(it)
|
||||
it.cancel()
|
||||
}
|
||||
|
@ -500,7 +502,6 @@ class AnimeDownloader(
|
|||
if (it.state != SessionState.COMPLETED) {
|
||||
tmpDir.findFile("$filename.mp4")?.delete()
|
||||
it.failStackTrace?.let { trace -> logcat(LogPriority.ERROR) { trace } }
|
||||
throw Exception(it.failStackTrace ?: "Error in ffmpeg download")
|
||||
}
|
||||
}
|
||||
var duration = 0L
|
||||
|
|
Loading…
Reference in a new issue