mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-22 07:21:28 +00: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
|
@logger.catch
|
||||||
def get_audio_file(track_uuid, listen_url=False, download=False,
|
def get_audio_file(track_uuid, listen_url=False, download=False,
|
||||||
transcoding=get_config('enable_server_transcoding'), to='ogg'):
|
transcoding=get_config('enable_server_transcoding'), to='ogg'):
|
||||||
if not transcoding:
|
|
||||||
to = None
|
|
||||||
params = {
|
params = {
|
||||||
"download": download,
|
"download": download,
|
||||||
"to": to
|
"to": to
|
||||||
}
|
}
|
||||||
|
if not transcoding:
|
||||||
|
del params['to']
|
||||||
if listen_url:
|
if listen_url:
|
||||||
url = f'https://{current_instance.instance}{track_uuid}?'
|
url = f'https://{current_instance.instance}{track_uuid}?'
|
||||||
else:
|
else:
|
||||||
url = f'https://{current_instance.instance}/api/v1/listen/{track_uuid}?'
|
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
|
@logger.catch
|
||||||
|
|
Loading…
Reference in a new issue