mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-17 12:30:36 +01:00
make sure the file is a video, before getting its duration
This commit is contained in:
parent
8c97d7952a
commit
33301d6282
@ -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…
x
Reference in New Issue
Block a user