Clarity on the crontab settings for the preview generator app

I copied the files into the app-folder and set the right credentials.
But when i try to execute:

sudo -u www-data php /var/www/html/occ preview:pre-generate

i get this error:

[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the “preview” namespace.
What is my mistake?

https://docs.nextcloud.com/server/11/admin_manual/configuration_server/config_sample_php_parameters.html#previews

But it is enabled by default, mentioned here.

Me too, but as I already had problems with broken ssh connections I use screen. This enables you to set sessions into the background and resume lost ones :slight_smile: .

I always usually use screen.

When I remember.

Sometimes.

:upside_down:

Hmm looks like the app/commands are not registered properly.

Did you successfully activate the app in the web interface? Also I would recommend to use the app store to install the app, which can be found in the “Multimedia” category.

Ahh, that was my mistake. I didnÂŽt aktivate it in the app-store.
Thanks for you tip.

Well, well, well, after let it run all the night, i got now a folder /data/appdata_xxxxxxxx/preview/ (3,2 Gb) with 60224 files under 4280 directories


BUT, when i (or one of my user) launch the Gallery app. thumbnails are still again generated in the /data/user/thumbnails/ directory for each user


I really don’t understand the purpose of this preview generator if the behaviour is not changed. Gallery app should read directly the new /data/appdata_xxxxxxxx/preview/ directory and not generate again & again thumbnails in a specific directory for each user


Must we symlink all these folders ? Things are really not clear
 :disappointed:

It’s about the previews that you see, when you just browse your files with the standard nc files app. The gallery app uses way bigger thumbnails ;).

But I would also love to see this features combined. Maybe use the preview generator to also create bigger thumbs that can be used by the gallery app and also for the large preview the files app gives on the right bar, when you see “details” of an image file.

So next update then @rullzer needs to add gallery thumbnail generation :grin:

So it seems I also need to update the Gallery App. I’ll look into that soonish. Basically the GalleryApp kind of did its own preview handling. But there is no reason why we can’t change this to use the new stuff.

2 Likes

Fixed that for you :grin:

Ok so I fixed the gallery app see pr. But I’m afraid you’ll have to wait till NC12 before you can use it.

3 Likes

:heart_eyes:

Cannot wait :slight_smile: Thanks @rullzer!

Thank you very much. I can’t wait either and will edit the files manually :smiley: .

€: Ahahahah this is sooo nice. Suddenly the previews jump up as popcorn. This is sooo a huge benefit for slow systems (e.g. my little Pi2), unbelievable :heart_eyes: !! Thank you very much for this and the preview generator @rullzer

Did I understand right that /data/user/thumbnails/ can be deleted now?

1 Like

How did you update your server? I figured if I tried to pull in the files it’d flag up as failing the mdhash

I manually changed the lines of the files according to the pull request: https://github.com/nextcloud/gallery/pull/187/files
Deleted the red lines and added the green ones ;).

I didn’t found a possibility to download the files with the pull request already merged, so leafpad or nano has to do the job :stuck_out_tongue: .

The files in /tests/ do not exist in the end user app, I was confused first little bit.

No warnings in admin? Feels like if I breathe at the server too hard it’ll fail an integrity check sometimes :stuck_out_tongue:

Ah yes of course you will get integrity check errors to ignore. Might be little annoying cause there will be some message about it at the top all the time. But everything will still working, nothing to fear there.

1 Like

wget https://github.com/nextcloud/gallery/archive/master.zip with pull request about iPreviews merged :slight_smile:

By the way: integrity check is removed now!?

Is it @MichaIng? I hadn’t noticed.
@rullzer @nickvergessen

nothing more to do than loading the app, renameing and enableing?
or run pre-gen.
could you please give a quick summary like:

  1. wget
  2. enable “new” gal.-app
  3. run pre gen

I did:

  1. download and enable gallery and pre-gen - apps from git
  2. sudo -u www-data /var/www/nextcloud php occ preview-generate-all
  3. wait
  4. sudo crontab -u www-data -e and paste

@hourly php -f /var/www/nextcloud/occ preview:pre-generate > /home/NextcloudUser/preview.log

does it fit?
thx in advance, carsten