Add support for input.conf. (#48)

This commit is contained in:
Ian Walton 2020-04-06 13:05:16 -04:00
parent ffc399b2c7
commit e8a8a97739
2 changed files with 3 additions and 2 deletions

View File

@ -186,7 +186,7 @@ for media playback on OSX.
### MPV Configuration
You can configure mpv directly using the `mpv.conf` file. (It is in the same folder as `conf.json`.)
You can configure mpv directly using the `mpv.conf` and `input.conf` files. (It is in the same folder as `conf.json`.)
This may be useful for customizing video upscaling, keyboard shortcuts, or controlling the application
via the mpv IPC server.

View File

@ -73,6 +73,7 @@ class PlayerManager(object):
"""
def __init__(self):
mpv_config = conffile.get(APP_NAME,"mpv.conf", True)
input_config = conffile.get(APP_NAME,"input.conf", True)
self._video = None
extra_options = {}
self.timeline_trigger = None
@ -97,7 +98,7 @@ class PlayerManager(object):
"player-operation-mode": "cplayer"
}
self._player = mpv.MPV(input_default_bindings=True, input_vo_keyboard=True,
input_media_keys=True, include=mpv_config,
input_media_keys=True, include=mpv_config, input_conf=input_config,
log_handler=mpv_log_handler, loglevel=settings.mpv_log_level,
**extra_options)
self.menu = OSDMenu(self)