Code optimization
This commit is contained in:
parent
18cdfa192f
commit
5230f73656
1 changed files with 2 additions and 2 deletions
|
@ -43,11 +43,11 @@ class Playback_Starter(Thread):
|
||||||
except (TypeError, AttributeError):
|
except (TypeError, AttributeError):
|
||||||
log.error('Could not get a PMS xml for plex id %s' % plex_id)
|
log.error('Could not get a PMS xml for plex id %s' % plex_id)
|
||||||
return
|
return
|
||||||
if xml[0].attrib.get('type') == PLEX_TYPE_PHOTO:
|
api = API(xml[0])
|
||||||
|
if api.getType() == PLEX_TYPE_PHOTO:
|
||||||
# Photo
|
# Photo
|
||||||
result = Playback_Successful()
|
result = Playback_Successful()
|
||||||
listitem = PKC_ListItem()
|
listitem = PKC_ListItem()
|
||||||
api = API(xml[0])
|
|
||||||
listitem = api.CreateListItemFromPlexItem(listitem)
|
listitem = api.CreateListItemFromPlexItem(listitem)
|
||||||
api.AddStreamInfo(listitem)
|
api.AddStreamInfo(listitem)
|
||||||
api.set_listitem_artwork(listitem)
|
api.set_listitem_artwork(listitem)
|
||||||
|
|
Loading…
Reference in a new issue