From 5230f736562686fe3a7df6a33462ef106236ff64 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 8 Jan 2017 15:43:30 +0100 Subject: [PATCH] Code optimization --- resources/lib/playback_starter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/playback_starter.py b/resources/lib/playback_starter.py index bbac8231..0b97724c 100644 --- a/resources/lib/playback_starter.py +++ b/resources/lib/playback_starter.py @@ -43,11 +43,11 @@ class Playback_Starter(Thread): except (TypeError, AttributeError): log.error('Could not get a PMS xml for plex id %s' % plex_id) return - if xml[0].attrib.get('type') == PLEX_TYPE_PHOTO: + api = API(xml[0]) + if api.getType() == PLEX_TYPE_PHOTO: # Photo result = Playback_Successful() listitem = PKC_ListItem() - api = API(xml[0]) listitem = api.CreateListItemFromPlexItem(listitem) api.AddStreamInfo(listitem) api.set_listitem_artwork(listitem)