make sure the file is a video, before getting its duration
This commit is contained in:
parent
8c97d7952a
commit
33301d6282
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue