-
This commit is contained in:
14
README.md
14
README.md
@@ -28,7 +28,9 @@ Table of contents
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### Context Menu
|
### Context Menu
|
||||||
|
|
||||||
@@ -66,6 +68,16 @@ https://github.com/stax76/mpv.net/wiki/Scripting-(CSharp,-Python,-JavaScript,-Lu
|
|||||||
|
|
||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
|
### soon
|
||||||
|
|
||||||
|
- messages boxes had always the info icon even if a different icon (error, warning, question) was intended
|
||||||
|
- instead of silently do nothing on unknown commands there is now a error message listing available commands and showing the location of the default bindings, this helps when commands are removed or renamed
|
||||||
|
- there was a problem fixed that made the cursor hidden when it should be visible
|
||||||
|
|
||||||
|
### 2.1 (2019-03-30)
|
||||||
|
|
||||||
|
- new input editor added, default key binding is here: <https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L89>
|
||||||
|
|
||||||
### 2.0 (2019-03-28)
|
### 2.0 (2019-03-28)
|
||||||
|
|
||||||
- setting track-auto-selection added to settings editor (<https://mpv.io/manual/master/#options-track-auto-selection>)
|
- setting track-auto-selection added to settings editor (<https://mpv.io/manual/master/#options-track-auto-selection>)
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ namespace mpvnet
|
|||||||
Process.Start(Application.StartupPath + "\\mpvConfEdit.exe");
|
Process.Start(Application.StartupPath + "\\mpvConfEdit.exe");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void history(string[] args)
|
public static void show_history(string[] args)
|
||||||
{
|
{
|
||||||
var fp = mp.mpvConfFolderPath + "history.txt";
|
var fp = mp.mpvConfFolderPath + "history.txt";
|
||||||
|
|
||||||
|
|||||||
@@ -362,10 +362,7 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
var buttons = MessageBoxButtons.OK;
|
var buttons = MessageBoxButtons.OK;
|
||||||
if (icon == MessageBoxIcon.Question) buttons = MessageBoxButtons.OKCancel;
|
if (icon == MessageBoxIcon.Question) buttons = MessageBoxButtons.OKCancel;
|
||||||
|
var fn = new Func<DialogResult>(() => MessageBox.Show(message, Application.ProductName, buttons, icon));
|
||||||
var fn = new Func<DialogResult>(() => MessageBox.Show(
|
|
||||||
message, Application.ProductName, buttons, MessageBoxIcon.Information));
|
|
||||||
|
|
||||||
return (DialogResult)Invoke(fn);
|
return (DialogResult)Invoke(fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
t script-binding stats/display-stats #menu: Tools > Show Statistics
|
t script-binding stats/display-stats #menu: Tools > Show Statistics
|
||||||
T script-binding stats/display-stats-toggle #menu: Tools > Toggle Statistics
|
T script-binding stats/display-stats-toggle #menu: Tools > Toggle Statistics
|
||||||
_ ignore #menu: Tools > -
|
_ ignore #menu: Tools > -
|
||||||
h script-message mpv.net history #menu: Tools > Show History
|
h script-message mpv.net show-history #menu: Tools > Show History
|
||||||
l ab-loop #menu: Tools > Set/clear A-B loop points
|
l ab-loop #menu: Tools > Set/clear A-B loop points
|
||||||
L cycle-values loop-file "inf" "no" #menu: Tools > Toggle Infinite Looping
|
L cycle-values loop-file "inf" "no" #menu: Tools > Toggle Infinite Looping
|
||||||
Del script-binding osc/visibility #menu: Tools > Toggle OSC Visibility
|
Del script-binding osc/visibility #menu: Tools > Toggle OSC Visibility
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
Q quit-watch-later #menu: Exit Watch Later
|
Q quit-watch-later #menu: Exit Watch Later
|
||||||
> playlist-next
|
> playlist-next
|
||||||
< playlist-prev
|
< playlist-prev
|
||||||
Enter cycle pause
|
Enter cycle pause
|
||||||
Power quit
|
Power quit
|
||||||
Play cycle pause
|
Play cycle pause
|
||||||
Pause cycle pause
|
Pause cycle pause
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
Forward seek 60
|
Forward seek 60
|
||||||
Rewind seek -60
|
Rewind seek -60
|
||||||
Mute cycle mute
|
Mute cycle mute
|
||||||
Volume_Up add volume 10
|
Volume_Up add volume 10
|
||||||
Volume_Down add volume -10
|
Volume_Down add volume -10
|
||||||
Wheel_Up add volume 10
|
Wheel_Up add volume 10
|
||||||
Wheel_Down add volume -10
|
Wheel_Down add volume -10
|
||||||
@@ -195,21 +195,36 @@ namespace mpvnet
|
|||||||
case mpv_event_id.MPV_EVENT_CLIENT_MESSAGE:
|
case mpv_event_id.MPV_EVENT_CLIENT_MESSAGE:
|
||||||
if (ClientMessage != null)
|
if (ClientMessage != null)
|
||||||
{
|
{
|
||||||
var client_messageData = (mpv_event_client_message)Marshal.PtrToStructure(evt.data, typeof(mpv_event_client_message));
|
try
|
||||||
var args = NativeUtf8StrArray2ManagedStrArray(client_messageData.args, client_messageData.num_args);
|
{
|
||||||
|
var client_messageData = (mpv_event_client_message)Marshal.PtrToStructure(evt.data, typeof(mpv_event_client_message));
|
||||||
|
string[] args = NativeUtf8StrArray2ManagedStrArray(client_messageData.args, client_messageData.num_args);
|
||||||
|
|
||||||
if (args != null && args.Length > 1 && args[0] == "mpv.net")
|
if (args != null && args.Length > 1 && args[0] == "mpv.net")
|
||||||
foreach (var i in mpvnet.Command.Commands)
|
{
|
||||||
if (args[1] == i.Name)
|
bool found = false;
|
||||||
try
|
|
||||||
|
foreach (var i in mpvnet.Command.Commands)
|
||||||
|
{
|
||||||
|
if (args[1] == i.Name)
|
||||||
{
|
{
|
||||||
i.Action(args.Skip(2).ToArray());
|
found = true;
|
||||||
|
i.Action.Invoke(args.Skip(2).ToArray());
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
}
|
||||||
{
|
if (!found)
|
||||||
MainForm.Instance.ShowMsgBox(ex.GetType().Name + "\n\n" + ex.ToString(), MessageBoxIcon.Error);
|
{
|
||||||
}
|
List<string> names = mpvnet.Command.Commands.Select((item) => item.Name).ToList();
|
||||||
ClientMessage?.Invoke(args);
|
names.Sort();
|
||||||
|
MainForm.Instance.ShowMsgBox($"No command '{args[1]}' found. Available commands are:\n\n{string.Join("\n", names)}\n\nHow to bind these commands can be seen in the default input bindings and menu definition located at:\n\nhttps://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt", MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ClientMessage?.Invoke(args);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MainForm.Instance.ShowMsgBox(ex.GetType().Name + "\n\n" + ex.ToString(), MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case mpv_event_id.MPV_EVENT_VIDEO_RECONFIG:
|
case mpv_event_id.MPV_EVENT_VIDEO_RECONFIG:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ using System.Windows;
|
|||||||
[assembly: AssemblyDescription("mpv(.net) key bindings editor")]
|
[assembly: AssemblyDescription("mpv(.net) key bindings editor")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("mpv input edit")]
|
[assembly: AssemblyProduct("mpv(.net) input edit")]
|
||||||
[assembly: AssemblyCopyright("Copyright © stax76")]
|
[assembly: AssemblyCopyright("Copyright © stax76")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|||||||
BIN
screenshots/mpvConfEdit.png
Normal file
BIN
screenshots/mpvConfEdit.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 130 KiB |
Reference in New Issue
Block a user