mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-17 07:21:37 +01:00
Fix typo in thumbnail generation
This commit is contained in:
parent
161a862ffb
commit
bd5718d0ad
1 changed files with 5 additions and 2 deletions
|
@ -487,16 +487,19 @@ class MediaRepository(object):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Generate the thumbnail
|
# Generate the thumbnail
|
||||||
if t_type == "crop":
|
if t_method == "crop":
|
||||||
t_byte_source = yield make_deferred_yieldable(threads.deferToThread(
|
t_byte_source = yield make_deferred_yieldable(threads.deferToThread(
|
||||||
thumbnailer.crop,
|
thumbnailer.crop,
|
||||||
t_width, t_height, t_type,
|
t_width, t_height, t_type,
|
||||||
))
|
))
|
||||||
else:
|
elif t_method == "scale":
|
||||||
t_byte_source = yield make_deferred_yieldable(threads.deferToThread(
|
t_byte_source = yield make_deferred_yieldable(threads.deferToThread(
|
||||||
thumbnailer.scale,
|
thumbnailer.scale,
|
||||||
t_width, t_height, t_type,
|
t_width, t_height, t_type,
|
||||||
))
|
))
|
||||||
|
else:
|
||||||
|
logger.error("Unrecognized method: %r", t_method)
|
||||||
|
continue
|
||||||
|
|
||||||
if not t_byte_source:
|
if not t_byte_source:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue