Skip to content

Conversation

@shipurjan
Copy link

Multiple Selected Takes Per Group

This PR replaces the single "best take" concept with support for selecting multiple photos per group. Previously, you could only mark one photo as the "best take" in each group. Now you can select as many photos as you want, including zero.

What Changed

The core change is replacing the single Photo bestTake field in PhotoGroup with a LinkedHashSet<Photo> selectedTakes. This maintains insertion order while preventing duplicates.

Selection now works as a toggle - pressing spacebar or clicking "Set as Selected Take" will add or remove a photo from the group's selected set. You can have 0, 1, 5, or all photos selected in a group. When exporting, only selected photos get copied, and groups with no selections are skipped.

Configuration

Added a new DEFAULT_SELECTION_STRATEGY config option that controls which photos are automatically selected when groups are created:

  • "first" - selects the first photo (default, maintains existing behavior)
  • "last" - selects the last photo
  • "first_and_last" - selects both first and last photos
  • "all" - selects all photos in the group
  • "none" - no automatic selection (you manually select what you want)

UI Changes

Groups with 0 selections now show at 50% opacity so you can easily see which groups haven't been reviewed yet. The currently viewed photo in the bottom thumbnail strip has a 3px red border.

All menu items and internal code now use "selected take" terminology instead of "best take". The star indicator now appears on all selected photos, not just one.

Technical Details

The selection strategy is applied after all photos are added to each group (in GroupingEngine), not when the first photo is added. This was a bug in the initial implementation - strategies like "last" and "first_and_last" need to know all the photos in the group before they can work correctly.

Group thumbnails always use the first photo in the group for consistency, regardless of what's selected. This simplifies the logic and fixes edge cases with the "none" strategy.

Export now handles filename collisions by appending _1, _2, etc. when multiple selected photos have the same filename.


This was implemented with help from Claude Code.

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

Successfully merging this pull request may close these issues.

1 participant