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 {
|
} else {
|
||||||
val lastModified = file.lastModified()
|
val lastModified = file.lastModified()
|
||||||
var dateTaken = lastModified
|
var dateTaken = lastModified
|
||||||
val videoDuration = if (getVideoDurations) path.getVideoDuration() else 0
|
val videoDuration = if (getVideoDurations && isVideo) path.getVideoDuration() else 0
|
||||||
|
|
||||||
if (getProperDateTaken) {
|
if (getProperDateTaken) {
|
||||||
dateTaken = dateTakens.remove(filename) ?: lastModified
|
dateTaken = dateTakens.remove(filename) ?: lastModified
|
||||||
|
|
Loading…
Reference in a new issue