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

Previews going to appdata folder and not being used #29

Closed
benqrn opened this issue Mar 7, 2017 · 19 comments
Closed

Previews going to appdata folder and not being used #29

benqrn opened this issue Mar 7, 2017 · 19 comments

Comments

@benqrn
Copy link

benqrn commented Mar 7, 2017

Command runs fine and builds a large cache of previews in the appdata_xxxx/preview folder, but none of these files appear to be used by nextcloud, and the gallery app makes on-demand previews in the user/thumbnails folder instead of using the previews generated by this app. Have I configured something incorrectly?

@mikedolx
Copy link

mikedolx commented Mar 7, 2017

I can confirm that. I have the same behaviour. I run the command via cron, and see the generated appdata folder, but as soon as i open the gallery the "on demand" generation of preview pictures starts.

@benqrn
Copy link
Author

benqrn commented Mar 8, 2017

I found this page - https://www.c-rieger.de/preview-generator-previews-jumping-up-as-popcorn/
even though it says to use the apps that are already installable through the owncloud app manager, I followed the instructions anyway to manually download the app and unzip it inside the app folder, and the gallery is now working as expected.

It seems that the current git master for Gallery 16.0.0 is NOT the same version of the Gallery app that is included with nextcloud's base install, despite having the exact same version. Something is different and on-demand previews no longer use the userdir/thumbnails folder, they all are pulled or added to the appdata/preview folder.

I also had to clear any references to the appdata/preview folder in the file cache DB table because the nextcloud log was throwing errors about missing image previews (using occ to do a file cleanup did not help).

So I have it working now, but an explanation is required, what is different about the bundled Gallery app and the same app and app version from Git.

@rullzer
Copy link
Member

rullzer commented Mar 8, 2017

Ah yes. This is a bug in gallery (which has been fixed).
Well git is different since it is the development branch.

@rullzer rullzer closed this as completed Mar 8, 2017
@pieter-groeneweg
Copy link

Before you close. The fix is not yet in 16.0.0 as provided out of the box isn't it.
What fixed issue # in nextcloud/gallery are we talking about?

@benqrn
Copy link
Author

benqrn commented Mar 8, 2017

Yes, it may be fixed in git but version 16.0.0 being bundled in Nextcloud and version 16.0.0 here are not the same, and Gallery in Nextcloud is not 'fixed'.

@rullzer
Copy link
Member

rullzer commented Mar 8, 2017

It is fixed in gallery with nextcloud/gallery#187

This app can't fix gallery so for this tracker it is fixed 😉

@benqrn
Copy link
Author

benqrn commented Mar 8, 2017

Is that issue with IPreview saying the fix won't be bundled by default until Nextcloud 12? It's not clear if at some point the default install for Nextcloud 11 will be fixed.

@rullzer
Copy link
Member

rullzer commented Mar 8, 2017

@benqrn well depends on @oparoz but my bet is on NC12. You could apply the patch from the PR yourself if you are up for it.

@benqrn
Copy link
Author

benqrn commented Mar 8, 2017

Should I raise on issue on nextcloud/gallery that Gallery ver 16.0.0 in git and 16.0.0 bundled in NC 11 do not match? That really is the issue I'm looking for to be solved, because if you install the previewgenerator plugin with a stock NC11 build, it will not work properly unless you go get 16.0.0 of Gallery from git.

@rullzer
Copy link
Member

rullzer commented Mar 8, 2017

Feel free.

@pieter-groeneweg
Copy link

I am ready to learn some.. ;)

I have made the patches Now I am probably asking stupid things... but folder /user/thumbnails can be purged? as it now creates thumbs in /data/appdata_instanceid? Do I need to do anything else (in DB?)

@rullzer
Copy link
Member

rullzer commented Mar 9, 2017

best is to run the ./occ preview:delete_old command. As that will also remove them from the DB

@pieter-groeneweg
Copy link

pieter-groeneweg commented Mar 9, 2017

awesome! Thanks!

Would be a good idea to add all these occ commands to the description in apps.nextcloud.com? (also for other apps using this feature). Or did I miss a few paragraphs in the manual? This information is really useful.
The more I discover each day, the more liking is turning into loving Nextcloud... :)

@benqrn
Copy link
Author

benqrn commented Mar 9, 2017

the preview:delete_old command says (in the occ help) it does not work on NC11, I agree it doesn't seem to do anything. I had to clean up the db file cache manually, and also remove the user/thumbnail folders manually.

@pieter-groeneweg
Copy link

@benqrn, odd, it worked fine for me. No errors all traces gone.

@AND51
Copy link

AND51 commented Mar 17, 2017

Hello,

Unfortunately, I would like to un-install previewgenerator, too. Like @benqrn said, the delete_old command did not produce any output, even with -v. However, I was able to detect severe activity with strace. I updated it to 1.0.3 an hour ago and tried it again.

What steps does delete_old do? The nextcloud/data/appdata_XXX/preview folder still contained plenty of previews. I delete everything inside this folder. The MySQL-table "oc_preview_genereation" is empty, I don't know how this was before. Moreover, I have no user/thumbnail directory which irritates me.

It would be nice if you can give me (and others) a short checklist for un-installing this app without leaving any orphaned files.

By the way, the created previews in appdata_XXX/preview had *.png extension, but imagemagick identified every picture as JPEG. Is this normal?

@rullzer
Copy link
Member

rullzer commented Mar 19, 2017

@AND51 the just disable the previewgenerator app and then it is disabled. The app does not keep its own data. It just requests the previews from the server. So it is not this app that stores the previews in appdata_**/preview it is the server code. The server also stores the previews there that are generated on demand.

@benqrn it does not say that the command does not work on NC11. That command just cleansup all the old thumbnail folders. Since there were big issues with shared previews and all. Unfortutnaly the gallery app does not yet use it as we did not have time to update that.

@AND51 no they should not all be png... I'll look into that!

@oparoz
Copy link
Member

oparoz commented Mar 19, 2017

no they should not all be png... I'll look into that!

Actually, this is how it's been implemented in the Preview class. I'm guessing so that it doesn't have to care about file extensions, but it's pretty odd.

@rullzer
Copy link
Member

rullzer commented Mar 19, 2017

@oparoz yes actually this has been it for a long time I think. But it is still odd. I mean it doesn't matter when we stream it since it is never accessed directly. But still odd ;)

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

No branches or pull requests

6 participants