Media Info is shown using command palette

This commit is contained in:
stax76
2022-03-12 21:27:07 +01:00
parent d60bf050cf
commit 8c02bb59ee
4 changed files with 59 additions and 16 deletions

View File

@@ -90,10 +90,19 @@ namespace mpvnet
{
string filter = SearchControl.SearchTextBox.Text.ToLower();
if (filter.Length == 1 && item.CommandItem != null)
return item.CommandItem.Input.ToLower().Replace("ctrl+", "")
.Replace("shift+", "")
.Replace("alt+", "") == filter.ToLower();
if (item.CommandItem != null)
{
if (item.CommandItem.Alias.ContainsEx(filter))
return true;
if (filter.Length == 1)
return item.CommandItem.Input.ToLower().Replace("ctrl+", "")
.Replace("shift+", "")
.Replace("alt+", "") == filter.ToLower();
if (item.CommandItem.Command.ToLower().Contains(filter))
return true;
}
if (filter == "" || item.Text.ToLower().Contains(filter) ||
item.SecondaryText.ToLower().Contains(filter))