From bcd0691b337f25c5577d2309a77c4a1a5d28e636 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 22 Feb 2020 13:11:27 -0800 Subject: [PATCH] Fix Live TV poster fallback for notifications --- plexpy/notification_handler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index c5fbbd6d..8b8d8d0c 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -696,12 +696,13 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m poster_title = '' img_service = helpers.get_img_service(include_self=True) + fallback = 'poster-live' if notify_params['live'] else 'poster' if img_service not in (None, 'self-hosted'): - img_info = get_img_info(img=poster_thumb, rating_key=poster_key, title=poster_title, fallback='poster') + img_info = get_img_info(img=poster_thumb, rating_key=poster_key, title=poster_title, fallback=fallback) poster_info = {'poster_title': img_info['img_title'], 'poster_url': img_info['img_url']} notify_params.update(poster_info) elif img_service == 'self-hosted' and plexpy.CONFIG.HTTP_BASE_URL: - img_hash = set_hash_image_info(img=poster_thumb, fallback='poster') + img_hash = set_hash_image_info(img=poster_thumb, fallback=fallback) poster_info = {'poster_title': poster_title, 'poster_url': plexpy.CONFIG.HTTP_BASE_URL + plexpy.HTTP_ROOT + 'image/' + img_hash} notify_params.update(poster_info)