mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-22 16:51:27 +00:00
Check mpv options
This commit is contained in:
parent
5c3e459cfe
commit
9181923e52
|
@ -13,13 +13,19 @@ def mpv_log(loglevel, component, message):
|
||||||
elif loglevel == 'error':
|
elif loglevel == 'error':
|
||||||
logger.error(f'{component} {message}')
|
logger.error(f'{component} {message}')
|
||||||
|
|
||||||
player = mpv.MPV(log_handler=mpv_log, ytdl=False,
|
player = mpv.MPV(log_handler=mpv_log)
|
||||||
prefetch_playlist=True)
|
|
||||||
|
list_options = dir(player)
|
||||||
|
if 'ytdl' in list_options:
|
||||||
|
player.ytdl = False
|
||||||
|
if 'prefetch_playlist' in list_options:
|
||||||
|
player.prefetch_playlist = True
|
||||||
|
|
||||||
|
|
||||||
def set_http_header(headers=[]):
|
def set_http_header(headers=[]):
|
||||||
player.http_header_fields = headers
|
player.http_header_fields = headers
|
||||||
|
|
||||||
|
|
||||||
@logger.catch
|
@logger.catch
|
||||||
def player_menu(header=None, storage={}):
|
def player_menu(header=None, storage={}):
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Reference in a new issue