Fix dynamic thumbnails aspect

pull/1945/head
Jurek 2017-02-24 22:42:38 +01:00
parent 95a22ae194
commit aea5461488
1 changed files with 3 additions and 0 deletions

View File

@ -240,6 +240,9 @@ class MediaRepository(object):
if t_method == "crop":
t_len = thumbnailer.crop(t_path, t_width, t_height, t_type)
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)
else:
t_len = None