nextcloud / previewgenerator

Nextcloud app to do preview generation in the background.
https://apps.nextcloud.com/apps/previewgenerator
GNU Affero General Public License v3.0
450 stars 55 forks source link

Limit 'preview:pre-generate' to specific paths or users #422

Open zzyzx-dc opened 8 months ago

zzyzx-dc commented 8 months ago

I can specify --path= for the initial generate-all command. However, when I do preview:pre-generate, it scans all images. I attempted to add --path= but it states that the --path options does not exist.

st3iny commented 8 months ago

I can confirm this. The pre-generate command will generate previews for all files that were changed or created since its last run.

Are you requesting a feature to exclude certain folders/users from the incremental generation as well? E.g. that only certain paths/users are "logged" in the database table to be processed on the next run of pre-generate?

zzyzx-dc commented 8 months ago

Are you requesting a feature to exclude certain folders/users from the incremental generation as well? E.g. that only certain paths/users are "logged" in the database table to be processed on the next run of pre-generate?

I guess I am confused about the recommended process. For the initial scan (presumably lengthy), I feel I can exclude all images except my photos folder. But then for the next incremental scan, it will then ingest every image (presumably a very lengthy run, then). I was assuming that most people limit the scan to just what they want to pipe into an app like Memories (for instance, just photos).

However, maybe it's a non-issue. I am able to limit Memories to just my photos folder. And actually it's probably a better Nextcloud user experience to have generated previews for all media in all folders.

st3iny commented 8 months ago

The incremental scan via pre-generate will only generate previews for files that have been changed or created since its last invocation. The generate-all command is only meant to be run once, right after enabling the app. After that, the pre-generate command is supposed to be run as a cron job every 10 minutes.

mbarde commented 7 months ago

Are you requesting a feature to exclude certain folders/users from the incremental generation as well? E.g. that only certain paths/users are "logged" in the database table to be processed on the next run of pre-generate?

Actually I would like to request such a feature. Having a server with limited resources I have to disable the preview feature in general. But for certain folders / users I would like to generate previews "manually" via cronjobs. If I understand this conversation correctly this is currently not feasible using this app?

st3iny commented 7 months ago

Are you requesting a feature to exclude certain folders/users from the incremental generation as well? E.g. that only certain paths/users are "logged" in the database table to be processed on the next run of pre-generate?

Actually I would like to request such a feature. Having a server with limited resources I have to disable the preview feature in general. But for certain folders / users I would like to generate previews "manually" via cronjobs. If I understand this conversation correctly this is currently not feasible using this app?

Right, this is currently not possible with the pre-generate command.

mbarde commented 7 months ago

Thank you for the quick response! Would be awesome to have this feature available!