leafpicrevived icon indicating copy to clipboard operation
leafpicrevived copied to clipboard

Date Sort not working properly

Open Vulksgren opened this issue 5 years ago • 3 comments

For both descending and ascending, I noticed pictures of various dates towards the top, some I took almost a year ago. I have since moved the pictures, but can try to replicate the problem and provide screenshots if needed. Using a Samsung Note 10+ with the latest android updates.

Vulksgren avatar Apr 01 '21 22:04 Vulksgren

I noticed this as well, however the same pictures were out of place in a stock gallery app on the same device. Upstream bug?

factorial52 avatar Apr 15 '21 04:04 factorial52

Going to picture details displays 1970 as a date which is obviously wrong. Now, I don't know android at all, but I can see 3 dates available in MediaStore, leafpic uses DATE_TAKEN (I assume it's EXIF metadata but dunno) which in my case returned 0 for all of my pictures. I replaced DATE_TAKEN with DATE_MODIFIED (I assume it's a file attribute instead) and it worked wonders for me. You can try it out by building https://github.com/DanielChabrowski/leafpicrevived/tree/dch/use-date-modified.

However, I don't think this is a proper solution to the issue - leafpic should probably allow sorting by both with some sort of warning that sorting with DATE_TAKEN might be wrong.

DanielChabrowski avatar Oct 30 '21 17:10 DanielChabrowski

DATE_TAKEN ist the Key for the Date when the Picture or file got created. In case of 1970 maybe the photographer knew that it is a picture of the 70s? DATE_MODIFIED is the Key for the Date when the File got moved or changed. In Case of the Pictures you made with your Camera you want to sort sith DATE_TAKEN. In all other cases DATE_MODIFIED might be the better choice. So the best would be to add a sorting for changedate.

metzger100 avatar Dec 22 '21 10:12 metzger100