fd
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
Some checks failed
smoke-mm / Install & smoke test mm --help (push) Has been cancelled
This commit is contained in:
2
MPV/portable_config/script-opts/medeia.conf
Normal file
2
MPV/portable_config/script-opts/medeia.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
# Medeia MPV script options
|
||||
store=video
|
||||
@@ -84,7 +84,7 @@ progress_line_width=20
|
||||
# fullscreen = cycle:crop_free:fullscreen:no/yes=fullscreen_exit!?Fullscreen
|
||||
# loop-playlist = cycle:repeat:loop-playlist:no/inf!?Loop playlist
|
||||
# toggle:{icon}:{prop} = cycle:{icon}:{prop}:no/yes!
|
||||
controls=menu,gap,<video,audio>subtitles,<has_many_audio>audio,<has_many_video>video,<has_many_edition>editions,gap,shuffle,gap,prev,items,next,space,command:photo_camera:script-message medeia-image-screenshot?Screenshot,command:content_cut:script-message medeia-image-clip?Clip Marker,command:headset:script-message medeia-audio-only?Audio
|
||||
controls=menu,gap,<video,audio>subtitles,<has_many_audio>audio,<has_many_video>video,<has_many_edition>editions,gap,shuffle,gap,prev,items,next,space,command:photo_camera:script-message medeia-image-screenshot?Screenshot,command:content_cut:script-message medeia-image-clip?Clip Marker,command:headset:script-message medeia-audio-only?Audio,command:store:script-message medeia-store-picker?Store
|
||||
controls_size=32
|
||||
controls_margin=8
|
||||
controls_spacing=2
|
||||
|
||||
@@ -145,6 +145,20 @@ function Controls:init_options()
|
||||
})
|
||||
table_assign(control, {element = element, sizing = 'static', scale = 1, ratio = 1})
|
||||
if badge then self:register_badge_updater(badge, element) end
|
||||
|
||||
-- Medeia integration: show the persisted store name in the tooltip.
|
||||
-- Triggered by a matching command string and backed by a mpv user-data prop.
|
||||
if type(params[2]) == 'string' and params[2]:find('medeia%-store%-picker', 1, true) then
|
||||
local store_prop = 'user-data/medeia-selected-store'
|
||||
local function update_store_tooltip()
|
||||
local v = mp.get_property(store_prop) or ''
|
||||
v = trim(tostring(v))
|
||||
element.tooltip = (v ~= '' and ('Store: ' .. v) or 'Store: (none)')
|
||||
request_render()
|
||||
end
|
||||
element:observe_mp_property(store_prop, function() update_store_tooltip() end)
|
||||
update_store_tooltip()
|
||||
end
|
||||
end
|
||||
elseif kind == 'cycle' then
|
||||
if #params ~= 3 then
|
||||
|
||||
Reference in New Issue
Block a user