fix #909, rely on date_time_original before date_time
This commit is contained in:
parent
88d4cba636
commit
7fc8d4a3d8
|
@ -47,7 +47,7 @@ ext {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:4.6.13'
|
implementation 'com.simplemobiletools:commons:4.6.14'
|
||||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
|
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
|
||||||
implementation 'com.android.support:multidex:1.0.3'
|
implementation 'com.android.support:multidex:1.0.3'
|
||||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||||
|
|
|
@ -295,7 +295,8 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
||||||
val mediumDao = activity.galleryDB.MediumDao()
|
val mediumDao = activity.galleryDB.MediumDao()
|
||||||
val paths = getSelectedPaths()
|
val paths = getSelectedPaths()
|
||||||
for (path in paths) {
|
for (path in paths) {
|
||||||
val dateTime = ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME) ?: continue
|
val dateTime = ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME_ORIGINAL)
|
||||||
|
?: ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME)
|
||||||
val format = "yyyy:MM:dd kk:mm:ss"
|
val format = "yyyy:MM:dd kk:mm:ss"
|
||||||
val formatter = SimpleDateFormat(format, Locale.getDefault())
|
val formatter = SimpleDateFormat(format, Locale.getDefault())
|
||||||
val timestamp = formatter.parse(dateTime).time
|
val timestamp = formatter.parse(dateTime).time
|
||||||
|
|
Loading…
Reference in New Issue