Add limit max bitrate when transcoding enabled

This commit is contained in:
localhost_frssoft 2023-06-16 17:02:19 +03:00
parent 174c2311da
commit f97fd0b2d0

View file

@ -87,10 +87,11 @@ def get_node_info():
@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'):
transcoding=get_config('enable_server_transcoding'), to='ogg', max_bitrate=128):
params = {
"download": download,
"to": to
"to": to,
"max_bitrate": max_bitrate
}
if current_instance.token and not current_instance.listen_token:
get_me()
@ -99,6 +100,7 @@ def get_audio_file(track_uuid, listen_url=False, download=False,
if not transcoding:
del params['to']
del params['max_bitrate']
if listen_url:
url = f'https://{current_instance.instance}{track_uuid}?'
else: