Add check for WARNING lines complaining about files with no faces in the faces directory

This commit is contained in:
Bill Ferguson
2020-01-22 13:15:14 -05:00
parent 11e25a21fa
commit 1eafae6c6f

View File

@@ -259,13 +259,15 @@ local function face_recognition ()
dt.print(_("processing results..."))
local result = {}
for line in io.lines(OUTPUT) do
local file, tag = string.match (line, "(.*),(.*)$")
tag = string.gsub (tag, "%d*$", "")
dt.print_log ("File:"..file .." Tag:".. tag)
if result[file] ~= nil then
table.insert (result[file], tag)
else
result[file] = {tag}
if not string.match(line, "^WARNING:") then
local file, tag = string.match (line, "(.*),(.*)$")
tag = string.gsub (tag, "%d*$", "")
dt.print_log ("File:"..file .." Tag:".. tag)
if result[file] ~= nil then
table.insert (result[file], tag)
else
result[file] = {tag}
end
end
end