mirror of
https://github.com/beetbox/beets.git
synced 2025-12-31 04:52:49 +01:00
update doc
This commit is contained in:
parent
c1cc91c5e9
commit
93bb114175
2 changed files with 4 additions and 2 deletions
|
|
@ -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']
|
||||
|
|
|
|||
|
|
@ -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``
|
||||
|
|
|
|||
Loading…
Reference in a new issue