{"action":"opened","issue":{"url":"https://api.github.com/repos/rullzer/previewgenerator/issues/124","repository_url":"https://api.github.com/repos/rullzer/previewgenerator","labels_url":"https://api.github.com/repos/rullzer/previewgenerator/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/rullzer/previewgenerator/issues/124/comments","events_url":"https://api.github.com/repos/rullzer/previewgenerator/issues/124/events","html_url":"https://github.com/rullzer/previewgenerator/issues/124","id":352992193,"node_id":"MDU6SXNzdWUzNTI5OTIxOTM=","number":124,"title":"Preview generator does not generate any preview after mass data migrated images","user":{"login":"ovals12","id":26391729,"node_id":"MDQ6VXNlcjI2MzkxNzI5","avatar_url":"https://avatars2.githubusercontent.com/u/26391729?v=4","gravatar_id":"","url":"https://api.github.com/users/ovals12","html_url":"https://github.com/ovals12","followers_url":"https://api.github.com/users/ovals12/followers","following_url":"https://api.github.com/users/ovals12/following{/other_user}","gists_url":"https://api.github.com/users/ovals12/gists{/gist_id}","starred_url":"https://api.github.com/users/ovals12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ovals12/subscriptions","organizations_url":"https://api.github.com/users/ovals12/orgs","repos_url":"https://api.github.com/users/ovals12/repos","events_url":"https://api.github.com/users/ovals12/events{/privacy}","received_events_url":"https://api.github.com/users/ovals12/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-22T14:55:46Z","updated_at":"2018-08-22T14:55:46Z","closed_at":null,"author_association":"NONE","body":"It seems there is a \"bug\" in Preview Generator app which prevents generation of previews after you performed a mass data migration (copy of images to data folder, perform occ files:scan --all).\r\n\r\nI want to import very many image files into a new installation of Next Cloud and I would like to have the previews pre-generated. I do not want to upload several gigabytes via pc client or webdav (after that preview generation works, at least I tested webdav upload and previews for the uploaded files were generated). I think this is why there is this mass data migration available.\r\n\r\nAfter mass data migration, the files are in NextCloud, you could access them via webdav or gui - all seems fine. But Preview Generator \"does not see\" them. It will not even generate previews for that 3 images which comes along default installation.\r\n\r\nBelow is the procedure I used for reproducing the issue. I used NextCloud as a snap installation.\r\n\r\n1. Fresh install of nextcloud, no previews exists so far:\r\n```\r\n# ls -al /var/snap/nextcloud/common/nextcloud/data/appdata_ocm286yevx6a/preview\r\ntotal 8\r\ndrwxr-xr-x 2 root root 4096 Aug 22 14:23 .\r\ndrwxr-xr-x 7 root root 4096 Aug 22 14:24 ..\r\n```\r\n\r\n2. Install Preview Generator app via GUI, no previews exists so far:\r\n```\r\n# ls -al /var/snap/nextcloud/common/nextcloud/data/appdata_ocm286yevx6a/preview\r\ntotal 8\r\ndrwxr-xr-x 2 root root 4096 Aug 22 14:23 .\r\ndrwxr-xr-x 8 root root 4096 Aug 22 14:26 ..\r\n```\r\n\r\n3. nextcloud.occ preview:pre-generate, no previews exists so far:\r\n```\r\n# ls -al /var/snap/nextcloud/common/nextcloud/data/appdata_ocm286yevx6a/preview\r\ntotal 8\r\ndrwxr-xr-x 2 root root 4096 Aug 22 14:23 .\r\ndrwxr-xr-x 8 root root 4096 Aug 22 14:26 ..\r\n```\r\n\r\n4. copy some jpg to data directory and perform files scan so the files are visible in nextcloud (2017-* were copied there, the rest 3 are coming with default installation)\r\n```\r\n# ls -al /var/snap/nextcloud/common/nextcloud/data/user/files/Photos/\r\ntotal 28296\r\ndrwxr-xr-x 2 root root    4096 Aug 22 14:30 .\r\ndrwxr-xr-x 4 root root    4096 Aug 22 14:10 ..\r\n-rw-r----- 1 root root 1576687 Aug 22 14:30 2017-01-01_123325.jpg\r\n-rw-r----- 1 root root 1623375 Aug 22 14:30 2017-01-01_123328.jpg\r\n-rw-r----- 1 root root 3681799 Aug 22 14:30 2017-01-01_123335.jpg\r\n-rw-r----- 1 root root 3218276 Aug 22 14:30 2017-01-01_123725.jpg\r\n-rw-r----- 1 root root 3628021 Aug 22 14:30 2017-01-01_123742.jpg\r\n-rw-r----- 1 root root 3895594 Aug 22 14:30 2017-01-01_123853.jpg\r\n-rw-r----- 1 root root 3029542 Aug 22 14:30 2017-01-01_175627.jpg\r\n-rw-r----- 1 root root 3027073 Aug 22 14:30 2017-01-01_175717.jpg\r\n-rw-r----- 1 root root 2900706 Aug 22 14:30 2017-01-01_175730.jpg\r\n-rw-r--r-- 1 root root  819766 Aug 22 14:10 Coast.jpg\r\n-rw-r--r-- 1 root root  585219 Aug 22 14:10 Hummingbird.jpg\r\n-rw-r--r-- 1 root root  955026 Aug 22 14:10 Nut.jpg\r\n```\r\n```\r\n# nextcloud.occ files:scan --all\r\nStarting scan for user 1 out of 1 (user)\r\n\r\n+---------+-------+--------------+\r\n| Folders | Files | Elapsed time |\r\n+---------+-------+--------------+\r\n| 5       | 16    | 00:00:00     |\r\n+---------+-------+--------------+\r\n```\r\n\r\n5. now we have 16 files in Next cloud - if I would go to GUI now I would see all the images there, but I will not do it and perform preview generation:\r\n\r\n```\r\n# nextcloud.occ preview:pre-generate\r\n#\r\n```\r\n\r\n6. No previews were generated:\r\n```\r\n# ls -al /var/snap/nextcloud/common/nextcloud/data/appdata_ocm286yevx6a/preview\r\ntotal 8\r\ndrwxr-xr-x 2 root root 4096 Aug 22 14:23 .\r\ndrwxr-xr-x 8 root root 4096 Aug 22 14:26 ..\r\n```\r\n\r\n7. Copied 2 files via webdav and tried initiate preview generation, all previews for that 2 images were generated:\r\n\r\n```\r\n# nextcloud.occ preview:pre-generate\r\n# \r\n```\r\n```\r\n# ls -al /var/snap/nextcloud/common/nextcloud/data/appdata_ocm286yevx6a/preview\r\ntotal 16\r\ndrwxr-xr-x 4 root root 4096 Aug 22 14:36 .\r\ndrwxr-xr-x 8 root root 4096 Aug 22 14:26 ..\r\ndrwxr-xr-x 2 root root 4096 Aug 22 14:36 124\r\ndrwxr-xr-x 2 root root 4096 Aug 22 14:36 125\r\n```\r\n```\r\n# find . -type f\r\n./125/128-96.jpg\r\n./125/256-256-crop.jpg\r\n./125/683-512.jpg\r\n./125/32-32-crop.jpg\r\n./125/1024-1024-crop.jpg\r\n./125/2048-1536-max.jpg\r\n./125/1536-1536-crop.jpg\r\n./125/85-64.jpg\r\n./125/43-32.jpg\r\n./125/512-384.jpg\r\n./125/64-48.jpg\r\n./125/1365-1024.jpg\r\n./125/32-24.jpg\r\n./125/64-64-crop.jpg\r\n./125/512-512-crop.jpg\r\n./125/341-256.jpg\r\n./125/1024-768.jpg\r\n./125/256-192.jpg\r\n./125/171-128.jpg\r\n./125/128-128-crop.jpg\r\n./124/128-96.jpg\r\n./124/256-256-crop.jpg\r\n./124/683-512.jpg\r\n./124/32-32-crop.jpg\r\n./124/1024-1024-crop.jpg\r\n./124/2048-1536-max.jpg\r\n./124/1536-1536-crop.jpg\r\n./124/85-64.jpg\r\n./124/43-32.jpg\r\n./124/512-384.jpg\r\n./124/64-48.jpg\r\n./124/1365-1024.jpg\r\n./124/32-24.jpg\r\n./124/64-64-crop.jpg\r\n./124/512-512-crop.jpg\r\n./124/341-256.jpg\r\n./124/1024-768.jpg\r\n./124/256-192.jpg\r\n./124/171-128.jpg\r\n./124/128-128-crop.jpg\r\n```\r\n"}}
{"actor":{"display_login":"ovals12"}}