Eisa01 / mpv-scripts

This repository contain scripts I have made for mpv media player...
BSD 2-Clause "Simplified" License
504 stars 35 forks source link

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

Open vanbang9710 opened 11 months ago

vanbang9710 commented 11 months ago

It should only work when we already opened the list

Eisa01 commented 11 months ago

Can you clarify on the issue

vanbang9710 commented 11 months ago

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

Eisa01 commented 10 months ago

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"]  ]
vanbang9710 commented 10 months ago

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

Eisa01 commented 10 months ago

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

vanbang9710 commented 10 months ago

currently it is already activated without the list opened

Eisa01 commented 10 months ago

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.

vanbang9710 commented 10 months ago

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
Eisa01 commented 10 months ago

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.

vanbang9710 commented 10 months ago

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.

Eisa01 commented 10 months ago

I'll check it, thanks for letting me know