Merge lp:~davidmhewitt/pantheon-photos/fix-1478642 into lp:~pantheon-photos/pantheon-photos/trunk

Proposed by David Hewitt
Status: Merged
Approved by: Corentin Noël
Approved revision: 3140
Merged at revision: 3144
Proposed branch: lp:~davidmhewitt/pantheon-photos/fix-1478642
Merge into: lp:~pantheon-photos/pantheon-photos/trunk
Diff against target: 17 lines (+5/-1)
1 file modified
src/Photo.vala (+5/-1)
To merge this branch: bzr merge lp:~davidmhewitt/pantheon-photos/fix-1478642
Reviewer Review Type Date Requested Status
Photos Devs Pending
Review via email: mp+315816@code.launchpad.net

Commit message

Preserve metadata when opening photo directly from the filesystem

Description of the change

Timestamp is currently not imported from original photo file when directly opening the file from the FS rather than being in the library.

Fix ensures that the timestamp is imported even while opening the file directly.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Photo.vala'
2--- src/Photo.vala 2017-01-12 18:13:48 +0000
3+++ src/Photo.vala 2017-01-27 19:55:14 +0000
4@@ -1200,8 +1200,12 @@
5 try {
6 interrogator.interrogate ();
7 DetectedPhotoInformation? detected = interrogator.get_detected_photo_information ();
8- if (detected != null)
9+ if (detected != null) {
10 params.row.master.file_format = detected.file_format;
11+ MetadataDateTime? date_time = detected.metadata.get_exposure_date_time ();
12+ if (date_time != null)
13+ params.row.exposure_time = date_time.get_timestamp ();
14+ }
15 } catch (Error err) {
16 debug ("Unable to interrogate photo file %s: %s", file.get_path (), err.message);
17 }

Subscribers

People subscribed via source and target branches

to all changes: