mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-29 09:39:03 +03:00
add error logging when ffmpeg download fails
This commit is contained in:
parent
68fe864c57
commit
dd16258a9c
1 changed files with 5 additions and 1 deletions
|
@ -497,7 +497,11 @@ class AnimeDownloader(
|
|||
// TODO: Support other file formats here as well (ffprobe or something, idk)
|
||||
val ffmpegOptions = FFmpegKitConfig.parseArguments(headerOptions + " -i '${video.videoUrl}' -c copy \"$escapedFilename\"")
|
||||
val executeCallback = ExecuteCallback {
|
||||
if (it.state != SessionState.COMPLETED) tmpDir.findFile("$filename.mp4")?.delete()
|
||||
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
|
||||
var nextLineIsDuration = false
|
||||
|
|
Loading…
Reference in a new issue