X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/573a33bd102b37f058c0a750e68f62eca164e67d..d3a3ef14c820bb651c34d70be745ecac159d44f1:/python/disorder.py.in diff --git a/python/disorder.py.in b/python/disorder.py.in index 16685f5..47d7090 100644 --- a/python/disorder.py.in +++ b/python/disorder.py.in @@ -911,7 +911,9 @@ class client: def playlist_delete(self, playlist): """Delete a playlist""" - self._simple("playlist-delete", playlist) + res, details = self._simple("playlist-delete", playlist) + if res == 555: + raise operationError(res, details, "playlist-delete") def playlist_get(self, playlist): """Get the contents of a playlist @@ -937,7 +939,7 @@ class client: Arguments: playlist -- Playlist to set tracks -- Array of tracks""" - self._simple_body("playlist-set", tracks, playlist) + self._simple_body(tracks, "playlist-set", playlist) def playlist_set_share(self, playlist, share): """Set the sharing status of a playlist""" @@ -950,6 +952,11 @@ class client: return None return _split(details)[0] + def playlists(self): + """Returns the list of visible playlists""" + self._simple("playlists") + return self._body() + ######################################################################## # I/O infrastructure