From 19c4a1d6c17e5959c36e92e5d15954bb946aeaa4 Mon Sep 17 00:00:00 2001 From: stax76 Date: Sun, 5 Jun 2022 16:42:47 +0200 Subject: [PATCH] 6.0.0.0 Beta --- docs/Changelog.md | 8 +++++++- src/Misc/Commands.cs | 3 +++ src/Misc/Player.cs | 18 +++++++----------- src/Properties/AssemblyInfo.cs | 4 ++-- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index 7aae693..5de4540 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -1,4 +1,6 @@ +6.0.0.0 Beta (2022-06-05) + - The options `cache` and `demuxer-max-bytes`have been added to the conf editor. - Command messages are dispatched with `script-message-to mpvnet`. @@ -14,7 +16,11 @@ - Progress command shows time and date. - When input.conf is created on the very first start and a script-opts folder does not exist, a script-opts folder - is created with defaults for osc and console. + is created with osc and console defaults: + `console-scale=1.5` + `osc-idlescreen=no` (hides the original mpv logo) + `osc-hidetimeout=2000` + `osc-scalewindowed=1.5` - Support mpv idle property, see manual for remarks. - Fix external audio and subtitle files not shown in all use cases. - Fix various mpv options not working in case of existing same line comments. diff --git a/src/Misc/Commands.cs b/src/Misc/Commands.cs index 4d3b33b..ad2b077 100644 --- a/src/Misc/Commands.cs +++ b/src/Misc/Commands.cs @@ -158,6 +158,9 @@ namespace mpvnet public static void ShowInfo() { + if (Core.PlaylistPos == -1) + return; + if (Environment.TickCount - LastShowInfo < 5000) { Core.Command("script-message-to mpvnet show-media-info osd"); diff --git a/src/Misc/Player.cs b/src/Misc/Player.cs index 5fc49b1..e000a68 100644 --- a/src/Misc/Player.cs +++ b/src/Misc/Player.cs @@ -194,20 +194,11 @@ namespace mpvnet if (FileEnded && value == -1) { - //ShowLogo(); - if (GetPropertyString("keep-open") == "no" && App.Exit) Core.CommandV("quit"); } }); - ObservePropertyString("script-opts", value => { - if (value.ContainsEx("osc-visibility=never")) - HideLogo(); - else if (PlaylistPos == -1 && Shown) - ShowLogo(); - }); - if (!GetPropertyBool("osd-scale-by-window")) App.StartThreshold = 0; @@ -525,8 +516,13 @@ namespace mpvnet else if (args.Length > 1 && args[0] == "mpv.net") App.RunTask(() => Commands.Execute(args[1], args.Skip(2).ToArray())); - if (args.Length > 1 && args[0] == "osc-idlelogo" && args[1] == "no") - HideLogo(); + if (args.Length > 1 && args[0] == "osc-idlescreen") + { + if (args[1] == "no") + HideLogo(); + else if (args[1] == "yes" && PlaylistPos == -1) + ShowLogo(); + } InvokeAsync(ClientMessageAsync, args); ClientMessage?.Invoke(args); diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index 53d98e5..6b13f4d 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.9.0.0")] -[assembly: AssemblyFileVersion("5.9.0.0")] +[assembly: AssemblyVersion("6.0.0.0")] +[assembly: AssemblyFileVersion("6.0.0.0")]