diff --git a/portable_config/input_scripts.conf b/portable_config/input_scripts.conf index 96773092..bfcf8b6c 100644 --- a/portable_config/input_scripts.conf +++ b/portable_config/input_scripts.conf @@ -42,6 +42,7 @@ Ctrl+r script-message-to save_global_props clean_data # 清除已记录的属性值 - Ctrl+t script-binding thumbfast/toggle # 临时显示/隐藏缩略图 + Ctrl+Alt+t script-binding thumbfast/thumb_rerun # 重启缩略图的获取(修复缩略图卡死) + Ctrl+t script-binding thumbfast/thumb_toggle # 启用/禁用缩略图预览 MBTN_RIGHT script-binding uosc/menu # 唤起uosc的OSD上下文菜单 [右键-单击] diff --git a/portable_config/script-opts.conf b/portable_config/script-opts.conf index 9412af46..778dfe85 100644 --- a/portable_config/script-opts.conf +++ b/portable_config/script-opts.conf @@ -468,7 +468,7 @@ script-opts-append = uosc-timeline_persistency=idle,audio # 始终显示时间线的状态白名单,多个值用半角逗号分隔,默认 idle,audio 可用的其它值 paused image video - script-opts-append = uosc-controls=menu,script-stats,gap,play_pause,gap,subtitles,audio,chapters,editions,video,stream-quality,gap,space,speed,space,shuffle,loop-playlist,loop-file,gap,prev,items,next,gap,fullscreen + script-opts-append = uosc-controls=menu,ST-stats_tog,gap,play_pause,gap,subtitles,audio,chapters,editions,video,stream-quality,gap,space,speed,space,shuffle,loop-playlist,loop-file,gap,prev,items,next,gap,fullscreen # 自定义时间线上方的控件按钮,多个值以半角逗号分隔。值 never 即禁用,示例即默认值 # 详参 “脚本选项的扩展说明” https://github.com/hooke007/MPV_lazy/discussions/186 script-opts-append = uosc-controls_size=32 diff --git a/portable_config/script-opts/uosc.conf b/portable_config/script-opts/uosc.conf index 30e26a22..4f037d14 100644 --- a/portable_config/script-opts/uosc.conf +++ b/portable_config/script-opts/uosc.conf @@ -32,7 +32,7 @@ timeline_persistency=idle,audio # 自定义时间线上方的控件按钮,多个值以半角逗号分隔。值 never 即禁用,示例即默认值 # 详参 “脚本选项的扩展说明” https://github.com/hooke007/MPV_lazy/discussions/186 -controls=menu,script-stats,gap,play_pause,gap,subtitles,audio,chapters,editions,video,stream-quality,gap,space,speed,space,shuffle,loop-playlist,loop-file,gap,prev,items,next,gap,fullscreen +controls=menu,ST-stats_tog,gap,play_pause,gap,subtitles,audio,chapters,editions,video,stream-quality,gap,space,speed,space,shuffle,loop-playlist,loop-file,gap,prev,items,next,gap,fullscreen controls_size=32 controls_size_fullscreen=40 controls_margin=8 diff --git a/portable_config/scripts/thumbfast.lua b/portable_config/scripts/thumbfast.lua index 70a0c7c6..2738ab46 100644 --- a/portable_config/scripts/thumbfast.lua +++ b/portable_config/scripts/thumbfast.lua @@ -5,9 +5,11 @@ COMMIT_ 08d81035bb5020f4caa326e642341f2e8af00ffe 适配多个OSC类脚本的新缩略图引擎 示例在 input.conf 中写入: -CTRL+t script-binding thumbfast/toggle # 临时显示/隐藏缩略图 -]]-- + Ctrl+Alt+t script-binding thumbfast/thumb_rerun # 重启缩略图的获取(修复缩略图卡死) + Ctrl+t script-binding thumbfast/thumb_toggle # 启用/禁用缩略图预览 + +]] local options = { @@ -635,13 +637,22 @@ mp.register_script_message("clear", clear) mp.register_event("file-loaded", file_load) mp.register_event("shutdown", shutdown) -mp.add_key_binding(nil, "toggle", function() +mp.add_key_binding(nil, "thumb_rerun", function() + clear() + shutdown() + auto_run = true + file_load() + mp.osd_message("缩略图功能已重启", 2) +end) +mp.add_key_binding(nil, "thumb_toggle", function() if auto_run then auto_run = false - mp.osd_message("缩略图功能已临时禁用", 2) + file_load() + shutdown() + mp.osd_message("缩略图功能已禁用", 2) else auto_run = true - mp.osd_message("缩略图功能已临时启用", 2) + file_load() + mp.osd_message("缩略图功能已启用", 2) end - file_load() end) diff --git a/portable_config/scripts/uosc/elements/Controls.lua b/portable_config/scripts/uosc/elements/Controls.lua index a3d848bf..3ccc845e 100644 --- a/portable_config/scripts/uosc/elements/Controls.lua +++ b/portable_config/scripts/uosc/elements/Controls.lua @@ -53,7 +53,9 @@ function Controls:init() deband = 'cycle:texture:deband:no/yes!?去色带', deint = 'cycle:clear_all:deinterlace:no/yes!?反交错', ['shot-vid'] = 'command:screenshot:screenshot video?截屏', - ['script-stats'] = 'command:info_outline:script-binding display-stats-toggle?统计数据', + + ['ST-stats_tog'] = 'command:info_outline:script-binding display-stats-toggle?统计数据', + ['ST-thumb_tog'] = 'command:panorama:script-binding thumb_toggle?时间轴预览', } diff --git a/portable_config/scripts/uosc/main.lua b/portable_config/scripts/uosc/main.lua index 2e8f2142..3eefae1c 100644 --- a/portable_config/scripts/uosc/main.lua +++ b/portable_config/scripts/uosc/main.lua @@ -35,7 +35,7 @@ defaults = { timeline_cache = true, timeline_persistency = 'idle,audio', - controls = 'menu,script-stats,gap,play_pause,gap,subtitles,audio,chapters,editions,video,stream-quality,gap,space,speed,space,shuffle,loop-playlist,loop-file,gap,prev,items,next,gap,fullscreen', + controls = 'menu,ST-stats_tog,gap,play_pause,gap,subtitles,audio,chapters,editions,video,stream-quality,gap,space,speed,space,shuffle,loop-playlist,loop-file,gap,prev,items,next,gap,fullscreen', controls_size = 32, controls_size_fullscreen = 40, controls_margin = 8,