mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-12-22 19:33:34 +02:00
Add limit max bitrate when transcoding enabled
This commit is contained in:
parent
174c2311da
commit
f97fd0b2d0
1 changed files with 4 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue