mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Fallback to blank poster/art on newsletter if image hosting is disabled
This commit is contained in:
parent
5cd5c36d8c
commit
d5bffc374c
3 changed files with 18 additions and 8 deletions
|
@ -783,8 +783,9 @@ class RecentlyAdded(Newsletter):
|
|||
else:
|
||||
item['art_hash'] = ''
|
||||
|
||||
item['poster_url'] = ''
|
||||
item['thumb_url'] = ''
|
||||
item['art_url'] = ''
|
||||
item['poster_url'] = item['thumb_url'] # Keep for backwards compatibility
|
||||
|
||||
elif helpers.get_img_service():
|
||||
# Upload posters and art to image hosting service
|
||||
|
@ -800,7 +801,7 @@ class RecentlyAdded(Newsletter):
|
|||
img=item['thumb'], rating_key=item['rating_key'], title=item['title'],
|
||||
width=150, height=height, fallback=fallback)
|
||||
|
||||
item['poster_url'] = img_info.get('img_url') or common.ONLINE_POSTER_THUMB
|
||||
item['thumb_url'] = img_info.get('img_url') or common.ONLINE_POSTER_THUMB
|
||||
|
||||
img_info = get_img_info(
|
||||
img=item['art'], rating_key=item['rating_key'], title=item['title'],
|
||||
|
@ -810,6 +811,15 @@ class RecentlyAdded(Newsletter):
|
|||
|
||||
item['thumb_hash'] = ''
|
||||
item['art_hash'] = ''
|
||||
item['poster_url'] = item['thumb_url'] # Keep for backwards compatibility
|
||||
|
||||
else:
|
||||
for item in movies + shows + albums:
|
||||
item['thumb_hash'] = ''
|
||||
item['art_hash'] = ''
|
||||
item['thumb_url'] = ''
|
||||
item['art_hash'] = ''
|
||||
item['poster_url'] = item['thumb_url'] # Keep for backwards compatibility
|
||||
|
||||
self.data['recently_added'] = recently_added
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue