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

Enhancement #1774: Add option to bypass checking for .osxphotos_export.db in the export folder. #1775

Merged
merged 6 commits into from
Jan 5, 2025

Conversation

oPromessa
Copy link
Contributor

Enhancement #1774: Add option to bypass checking for .osxphotos_export.db in the export folder.

  • Reusing option --ignore-exportdb.
  • Removed exclusivity of options --update and --ignore-exportdb.
  • Search for exportdb files logic will also not be done if options --exportdb or --no-exportdb are used. No matter the use or not of --ignore-exportdb.
  • Adjusted option definition. Maybe a bit lengthy 😞 !
  • Renamed function find_files_in_branch into find_first_file_in_branch and revised logic to return on first occurrence found, when --ignore-exportdb is not active.
  • When --ignore-exportdb is used without --update added warnings osxphotos will continue to make it compatible with interactive questions presented.

Missing adjustment to find_first_file_in_branch.
* Removed exclusivity of options --update and --ignore-exportdb
* Search for files logic will also **not be done** in case options --exportdb or --no-exportdb are used.
* Adjusted option definition. Maybe a bit lengthy 😞 !
* Renamed function find_files_in_branch into find_first_file_in_branch and revised logic to return on first occurrence found, when --ignore-exportdb is not active.
* When --update is not used, added warnings when --ignore-exportdb is in use to make it compatible with interactive questions.
Copy link
Owner

@RhetTbull RhetTbull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. find_first_file_in_branch should now return either None or a single str with the file path instead of a list or empty list.
Also, please change other_db_files to other_db_file as we won't know if there's more than one and the subsequent warning that lists out the files to now say "file" vs "files". This will help the code be more clear down the road for maintenance.
Otherwise this looks good!

- find_first_file_in_branch should now return either None or a single str with the file path instead of a list or empty list.
- Change other_db_files to other_db_file and the subsequent warning that lists out the files to now say "file" vs "files".
@oPromessa oPromessa requested a review from RhetTbull January 4, 2025 18:27
@RhetTbull RhetTbull merged commit 13d0481 into RhetTbull:main Jan 5, 2025
5 checks passed
@RhetTbull
Copy link
Owner

Thanks for implementing this! I have a few more things I'm working on before the next release.

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.

2 participants