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
|
||||
|
|
|
@ -62,7 +62,7 @@ class PlayerControlsView @JvmOverloads constructor(context: Context, attrs: Attr
|
|||
|
||||
override fun onViewAdded(child: View?) {
|
||||
binding.pipBtn.isVisible = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
|
||||
|
||||
|
||||
binding.backArrowBtnLandscape.setOnClickListener { activity.onBackPressed() }
|
||||
binding.backArrowBtnPortrait.setOnClickListener { activity.onBackPressed() }
|
||||
|
||||
|
|
Loading…
Reference in a new issue