Fix: Gallery Thumbnails Failing to Re-Assign#93
Merged
mxmeinhold merged 3 commits intoComputerScienceHouse:developfrom May 17, 2022
Merged
Fix: Gallery Thumbnails Failing to Re-Assign#93mxmeinhold merged 3 commits intoComputerScienceHouse:developfrom
mxmeinhold merged 3 commits intoComputerScienceHouse:developfrom
Conversation
mxmeinhold
reviewed
Mar 31, 2022
Contributor
|
Does this really fix 67? |
Contributor
Author
|
There's no need for a UI now. It is automatically checking for broken and knows how to fix itself |
Contributor
|
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 |
Contributor
Author
|
I moved a file in my dev instance and it updated the thumbnail |
mxmeinhold
approved these changes
Apr 10, 2022
Contributor
mxmeinhold
left a comment
There was a problem hiding this comment.
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) |
Contributor
There was a problem hiding this comment.
Will this default to the "no thumbnail" photo if it fails to generate one? Want to be sure this can't loop infinitely.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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