mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Merge pull request #2557 from matrix-org/erikj/media_tumbnails
Fix typo in thumbnail generation
This commit is contained in:
commit
f4f65ef93e
@ -487,16 +487,19 @@ class MediaRepository(object):
|
||||
)
|
||||
|
||||
# Generate the thumbnail
|
||||
if t_type == "crop":
|
||||
if t_method == "crop":
|
||||
t_byte_source = yield make_deferred_yieldable(threads.deferToThread(
|
||||
thumbnailer.crop,
|
||||
t_width, t_height, t_type,
|
||||
))
|
||||
else:
|
||||
elif t_method == "scale":
|
||||
t_byte_source = yield make_deferred_yieldable(threads.deferToThread(
|
||||
thumbnailer.scale,
|
||||
t_width, t_height, t_type,
|
||||
))
|
||||
else:
|
||||
logger.error("Unrecognized method: %r", t_method)
|
||||
continue
|
||||
|
||||
if not t_byte_source:
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user