previewgenerator
previewgenerator copied to clipboard
exclude folders/shares
is it possible to exclude certain folders from preview generation?
I definitely second that. Especially all these Apple-Generated directory corpses laying around. .AppleDouble, .trash, tmp etc. could all be skipped.
I think this has been solved: if a file with the name .nomedia is added to the folder, the folder will not be scanned. I tested this, and it worked for me.
I've several external storages in my nextcloud installation and I would like to exclude them via an argument because I don't have write access to add .nomedia files.
Same thing, but I want to include only directories with a valuable data. In my case, rest of generated previews will never be used.
I'd like to see this update. To add to it I'd also like to exclude preview generation as dictated by regex patterns, file types, extensions, specified folders, external storages etc...
Let me know if help is needed, I could spare some time...
preview generator is now working on my trashbin which is totally unnecessary. it would be nice to exclude some directories (or have trash be excluded by default).
Being able to exclude the trash is important. A waste of CPU time and disk space to constantly be running on the trash. I've run into this specifically using Joplin which creates temp files that get moved to trash immediately. Potentially hundreds of files a day which definitely do not need previews generated for.
Unfortunately adding a file .nomedia
like mentioned by @schniepp i.e. to the files_trashbin
-folder does not solve the problem.
The occ preview:pre-generate
-command still creates thumbnails for deleted files which beside wasting disk space is a waste of energy!
I second this, it's been 3 years and it's still an important feature
As #374 has been closed in favor of this issue, I would like to ask for your opinion.
You are welcome to react with :tada: or :rocket: depending on which suggestion you prefer most. And also feel free to reply with further notes.
:tada: ) Mechanism to exclude some folders from preview generation
- E.g.
list of paths
orregex pattern
as @iv1k suggested. - This allows easy exclusion of e.g. a trash directory.
:rocket: ) Mechanism to include only selected folders for preview generation
- E.g.
list of paths
. - This would be similar to the Gallery 2.0 app where one can set the path to the photos directory. If one has few media folders but many documents and files elsewhere it could be useful to only enable preview generation for those media folders.
Furthermore, I'm not sure if the previewgenerator
app is the ideal place to implement this.
This app does the pre-generation of preview images. If we disalbe the pre-generation for some files here, this doesn't mean that preview images are not generated based on user interaction (if the user views a folder in the app that was excluded during pre-generation).
According to the Nextcloud manual, one has only the option to either completely disable previews or let them enabled. https://docs.nextcloud.com/server/stable/admin_manual/configuration_files/previews_configuration.html?highlight=preview#parameters
Wouldn't it be better if we could disable previews for specific folders (or enable it only for some directories)?
- This way, if one runs the pre-generation for all folders, Nextcloud itself could detect if some files are in a directory that is excluded from preview image generation and would skip those.
- And if a user manually views a directory that is excluded from preview generation, he/she would not need to wait until the preview images get generated but would directly see the generic placeholder icons.
Well, but maybe it is "easier/faster" to just implement it here? ^^ However, with a long term perspective in mind I think that adding this functionality in the general preview settings could be better.
I have some good news: Files in the trash bin are now excluded when running pre-generate.
Manually excluding paths is still pending and contributions are always welcome.
I've noticed when using the preview generator for an individual user, it will end up scanning my external storage in addition the user directory. So it is stepping outside of the userid directory which is not a desired behavior.
It threw me off for a min, because for a min I thought, WTF is this user doing copying all the external files into their own directory, but reviewing the userid directory tree, I didn't see the files present.
su -m abc -c 'php /config/www/nextcloud/occ preview:generate-all <userid>'