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

Add a recursive setting - fix #219 #224

Merged
merged 4 commits into from
May 7, 2024
Merged

Add a recursive setting - fix #219 #224

merged 4 commits into from
May 7, 2024

Conversation

Huluti
Copy link
Owner

@Huluti Huluti commented May 6, 2024

TODO:

  • update POT file
  • to be tested

@Huluti Huluti added this to the 1.19.2 milestone May 6, 2024
@ARAKHN1D
Copy link
Contributor

ARAKHN1D commented May 6, 2024

I tested this on my system and found a couple issues:

  • Using either recursive or non-recursive compression on a folder throws a FileNotFoundError. I looked into it and found out that in both of the get_image_files_from_folder functions, appending the image_file URI using get_uri() instead of image_file itself fixes the error.
  • When using non-recursive compression on a folder with nested folders inside of it, the nested folders don't get searched for files. I'm not sure if this is intentional or not.

Besides those two things, I can confirm that this does fix #219. Nested folders don't get shown as unsupported formats anymore. I do have a question, though—is there a difference between recursive and non-recursive compression? Do they have certain pros and cons that mean both are viable options for different situations, or is one better than the other in all areas? Just curious.

@Huluti
Copy link
Owner Author

Huluti commented May 7, 2024

Thanks for testing this and finding this error (I wrote the code in the car and hadn't tried it yet 😅).

  • When using non-recursive compression on a folder with nested folders inside of it, the nested folders don't get searched for files. I'm not sure if this is intentional or not.

That's the point of this "Recursive Compression" setting. Recursive mean that Curtail will go through all nested subdirectories to find images if enabled. If not, only images from the parent folder will be compressed.

I've set the parameter to true by default, leaving the option to deactivate it if you don't want it.

Is that clearer?

@Huluti Huluti merged commit a61e754 into master May 7, 2024
1 check passed
@Huluti Huluti deleted the recursive-setting branch May 7, 2024 08:42
@ARAKHN1D
Copy link
Contributor

ARAKHN1D commented May 7, 2024

Ah, my mistake. That's clearer, thank you.

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.

None yet

2 participants