Mpv launch arguments added. (#593)

Co-authored-by: theCow61 <theCow61@github.com>
master
theCow61 2020-12-22 11:55:26 -06:00 committed by GitHub
parent 74e3d3738f
commit 49a5498d13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -38,7 +38,8 @@ DEFAULT_CONFIG = {
'fallback_qualities': ['720p', '480p', '360p'],
'log_level': 'INFO',
'provider': 'twist.moe',
'autoplay_next': True
'autoplay_next': True,
'mpv_arguments': ''
},
'gui': {
'player': 'mpv'

View File

@ -1,5 +1,6 @@
from anime_downloader.players.baseplayer import BasePlayer
from anime_downloader import config
from anime_downloader.config import Config
import os
@ -20,13 +21,14 @@ class mpv(BasePlayer):
@property
def args(self):
# Doesnt use the referer if it's none
launchArgs = Config['watch']['mpv_arguments']
if self.episode.source().referer:
return ['--input-conf=' + get_mpv_configfile(),
'--http-header-fields=referer: ' + str(self.episode.source().referer),
self.episode.source().stream_url]
self.episode.source().stream_url, launchArgs]
else:
return ['--input-conf=' + get_mpv_configfile(),
self.episode.source().stream_url]
self.episode.source().stream_url, launchArgs]
def get_mpv_home():