summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2021-10-12 08:11:11 +0300
committerAvi Halachmi (:avih) <avihpit@yahoo.com>2021-10-12 14:12:24 +0300
commitf386fd79b2df57d54d5ec0d93d4958f56a527631 (patch)
treebd67271624b1540c60358c23a74f5e8e1427b2e8 /player
parenta3ef4c62fc5039e524d91f1e41bd51ba363489d8 (diff)
downloadmpv-f386fd79b2df57d54d5ec0d93d4958f56a527631.tar.bz2
mpv-f386fd79b2df57d54d5ec0d93d4958f56a527631.tar.xz
js: custom init: ignore ~~/.init.js with --no-config
The custom init script should be considered a configuration file, and as such it should be ignored when the user wants vanilla mpv - and now it is ignored with --no-config.
Diffstat (limited to 'player')
-rw-r--r--player/javascript/defaults.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/player/javascript/defaults.js b/player/javascript/defaults.js
index 4393925efe..8f5d3089ec 100644
--- a/player/javascript/defaults.js
+++ b/player/javascript/defaults.js
@@ -773,5 +773,8 @@ g.mp_event_loop = function mp_event_loop() {
// let the user extend us, e.g. by adding items to mp.module_paths
// (unlike e.g. read_file, file_info doesn't expand meta-paths)
-if (mp.utils.file_info(mp.utils.get_user_path("~~/.init.js")))
+if (mp.get_property_bool("config") && // --no-config disables custom init
+ mp.utils.file_info(mp.utils.get_user_path("~~/.init.js")))
+{
require("~~/.init");
+}