Skip to content

Commit 502bef9

Browse files
committed
Merge branch 'api6'
2 parents c69f2c8 + 472c654 commit 502bef9

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/_meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"""
1515

1616
__author__ = "Lachlan de Waard (lachlan-00)"
17-
__version__ = "6.6.1"
17+
__version__ = "6.6.3"
1818

1919
DEBUG = False

src/ampache.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,7 @@ def playlist_create(self, playlist_name, playlist_type):
15201520
return False
15211521
return self.return_data(ampache_response)
15221522

1523-
def playlist_edit(self, filter_id: int, name=False,
1523+
def playlist_edit(self, filter_id: int, playlist_name=False,
15241524
playlist_type=False, owner=False, items=False, tracks=False):
15251525
""" playlist_edit
15261526
MINIMUM_API_VERSION=400001
@@ -1529,22 +1529,22 @@ def playlist_edit(self, filter_id: int, name=False,
15291529
15301530
INPUTS
15311531
* filter_id = (integer)
1532-
* name = (string) playlist name //optional
1532+
* playlist_name = (string) playlist name //optional
15331533
* playlist_type = (string) 'public'|'private' //optional
1534-
* owner = (string) Change playlist owner to the user id (-1 = System playlist) //optional
1535-
* items = (string) comma-separated song_id's (replaces existing items with a new id) //optional
1536-
* tracks = (string) comma-separated playlisttrack numbers matched to 'items' in order //optional
1534+
* owner = (string) Change playlist owner to the user id (-1 = System playlist) //optional
1535+
* items = (string) comma-separated song_id's (replaces existing items with a new id) //optional
1536+
* tracks = (string) comma-separated playlisttrack numbers matched to 'items' in order //optional
15371537
"""
15381538
ampache_url = self.AMPACHE_URL + '/server/' + self.AMPACHE_API + '.server.php'
15391539
data = {'action': 'playlist_edit',
15401540
'auth': self.AMPACHE_SESSION,
15411541
'filter': filter_id,
1542-
'name': name,
1542+
'name': playlist_name,
15431543
'type': playlist_type,
15441544
'owner': owner,
15451545
'items': items,
15461546
'tracks': tracks}
1547-
if not name:
1547+
if not playlist_name:
15481548
data.pop('name')
15491549
if not playlist_type:
15501550
data.pop('type')
@@ -4510,8 +4510,8 @@ def execute(self, method: str, params=None):
45104510
case 'playlist_delete':
45114511
return self.playlist_delete(params["filter_id"])
45124512
case 'playlist_edit':
4513-
if not "name" in params:
4514-
params["name"] = False
4513+
if not "playlist_name" in params:
4514+
params["playlist_name"] = False
45154515
if not "playlist_type" in params:
45164516
params["playlist_type"] = False
45174517
if not "owner" in params:
@@ -4520,7 +4520,7 @@ def execute(self, method: str, params=None):
45204520
params["items"] = False
45214521
if not "tracks" in params:
45224522
params["tracks"] = False
4523-
return self.playlist_edit(params["filter_id"], params["name"], params["playlist_type"],
4523+
return self.playlist_edit(params["filter_id"], params["playlist_name"], params["playlist_type"],
45244524
params["owner"], params["items"], params["tracks"])
45254525
case 'playlist_generate':
45264526
if not "mode" in params:

0 commit comments

Comments
 (0)