5.4.7.4 Beta

This commit is contained in:
Frank Skare
2020-05-10 07:01:59 +02:00
parent efb4c085d5
commit f61eef8961
10 changed files with 58 additions and 72 deletions

View File

@@ -1,8 +1,15 @@
5.4.7.5 Beta (not yet released)
============
5.4.7.4 Beta (not yet released)
============
-
- the media key issue should now be fixed!
- libmpv and youtube-dl update
5.4.7.3 Beta

View File

@@ -24,7 +24,6 @@ namespace mpvnet
public static string DarkTheme { get; set; } = "dark";
public static string LightTheme { get; set; } = "light";
public static string StartSize { get; set; } = "previous";
public static string MediaKeys { get; set; } = "mpvnet";
public static bool RememberPosition { get; set; }
public static bool DebugMode { get; set; }
@@ -178,7 +177,6 @@ namespace mpvnet
case "auto-load-folder": AutoLoadFolder = value == "yes"; return true;
case "update-check": UpdateCheck = value == "yes"; return true;
case "start-size": StartSize = value; return true;
case "media-keys": MediaKeys = value; return true;
case "process-instance": ProcessInstance = value; return true;
case "dark-mode": DarkMode = value; return true;
case "start-threshold": StartThreshold = value.Int(); return true;

View File

@@ -87,25 +87,22 @@ namespace mpvnet
{
switch (value)
{
case 51: return "CHANNEL_UP"; // MEDIA_CHANNEL_UP
case 52: return "CHANNEL_DOWN"; // MEDIA_CHANNEL_DOWN
case 49: return "FORWARD"; // MEDIA_FAST_FORWARD
case 50: return "REWIND"; // MEDIA_REWIND
case 46: return "PLAY"; // MEDIA_PLAY
case 14: return "PLAYPAUSE"; // MEDIA_PLAY_PAUSE
case 47: return "PAUSE"; // MEDIA_PAUSE
case 5: return "SEARCH"; // BROWSER_SEARCH
case 6: return "FAVORITES"; // BROWSER_FAVORITES
case 7: return "HOMEPAGE"; // BROWSER_HOME
case 15: return "MAIL"; // LAUNCH_MAIL
case 33: return "PRINT"; // PRINT
case 11: return "NEXT"; // MEDIA_NEXTTRACK
case 12: return "PREV"; // MEDIA_PREVIOUSTRACK
case 13: return "STOP"; // MEDIA_STOP
case 14: return "PLAYPAUSE"; // MEDIA_PLAY_PAUSE
case 46: return "PLAY"; // MEDIA_PLAY
case 47: return "PAUSE"; // MEDIA_PAUSE
case 48: return "RECORD"; // MEDIA_RECORD
case 1: return "VOLUME_UP"; // VOLUME_UP
case 9: return "VOLUME_DOWN"; // VOLUME_DOWN
case 8: return "MUTE"; // VOLUME_MUTE
case 7: return "HOMEPAGE"; // BROWSER_HOME
case 15: return "MAIL"; // LAUNCH_MAIL
case 6: return "FAVORITES"; // BROWSER_FAVORITES
case 5: return "SEARCH"; // BROWSER_SEARCH
case 33: return "PRINT"; // PRINT
case 49: return "FORWARD"; // MEDIA_FAST_FORWARD
case 50: return "REWIND"; // MEDIA_REWIND
case 51: return "CHANNEL_UP"; // MEDIA_CHANNEL_UP
case 52: return "CHANNEL_DOWN"; // MEDIA_CHANNEL_DOWN
}
return null;

View File

@@ -1,10 +1,8 @@

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;

View File

@@ -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.3")]
[assembly: AssemblyFileVersion("5.4.7.3")]
[assembly: AssemblyVersion("5.4.7.4")]
[assembly: AssemblyFileVersion("5.4.7.4")]

View File

@@ -314,7 +314,7 @@ options = [{ name = "yes" },
name = "autofit"
file = "mpv"
filter = "Screen"
help = "<int> Initial window height in percent. Default: 50"
help = "<int> Initial window height in percent. Default: 60"
[[settings]]
name = "autofit-smaller"
@@ -528,17 +528,6 @@ file = "mpv"
filter = "Input"
help = "Number of key presses to generate per second on autorepeat."
[[settings]]
name = "media-keys"
file = "mpvnet"
default = "mpvnet"
filter = "Input"
help = "Defines how WM_APPCOMMAND messages are handled. (mpv.net specific setting)"
options = [{ name = "discard", help = "Blocks WM_APPCOMMAND messages, virtual key codes are still processed." },
{ name = "pass", help = "Let WM_APPCOMMAND messages pass to default handling." },
{ name = "mpv", help = "Forward WM_APPCOMMAND messages to libmpv." },
{ name = "mpvnet", help = "Translate WM_APPCOMMAND messages to mpv keys and send as keypress command." }]
[[settings]]
name = "update-check"
file = "mpvnet"

View File

@@ -1,22 +1,31 @@
# This file defines the key and mouse bindings and the context menu
# of mpv.net. A input and config editor can be found in mpv.nets
# context menu under 'Settings'. The defaults of this file can be found at:
# https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt
# The defaults of mpv can be found at:
# https://github.com/mpv-player/mpv/blob/master/etc/input.conf
# mpv.net's defaults of mpv.conf contain: 'input-default-bindings = no'
# which disables mpv's input defaults. Every line in this file begins with a
# This file defines the key and mouse bindings and the context menu of mpv.net.
# A convenient input and config editor can be found in the context menu of mpv.net
# under 'Settings'.
# The mpv.conf defaults of mpv.net contain: 'input-default-bindings = no'
# which disables the input defaults of mpv. Every line in this file begins with a
# space character to make it easier to do a text search, so if you want to know
# if 'o' has already a binding you can do a text search on ' o '.
# mpv input commands: https://mpv.io/manual/master/#list-of-input-commands
# input test mode:
# mpvnet --input-test
# run mpv.net in input test mode with: mpvnet --input-test
# input key list:
# mpv --input-keylist
# mpv.net input.conf defaults:
# https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt
# mpv input.conf defaults:
# https://github.com/mpv-player/mpv/blob/master/etc/input.conf
# mpv input commands:
# https://mpv.io/manual/master/#list-of-input-commands
# mpv input options:
# https://mpv.io/manual/master/#input
o script-message mpv.net open-files #menu: Open > Open Files...
u script-message mpv.net open-url #menu: Open > Open URL or file path from clipboard
@@ -180,9 +189,6 @@
Stop stop
Forward seek 60
Rewind seek -60
Mute cycle mute
Volume_Up add volume 10
Volume_Down add volume -10
Wheel_Up add volume 10
Wheel_Down add volume -10
Wheel_Left add volume -10

View File

@@ -99,8 +99,6 @@ namespace mpvnet
text = "NEXT"; break;
case WinForms.Keys.MediaPreviousTrack:
text = "PREV"; break;
case WinForms.Keys.VolumeMute:
text = "MUTE"; break;
case WinForms.Keys.BrowserHome:
text = "HOMEPAGE"; break;
case WinForms.Keys.LaunchMail:
@@ -114,8 +112,8 @@ namespace mpvnet
case WinForms.Keys.Cancel:
text = "CANCEL"; break;
case WinForms.Keys.VolumeUp:
text = ""; break;
case WinForms.Keys.VolumeDown:
case WinForms.Keys.VolumeMute:
text = ""; break;
}

View File

@@ -527,23 +527,14 @@ namespace mpvnet
break;
case 0x319: // WM_APPCOMMAND
{
if (App.MediaKeys == "discard") {
string value = mpvHelp.WM_APPCOMMAND_to_mpv_key((int)(m.LParam.ToInt64() >> 16 & ~0xf000));
if (value != null)
{
core.command("keypress " + value);
m.Result = new IntPtr(1);
LastAppCommand = Environment.TickCount;
return;
} else if (App.MediaKeys == "mpv") {
if (core.WindowHandle != IntPtr.Zero) {
m.Result = WinAPI.SendMessage(core.WindowHandle, m.Msg, m.WParam, m.LParam);
if (m.Result != IntPtr.Zero)
return;
}
} else if (App.MediaKeys == "mpvnet") {
string value = mpvHelp.WM_APPCOMMAND_to_mpv_key((int)(m.LParam.ToInt64() >> 16 & ~0xf000));
if (value != null) {
core.command("keypress " + value);
m.Result = new IntPtr(1);
LastAppCommand = Environment.TickCount;
return;
}
}
}
break;
@@ -630,7 +621,9 @@ namespace mpvnet
ProgressTimer.Start();
}
base.WndProc(ref m);
// beep sound when closed using taskbar due to exception
//if (!IsDisposed)
base.WndProc(ref m);
}
void CursorTimer_Tick(object sender, EventArgs e)
@@ -863,8 +856,9 @@ namespace mpvnet
protected override void OnKeyDown(KeyEventArgs e)
{
// prevent beep using alt key
if (Control.ModifierKeys == Keys.Alt)
e.SuppressKeyPress = true; // prevent beep using alt key
e.SuppressKeyPress = true;
base.OnKeyDown(e);
}

View File

@@ -130,7 +130,6 @@ namespace mpvnet
set_property_string("wid", MainForm.Hwnd.ToString());
set_property_string("osc", "yes");
set_property_string("input-media-keys", "yes");
set_property_string("force-window", "yes");
set_property_string("config-dir", ConfigFolder);
set_property_string("config", "yes");