FossifyOrg / Gallery

Browse your memories without any interruptions with this photo and video gallery
https://www.fossify.org
GNU General Public License v3.0
1.78k stars 61 forks source link

Capture Date sometimes not honored, but modification date used instead. #267

Closed george84 closed 4 months ago

george84 commented 4 months ago

Checklist

Affected app version

1.1.3

Affected Android/Custom ROM version

Android 14

Affected device model

OPPO reno 8 5G

How did you install the app?

Google Play Store

Steps to reproduce the bug

Go to display list of photos. Note the date of group. Click on a photo in group and show info. -> capture date does not match group date. This only occurs on some files. I had the impression that photos with GPS info are correct.

Expected behavior

I expect the photos to be grouped by capture date.

Actual behavior

Sometimes they are grouped by file date On screenshots you see the photos grouped under 8.6.2015. If you look at detail of third photo it displays capture date 7.5.2013. This means the photo has the correct capture date (EXIF and IPTC info) I made sure that in settings I had selected "group by capture date".

Screenshots/Screen recordings

Screenshot_2024-07-22-18-00-47-06_88ecc4b3b334cca6fa7678692a75c1df Screenshot_2024-07-22-18-01-20-72_88ecc4b3b334cca6fa7678692a75c1df

Additional information

2013_0507_070248AA

Aga-C commented 4 months ago

Have you tried selecting images with wrong grouping and using Fix date taken in three dots menu?

george84 commented 4 months ago

Thank you for fast reply. Using

Fix date taken

will fix problem. By doing Select all it will even fix all pictures.

Further analysis shows that the original files are not modified by this fix. Searching problems in Simple Gallery I found that many people had similar problem. Can you please give a hint where in your code this fix happens so that I could possibly adapt the original files so that they are displayed correctly without having to use the fix. Master for photos is on a Windows machine and smartphone is only used to show photos to friends.

Aga-C commented 4 months ago

It doesn't modify files, it just updates metadata in Android's media store. Sometimes it doesn't have proper data when files aren't created on the same device. Here's the code: https://github.com/FossifyOrg/Gallery/blob/eefe0b65aff469ac621f604eb1a06140bf2f226c/app/src/main/kotlin/org/fossify/gallery/extensions/Activity.kt#L530