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:15:00 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-04-03 13:15:00 +0200
commitbc53b714952ceb0afd02b591403cb2bc0cb1aab9 (patch)
tree8ff57ed1a1265b2c87f37e3c8fa19876faf80990 /src/data_imports/DataImportSource.vala
parentd4c476947425c12b1984fedea16f8a8c42a07ba3 (diff)
parentc43dfb815a4951b8248f4f0e98babe4f80204f03 (diff)
Merge tag 'upstream/0.22.0'
Upstream version 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 {