mpv-scripts icon indicating copy to clipboard operation
mpv-scripts copied to clipboard

[Feature request] In LogManager, Search keybinding should be dynamic

Open vanbang9710 opened this issue 2 years ago • 11 comments

It should only work when we already opened the list

vanbang9710 avatar Jul 30 '23 03:07 vanbang9710

Can you clarify on the issue

Eisa01 avatar Aug 08 '23 09:08 Eisa01

Oh I forgot to mention it's about LogManager. Dynamic keybinds are like, for example, pressing F to toggle filter file only. It only works when we already opened the list

vanbang9710 avatar Aug 08 '23 13:08 vanbang9710

This is already implemented, just ensure that whatever filter you want it to work when the list is closed, is added inside open_list_keybind. Below is sample with inclusion of fileonly filter mapped to F and f.

#--Keybind that will be used to open the list along with the specified filter. Available filters: "all", "recents", "distinct", "protocols", "fileonly", "titleonly", "timeonly", "keywords".
open_list_keybind=[ ["h", "all"], ["H", "all"], ["r", "recents"], ["R", "recents"], ["f", "fileonly"], ["F", "fileonly"]  ]

Eisa01 avatar Aug 21 '23 10:08 Eisa01

it's not filter. It's the search function list_search_activate_keybind=["ctrl+f", "ctrl+F"]

vanbang9710 avatar Aug 22 '23 13:08 vanbang9710

Do you need the search to be activated without the list opened?

Eisa01 avatar Aug 22 '23 13:08 Eisa01

currently it is already activated without the list opened

vanbang9710 avatar Aug 22 '23 16:08 vanbang9710

Sorry I am having tough time understanding your issue. If you mean that search is always active and it immediately starts searching when you press any key, then this is definitely a bug. Try reverting to the latest script with default config.

If the same issue still happens after reverting, then kindly provide the mpv version you are using, the script name and version, as well as the conf file.

Eisa01 avatar Aug 24 '23 06:08 Eisa01

If the keybind is dynamic, it should be only active when you activate the logManager with "open_list_keybind". For example, list_filter_jump_keybind is dynamic. But currently search is a global keybind. This is my settings. I already disable all scripts except for SimpleHistory and subtitle-search. I assign Ctrl+f script-message-to subtitle_search start-search but it's shadowed by the search keybind portable_config.zip My mpv version

mpv 0.36.0 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
 built on Tue Aug 01 10:56:31 2023
libplacebo version: v6.292.0-78-gabf34ba-dirty
FFmpeg version: N-111661-g567e78b28
FFmpeg library versions:
   libavutil       58.14.100
   libavcodec      60.22.100
   libavformat     60.10.100
   libswscale      7.3.100
   libavfilter     9.10.100
   libswresample   4.11.100

vanbang9710 avatar Aug 24 '23 14:08 vanbang9710

Can you check if the same issue exists with SimpleBookmark because it ships with an upgraded version of LogManager. I plan to migrate all scripts to it later.

Eisa01 avatar Aug 24 '23 20:08 Eisa01

SimpleBookmark also has this issue. I forgot to mention that the search key will become a global hotkey after you activate the log at least one time.

vanbang9710 avatar Aug 25 '23 02:08 vanbang9710

I'll check it, thanks for letting me know

Eisa01 avatar Aug 26 '23 22:08 Eisa01