From 472c654b53076539e4b3fa1ab36ed79ed533e255 Mon Sep 17 00:00:00 2001 From: lachlan Date: Tue, 8 Oct 2024 09:40:58 +1000 Subject: [PATCH] use playlist_name to match other methods --- src/ampache.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ampache.py b/src/ampache.py index 55819ec..94ee1c7 100644 --- a/src/ampache.py +++ b/src/ampache.py @@ -1517,7 +1517,7 @@ def playlist_create(self, playlist_name, playlist_type): return False return self.return_data(ampache_response) - def playlist_edit(self, filter_id: int, name=False, + def playlist_edit(self, filter_id: int, playlist_name=False, playlist_type=False, owner=False, items=False, tracks=False): """ playlist_edit MINIMUM_API_VERSION=400001 @@ -1526,22 +1526,22 @@ def playlist_edit(self, filter_id: int, name=False, INPUTS * filter_id = (integer) - * name = (string) playlist name //optional + * playlist_name = (string) playlist name //optional * playlist_type = (string) 'public'|'private' //optional - * owner = (string) Change playlist owner to the user id (-1 = System playlist) //optional - * items = (string) comma-separated song_id's (replaces existing items with a new id) //optional - * tracks = (string) comma-separated playlisttrack numbers matched to 'items' in order //optional + * owner = (string) Change playlist owner to the user id (-1 = System playlist) //optional + * items = (string) comma-separated song_id's (replaces existing items with a new id) //optional + * tracks = (string) comma-separated playlisttrack numbers matched to 'items' in order //optional """ ampache_url = self.AMPACHE_URL + '/server/' + self.AMPACHE_API + '.server.php' data = {'action': 'playlist_edit', 'auth': self.AMPACHE_SESSION, 'filter': filter_id, - 'name': name, + 'name': playlist_name, 'type': playlist_type, 'owner': owner, 'items': items, 'tracks': tracks} - if not name: + if not playlist_name: data.pop('name') if not playlist_type: data.pop('type') @@ -4503,8 +4503,8 @@ def execute(self, method: str, params=None): case 'playlist_delete': return self.playlist_delete(params["filter_id"]) case 'playlist_edit': - if not "name" in params: - params["name"] = False + if not "playlist_name" in params: + params["playlist_name"] = False if not "playlist_type" in params: params["playlist_type"] = False if not "owner" in params: @@ -4513,7 +4513,7 @@ def execute(self, method: str, params=None): params["items"] = False if not "tracks" in params: params["tracks"] = False - return self.playlist_edit(params["filter_id"], params["name"], params["playlist_type"], + return self.playlist_edit(params["filter_id"], params["playlist_name"], params["playlist_type"], params["owner"], params["items"], params["tracks"]) case 'playlist_generate': if not "mode" in params: