From f36c4fb7ecf77dd969f651909f1a5c556c2cc658 Mon Sep 17 00:00:00 2001 From: Faye Duxovni Date: Sun, 23 Apr 2023 01:56:36 -0400 Subject: [PATCH] Make code for finding sub-select.json more flexible Rather than finding the first mpv config directory that contains `script-opts`, and then looking inside there for `sub-select.json`, we should find the first mpv config directory that contains `script-opts/sub-select.json`. --- sub-select.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub-select.lua b/sub-select.lua index f61025b..1d8edc8 100644 --- a/sub-select.lua +++ b/sub-select.lua @@ -73,7 +73,7 @@ local function type_check(val, t, required) end local function setup_prefs() - local file = assert(io.open(mp.command_native({"expand-path", o.config}) .. "/sub-select.json")) + local file = assert(io.open(mp.command_native({"expand-path", o.config .. "/sub-select.json"}))) local json = file:read("*all") file:close() prefs = utils.parse_json(json)