Propagate environment variables if set to mpv player before playing

This commit is contained in:
Fabio Manganiello 2019-02-19 00:58:26 +01:00
parent 8a6be8b540
commit 376dda616b
1 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,9 @@ class MediaMpvPlugin(MediaPlugin):
if args:
mpv_args.update(args)
for k,v in self._env:
os.environ[k] = v
self._player = mpv.MPV(**mpv_args)
self._player.register_event_callback(self._event_callback())