mirror of
https://github.com/mpv-player/mpv
synced 2025-04-25 04:39:47 +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
|
end
|
||||||
|
|
||||||
local editions = {}
|
local editions = {}
|
||||||
|
local default_item = mp.get_property_native("current-edition")
|
||||||
|
|
||||||
for i, edition in ipairs(edition_list) do
|
for i, edition in ipairs(edition_list) do
|
||||||
editions[i] = edition.title or ("Edition " .. edition.id + 1)
|
editions[i] = edition.title or ("Edition " .. edition.id + 1)
|
||||||
@ -246,7 +247,7 @@ mp.add_key_binding(nil, "select-edition", function ()
|
|||||||
input.select({
|
input.select({
|
||||||
prompt = "Select an edition:",
|
prompt = "Select an edition:",
|
||||||
items = editions,
|
items = editions,
|
||||||
default_item = mp.get_property_native("current-edition") + 1,
|
default_item = default_item > -1 and default_item + 1,
|
||||||
submit = function (edition)
|
submit = function (edition)
|
||||||
mp.set_property("edition", edition - 1)
|
mp.set_property("edition", edition - 1)
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user