From 753f267fdecc7c265257232bd549ca86a5ff4930 Mon Sep 17 00:00:00 2001 From: SpootDev Date: Thu, 31 Mar 2016 12:37:48 -0500 Subject: [PATCH] code reduce --- resources/lib/playlist.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/resources/lib/playlist.py b/resources/lib/playlist.py index beaa3699..bcd34a46 100644 --- a/resources/lib/playlist.py +++ b/resources/lib/playlist.py @@ -130,8 +130,7 @@ class Playlist(): else: pl['params']['item'] = {'file': url} - result = xbmc.executeJSONRPC(json.dumps(pl)) - self.logMsg(result, 2) + self.logMsg(xbmc.executeJSONRPC(json.dumps(pl)), 2) def addtoPlaylist_xbmc(self, playlist, item): @@ -165,8 +164,7 @@ class Playlist(): else: pl['params']['item'] = {'file': url} - result = xbmc.executeJSONRPC(json.dumps(pl)) - self.logMsg(result, 2) + self.logMsg(xbmc.executeJSONRPC(json.dumps(pl)), 2) def verifyPlaylist(self): @@ -180,8 +178,7 @@ class Playlist(): 'playlistid': 1 } } - result = xbmc.executeJSONRPC(json.dumps(pl)) - self.logMsg(result, 2) + self.logMsg(xbmc.executeJSONRPC(json.dumps(pl)), 2) def removefromPlaylist(self, position): @@ -196,5 +193,4 @@ class Playlist(): 'position': position } } - result = xbmc.executeJSONRPC(json.dumps(pl)) - self.logMsg(result, 2) \ No newline at end of file + self.logMsg(xbmc.executeJSONRPC(json.dumps(pl)), 2)