-
Notifications
You must be signed in to change notification settings - Fork 551
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
Thumbnail server: Some fixes #3087
Conversation
if not os.path.exists(thumb_path): | ||
if file_frame == 1: | ||
# Try ID with no frame # (for backwards compatibility) | ||
alt_path = os.path.join(info.THUMBNAIL_PATH, "%s.png" % file_id) | ||
else: | ||
# Try with ID and frame # in filename (for backwards compatibility) | ||
alt_path = os.path.join(info.THUMBNAIL_PATH, "%s-%s.png" % (file_id, file_frame)) | ||
|
||
if os.path.exists(alt_path): | ||
thumb_path = alt_path |
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.
This relates to this item: "Fix output path for thumbnail generation (don't override with legacy/compatibility path)"
I noticed that, because thumb_path
was being overridden by the legacy locations before it was passed to GenerateThumbnail()
, the thumbnails were always being generated at the "backwards compatibility" path. That's now fixed, and thumbnails should be created as ProjectName_assets/thumbnail/FILE_ID/frame#.png
as presumably intended.
This fixes the issue, at least for me, of an otherwise non-functional thumbnail server on Win7 (resulting in an OpenShot that can't import any media files). So, merging... |
send_response_only()
to avoid logging (at ERROR level) successful thumbnail loadsmatch()
instead offindall()
, to avoid unnecessary nesting of result(This covers both the previous "undefined" condition, and IDs that aren't recognized)
logging
instance127.0.0.1
), timestamp