mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
make the Date Taken from Fix Date Taken value be higher priority than mediastore
This commit is contained in:
@@ -407,8 +407,8 @@ class MediaFetcher(val context: Context) {
|
|||||||
try {
|
try {
|
||||||
val dateTaken = cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
|
val dateTaken = cursor.getLongValue(MediaStore.Images.Media.DATE_TAKEN)
|
||||||
if (dateTaken != 0L) {
|
if (dateTaken != 0L) {
|
||||||
val path = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME)
|
val name = cursor.getStringValue(MediaStore.Images.Media.DISPLAY_NAME)
|
||||||
dateTakens[path] = dateTaken
|
dateTakens[name] = dateTaken
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
}
|
}
|
||||||
@@ -416,6 +416,10 @@ class MediaFetcher(val context: Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
context.dateTakensDB.getDateTakensFromPath(folder).forEach {
|
||||||
|
dateTakens[it.filename] = it.taken
|
||||||
|
}
|
||||||
|
|
||||||
return dateTakens
|
return dateTakens
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user