-
Notifications
You must be signed in to change notification settings - Fork 25
Fix: Gallery Thumbnails Failing to Re-Assign #93
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
Fix: Gallery Thumbnails Failing to Re-Assign #93
Conversation
Does this really fix 67? |
There's no need for a UI now. It is automatically checking for broken and knows how to fix itself |
Does it update the thumbnail when files get moved? Or only when the thumbnail results in a 404? If it doesn't, then this doesn't resolve 67 nor 65 |
I moved a file in my dev instance and it updated the thumbnail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One concern, otherwise LGTM
link = "http://" + app.config["SERVER_NAME"] + link | ||
req = requests.get(link) | ||
while req.status_code != requests.codes.ok: | ||
dir_model.thumbnail_uuid = refresh_directory_thumbnail(dir_model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this default to the "no thumbnail" photo if it fails to generate one? Want to be sure this can't loop infinitely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
So when a file that was the thumbnail of a directory is deleted, the directory doesn't update and causes a 404 when Gallery reaches out to S3/Local Storage to get it again. This makes it detect a non-ok status code and reset the thumbnail for that directory.
Fixes #65
Fixes #67
Fixes #80