diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/AnimeDownloader.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/AnimeDownloader.kt index 63da1b8e2..4cfb91a4b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/AnimeDownloader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/AnimeDownloader.kt @@ -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 diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/player/PlayerControlsView.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/player/PlayerControlsView.kt index d33d78008..e58d04ce0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/player/PlayerControlsView.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/player/PlayerControlsView.kt @@ -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() }