mirror of
https://github.com/mpv-player/mpv
synced 2025-04-11 04:01:31 +00:00
Merge cb8c28ee36
into 3d5949366c
This commit is contained in:
commit
83df145d27
@ -238,6 +238,7 @@ mp.add_key_binding(nil, "select-edition", function ()
|
||||
end
|
||||
|
||||
local editions = {}
|
||||
local default_item = mp.get_property_native("current-edition")
|
||||
|
||||
for i, edition in ipairs(edition_list) do
|
||||
editions[i] = edition.title or ("Edition " .. edition.id + 1)
|
||||
@ -246,7 +247,7 @@ mp.add_key_binding(nil, "select-edition", function ()
|
||||
input.select({
|
||||
prompt = "Select an edition:",
|
||||
items = editions,
|
||||
default_item = mp.get_property_native("current-edition") + 1,
|
||||
default_item = default_item > -1 and default_item + 1,
|
||||
submit = function (edition)
|
||||
mp.set_property("edition", edition - 1)
|
||||
end,
|
||||
|
Loading…
Reference in New Issue
Block a user