From 6ff826bc3a88f36d0bcadbc62968a57d3dd4127f Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 5 Oct 2019 23:58:17 -0700 Subject: [PATCH] Fix Last.fm URLs linking to the artist page instead of the album page --- plexpy/notification_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index 7cb48242..24487918 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -577,7 +577,7 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m notify_params['trakt_url'] = 'https://trakt.tv/search/tmdb/' + notify_params['themoviedb_id'] + '?id_type=show' if 'lastfm://' in notify_params['guid']: - notify_params['lastfm_id'] = notify_params['guid'].split('lastfm://')[1].rsplit('/', 1)[0] + notify_params['lastfm_id'] = '/'.join(notify_params['guid'].split('lastfm://')[1].split('?')[0].split('/')[:2]) notify_params['lastfm_url'] = 'https://www.last.fm/music/' + notify_params['lastfm_id'] # Get TheMovieDB info