make sure the file is a video, before getting its duration

This commit is contained in:
tibbi 2018-12-01 11:41:02 +01:00
parent 8c97d7952a
commit 33301d6282
1 changed files with 1 additions and 1 deletions

View File

@ -232,7 +232,7 @@ class MediaFetcher(val context: Context) {
} else {
val lastModified = file.lastModified()
var dateTaken = lastModified
val videoDuration = if (getVideoDurations) path.getVideoDuration() else 0
val videoDuration = if (getVideoDurations && isVideo) path.getVideoDuration() else 0
if (getProperDateTaken) {
dateTaken = dateTakens.remove(filename) ?: lastModified