nextcloud / android

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

Details of an image shall show meta-data #481

Open kollix opened 7 years ago

kollix commented 7 years ago

Actual behaviour

When viewing a photo I have taken and view the details, it just shows me the file size, the type and the file modification date, which is probably the date when I uploaded to file to the server. However the photo was taken years ago (where there was no nextcloud server). I'm interested in the information "when was the photo taken" ? Check out Android Gallery. It shows a lot of meta data (which is not really needed) , but the most important information is the "shot date"

Expected behaviour

Show the "photo shot date". Gallery shows this also as an overlay information when you tap on the photo (not only in the details dialog). Best would be to also sort according this date, not the file date

Steps to reproduce

  1. show photo
  2. open details

Environment data

Android version: 4.4.2

Device model: Samsung Galaxy S4 mini

Stock or customized system: stock

Nextcloud app version: 1.4.0

Nextcloud server version: owncloud 8.2.9

tobiasKaminsky commented 7 years ago

This information is stored in exif header. But we only have this header if the file is downloaded. So we also cannot use it to sort the files by "shot date".

I think the right solution for this is that the file date is not the date the file was uploaded to the server but when the file was actually created.

tobiasKaminsky commented 7 years ago

Which might be this: https://github.com/nextcloud/android/pull/451 @AndyScherzinger any reason why you use the modification date and not the creation date?

AndyScherzinger commented 7 years ago

The modification date should always be the right one for any file, since when sorting by date you want the latest, last changed being at the top. While the fix you are referring to should solve it using the modification date and not the upload date... So that PR might solve this issue here (in another way though)

kollix commented 7 years ago

"This information is stored in exif header. But we only have this header if the file is downloaded."

Which is fine since when you SHOW the image you already have it downloaded and then you can show the exif information in the details dialog (or at least the shot-date as overlay like in Android Gallery).

And I'm pretty sure you could also ask the server for image exif information only without downloading the whole file.

The sorting comment was just a side note.

wowangus commented 7 years ago

@AndyScherzinger true. last modification date is always a reference / truth about of actual last modified datetime of a file, a photo, a screenshot, a video or whatever.

The issues with currently released Nextcloud android app is that the mtime of uploaded data isn't retain as if exactly the same as the original file. Since then, if users have uploaded their media assets via the currently released Nextcloud android app, those uploaded files are listed with a "modified time" as of the upload datetime.

In fact, users might likely expect the modified time of uploaded copy is same as the one of their original copy. I guess that might explain what @kollix have been seeing, while in this case, "sort by modified" becomes handicapped by false mtime.

In addition, there is also another issue with the mtime of downloaded file that mtime is once again not retain as if exactly same as the one at Nextcloud server.

The issues overall becomes a bigger one if connecting a chain of local(original)/upload/download via the app, since there are going to have at least 3 possible ambiguous mtime, 1. original mtime, 2. "mtime" as upload, 3. "mtime" as of per downloads

AndyScherzinger commented 7 years ago

@wowangus True. For the manual uploads I opened #451 and for photos we should maybe move to exif header info if available and this might also be an issue for automatic uploads too.

@kollix the server does not of an API to ask for exif data since the server is a cloud storage solution in general and not a specialized photo centric solution so as also hinted by you when having a photo downloaded we could then of course read the exif data, while this since some more work to upgrade our environments and build pipelines to the latest AppCompat libs to actually have a (more or less proper) api to read the exif data.

PhilippSchlesinger commented 10 months ago

There is a separate issue https://github.com/nextcloud/android/issues/10425 regarding sorting by "date taken".

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 makes metadata available via API for android as well.