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

Generate Thumbnails Only For Specified Folders/Filetypes? #50

Open
arclance opened this issue Apr 6, 2012 · 4 comments
Open

Generate Thumbnails Only For Specified Folders/Filetypes? #50

arclance opened this issue Apr 6, 2012 · 4 comments
Labels
Milestone

Comments

@arclance
Copy link

arclance commented Apr 6, 2012

Would it be possible at some point to define which folders to generate thumbnails for, instead of generating them for all folders?
For example when I am editing photos I don't need thumbnails for all ~300GB of photos just the ones in the folders I am working in right now.

Also would it be possible to specify which filetypes to generate thumbnails for, instead of generating thumbnails for all filetypes?
This would make thumbnail generation faster and decrease the hdd space used for storing thumbnails.

@IgnorantGuru
Copy link
Owner

I think some fm's use a .directory file for this - I might look into it a some point. Or maybe a .nothumbs file that spacefm could spot. Another possibly would be a shortcut key for turning off thumbnails (perhaps make it a panel-specific setting). For now, you might create a different spacefm config-dir for photo browsing which uses different settings. Thanks for the input.

@arclance
Copy link
Author

arclance commented Apr 6, 2012

The main problem right now is that it takes a loooong time to generate the thumbnails since I have all of my photography stuff backed up to ~6 different drives which also contain a lot of video files.
The last time I turned thumbnails on I gave up after a few hours and just killed spacefm to stop the thumbnail generation.
I can live without thumbnails for now they are not as useful for my new photos, since I doubt spacefm generates thumbnails for Canon .raw files.

Or maybe a .nothumbs file that spacefm could spot.

I don't think that is the best idea I would need to make hundreds of them unless they also apply to every sub-directory as well. It would also be a lot easier to debug problems with one config file than 500 config files.

I don't know if spacefm generates thumbnails for video files, but thumbnails were barely usable in nautilus for me because it's thumbnail generator would max out one core while failing to process h264 video files.
The thumbnail generator (totem) would not stop trying to generate thumbnails for those files so I had to kill it and turn thumbnails off in nautilus.
Here is one bug report about it in case you want to look at it https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/79030

If spacefm does or will generate video thumbnails I would make video and image thumbnails separate options if you don't implement filetype filtering.
Video thumbnails require more cpu power to generate and are more likely to have bugs like the nautilus one I mentioned due to video container formats like .MKV having no standard internal data formats.

@IgnorantGuru
Copy link
Owner

No video thumbnails in spacefm.

Would it be possible at some point to define which folders to generate thumbnails for, instead of generating them for all folders?

If you don't like the .nothumbs idea, how do you think this should work, from a UI angle? Making these things work is easy, but adding them to the UI without making a mess is the real challenge. Too many options and the UI grows out of control, and some users already find spacefm intimidating. Filetypes are a little easier, but I think there would be a cost to it in terms of performance - every filetype would need to be compared to a glob, etc. For the folders, a list of globs might work too (sort of like .gitignore but just one list for everything), but would be limited.

Give it some thought if you like - this won't be done too soon because there are higher priority items on the list, but I'm willing to consider some possibilities.

@arclance
Copy link
Author

arclance commented Apr 6, 2012

If you don't like the .nothumbs idea, how do you think this should work, from a UI angle?
Making these things work is easy, but adding them to the UI without making a mess is the
real challenge. Too many options and the UI grows out of control, and some users already
find spacefm intimidating.

I thought about it for a while and here is what I came up with.

If possible I think giving the user a optional choice between a blacklist or whitelist to control which folders have thumbnails generated for them with blacklist as the default option would be best.
I would put the options for changing overall thumbnail generation behavior in

View -> Preferences -> Advanced -> Thumbnails
or   
View -> Preferences -> Advanced Tweaks -> Thumbnails (explanation at bottom of post)

I would suggest these options be in that section

Enable Thumbnail Filtering By Directory
  Use Blacklist
  Use Whitelist

If you have this disabled by default spacefm would use the current behavior (or have a empty blacklist as default), and the user could enable whichever type of list they like the best.
You should be able to use the same code to parse each list if you make a small change for the type of list, I gave a psudocode example of what I mean below.
For Blacklist

if not in blacklist
  generate thumbnails
endif

For Whitelist

if in whitelist
  generate thumbnails
endif

I would use a separate file to store the whitelist and blacklist so the user can try each option without losing any changes they have made to the lists.

I think the best way to edit the lists using the UI is to add a command to the right click menu like this

Right Click In Folder -> Style -> Add Folder To Whitelist/Blacklist
Right Click In Folder -> Style -> Add Folder And Sub-Folders To Whitelist/Blacklist

and if the folder is already in the list

Right Click In Folder -> Style -> Remove Folder From Whitelist/Blacklist
Right Click In Folder -> Style -> Remove Folder And Sub-Folders From Whitelist/Blacklist

I gave these commands very descriptive names, they are probably too long right now.
If you store the lists in a text file advanced (or adventuresome) users could edit them by hand if they wanted to add a lot of directories at once.

If you add filtering by filetype I would suggest adding these options to

View -> Preferences -> Advanced -> Thumbnails   
or   
View -> Preferences -> Advanced Tweaks -> Thumbnails (explanation at bottom of post)

below the first set

Enable Thumbnail Filtering By Filetype
  Generate Thumbnails For These Filetypes
  [Interface To Edit Filetypes] (Checkboxes for all supported filetypes?)

Again I would have this disabled by default to avoid user confusion.

I see "Advanced Tweaks" (mentioned earlier) as a new tab that would contain changes to default behavior that not all users will understand or want to mess with.
Another example of the types of things that would go in there would be

Default Drag Action
  Move
  Copy

The "Advanced Tweaks" tab might be hidden unless a "Enable Advanced Tweaks" option was set in the existing "Advanced" tab to help alleviate the initial configuration intimidation some users are feeling when they first start using spacefm.

I think that part of the problem is that the lack of tooltips makes it harder to figure out what a command does if it has an ambiguous name.
For example to me "Remove" does not imply "Eject Disk" as much as "Prepare To Safely Disconnect Removable Device (Like a USB Thumb Drive)" a tooltip could help convey more information about commands like that.
But I wasn't bothered by ejecting my DVD's from the terminal while I filed a bug report about it.
I think that it was not mentioned in the manual the first time I read it but I mostly read the custom command section so I could be wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants