diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:43:08 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:43:08 +0200 |
commit | 2b3f22361da0c1d8e6ce70d71352821758186db7 (patch) | |
tree | 5d10633b47369b3aa52a05bf889ede0dbe5ee108 /src/data_imports/DataImportSource.vala | |
parent | 211da5fc3048ca2b6ccee2166b0aaaade55cb84f (diff) | |
parent | dc6c76eb04dfe3d4262a1806808f0bc0bf523238 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/data_imports/DataImportSource.vala')
-rw-r--r-- | src/data_imports/DataImportSource.vala | 12 |
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 |