Skip to content
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

Fix timewarp and batch-edit so that --uuid option prevents processing of current selection. #1778

Closed
RhetTbull opened this issue Jan 8, 2025 · 2 comments · Fixed by #1781

Comments

@RhetTbull
Copy link
Owner

          Yes, I should update the help text. Also, I think if `--uuid` is used then the current selection should not be used. I'll open a new issue for this.

I've been thinking about how to make batch-edit and timewarp (and any future commands that operate on selected photos) more useful. One idea I'm thinking of is something like this to use osxphotos query:

osxphotos query --query-options --uuid-only | osxphotos timewarp --uuid-from-file -

This would pipe a list of uuids to timewarp for processing. This avoids having to clutter timewarp with all the query options. It would require a new option for osxphotos query that prints only uuid. (This can be accomplished today with osxphotos query --print "{uuid}" --quiet but that's cumbersome). Open to feedback on improving this approach.

Originally posted by @RhetTbull in #1777 (comment)

@oPromessa
Copy link
Contributor

I'm giving it a try to address this topic on --timewarp. Will see later about --batch-edit.

FYI, noticed the following behaviour of PhotosLibrary().selection

photos.extend(PhotosLibrary().selection)

On Monterey:

View Selection Command Message/Result
Library View NO Selection timewarp -i Nothing is done.
Viewing one Album NO Selection timewarp -i Operates over all pics in Album
Library view Pics Selectect timewarp -i Operates over pics selected
Viewing one Album Pics Selectect timewarp -i Operates over pics selected

oPromessa added a commit to oPromessa/osxphotos that referenced this issue Jan 15, 2025
…ile option prevents processing of current selection.

Fixes RhetTbull#1778

Fiz also for --uuid-from-file option in timewarp.

Side note: No tests added :(
@RhetTbull
Copy link
Owner Author

Thanks for the test data on selection behavior. I'm not sure I can control this as it's the built in behavior of Photos but might be good to document this.

oPromessa added a commit to oPromessa/osxphotos that referenced this issue Jan 16, 2025
oPromessa added a commit to oPromessa/osxphotos that referenced this issue Jan 16, 2025
…either --uuid nor --uuid-from-file are speci"

This reverts commit 3cff021.
oPromessa added a commit to oPromessa/osxphotos that referenced this issue Jan 16, 2025
… neither --uuid nor --uuid-from-file are used
RhetTbull pushed a commit that referenced this issue Jan 16, 2025
#1781)

* Fix timewarp and batch-edit 9not yet!) so that --uuid and uuid-from-file option prevents processing of current selection.
Fixes #1778

Fiz also for --uuid-from-file option in timewarp.

Side note: No tests added :(

* #1778 Make sure operation on selected pics only if neither --uuid nor --uuid-from-file are speci

* Revert "#1778 Make sure operation on selected pics only if neither --uuid nor --uuid-from-file are speci"

This reverts commit 3cff021.

* #1778 Make sure to operate timewarp on selected pics only if neither --uuid nor --uuid-from-file are used
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 a pull request may close this issue.

2 participants