misc
This commit is contained in:
@@ -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!
|
||||
|
||||
@@ -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<Item>();
|
||||
|
||||
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; } = "";
|
||||
|
||||
@@ -6,9 +6,9 @@ public class CommandLine
|
||||
static List<StringPair>? _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<StringPair> 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;
|
||||
|
||||
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user