Programmatically selecting Top Item for a stack

Post Reply
marklevine
Posts: 55
Joined: 26 Dec 21 23:07

Programmatically selecting Top Item for a stack

Post by marklevine »

This is related to issues I've been raising in a separate post where it is difficult to control assignment of Stack Markers through Custom File Masks. Now I am documenting issues related to assigning the Top Item to a stack programmatically. This image shows a screen shot where two images, both created the exact same way, yet are showing different top items.
Screenshot 2023-10-27 095751.png
Screenshot 2023-10-27 095751.png (211.8 KiB) Viewed 10435 times
To create the edited versions, I select the raw file, edit in Photolab, where I export a filename containing "-edited". For the first stack, the original "JPG sidecar" is selected as Top Item. For the second file, the newly imported, edited version is selected. Grrrrr! Note that both stacks contain three images. The stack markers have been properly assigned. White indicates "edited". Green indicates "JPG sidecar". Pink indicates "raw". The gray stack marker applies to all files, so I have a backup way to reach files that aren't otherwise tagged. The count of images in the gray marker should match the total number of images in the stack and, in these two cases, it successfully contains all three stack members.

The top items were selected with the rule "First JPEG else RAW". This is probably an incorrect rule to use, but lacking documentation on what "First JPEG" means, it is a guess at my intentions. I want an edited version on top. That is, the most recently added JPG, which does seem to get assigned as "First JPEG" sometimes.
marklevine
Posts: 55
Joined: 26 Dec 21 23:07

Re: Programmatically selecting Top Item for a stack

Post by marklevine »

For completeness, I destroyed the two stacks, removed all images from the database, scanned the folder for new files, refreshed the screen to get rid of weird partial duplicate stacks, and got this perfect result.
Screenshot 2023-10-27 101712.png
Screenshot 2023-10-27 101712.png (209.71 KiB) Viewed 10434 times
Post Reply