From 2af5f817a3db64f27284367abe12ccbf2592019d Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Mon, 15 Jan 2018 14:37:40 -0800 Subject: [PATCH] Plex Web url for tracks should go to the album page --- plexpy/notification_handler.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index 9c7764bb..c232807d 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -523,10 +523,15 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m remaining_duration = duration - view_offset # Build Plex URL + if notify_params['media_type'] == 'track': + plex_web_rating_key = notify_params['parent_rating_key'] + else: + plex_web_rating_key = notify_params['rating_key'] + notify_params['plex_url'] = '{web_url}#!/server/{pms_identifier}/details?key=%2Flibrary%2Fmetadata%2F{rating_key}'.format( web_url=plexpy.CONFIG.PMS_WEB_URL, pms_identifier=plexpy.CONFIG.PMS_IDENTIFIER, - rating_key=rating_key) + rating_key=plex_web_rating_key) # Get media IDs from guid and build URLs if 'imdb://' in notify_params['guid']: