-
-
Notifications
You must be signed in to change notification settings - Fork 418
feat: add thumbnail generation toggle #1057
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So there's an interesting quirk of the functionality here that I'd like to explain before going on with the rest of the review:
First, I've been meaning to add an option to toggle off thumbnails for quite some time. Non-cached thumbnails (mostly audio files with waveform generation) can take a non-trivial amount of time to generate, as you're already familiar with. #930 is a step in that direction, but I feel that it would be even more appropriate to have the ability to toggle off all thumbnail generation rather than audio waveforms specifically (at least for now, being the first setting of its kind in here).
That being said, here's the quirk of the code here: The setting check isn't surrounding the audio waveform generation step, but rather the entire non-cached thumbnail generation step. Meaning that only the (fast) cached thumbnails are shown while no new thumbnails are generated and default icons are used for everything else. So in a roundabout way, this is actually the behavior I prefer over the original intention of #930.
For the rest of this review I'll be referring to this viewpoint and making suggested name changes for various variables and translations.
Outside of implementing any review feedback and fixing up the Ruff and MyPy errors, this should be pretty good to go if you'd like to continue in this direction 👍
got it. I think I misunderstood that part of the code, assuming that it is meant only for sound (because of the comment block above it). Now that I read it again, I realised it is a handle for all filetypes. Do you want me to do the changes on github, or rebase/squash it or add additional commits ? |
Additional commits would be best, as all the commits here will eventually get squashed into a single one when merging into main. And be careful if you decide to commit the review suggestions directly from GitHub as they don't change all instances of the variable names. Personally I feel it's easier to just make all the changes in your editor. |
Sounds good, that's what I prefer too. |
I also take the liberty to shift the inner edit: it looks like the github diff made it look like there are a lot of changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me do it since I might add a few more features later on and it might be good to go through the full workflow once. |
Do you want me to rebase it to the new main to fix the conflict ? |
Sounds good, future PRs would be greatly appreciated!
You can go ahead and rebase or do a merge commit from main into this one, or if you could manually fix the conflict by adding the |
Agree, I generally dislike force pushing during PR because of how messy it might become, but I feel like the diff might be clearer if it is a diff against the new main rather than the old main. |
08ffdf9
to
f0f6286
Compare
Thank you for your work on this! |
Summary
#930 is a blocker for me because I mainly use it for sound at the moment.
Haven't wrote python for a while and isn't really familiar with the current convention for python so let me know if anything need fixing.
Tasks Completed