From bc6167c4eea61a3f6e82db2fc3d3895b1fb7b8d4 Mon Sep 17 00:00:00 2001 From: Frank Skare Date: Fri, 15 Nov 2019 16:41:37 +0100 Subject: [PATCH] new libmpv added to changelog --- Changelog.md | 9 +++++++-- mpv.net/Misc/Misc.cs | 26 -------------------------- mpv.net/mpv/mp.cs | 5 ++--- 3 files changed, 9 insertions(+), 31 deletions(-) diff --git a/Changelog.md b/Changelog.md index 663b976..52596df 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,16 +4,21 @@ - new: forecolors in the dark theme are slightly darker now - new: readme/website and manual were improved - new: source code includes now the release script to build the archives and setup files +- new: the history feature now uses the full path - new: install via Scoop and Chocolatey added to readme/website (maintained by Restia666Ashdoll) - new: update check, it must be enabled first in the conf editor under General - new: update feature, requires PowerShell 5 and curl, an up to date Windows 10 system has both included. Main menu (input.conf) must be reset or updated manually ([defaults](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt)) +- update: libmpv shinchiro 2019-11-10 + - fix: often the OSC was shown when fullscreen was entered or on app startup, this is now suppressed -- fix: the file association routine uses no longer 'Play with mpv.net' - for the default open verb because it doesn't support multi selection. +- fix: the file association routine uses no longer 'Play with mpv.net' for the + default open verb caption because it doesn't support multi selection, + it shows now only Open, the manual explains how to get multi selection + in File Explorer, read about it [here](https://github.com/stax76/mpv.net/blob/master/Manual.md#open-with) - fix: x86 builds had an older version included because of a misconfiguration in the solution file diff --git a/mpv.net/Misc/Misc.cs b/mpv.net/Misc/Misc.cs index ddbdeb1..9fbcb3b 100644 --- a/mpv.net/Misc/Misc.cs +++ b/mpv.net/Misc/Misc.cs @@ -248,30 +248,4 @@ namespace mpvnet { public static string Startup { get; } = Application.StartupPath + @"\"; } - - public class PathHelp - { - public static string GetBaseName(string value) - { - if (string.IsNullOrEmpty(value)) - return ""; - - int index = value.IndexOf("/"); - - if (index > -1) - value = value.Substring(index + 1); - - index = value.IndexOf("\\"); - - if (index > -1) - value = value.Substring(index + 1); - - index = value.LastIndexOf("."); - - if (index > -1) - value = value.Substring(0, index); - - return value; - } - } } \ No newline at end of file diff --git a/mpv.net/mpv/mp.cs b/mpv.net/mpv/mp.cs index 9cae186..1c8e664 100644 --- a/mpv.net/mpv/mp.cs +++ b/mpv.net/mpv/mp.cs @@ -93,7 +93,6 @@ namespace mpvnet public static void Init() { - LoadLibrary("mpv-1.dll"); Handle = mpv_create(); Task.Run(() => EventLoop()); @@ -793,9 +792,9 @@ namespace mpvnet int totalMinutes = Convert.ToInt32((DateTime.Now - LastHistoryStartDateTime).TotalMinutes); - if (PathHelp.GetBaseName(LastHistoryPath) != "" && totalMinutes > 1) + if (LastHistoryPath != null && totalMinutes > 1) File.AppendAllText(ConfigFolder + "history.txt", DateTime.Now.ToString().Substring(0, 16) + - " " + totalMinutes.ToString().PadLeft(3) + " " + PathHelp.GetBaseName(LastHistoryPath) + "\r\n"); + " " + totalMinutes.ToString().PadLeft(3) + " " + LastHistoryPath + "\r\n"); LastHistoryPath = path; LastHistoryStartDateTime = DateTime.Now;