Skip to content

Commit 06d5a91

Browse files
committed
add default to preference edit
1 parent c1a869d commit 06d5a91

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/ampache.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3359,24 +3359,26 @@ def preference_create(self, filter_str, type_str, default, category,
33593359
data.pop('subcategory')
33603360
return self.get_request(ampache_url, data, api_method)
33613361

3362-
def preference_edit(self, filter_str, value, apply_all=0):
3362+
def preference_edit(self, filter_str, value, apply_all=0, default=0):
33633363
""" preference_edit
33643364
MINIMUM_API_VERSION=5.0.0
33653365
33663366
Returns preference based on the specified filter_str
33673367
33683368
INPUTS
3369-
* filter_str = (string) search the name of a preference
3370-
* value = (string|integer) Preference value
3371-
* apply_all = (boolean) apply to all users //optional
3369+
* filter_str = (string) search the name of a preference
3370+
* value = (string|integer) Preference value
3371+
* apply_all = (boolean) apply to all users //optional
3372+
* default = (boolean) if true set as system default (New and public users) //optional
33723373
"""
33733374
ampache_url = self.AMPACHE_URL + '/server/' + self.AMPACHE_API + '.server.php'
33743375
api_method = 'preference_edit'
33753376
data = {'action': api_method,
33763377
'auth': self.AMPACHE_SESSION,
33773378
'filter': filter_str,
33783379
'value': value,
3379-
'all': apply_all}
3380+
'all': apply_all,
3381+
'default': default}
33803382
return self.get_request(ampache_url, data, api_method)
33813383

33823384
def preference_delete(self, filter_str):

0 commit comments

Comments
 (0)