Add worst support external transcoding http server path

This commit is contained in:
localhost_frssoft 2023-01-02 04:19:09 +03:00
parent 24b0b24ad9
commit 221aa66a58
2 changed files with 5 additions and 1 deletions

View File

@ -73,6 +73,7 @@ def get_instance_settings():
@logger.catch
def get_audio_file(track_uuid, listen_url=False, download=False,
external_transcoding=get_config('external_transcoder_http_proxy_path'),
transcoding=get_config('enable_server_transcoding'), to='ogg'):
params = {
"download": download,
@ -84,6 +85,8 @@ def get_audio_file(track_uuid, listen_url=False, download=False,
url = f'https://{current_instance.instance}{track_uuid}?'
else:
url = f'https://{current_instance.instance}/api/v1/listen/{track_uuid}?'
if external_transcoding != "":
url = external_transcoding + url
return url + urllib.parse.urlencode(params, doseq=True)

View File

@ -41,6 +41,7 @@ default_conf = {
"shitnoise.monster"
],
'enable_server_transcoding': False,
'external_transcoder_http_proxy_path': "",
'track_activity_history': False,
'prefetch_playlist': True,
'mpv_volume': 100,