Skip to content

Commit

Permalink
Make code for finding sub-select.json more flexible
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
duxovni committed Apr 23, 2023
1 parent 5d2fb7a commit f36c4fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sub-select.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f36c4fb

Please sign in to comment.