code reduce

This commit is contained in:
SpootDev 2016-03-31 12:37:48 -05:00
parent 69b305a3c9
commit 753f267fde

View file

@ -130,8 +130,7 @@ class Playlist():
else: else:
pl['params']['item'] = {'file': url} pl['params']['item'] = {'file': url}
result = xbmc.executeJSONRPC(json.dumps(pl)) self.logMsg(xbmc.executeJSONRPC(json.dumps(pl)), 2)
self.logMsg(result, 2)
def addtoPlaylist_xbmc(self, playlist, item): def addtoPlaylist_xbmc(self, playlist, item):
@ -165,8 +164,7 @@ class Playlist():
else: else:
pl['params']['item'] = {'file': url} pl['params']['item'] = {'file': url}
result = xbmc.executeJSONRPC(json.dumps(pl)) self.logMsg(xbmc.executeJSONRPC(json.dumps(pl)), 2)
self.logMsg(result, 2)
def verifyPlaylist(self): def verifyPlaylist(self):
@ -180,8 +178,7 @@ class Playlist():
'playlistid': 1 'playlistid': 1
} }
} }
result = xbmc.executeJSONRPC(json.dumps(pl)) self.logMsg(xbmc.executeJSONRPC(json.dumps(pl)), 2)
self.logMsg(result, 2)
def removefromPlaylist(self, position): def removefromPlaylist(self, position):
@ -196,5 +193,4 @@ class Playlist():
'position': position 'position': position
} }
} }
result = xbmc.executeJSONRPC(json.dumps(pl)) self.logMsg(xbmc.executeJSONRPC(json.dumps(pl)), 2)
self.logMsg(result, 2)