+
+ # Get userid from name
+ def _getUserIDFromUsername(self, username):
+ result = self._callRemote('getUserIDFromUsername', {'username' : username})
+ if 'result' in result and result['result']['UserID'] > 0:
+ return result['result']['UserID']
+ else:
+ return 0
+
+ # Gets the playlists of the logged-in user
+ def getUserPlaylistsEx(self, username):
+ userID = self._getUserIDFromUsername(username)
+ if (userID > 0):
+ result = self._callRemote('getUserPlaylistsEx', {'userID' : userID})
+ if 'result' in result and result['result']['playlists'] != None:
+ playlists = result['result']['playlists']
+ return self._parsePlaylists(playlists)
+ else:
+ return []