fujifilm_dynamic_range: only load if exiftool present

Fail to load if exiftool binary is not present. This may be better
than silently (in UI) failing to read dyanmic range data.
This commit is contained in:
Dan Torop
2022-02-13 22:14:57 -05:00
parent d3cf564b71
commit 2bc55d00bb

View File

@@ -2,7 +2,7 @@
Compensate for Fujifilm raw files made using "dynamic range".
Copyright (C) 2021 Dan Torop <dant@pnym.net>
Copyright (C) 2021, 2022 Dan Torop <dant@pnym.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -116,6 +116,11 @@ local function destroy()
dt.destroy_event("fujifilm_dr", "post-import-image")
end
if not df.check_if_bin_exists("exiftool") then
dt.print_log("Please install exiftool to use fujifilm_dynamic_range")
error "[fujifilm_dynamic_range] exiftool not found"
end
dt.register_event("fujifilm_dr", "post-import-image",
detect_dynamic_range)