mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-22 00:59:21 +02:00
Add transcoding in config; instance get from config now
This commit is contained in:
parent
de915144b2
commit
497abf3806
|
@ -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 = {
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue