The MediaFile.getDate() method of media scanner will return the date
found in the metadata if available.  So if the picture has EXIF metadata
(which you'd expect for photos coming from a camera), the returned date
won't necessarily match the file mtime.  This is consistent with how we
handle dates for music files.

It isn't surprising that the date is close but not exactly the same as
the mtime for locally shot photos: some time would elapse between when
camera-app reads the current time to store in the metadata and when it
finishes writing the photo to disk.

We have a second method call getModificationTime() that will return the
mtime for a particular file.  This was likely added after the photos
scope was initially developed.  It was added in order to let us query
for the most recently added songs in the music scope, but could also be
used for the photo scope preview if you really want to ignore the date
from the metadata.

** Changed in: mediascanner2 (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1482735

Title:
  Preview with strange time for MTP pic

To manage notifications about this bug go to:
https://bugs.launchpad.net/photos-scope/+bug/1482735/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to