diff --git a/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/MetadataEditHandler.kt b/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/MetadataEditHandler.kt index bb349855a..f8915a8f6 100644 --- a/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/MetadataEditHandler.kt +++ b/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/MetadataEditHandler.kt @@ -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" } diff --git a/lib/ref/mime_types.dart b/lib/ref/mime_types.dart index 744fc9712..4a993fe42 100644 --- a/lib/ref/mime_types.dart +++ b/lib/ref/mime_types.dart @@ -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 _knownOpaqueImages = {jpeg}; - static const Set _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 _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 knownMediaTypes = { anyImage,