mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-05 14:53:02 +00:00
Add worst support external transcoding http server path
This commit is contained in:
parent
24b0b24ad9
commit
221aa66a58
@ -72,7 +72,8 @@ def get_instance_settings():
|
||||
|
||||
|
||||
@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'):
|
||||
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)
|
||||
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user