diff --git a/docs/json-responses/system_preference.json b/docs/json-responses/system_preference.json new file mode 100644 index 0000000..3fa9a4b --- /dev/null +++ b/docs/json-responses/system_preference.json @@ -0,0 +1,10 @@ +{ + "id": 123, + "name": "ajax_load", + "level": 25, + "description": "Ajax page load", + "value": "1", + "type": "boolean", + "category": "interface", + "subcategory": null +} diff --git a/docs/json-responses/user_preference.json b/docs/json-responses/user_preference.json new file mode 100644 index 0000000..6a70254 --- /dev/null +++ b/docs/json-responses/user_preference.json @@ -0,0 +1,10 @@ +{ + "id": 123, + "name": "ajax_load", + "level": 25, + "description": "Ajax page load", + "value": "1", + "type": "boolean", + "category": "interface", + "subcategory": null +} \ No newline at end of file diff --git a/docs/xml-responses/system_preference.xml b/docs/xml-responses/system_preference.xml new file mode 100644 index 0000000..9a2d709 --- /dev/null +++ b/docs/xml-responses/system_preference.xml @@ -0,0 +1,12 @@ + + + + + 25 + + 1 + + + + + diff --git a/docs/xml-responses/user_preference.xml b/docs/xml-responses/user_preference.xml new file mode 100644 index 0000000..9a2d709 --- /dev/null +++ b/docs/xml-responses/user_preference.xml @@ -0,0 +1,12 @@ + + + + + 25 + + 1 + + + + + diff --git a/src/_meta.py b/src/_meta.py index dfd36d9..02d93dd 100644 --- a/src/_meta.py +++ b/src/_meta.py @@ -14,6 +14,6 @@ """ __author__ = "Lachlan de Waard (lachlan-00)" -__version__ = "6.0.1" +__version__ = "6.1.0" DEBUG = False diff --git a/src/ampache.py b/src/ampache.py index 9628d72..9a4aa64 100644 --- a/src/ampache.py +++ b/src/ampache.py @@ -1721,6 +1721,32 @@ def catalog_file(self, file, task, catalog_id): return False return self.return_data(ampache_response) + def catalog_folder(self, folder, task, catalog_id): + """ catalog_folder + MINIMUM_API_VERSION=6.0.0 + + Perform actions on local catalog folders. + Single folder versions of catalog add, clean and verify. + Make sure you remember to urlencode those folder names! + + INPUTS + * folder = (string) urlencode(FULL path to local folder) + * task = (string) 'add'|'clean'|'verify'|'remove' + * catalog_id = (integer) $catalog_id + """ + ampache_url = self.AMPACHE_URL + '/server/' + self.AMPACHE_API + '.server.php' + data = {'action': 'catalog_folder', + 'auth': self.AMPACHE_SESSION, + 'folder': folder, + 'task': task, + 'catalog': catalog_id} + data = urllib.parse.urlencode(data) + full_url = ampache_url + '?' + data + ampache_response = self.fetch_url(full_url, self.AMPACHE_API, 'catalog_action') + if not ampache_response: + return False + return self.return_data(ampache_response) + def podcasts(self, filter_str: str = False, exact: int = False, offset=0, limit=0): """ podcasts