Compare commits
17 Commits
v5.6.2.0-b
...
v5.8.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27dc98af21 | ||
|
|
ce12eb61fd | ||
|
|
8ed62df8e2 | ||
|
|
f4b4be5466 | ||
|
|
9a33bea7e7 | ||
|
|
3f469897b0 | ||
|
|
1aa380f768 | ||
|
|
b0c3988a9d | ||
|
|
8c02bb59ee | ||
|
|
d60bf050cf | ||
|
|
a0f2e8bd92 | ||
|
|
63db623d07 | ||
|
|
ab0b2c4da2 | ||
|
|
091e159d10 | ||
|
|
91fa89b058 | ||
|
|
36d3543852 | ||
|
|
72ed687390 |
@@ -1,4 +1,32 @@
|
|||||||
|
|
||||||
|
5.8.0.0 Beta (2022-04-02)
|
||||||
|
|
||||||
|
- Fix crash on Windows 7 systems without PowerShell.
|
||||||
|
- Fix showing incorrect timestamps in About dialog of Store version.
|
||||||
|
- Fix Store page showing non existant ARM and x86 support.
|
||||||
|
- Fix opening zip files.
|
||||||
|
- The list of available input commands is like before shown
|
||||||
|
by the text editor, so it's like everything else searchable.
|
||||||
|
- Media Info isn't shown directly, instead the command palette
|
||||||
|
shows several choices. The command palette can be bypassed
|
||||||
|
using the arguments: msgbox, editor, full, raw.
|
||||||
|
https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#show-media-info-flags
|
||||||
|
- mpv.net specific commands, the command palette, auto-play property
|
||||||
|
and various other things are documented in the manual.
|
||||||
|
- The action used for the right mouse button can be configured.
|
||||||
|
https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#show-menu
|
||||||
|
- Workaround not reproducible logo drawing crash.
|
||||||
|
- Info command shows the length.
|
||||||
|
- New mpv.net specific option `show-logo` that allows to disable
|
||||||
|
the drawing of the blue mpv.net logo ontop of the native OSC logo.
|
||||||
|
- MediaInfo 22.03
|
||||||
|
|
||||||
|
|
||||||
|
5.7.0.0 Stable (2022-03-09)
|
||||||
|
|
||||||
|
- Improved title and chapter menu for Blu-Rays.
|
||||||
|
- Fix of conf folder virtualization issue of MS Store version.
|
||||||
|
|
||||||
5.6.2.0 Beta (2022-03-05)
|
5.6.2.0 Beta (2022-03-05)
|
||||||
|
|
||||||
- Fix script-opts files being ignored, removed options are:
|
- Fix script-opts files being ignored, removed options are:
|
||||||
|
|||||||
243
docs/Manual.md
243
docs/Manual.md
@@ -13,8 +13,10 @@ Table of contents
|
|||||||
* [Support](#support)
|
* [Support](#support)
|
||||||
* [Settings](#settings)
|
* [Settings](#settings)
|
||||||
* [Input and context menu](#input-and-context-menu)
|
* [Input and context menu](#input-and-context-menu)
|
||||||
|
* [Command Palette](#command-palette)
|
||||||
* [Command Line Interface](#command-line-interface)
|
* [Command Line Interface](#command-line-interface)
|
||||||
* [Terminal](#terminal)
|
* [Terminal](#terminal)
|
||||||
|
* [mpv.net specific commands](#mpvnet-specific-commands)
|
||||||
* [mpv.net specific options](#mpvnet-specific-options)
|
* [mpv.net specific options](#mpvnet-specific-options)
|
||||||
* [External Tools](#external-tools)
|
* [External Tools](#external-tools)
|
||||||
* [Scripting](#scripting)
|
* [Scripting](#scripting)
|
||||||
@@ -57,7 +59,9 @@ Installation
|
|||||||
|
|
||||||
mpv.net requires the .NET Framework 4.8 and Windows 7 or higher and a modern graphics card.
|
mpv.net requires the .NET Framework 4.8 and Windows 7 or higher and a modern graphics card.
|
||||||
|
|
||||||
For internet streaming yt-dlp must be downloaded and installed manually.
|
For internet streaming from YouTube and similar sites, yt-dlp must be
|
||||||
|
copied into the mpv.net folder or the user environment variable PATH
|
||||||
|
must be edited to include the yt-dlp folder.
|
||||||
|
|
||||||
#### File Associations
|
#### File Associations
|
||||||
|
|
||||||
@@ -80,7 +84,7 @@ the files are opened in mpv.net in random order, this works with maximum 15 file
|
|||||||
Support
|
Support
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Before making a support request, please try a newer beta version first.
|
Before making a support request, please try the newest version first.
|
||||||
|
|
||||||
Bugs and feature requests can be made on the github [issue tracker](../../../issues),
|
Bugs and feature requests can be made on the github [issue tracker](../../../issues),
|
||||||
feel free to use for anything mpv.net related, usage questions are welcome.
|
feel free to use for anything mpv.net related, usage questions are welcome.
|
||||||
@@ -105,9 +109,7 @@ Input and context menu
|
|||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
The input (key/mouse) bindings and the context menu definitions are stored in the
|
The input (key/mouse) bindings and the context menu definitions are stored in the
|
||||||
input.conf file, if it's missing mpv.net generates it with the following defaults:
|
input.conf file, if it's missing mpv.net generates it with default values.
|
||||||
|
|
||||||
[input.conf defaults](../../../tree/master/src/Resources/input.conf.txt)
|
|
||||||
|
|
||||||
Please be aware that once input.conf exists, mpv.net cannot update it, this means
|
Please be aware that once input.conf exists, mpv.net cannot update it, this means
|
||||||
the menu becomes outdated when mpv.net is updated with new or changed default menu
|
the menu becomes outdated when mpv.net is updated with new or changed default menu
|
||||||
@@ -137,6 +139,37 @@ https://mpv.io/manual/master/#list-of-input-commands
|
|||||||
mpv input options:
|
mpv input options:
|
||||||
https://mpv.io/manual/master/#input
|
https://mpv.io/manual/master/#input
|
||||||
|
|
||||||
|
|
||||||
|
Command Palette
|
||||||
|
---------------
|
||||||
|
|
||||||
|
The command palette is designed to quickly find,
|
||||||
|
select and execute commands.
|
||||||
|
|
||||||
|
It can also be used to easily find shortcut keys.
|
||||||
|
|
||||||
|
The following functionality is presented with the Command Palette:
|
||||||
|
|
||||||
|
- Show media info in different ways.
|
||||||
|
- Show and select audio tracks.
|
||||||
|
- Show and select subtitle tracks.
|
||||||
|
- Show and select playlist files.
|
||||||
|
- Show and select recent files.
|
||||||
|
- Show available mpv properties.
|
||||||
|
- Show available decoders.
|
||||||
|
- Show available demuxers.
|
||||||
|
- Show available keys.
|
||||||
|
- Show available protocols.
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| ------ | --------------------------- |
|
||||||
|
| F1 | Shows the command palette. |
|
||||||
|
| Escape | Hides the command palette. |
|
||||||
|
| Enter | Executes the selected item. |
|
||||||
|
| Up | Moves the selection up. |
|
||||||
|
| Down | Moves the selection down. |
|
||||||
|
|
||||||
|
|
||||||
Command Line Interface
|
Command Line Interface
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
@@ -162,12 +195,12 @@ Supported are all mpv properties, they are documented here:
|
|||||||
https://mpv.io/manual/master/#properties
|
https://mpv.io/manual/master/#properties
|
||||||
|
|
||||||
|
|
||||||
mpv.net has a feature to list all properties:
|
mpv.net has a feature to list all available properties:
|
||||||
|
|
||||||
_Context Menu > View > Show Properties_
|
_Context Menu > View > Advanced > Show Properties_
|
||||||
|
|
||||||
|
|
||||||
Non property switches are generally not supported in mpv.net!
|
mpv has a few non property based switches which are generally not supported in mpv.net.
|
||||||
|
|
||||||
|
|
||||||
Terminal
|
Terminal
|
||||||
@@ -176,12 +209,155 @@ Terminal
|
|||||||
When mpv.net is started from a terminal it will output status,
|
When mpv.net is started from a terminal it will output status,
|
||||||
error and debug messages to the terminal and accept input keys from the terminal.
|
error and debug messages to the terminal and accept input keys from the terminal.
|
||||||
|
|
||||||
In the context menu under _Tools > Setup_ a button can be found to add
|
|
||||||
mpv.net to the path environment variable.
|
|
||||||
|
|
||||||
A common task for the terminal is debugging scripts.
|
A common task for the terminal is debugging scripts.
|
||||||
|
|
||||||
|
|
||||||
|
mpv.net specific commands
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
`script-message mpv.net <command> <arguments>`
|
||||||
|
|
||||||
|
mpv.net commands are used when mpv commands don't exist or lack a feature.
|
||||||
|
|
||||||
|
### cycle-audio
|
||||||
|
Switches to the next audio track and shows info about that track.
|
||||||
|
|
||||||
|
### load-audio
|
||||||
|
Shows a file browser dialog to open external audio files.
|
||||||
|
|
||||||
|
### load-sub
|
||||||
|
Shows a file browser dialog to open external subtitle files.
|
||||||
|
|
||||||
|
### open-conf-folder
|
||||||
|
Opens the config folder with Windows File Explorer.
|
||||||
|
|
||||||
|
### open-files [\<flags\>]
|
||||||
|
**no-folder**
|
||||||
|
For single files prevents loading the complete folder into the playlist.
|
||||||
|
|
||||||
|
**append**
|
||||||
|
Appends files to the playlist.
|
||||||
|
|
||||||
|
Opens a file browser dialog in order to select files to be opened.
|
||||||
|
The file browser dialog supports multiselect to load multiple files
|
||||||
|
at once. Pressing CTRL appends the files to the playlist.
|
||||||
|
|
||||||
|
### open-optical-media
|
||||||
|
Shows a folder browser dialog to open a DVD or BD folder.
|
||||||
|
ISO images don't have to be mounted, but instead can be
|
||||||
|
opened directly with the open-files command.
|
||||||
|
|
||||||
|
### open-clipboard
|
||||||
|
Opens a single URL or filepath from the clipboard,
|
||||||
|
or multiple files in the file clipboard format.
|
||||||
|
|
||||||
|
### play-pause
|
||||||
|
Cycles the pause property. In case the playlist is empty,
|
||||||
|
the most recent file from the recent files list is loaded.
|
||||||
|
|
||||||
|
### playlist-first
|
||||||
|
Jumps to the first playlist entry, if the loaded file is
|
||||||
|
already the first entry, nothing happens.
|
||||||
|
|
||||||
|
### playlist-last
|
||||||
|
Jumps to the last playlist entry, if the loaded file is
|
||||||
|
already the last entry, nothing happens.
|
||||||
|
|
||||||
|
### reg-file-assoc \<audio|video|image\>
|
||||||
|
Registers the file associations.
|
||||||
|
|
||||||
|
### scale-window \<factor\>
|
||||||
|
Decreases or increases the Window size.
|
||||||
|
|
||||||
|
### shell-execute \<file|URL\>
|
||||||
|
Shell executes a single file or URL.
|
||||||
|
|
||||||
|
### show-about
|
||||||
|
Shows the about dialog.
|
||||||
|
|
||||||
|
### show-audio-devices
|
||||||
|
Shows available audio devices in a message box.
|
||||||
|
|
||||||
|
### show-audio-tracks
|
||||||
|
Shows available audio tracks in the command palette
|
||||||
|
and allows to load the selected audio track.
|
||||||
|
|
||||||
|
### show-command-palette
|
||||||
|
Shows the command palette.
|
||||||
|
|
||||||
|
### show-commands
|
||||||
|
Shows available mpv imput commands.
|
||||||
|
|
||||||
|
### show-conf-editor
|
||||||
|
Shows the conf editor.
|
||||||
|
|
||||||
|
### show-decoders
|
||||||
|
Shows available decoders.
|
||||||
|
|
||||||
|
### show-demuxers
|
||||||
|
Shows available demuxers.
|
||||||
|
|
||||||
|
### show-history
|
||||||
|
|
||||||
|
Shows the history file when existing.
|
||||||
|
|
||||||
|
### show-info
|
||||||
|
Shows a simple file info.
|
||||||
|
|
||||||
|
### show-input-editor
|
||||||
|
Shows the input editor.
|
||||||
|
|
||||||
|
### show-keys
|
||||||
|
Shows available keys (as shown with `--input-keylist`) in the command palette.
|
||||||
|
|
||||||
|
### show-media-info [\<flags\>]
|
||||||
|
**msgbox**
|
||||||
|
Shows media info in a messsge box.
|
||||||
|
|
||||||
|
**editor**
|
||||||
|
Shows media info in the text editor.
|
||||||
|
|
||||||
|
**full**
|
||||||
|
Shows fully detailed media info.
|
||||||
|
|
||||||
|
**raw**
|
||||||
|
Shows media info with raw property names.
|
||||||
|
|
||||||
|
### show-menu
|
||||||
|
Shows the context menu.
|
||||||
|
|
||||||
|
### show-playlist
|
||||||
|
Shows the playlist in the command palette
|
||||||
|
and allows to play the selected entry.
|
||||||
|
|
||||||
|
### show-profiles
|
||||||
|
Shows available profiles with a message box.
|
||||||
|
|
||||||
|
### show-progress
|
||||||
|
Shows a simple OSD progress message.
|
||||||
|
|
||||||
|
### show-properties
|
||||||
|
Shows available properties in the command palette and
|
||||||
|
allows to display the property value of the selected property.
|
||||||
|
|
||||||
|
### show-protocols
|
||||||
|
Shows available protocols in the command palette.
|
||||||
|
|
||||||
|
### show-recent
|
||||||
|
Shows recently played files and URLs in the
|
||||||
|
command palette and allows to select and play entries.
|
||||||
|
|
||||||
|
### show-subtitle-tracks
|
||||||
|
Shows available subtitles in the command palette
|
||||||
|
and allows to activate the selected subtitle.
|
||||||
|
|
||||||
|
### show-text \<text\> \<duration\> \<font-size\>
|
||||||
|
Shows a OSD message with given text, duration and font size.
|
||||||
|
|
||||||
|
### window-scale \<factor\>
|
||||||
|
Works similar as the [window-scale](https://mpv.io/manual/master/#command-interface-window-scale) mpv property.
|
||||||
|
|
||||||
|
|
||||||
mpv.net specific options
|
mpv.net specific options
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
@@ -233,21 +409,18 @@ Window size is remembered in the current session.
|
|||||||
**always**
|
**always**
|
||||||
Window size is always remembered.
|
Window size is always remembered.
|
||||||
|
|
||||||
|
|
||||||
#### --start-threshold=\<milliseconds\>
|
#### --start-threshold=\<milliseconds\>
|
||||||
|
|
||||||
Threshold in milliseconds to wait for libmpv returning the video
|
Threshold in milliseconds to wait for libmpv returning the video
|
||||||
resolution before the window is shown, otherwise default dimensions
|
resolution before the window is shown, otherwise default dimensions
|
||||||
are used as defined by autofit and start-size. Default: 1500
|
are used as defined by autofit and start-size. Default: 1500
|
||||||
|
|
||||||
|
|
||||||
#### --minimum-aspect-ratio=\<float\>
|
#### --minimum-aspect-ratio=\<float\>
|
||||||
|
|
||||||
Minimum aspect ratio, if the AR is smaller than the defined value then
|
Minimum aspect ratio, if the AR is smaller than the defined value then
|
||||||
the window AR is set to 16/9. This avoids a square window for Music
|
the window AR is set to 16/9. This avoids a square window for Music
|
||||||
with cover art. Default: 1.2
|
with cover art. Default: 1.2
|
||||||
|
|
||||||
|
|
||||||
#### --remember-window-position=\<yes|no\>
|
#### --remember-window-position=\<yes|no\>
|
||||||
|
|
||||||
Save the window position on exit. Default: no
|
Save the window position on exit. Default: no
|
||||||
@@ -260,6 +433,11 @@ Save the window position on exit. Default: no
|
|||||||
For single files automatically load the entire directory into the playlist.
|
For single files automatically load the entire directory into the playlist.
|
||||||
Can be suppressed via shift key. Default: yes
|
Can be suppressed via shift key. Default: yes
|
||||||
|
|
||||||
|
#### --auto-play=\<yes|no\>
|
||||||
|
|
||||||
|
If the player is paused and another file is loaded,
|
||||||
|
playback automatically resumes.
|
||||||
|
|
||||||
|
|
||||||
### General
|
### General
|
||||||
|
|
||||||
@@ -267,7 +445,7 @@ Can be suppressed via shift key. Default: yes
|
|||||||
|
|
||||||
Defines if more then one mpv.net process is allowed.
|
Defines if more then one mpv.net process is allowed.
|
||||||
|
|
||||||
Tip: Whenever the control key is pressed when files or URLs are opened,
|
Tip: Whenever the CTRL key is pressed when files or URLs are opened,
|
||||||
the playlist is not cleared but the files or URLs are appended to the playlist.
|
the playlist is not cleared but the files or URLs are appended to the playlist.
|
||||||
This not only works on process startup but in all mpv.net features that open files and URLs.
|
This not only works on process startup but in all mpv.net features that open files and URLs.
|
||||||
|
|
||||||
@@ -280,27 +458,22 @@ Force a single process everytime the shell starts mpv.net. Default
|
|||||||
**queue**
|
**queue**
|
||||||
Force a single process and add files to playlist.
|
Force a single process and add files to playlist.
|
||||||
|
|
||||||
|
|
||||||
#### --recent-count=\<int\>
|
#### --recent-count=\<int\>
|
||||||
|
|
||||||
Amount of recent files to be remembered. Default: 15
|
Amount of recent files to be remembered. Default: 15
|
||||||
|
|
||||||
|
|
||||||
#### --video-file-extensions=\<string\>
|
#### --video-file-extensions=\<string\>
|
||||||
|
|
||||||
Video file extensions used to create file associations and used by the auto-load-folder feature.
|
Video file extensions used to create file associations and used by the auto-load-folder feature.
|
||||||
|
|
||||||
|
|
||||||
#### --audio-file-extensions=\<string\>
|
#### --audio-file-extensions=\<string\>
|
||||||
|
|
||||||
Audio file extensions used to create file associations and used by the auto-load-folder feature.
|
Audio file extensions used to create file associations and used by the auto-load-folder feature.
|
||||||
|
|
||||||
|
|
||||||
#### --image-file-extensions=\<string\>
|
#### --image-file-extensions=\<string\>
|
||||||
|
|
||||||
Image file extensions used to create file associations and used by the auto-load-folder feature.
|
Image file extensions used to create file associations and used by the auto-load-folder feature.
|
||||||
|
|
||||||
|
|
||||||
#### --debug-mode=\<yes|no\>
|
#### --debug-mode=\<yes|no\>
|
||||||
|
|
||||||
Enable this only when a developer asks for it. Default: no
|
Enable this only when a developer asks for it. Default: no
|
||||||
@@ -320,20 +493,23 @@ Available on Windows 10 or higher.
|
|||||||
|
|
||||||
**never**
|
**never**
|
||||||
|
|
||||||
|
#### --dark-theme=\<string\>
|
||||||
#### ---dark-theme=\<string\>
|
|
||||||
|
|
||||||
Color theme used in dark mode. Default: dark
|
Color theme used in dark mode. Default: dark
|
||||||
|
|
||||||
[Color Themes](#color-theme)
|
[Color Themes](#color-theme)
|
||||||
|
|
||||||
|
|
||||||
#### --light-theme=\<string\>
|
#### --light-theme=\<string\>
|
||||||
|
|
||||||
Color theme used in light mode. Default: light
|
Color theme used in light mode. Default: light
|
||||||
|
|
||||||
[Color Themes](#color-theme)
|
[Color Themes](#color-theme)
|
||||||
|
|
||||||
|
#### --show-logo=\<yes|no\>
|
||||||
|
|
||||||
|
Draws the blue mpv.net logo ontop of the native OSC logo.
|
||||||
|
Changes take effect after application restart. Default: yes
|
||||||
|
|
||||||
|
|
||||||
External Tools
|
External Tools
|
||||||
--------------
|
--------------
|
||||||
@@ -384,6 +560,16 @@ My primary remote control solution however is a One For All Contour URC1210
|
|||||||
using Philips code 0556 together with FLIRC USB (gen2).
|
using Philips code 0556 together with FLIRC USB (gen2).
|
||||||
|
|
||||||
|
|
||||||
|
### External Application Button
|
||||||
|
|
||||||
|
Videos can be streamed or downloaded easily with the Chrome extension
|
||||||
|
External Application Button, for download (recommended):
|
||||||
|
|
||||||
|
path: `wt`
|
||||||
|
|
||||||
|
args: `-- pwsh -NoLogo -Command "yt-dlp --ignore-errors --download-archive 'C:\External Application Button.txt' --output 'C:\YouTube\%(channel)s - %(title)s.%(ext)s' ('[HREF]' -replace '&list=.+','')"`
|
||||||
|
|
||||||
|
|
||||||
Scripting
|
Scripting
|
||||||
---------
|
---------
|
||||||
|
|
||||||
@@ -395,14 +581,17 @@ Location: `<config folder>\scripts`
|
|||||||
|
|
||||||
The Lua script host is built into libmpv.
|
The Lua script host is built into libmpv.
|
||||||
|
|
||||||
There is no debugging support, only error and debug messages printed on the terminal.
|
Error and debug messages are printed on the terminal.
|
||||||
|
|
||||||
Lua scripts are loaded before the first media file loads.
|
Lua scripts are loaded before the first media file loads.
|
||||||
|
|
||||||
[mpv Lua documentation](https://mpv.io/manual/master/#lua-scripting)
|
[mpv Lua documentation](https://mpv.io/manual/master/#lua-scripting)
|
||||||
|
|
||||||
[mpv user scripts](https://github.com/mpv-player/mpv/wiki/User-Scripts)
|
[mpv user scripts in the wiki](https://github.com/mpv-player/mpv/wiki/User-Scripts)
|
||||||
|
|
||||||
|
[mpv user scripts on GitHub](https://github.com/topics/mpv-script)
|
||||||
|
|
||||||
|
[mpv user scripts found by Google](https://www.google.com/search?q=mpv+script)
|
||||||
|
|
||||||
#### JavaScript
|
#### JavaScript
|
||||||
|
|
||||||
@@ -412,7 +601,7 @@ Location: `<config folder>\scripts`
|
|||||||
|
|
||||||
The JavaScript script host is built into libmpv.
|
The JavaScript script host is built into libmpv.
|
||||||
|
|
||||||
There is no debugging support, only error and debug messages printed on the terminal.
|
Error and debug messages are printed on the terminal.
|
||||||
|
|
||||||
JavaScript scripts are loaded before the first media file loads.
|
JavaScript scripts are loaded before the first media file loads.
|
||||||
|
|
||||||
@@ -449,6 +638,8 @@ Script code can be written within a C# [extension](../../../tree/master/src/Exte
|
|||||||
that way full code completion and debugger support is available.
|
that way full code completion and debugger support is available.
|
||||||
Once the code was developed and debugged, it can be moved
|
Once the code was developed and debugged, it can be moved
|
||||||
from the extension to a lightweight standalone script.
|
from the extension to a lightweight standalone script.
|
||||||
|
The script host uses an old C# version, modern features
|
||||||
|
like string interpolation are not available.
|
||||||
|
|
||||||
The C# scripting host is like [extensions](../../../tree/master/src/Extensions)
|
The C# scripting host is like [extensions](../../../tree/master/src/Extensions)
|
||||||
not initialized before media files are loaded.
|
not initialized before media files are loaded.
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ mpv.net手册
|
|||||||
* [安装](#安装)
|
* [安装](#安装)
|
||||||
* [支持](#支持)
|
* [支持](#支持)
|
||||||
* [设置](#设置)
|
* [设置](#设置)
|
||||||
* [快捷键输入绑定](#快捷键输入绑定)
|
* [快捷键和上下文菜单](#快捷键和上下文菜单)
|
||||||
* [命令行界面](#命令行界面)
|
* [命令行界面](#命令行界面)
|
||||||
* [终端](#终端)
|
* [终端](#终端)
|
||||||
* [mpv.net的专属选项](#mpvnet的专属选项)
|
* [mpv.net的专属选项](#mpvnet的专属选项)
|
||||||
@@ -43,48 +43,30 @@ mpv专注命令行与终端的使用,而mpv.net保留了这些并加入了现
|
|||||||
下载
|
下载
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
1. [Microsoft Store 的稳定版](https://www.microsoft.com/store/productId/9N64SQZTB3LM)
|
||||||
|
|
||||||
|
2. [Github 的稳定与测试版](../../../releases)
|
||||||
|
|
||||||
|
3. `winget install mpv.net`
|
||||||
|
|
||||||
[更新日志](Changelog.md)
|
[更新日志](Changelog.md)
|
||||||
|
|
||||||
|
|
||||||
### 稳定版
|
|
||||||
|
|
||||||
[发布页面](../../../releases)
|
|
||||||
|
|
||||||
|
|
||||||
### 测试版
|
|
||||||
|
|
||||||
[OneDrive](https://1drv.ms/u/s!ArwKS_ZUR01g1ldoLA90tX9DzKTj?e=xITXbC)
|
|
||||||
|
|
||||||
[DropBox](https://www.dropbox.com/sh/t54p9igdwvllbpl/AADKyWpaFnIhdyosxyP5d3_xa?dl=0)
|
|
||||||
|
|
||||||
|
|
||||||
安装
|
安装
|
||||||
------------
|
------------
|
||||||
|
|
||||||
mpv.net需要.NET Framework 4.8运行库和高于win7版本的系统以及一张不太旧的显卡。
|
mpv.net需要.NET Framework 4.8运行库和高于win7版本的系统以及一张不太旧的显卡。
|
||||||
|
|
||||||
安装版和便携版可供下载。
|
对于网络串流,必须手动下载安装yt-dlp,它必须位于环境变量 PATH 或启动目录中。
|
||||||
|
|
||||||
安装新版本之前应完全卸载旧版本,使用旧版本覆盖安装新版本通常不是推荐的做法,
|
|
||||||
安装工具不强制执行这项操作,因为它难以实现。
|
|
||||||
|
|
||||||
对于网络串流,必须手动下载安装youtube-dl,它必须位于环境变量 PATH 或启动目录中。
|
|
||||||
|
|
||||||
mpv.net不限制系统平台,win32的用户必须替换目录中的3个工具:
|
|
||||||
|
|
||||||
- mpv-1.dll
|
|
||||||
- MediaInfo.dll
|
|
||||||
- mpvnet.com
|
|
||||||
|
|
||||||
|
|
||||||
#### 文件关联
|
#### 文件关联
|
||||||
|
|
||||||
可以使用上下文菜单创建文件关联。 'Tools > Setup'
|
可以使用上下文菜单注册文件关联。 'Settings > Setup'
|
||||||
|
|
||||||
注册完文件关联后,进入 "Windows设置 > 应用 > 默认应用",或者从powershell
|
注册完文件关联后,进入 "Windows设置 > 应用 > 默认应用" (Win+I, ms-settings:defaultapps)
|
||||||
执行 `ms-settings:defaultapps` ,然后选择mpv. net作为视频/音频/图像的默认程序。
|
然后选择mpv. net作为视频/音频/图像的默认程序。
|
||||||
|
|
||||||
可以使用资源管理器的上下文菜单的'Open with'功能更改默认应用程序。
|
另一种注册文件关联的方式是使用文件资源管理器,选中媒体文件后,选择上下文菜单的 '打开方式 > 选择其它应用' 。
|
||||||
|
|
||||||
[Open with++](#open-with) 可用来扩展资源管理器的上下文菜单
|
[Open with++](#open-with) 可用来扩展资源管理器的上下文菜单
|
||||||
[Play with mpv.net](https://github.com/stax76/OpenWithPlusPlus#play-with-mpvnet) 和
|
[Play with mpv.net](https://github.com/stax76/OpenWithPlusPlus#play-with-mpvnet) 和
|
||||||
@@ -97,13 +79,12 @@ mpv.net不限制系统平台,win32的用户必须替换目录中的3个工具
|
|||||||
支持
|
支持
|
||||||
-------
|
-------
|
||||||
|
|
||||||
在提出支持请求之前,先尝试最新的[测试版](#测试版)。
|
在提出支持请求之前,先尝试最新的测试版。
|
||||||
|
|
||||||
程序错误和功能请求可以在github的[问题追踪](../../../issues)上提出,
|
程序错误和功能请求可以在github的 [问题追踪](../../../issues) 上提出,
|
||||||
任何与mpv. net相关的东西都可以使用,欢迎提交使用上出现的问题。
|
任何与mpv. net相关的东西都可以使用,欢迎提交使用上出现的问题。
|
||||||
|
|
||||||
或者浏览VideoHelp论坛的讨论帖。
|
或者浏览VideoHelp论坛的 [讨论帖](https://forum.videohelp.com/threads/392514-mpv-net-a-extendable-media-player-for-windows)
|
||||||
[support thread](https://forum.videohelp.com/threads/392514-mpv-net-a-extendable-media-player-for-windows)
|
|
||||||
|
|
||||||
|
|
||||||
设置
|
设置
|
||||||
@@ -119,7 +100,7 @@ mpv.net的专属选项保存在 mpvnet.conf 文件中,
|
|||||||
参数解释请参阅 [此处](#mpvnet的专属选项)
|
参数解释请参阅 [此处](#mpvnet的专属选项)
|
||||||
|
|
||||||
|
|
||||||
快捷键输入绑定
|
快捷键和上下文菜单
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
键鼠的快捷键和上下文菜单的操作保存在 input.conf 文件中,
|
键鼠的快捷键和上下文菜单的操作保存在 input.conf 文件中,
|
||||||
@@ -127,9 +108,32 @@ mpv.net的专属选项保存在 mpvnet.conf 文件中,
|
|||||||
|
|
||||||
[input.conf defaults](../../../tree/master/src/Resources/input.conf.txt)
|
[input.conf defaults](../../../tree/master/src/Resources/input.conf.txt)
|
||||||
|
|
||||||
|
请注意,一旦 input.conf 存在, mpv.net 就不能更新它,这意味着当 mpv.net 升级了
|
||||||
|
新的版本或改变了的默认菜单项时,菜单条目就会过时。获得最新菜单的唯一方法是
|
||||||
|
通过删除 input.conf 来重置菜单,或者通过手动编辑 input.conf 来更新它。
|
||||||
|
|
||||||
通过 global-input.conf 文件支持全局热键。
|
通过 global-input.conf 文件支持全局热键。
|
||||||
|
|
||||||
配置文件夹可以从上下文菜单中打开: `Settings > Open Config Folder`
|
设置文件夹可以从上下文菜单中打开: `Settings > Open Config Folder`
|
||||||
|
|
||||||
|
input 和 config editor 可以在上下文菜单的该条目中找到 'Settings'
|
||||||
|
|
||||||
|
输入测试模式可以通过命令行启动: --input-test
|
||||||
|
|
||||||
|
输入的键位列表可由该参数输出 --input-keylist
|
||||||
|
或从上下文菜单的该条目获取 `View > Advanced > Show Keys`
|
||||||
|
|
||||||
|
mpv.net的默认input.conf文件:
|
||||||
|
https://github.com/stax76/mpv.net/blob/master/src/Resources/input.conf.txt
|
||||||
|
|
||||||
|
mpv的默认input.conf文件:
|
||||||
|
https://github.com/mpv-player/mpv/blob/master/etc/input.conf
|
||||||
|
|
||||||
|
mpv的命令:
|
||||||
|
https://mpv.io/manual/master/#list-of-input-commands
|
||||||
|
|
||||||
|
mpv的input选项:
|
||||||
|
https://mpv.io/manual/master/#input
|
||||||
|
|
||||||
|
|
||||||
命令行界面
|
命令行界面
|
||||||
@@ -640,8 +644,6 @@ input.conf 定义mpv的快捷键,同时mpv.net使用注释定义上下文菜
|
|||||||
|
|
||||||
从剪贴板打开文件和URL。如何从YouTube等网站的浏览器中直接打开url在[外部工具](#外部工具)部分进行了描述。
|
从剪贴板打开文件和URL。如何从YouTube等网站的浏览器中直接打开url在[外部工具](#外部工具)部分进行了描述。
|
||||||
|
|
||||||
对于网络流媒体,必须手动下载并安装youtube-dl,这意味着它必须位于环境变量PATH或启动目录中。
|
|
||||||
|
|
||||||
|
|
||||||
### Open > Open DVD/Blu-ray Drive/Folder
|
### Open > Open DVD/Blu-ray Drive/Folder
|
||||||
|
|
||||||
|
|||||||
@@ -13,22 +13,22 @@
|
|||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<OutputPath>bin\</OutputPath>
|
<OutputPath>bin\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<LangVersion>7.3</LangVersion>
|
<LangVersion>7.3</LangVersion>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||||
<OutputPath>bin\</OutputPath>
|
<OutputPath>bin\x64\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<LangVersion>7.3</LangVersion>
|
<LangVersion>7.3</LangVersion>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ namespace mpvnet
|
|||||||
public static bool Queue { get; set; }
|
public static bool Queue { get; set; }
|
||||||
public static bool RememberVolume { get; set; } = true;
|
public static bool RememberVolume { get; set; } = true;
|
||||||
public static bool RememberWindowPosition { get; set; }
|
public static bool RememberWindowPosition { get; set; }
|
||||||
|
public static bool ShowLogo { get; set; } = true;
|
||||||
|
|
||||||
public static int StartThreshold { get; set; } = 1500;
|
public static int StartThreshold { get; set; } = 1500;
|
||||||
public static int RecentCount { get; set; } = 15;
|
public static int RecentCount { get; set; } = 15;
|
||||||
@@ -130,8 +131,21 @@ namespace mpvnet
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static string Version => "Copyright (C) 2000-2022 mpv.net/mpv/mplayer\n" +
|
public static string Version => "Copyright (C) 2000-2022 mpv.net/mpv/mplayer\n" +
|
||||||
$"mpv.net {Application.ProductVersion} ({File.GetLastWriteTime(Application.ExecutablePath).ToShortDateString()})\n" +
|
$"mpv.net {Application.ProductVersion}" + GetLastWriteTime(Application.ExecutablePath) + "\n" +
|
||||||
$"{Core.GetPropertyString("mpv-version")} ({File.GetLastWriteTime(Folder.Startup + "mpv-2.dll").ToShortDateString()})\nffmpeg {Core.GetPropertyString("ffmpeg-version")}\nMediaInfo {FileVersionInfo.GetVersionInfo(Path.Combine(Application.StartupPath, "MediaInfo.dll")).FileVersion} ({File.GetLastWriteTime(Path.Combine(Application.StartupPath , "MediaInfo.dll")).ToShortDateString()})\nGPL v2 License";
|
$"{Core.GetPropertyString("mpv-version")}" + GetLastWriteTime(Folder.Startup + "mpv-2.dll") + "\n" +
|
||||||
|
$"ffmpeg {Core.GetPropertyString("ffmpeg-version")}\n" +
|
||||||
|
$"MediaInfo {FileVersionInfo.GetVersionInfo(Path.Combine(Application.StartupPath, "MediaInfo.dll")).FileVersion}" +
|
||||||
|
GetLastWriteTime(Path.Combine(Application.StartupPath , "MediaInfo.dll")) + "\nGPL v2 License";
|
||||||
|
|
||||||
|
static string GetLastWriteTime(string path)
|
||||||
|
{
|
||||||
|
if (IsStoreVrsion)
|
||||||
|
return "";
|
||||||
|
|
||||||
|
return $" ({File.GetLastWriteTime(path).ToShortDateString()})";
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool IsStoreVrsion => Application.StartupPath.Contains("FrankSkare.mpv.net");
|
||||||
|
|
||||||
public static void ShowException(object obj)
|
public static void ShowException(object obj)
|
||||||
{
|
{
|
||||||
@@ -233,6 +247,7 @@ namespace mpvnet
|
|||||||
case "queue": Queue = value == "yes"; return true;
|
case "queue": Queue = value == "yes"; return true;
|
||||||
case "recent-count": RecentCount = value.ToInt(); return true;
|
case "recent-count": RecentCount = value.ToInt(); return true;
|
||||||
case "remember-volume": RememberVolume = value == "yes"; return true;
|
case "remember-volume": RememberVolume = value == "yes"; return true;
|
||||||
|
case "show-logo": ShowLogo = value == "yes"; return true;
|
||||||
case "remember-window-position": RememberWindowPosition = value == "yes"; return true;
|
case "remember-window-position": RememberWindowPosition = value == "yes"; return true;
|
||||||
case "start-size": StartSize = value; return true;
|
case "start-size": StartSize = value; return true;
|
||||||
case "start-threshold": StartThreshold = value.ToInt(); return true;
|
case "start-threshold": StartThreshold = value.ToInt(); return true;
|
||||||
|
|||||||
@@ -26,13 +26,14 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
case "add-files-to-playlist": OpenFiles("append"); break; // deprecated 2019
|
case "add-files-to-playlist": OpenFiles("append"); break; // deprecated 2019
|
||||||
case "cycle-audio": CycleAudio(); break;
|
case "cycle-audio": CycleAudio(); break;
|
||||||
case "execute-mpv-command": Msg.ShowError("The command was removed, please reset input.conf by deleting it, in the new menu use the on screen console."); break; // deprecated 2020
|
case "execute-mpv-command": Msg.ShowError("The command was removed, reset input.conf by deleting it, in the new menu use the on screen console."); break; // deprecated 2020
|
||||||
case "load-audio": LoadAudio(); break;
|
case "load-audio": LoadAudio(); break;
|
||||||
case "load-sub": LoadSubtitle(); break;
|
case "load-sub": LoadSubtitle(); break;
|
||||||
|
case "open-clipboard": OpenFromClipboard(); break;
|
||||||
case "open-conf-folder": ProcessHelp.ShellExecute(Core.ConfigFolder); break;
|
case "open-conf-folder": ProcessHelp.ShellExecute(Core.ConfigFolder); break;
|
||||||
case "open-files": OpenFiles(args); break;
|
case "open-files": OpenFiles(args); break;
|
||||||
case "open-optical-media": Open_DVD_Or_BD_Folder(); break;
|
case "open-optical-media": Open_DVD_Or_BD_Folder(); break;
|
||||||
case "open-url": OpenURL(); break;
|
case "open-url": OpenFromClipboard(); break; // deprecated 2022
|
||||||
case "play-pause": PlayPause(); break;
|
case "play-pause": PlayPause(); break;
|
||||||
case "playlist-first": PlaylistFirst(); break;
|
case "playlist-first": PlaylistFirst(); break;
|
||||||
case "playlist-last": PlaylistLast(); break;
|
case "playlist-last": PlaylistLast(); break;
|
||||||
@@ -52,6 +53,7 @@ namespace mpvnet
|
|||||||
case "show-input-editor": ShowDialog(typeof(InputWindow)); break;
|
case "show-input-editor": ShowDialog(typeof(InputWindow)); break;
|
||||||
case "show-keys": ShowStrings(Core.GetPropertyString("input-key-list").Split(',')); break;
|
case "show-keys": ShowStrings(Core.GetPropertyString("input-key-list").Split(',')); break;
|
||||||
case "show-media-info": ShowMediaInfo(args); break;
|
case "show-media-info": ShowMediaInfo(args); break;
|
||||||
|
case "show-menu": ShowMenu(); break;
|
||||||
case "show-playlist": ShowPlaylist(); break;
|
case "show-playlist": ShowPlaylist(); break;
|
||||||
case "show-profiles": Msg.ShowInfo(mpvHelp.GetProfiles()); break;
|
case "show-profiles": Msg.ShowInfo(mpvHelp.GetProfiles()); break;
|
||||||
case "show-progress": ShowProgress(); break;
|
case "show-progress": ShowProgress(); break;
|
||||||
@@ -63,18 +65,24 @@ namespace mpvnet
|
|||||||
case "show-text": ShowText(args[0], Convert.ToInt32(args[1]), Convert.ToInt32(args[2])); break;
|
case "show-text": ShowText(args[0], Convert.ToInt32(args[1]), Convert.ToInt32(args[2])); break;
|
||||||
case "window-scale": WindowScale(float.Parse(args[0], CultureInfo.InvariantCulture)); break;
|
case "window-scale": WindowScale(float.Parse(args[0], CultureInfo.InvariantCulture)); break;
|
||||||
|
|
||||||
default: Terminal.WriteError($"No command '{id}' found."); break;
|
default: Terminal.WriteError($"No command '{id}' found, reset input.conf by deleting it."); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ShowDialog(Type winType)
|
public static void ShowTextWithEditor(string name, string text)
|
||||||
|
{
|
||||||
|
string file = Path.Combine(Path.GetTempPath(), name + ".txt");
|
||||||
|
App.TempFiles.Add(file);
|
||||||
|
File.WriteAllText(file, BR + text.Trim() + BR);
|
||||||
|
ProcessHelp.ShellExecute(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ShowDialog(Type winType) => App.InvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
App.InvokeOnMainThread(new Action(() => {
|
|
||||||
Window win = Activator.CreateInstance(winType) as Window;
|
Window win = Activator.CreateInstance(winType) as Window;
|
||||||
new WindowInteropHelper(win).Owner = MainForm.Instance.Handle;
|
new WindowInteropHelper(win).Owner = MainForm.Instance.Handle;
|
||||||
win.ShowDialog();
|
win.ShowDialog();
|
||||||
}));
|
});
|
||||||
}
|
|
||||||
|
|
||||||
public static void OpenFiles(params string[] args)
|
public static void OpenFiles(params string[] args)
|
||||||
{
|
{
|
||||||
@@ -97,15 +105,13 @@ namespace mpvnet
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Open_DVD_Or_BD_Folder()
|
public static void Open_DVD_Or_BD_Folder() => App.InvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
App.InvokeOnMainThread(new Action(() => {
|
|
||||||
var dialog = new FolderBrowser();
|
var dialog = new FolderBrowser();
|
||||||
|
|
||||||
if (dialog.Show())
|
if (dialog.Show())
|
||||||
Core.LoadDiskFolder(dialog.SelectedPath);
|
Core.LoadDiskFolder(dialog.SelectedPath);
|
||||||
}));
|
});
|
||||||
}
|
|
||||||
|
|
||||||
public static void PlaylistFirst()
|
public static void PlaylistFirst()
|
||||||
{
|
{
|
||||||
@@ -167,9 +173,6 @@ namespace mpvnet
|
|||||||
if (path.Contains("://"))
|
if (path.Contains("://"))
|
||||||
path = Core.GetPropertyString("media-title");
|
path = Core.GetPropertyString("media-title");
|
||||||
|
|
||||||
int width = Core.GetPropertyInt("video-params/w");
|
|
||||||
int height = Core.GetPropertyInt("video-params/h");
|
|
||||||
|
|
||||||
if (File.Exists(path))
|
if (File.Exists(path))
|
||||||
{
|
{
|
||||||
fileSize = new FileInfo(path).Length;
|
fileSize = new FileInfo(path).Length;
|
||||||
@@ -217,12 +220,13 @@ namespace mpvnet
|
|||||||
|
|
||||||
string videoFormat = Core.GetPropertyString("video-format").ToUpper();
|
string videoFormat = Core.GetPropertyString("video-format").ToUpper();
|
||||||
string audioCodec = Core.GetPropertyString("audio-codec-name").ToUpper();
|
string audioCodec = Core.GetPropertyString("audio-codec-name").ToUpper();
|
||||||
|
int width = Core.GetPropertyInt("video-params/w");
|
||||||
text = path.FileName() + $"\n{width} x {height}\n";
|
int height = Core.GetPropertyInt("video-params/h");
|
||||||
|
TimeSpan len = TimeSpan.FromSeconds(Core.GetPropertyDouble("duration"));
|
||||||
if (fileSize > 0)
|
text = path.FileName() + "\n";
|
||||||
text += Convert.ToInt32(fileSize / 1024.0 / 1024.0) + " MB\n";
|
text += FormatTime(len.TotalMinutes) + ":" + FormatTime(len.Seconds) + "\n";
|
||||||
|
if (fileSize > 0) text += Convert.ToInt32(fileSize / 1024.0 / 1024.0) + " MB\n";
|
||||||
|
text += $"{width} x {height}\n";
|
||||||
text += $"{videoFormat}\n{audioCodec}";
|
text += $"{videoFormat}\n{audioCodec}";
|
||||||
|
|
||||||
Core.CommandV("show-text", text, "5000");
|
Core.CommandV("show-text", text, "5000");
|
||||||
@@ -233,6 +237,8 @@ namespace mpvnet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static string FormatTime(double value) => ((int)value).ToString("00");
|
||||||
|
|
||||||
public static void ShowProgress()
|
public static void ShowProgress()
|
||||||
{
|
{
|
||||||
TimeSpan position = TimeSpan.FromSeconds(Core.GetPropertyDouble("time-pos"));
|
TimeSpan position = TimeSpan.FromSeconds(Core.GetPropertyDouble("time-pos"));
|
||||||
@@ -244,13 +250,10 @@ namespace mpvnet
|
|||||||
FormatTime(duration.Seconds);
|
FormatTime(duration.Seconds);
|
||||||
|
|
||||||
Core.CommandV("show-text", text, "5000");
|
Core.CommandV("show-text", text, "5000");
|
||||||
|
|
||||||
string FormatTime(double value) => ((int)value).ToString("00");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void OpenURL()
|
public static void OpenFromClipboard() => App.InvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
App.InvokeOnMainThread(new Action(() => {
|
|
||||||
if (WinForms.Clipboard.ContainsFileDropList())
|
if (WinForms.Clipboard.ContainsFileDropList())
|
||||||
{
|
{
|
||||||
string[] files = WinForms.Clipboard.GetFileDropList().Cast<string>().ToArray();
|
string[] files = WinForms.Clipboard.GetFileDropList().Cast<string>().ToArray();
|
||||||
@@ -263,18 +266,16 @@ namespace mpvnet
|
|||||||
if (string.IsNullOrEmpty(clipboard) || (!clipboard.Contains("://") && !File.Exists(clipboard)) ||
|
if (string.IsNullOrEmpty(clipboard) || (!clipboard.Contains("://") && !File.Exists(clipboard)) ||
|
||||||
clipboard.Contains("\n"))
|
clipboard.Contains("\n"))
|
||||||
{
|
{
|
||||||
App.ShowError("No URL found, the clipboard does not contain a valid URL or file.");
|
App.ShowError("The clipboard does not contain a valid URL or file.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Core.LoadFiles(new [] { clipboard }, false, Control.ModifierKeys.HasFlag(Keys.Control));
|
Core.LoadFiles(new [] { clipboard }, false, Control.ModifierKeys.HasFlag(Keys.Control));
|
||||||
}
|
}
|
||||||
}));
|
});
|
||||||
}
|
|
||||||
|
|
||||||
public static void LoadSubtitle()
|
public static void LoadSubtitle() => App.InvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
App.InvokeOnMainThread(new Action(() => {
|
|
||||||
using (var d = new OpenFileDialog())
|
using (var d = new OpenFileDialog())
|
||||||
{
|
{
|
||||||
string path = Core.GetPropertyString("path");
|
string path = Core.GetPropertyString("path");
|
||||||
@@ -288,12 +289,10 @@ namespace mpvnet
|
|||||||
foreach (string filename in d.FileNames)
|
foreach (string filename in d.FileNames)
|
||||||
Core.CommandV("sub-add", filename);
|
Core.CommandV("sub-add", filename);
|
||||||
}
|
}
|
||||||
}));
|
});
|
||||||
}
|
|
||||||
|
|
||||||
public static void LoadAudio()
|
public static void LoadAudio() => App.InvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
App.InvokeOnMainThread(new Action(() => {
|
|
||||||
using (var d = new OpenFileDialog())
|
using (var d = new OpenFileDialog())
|
||||||
{
|
{
|
||||||
string path = Core.GetPropertyString("path");
|
string path = Core.GetPropertyString("path");
|
||||||
@@ -307,8 +306,7 @@ namespace mpvnet
|
|||||||
foreach (string i in d.FileNames)
|
foreach (string i in d.FileNames)
|
||||||
Core.CommandV("audio-add", i);
|
Core.CommandV("audio-add", i);
|
||||||
}
|
}
|
||||||
}));
|
});
|
||||||
}
|
|
||||||
|
|
||||||
public static void CycleAudio()
|
public static void CycleAudio()
|
||||||
{
|
{
|
||||||
@@ -336,16 +334,16 @@ namespace mpvnet
|
|||||||
|
|
||||||
public static void ShowCommands()
|
public static void ShowCommands()
|
||||||
{
|
{
|
||||||
string json = Core.GetPropertyString("command-list");
|
string jsonString = Core.GetPropertyString("command-list");
|
||||||
var o = json.FromJson<List<Dictionary<string, object>>>().OrderBy(i => i["name"]);
|
var jsonObject = jsonString.FromJson<List<Dictionary<string, object>>>().OrderBy(i => i["name"]);
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
foreach (Dictionary<string, object> i in o)
|
foreach (Dictionary<string, object> dic in jsonObject)
|
||||||
{
|
{
|
||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
sb.AppendLine(i["name"].ToString());
|
sb.AppendLine(dic["name"].ToString());
|
||||||
|
|
||||||
foreach (Dictionary<string, object> i2 in i["args"] as List<object>)
|
foreach (Dictionary<string, object> i2 in dic["args"] as List<object>)
|
||||||
{
|
{
|
||||||
string value = i2["name"].ToString() + " <" + i2["type"].ToString().ToLower() + ">";
|
string value = i2["name"].ToString() + " <" + i2["type"].ToString().ToLower() + ">";
|
||||||
|
|
||||||
@@ -356,7 +354,7 @@ namespace mpvnet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Msg.ShowInfo(sb.ToString());
|
ShowTextWithEditor("command-list", sb.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ScaleWindow(float factor) => Core.RaiseScaleWindow(factor);
|
public static void ScaleWindow(float factor) => Core.RaiseScaleWindow(factor);
|
||||||
@@ -378,8 +376,23 @@ namespace mpvnet
|
|||||||
"}${osd-ass-cc/1}" + text + "\" " + duration);
|
"}${osd-ass-cc/1}" + text + "\" " + duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ShowMediaInfo(string[] args)
|
public static void ShowMediaInfo(string[] args) => App.InvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
|
if (args == null || args.Length == 0)
|
||||||
|
{
|
||||||
|
(string Name, string Value)[] pairs = {
|
||||||
|
("Show text box", "script-message mpv.net show-media-info default"),
|
||||||
|
("Show text editor", "script-message mpv.net show-media-info editor"),
|
||||||
|
("Show full", "script-message mpv.net show-media-info editor full"),
|
||||||
|
("Show raw", "script-message mpv.net show-media-info editor full raw") };
|
||||||
|
|
||||||
|
var list = pairs.Select(i => new CommandPaletteItem(i.Name, () => Core.Command(i.Value)));
|
||||||
|
CommandPalette.Instance.SetItems(list);
|
||||||
|
MainForm.Instance.ShowCommandPalette();
|
||||||
|
CommandPalette.Instance.SelectFirst();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
string path = Core.GetPropertyString("path");
|
string path = Core.GetPropertyString("path");
|
||||||
|
|
||||||
if (File.Exists(path) && !path.Contains(@"\\.\pipe\"))
|
if (File.Exists(path) && !path.Contains(@"\\.\pipe\"))
|
||||||
@@ -388,14 +401,22 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
bool full = args.Contains("full");
|
bool full = args.Contains("full");
|
||||||
bool raw = args.Contains("raw");
|
bool raw = args.Contains("raw");
|
||||||
|
bool editor = args.Contains("editor");
|
||||||
|
|
||||||
string text = mediaInfo.GetSummary(full, raw);
|
string text = mediaInfo.GetSummary(full, raw);
|
||||||
text = Regex.Replace(text, "Unique ID.+", "");
|
text = Regex.Replace(text, "Unique ID.+", "");
|
||||||
|
|
||||||
|
if (editor)
|
||||||
|
ShowTextWithEditor("media-info", text);
|
||||||
|
else
|
||||||
|
{
|
||||||
MsgBoxEx.MessageBoxEx.MsgFontFamily = new FontFamily("Consolas");
|
MsgBoxEx.MessageBoxEx.MsgFontFamily = new FontFamily("Consolas");
|
||||||
Msg.ShowInfo(text);
|
Msg.ShowInfo(text);
|
||||||
MsgBoxEx.MessageBoxEx.MsgFontFamily = new FontFamily("Segoe UI");
|
MsgBoxEx.MessageBoxEx.MsgFontFamily = new FontFamily("Segoe UI");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
public static void ShowCommandPalette() => App.InvokeOnMainThread(() =>
|
public static void ShowCommandPalette() => App.InvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
@@ -538,7 +559,7 @@ namespace mpvnet
|
|||||||
if (propValue.ContainsEx("${"))
|
if (propValue.ContainsEx("${"))
|
||||||
propValue += BR2 + Core.Expand(propValue);
|
propValue += BR2 + Core.Expand(propValue);
|
||||||
|
|
||||||
App.ShowInfo(prop + ": " + propValue);
|
App.ShowInfo(prop + "\n\n" + propValue);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -628,16 +649,18 @@ namespace mpvnet
|
|||||||
|
|
||||||
public static void ShowSetupDialog() => App.InvokeOnMainThread(() =>
|
public static void ShowSetupDialog() => App.InvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
(string, string)[] pairs = {
|
(string Name, string Value)[] pairs = {
|
||||||
("Register video file associations", "script-message mpv.net reg-file-assoc video"),
|
("Register video file associations", "script-message mpv.net reg-file-assoc video"),
|
||||||
("Register audio file associations", "script-message mpv.net reg-file-assoc audio"),
|
("Register audio file associations", "script-message mpv.net reg-file-assoc audio"),
|
||||||
("Register image file associations", "script-message mpv.net reg-file-assoc image"),
|
("Register image file associations", "script-message mpv.net reg-file-assoc image"),
|
||||||
("Unregister file associations", "script-message mpv.net reg-file-assoc unreg") };
|
("Unregister file associations", "script-message mpv.net reg-file-assoc unreg") };
|
||||||
|
|
||||||
var list = pairs.Select(i => new CommandPaletteItem(i.Item1, () => Core.Command(i.Item2)));
|
var list = pairs.Select(i => new CommandPaletteItem(i.Name, () => Core.Command(i.Value)));
|
||||||
CommandPalette.Instance.SetItems(list);
|
CommandPalette.Instance.SetItems(list);
|
||||||
MainForm.Instance.ShowCommandPalette();
|
MainForm.Instance.ShowCommandPalette();
|
||||||
CommandPalette.Instance.SelectFirst();
|
CommandPalette.Instance.SelectFirst();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
public static void ShowMenu() => Core.RaiseShowMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ namespace mpvnet
|
|||||||
|
|
||||||
public event Action Initialized;
|
public event Action Initialized;
|
||||||
public event Action InitializedAsync;
|
public event Action InitializedAsync;
|
||||||
|
public event Action ShowMenu;
|
||||||
public event Action<float> ScaleWindow;
|
public event Action<float> ScaleWindow;
|
||||||
public event Action<float> WindowScale;
|
public event Action<float> WindowScale;
|
||||||
public event Action<int> PlaylistPosChanged;
|
public event Action<int> PlaylistPosChanged;
|
||||||
@@ -81,7 +82,7 @@ namespace mpvnet
|
|||||||
public string ConfPath { get => ConfigFolder + "mpv.conf"; }
|
public string ConfPath { get => ConfigFolder + "mpv.conf"; }
|
||||||
public string GPUAPI { get; set; } = "auto";
|
public string GPUAPI { get; set; } = "auto";
|
||||||
public string VO { get; set; } = "gpu";
|
public string VO { get; set; } = "gpu";
|
||||||
public string InputConfPath { get => ConfigFolder + "input.conf"; }
|
public string InputConfPath => ConfigFolder + "input.conf";
|
||||||
|
|
||||||
public string VID { get; set; } = "";
|
public string VID { get; set; } = "";
|
||||||
public string AID { get; set; } = "";
|
public string AID { get; set; } = "";
|
||||||
@@ -109,6 +110,8 @@ namespace mpvnet
|
|||||||
|
|
||||||
public void Init()
|
public void Init()
|
||||||
{
|
{
|
||||||
|
ApplyShowMenuFix();
|
||||||
|
|
||||||
Handle = mpv_create();
|
Handle = mpv_create();
|
||||||
|
|
||||||
if (Handle == IntPtr.Zero)
|
if (Handle == IntPtr.Zero)
|
||||||
@@ -168,10 +171,28 @@ namespace mpvnet
|
|||||||
InvokeAsync(InitializedAsync);
|
InvokeAsync(InitializedAsync);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplyCompatibilityFixes()
|
void ApplyShowMenuFix()
|
||||||
{
|
{
|
||||||
if (!App.Settings.InputDefaultBindingsFixApplied)
|
if (App.Settings.ShowMenuFixApplied)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (File.Exists(InputConfPath))
|
||||||
{
|
{
|
||||||
|
string content = File.ReadAllText(InputConfPath);
|
||||||
|
|
||||||
|
if (!content.Contains("script-message mpv.net show-menu"))
|
||||||
|
File.WriteAllText(InputConfPath, BR + content.Trim() + BR +
|
||||||
|
"MBTN_Right script-message mpv.net show-menu" + BR);
|
||||||
|
}
|
||||||
|
|
||||||
|
App.Settings.ShowMenuFixApplied = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApplyInputDefaultBindingsFix()
|
||||||
|
{
|
||||||
|
if (App.Settings.InputDefaultBindingsFixApplied)
|
||||||
|
return;
|
||||||
|
|
||||||
if (File.Exists(ConfPath))
|
if (File.Exists(ConfPath))
|
||||||
{
|
{
|
||||||
string content = File.ReadAllText(ConfPath);
|
string content = File.ReadAllText(ConfPath);
|
||||||
@@ -185,7 +206,6 @@ namespace mpvnet
|
|||||||
|
|
||||||
App.Settings.InputDefaultBindingsFixApplied = true;
|
App.Settings.InputDefaultBindingsFixApplied = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void ProcessProperty(string name, string value)
|
public void ProcessProperty(string name, string value)
|
||||||
{
|
{
|
||||||
@@ -232,6 +252,7 @@ namespace mpvnet
|
|||||||
|
|
||||||
if (!Directory.Exists(_ConfigFolder))
|
if (!Directory.Exists(_ConfigFolder))
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
using (Process proc = new Process())
|
using (Process proc = new Process())
|
||||||
{
|
{
|
||||||
proc.StartInfo.UseShellExecute = false;
|
proc.StartInfo.UseShellExecute = false;
|
||||||
@@ -241,6 +262,7 @@ namespace mpvnet
|
|||||||
proc.Start();
|
proc.Start();
|
||||||
proc.WaitForExit();
|
proc.WaitForExit();
|
||||||
}
|
}
|
||||||
|
} catch (Exception) {}
|
||||||
|
|
||||||
if (!Directory.Exists(_ConfigFolder))
|
if (!Directory.Exists(_ConfigFolder))
|
||||||
Directory.CreateDirectory(_ConfigFolder);
|
Directory.CreateDirectory(_ConfigFolder);
|
||||||
@@ -262,7 +284,7 @@ namespace mpvnet
|
|||||||
get {
|
get {
|
||||||
if (_Conf == null)
|
if (_Conf == null)
|
||||||
{
|
{
|
||||||
ApplyCompatibilityFixes();
|
ApplyInputDefaultBindingsFix();
|
||||||
|
|
||||||
_Conf = new Dictionary<string, string>();
|
_Conf = new Dictionary<string, string>();
|
||||||
|
|
||||||
@@ -1308,9 +1330,11 @@ KP1 script-binding delete_current_file/confirm
|
|||||||
|
|
||||||
public void ShowLogo()
|
public void ShowLogo()
|
||||||
{
|
{
|
||||||
if (MainForm.Instance is null)
|
if (!App.ShowLogo || (MainForm.Instance == null || App.Settings.LogoCrash))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
bool december = DateTime.Now.Month == 12;
|
bool december = DateTime.Now.Month == 12;
|
||||||
|
|
||||||
Rectangle cr = MainForm.Instance.ClientRectangle;
|
Rectangle cr = MainForm.Instance.ClientRectangle;
|
||||||
@@ -1337,6 +1361,11 @@ KP1 script-binding delete_current_file/confirm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
App.Settings.LogoCrash = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
string GetLanguage(string id)
|
string GetLanguage(string id)
|
||||||
{
|
{
|
||||||
@@ -1351,6 +1380,8 @@ KP1 script-binding delete_current_file/confirm
|
|||||||
|
|
||||||
public void RaiseWindowScale(float value) => WindowScale(value);
|
public void RaiseWindowScale(float value) => WindowScale(value);
|
||||||
|
|
||||||
|
public void RaiseShowMenu() => ShowMenu();
|
||||||
|
|
||||||
void ReadMetaData()
|
void ReadMetaData()
|
||||||
{
|
{
|
||||||
string path = GetPropertyString("path");
|
string path = GetPropertyString("path");
|
||||||
@@ -1509,6 +1540,10 @@ KP1 script-binding delete_current_file/confirm
|
|||||||
{
|
{
|
||||||
string text = GetPropertyString($"chapter-list/{x}/title");
|
string text = GetPropertyString($"chapter-list/{x}/title");
|
||||||
double time = GetPropertyDouble($"chapter-list/{x}/time");
|
double time = GetPropertyDouble($"chapter-list/{x}/time");
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(text))
|
||||||
|
text = "Chapter " + (x + 1);
|
||||||
|
|
||||||
Chapters.Add(new KeyValuePair<string, double>(text, time));
|
Chapters.Add(new KeyValuePair<string, double>(text, time));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,13 +68,25 @@ public static class ConvertStringExtension
|
|||||||
|
|
||||||
public static class PathStringExtension
|
public static class PathStringExtension
|
||||||
{
|
{
|
||||||
// returns the extension with lower case and without preceding dot.
|
public static string Ext(this string filepath) => Ext(filepath, false);
|
||||||
public static string Ext(this string instance)
|
|
||||||
|
public static string Ext(this string filepath, bool includeDot)
|
||||||
{
|
{
|
||||||
if (instance == null)
|
if (string.IsNullOrEmpty(filepath))
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
return Path.GetExtension(instance).TrimStart('.').ToLower();
|
char[] chars = filepath.ToCharArray();
|
||||||
|
|
||||||
|
for (int x = filepath.Length - 1; x >= 0; x--)
|
||||||
|
{
|
||||||
|
if (chars[x] == Path.DirectorySeparatorChar)
|
||||||
|
return "";
|
||||||
|
|
||||||
|
if (chars[x] == '.')
|
||||||
|
return filepath.Substring(x + (includeDot ? 0 : 1)).ToLowerInvariant();
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string FileName(this string instance)
|
public static string FileName(this string instance)
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ namespace mpvnet
|
|||||||
Core.Init();
|
Core.Init();
|
||||||
|
|
||||||
Core.Shutdown += Core_Shutdown;
|
Core.Shutdown += Core_Shutdown;
|
||||||
|
Core.ShowMenu += Core_ShowMenu;
|
||||||
Core.VideoSizeChanged += Core_VideoSizeChanged;
|
Core.VideoSizeChanged += Core_VideoSizeChanged;
|
||||||
Core.ScaleWindow += Core_ScaleWindow;
|
Core.ScaleWindow += Core_ScaleWindow;
|
||||||
Core.WindowScale += Core_WindowScale;
|
Core.WindowScale += Core_WindowScale;
|
||||||
@@ -135,6 +136,18 @@ namespace mpvnet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Core_ShowMenu()
|
||||||
|
{
|
||||||
|
BeginInvoke(new Action(() => {
|
||||||
|
if (IsMouseInOSC())
|
||||||
|
return;
|
||||||
|
|
||||||
|
CursorHelp.Show();
|
||||||
|
UpdateMenu();
|
||||||
|
ContextMenu.IsOpen = true;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
void Core_ScaleWindow(float scale) {
|
void Core_ScaleWindow(float scale) {
|
||||||
BeginInvoke(new Action(() => {
|
BeginInvoke(new Action(() => {
|
||||||
int w, h;
|
int w, h;
|
||||||
@@ -320,26 +333,30 @@ namespace mpvnet
|
|||||||
|
|
||||||
lock (Core.BluRayTitles)
|
lock (Core.BluRayTitles)
|
||||||
{
|
{
|
||||||
List<(int Index, TimeSpan Len)> items = new List<(int Index, TimeSpan Len)>();
|
List<(int Index, TimeSpan Length)> items = new List<(int, TimeSpan)>();
|
||||||
|
|
||||||
for (int i = 0; i < Core.BluRayTitles.Count; i++)
|
for (int i = 0; i < Core.BluRayTitles.Count; i++)
|
||||||
items.Add((i, Core.BluRayTitles[i]));
|
items.Add((i, Core.BluRayTitles[i]));
|
||||||
|
|
||||||
var titleItems = items.OrderByDescending(item => item.Len)
|
var titleItems = items.OrderByDescending(item => item.Length)
|
||||||
.Take(20).OrderBy(item => item.Index);
|
.Take(20)
|
||||||
|
.OrderBy(item => item.Index);
|
||||||
|
|
||||||
foreach (var item in titleItems)
|
foreach (var item in titleItems)
|
||||||
{
|
{
|
||||||
if (item.Len != TimeSpan.Zero)
|
if (item.Length != TimeSpan.Zero)
|
||||||
{
|
{
|
||||||
var mi = MenuHelp.Add(titlesMenuItem.Items, $"{item.Len} ({item.Index})");
|
var mi = MenuHelp.Add(titlesMenuItem.Items, $"Title {item.Index + 1}");
|
||||||
|
|
||||||
if (mi != null)
|
if (mi != null)
|
||||||
|
{
|
||||||
|
mi.InputGestureText = item.Length.ToString();
|
||||||
mi.Click += (sender, args) => Core.SetBluRayTitle(item.Index);
|
mi.Click += (sender, args) => Core.SetBluRayTitle(item.Index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var profilesMenuItem = FindMenuItem("Profile");
|
var profilesMenuItem = FindMenuItem("Profile");
|
||||||
|
|
||||||
@@ -787,27 +804,14 @@ namespace mpvnet
|
|||||||
case 0x105: // WM_SYSKEYUP
|
case 0x105: // WM_SYSKEYUP
|
||||||
case 0x201: // WM_LBUTTONDOWN
|
case 0x201: // WM_LBUTTONDOWN
|
||||||
case 0x202: // WM_LBUTTONUP
|
case 0x202: // WM_LBUTTONUP
|
||||||
|
case 0x204: // WM_RBUTTONDOWN
|
||||||
|
case 0x205: // WM_RBUTTONUP
|
||||||
case 0x207: // WM_MBUTTONDOWN
|
case 0x207: // WM_MBUTTONDOWN
|
||||||
case 0x208: // WM_MBUTTONUP
|
case 0x208: // WM_MBUTTONUP
|
||||||
case 0x20a: // WM_MOUSEWHEEL
|
case 0x20a: // WM_MOUSEWHEEL
|
||||||
case 0x20e: // WM_MOUSEHWHEEL
|
|
||||||
case 0x20b: // WM_XBUTTONDOWN
|
case 0x20b: // WM_XBUTTONDOWN
|
||||||
case 0x20c: // WM_XBUTTONUP
|
case 0x20c: // WM_XBUTTONUP
|
||||||
if (Core.WindowHandle != IntPtr.Zero)
|
case 0x20e: // WM_MOUSEHWHEEL
|
||||||
m.Result = SendMessage(Core.WindowHandle, m.Msg, m.WParam, m.LParam);
|
|
||||||
break;
|
|
||||||
case 0x0204: // WM_RBUTTONDOWN
|
|
||||||
if (IsMouseInOSC() && Core.WindowHandle != IntPtr.Zero)
|
|
||||||
m.Result = SendMessage(Core.WindowHandle, m.Msg, m.WParam, m.LParam);
|
|
||||||
break;
|
|
||||||
case 0x0205: // WM_RBUTTONUP
|
|
||||||
if (!IsMouseInOSC())
|
|
||||||
{
|
|
||||||
CursorHelp.Show();
|
|
||||||
UpdateMenu();
|
|
||||||
ContextMenu.IsOpen = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (Core.WindowHandle != IntPtr.Zero)
|
if (Core.WindowHandle != IntPtr.Zero)
|
||||||
m.Result = SendMessage(Core.WindowHandle, m.Msg, m.WParam, m.LParam);
|
m.Result = SendMessage(Core.WindowHandle, m.Msg, m.WParam, m.LParam);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -166,6 +166,14 @@ namespace mpvnet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string Alias {
|
||||||
|
get {
|
||||||
|
if (Input.Contains("SHARP") || Input.Contains("sharp") || Input.Contains("Sharp"))
|
||||||
|
return "#";
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static ObservableCollection<CommandItem> GetItems(string content)
|
public static ObservableCollection<CommandItem> GetItems(string content)
|
||||||
{
|
{
|
||||||
var items = new ObservableCollection<CommandItem>();
|
var items = new ObservableCollection<CommandItem>();
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ namespace mpvnet
|
|||||||
public class AppSettings
|
public class AppSettings
|
||||||
{
|
{
|
||||||
public bool InputDefaultBindingsFixApplied;
|
public bool InputDefaultBindingsFixApplied;
|
||||||
public int LastUpdateCheck;
|
public bool LogoCrash;
|
||||||
|
public bool ShowMenuFixApplied;
|
||||||
public int Volume = 70;
|
public int Volume = 70;
|
||||||
public List<string> RecentFiles = new List<string>();
|
public List<string> RecentFiles = new List<string>();
|
||||||
public Point WindowLocation;
|
public Point WindowLocation;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<Identity
|
<Identity
|
||||||
Name="5664FrankSkare.mpv.net"
|
Name="5664FrankSkare.mpv.net"
|
||||||
Publisher="CN=6A1A1E69-736C-4C77-B310-7B6D38E32617"
|
Publisher="CN=6A1A1E69-736C-4C77-B310-7B6D38E32617"
|
||||||
Version="5.6.0.0" />
|
Version="5.7.0.0" />
|
||||||
|
|
||||||
<Properties>
|
<Properties>
|
||||||
<DisplayName>mpv.net</DisplayName>
|
<DisplayName>mpv.net</DisplayName>
|
||||||
|
|||||||
@@ -4,14 +4,6 @@
|
|||||||
<VisualStudioVersion>15.0</VisualStudioVersion>
|
<VisualStudioVersion>15.0</VisualStudioVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|x86">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x86</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x86">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x86</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>x64</Platform>
|
<Platform>x64</Platform>
|
||||||
@@ -20,30 +12,6 @@
|
|||||||
<Configuration>Release</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform>x64</Platform>
|
<Platform>x64</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Debug|ARM">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>ARM</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|ARM">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>ARM</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|ARM64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>ARM64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|ARM64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>ARM64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|AnyCPU">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>AnyCPU</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|AnyCPU">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>AnyCPU</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
|
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
|
||||||
@@ -63,36 +31,12 @@
|
|||||||
<GenerateTemporaryStoreCertificate>True</GenerateTemporaryStoreCertificate>
|
<GenerateTemporaryStoreCertificate>True</GenerateTemporaryStoreCertificate>
|
||||||
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
|
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
|
||||||
<AppxBundle>Always</AppxBundle>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
|
|
||||||
<AppxBundle>Always</AppxBundle>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
|
||||||
<AppxBundle>Always</AppxBundle>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
|
|
||||||
<AppxBundle>Always</AppxBundle>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<AppxBundle>Always</AppxBundle>
|
<AppxBundle>Always</AppxBundle>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
|
||||||
<AppxBundle>Always</AppxBundle>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
|
||||||
<AppxBundle>Always</AppxBundle>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
|
||||||
<AppxBundle>Always</AppxBundle>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<AppxBundle>Always</AppxBundle>
|
<AppxBundle>Always</AppxBundle>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
|
||||||
<AppxBundle>Always</AppxBundle>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AppxManifest Include="Package.appxmanifest">
|
<AppxManifest Include="Package.appxmanifest">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("5.6.2.0")]
|
[assembly: AssemblyVersion("5.8.0.0")]
|
||||||
[assembly: AssemblyFileVersion("5.6.2.0")]
|
[assembly: AssemblyFileVersion("5.8.0.0")]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ $exePath = $PSScriptRoot + '\bin\mpvnet.exe'
|
|||||||
$versionInfo = [Diagnostics.FileVersionInfo]::GetVersionInfo($exePath)
|
$versionInfo = [Diagnostics.FileVersionInfo]::GetVersionInfo($exePath)
|
||||||
$7z = 'C:\Program Files\7-Zip\7z.exe'
|
$7z = 'C:\Program Files\7-Zip\7z.exe'
|
||||||
|
|
||||||
$targetDir = $tmpDir + "\mpv.net-$($versionInfo.FileVersion)-portable-beta"
|
$targetDir = $tmpDir + "\mpv.net-$($versionInfo.FileVersion)-beta"
|
||||||
Copy-Item $PSScriptRoot\bin $targetDir -Recurse -Exclude 'System.Management.Automation.xml'
|
Copy-Item $PSScriptRoot\bin $targetDir -Recurse -Exclude 'System.Management.Automation.xml'
|
||||||
& $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*"
|
& $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*"
|
||||||
if ($LastExitCode) { throw $LastExitCode }
|
if ($LastExitCode) { throw $LastExitCode }
|
||||||
|
|||||||
@@ -681,3 +681,13 @@ file = mpvnet
|
|||||||
filter = UI
|
filter = UI
|
||||||
url = https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#color-theme
|
url = https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#color-theme
|
||||||
help = Color theme used in light mode.\nmpv.net must be restarted after a change.\nmpv.net specific option. Default: light
|
help = Color theme used in light mode.\nmpv.net must be restarted after a change.\nmpv.net specific option. Default: light
|
||||||
|
|
||||||
|
[setting]
|
||||||
|
name = show-logo
|
||||||
|
file = mpvnet
|
||||||
|
default = yes
|
||||||
|
filter = UI
|
||||||
|
help = Draws the blue mpv.net logo ontop of the native OSC logo.
|
||||||
|
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#input-and-context-menu
|
# https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#input-and-context-menu
|
||||||
|
|
||||||
o script-message mpv.net open-files #menu: Open > Open Files...
|
o script-message mpv.net open-files #menu: Open > Open Files...
|
||||||
Ctrl+v script-message mpv.net open-url #menu: Open > Open URL or file from clipboard
|
Ctrl+v script-message mpv.net open-clipboard #menu: Open > Open URL or file from clipboard
|
||||||
_ script-message mpv.net open-optical-media #menu: Open > Open DVD/Blu-ray Drive/Folder...
|
_ script-message mpv.net open-optical-media #menu: Open > Open DVD/Blu-ray Drive/Folder...
|
||||||
_ ignore #menu: Open > -
|
_ ignore #menu: Open > -
|
||||||
Alt+a script-message mpv.net load-audio #menu: Open > Load external audio files...
|
Alt+a script-message mpv.net load-audio #menu: Open > Load external audio files...
|
||||||
@@ -166,10 +166,11 @@ F1 script-message mpv.net show-command-palette #menu: Command Palette
|
|||||||
_ ignore #menu: -
|
_ ignore #menu: -
|
||||||
Esc quit #menu: Exit
|
Esc quit #menu: Exit
|
||||||
|
|
||||||
|
MBTN_Right script-message mpv.net show-menu
|
||||||
6 script-message mpv.net show-progress
|
6 script-message mpv.net show-progress
|
||||||
KP6 script-message mpv.net show-progress
|
KP6 script-message mpv.net show-progress
|
||||||
7 script-message mpv.net cycle-audio
|
7 script-message mpv.net cycle-audio
|
||||||
SHARP script-message mpv.net cycle-audio
|
Sharp script-message mpv.net cycle-audio
|
||||||
8 cycle sub
|
8 cycle sub
|
||||||
j cycle sub
|
j cycle sub
|
||||||
q quit
|
q quit
|
||||||
@@ -195,15 +196,15 @@ MBTN_Left ignore
|
|||||||
f cycle fullscreen
|
f cycle fullscreen
|
||||||
MBTN_Left_DBL cycle fullscreen
|
MBTN_Left_DBL cycle fullscreen
|
||||||
KP_Enter cycle fullscreen
|
KP_Enter cycle fullscreen
|
||||||
Shift+RIGHT no-osd seek 1 exact
|
Shift+Right no-osd seek 1 exact
|
||||||
Shift+LEFT no-osd seek -1 exact
|
Shift+Left no-osd seek -1 exact
|
||||||
Shift+UP no-osd seek 5 exact
|
Shift+Up no-osd seek 5 exact
|
||||||
Shift+DOWN no-osd seek -5 exact
|
Shift+Down no-osd seek -5 exact
|
||||||
Shift+BS revert-seek # undo the previous (or marked) seek
|
Shift+BS revert-seek # undo the previous (or marked) seek
|
||||||
Shift+Ctrl+BS revert-seek mark # mark the position for revert-seek
|
Shift+Ctrl+BS revert-seek mark # mark the position for revert-seek
|
||||||
Shift+g add sub-scale +0.1 # increase the subtitle font size
|
Shift+g add sub-scale +0.1 # increase the subtitle font size
|
||||||
Shift+f add sub-scale -0.1 # decrease the subtitle font size
|
Shift+f add sub-scale -0.1 # decrease the subtitle font size
|
||||||
Ctrl+Shift+LEFT no-osd sub-seek -1 # seek to the previous subtitle
|
Ctrl+Shift+Left no-osd sub-seek -1 # seek to the previous subtitle
|
||||||
Ctrl+Shift+RIGHT no-osd sub-seek 1 # seek to the next subtitle
|
Ctrl+Shift+Right no-osd sub-seek 1 # seek to the next subtitle
|
||||||
Ctrl+Wheel_Up no-osd seek 7
|
Ctrl+Wheel_Up no-osd seek 7
|
||||||
Ctrl+Wheel_Down no-osd seek -7
|
Ctrl+Wheel_Down no-osd seek -7
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
|
|
||||||
// When seeking displays position and duration like so: 70:00 / 80:00
|
|
||||||
// Which is different from most players which use: 01:10:00 / 01:20:00
|
|
||||||
// In input.conf set the input command prefix no-osd infront of the seek command.
|
|
||||||
|
|
||||||
function add_zero(val)
|
|
||||||
{
|
|
||||||
val = Math.round(val);
|
|
||||||
return val > 9 ? "" + val : "0" + val;
|
|
||||||
}
|
|
||||||
|
|
||||||
function format(val)
|
|
||||||
{
|
|
||||||
var sec = Math.round(val);
|
|
||||||
|
|
||||||
if (sec < 0)
|
|
||||||
sec = 0;
|
|
||||||
|
|
||||||
pos_min_floor = Math.floor(sec / 60);
|
|
||||||
sec_rest = sec - pos_min_floor * 60;
|
|
||||||
return add_zero(pos_min_floor) + ":" + add_zero(sec_rest);
|
|
||||||
}
|
|
||||||
|
|
||||||
function on_seek(_)
|
|
||||||
{
|
|
||||||
pos = mp.get_property_number("time-pos");
|
|
||||||
dur = mp.get_property_number("duration");
|
|
||||||
|
|
||||||
if (pos > dur)
|
|
||||||
pos = dur;
|
|
||||||
|
|
||||||
mp.commandv("show-text", format(pos) + " / " + format(dur));
|
|
||||||
}
|
|
||||||
|
|
||||||
mp.register_event("seek", on_seek);
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
|
|
||||||
// This script shows the playlist.
|
|
||||||
|
|
||||||
function showPlaylist()
|
|
||||||
{
|
|
||||||
// set font size
|
|
||||||
mp.set_property_number("osd-font-size", 40);
|
|
||||||
|
|
||||||
// show playlist for 5 seconds
|
|
||||||
mp.command("show-text ${playlist} 5000");
|
|
||||||
|
|
||||||
// restore original font size in 6 seconds
|
|
||||||
setTimeout(resetFontSize, 6000);
|
|
||||||
}
|
|
||||||
|
|
||||||
// restore original font size
|
|
||||||
function resetFontSize()
|
|
||||||
{
|
|
||||||
mp.set_property_number("osd-font-size", size);
|
|
||||||
}
|
|
||||||
|
|
||||||
// save original font size
|
|
||||||
var size = mp.get_property_number("osd-font-size");
|
|
||||||
|
|
||||||
// input.conf: key script-binding show-playlist
|
|
||||||
mp.add_key_binding(null, "show-playlist", showPlaylist);
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
|
|
||||||
-- This script deletes the file that is currently playing.
|
|
||||||
|
|
||||||
-- input.conf:
|
|
||||||
|
|
||||||
-- KP0 script-binding delete_current_file/delete
|
|
||||||
-- 0 script-binding delete_current_file/delete
|
|
||||||
|
|
||||||
-- KP1 script-binding delete_current_file/confirm
|
|
||||||
-- 1 script-binding delete_current_file/confirm
|
|
||||||
|
|
||||||
function delete()
|
|
||||||
FileToDelete = mp.get_property("path")
|
|
||||||
DeleteTime = os.time()
|
|
||||||
mp.commandv("show-text", "Press 1 to delete file", "10000")
|
|
||||||
end
|
|
||||||
|
|
||||||
function confirm()
|
|
||||||
local path = mp.get_property("path")
|
|
||||||
|
|
||||||
if FileToDelete == path and (os.time() - DeleteTime) < 10 then
|
|
||||||
mp.commandv("show-text", "")
|
|
||||||
|
|
||||||
local count = mp.get_property_number("playlist-count")
|
|
||||||
local pos = mp.get_property_number("playlist-pos")
|
|
||||||
local newPos = 0
|
|
||||||
|
|
||||||
if pos == count - 1 then
|
|
||||||
newPos = pos - 1
|
|
||||||
else
|
|
||||||
newPos = pos + 1
|
|
||||||
end
|
|
||||||
|
|
||||||
if newPos > -1 then
|
|
||||||
mp.command("set pause no")
|
|
||||||
mp.set_property_number("playlist-pos", newPos)
|
|
||||||
end
|
|
||||||
|
|
||||||
mp.command("playlist-remove " .. pos)
|
|
||||||
|
|
||||||
local ps_code = [[& {
|
|
||||||
Start-Sleep -Seconds 2
|
|
||||||
Add-Type -AssemblyName Microsoft.VisualBasic
|
|
||||||
[Microsoft.VisualBasic.FileIO.FileSystem]::DeleteFile('FileToDelete', 'OnlyErrorDialogs', 'SendToRecycleBin')
|
|
||||||
}]]
|
|
||||||
|
|
||||||
local escapedFileToDelete = string.gsub(FileToDelete, "'", "''")
|
|
||||||
escapedFileToDelete = string.gsub(escapedFileToDelete, "’", "’’")
|
|
||||||
escapedFileToDelete = string.gsub(escapedFileToDelete, "%%", "%%%%")
|
|
||||||
ps_code = string.gsub(ps_code, "FileToDelete", escapedFileToDelete)
|
|
||||||
|
|
||||||
mp.command_native({
|
|
||||||
name = "subprocess",
|
|
||||||
playback_only = false,
|
|
||||||
detach = true,
|
|
||||||
args = { 'powershell', '-NoProfile', '-ExecutionPolicy', 'Bypass', '-Command', ps_code },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
mp.add_key_binding(nil, "delete", delete)
|
|
||||||
mp.add_key_binding(nil, "confirm", confirm)
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
|
|
||||||
-- https://github.com/mpv-player/mpv/blob/master/TOOLS/lua/pause-when-minimize.lua
|
|
||||||
|
|
||||||
-- This script pauses playback when minimizing the window, and resumes playback
|
|
||||||
-- if it's brought back again. If the player was already paused when minimizing,
|
|
||||||
-- then try not to mess with the pause state.
|
|
||||||
|
|
||||||
local did_minimize = false
|
|
||||||
|
|
||||||
mp.observe_property("window-minimized", "bool", function(name, value)
|
|
||||||
local pause = mp.get_property_native("pause")
|
|
||||||
if value == true then
|
|
||||||
if pause == false then
|
|
||||||
mp.set_property_native("pause", true)
|
|
||||||
did_minimize = true
|
|
||||||
end
|
|
||||||
elseif value == false then
|
|
||||||
if did_minimize and (pause == true) then
|
|
||||||
mp.set_property_native("pause", false)
|
|
||||||
end
|
|
||||||
did_minimize = false
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
@@ -90,11 +90,20 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
string filter = SearchControl.SearchTextBox.Text.ToLower();
|
string filter = SearchControl.SearchTextBox.Text.ToLower();
|
||||||
|
|
||||||
if (filter.Length == 1 && item.CommandItem != null)
|
if (item.CommandItem != null)
|
||||||
|
{
|
||||||
|
if (item.CommandItem.Alias.ContainsEx(filter))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (filter.Length == 1)
|
||||||
return item.CommandItem.Input.ToLower().Replace("ctrl+", "")
|
return item.CommandItem.Input.ToLower().Replace("ctrl+", "")
|
||||||
.Replace("shift+", "")
|
.Replace("shift+", "")
|
||||||
.Replace("alt+", "") == filter.ToLower();
|
.Replace("alt+", "") == filter.ToLower();
|
||||||
|
|
||||||
|
if (item.CommandItem.Command.ToLower().Contains(filter))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (filter == "" || item.Text.ToLower().Contains(filter) ||
|
if (filter == "" || item.Text.ToLower().Contains(filter) ||
|
||||||
item.SecondaryText.ToLower().Contains(filter))
|
item.SecondaryText.ToLower().Contains(filter))
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
|
|
||||||
Title="Config Editor"
|
Title="Config Editor"
|
||||||
Height="530"
|
Height="540"
|
||||||
Width="700"
|
Width="700"
|
||||||
Foreground="{Binding Theme.Foreground}"
|
Foreground="{Binding Theme.Foreground}"
|
||||||
Background="{Binding Theme.Background}"
|
Background="{Binding Theme.Background}"
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="100" />
|
<ColumnDefinition Width="105" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
@@ -75,7 +75,8 @@
|
|||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<TextBlock Name="OpenSettingsTextBlock" Margin="0,30,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="OpenSettingsTextBlock_MouseUp">Open config folder</TextBlock>
|
<TextBlock Name="ShowMpvNetSpecific" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="ShowMpvNetSpecific_MouseUp">Show mpv.net specific options</TextBlock>
|
||||||
|
<TextBlock Name="OpenSettingsTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="OpenSettingsTextBlock_MouseUp">Open config folder</TextBlock>
|
||||||
<TextBlock Name="PreviewTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="PreviewTextBlock_MouseUp">Preview mpv.conf</TextBlock>
|
<TextBlock Name="PreviewTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="PreviewTextBlock_MouseUp">Preview mpv.conf</TextBlock>
|
||||||
<TextBlock Name="ShowManualTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="ShowManualTextBlock_MouseUp">Show mpv manual</TextBlock>
|
<TextBlock Name="ShowManualTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="ShowManualTextBlock_MouseUp">Show mpv manual</TextBlock>
|
||||||
<TextBlock Name="SupportTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="SupportTextBlock_MouseUp">Show support forum</TextBlock>
|
<TextBlock Name="SupportTextBlock" Margin="0,15,0,0" Cursor="Hand" TextWrapping="WrapWithOverflow" Foreground="{Binding Theme.Heading}" MouseUp="SupportTextBlock_MouseUp">Show support forum</TextBlock>
|
||||||
|
|||||||
@@ -344,5 +344,7 @@ namespace mpvnet
|
|||||||
if (e.Key == Key.Escape)
|
if (e.Key == Key.Escape)
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ShowMpvNetSpecific_MouseUp(object sender, MouseButtonEventArgs e) => SearchControl.Text = "mpv.net";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,28 +48,25 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<OutputPath>bin\</OutputPath>
|
<OutputPath>bin\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<LangVersion>7.3</LangVersion>
|
<LangVersion>7.3</LangVersion>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||||
<OutputPath>bin\</OutputPath>
|
<OutputPath>bin\x64\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<LangVersion>7.3</LangVersion>
|
<LangVersion>7.3</LangVersion>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 16
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 16.0.28729.10
|
VisualStudioVersion = 17.1.32228.430
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mpv.net", "mpv.net.csproj", "{1751F378-8EDF-4B62-BE6D-304C7C287089}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mpv.net", "mpv.net.csproj", "{1751F378-8EDF-4B62-BE6D-304C7C287089}"
|
||||||
EndProject
|
EndProject
|
||||||
@@ -16,88 +16,24 @@ Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "mpv.net.package", "Package\
|
|||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Debug|ARM = Debug|ARM
|
|
||||||
Debug|ARM64 = Debug|ARM64
|
|
||||||
Debug|x64 = Debug|x64
|
Debug|x64 = Debug|x64
|
||||||
Debug|x86 = Debug|x86
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
Release|ARM = Release|ARM
|
|
||||||
Release|ARM64 = Release|ARM64
|
|
||||||
Release|x64 = Release|x64
|
Release|x64 = Release|x64
|
||||||
Release|x86 = Release|x86
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x64.Build.0 = Debug|x64
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x64.ActiveCfg = Release|x64
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|ARM.Build.0 = Debug|Any CPU
|
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x64.Build.0 = Release|x64
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
{55C88710-539D-4402-84C8-31694841C731}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|ARM64.Build.0 = Debug|Any CPU
|
{55C88710-539D-4402-84C8-31694841C731}.Debug|x64.Build.0 = Debug|x64
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{55C88710-539D-4402-84C8-31694841C731}.Release|x64.ActiveCfg = Release|x64
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x64.Build.0 = Debug|Any CPU
|
{55C88710-539D-4402-84C8-31694841C731}.Release|x64.Build.0 = Release|x64
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|ARM.ActiveCfg = Release|Any CPU
|
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|ARM.Build.0 = Release|Any CPU
|
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|ARM64.ActiveCfg = Release|Any CPU
|
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|ARM64.Build.0 = Release|Any CPU
|
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Debug|ARM.Build.0 = Debug|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Debug|ARM64.Build.0 = Debug|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Release|ARM.ActiveCfg = Release|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Release|ARM.Build.0 = Release|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Release|ARM64.ActiveCfg = Release|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Release|ARM64.Build.0 = Release|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{55C88710-539D-4402-84C8-31694841C731}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|ARM.ActiveCfg = Debug|ARM
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|ARM.Build.0 = Debug|ARM
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|ARM.Deploy.0 = Debug|ARM
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|ARM64.Build.0 = Debug|ARM64
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x64.ActiveCfg = Debug|x64
|
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x64.Build.0 = Debug|x64
|
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x64.Build.0 = Debug|x64
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x64.Deploy.0 = Debug|x64
|
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x64.Deploy.0 = Debug|x64
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x86.ActiveCfg = Debug|x86
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x86.Build.0 = Debug|x86
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x86.Deploy.0 = Debug|x86
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|ARM.ActiveCfg = Release|ARM
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|ARM.Build.0 = Release|ARM
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|ARM.Deploy.0 = Release|ARM
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|ARM64.ActiveCfg = Release|ARM64
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|ARM64.Build.0 = Release|ARM64
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|ARM64.Deploy.0 = Release|ARM64
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x64.ActiveCfg = Release|x64
|
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x64.ActiveCfg = Release|x64
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x64.Build.0 = Release|x64
|
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x64.Build.0 = Release|x64
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x64.Deploy.0 = Release|x64
|
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x64.Deploy.0 = Release|x64
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x86.ActiveCfg = Release|x86
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x86.Build.0 = Release|x86
|
|
||||||
{81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x86.Deploy.0 = Release|x86
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
Reference in New Issue
Block a user