mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 13:39:17 +02:00
Fix #684: Include shared/public playlists in Subsonic API responses
This commit is contained in:
parent
e4954f8bd5
commit
cd36128769
4 changed files with 41 additions and 17 deletions
|
@ -18,7 +18,7 @@ def authenticate(username, password):
|
|||
if password.startswith("enc:"):
|
||||
password = password.replace("enc:", "", 1)
|
||||
password = binascii.unhexlify(password).decode("utf-8")
|
||||
user = User.objects.get(
|
||||
user = User.objects.select_related("actor").get(
|
||||
username__iexact=username, is_active=True, subsonic_api_token=password
|
||||
)
|
||||
except (User.DoesNotExist, binascii.Error):
|
||||
|
@ -29,7 +29,7 @@ def authenticate(username, password):
|
|||
|
||||
def authenticate_salt(username, salt, token):
|
||||
try:
|
||||
user = User.objects.get(
|
||||
user = User.objects.select_related("actor").get(
|
||||
username=username, is_active=True, subsonic_api_token__isnull=False
|
||||
)
|
||||
except User.DoesNotExist:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue