summaryrefslogtreecommitdiff
path: root/src/data_imports/DataImportSource.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-07-09 12:10:38 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-07-09 12:10:38 +0200
commit709e2d6f5652ec90c194a4ec2b530bebc6f952cb (patch)
tree496b2f3899e1d5728ee9ae76095cc5056c317447 /src/data_imports/DataImportSource.vala
parentf1353e9ffd34db5f755c7da0b3f9c10638fbfd38 (diff)
parent5c8be07095cc04a6d8a95204b0504fd7ab030154 (diff)
Merge branch 'release/0.28.3-1'0.28.3-1
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