Skip to content

Filtering by group leader/follower #569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Gendura opened this issue Mar 12, 2025 · 3 comments
Open

Filtering by group leader/follower #569

Gendura opened this issue Mar 12, 2025 · 3 comments

Comments

@Gendura
Copy link

Gendura commented Mar 12, 2025

This post follows a post of mine in a closed PR. This PR changed the group collection filters.

The discussion led to the following changes :

  • in 5.0 only the "group" collection filter exists. Targeting to the group ID.
  • while in 4.8 we had "group id" refering to what is now "group" AND a "grouping" collection filter targeting the group status ("leader", "follower" etc.)

I was pointing out my special usecase which is the following :
I want to delete all unnecessary RAW files (ie. not stared/not developed etc.). Most of the time I shoot RAW+JPEG so deleting a RAW is fine, but not all the time. And I don't want to delete a RAW file that seems unnecessary but doesn't have a corresponding JPEG.

With the old "grouping" collection filter I could target the ones being in a group and avoid deleting a RAW not having a JPEG follower (almost).

As suggested by wpferguson, a lua script is probably the best answer to my usecase.
Does that seem doable ? How can I do that ?

@wpferguson
Copy link
Member

while in 4.8 we had "group id" referring to what is now "group" AND a "grouping" collection filter targeting the group status ("leader", "follower" etc.)

In 4.6 there was the grouping filter, which separated grouped images into group leaders and group followers. The filter's definition of a group leader was any image whose id and group_id were the same which got filtered as a lot of "groups" of 1 image. There wasn't a way to display a complete group, which in your workflow meant there was no way to display the RAW (group leader) with the JPEG (group follower).

In 4.8 the grouping filter was removed and replaced with the group filter, which could display a complete group (leader and followers). So, in your workflow you could display a collection, then add a group rule to get all the image groups, then click down them one by one and look to see if the RAW had a follower. You wouldn't see any not rated/undeveloped RAW that didn't have a follower.

With the old "grouping" collection filter I could target the ones being in a group and avoid deleting a RAW not having a JPEG follower (almost).

IIUC you were using grouping -> group followers and then deleting any group leader that had group followers, which worked until you grouped 2 RAWs together.


With a script you could check each image in a collection and:

  • see if it's a RAW
  • see if it's unaltered
  • see if it's a group leader, or part of a group
  • see if it has duplicates or
  • see if has a follower (same name with different extension)
  • mark it as rejected if it's safe to delete (so you could review just in case before deleting) or
  • mark it with a color label (i.e. red) so it doesn't get accidentally deleted

@wpferguson
Copy link
Member

Here's a script that (IIUC) does what you want. It marks the unused RAWs as rejected. It creates a shortcut, so you just need to assign a keystroke to it to run it.

I tested against RAW/duplicates, RAW/JPG, and RAW/HIF.

unneeded_raws.zip

@Gendura
Copy link
Author

Gendura commented Mar 18, 2025

Thanks a lot that's fantastic !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants