From c56855bbc7017da5853c3e3804f18223df1ec578 Mon Sep 17 00:00:00 2001 From: stax76 Date: Sat, 5 Mar 2022 21:05:50 +0100 Subject: [PATCH] 5.6.2.0 Beta --- docs/Changelog.md | 9 +++++++++ src/Misc/App.cs | 2 +- src/Misc/Commands.cs | 17 ++++++++++++++++- src/Misc/Misc.cs | 8 ++++++++ src/Properties/AssemblyInfo.cs | 4 ++-- src/Resources/input.conf.txt | 2 +- 6 files changed, 37 insertions(+), 5 deletions(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index bc5f7a1..2be2b34 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -1,4 +1,13 @@ +5.6.2.0 Beta (2022-03-05) + +- Fix script-opts files being ignored, removed options are: + script-opts = osc-scalewindowed=1.5,osc-hidetimeout=2000,console-scale=1.5 +- Update MediaInfo to version 21.9.0.0 and + write version and date in About dialog. +- Provide setup options in command palette to ensure backward + compatibility with previous input.conf definitions. + 5.6.1.0 Beta (2022-03-05) - Various conf editor improvements. (hooke007) diff --git a/src/Misc/App.cs b/src/Misc/App.cs index 4e951f9..7f28e65 100644 --- a/src/Misc/App.cs +++ b/src/Misc/App.cs @@ -131,7 +131,7 @@ namespace mpvnet public static string Version => "Copyright (C) 2000-2022 mpv.net/mpv/mplayer\n" + $"mpv.net {Application.ProductVersion} ({File.GetLastWriteTime(Application.ExecutablePath).ToShortDateString()})\n" + - $"{Core.GetPropertyString("mpv-version")} ({File.GetLastWriteTime(Folder.Startup + "mpv-2.dll").ToShortDateString()})\nffmpeg {Core.GetPropertyString("ffmpeg-version")}\nGPL v2 License"; + $"{Core.GetPropertyString("mpv-version")} ({File.GetLastWriteTime(Folder.Startup + "mpv-2.dll").ToShortDateString()})\nffmpeg {Core.GetPropertyString("ffmpeg-version")}\nMediaInfo {FileVersionInfo.GetVersionInfo(Path.Combine(Application.StartupPath, "MediaInfo.dll")).FileVersion} ({File.GetLastWriteTime(Path.Combine(Application.StartupPath , "MediaInfo.dll")).ToShortDateString()})\nGPL v2 License"; public static void ShowException(object obj) { diff --git a/src/Misc/Commands.cs b/src/Misc/Commands.cs index 9c9fca8..ce4163f 100644 --- a/src/Misc/Commands.cs +++ b/src/Misc/Commands.cs @@ -26,7 +26,7 @@ namespace mpvnet { case "add-files-to-playlist": OpenFiles("append"); break; // deprecated 2019 case "cycle-audio": CycleAudio(); break; - case "execute-mpv-command": Msg.ShowError("Command was removed, reset input.conf."); break; // deprecated 2020 + case "execute-mpv-command": Msg.ShowError("The command was removed, please reset input.conf by deleting it, in the new menu use the on screen console."); break; // deprecated 2020 case "load-audio": LoadAudio(); break; case "load-sub": LoadSubtitle(); break; case "open-conf-folder": ProcessHelp.ShellExecute(Core.ConfigFolder); break; @@ -58,6 +58,7 @@ namespace mpvnet case "show-properties": ShowProperties(); break; case "show-protocols": ShowStrings(mpvHelp.GetProtocols().Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)); break; case "show-recent": ShowRecent(); break; + case "show-setup-dialog": ShowSetupDialog(); break; // deprecated 2022 case "show-subtitle-tracks": ShowSubtitleTracks(); break; case "show-text": ShowText(args[0], Convert.ToInt32(args[1]), Convert.ToInt32(args[2])); break; case "window-scale": WindowScale(float.Parse(args[0], CultureInfo.InvariantCulture)); break; @@ -624,5 +625,19 @@ namespace mpvnet MainForm.Instance.ShowCommandPalette(); CommandPalette.Instance.SelectFirst(); }); + + public static void ShowSetupDialog() => App.InvokeOnMainThread(() => + { + (string, string)[] pairs = { + ("Register video file associations", "script-message mpv.net reg-file-assoc video"), + ("Register audio file associations", "script-message mpv.net reg-file-assoc audio"), + ("Register image file associations", "script-message mpv.net reg-file-assoc image"), + ("Unregister file associations", "script-message mpv.net reg-file-assoc unreg") }; + + var list = pairs.Select(i => new CommandPaletteItem(i.Item1, () => Core.Command(i.Item2))); + CommandPalette.Instance.SetItems(list); + MainForm.Instance.ShowCommandPalette(); + CommandPalette.Instance.SelectFirst(); + }); } } diff --git a/src/Misc/Misc.cs b/src/Misc/Misc.cs index cf05f4c..759a839 100644 --- a/src/Misc/Misc.cs +++ b/src/Misc/Misc.cs @@ -233,6 +233,14 @@ namespace mpvnet public class CommandPaletteItem { + public CommandPaletteItem() {} + + public CommandPaletteItem(string text, Action action) + { + Text = text; + Action = action; + } + public string Text { get; set; } = ""; public string SecondaryText { get; set; } = ""; public Action Action { get; set; } diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index bf76c80..a459c80 100644 --- a/src/Properties/AssemblyInfo.cs +++ b/src/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.6.1.0")] -[assembly: AssemblyFileVersion("5.6.1.0")] +[assembly: AssemblyVersion("5.6.2.0")] +[assembly: AssemblyFileVersion("5.6.2.0")] diff --git a/src/Resources/input.conf.txt b/src/Resources/input.conf.txt index 4058319..c3d8e75 100644 --- a/src/Resources/input.conf.txt +++ b/src/Resources/input.conf.txt @@ -71,6 +71,7 @@ _ ignore #menu: Video > - s async screenshot #menu: Video > Take Screenshot d cycle deinterlace #menu: Video > Toggle Deinterlace a cycle-values video-aspect 16:9 4:3 2.35:1 -1 #menu: Video > Cycle Aspect Ratio +Ctrl+r cycle-values video-rotate 90 180 270 0 #menu: Video > Rotate Video KP7 script-message mpv.net cycle-audio #menu: Audio > Cycle/Next _ ignore #menu: Audio > - @@ -119,7 +120,6 @@ b cycle border #menu: View > Toggle Border Ctrl+t cycle ontop #menu: View > Toggle On Top t script-binding stats/display-stats-toggle #menu: View > Toggle Statistics Del script-binding osc/visibility #menu: View > Toggle OSC Visibility -Ctrl+r cycle-values video-rotate 90 180 270 0 #menu: View > Rotate Video i script-message mpv.net show-info #menu: View > Show File/Stream Info p show-progress #menu: View > Show Progress Ctrl+p script-message mpv.net show-profiles #menu: View > Show Profiles