Prevent error on generating thumbnails
When generating the thumbnails the parsing throws an error if the file property representing the image size metadata is an empty string. This protects the string by making it be a "{}" if the string is empty. This is described in #1833.
I've recently fixed a bug in recognize that would cause this, so this might not be necessary, but we can add it for good measure.
@marcelklehr can you point to the fix and @adriano-pinaffo can you check if this fix the issue for you? I would rather fix the issue than silent the error.
here you go: https://github.com/nextcloud/recognize/commit/0fdb558f46df1141d4f205d3eb6fa09104a73c71
@artonge @marcelklehr it seems it won't fix the issue because my FacePhoto.php's getMetadata() is already returning the data JSON encoded. See below:
@adriano-pinaffo Could you disable recognize to check whether this bug stems from recognize then?
I disabled Recognize, went back to Photos and CTRL+F5 it... still, Images are not shown
@marcelklehr I had this issue with Photos before installing Memories. Since installing Memories I am able to view the photos there but not in the Photos app.
It might be useful to note, that I only started to get this issue in Photos after I ran files:scan, files:repair-tree, files:cleanup and files:scan-app-data operations with occ after I manually modified the file system. This is probably related.
Update: I fixed it by running occ files:scan --all then occ files:scan --all --generate-metadata, also having updated to 26.0.1 to 26.0.5.
@artonge what do you think still needed or fixed and can be closed?
The code has changed since then. I don't see how the error could occur at the time, and don't see how it could occur now. Feel free to reopen if needed.