diff --git a/Changelog.md b/Changelog.md index 7a797ba..ef7cb70 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,13 +1,12 @@ -### +### 5.1 -- 'Tools > Execute mpv command' was removed, - [mpv-repl](https://github.com/rossy/mpv-repl) is currently the best choice +- 'Tools > Execute mpv command' was replaced with [mpv-repl](https://github.com/rossy/mpv-repl) - many [wiki pages](https://github.com/stax76/mpv.net/wiki) were improved - the logo/icon had a very small cosmetic change - the help in the context menu was improved, for quick access consider the command palette (F1 key) - config options specific to mpv.net are now available from the command line -- the input editor no longer as known limitations, 'alt gr' and ctrl+alt are working now +- the input editor no longer has known limitations, 'alt gr' and ctrl+alt are working now - the help in the input editor was simplified and the filter logic was improved - fixed issue in file associations causing mpv.net not to appear in OS default apps - 'Tools > Manage File Associations' was replaced by 'Tools > OS Setup', @@ -25,18 +24,14 @@ - it's now enforced that mpv properties on the command line and in the mpv.conf config file are lowercase, if not a error is shown - gpu-api vulkan was not working if media files were opened via - command line (that included Explorer), Vulkan unlike d3d11 and opengl - requires a window being visible, this is now satisfied with a - workaround, it's only possible showing a window with default size - first as defines by autofit. Vulkan has few issues, usually the auto option - which uses d3d11 is better! Using Vulkan the mpv.net setting + command line (that included Explorer) - new setting minimum-aspect-ratio added, minimum aspect ratio for the window, this was previously hard coded to 1.3 - new setting auto-load-folder added, for single files automatically load the entire directory into the playlist, previously this was forced, now it can be disabled - new setting themed-menu added, follow theme color in context menu, - default: no, UI related settings have now a separate UI tab in the config editor + default: no. UI related settings have now a separate UI tab in the config editor ### 5.0 diff --git a/extensions/ScriptingExtension/ScriptingExtension.cs b/extensions/ScriptingExtension/ScriptingExtension.cs index b4d38d4..8cc0845 100644 --- a/extensions/ScriptingExtension/ScriptingExtension.cs +++ b/extensions/ScriptingExtension/ScriptingExtension.cs @@ -29,8 +29,8 @@ namespace ScriptingExtension // the file name of extensions must end with 'Exten scriptFiles.AddRange(Directory.GetFiles(mp.ConfigFolder + "scripts", "*.cs")); if (Directory.Exists(PathHelp.StartupPath + "scripts")) - foreach (string file in Directory.GetFiles(PathHelp.StartupPath + "scripts", "*.cs")) - App.UnknownModule(file); + foreach (string path in Directory.GetFiles(PathHelp.StartupPath + "scripts", "*.cs")) + scriptFiles.AddRange(Directory.GetFiles(PathHelp.StartupPath + "scripts", "*.cs")); if (scriptFiles.Count == 0) return; CSScriptLibrary.CSScript.EvaluatorConfig.Engine = EvaluatorEngine.CodeDom; diff --git a/img/Avatar.png b/img/Avatar.png new file mode 100644 index 0000000..7b26fef Binary files /dev/null and b/img/Avatar.png differ diff --git a/mpv.net/Misc/App.cs b/mpv.net/Misc/App.cs index 0623c4a..e785bf7 100644 --- a/mpv.net/Misc/App.cs +++ b/mpv.net/Misc/App.cs @@ -100,11 +100,6 @@ namespace mpvnet } } - public static void UnknownModule(string path) - { - Msg.ShowError("Failed to load script or extension", "Only scripts and extensions that ship with mpv.net are allowed in \\scripts or \\extensions.\n\nUser scripts or extensions have to use \\scripts or \\extensions.\n\nNever copy a new mpv.net version over a old mpv.net version.\n\nNever install a new mpv.net version on top of a old mpv.net version.\n\n" + path); - } - public static bool ProcessProperty(string name, string value) { switch (name) diff --git a/mpv.net/Misc/Command.cs b/mpv.net/Misc/Command.cs index 549360d..c803813 100644 --- a/mpv.net/Misc/Command.cs +++ b/mpv.net/Misc/Command.cs @@ -16,7 +16,7 @@ namespace mpvnet { switch (id) { - case "manage-file-associations": ManageFileAssociations(); break; + case "manage-file-associations": ManageFileAssociations(); break; // deprecated 2019 case "cycle-audio": CycleAudio(); break; case "load-audio": LoadAudio(); break; case "load-sub": LoadSubtitle(); break; diff --git a/mpv.net/Misc/Extension.cs b/mpv.net/Misc/Extension.cs index 4550e39..ad08a78 100644 --- a/mpv.net/Misc/Extension.cs +++ b/mpv.net/Misc/Extension.cs @@ -30,7 +30,7 @@ namespace mpvnet if (knownExtensions.Contains(Path.GetFileName(path))) catalog.Catalogs.Add(new DirectoryCatalog(path, "*Extension.dll")); else - App.UnknownModule(path); + Msg.ShowError("Failed to load extension", path + "\n\nOnly extensions that ship with mpv.net are allowed in \\extensions\n\nUser extensions have to use \\extensions\n\nNever copy or install a new mpv.net version over a old mpv.net version."); } } diff --git a/mpv.net/Properties/AssemblyInfo.cs b/mpv.net/Properties/AssemblyInfo.cs index aa80051..25c4b19 100644 --- a/mpv.net/Properties/AssemblyInfo.cs +++ b/mpv.net/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.0.0.0")] -[assembly: AssemblyFileVersion("5.0.0.0")] +[assembly: AssemblyVersion("5.1.0.0")] +[assembly: AssemblyFileVersion("5.1.0.0")] diff --git a/mpv.net/Resources/inputConf.txt b/mpv.net/Resources/inputConf.txt index e204c53..f34d777 100644 --- a/mpv.net/Resources/inputConf.txt +++ b/mpv.net/Resources/inputConf.txt @@ -150,6 +150,7 @@ F1 script-message mpv.net show-command-palette #menu: Tools > Show All Commands h script-message mpv.net show-history #menu: Tools > Show History + Ctrl+r script-message-to repl type "" #menu: Tools > Show REPL l ab-loop #menu: Tools > Set/clear A-B loop points L cycle-values loop-file "inf" "no" #menu: Tools > Toggle infinite file looping Ctrl+h cycle-values hwdec "auto" "no" #menu: Tools > Toggle Hardware Decoding diff --git a/mpv.net/WinForms/MainForm.cs b/mpv.net/WinForms/MainForm.cs index 2221bc2..cafef38 100644 --- a/mpv.net/WinForms/MainForm.cs +++ b/mpv.net/WinForms/MainForm.cs @@ -311,6 +311,9 @@ namespace mpvnet { if (WindowState != FormWindowState.Maximized || FormBorderStyle != FormBorderStyle.None) { + if (WindowState == FormWindowState.Maximized) + WindowState = FormWindowState.Minimized; + FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Maximized; } @@ -324,7 +327,7 @@ namespace mpvnet if (mp.Border) FormBorderStyle = FormBorderStyle.Sizable; else - FormBorderStyle = FormBorderStyle.None; + FormBorderStyle = FormBorderStyle.None; SetFormPosAndSize(); } diff --git a/mpv.net/mpv/mp.cs b/mpv.net/mpv/mp.cs index 4428407..36b166e 100644 --- a/mpv.net/mpv/mp.cs +++ b/mpv.net/mpv/mp.cs @@ -235,15 +235,12 @@ namespace mpvnet string[] startupScripts = Directory.GetFiles(PathHelp.StartupPath + "Scripts"); foreach (string path in startupScripts) - if (path.EndsWith(".lua") || path.EndsWith(".js")) - if (KnownScripts.Contains(Path.GetFileName(path))) - commandv("load-script", $"{path}"); - else - App.UnknownModule(path); + if ((path.EndsWith(".lua") || path.EndsWith(".js")) && KnownScripts.Contains(Path.GetFileName(path))) + commandv("load-script", $"{path}"); } } - public static string[] KnownScripts { get; } = { "osc-visibility.js", "show-playlist.js", "seek-show-position.py" }; + public static string[] KnownScripts { get; } = { "osc-visibility.js", "show-playlist.js", "seek-show-position.py", "repl.lua" }; public static void LoadScripts() { @@ -259,7 +256,7 @@ namespace mpvnet PowerShellScript.Init(path); } else - App.UnknownModule(path); + Msg.ShowError("Failed to load script", path + "\n\nOnly scripts that ship with mpv.net are allowed in \\scripts\n\nUser scripts have to use \\scripts\n\nNever copy or install a new mpv.net version over a old mpv.net version."); } }