summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--README4
-rw-r--r--config.c7
-rw-r--r--config.h1
-rw-r--r--player.c3
5 files changed, 15 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index 7d1ae7f..c30c0e6 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5,6 +5,7 @@
- optical discs are now handled using the red key, the type (audio, dvd, br)
is detected automatically
- removed the first menu since it's now obsolete
+- added argument 's' to tell mpv not to load LUA scripts
2015-06-29: vdr-mpv-0.0.4
- start playback even when audio or video fails, this should give a better
diff --git a/README b/README
index 50876ee..34ff4b0 100644
--- a/README
+++ b/README
@@ -74,6 +74,10 @@ Command line arguments
-m text
the text displayed in VDR main menu (Default: MPV)
+-s
+ normally mpv tries to autoload LUA scripts, if this parameter is set no scripts are
+ loaded
+
Plugin setup options
--------------------
diff --git a/config.c b/config.c
index b56a45b..e045c42 100644
--- a/config.c
+++ b/config.c
@@ -32,6 +32,7 @@ cMpvPluginConfig::cMpvPluginConfig()
Languages = "deu,de,ger,eng,en";
PlayListExtString = "m3u,ini,pls,txt,playlist";
MainMenuEntry = "MPV";
+ NoScripts = 0;
X11Display = ":0.0";
}
@@ -62,7 +63,7 @@ int cMpvPluginConfig::ProcessArgs(int argc, char *const argv[])
for (;;)
{
- switch (getopt(argc, argv, "a:v:h:d:b:l:x:rm:"))
+ switch (getopt(argc, argv, "a:v:h:d:b:l:x:rm:s"))
{
case 'a': // audio out
AudioOut = optarg;
@@ -91,6 +92,9 @@ int cMpvPluginConfig::ProcessArgs(int argc, char *const argv[])
case 'm':
MainMenuEntry = optarg;
continue;
+ case 's':
+ NoScripts = 1;
+ continue;
case EOF:
break;
case ':':
@@ -128,6 +132,7 @@ const char *cMpvPluginConfig::CommandLineHelp(void)
" -r\t\tswitch modeline to refresh rate of played file\n"
#endif
" -m text\ttext displayed in VDR main menu (Default: MPV)\n"
+ " -s\t\tdon't load mpv LUA scripts\n"
;
}
diff --git a/config.h b/config.h
index 7a09ed9..eac76a5 100644
--- a/config.h
+++ b/config.h
@@ -48,6 +48,7 @@ class cMpvPluginConfig
string Languages; // language string for audio and subtitle TODO move to Setup menu
vector<string> PlaylistExtensions; // file extensions which are recognized as a playlist
string MainMenuEntry; // the text displayed in VDR main menu
+ int NoScripts; // don't load mpv LUA scripts
string X11Display; // X11 display used for mpv
string TitleOverride; // title to display (ovveride used via service interface)
diff --git a/player.c b/player.c
index f317aaa..0c064f5 100644
--- a/player.c
+++ b/player.c
@@ -228,6 +228,9 @@ void cMpvPlayer::PlayerStart()
if (PlayShuffle && IsPlaylist(PlayFilename))
check_error(mpv_set_option_string(hMpv, "shuffle", "yes"));
+ if (MpvPluginConfig->NoScripts)
+ check_error(mpv_set_option_string(hMpv, "load-scripts", "no"));
+
#ifdef DEBUG
mpv_request_log_messages(hMpv, "info");
#else