update doc

This commit is contained in:
vincent 2021-01-10 12:47:19 +01:00
parent c1cc91c5e9
commit 93bb114175
2 changed files with 4 additions and 2 deletions

View file

@ -20,7 +20,7 @@ a "subsonic" section like the following:
url: https://mydomain.com:443/subsonic
user: username
pass: password
auth: enc or token
auth: enc or plain
"""
from __future__ import division, absolute_import, print_function
@ -95,7 +95,7 @@ class SubsonicUpdate(BeetsPlugin):
def start_scan(self):
user = config['subsonic']['user'].as_str()
url = self.__format_url()
if config['subsonic']['user'] == 'token':
if config['subsonic']['auth'] == 'token':
salt, token = self.__create_token()
payload = {
'u': user,
@ -119,6 +119,7 @@ class SubsonicUpdate(BeetsPlugin):
try:
response = requests.get(url, params=payload)
json = response.json()
if response.status_code == 200 and \
json['subsonic-response']['status'] == "ok":
count = json['subsonic-response']['scanStatus']['count']

View file

@ -30,5 +30,6 @@ The available options under the ``subsonic:`` section are:
- **url**: The Subsonic server resource. Default: ``http://localhost:4040``
- **user**: The Subsonic user. Default: ``admin``
- **auth**: authentification method token or plain password
- **pass**: The Subsonic user password. (This may either be a clear-text
password or hex-encoded with the prefix ``enc:``.) Default: ``admin``