From 9d46064dcabf878fc4b761523dc67d36c7c2c1ae Mon Sep 17 00:00:00 2001 From: Frank Skare Date: Thu, 7 May 2020 11:47:09 +0200 Subject: [PATCH] 5.4.7.1 Beta --- Changelog.md | 10 +++++++++- Release.ps1 | 21 +++++++++++++-------- mpv.net/Properties/AssemblyInfo.cs | 4 ++-- mpv.net/mpv/Core.cs | 9 ++------- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/Changelog.md b/Changelog.md index 39eb6d9..77cf372 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,10 +1,18 @@ -5.4.7.1 Beta (not yet released) +5.4.7.2 Beta (not yet released) ============ +5.4.7.1 Beta +============ + +- log error fix, mpv.net does now ignore all log messages because libmpv already + prints the log messages to the the terminal +- the release script now also outputs x86 beta versions so x86 users can test betas + + 5.4.7.0 ======= diff --git a/Release.ps1 b/Release.ps1 index d37ce64..1d4f2c4 100644 --- a/Release.ps1 +++ b/Release.ps1 @@ -58,21 +58,21 @@ if ($versionInfo.FilePrivatePart -eq 0) $targetDir = $desktopDir + "\mpv.net-portable-x64-$($versionInfo.FileVersion)" Copy-Item .\mpv.net\bin\x64 $targetDir -Recurse -Exclude System.Management.Automation.xml - & $7z a -t7z -mx9 "$targetDir.7z" -r "$targetDir\*" if ($LastExitCode) { throw $LastExitCode } - & $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*" if ($LastExitCode) { throw $LastExitCode } $targetDir = $desktopDir + "\mpv.net-portable-x86-$($versionInfo.FileVersion)" Copy-Item .\mpv.net\bin\x86 $targetDir -Recurse -Exclude System.Management.Automation.xml - & $7z a -t7z -mx9 "$targetDir.7z" -r "$targetDir\*" if ($LastExitCode) { throw $LastExitCode } - & $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*" if ($LastExitCode) { throw $LastExitCode } + + Set-Clipboard ($versionInfo.FileVersion + "`n`nChangelog:`n`n" + + 'https://github.com/stax76/mpv.net/blob/master/Changelog.md' + "`n`nDownload:`n`n" + + 'https://github.com/stax76/mpv.net/blob/master/Manual.md#stable') } else { @@ -84,6 +84,11 @@ else & $7z a -t7z -mx9 "$targetDir.7z" -r "$targetDir\*" if ($LastExitCode) { throw $LastExitCode } + $targetDir = $desktopDir + "\mpv.net-portable-x86-$($versionInfo.FileVersion)" + Copy-Item .\mpv.net\bin\x86 $targetDir -Recurse -Exclude System.Management.Automation.xml + & $7z a -t7z -mx9 "$targetDir.7z" -r "$targetDir\*" + if ($LastExitCode) { throw $LastExitCode } + $cloudDirectories = 'C:\Users\frank\OneDrive\Public\mpv.net\', 'C:\Users\frank\Dropbox\Public\mpv.net\' @@ -103,11 +108,11 @@ else Copy-Item ($targetDir + '.7z') $targetFile Invoke-Item $cloudDirectory + + Set-Clipboard ($versionInfo.FileVersion + " Beta`n`nChangelog:`n`n" + + 'https://github.com/stax76/mpv.net/blob/master/Changelog.md' + "`n`nDownload:`n`n" + + 'https://github.com/stax76/mpv.net/blob/master/Manual.md#beta') } } -Set-Clipboard ($versionInfo.FileVersion + "`n`n" + - 'https://github.com/stax76/mpv.net/blob/master/Changelog.md' + "`n`n" + - 'https://github.com/stax76/mpv.net#download') - Write-Host 'successfully finished' -ForegroundColor Green diff --git a/mpv.net/Properties/AssemblyInfo.cs b/mpv.net/Properties/AssemblyInfo.cs index e41a5ab..88831f2 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.4.7.0")] -[assembly: AssemblyFileVersion("5.4.7.0")] +[assembly: AssemblyVersion("5.4.7.1")] +[assembly: AssemblyFileVersion("5.4.7.1")] diff --git a/mpv.net/mpv/Core.cs b/mpv.net/mpv/Core.cs index ed8066c..92e0804 100644 --- a/mpv.net/mpv/Core.cs +++ b/mpv.net/mpv/Core.cs @@ -117,7 +117,7 @@ namespace mpvnet if (Handle == IntPtr.Zero) throw new Exception("error mpv_create"); - mpv_request_log_messages(Handle, "info"); + mpv_request_log_messages(Handle, "terminal-default"); Task.Run(() => EventLoop()); @@ -397,14 +397,9 @@ namespace mpvnet { var data = (mpv_event_log_message)Marshal.PtrToStructure(evt.data, typeof(mpv_event_log_message)); - if (LogMessage != null || LogMessageAsync != null || - data.log_level == mpv_log_level.MPV_LOG_LEVEL_FATAL) + if (LogMessage != null || LogMessageAsync != null) { string msg = $"[{ConvertFromUtf8(data.prefix)}] {ConvertFromUtf8(data.text)}"; - - if (data.log_level == mpv_log_level.MPV_LOG_LEVEL_FATAL) - App.RunAction(() => App.ShowError("Fatal Error", msg)); - InvokeAsync(LogMessageAsync, data.log_level, msg); LogMessage?.Invoke(data.log_level, msg); }