Add transcoding in config; instance get from config now

This commit is contained in:
localhost_frssoft 2022-11-21 11:07:52 +03:00
parent de915144b2
commit 497abf3806
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,5 @@
from src.mpv_control import set_http_header
from src.settings import get_config
import requests, json, time
import urllib.parse
import os
@ -25,7 +26,7 @@ else:
auth = {}
s = requests.Session()
instance = 'fw.ponychord.rocks'
instance = get_config('instance')
token = auth.get(instance)
if token:
@ -60,7 +61,8 @@ def select_instance(new_instance=None):
@logger.catch
def get_audio_file(track_uuid, listen_url=False, download=False, transcoding=False, to='ogg'):
def get_audio_file(track_uuid, listen_url=False, download=False,
transcoding=get_config('enable_server_transcoding'), to='ogg'):
if not transcoding:
to = None
params = {

View File

@ -38,6 +38,7 @@ default_conf = {
"funkwhale.gegeweb.eu",
"shitnoise.monster"
],
'enable_server_transcoding': False,
'prefetch_playlist': True,
'mpv_volume': 100,
'show_like_button': True,