summaryrefslogtreecommitdiff
path: root/src/data_imports/DataImportSource.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-01 14:35:32 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-01 14:35:32 +0200
commite230b6f78546827521107be23797048482c8b193 (patch)
tree948c1e77382c484819ea399bba4edcdc19cc6bf0 /src/data_imports/DataImportSource.vala
parent211da5fc3048ca2b6ccee2166b0aaaade55cb84f (diff)
parent49120f48474fc8fdc2448c75d961bc238213cfac (diff)
Update upstream source from tag 'upstream/0.28.2'
Update to upstream version '0.28.2' with Debian dir 811236a8e9a1308bf427065dcb6270419ff4f965
Diffstat (limited to 'src/data_imports/DataImportSource.vala')
-rw-r--r--src/data_imports/DataImportSource.vala12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/data_imports/DataImportSource.vala b/src/data_imports/DataImportSource.vala
index 9d16761..ba00be3 100644
--- a/src/data_imports/DataImportSource.vala
+++ b/src/data_imports/DataImportSource.vala
@@ -58,15 +58,11 @@ public class DataImportSource {
} else {
exposure_time = (metadata != null) ? metadata.get_exposure_date_time() : null;
}
- PhotoPreview? preview = metadata != null ? metadata.get_preview(0) : null;
- if (preview != null) {
- try {
- uint8[] preview_raw = preview.flatten();
- preview_md5 = md5_binary(preview_raw, preview_raw.length);
- } catch(Error e) {
- warning("Could not get raw preview for %s: %s", get_filename(), e.message);
- }
+
+ if (metadata != null) {
+ preview_md5 = metadata.thumbnail_hash();
}
+
#if TRACE_MD5
debug("Photo MD5 %s: preview=%s", get_filename(), preview_md5);
#endif