From 5f28ead6e9539b307e8a16b48c67808ea1335d44 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Wed, 2 Nov 2016 18:19:40 -0700 Subject: [PATCH] Make sure to get metadata media info for notification --- plexpy/notification_handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index 3921f6ac..df05f075 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -257,13 +257,13 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, * server_uptime = 'N/A' # Get metadata for the item - pms_connect = pmsconnect.PmsConnect() if session: rating_key = session['rating_key'] - metadata = pms_connect.get_metadata_details(rating_key=rating_key, get_media_info=True) elif timeline: rating_key = timeline['rating_key'] - metadata = timeline + + pms_connect = pmsconnect.PmsConnect() + metadata = pms_connect.get_metadata_details(rating_key=rating_key, get_media_info=True) if not metadata: logger.error(u"PlexPy NotificationHandler :: Unable to retrieve metadata for rating_key %s" % str(rating_key))