From f97fd0b2d0adb99ab4173f894fe520b7ea760f7a Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Fri, 16 Jun 2023 17:02:19 +0300 Subject: [PATCH] Add limit max bitrate when transcoding enabled --- src/fw_api.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fw_api.py b/src/fw_api.py index dab722b..ab94f21 100644 --- a/src/fw_api.py +++ b/src/fw_api.py @@ -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: