From 914a17fb4ecf04c88b79fdb723398651fb792e6e Mon Sep 17 00:00:00 2001 From: Bill Ferguson Date: Mon, 6 Jan 2025 22:06:35 -0500 Subject: [PATCH] contrib/AutoGrouper - create group leader for first image in table. Add grouped images to the group leader and not the previous image. --- contrib/AutoGrouper.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/AutoGrouper.lua b/contrib/AutoGrouper.lua index 6760937..889c9af 100644 --- a/contrib/AutoGrouper.lua +++ b/contrib/AutoGrouper.lua @@ -132,10 +132,11 @@ local function main(on_collection) for i, image in ipairs(images) do if i == 1 then prev_image = image + image:make_group_leader() elseif string.match(image.exif_datetime_taken, '[%d]') ~= nil then --make sure current image has a timestamp, if so check if it is within the user specified gap value and add to group local curr_image = image if GetTimeDiff(curr_image, prev_image) <= GUI.gap.value then - images[i]:group_with(images[i-1]) + images[i]:group_with(images[i-1].group_leader) end prev_image = curr_image end