You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
After install I have run occ preview:generate-all and have a cron job doing occ preview:pre-generate -vvv every 5 mins.
Everything works good, previews were generated for existing files (I have over 100000 photos on my Nextcloud instance, it took one day or so).
In NC config.php I have option filesystem_check_changes enabled to watch for filesystem change (files added from outside of nextcloud, like smb shares). It works as expected, new files are visible in web app, but the problem is it does not fire an event which previewgenerator is listening to (as I can see it is NodeWrittenEvent). https://github.com/rullzer/previewgenerator/blob/97d057825f3e69a125d194d2c19a08e1e5d68203/lib/Listeners/PostWriteListener.php#L49
So no previews are being generated for new files added from outside of NC.
I'm not really into Nextcloud server source code so I don't know where the problem lays. Is it NC that does not fire proper event or is it PG not listening to proper event (FileScannedEvent maybe?)
Moreover I can see a lot of this messages:
{"reqId":"xx","level":1,"time":"2021-01-23T16:21:49+01:00","remoteAddr":"xx","user":"--","app":"no app in context","method":"GET","url":"/custom/run.cgi?id=1610655761&undefined=","message":"Deprecated event type for OCP\\IPreview:PreviewRequested: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36","version":"20.0.4.0"}
Thank you for checking this out
The text was updated successfully, but these errors were encountered:
Hi @likaon7 - Thanks for the report. Are these SMB shares made available to NC via External Mounts or are you mounting them using the underlying operating system? I ask because filesystem_check_changes isn't for usage with External Mounts so event handling would be different.
I checked the code and can confirm your suspicion. The previewgenerator app would need to listen to the FileScannedEvent event to pick up those changes. The NodeWrittenEvent is not emitted when scanning/watching a file.
Hi,
After install I have run occ preview:generate-all and have a cron job doing occ preview:pre-generate -vvv every 5 mins.
Everything works good, previews were generated for existing files (I have over 100000 photos on my Nextcloud instance, it took one day or so).
In NC config.php I have option filesystem_check_changes enabled to watch for filesystem change (files added from outside of nextcloud, like smb shares). It works as expected, new files are visible in web app, but the problem is it does not fire an event which previewgenerator is listening to (as I can see it is NodeWrittenEvent).
https://github.com/rullzer/previewgenerator/blob/97d057825f3e69a125d194d2c19a08e1e5d68203/lib/Listeners/PostWriteListener.php#L49
So no previews are being generated for new files added from outside of NC.
I'm not really into Nextcloud server source code so I don't know where the problem lays. Is it NC that does not fire proper event or is it PG not listening to proper event (FileScannedEvent maybe?)
Moreover I can see a lot of this messages:
{"reqId":"xx","level":1,"time":"2021-01-23T16:21:49+01:00","remoteAddr":"xx","user":"--","app":"no app in context","method":"GET","url":"/custom/run.cgi?id=1610655761&undefined=","message":"Deprecated event type for OCP\\IPreview:PreviewRequested: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36","version":"20.0.4.0"}
Thank you for checking this out
The text was updated successfully, but these errors were encountered: