mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-22 15:59:21 +02:00
Fix to=None in listen url
This commit is contained in:
parent
86bbdcf0ea
commit
348c80973b
|
@ -74,17 +74,17 @@ def get_instance_settings():
|
|||
@logger.catch
|
||||
def get_audio_file(track_uuid, listen_url=False, download=False,
|
||||
transcoding=get_config('enable_server_transcoding'), to='ogg'):
|
||||
if not transcoding:
|
||||
to = None
|
||||
params = {
|
||||
"download": download,
|
||||
"to": to
|
||||
}
|
||||
if not transcoding:
|
||||
del params['to']
|
||||
if listen_url:
|
||||
url = f'https://{current_instance.instance}{track_uuid}?'
|
||||
else:
|
||||
url = f'https://{current_instance.instance}/api/v1/listen/{track_uuid}?'
|
||||
return url + urllib.parse.urlencode(params)
|
||||
return url + urllib.parse.urlencode(params, doseq=True)
|
||||
|
||||
|
||||
@logger.catch
|
||||
|
|
Loading…
Reference in New Issue