use new msg model everywhere

This commit is contained in:
stax76
2022-06-03 20:23:05 +02:00
parent 8ee389e8cb
commit 4cd92db141
3 changed files with 15 additions and 13 deletions

View File

@@ -163,7 +163,7 @@ namespace mpvnet
{ {
if (Environment.TickCount - LastShowInfo < 5000) if (Environment.TickCount - LastShowInfo < 5000)
{ {
Core.Command("script-message mpv.net show-media-info osd"); Core.Command("script-message-to mpvnet show-media-info osd");
LastShowInfo = 0; LastShowInfo = 0;
return; return;
} }
@@ -412,11 +412,11 @@ namespace mpvnet
if (args == null || args.Length == 0) if (args == null || args.Length == 0)
{ {
(string Name, string Value)[] pairs = { (string Name, string Value)[] pairs = {
("Show text box", "script-message mpv.net show-media-info default"), ("Show text box", "script-message-to mpvnet show-media-info default"),
("Show text editor", "script-message mpv.net show-media-info editor"), ("Show text editor", "script-message-to mpvnet show-media-info editor"),
("Show on screen", "script-message mpv.net show-media-info osd"), ("Show on screen", "script-message-to mpvnet show-media-info osd"),
("Show full", "script-message mpv.net show-media-info editor full"), ("Show full", "script-message-to mpvnet show-media-info editor full"),
("Show raw", "script-message mpv.net show-media-info editor full raw") }; ("Show raw", "script-message-to mpvnet show-media-info editor full raw") };
var list = pairs.Select(i => new CommandPaletteItem(i.Name, () => Core.Command(i.Value))); var list = pairs.Select(i => new CommandPaletteItem(i.Name, () => Core.Command(i.Value)));
CommandPalette.Instance.SetItems(list); CommandPalette.Instance.SetItems(list);
@@ -695,10 +695,10 @@ namespace mpvnet
public static void ShowSetupDialog() => App.InvokeOnMainThread(() => public static void ShowSetupDialog() => App.InvokeOnMainThread(() =>
{ {
(string Name, string Value)[] pairs = { (string Name, string Value)[] pairs = {
("Register video file associations", "script-message mpv.net reg-file-assoc video"), ("Register video file associations", "script-message-to mpvnet reg-file-assoc video"),
("Register audio file associations", "script-message mpv.net reg-file-assoc audio"), ("Register audio file associations", "script-message-to mpvnet reg-file-assoc audio"),
("Register image file associations", "script-message mpv.net reg-file-assoc image"), ("Register image file associations", "script-message-to mpvnet reg-file-assoc image"),
("Unregister file associations", "script-message mpv.net reg-file-assoc unreg") }; ("Unregister file associations", "script-message-to mpvnet reg-file-assoc unreg") };
var list = pairs.Select(i => new CommandPaletteItem(i.Name, () => Core.Command(i.Value))); var list = pairs.Select(i => new CommandPaletteItem(i.Name, () => Core.Command(i.Value)));
CommandPalette.Instance.SetItems(list); CommandPalette.Instance.SetItems(list);

View File

@@ -213,9 +213,11 @@ namespace mpvnet
{ {
string content = File.ReadAllText(InputConfPath); string content = File.ReadAllText(InputConfPath);
if (!content.Contains("script-message mpv.net show-menu")) if (!content.Contains("script-message mpv.net show-menu") &&
!content.Contains("script-message-to mpvnet show-menu"))
File.WriteAllText(InputConfPath, BR + content.Trim() + BR + File.WriteAllText(InputConfPath, BR + content.Trim() + BR +
"MBTN_Right script-message mpv.net show-menu" + BR); "MBTN_Right script-message-to mpvnet show-menu" + BR);
} }
App.Settings.ShowMenuFixApplied = true; App.Settings.ShowMenuFixApplied = true;

View File

@@ -124,7 +124,7 @@ t script-binding stats/display-stats-toggle #menu: View > Toggle Stati
Del script-binding osc/visibility #menu: View > Toggle OSC Visibility Del script-binding osc/visibility #menu: View > Toggle OSC Visibility
i script-message-to mpvnet show-info #menu: View > Show File/Stream Info i script-message-to mpvnet show-info #menu: View > Show File/Stream Info
p show-progress #menu: View > Show Progress p show-progress #menu: View > Show Progress
F9 script-message mpv.net show-media-info osd #menu: View > Show Tracks F9 script-message-to mpvnet show-media-info osd #menu: View > Show Tracks
Ctrl+m script-message-to mpvnet show-media-info #menu: View > Show Media Info Ctrl+m script-message-to mpvnet show-media-info #menu: View > Show Media Info
Alt+r script-message-to mpvnet show-recent #menu: View > Show Recent Alt+r script-message-to mpvnet show-recent #menu: View > Show Recent