nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.2k stars 1.75k forks source link

Sort Media view not by creation time but by EXIF date #10425

Open SpamReceiver opened 2 years ago

SpamReceiver commented 2 years ago

Steps to reproduce

  1. Open "Media" view, wait until photos will be displayed
  2. Observe the section headers displaying a month and compare the date the photos have been taken

Expected behaviour

The photos are displayed regarding the month they have been taken. As the section headers are sorted descendently, the photos inside the section should be sorted descendently, too.

Actual behaviour

The photos are displayed in totally mixed sections. Old photos in current month, and alike. It seems that the photos are sorted somehow by "file modification date", not by "EXIF date taken".

Can you reproduce this problem on https://try.nextcloud.com?

Not tried.

Environment data

Android version: 11

Device model: Fairphone 4

Stock or customized system: stock

Nextcloud app version: 3.20.3

Nextcloud server version: 24

Reverse proxy: none

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

SpamReceiver commented 2 years ago

As a fallback, if "EXIF date taken" is not available (e.g. for BMP or for video files), the user should have the option to select an attribute for sorting. My filenames are all prefixed with proper date and time (yyyy-mm-dd_hh-mm-ss), so I would choose this for sorting. File creation time would be second best, if this maintained properly from camera to Nextcloud upload. File modification time would be last and worst option.

AlvaroBrey commented 2 years ago

Not sure if we can do EXIF date, but we probably can do creation time.

SpamReceiver commented 2 years ago

I don't agree with labelling this as "enhancement" as time-sorting photos by anything else than the time they have been taken is wrong.

AlvaroBrey commented 2 years ago

I don't agree with labelling this as "enhancement" as time-sorting photos by anything else than the time they have been taken is wrong.

This is actually up for discussion I think. For example, if I take a photo and later modify it with Snapseed and overwrite it, I probably will want it sorted by the date I finished modifying it, not by the date it was taken.

I guess if we want to keep everyone happy we'll need to add sorting options.

SpamReceiver commented 2 years ago

Yes, I agree with adding sorting options :-)

svenb1234 commented 2 years ago

I think that if there is EXIF information available, it should be used. This includes date modified.

The file's properties are only the last resort in case there is no other information available. E.g. for pictures which are not photos and thus do not have any EXIF information.

IMHO a file view uses the file's properties as primary source for information - and maybe more as an extra. A media view uses the media's properties as primary source for information. Otherwise it is just another file view showing thumbnails.

Yet this is not something for the android app, since that information should be extracted by the server and made available to the clients. Not sure if there are more genuine enhancement requests but https://github.com/nextcloud/photos/issues/226 is an example where the features needed to work with media tags are requested.

SpamReceiver commented 2 years ago

Well, https://github.com/nextcloud/photos/issues/226 requests many useful features, and I could add even more.

Does the Android app rely on server features to populate the "Media" view? Does the server lack parsing the EXIF metadata and/or providing this metadata on the interface to the Android app?

What is needed to analyse these questions? - My programming skills are limited, and I would need guidance....

PhilippSchlesinger commented 10 months ago

A corresponding issue https://github.com/nextcloud/photos/issues/87 in Nextcloud Photos got closed via PR https://github.com/nextcloud/photos/pull/2125 recently. This is part of https://github.com/nextcloud/server/issues/40676 which should make the metadata available for android as well.