Skip to content
Snippets Groups Projects
Commit acf6d4d2 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Merge pull request #1945 from jkolo/fix_dynamic_thumbnails_aspect

Fix #1677 (dynamic thumbnails aspect)
parents bf92b720 aea54614
No related branches found
No related tags found
No related merge requests found
...@@ -240,6 +240,9 @@ class MediaRepository(object): ...@@ -240,6 +240,9 @@ class MediaRepository(object):
if t_method == "crop": if t_method == "crop":
t_len = thumbnailer.crop(t_path, t_width, t_height, t_type) t_len = thumbnailer.crop(t_path, t_width, t_height, t_type)
elif t_method == "scale": elif t_method == "scale":
t_width, t_height = thumbnailer.aspect(t_width, t_height)
t_width = min(m_width, t_width)
t_height = min(m_height, t_height)
t_len = thumbnailer.scale(t_path, t_width, t_height, t_type) t_len = thumbnailer.scale(t_path, t_width, t_height, t_type)
else: else:
t_len = None t_len = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment