summaryrefslogtreecommitdiff
path: root/src/data_imports/DataImportSource.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-04-03 13:14:53 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-04-03 13:14:53 +0200
commitc43dfb815a4951b8248f4f0e98babe4f80204f03 (patch)
tree82745ed2353757c41ea1865bad9ac7a1b0a8a366 /src/data_imports/DataImportSource.vala
parent2785a691b958a79a1dd606c445188c71c3f58b3c (diff)
Imported Upstream version 0.22.0upstream/0.22.0
Diffstat (limited to 'src/data_imports/DataImportSource.vala')
-rw-r--r--src/data_imports/DataImportSource.vala15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/data_imports/DataImportSource.vala b/src/data_imports/DataImportSource.vala
index d7e8ec8..f60c06d 100644
--- a/src/data_imports/DataImportSource.vala
+++ b/src/data_imports/DataImportSource.vala
@@ -1,4 +1,4 @@
-/* Copyright 2011-2014 Yorba Foundation
+/* Copyright 2011-2015 Yorba Foundation
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
@@ -48,9 +48,16 @@ public class DataImportSource {
warning("Could not get file metadata for %s: %s", get_filename(), e.message);
metadata = null;
}
-
- title = (metadata != null) ? metadata.get_title() : null;
- exposure_time = (metadata != null) ? metadata.get_exposure_date_time() : null;
+ title = db_photo.get_title();
+ if (title == null) {
+ title = (metadata != null) ? metadata.get_title() : null;
+ }
+ time_t? date_time = db_photo.get_exposure_time();
+ if (date_time != null) {
+ exposure_time = new MetadataDateTime(date_time);
+ } else {
+ exposure_time = (metadata != null) ? metadata.get_exposure_date_time() : null;
+ }
PhotoPreview? preview = metadata != null ? metadata.get_preview(0) : null;
if (preview != null) {
try {