From d63c0cb469375537ddb713368a1e89dde41072ad Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Thu, 26 Oct 2023 09:24:48 -0700 Subject: [PATCH] Guard against None transcode_key --- plexpy/activity_handler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plexpy/activity_handler.py b/plexpy/activity_handler.py index 7bfbe8fb..32f835c3 100644 --- a/plexpy/activity_handler.py +++ b/plexpy/activity_handler.py @@ -310,7 +310,9 @@ class ActivityHandler(object): last_state = self.db_session['state'] last_rating_key = str(self.db_session['rating_key']) last_live_uuid = self.db_session['live_uuid'] - last_transcode_key = self.db_session['transcode_key'].split('/')[-1] + last_transcode_key = self.db_session['transcode_key'] + if isinstance(last_transcode_key, str): + last_transcode_key = last_transcode_key.split('/')[-1] last_paused = self.db_session['last_paused'] last_rating_key_websocket = self.db_session['rating_key_websocket'] last_guid = self.db_session['guid']