mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-15 05:19:33 +02:00
Add worst support external transcoding http server path
This commit is contained in:
parent
24b0b24ad9
commit
221aa66a58
|
@ -73,6 +73,7 @@ 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,
|
||||||
|
external_transcoding=get_config('external_transcoder_http_proxy_path'),
|
||||||
transcoding=get_config('enable_server_transcoding'), to='ogg'):
|
transcoding=get_config('enable_server_transcoding'), to='ogg'):
|
||||||
params = {
|
params = {
|
||||||
"download": download,
|
"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}?'
|
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}?'
|
||||||
|
if external_transcoding != "":
|
||||||
|
url = external_transcoding + url
|
||||||
return url + urllib.parse.urlencode(params, doseq=True)
|
return url + urllib.parse.urlencode(params, doseq=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ default_conf = {
|
||||||
"shitnoise.monster"
|
"shitnoise.monster"
|
||||||
],
|
],
|
||||||
'enable_server_transcoding': False,
|
'enable_server_transcoding': False,
|
||||||
|
'external_transcoder_http_proxy_path': "",
|
||||||
'track_activity_history': False,
|
'track_activity_history': False,
|
||||||
'prefetch_playlist': True,
|
'prefetch_playlist': True,
|
||||||
'mpv_volume': 100,
|
'mpv_volume': 100,
|
||||||
|
|
Loading…
Reference in New Issue