reserved word type

This commit is contained in:
SpootDev 2016-03-31 10:39:00 -05:00
parent 98bee106cb
commit 47beade09a

View file

@ -82,17 +82,17 @@ class KodiMonitor(xbmc.Monitor):
item = data.get('item') item = data.get('item')
try: try:
kodiid = item['id'] kodiid = item['id']
type = item['type'] item_type = item['type']
except (KeyError, TypeError): except (KeyError, TypeError):
self.logMsg("Item is invalid for playstate update.", 1) self.logMsg("Item is invalid for playstate update.", 1)
else: else:
if ((utils.settings('useDirectPaths') == "1" and not type == "song") or if ((utils.settings('useDirectPaths') == "1" and not item_type == "song") or
(type == "song" and utils.settings('enableMusic') == "true")): (item_type == "song" and utils.settings('enableMusic') == "true")):
# Set up properties for player # Set up properties for player
embyconn = utils.kodiSQL('emby') embyconn = utils.kodiSQL('emby')
embycursor = embyconn.cursor() embycursor = embyconn.cursor()
emby_db = embydb.Embydb_Functions(embycursor) emby_db = embydb.Embydb_Functions(embycursor)
emby_dbitem = emby_db.getItem_byKodiId(kodiid, type) emby_dbitem = emby_db.getItem_byKodiId(kodiid, item_type)
try: try:
itemid = emby_dbitem[0] itemid = emby_dbitem[0]
except TypeError: except TypeError:
@ -114,7 +114,7 @@ class KodiMonitor(xbmc.Monitor):
listItem = xbmcgui.ListItem() listItem = xbmcgui.ListItem()
playback = pbutils.PlaybackUtils(result) playback = pbutils.PlaybackUtils(result)
if type == "song" and utils.settings('streamMusic') == "true": if item_type == "song" and utils.settings('streamMusic') == "true":
utils.window('emby_%s.playmethod' % playurl, utils.window('emby_%s.playmethod' % playurl,
value="DirectStream") value="DirectStream")
else: else:
@ -132,7 +132,7 @@ class KodiMonitor(xbmc.Monitor):
item = data.get('item') item = data.get('item')
try: try:
kodiid = item['id'] kodiid = item['id']
type = item['type'] item_type = item['type']
except (KeyError, TypeError): except (KeyError, TypeError):
self.logMsg("Item is invalid for playstate update.", 1) self.logMsg("Item is invalid for playstate update.", 1)
else: else:
@ -140,7 +140,7 @@ class KodiMonitor(xbmc.Monitor):
embyconn = utils.kodiSQL('emby') embyconn = utils.kodiSQL('emby')
embycursor = embyconn.cursor() embycursor = embyconn.cursor()
emby_db = embydb.Embydb_Functions(embycursor) emby_db = embydb.Embydb_Functions(embycursor)
emby_dbitem = emby_db.getItem_byKodiId(kodiid, type) emby_dbitem = emby_db.getItem_byKodiId(kodiid, item_type)
try: try:
itemid = emby_dbitem[0] itemid = emby_dbitem[0]
except TypeError: except TypeError: