Fix fallback to cover for albums on newsletter

This commit is contained in:
JonnyWong16 2018-04-11 11:58:57 -07:00
parent eee759d0d0
commit 858ea33680

View file

@ -694,8 +694,15 @@ class RecentlyAdded(Newsletter):
if self.is_preview or plexpy.CONFIG.NEWSLETTER_SELF_HOSTED: if self.is_preview or plexpy.CONFIG.NEWSLETTER_SELF_HOSTED:
for item in movies + shows + albums: for item in movies + shows + albums:
if item['media_type'] == 'album':
height = 150
fallback = 'cover'
else:
height = 225
fallback = 'poster'
item['thumb_hash'] = set_hash_image_info( item['thumb_hash'] = set_hash_image_info(
img=item['thumb'], width=150, height=225, fallback='poster') img=item['thumb'], width=150, height=height, fallback=fallback)
if item['art']: if item['art']:
item['art_hash'] = set_hash_image_info( item['art_hash'] = set_hash_image_info(