Fix RuntimeErrors

This commit is contained in:
tomkat83 2017-01-02 14:17:28 +01:00
parent 146f063fc9
commit cddde19cce

View file

@ -34,12 +34,13 @@ addonName = "PlexKodiConnect"
class PlaybackUtils(): class PlaybackUtils():
def __init__(self, item, callback): def __init__(self, item, callback=None):
if callback:
self.mgr = callback self.mgr = callback
self.item = item
self.api = API(item)
self.playqueue = self.mgr.playqueue.get_playqueue_from_type( self.playqueue = self.mgr.playqueue.get_playqueue_from_type(
KODI_PLAYLIST_TYPE_FROM_PLEX_TYPE[self.api.getType()]) KODI_PLAYLIST_TYPE_FROM_PLEX_TYPE[self.api.getType()])
self.item = item
self.api = API(item)
def play(self, plex_id, kodi_id=None, plex_lib_UUID=None): def play(self, plex_id, kodi_id=None, plex_lib_UUID=None):
""" """