From b1fccbf1752b180cc1c6f042fc39ad6f1ef99f06 Mon Sep 17 00:00:00 2001 From: stax76 Date: Sat, 4 Oct 2025 15:07:56 +0200 Subject: [PATCH] misc --- .../build.yml | 0 docs/changelog.md | 1 + src/MpvNet.Windows/GuiCommand.cs | 38 ------------------- src/MpvNet/CommandLine.cs | 7 ++-- src/MpvNet/InputHelp.cs | 2 +- 5 files changed, 6 insertions(+), 42 deletions(-) rename .github/{__workflows__ => __workflows__ currently flawed}/build.yml (100%) diff --git a/.github/__workflows__/build.yml b/.github/__workflows__ currently flawed/build.yml similarity index 100% rename from .github/__workflows__/build.yml rename to .github/__workflows__ currently flawed/build.yml diff --git a/docs/changelog.md b/docs/changelog.md index c6787b2..0c0ad7d 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,6 +1,7 @@ # v7.1.1.4 Beta (2025-09-12) +- Fix --script-opt not working. - The mpv.net manual was updated. - The Turkish translation was updated. A Bulgarian translation was added. Thanks to the translators! diff --git a/src/MpvNet.Windows/GuiCommand.cs b/src/MpvNet.Windows/GuiCommand.cs index a829c5c..ce51d50 100644 --- a/src/MpvNet.Windows/GuiCommand.cs +++ b/src/MpvNet.Windows/GuiCommand.cs @@ -55,8 +55,6 @@ public class GuiCommand ["show-profiles"] = args => Msg.ShowInfo(Player.GetProfiles()), ["show-properties"] = args => Player.Command("script-binding select/show-properties"), ["show-protocols"] = args => ShowProtocols(), - ["show-recent-in-command-palette"] = args => ShowRecentFilesInCommandPalette(), - ["stream-quality"] = args => StreamQuality(), ["window-scale"] = args => WindowScaleNet?.Invoke(float.Parse(args[0], CultureInfo.InvariantCulture)), @@ -274,42 +272,6 @@ public class GuiCommand catch { } } - void StreamQuality() - { - int version = Player.GetPropertyInt("user-data/command-palette/version"); - - if (version >= 2) - Player.Command("script-message-to command_palette show-command-palette \"Stream Quality\""); - else - { - var r = Msg.ShowQuestion("The Stream Quality feature requires the command palette to be installed." + BR2 + - "Would you like to install the command palette now?"); - - if (r == MessageBoxResult.OK) - Player.Command("script-message-to mpvnet install-command-palette"); - } - } - - void ShowRecentFilesInCommandPalette() - { - Obj o = new(); - o.title = "Recent Files"; - o.selected_index = 0; - - var items = new List(); - - foreach (string file in App.Settings.RecentFiles) - { - items.Add(new Item() { title = Path.GetFileName(file), - value = ["loadfile", file], - hint = file}); - } - - o.items = items.ToArray(); - string json = JsonSerializer.Serialize(o); - Player.CommandV("script-message", "show-command-palette-json", json); - } - class Obj { public string title { get; set; } = ""; diff --git a/src/MpvNet/CommandLine.cs b/src/MpvNet/CommandLine.cs index 5a995bb..2b40f74 100644 --- a/src/MpvNet/CommandLine.cs +++ b/src/MpvNet/CommandLine.cs @@ -6,9 +6,9 @@ public class CommandLine static List? _arguments; static string[] _preInitProperties { get; } = { - "input-terminal", "terminal", "input-file", "config", "o", - "config-dir", "input-conf", "load-scripts", "scripts", "player-operation-mode", - "idle", "log-file", "msg-color", "dump-stats", "msg-level", "really-quiet" }; + "input-terminal", "terminal", "input-file", "config", "o", "config-dir", "input-conf", + "load-scripts", "scripts", "script-opts", "player-operation-mode", "idle", "log-file", + "msg-color", "dump-stats", "msg-level", "really-quiet" }; public static List Arguments { @@ -46,6 +46,7 @@ public class CommandLine switch (left) { case "script": left = "scripts"; break; + case "script-opt": left = "script-opts"; break; case "audio-file": left = "audio-files"; break; case "sub-file": left = "sub-files"; break; case "external-file": left = "external-files"; break; diff --git a/src/MpvNet/InputHelp.cs b/src/MpvNet/InputHelp.cs index 096d82b..3827d5c 100644 --- a/src/MpvNet/InputHelp.cs +++ b/src/MpvNet/InputHelp.cs @@ -159,7 +159,7 @@ public static class InputHelp Add(b, new (_("View"), "-")); Add(b, new (_("View") + " > " + _("More"), _("Show Console"), "script-binding console/enable", "`")); - Add(b, new (_("View") + " > " + _("More"), _("Show Commands"), "script-message-to mpvnet show-commands", "F2")); + Add(b, new (_("View") + " > " + _("More"), _("Show Commands"), "script-message-to mpvnet show-commands", "F3")); Add(b, new (_("View") + " > " + _("More"), _("Show Bindings"), "script-message-to mpvnet show-bindings")); Add(b, new (_("View") + " > " + _("More"), _("Show Keys"), "script-message-to mpvnet show-keys", "Alt+k")); Add(b, new (_("View") + " > " + _("More"), _("Show Protocols"), "script-message-to mpvnet show-protocols", "Alt+p"));