mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-21 23:49: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.mpv_control import set_http_header
|
||||||
|
from src.settings import get_config
|
||||||
import requests, json, time
|
import requests, json, time
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import os
|
import os
|
||||||
|
@ -25,7 +26,7 @@ else:
|
||||||
auth = {}
|
auth = {}
|
||||||
|
|
||||||
s = requests.Session()
|
s = requests.Session()
|
||||||
instance = 'fw.ponychord.rocks'
|
instance = get_config('instance')
|
||||||
token = auth.get(instance)
|
token = auth.get(instance)
|
||||||
|
|
||||||
if token:
|
if token:
|
||||||
|
@ -60,7 +61,8 @@ def select_instance(new_instance=None):
|
||||||
|
|
||||||
|
|
||||||
@logger.catch
|
@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:
|
if not transcoding:
|
||||||
to = None
|
to = None
|
||||||
params = {
|
params = {
|
||||||
|
|
|
@ -38,6 +38,7 @@ default_conf = {
|
||||||
"funkwhale.gegeweb.eu",
|
"funkwhale.gegeweb.eu",
|
||||||
"shitnoise.monster"
|
"shitnoise.monster"
|
||||||
],
|
],
|
||||||
|
'enable_server_transcoding': False,
|
||||||
'prefetch_playlist': True,
|
'prefetch_playlist': True,
|
||||||
'mpv_volume': 100,
|
'mpv_volume': 100,
|
||||||
'show_like_button': True,
|
'show_like_button': True,
|
||||||
|
|
Loading…
Reference in New Issue