This commit is contained in:
Thibault Deckers 2023-01-19 19:53:52 +01:00
parent 7bf83b4892
commit 7a0c27a313
2 changed files with 5 additions and 1 deletions

View file

@ -15,6 +15,7 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.launch
import java.io.FileNotFoundException
class MetadataEditHandler(private val contextWrapper: ContextWrapper) : MethodCallHandler {
private val ioScope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
@ -195,6 +196,8 @@ private class MetadataOpCallback(
} else {
"$errorCodeBase-mp4largeother"
}
} else if (throwable is FileNotFoundException) {
"$errorCodeBase-filenotfound"
} else {
"$errorCodeBase-failure"
}

View file

@ -55,6 +55,7 @@ class MimeTypes {
static const aviMSVideo = 'video/msvideo';
static const aviVnd = 'video/vnd.avi';
static const aviXMSVideo = 'video/x-msvideo';
static const dvd = 'video/dvd';
static const flv = 'video/flv';
static const flvX = 'video/x-flv';
static const mkv = 'video/mkv';
@ -90,7 +91,7 @@ class MimeTypes {
static const Set<String> _knownOpaqueImages = {jpeg};
static const Set<String> _knownVideos = {v3gpp, asf, avi, aviMSVideo, aviVnd, aviXMSVideo, flv, flvX, mkv, mkvX, mov, movX, mp2p, mp2t, mp2ts, mp4, mpeg, ogv, realVideo, webm, wmv};
static const Set<String> _knownVideos = {v3gpp, asf, avi, aviMSVideo, aviVnd, aviXMSVideo, dvd, flv, flvX, mkv, mkvX, mov, movX, mp2p, mp2t, mp2ts, mp4, mpeg, ogv, realVideo, webm, wmv};
static final Set<String> knownMediaTypes = {
anyImage,