Skip to content

Commit 8a8f633

Browse files
authored
Merge pull request darktable-org#243 from piterdias/master
Fixes face_recognition.lua failing to run in a fresh installation of darktable and adds some more logs
2 parents 749f5b8 + 71207e8 commit 8a8f633

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

contrib/face_recognition.lua

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,6 @@ local function _(msgid)
6666
return gettext.dgettext("face_recognition", msgid)
6767
end
6868

69-
-- preferences
70-
71-
if not dt.preferences.read(MODULE, "initialized", "bool") then
72-
reset_preferences()
73-
save_preferences()
74-
dt.preferences.write(MODULE, "initialized", "bool", true)
75-
end
76-
7769
local function build_image_table(images)
7870
local image_table = {}
7971
local file_extension = ""
@@ -242,7 +234,10 @@ local function face_recognition ()
242234

243235
-- Get path of exported images
244236
local path = df.get_path (img_list[1])
237+
dt.print_log ("Face recognition: Path to known faces: " .. knownPath)
245238
dt.print_log ("Face recognition: Path to unknown images: " .. path)
239+
dt.print_log ("Face recognition: Tag used for unknown faces: " .. unknownTag)
240+
dt.print_log ("Face recognition: Tag used if non person is found: " .. nonpersonsfoundTag)
246241
os.setlocale("C")
247242
local tolerance = dt.preferences.read(MODULE, "tolerance", "float")
248243

@@ -470,5 +465,13 @@ dt.register_lib(
470465

471466
fc.tolerance.value = dt.preferences.read(MODULE, "tolerance", "float")
472467

468+
-- preferences
469+
470+
if not dt.preferences.read(MODULE, "initialized", "bool") then
471+
reset_preferences()
472+
save_preferences()
473+
dt.preferences.write(MODULE, "initialized", "bool", true)
474+
end
475+
473476
--
474477
-- vim: shiftwidth=2 expandtab tabstop=2 cindent syntax=lua

0 commit comments

Comments
 (0)