Compare commits

...

133 Commits

Author SHA1 Message Date
stax76
8e45cdb47d release v7.0.0.1 Beta 2023-12-11 11:38:36 +01:00
stax76
a61a0506fd Merge branch 'main' of https://github.com/mpvnet-player/mpv.net 2023-12-10 16:57:01 +01:00
stax76
b3877492dd Support for encoding mode and thumbfast and some other new features and improvements 2023-12-10 16:56:51 +01:00
stax76
090f15fc47 Merge pull request #605 from dyphire/workflows
auto build: create .mo files & update binary files
2023-12-09 08:18:09 +01:00
dyphire
d57692c5d1 auto build: create .mo files & update binary files 2023-12-09 14:44:40 +08:00
stax76
60dfbee16d auto build fix 2023-12-09 05:16:10 +01:00
stax76
74f586744f auto build: try installing gettext tools 2023-12-09 05:07:27 +01:00
stax76
9b93eaa9e9 auto build: next try running create-mo-files.ps1 2023-12-09 04:46:05 +01:00
stax76
a4eed2d939 auto build fix 2023-12-09 04:20:17 +01:00
stax76
34a3855941 build workflow: fix bug using Resolve-Path 2023-12-09 04:08:18 +01:00
stax76
dfd9abeba4 github-actions: fix missing mpvnet.com and .mo files 2023-12-09 03:41:28 +01:00
stax76
f937273fe3 Support Chinese language 2023-12-08 21:33:10 +01:00
stax76
8d601525b5 problems with git... 2023-12-08 06:31:29 +01:00
stax76
5dd3716012 translation using NGettext.Wpf 2023-12-08 06:23:17 +01:00
stax76
a4709de918 Merge pull request #582 from mpvnet-player/translations_9c125c506e307f2b98fdac75d949d462_en
Updates for file lang/po/pt.po in en
2023-12-03 12:41:39 +01:00
stax76
c24b9b2c83 Merge pull request #583 from mpvnet-player/translations_cb0bed8dab91634f794f5a23524fa876_en
Updates for file lang/po/ja.po in en
2023-12-03 12:40:59 +01:00
stax76
3686231cf2 Merge pull request #584 from mpvnet-player/translations_f354967270a86e8ac05644d3af39dff2_en
Updates for file lang/po/pt_BR.po in en
2023-12-03 12:40:43 +01:00
stax76
4c12097063 Merge pull request #585 from mpvnet-player/translations_7374abb4a065a5f2250a4345bf850955_en
Updates for file lang/po/es.po in en
2023-12-03 12:40:28 +01:00
stax76
da7f877f2a Merge pull request #586 from mpvnet-player/translations_47f53a5158a97e34f7699cb9c92005db_en
Updates for file lang/po/pl.po in en
2023-12-03 12:40:14 +01:00
stax76
1dbb1e4af9 Merge pull request #587 from mpvnet-player/translations_de116bdefbd68024f939486579a0bf34_en
Updates for file lang/po/fr.po in en
2023-12-03 12:39:49 +01:00
stax76
abea225b54 Merge pull request #588 from mpvnet-player/translations_23b6678292a30949b0d8a8d599868d5d_en
Updates for file lang/po/tr.po in en
2023-12-03 12:39:33 +01:00
stax76
2053042e19 Merge pull request #589 from mpvnet-player/translations_e92bfa4d6572333c19dbcab4a4ab4bbe_en
Updates for file lang/po/sr_RS.po in en
2023-12-03 12:39:17 +01:00
stax76
a3046258d4 Merge pull request #590 from mpvnet-player/translations_f83e45ef994d055f2b090d977216a5fb_en
Updates for file lang/po/zh_CN.po in en
2023-12-03 12:39:02 +01:00
stax76
207da8d0a6 Merge pull request #591 from mpvnet-player/translations_41f08823f5f6c2445144e0aae8b06b81_en
Updates for file lang/po/sr_RS@latin.po in en
2023-12-03 12:38:46 +01:00
stax76
f7ed3bf01f Merge pull request #593 from mpvnet-player/translations_9f67269b1373c2b3292aeda6ac2b1019_en
Updates for file lang/po/ca.po in en
2023-12-03 12:38:17 +01:00
stax76
3c8cd407e1 Merge pull request #594 from mpvnet-player/translations_765a3e6f67b71925d1e3478e1228f11d_en
Updates for file lang/po/ro.po in en
2023-12-03 12:38:02 +01:00
stax76
ea56b6d06c Merge pull request #595 from mpvnet-player/translations_59e6e0afcffac2572403a1017f5482bd_en
Updates for file lang/po/zh_SG.po in en
2023-12-03 12:37:39 +01:00
stax76
d4c4296196 Merge pull request #596 from mpvnet-player/translations_8dbfcaf9173f9f0d65c02542c00f9fdb_en
Updates for file lang/po/nl.po in en
2023-12-03 12:37:23 +01:00
stax76
1b4be52ce6 Merge pull request #597 from mpvnet-player/translations_0ebcb9906ede175c218105251b276144_en
Updates for file lang/po/sv.po in en
2023-12-03 12:37:10 +01:00
stax76
286686f8c4 Merge pull request #598 from mpvnet-player/translations_0f9f4cd43bc9918bd5133f6b515de91b_en
Updates for file lang/po/lt.po in en
2023-12-03 12:36:57 +01:00
stax76
146852ca19 Merge pull request #599 from mpvnet-player/translations_38a6dd3b6bc9b159b9af29f1f01155ac_en
Updates for file lang/po/cs.po in en
2023-12-03 12:36:39 +01:00
stax76
3f6181f77b Merge pull request #600 from mpvnet-player/translations_89409671ec1a0a5131a4284c6ebea30c_en
Updates for file lang/po/bg.po in en
2023-12-03 12:36:20 +01:00
stax76
8997a2eacb Merge pull request #592 from mpvnet-player/translations_555b7665d32e34263edee646f45402cc_en
Updates for file lang/po/de.po in en
2023-11-29 13:27:50 +01:00
transifex-integration[bot]
a6642a4db8 translation-update Updating lang/po/bg.po
source file: 'lang/po/bg.po' updated.
2023-11-29 11:12:04 +00:00
transifex-integration[bot]
8a8ac75b29 translation-update Updating lang/po/sv.po
source file: 'lang/po/sv.po' updated.
2023-11-29 11:12:03 +00:00
transifex-integration[bot]
1cc2422117 translation-update Updating lang/po/lt.po
source file: 'lang/po/lt.po' updated.
2023-11-29 11:12:03 +00:00
transifex-integration[bot]
0fa3feef1f translation-update Updating lang/po/cs.po
source file: 'lang/po/cs.po' updated.
2023-11-29 11:12:03 +00:00
transifex-integration[bot]
3ae923ba0e translation-update Updating lang/po/sr_RS.po
source file: 'lang/po/sr_RS.po' updated.
2023-11-29 11:12:02 +00:00
transifex-integration[bot]
11e150b0f9 translation-update Updating lang/po/ca.po
source file: 'lang/po/ca.po' updated.
2023-11-29 11:12:02 +00:00
transifex-integration[bot]
1ed8c234a3 translation-update Updating lang/po/ro.po
source file: 'lang/po/ro.po' updated.
2023-11-29 11:12:02 +00:00
transifex-integration[bot]
948e600f96 translation-update Updating lang/po/zh_SG.po
source file: 'lang/po/zh_SG.po' updated.
2023-11-29 11:12:02 +00:00
transifex-integration[bot]
1050e7d25f translation-update Updating lang/po/nl.po
source file: 'lang/po/nl.po' updated.
2023-11-29 11:12:02 +00:00
transifex-integration[bot]
2ff1b07449 translation-update Updating lang/po/fr.po
source file: 'lang/po/fr.po' updated.
2023-11-29 11:12:01 +00:00
transifex-integration[bot]
4466217063 translation-update Updating lang/po/zh_CN.po
source file: 'lang/po/zh_CN.po' updated.
2023-11-29 11:12:01 +00:00
transifex-integration[bot]
01adf213bc translation-update Updating lang/po/sr_RS@latin.po
source file: 'lang/po/sr_RS@latin.po' updated.
2023-11-29 11:12:01 +00:00
transifex-integration[bot]
c1308434b1 translation-update Updating lang/po/de.po
source file: 'lang/po/de.po' updated.
2023-11-29 11:12:01 +00:00
transifex-integration[bot]
e854598cd2 translation-update Updating lang/po/es.po
source file: 'lang/po/es.po' updated.
2023-11-29 11:12:00 +00:00
transifex-integration[bot]
f6ca5a3b96 translation-update Updating lang/po/tr.po
source file: 'lang/po/tr.po' updated.
2023-11-29 11:12:00 +00:00
transifex-integration[bot]
8fe196bf8a translation-update Updating lang/po/pt_BR.po
source file: 'lang/po/pt_BR.po' updated.
2023-11-29 11:11:59 +00:00
transifex-integration[bot]
3abb3c32f0 translation-update Updating lang/po/pl.po
source file: 'lang/po/pl.po' updated.
2023-11-29 11:11:59 +00:00
transifex-integration[bot]
867c9c2989 translation-update Updating lang/po/pt.po
source file: 'lang/po/pt.po' updated.
2023-11-29 11:11:57 +00:00
transifex-integration[bot]
c1c8e08c9d translation-update Updating lang/po/ja.po
source file: 'lang/po/ja.po' updated.
2023-11-29 11:11:57 +00:00
stax76
bdcfa4e722 translation files 2023-11-29 10:38:02 +01:00
stax76
7879bda5c1 manual update 2023-11-19 10:39:27 +01:00
stax76
ef062d1b10 file casing 2023-11-19 09:56:11 +01:00
stax76
8b6204ed2b Merge branch 'main' of https://github.com/mpvnet-player/mpv.net 2023-11-06 09:19:23 +01:00
stax76
f14d1a98f9 Merge pull request #577 from sakhezech/main
fix readme typos
2023-11-06 09:19:12 +01:00
stax76
9ec518a952 uosc menu syntax fix 2023-11-06 09:17:53 +01:00
sakhezech
8ee67f832c fix reamde typos 2023-11-05 19:53:25 +03:00
stax76
684e103e12 fix dark mode window title bar color and support uosc exclamation mark menu syntax 2023-11-05 11:15:35 +01:00
stax76
1d3fe0a924 work on menu and bindings 2023-11-04 20:24:10 +01:00
stax76
b41ca3cd89 misc 2023-11-03 17:04:26 +01:00
stax76
aa0e88129b input learn window fix 2023-11-01 08:16:37 +01:00
stax76
4baa26d7a0 Fix Ctrl+Alt and right mouse button usage in input learn window 2023-10-31 12:30:28 +01:00
stax76
4c4088b28a environment variables and more 2023-10-31 09:44:20 +01:00
stax76
ea8944c1cc change build.yml and support window-dragging=no 2023-10-26 17:23:38 +02:00
stax76
d7e1e32654 Merge pull request #570 from dyphire/workflows
add build workflow
2023-10-26 07:40:27 +02:00
dyphire
9878e6da46 add build workflow 2023-10-25 20:10:51 +08:00
stax76
37320fb975 conf editor bug fix 2023-10-25 09:35:36 +02:00
stax76
0148a71281 fix dead links and dead manual topics 2023-10-24 11:50:09 +02:00
stax76
9f4baa9d99 change solution name 2023-10-24 11:31:45 +02:00
stax76
5706d7b66d replace v6 with experimental v7 code 2023-10-24 11:17:45 +02:00
stax76
fb27bb8727 move FileAssociation class to FileAssociation.cs 2023-10-24 10:00:40 +02:00
stax76
80c827974a v6.0.4.0 Stable 2023-08-17 02:50:45 +02:00
stax76
d2e7d4551f v6.0.4.0 Stable 2023-08-17 02:38:41 +02:00
stax76
308e3ed044 Merge pull request #541 from soredake/sub-override-keybind
input.conf.txt: add binding for overriding sub styles
2023-08-17 02:31:42 +02:00
soredake
f563342eb5 input.conf.txt: add binding for overriding sub styles 2023-05-07 19:56:30 +03:00
stax76
16d6e4d471 Merge pull request #517 from Torben2000/feature/playlist-titles
Use item title in playlist command palette if set
2023-01-21 08:12:56 +01:00
stax76
030aa930a1 Merge pull request #529 from hooke007/dll
relink to libmpv-2
2023-01-21 08:12:01 +01:00
hooke007
3a6df857da relink to libmpv-2 2023-01-20 15:35:59 +00:00
Torben2000
7d9340d9d5 Use item title in playlist command palette if set
Fixes https://github.com/mpvnet-player/mpv.net/issues/509
2022-12-03 19:30:37 +01:00
stax76
9dca27c941 Merge pull request #510 from soredake/screenshot-without-subtitles
input.conf.txt: add binding for screenshot without subtitles
2022-11-27 07:41:31 +01:00
soredake
6f2b30f762 input.conf.txt: add binding for screenshot without subtitles 2022-11-15 11:57:49 +02:00
stax76
89be723132 Merge pull request #505 from nkh0472/patch-2
fix typo
2022-10-20 17:29:37 +02:00
nkh0472
ec1dde650f fix typo 2022-10-20 23:12:35 +08:00
stax76
dbf1a32580 v6.0.3.2 2022-10-14 12:18:12 +02:00
stax76
a81ed58983 finish repo transfer 2022-10-12 12:40:40 +02:00
stax76
33df960d04 Merge branch 'master' of https://github.com/stax76/mpv.net 2022-10-02 15:40:55 +02:00
stax76
337bee9f28 fix severe termination bug 2022-10-02 15:40:53 +02:00
stax76
e57c41a254 Merge pull request #495 from nkh0472/patch-1
Update Manual_chs.md
2022-10-01 10:19:41 +02:00
nkh0472
62d06c65ab Update Manual_chs.md
Co-authored-by: hooke007 <hooke007@qq.com>
2022-09-25 19:21:22 +08:00
nkh0472
e70a935d7a Update Manual_chs.md
Add more info about translations update this time
2022-09-19 21:14:48 +08:00
nkh0472
c8e6ce678a Update Manual_chs.md
Translations for b73d2e7107 and 1f6025a10f
2022-09-18 23:03:37 +08:00
stax76
22960af78b mouse cursor auto-hide behavior 2022-08-19 07:13:07 +02:00
stax76
95e31a1d3f Improved mouse cursor hide behavior 2022-08-19 06:53:49 +02:00
stax76
06ff83b75c shorter OSD media info 2022-08-18 09:44:52 +02:00
stax76
1f6025a10f New command to move the Window to the screen edge 2022-08-18 09:31:23 +02:00
stax76
00bfa20fac improved OSD media info 2022-08-08 03:19:11 +02:00
stax76
1475d5ee66 conf editor option definition simplyfication 2022-08-07 14:21:11 +02:00
stax76
b73d2e7107 new history-filter option added 2022-08-07 13:50:29 +02:00
stax76
a7fa76d63a relative path fix 2022-08-05 07:11:50 +02:00
stax76
e2c720346a fix #480 2022-08-05 06:29:49 +02:00
stax76
01a853e865 Merge pull request #475 from hooke007/doc
bump Manual_chs v6.0.3.1
2022-07-31 06:47:19 +02:00
hooke007
6510de2bd8 bump Manual_chs v6.0.3.1 2022-07-31 01:01:58 +01:00
stax76
7fc1de2ce3 update process-instance description 2022-07-30 13:35:17 +02:00
stax76
b0d399e9ee update changelog 2022-07-30 13:20:39 +02:00
stax76
7f680829ef update changelog 2022-07-30 13:05:30 +02:00
stax76
603f956261 update changelog 2022-07-30 12:55:32 +02:00
stax76
6d06df9004 6.0.3.1 2022-07-30 12:52:19 +02:00
stax76
5ea086d05b Support --audio-file and --sub-file aliases 2022-07-30 11:45:07 +02:00
stax76
1ad819fa9d Fix external audio tracks not shown correctly in tracks context menu 2022-07-30 11:26:45 +02:00
stax76
f2dd6205b5 Merge branch 'master' of https://github.com/stax76/mpv.net 2022-07-27 09:42:02 +02:00
stax76
b2a3c231ff command line syntax is supported in mpv.conf 2022-07-27 09:42:00 +02:00
stax76
f6c223a411 Update issue templates 2022-07-25 09:51:28 +02:00
stax76
e7a2ba6805 Update issue templates 2022-07-25 09:43:58 +02:00
stax76
5a08d9ccd6 Shift key enables process-instance=multi 2022-07-23 08:50:07 +02:00
stax76
5714a5e62a Merge branch 'master' of https://github.com/stax76/mpv.net 2022-07-17 08:04:43 +02:00
stax76
def7e5ac5a misc 2022-07-17 08:04:32 +02:00
stax76
601bb20492 Update FUNDING.yml 2022-07-14 04:31:20 +02:00
stax76
59600df977 update manual 2022-07-13 09:02:51 +02:00
stax76
e1b9730e9b use mpv.net to cycle subtitles 2022-07-12 05:49:05 +02:00
stax76
e378551938 misc 2022-07-11 13:14:26 +02:00
stax76
a82b2ef571 disable unused mpv events 2022-07-11 07:05:50 +02:00
stax76
6157a01701 disable unused mpv events 2022-07-11 06:57:10 +02:00
stax76
ec17ae8ce9 support shortcuts with media file target 2022-07-11 06:14:01 +02:00
stax76
f719528017 fix #293 2022-07-10 10:30:01 +02:00
stax76
966b45eb65 shorten annoying media info titles 2022-07-10 00:49:56 +02:00
stax76
eeae6994a2 remove basic view and enhance advanced view of show-info command 2022-07-09 17:26:49 +02:00
stax76
07809d882f use mpvnet instead of mpv to create playlist from folder 2022-07-08 12:20:36 +02:00
stax76
e970f0b4e4 libmpv shinchiro 2022-07-02 2022-07-08 05:51:06 +02:00
stax76
a36b6a3fdf misc 2022-07-04 08:45:37 +02:00
stax76
4febca257f properly fix OSC hide behavior 2022-07-04 08:32:53 +02:00
stax76
9d493b4d08 store package update 2022-07-03 10:49:13 +02:00
246 changed files with 18462 additions and 12802 deletions

1
.github/FUNDING.yml vendored
View File

@@ -1,3 +1,2 @@
github: stax76
patreon: stax76
ko_fi: stax76

View File

@@ -8,3 +8,33 @@ assignees: stax76
---
This template is meant for usage questions of mpv.net.
Some type of questions like questions about a problem require filling out an issue template:
**Describe the problem**
A clear and concise description of what the problem is.
**To Reproduce**
To reproduce, try the last beta version using the CLI option `--config=no`.
In case of an audio or video problem, try to reproduce the problem using mpv instead of mpv.net.
If it can be reproduced with mpv, use the [mpv issue tracker](https://github.com/mpv-player/mpv/issues).
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.
1. mpv.net version
2. Windows version
3. GPU name
4. Media info

View File

@@ -11,6 +11,11 @@ assignees: stax76
A clear and concise description of what the bug is.
**To Reproduce**
To reproduce, try the last beta version using the CLI option `--config=no`.
In case of an audio or video issue, try to reproduce the issue using mpv instead of mpv.net.
If it can be reproduced with mpv, use the [mpv issue tracker](https://github.com/mpv-player/mpv/issues).
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
@@ -25,3 +30,7 @@ If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.
1. mpv.net version
2. Windows version
3. GPU name
4. Media info

75
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,75 @@
name: mpvnet build
on:
workflow_dispatch:
push:
branches:
- main
- ci
paths-ignore:
- '*.md'
- 'LICENSE'
- '.gitignore'
- '.gitattributes'
- 'docs/**'
- '.github/**'
- 'src/Extensions/**'
pull_request:
branches: [main]
paths-ignore:
- '*.md'
- 'LICENSE'
- '.gitignore'
- '.gitattributes'
- 'docs/**'
- '.github/**'
- 'src/Extensions/**'
jobs:
windows:
name: Windows build
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: >-
base-devel
wget
p7zip
- name: Build
shell: cmd
run: |
cd src
nuget restore
msbuild -restore
msbuild MpvNet.sln /m /p:Configuration=Debug
- name: Create .mo files for localization
shell: pwsh
run: Install-Package Gettext.Tools -Force; .\lang\create-mo-files.ps1
- name: Download libmpv # In principle, only update this binary file when significant feature changes occur in mpv/mpv.net
shell: msys2 {0}
run: |
wget -nv -O libmpv.7z https://downloads.sourceforge.net/mpv-player-windows/mpv-dev-x86_64-20231203-git-f551a9d.7z
7z x -y libmpv.7z -olibmpv
cp -f libmpv/libmpv-2.dll src/MpvNet.Windows/bin/Debug/ || true
- name: Download MediaInfo
shell: msys2 {0}
run: |
wget -nv -O MediaInfo.7z https://mediaarea.net/download/binary/libmediainfo0/23.11/MediaInfo_DLL_23.11_Windows_x64_WithoutInstaller.7z
7z x -y MediaInfo.7z -oMediaInfo
cp -f MediaInfo/MediaInfo.dll src/MpvNet.Windows/bin/Debug/ || true
- name: Download mpvnet.com file
shell: msys2 {0}
run: |
wget -nv -O mpvnet.com https://github.com/mpvnet-player/file-host/releases/download/tag/mpvnet.com.txt
cp -f mpvnet.com src/MpvNet.Windows/bin/Debug/ || true
- name: Upload
uses: actions/upload-artifact@v3
with:
name: "mpv.net-win64"
path: src/MpvNet.Windows/bin/Debug/

9
.tx/config Normal file
View File

@@ -0,0 +1,9 @@
[main]
host = https://app.transifex.com
[o:stax76:p:mpvnet:r:mpvnet]
file_filter = lang/po/<lang>.po
source_file = lang/source.pot
source_lang = en
type = PO

View File

@@ -6,19 +6,12 @@
🎞 mpv.net
==========
mpv.net is a modern desktop media player for Windows based on the popular [mpv](https://mpv.io) player.
mpv.net is a media player for Windows that has a modern GUI.
mpv.net is designed to be mpv compatible, almost all mpv features are available
because they are all contained in libmpv, this means the official
[mpv manual](https://mpv.io/manual/master/) applies to mpv.net.
mpv focuses on the usage of the command line and the terminal,
mpv.net retains the ability to be used from the command line and
the terminal and adds a modern Windows GUI on top of it.
Like mpv, mpv.net is designed for power users, for regular users there is a
[mpv.net-next](https://github.com/mpv-net-player/mpv.net-next)
project under construction.
The player is based on the popular [mpv](https://mpv.io) media player.
mpv.net is designed to be mpv compatible, almost all mpv features are available,
this means the official [mpv manual](https://mpv.io/manual/master/) applies to mpv.net,
differences are documented in the [mpv.net manual](docs/manual.md#differences-compared-to-mpv).
#### Graphical User Interface
@@ -47,11 +40,6 @@ Play controls with a modern flat design.
Leverages the FFmpeg hwaccel APIs to support DXVA2 video decoding acceleration.
#### Active development
mpv.net is under active development.
#### Based on libmpv
mpv.net is based on libmpv which offers a straightforward C API that
@@ -73,11 +61,10 @@ Table of contents
Features that mpv and mpv.net have in common
--------------------------------------------
- Lua and JavaScript Scripting
- Hundreds available user scripts make mpv the most feature rich desktop video player
- Lua and JavaScript Scripting ([awesome-mpv lists a large collection of available user scripts](https://github.com/stax76/awesome-mpv))
- Simple config files that are easy to read and edit
- JSON IPC to control the player with a external programs
- On Screen Controler (OSC, play control buttons) with modern flat design
- On Screen Controller (OSC, play control buttons) with modern flat design
- Command Line Interface
- Started from a terminal status, error and debug output is printed on the terminal
- DXVA2 video decoding acceleration
@@ -90,10 +77,10 @@ Features that mpv and mpv.net have in common
- Build-in media streaming (requires yt-dlp being installed)
- External audio and subtitle files can be loaded manually or automatically
- Screenshot feature
- Watch later feature to save the video position
- Internationalization using gettext and transifex
Features exclusiv to mpv.net
Features exclusive to mpv.net
----------------------------
- Very high degree of mpv compatibility, almost all mpv features are available
@@ -103,26 +90,25 @@ Features exclusiv to mpv.net
- Searchable input (shorcut keys) editor
- C# and PowerShell Scripting
- Global keyboard shortcuts
- Command palette to quickly and easily find commands and keys
- Extension API for .NET languages (C#, VB.NET and F#)
- Portable, MS Store or WinGet download and installation
- File history feature to log time and filename
- Files can be enqueued from File Explorer
## [Support](docs/Manual.md#support)
## [Support](docs/manual.md#support)
[Support section of the manual.](docs/Manual.md#support)
[Support section of the manual.](docs/manual.md#support)
## [Download](docs/Manual.md#download)
## [Download](docs/manual.md#download)
[Download section of the manual.](docs/Manual.md#download)
[Download section of the manual.](docs/manual.md#download)
## [Manual](docs/Manual.md)
## [Manual](docs/manual.md)
[The mpv.net documentation.](docs/Manual.md)
[The mpv.net documentation.](docs/manual.md)
Screenshots
@@ -159,23 +145,3 @@ OSD console and status printed on the terminal.
Searchable key and mouse binding editor.
![Input Editor](docs/img/InputEditor.webp)
#### Command Palette
Command Palette to easily find commands and shortcut keys.
![Command Palette](docs/img/CommandPalette.webp)
#### Playlist
The command palette based playlist showing my favorite artist of the stax record label.
![Playlist](docs/img/Playlist.png)
List of my apps
---------------
https://stax76.github.io/frankskare

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

View File

@@ -1,44 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout>
<row>
<button text="PLAY" ontap="play" />
<button text="PREV" ontap="prev" />
<button text="NEXT" ontap="next" />
<button text="Enter" ontap="enter" />
</row>
<row>
<button text="LEFT" ontap="left" />
<button text="RIGHT" ontap="right" />
<button text="UP" ontap="up" />
<button text="DOWN" ontap="down" />
</row>
<row>
<button text="VOL-" ontap="vol_minus" />
<button text="VOL+" ontap="vol_plus" />
<button text="MUTE" ontap="mute" />
<button text="INFO" ontap="info" />
</row>
<row>
<button text="KP0" ontap="KP0" />
<button text="KP1" ontap="KP1" />
<button text="KP2" ontap="KP2" />
<button text="KP3" ontap="KP3" />
<button text="KP4" ontap="KP4" />
</row>
<row>
<button text="KP5" ontap="KP5" />
<button text="KP6" ontap="KP6" />
<button text="KP7" ontap="KP7" />
<button text="KP8" ontap="KP8" />
<button text="KP9" ontap="KP9" />
</row>
<row>
<button text="Cycle Audio" ontap="KP7" />
<button text="Cycle Subtitle" ontap="KP8" />
<button text="AB LOOP" ontap="ab_loop" />
</row>
<row>
<button text="ZOOM IN" ontap="zoom_in" />
<button text="ZOOM OUT" ontap="zoom_out" />
</row>
</layout>

View File

@@ -1,5 +0,0 @@
meta.name: custom keys
meta.author: stax76
meta.description: custom keys
meta.tags: mpv

View File

@@ -1,106 +0,0 @@
-- https://github.com/unifiedremote/Docs/blob/master/libs/keyboard.md
-- https://github.com/unifiedremote/Docs/blob/master/res/keys.md
local kb = libs.keyboard;
actions.play = function ()
kb.stroke("space");
end
actions.next = function ()
kb.stroke("F12");
end
actions.prev = function ()
kb.stroke("F11");
end
actions.enter = function ()
kb.stroke("enter");
end
actions.left = function ()
kb.stroke("left");
end
actions.right = function ()
kb.stroke("right");
end
actions.up = function ()
kb.stroke("up");
end
actions.down = function ()
kb.stroke("down");
end
actions.vol_minus = function ()
kb.text("-");
end
actions.vol_plus = function ()
kb.text("+");
end
actions.mute = function ()
kb.stroke("m");
end
actions.info = function ()
kb.stroke("i");
end
actions.KP0 = function ()
kb.stroke("num0");
end
actions.KP1 = function ()
kb.stroke("num1");
end
actions.KP2 = function ()
kb.stroke("num2");
end
actions.KP3 = function ()
kb.stroke("num3");
end
actions.KP4 = function ()
kb.stroke("num4");
end
actions.KP5 = function ()
kb.stroke("num5");
end
actions.KP6 = function ()
kb.stroke("num6");
end
actions.KP7 = function ()
kb.stroke("num7");
end
actions.KP8 = function ()
kb.stroke("num8");
end
actions.KP9 = function ()
kb.stroke("num9");
end
actions.ab_loop = function ()
kb.stroke("l");
end
actions.zoom_in = function ()
kb.stroke("ctrl", "oem_plus");
end
actions.zoom_out = function ()
kb.stroke("ctrl", "oem_minus");
end

View File

@@ -1,4 +1,90 @@
# v7.0.0.1 Beta (2023-12-11)
- [.NET 6 is a new requirement](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
(Windows 7 is still supported)
- The command palette was removed because of a compatibility problem with
the .NET 6 platform. There are user scripts with similar functionality:
- [command_palette](https://github.com/stax76/mpv-scripts#command_palette)
- [search_menu](https://github.com/stax76/mpv-scripts#search_menu)
- [uosc](https://github.com/tomasklaen/uosc)
- The blue mpv.net logo was removed for better OSC compatibility.
- Fix message box exceding working area size.
- C# and PowerShell scripting was removed because of a compatibility problem
with the .NET 6 platform. .NET extensions are supported with a new host
(not backward compatible). A example extension is available under \src\MpvNet.Extension\ExampleExtension
- Redesigned bindings and context menu.
- auto-play option removed, mpv supports it with the option reset-on-next-file.
- Dark mode title bar enabled on Windows 10.0.18985 or higher.
- The navigation bar on the left side of the config editor was changed
from a simple list to a tree view.
- Support of the MPVNET_HOME environment variable that allows
customizing the conf directory location.
- Improved support for third party osc scripts like uosc.
- Support of the mpv property `focused`.
- Various improvements and fixes in the input bindings editor.
- Automated nightly portable builds (thx to dyphire).
- Various new or changed default bindings.
- Context menu and message boxes are available in the languages Chinese and German.
Interested joining our translation team?: https://app.transifex.com/stax76/teams/
- Support for encoding mode and thumbfast.
- For script authors, the following info is available in user-data:
user-data/frontend/name=mpv.net
user-data/frontend/version=version name
user-data/frontend/process-path=the process path
- MediaInfo 23.11
- libmpv zhongfly 2023-11-03.
# v6.0.3.2 Beta (2022-10-14)
- Support multiple folders input (regression fix).
- Relative file input paths are converted to absolute paths.
- New history-filter option added to define paths to be excluded from the history log feature.
- New command to move the Window to the screen edge (Alt+Arrow) or center (Alt+BS).
- Smaller OSD media info font size and more duplicated and obvious info removed from titles.
- Improved mouse cursor auto hide behavior.
- Fix severe bug causing termination before scripts having a chance reacting to shutdown event.
- mediainfo v22.09.
- libmpv shinchiro 2022-10-14, fixes a severe bug causing hangs:
https://github.com/mpv-player/mpv/pull/10569
input.conf changes:
New:
```
Alt+Left script-message-to mpvnet move-window left #menu: View > Move > Left
Alt+Right script-message-to mpvnet move-window right #menu: View > Move > Right
Alt+Up script-message-to mpvnet move-window top #menu: View > Move > Top
Alt+Down script-message-to mpvnet move-window bottom #menu: View > Move > Bottom
Alt+BS script-message-to mpvnet move-window center #menu: View > Move > Center
```
# 6.0.3.1 (2022-07-30)
- Creating a playlist from a folder uses absolute normalized paths, non-media files are ignored.
- The show-info command shows directly an advanced view, which was enhanced with a General section and the filename.
- Media info titles are shortened if they contain duplicated or obvious information.
- Support of shortcuts (.lnk files) with media file target.
- Support --audio-file and --sub-file aliases.
- playlist-random (F9 key) command jumps to a random playlist entry.
- Fix OSC hide behavior on mouse move.
- New binding (e key) to show the current file in File Explorer.
- Shift key enables process-instance=multi.
- Command line syntax (preceding double hyphen) is supported in mpv.conf for options implemented by mpv.net.
- MediaInfo v22.06
- libmpv shinchiro 2022-07-30
input.conf changes:
New:
```
e run powershell -command "explorer.exe '/select,' ( \"${path}\" -replace '/', '\\' )" #menu: Tools > Show current file in File Explorer
F9 script-message-to mpvnet playlist-random #menu: Navigate > Random File
```
# 6.0.3.0 (2022-07-03)
- Fix the rare occasion of duplicated playlist entries produced by the auto-load-folder feature.
@@ -11,7 +97,7 @@
# 6.0.1.0 (2022-06-30)
- New tutorial: [Extending mpv and mpv.net via Lua scripting](https://github.com/stax76/mpv.net/wiki/Extending-mpv-and-mpv.net-via-Lua-scripting)
- New tutorial: [Extending mpv and mpv.net via Lua scripting](https://github.com/mpvnet-player/mpv.net/wiki/Extending-mpv-and-mpv.net-via-Lua-scripting)
- New options `autofit-image` and `autofit-audio`, like autofit, but used for image and audio files.
- New [auto-mode](https://github.com/stax76/mpv-scripts) script to use mpv and mpv.net as image viewer and audio player.
- New [smart-volume](https://github.com/stax76/mpv-scripts) script. Records the volume per file in order to restore it
@@ -118,11 +204,11 @@ All occurrences of `script-message mpv.net` were changed to `script-message-to m
- 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
https://github.com/mpvnet-player/mpv.net/blob/main/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
https://github.com/mpvnet-player/mpv.net/blob/main/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
@@ -152,10 +238,10 @@ All occurrences of `script-message mpv.net` were changed to `script-message-to m
- Fix script-opts files being ignored.
- Showing the recent list in the command palette,
the top item gets auto selected.
https://github.com/stax76/mpv.net/issues/328#issuecomment-1057296054
https://github.com/mpvnet-player/mpv.net/issues/328#issuecomment-1057296054
- If the play list is empty, the most recent file
gets loaded when pressing space.
https://github.com/stax76/mpv.net/issues/328#issuecomment-1057296054
https://github.com/mpvnet-player/mpv.net/issues/328#issuecomment-1057296054
- Ctrl+v (previously u) opens files (or URLs) from the clipboard,
previously it had to be a file path (format string) and now
it can also be the clipboard format of type file.
@@ -524,27 +610,27 @@ stable release, no changes since the last beta
https://mpv.io/manual/master/#legacy-option-syntax
- new: PowerShell script host was completely rewritten, events can be assigned
by using `Register-ObjectEvent`, the scripting wiki page was updated
https://github.com/stax76/mpv.net/wiki/Scripting#powershell
https://github.com/mpvnet-player/mpv.net/wiki/Scripting#powershell
- new: Context Menu > View > Show Profiles
https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L147
https://github.com/mpvnet-player/mpv.net/blob/main/mpv.net/Resources/input.conf.txt#L147
- new: Context Menu > View > Show Properties
https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L148
https://github.com/mpvnet-player/mpv.net/blob/main/mpv.net/Resources/input.conf.txt#L148
- new: Context Menu > View > Show Commands
https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L149
https://github.com/mpvnet-player/mpv.net/blob/main/mpv.net/Resources/input.conf.txt#L149
- new: config editor tab is now remembered
- new: osd-duration setting added to config editor and default mpv.conf
- new: external console replaced with internal console, in case mpv.conf is missing it's
generated with correct Hight DPI font size scale settings.
`script-opts=console-scale=<dpiscale>`
https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L150
https://github.com/mpvnet-player/mpv.net/blob/main/mpv.net/Resources/input.conf.txt#L150
https://mpv.io/manual/master/#console
- new: blue color in dark theme is now less intense
https://github.com/stax76/mpv.net/blob/master/Manual.md#color-theme
https://github.com/mpvnet-player/mpv.net/blob/main/Manual.md#color-theme
- new: menu item 'View > Show Progress' (p key) to show progress bar
https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L146
https://github.com/mpvnet-player/mpv.net/blob/main/mpv.net/Resources/input.conf.txt#L146
- new: `script-message mpv.net playlist-first`, unlike mpv does not
restart if the first file is already active
https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L44
https://github.com/mpvnet-player/mpv.net/blob/main/mpv.net/Resources/input.conf.txt#L44
- new: if mpv.net is started from the terminal and an error happens then the error
is printed to the terminal instead of shown with a message box
- fix: update routine did only work when mpv.net was located in 'Program Files'
@@ -561,7 +647,7 @@ stable release, no changes since the last beta
- new: update check, it must be enabled first in the conf editor under General
- new: update feature, requires PowerShell 5 and curl,
an up to date Windows 10 system has both included.
Main menu (input.conf) must be reset or updated manually ([defaults](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt))
Main menu (input.conf) must be reset or updated manually ([defaults](https://github.com/mpvnet-player/mpv.net/blob/main/mpv.net/Resources/input.conf.txt))
- update: libmpv shinchiro 2019-11-10
@@ -570,17 +656,17 @@ stable release, no changes since the last beta
- fix: the file association routine uses no longer 'Play with mpv.net' for the
default open verb caption because it doesn't support multi selection,
it shows now only Open, the manual explains how to get multi selection
in File Explorer, read about it [here](https://github.com/stax76/mpv.net/blob/master/Manual.md#open-with)
in File Explorer, read about it [here](https://github.com/mpvnet-player/mpv.net/blob/main/Manual.md#open-with)
- fix: x86 builds had an older version included because
of a misconfiguration in the solution file
### 5.4.3.0
- new: the color themes can now be customized ([manual](https://github.com/stax76/mpv.net/blob/master/Manual.md#color-theme))
- new: three new sections were added to the [manual](https://github.com/stax76/mpv.net/blob/master/Manual.md):
1. [Color Theme](https://github.com/stax76/mpv.net/blob/master/Manual.md#color-theme)
2. [Hidden and secret features](https://github.com/stax76/mpv.net/blob/master/Manual.md#hidden-and-secret-features)
3. [External Tools](https://github.com/stax76/mpv.net/blob/master/Manual.md#external-tools)
- new: the color themes can now be customized ([manual](https://github.com/mpvnet-player/mpv.net/blob/main/Manual.md#color-theme))
- new: three new sections were added to the [manual](https://github.com/mpvnet-player/mpv.net/blob/main/Manual.md):
1. [Color Theme](https://github.com/mpvnet-player/mpv.net/blob/main/Manual.md#color-theme)
2. [Hidden and secret features](https://github.com/mpvnet-player/mpv.net/blob/main/Manual.md#hidden-and-secret-features)
3. [External Tools](https://github.com/mpvnet-player/mpv.net/blob/main/Manual.md#external-tools)
- fix: window restore from maximized and from minimized was broken
- fix: it's possible to multi select files in File Explorer and press
@@ -600,13 +686,13 @@ stable release, no changes since the last beta
context menu item in explorer with multi selection support use my
[Open with++](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist) shell extension, as far as I know multi selection
can not be done using the Registry but only via shell extension
- window-size mpv property support added ([default bindings](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L137))
- window-size mpv property support added ([default bindings](https://github.com/mpvnet-player/mpv.net/blob/main/mpv.net/Resources/input.conf.txt#L137))
- the config editor keeps profiles and comments in mpv.conf intact!
- the options in the config editor are better organized
### 5.4.2
- new: the [scripting wiki page](https://github.com/stax76/mpv.net/wiki/Scripting#powershell) was improved
- new: the [scripting wiki page](https://github.com/mpvnet-player/mpv.net/wiki/Scripting#powershell) was improved
- new: Toggle Shuffle has been added to the menu defaults
- new: for URLs the media title is shown in the title bar and in the info command
instead of displaying the URL, mpv.conf defaults were changed to use
@@ -674,7 +760,7 @@ stable release, no changes since the last beta
### 5.1
- many [wiki pages](https://github.com/stax76/mpv.net/wiki) were improved
- many [wiki pages](https://github.com/mpvnet-player/mpv.net/wiki) were improved
- the logo/icon had a very small cosmetic change
- the help in the context menu was improved,
for quick access consider the command palette (F1 key)
@@ -708,7 +794,7 @@ stable release, no changes since the last beta
### 5.0
- [changed icon design](https://github.com/stax76/mpv.net/blob/master/img/mpvnet.png)
- [changed icon design](https://github.com/mpvnet-player/mpv.net/blob/main/img/mpvnet.png)
- libmpv was updated to shinchiro 2019-07-14
- new or improved config editor settings: screenshot-directory,
screenshot-format, screenshot-tag-colorspace, screenshot-high-bit-depth,
@@ -727,7 +813,7 @@ stable release, no changes since the last beta
the script is located at startup/scripts
- terminal support added using mpvnet.com !
- script engine performance and error handling was improved
- the [scripting wiki page](https://github.com/stax76/mpv.net/wiki/Scripting) was improved
- the [scripting wiki page](https://github.com/mpvnet-player/mpv.net/wiki/Scripting) was improved
- the C# scripting host extension was converted from VB to C# because it's not
only used for hosting but I also use it now to code and debug script code
- there was a copy paste bug in the file association feature resulting in keys
@@ -797,7 +883,7 @@ stable release, no changes since the last beta
pressed, the files are opened as selected, the order is random though
because Explorer starts multiple mpv.net processes concurrently
- libmpv was updated to shinchiro 2019-06-30
- the [mpv.conf defaults](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/mpv.conf.txt) were changed to show a larger OSC
- the [mpv.conf defaults](https://github.com/mpvnet-player/mpv.net/blob/main/mpv.net/Resources/mpv.conf.txt) were changed to show a larger OSC
- in case a file is opened that has a aspect ratio smaller then 1.2 then
the window size will use a aspect ratio of 1.8
- new JavaScript script osc-visibility.js included in the distribution
@@ -815,7 +901,7 @@ stable release, no changes since the last beta
- invalid command-line arguments were ignored, now an error message is shown
- a description on how to start mpv.net from Google Chrome was added to the
manual, it's useful to play videos from sites like YouTube, find the
description [here](https://github.com/stax76/mpv.net/blob/master/Manual.md#chrome-extension)
description [here](https://github.com/mpvnet-player/mpv.net/blob/main/Manual.md#chrome-extension)
- new config setting remember-height added to remember the window height,
otherwise the video's native resolution is used
- support for protocols other then http added
@@ -830,13 +916,13 @@ stable release, no changes since the last beta
- the playlist is never cleared whenever the control key is down but
files and URLs are appended instead
- powershell script hosting bugs were fixed and a new powershell example script
was added to the [scripting wiki page](https://github.com/stax76/mpv.net/wiki/Scripting#powershell)
was added to the [scripting wiki page](https://github.com/mpvnet-player/mpv.net/wiki/Scripting#powershell)
- the menu entry for the command palette was renamed to 'Show All Commands' and
the default key binding was changed to F1 which is also the default in VS Code
- the default key binding of the Everything media search was changed to F3
- support for the mpv property 'border' was added to the config editor
to show/hide the window decoration (titlebar, border). A toggle menu item and
key binding (b) was added as well ([Default Binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L135))
key binding (b) was added as well ([Default Binding](https://github.com/mpvnet-player/mpv.net/blob/main/mpv.net/Resources/input.conf.txt#L135))
### 4.3.1
@@ -851,7 +937,7 @@ stable release, no changes since the last beta
- the help and layout in the config editor was improved
- clipboard monitoring for URLs can be disabled in the settings
- the context menu has a new feature: Open > Add files to playlist,
it appends files to the playlist [(Default binding)](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L33)
it appends files to the playlist [(Default binding)](https://github.com/mpvnet-player/mpv.net/blob/main/mpv.net/Resources/input.conf.txt#L33)
- a setting was added to force using a single mpv.net process instance
### 4.1
@@ -865,8 +951,7 @@ stable release, no changes since the last beta
### 4.0
- on the start screen the mpv.NET icon is shown instead of the mpv icon,
feedback and contributions regarding the icon are welcome! The paint.net
pdn and png source is located [here](https://github.com/stax76/mpv.net/tree/master/img)
feedback and contributions regarding the icon are welcome!
- everytime only one file is opened the complete folder is loaded in the playlist
- the info command (i key) shows the audio format
- new options osd-font-size, sub-font, sub-font-size
@@ -893,7 +978,7 @@ stable release, no changes since the last beta
- there was a bug that caused underscores beeing removed from input like MBTN_LEFT_DBL
- the search clear button in the input editor had a render issue in dark mode
- new search feature added to search and play media files, requires
[Everything](https://www.voidtools.com) to be installed. [Default Binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L29)
[Everything](https://www.voidtools.com) to be installed. [Default Binding](https://github.com/mpvnet-player/mpv.net/blob/main/mpv.net/Resources/input.conf.txt#L29)
### 3.5
@@ -906,6 +991,6 @@ stable release, no changes since the last beta
### 3.4
- new feature added to manage file associations from within the app. It can be found in the menu at: Tools > Manage... [Default Binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L149)
- new feature added to manage file associations from within the app. It can be found in the menu at: Tools > Manage... [Default Binding](https://github.com/mpvnet-player/mpv.net/blob/main/mpv.net/Resources/input.conf.txt#L149)
- new zip download option added
- new x86 download option added

Binary file not shown.

Before

Width:  |  Height:  |  Size: 672 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

View File

@@ -2,7 +2,7 @@
mpv.net manual
==============
**ENGLISH** | **[简体中文](Manual_chs.md)**
**ENGLISH** | **[简体中文](manual_chs.md)**
Table of contents
-----------------
@@ -13,7 +13,6 @@ Table of contents
* [Support](#support)
* [Settings](#settings)
* [Input and context menu](#input-and-context-menu)
* [Command Palette](#command-palette)
* [Command Line Interface](#command-line-interface)
* [Terminal](#terminal)
* [mpv.net specific commands](#mpvnet-specific-commands)
@@ -25,26 +24,19 @@ Table of contents
* [Advanced Features](#advanced-features)
* [Hidden Features](#hidden-features)
* [Differences compared to mpv](#differences-compared-to-mpv)
* [Technical Overview](#technical-overview)
* [Environment Variables](#environment-variables)
* [Context Menu Commands](#context-menu)
About
-----
mpv.net is a modern desktop media player for Windows based on the popular mpv player.
mpv.net is a media player for Windows that has a modern GUI.
mpv.net is designed to be mpv compatible, almost all mpv features are available
because they are all contained in libmpv, this means the official
[mpv manual](https://mpv.io/manual/master/) applies to mpv.net.
mpv focuses on the usage of the command line and the terminal,
mpv.net retains the ability to be used from the command line and
the terminal and adds a modern Windows GUI on top of it.
Like mpv, mpv.net is designed for power users, for regular users there is a
[mpv.net-next](https://github.com/mpv-net-player/mpv.net-next)
project under construction.
The player is based on the popular [mpv](https://mpv.io) media player.
mpv.net is designed to be mpv compatible, almost all mpv features are available,
this means the official [mpv manual](https://mpv.io/manual/master/) applies to mpv.net,
differences are documented in this manual under [Differences compared to mpv](#differences-compared-to-mpv).
Download
@@ -52,22 +44,28 @@ Download
1. [Stable via Microsoft Store](https://www.microsoft.com/store/productId/9N64SQZTB3LM)
2. [Stable and beta via GitHub download](../../../releases)
2. [Stable and beta portable via GitHub download](../../../releases)
3. `winget install mpv.net`
3. Stable via command line from Microsoft Store: `winget install mpv.net`
4. [Automated nightly portable builds](https://github.com/mpvnet-player/mpv.net/actions)
[Changelog](changelog.md)
[Changelog](Changelog.md)
Installation
------------
mpv.net requires the .NET Framework 4.8 and Windows 7 or higher and a modern graphics card.
1. Windows 7 or higher is required (Windows 10 or higher is recommended).
2. mpv.net since version 7.0 requires the
[.NET Desktop Runtime 6.0](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
being installed. mpv.net before version 7.0 requires .NET Framework 4.8.
Internet streaming requires:
- Downloading [yt-dlp](https://github.com/yt-dlp/yt-dlp) and adding its folder
to the [user environment variable PATH](https://www.google.com/search?q=user+environment+variable+PATH).
- In case of proxy server usage, [manual configuration](https://github.com/stax76/mpv.net/issues/401).
- In case of proxy server usage, [manual configuration](https://github.com/mpvnet-player/mpv.net/issues/401).
#### File Associations
@@ -90,12 +88,21 @@ the files are opened in mpv.net in random order, this works with maximum 15 file
Support
-------
Before making a support request, please try the newest version first.
Before making a support request, please try the newest [beta version](../../../releases) first.
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.
Support can be requested here:
Or use the [support thread](https://forum.videohelp.com/threads/392514-mpv-net-a-extendable-media-player-for-windows) in the VideoHelp forum.
Beginner questions:
https://www.reddit.com/r/mpv
mpv.net bug reports, feature requests and advanced questions:
https://github.com/mpvnet-player/mpv.net/issues
Advanced mpv questions:
https://github.com/mpv-player/mpv/issues
Settings
@@ -114,14 +121,6 @@ mpv.net options are documented [here](#mpvnet-specific-options).
Input and context menu
----------------------
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 default values.
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
items. The only way to get an up-to-date menu is either resetting the menu by
deleting input.conf or updating it by manually editing input.conf.
Global keyboard shortcuts are supported via global-input.conf file.
The config folder can be opened from the context menu: `Settings > Open Config Folder`
@@ -130,50 +129,35 @@ A input and config editor can be found in the context menu under 'Settings'.
The input test mode can be started via command line: --input-test
The input key list can be printed with --input-keylist or
shown from the context menu under: View > Advanced > Show Keys
The input key list can be printed with --input-keylist
mpv.net input.conf defaults:
https://github.com/stax76/mpv.net/blob/master/src/Resources/input.conf.txt
mpv input.conf defaults:
mpv input.conf defaults:
https://github.com/mpv-player/mpv/blob/master/etc/input.conf
mpv input commands:
mpv input commands:
https://mpv.io/manual/master/#list-of-input-commands
mpv input options:
mpv input options:
https://mpv.io/manual/master/#input
Before version v7 all bindings and the context menu definition
was contained in the input.conf file, which mpv.net created
in case it didn't exist. This had the disadvantage that mpv.net
lost control over all default bindings and the context menu
defaults. This was unfortunate, v7 introduces a new design
fixing it.
Command Palette
---------------
In v7 no input.conf file is created, the default bindings and
context menu is defined internally. input.conf only contains
what is different from the internally defined defaults,
so it's the same how mpv is used.
The command palette is designed to quickly find,
select and execute commands.
For backward compatibility the old input.conf format with the
menu definition using `#menu: ` is still supported. The new
design also allows for a menu customization, in a sub section
called `Custom`. In input.conf it can be defined like so:
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. |
`Ctrl+a show-text Test #custom-menu: Test > Test`
Command Line Interface
@@ -201,11 +185,6 @@ Supported are all mpv properties, they are documented here:
https://mpv.io/manual/master/#properties
mpv.net has a feature to list all available properties:
_Context Menu > View > Advanced > Show Properties_
mpv has a few non property based switches which are generally not supported in mpv.net.
@@ -225,15 +204,15 @@ mpv.net specific commands
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.
### move-window [left|top|right|bottom|center]
Moves the Window to the screen edge (Alt+Arrow) or center (Alt+BS).
### open-conf-folder
Opens the config folder with Windows File Explorer.
@@ -258,33 +237,12 @@ or multiple files in the file clipboard format.
Cycles the pause property. In case the playlist is empty,
the most recent file from the recent files list is loaded.
### playlist-add \<integer\>
Changes the playlist position by adding the supplied integer value.
If the position goes out of range, it jumpes to the opposite end.
### 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.
### quick-bookmark
On the first press a bookmark is saved, on the second
press it is restored and removed. When a new file is
loaded the bookmark is removed.
### reg-file-assoc \<audio|video|image\>
Registers the file associations.
### scale-window \<factor\>
Decreases or increases the Window size.
### select-profile
Shows the command palette to select a profile.
### shell-execute \<file|URL\>
Shell executes a single file or URL.
@@ -294,18 +252,8 @@ 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-chapters
Shows chapters in the command palette.
### show-command-palette
Shows the command palette.
### show-commands
Shows available mpv imput commands.
Shows available [mpv input commands](https://mpv.io/manual/master/#list-of-input-commands).
### show-conf-editor
Shows the conf editor.
@@ -316,28 +264,18 @@ Shows available decoders.
### show-demuxers
Shows available demuxers.
### show-history
Shows the history file when existing.
### show-info
Shows media info on screen, a second key press shows more detailed media 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.
Shows media info in a messsage box.
**editor**
Shows media info in the text editor.
Shows media info in a text editor.
**osd**
Displays media info on screen.
Shows media info on screen.
**full**
Shows fully detailed media info.
@@ -349,30 +287,17 @@ Shows media info with raw property names.
Shows the context menu.
### show-playlist
Shows the playlist in the command palette
and allows to play the selected entry.
Shows the playlist in a message box. For a playlist menu
the following user scripts exist:
- https://github.com/stax76/mpv-scripts#command_palette
- https://github.com/stax76/mpv-scripts#search_menu
- https://github.com/tomasklaen/uosc
- https://github.com/jonniek/mpv-playlistmanager
### show-profiles
Shows available profiles with a message box.
### show-progress
Shows a simple OSD progress message with time and date.
### 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.
@@ -461,12 +386,6 @@ are used as defined by autofit and start-size. Default: 1500
#### --auto-load-folder=\<yes|no\>
For single files automatically load the entire directory into the playlist.
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
@@ -475,10 +394,12 @@ playback automatically resumes.
Defines if more then one mpv.net process is allowed.
Tip: Whenever the CTRL key is pressed when files or URLs are opened,
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.
This not only works on process startup but in all mpv.net features that open files and URLs.
Multi can alternatively be enabled by pressing the SHIFT key.
**multi**
Create a new process everytime the shell starts mpv.net.
@@ -515,6 +436,14 @@ Enable this only when a developer asks for it. Default: no
### UI
#### --language=\<value\>
User interface display language.
mpv.net must be restarted after a change.
Interested joining our translation team?:
https://app.transifex.com/stax76/teams/
#### --dark-mode=\<value\>
Enables a dark theme.
@@ -539,14 +468,6 @@ Color theme used in light mode. Default: light
[Color Themes](#color-theme)
#### --show-logo=\<yes|no\>
Draws the blue mpv.net logo ontop of the native OSC logo. Default: yes
#### --show-santa-logo=\<yes|no\>
Draws the blue mpv.net logo with a santa hat in december,
the option is called greenandgrumpy in mpv. Default: yes
External Tools
--------------
@@ -572,31 +493,6 @@ Alternatively the Chrome/Firefox extension [Open With](../../../issues/119) can
[Open with++](https://github.com/stax76/OpenWithPlusPlus) can be used to extend the File Explorer context menu to get menu items for [Play with mpv.net](https://github.com/stax76/OpenWithPlusPlus#play-with-mpvnet) and [Add to mpv.net playlist](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist).
### Universal Remote Android app
Universal Remote is Android remote control app which costs 5 €.
https://www.unifiedremote.com
https://play.google.com/store/apps/details?id=com.Relmtech.Remote
https://play.google.com/store/apps/details?id=com.Relmtech.RemotePaid
https://www.unifiedremote.com/tutorials/how-to-create-a-custom-keyboard-shortcuts-remote
https://www.unifiedremote.com/tutorials/how-to-install-a-custom-remote
[My config](./Universal%20Remote)
Very useful is the Universal Remote File Browser feature.
### One For All Contour URC1210 and FLIRC USB
My primary remote control solution however is a One For All Contour URC1210
using Philips code 0556 together with FLIRC USB (gen2).
### External Application Button
Videos can be streamed or downloaded easily with the Chrome extension
@@ -614,93 +510,30 @@ Scripting
A very large collection of Lua user scripts can be found in the mpv wiki [here](https://github.com/mpv-player/mpv/wiki/User-Scripts).
Lua scripting is documented in the mpv.net wiki [here](https://github.com/stax76/mpv.net/wiki/Extending-mpv-and-mpv.net-via-Lua-scripting).
Lua scripting is documented in the mpv.net wiki [here](https://github.com/mpvnet-player/mpv.net/wiki/Extending-mpv-and-mpv.net-via-Lua-scripting).
#### JavaScript
[mpv JavaScript documentation](https://mpv.io/manual/master/#javascript)
#### PowerShell
Location: `<config folder>\scripts-ps`
The PowerShell scripting host is not initialized before media files are loaded.
[Example Scripts](../../../tree/master/src/Scripts)
#### C#
Location: `<config folder>\scripts-cs`
There are no compatibility guaranties.
Script code can be written within a C# [extension](../../../tree/master/src/Extensions),
that way full code completion and debugger support is available.
Once the code was developed and debugged, it can be moved
from the extension to a lightweight standalone script.
The script host uses an old C# version, modern features
like string interpolation are not available.
There are synchronous and asynchronous events, prefer asynchronous events
and don't block synchronous events and observed properties, as it would
block the main event loop.
The C# scripting host is like [extensions](../../../tree/master/src/Extensions)
not initialized before media files are loaded.
[Example Scripts](../../../tree/master/src/Scripts)
Extensions
----------
Extensions are located in a subfolder _extensions_ in the config folder
and the filename must have the same name as the directory:
Extensions are located in a subfolder _extensions_ in the config folder,
the filename must have the same name as the directory:
```Text
<config folder>\extensions\ExampleExtension\ExampleExtension.dll
```
There are synchronous and asynchronous events, prefer asynchronous events
and don't block synchronous events and observed properties, as it would
block the main event loop.
### Walkthrough creating an extension
- Download and install [Visual Studio Community](https://visualstudio.microsoft.com).
- Create a new project of type **Class Library .NET Framework**
and ensure the project name ends with **Extension**.
- Add a reference to **System.ComponentModel.Composition**.
- Add a reference to mpvnet.exe, select the mpvnet reference
in the Solution Explorer, open the Properties window and set
**Copy Local** to false to prevent mpvnet.exe being copied
to the output directory when the project is built.
- Now open the project properties and set the output path in the Build tab,
extensions are like scripts located in your config folder, example:
`<config folder>\extensions\ExampleExtension\ExampleExtension.dll`
- Also in the project properties choose the option **Start external program**
in the Debug tab and define the path to mpvnet.exe. In the Debug tab you may also
define command line arguments like a video file to be played when you start debugging.
### Sample Code
#### RatingExtension
This extension writes a rating to the filename of rated videos when mpv.net shuts down.
The input.conf defaults contain key bindings for this extension to set ratings.
[Source Code](../../../tree/master/src/Extensions)
Color Theme
-----------
mpv.net supports custom color themes, the definition of the built-in themes can be found at:
[theme.txt](../../../tree/master/src/Resources/theme.txt)
[theme.txt](../../../tree/main/src/Resources/theme.txt)
Custom themes can be saved at:
@@ -735,21 +568,18 @@ Selecting multiple files in File Explorer and pressing enter will
open the files in mpv.net. Explorer restricts this to maximum 15 files
and the order will be random.
Whenever the control key is pressed when files or URLs are opened,
the playlist is not cleared but the files or URLs are appended to the playlist.
This works in all mpv.net features that open files or URLs.
Pressing the shift key while opening a single file will suppress loading
all files of the folder into the playlist.
In fullscreen mode clicking the top right corner closes the player.
Differences compared to mpv
---------------------------
mpv.net is designed to work exactly like mpv, there are a few limitations:
mpv.net is designed to work exactly like mpv, there are a few
differences and limitations:
The settings folder is named `mpv.net` instead of `mpv`:
`C:\Users\username\AppData\Roaming\mpv.net`
### Window Limitations
@@ -759,6 +589,18 @@ features are supported that have an own implementation in mpv.net.
A window free mode is currently not supported, the main window is always
visible, even when mpv.net is started from the terminal and music is played.
For mpv.net it's currently not possible to find out where OSC menus are located,
but there are 3 features that require this information, therefore mpv.net
makes the assumption that near the window borders might be OSC menus. As a result
the following three features, work only when invokes from the center of the window:
1. Window dragging (moving the window with the mouse).
2. Showing the context menu.
3. Auto hiding the mouse cursor.
When the mouse is near a window border, these 3 features are not available.
The dead zone sizes are 10% left, top, right and 22% bottom.
The documentation of mpv's window features can be found here:
https://mpv.io/manual/master/#window
@@ -823,36 +665,20 @@ mpv.net specific options are saved in the file mpvnet.conf and are just
as mpv properties available on the command line.
Technical Overview
------------------
Environment Variables
---------------------
mpv.net is written in C# 7 and runs on the .NET Framework 4.8.
### MPVNET_HOME
The Extension implementation is based on the
[Managed Extensibility Framework](https://docs.microsoft.com/en-us/dotnet/framework/mef/).
Directory where mpv.net looks for user settings.
The main window is WinForms based because WinForms allows better libmpv integration
compared to WPF, all other windows are WPF based.
### MPVNET_VERSION
Third party components are:
- [libmpv provides the core functionality](https://mpv.io/)
- [MediaInfo](https://mediaarea.net/en/MediaInfo)
Returns the version of mpv.net.
Context Menu
------------
The context menu of mpv.net is defined in the file input.conf which is
located in the config directory.
If the input.conf file does not exists mpv.net generates it with the following defaults:
<https://github.com/stax76/mpv.net/tree/master/src/Resources/input.conf.txt>
input.conf defines mpv's key and mouse bindings and mpv.net uses
comments to define the context menu.
Context Menu Commands
---------------------
### Open > Open Files
@@ -863,12 +689,6 @@ File Explorer for existing associations.
A third way is to drag and drop files on the main window.
Whenever the control key is pressed when files or URLs are opened,
the playlist is not cleared but the files or URLs are appended to the
playlist. This works in all mpv.net features that open files or URLs.
Pressing the shift key while opening a single file will suppress loading all files in the folder.
Blu-ray and DVD ISO image files are supported.
@@ -1209,7 +1029,7 @@ Cycles the aspect ratio using the following command:
[video-aspect property](https://mpv.io/manual/master/#command-interface-video-aspect)
### Audio > Cycle/Next
### Audio > Next
This uses a mpv.net command that shows better info then the mpv preset
and also has the advantage of not showing no audio.
@@ -1237,17 +1057,6 @@ Adds a negative audio delay using the following command:
[audio-delay property](https://mpv.io/manual/master/#options-audio-delay)
### Subtitle > Cycle/Next
Shows the next subtitle track using the following command:
`cycle sub`
[cycle command](https://mpv.io/manual/master/#command-interface-cycle-%3Cname%3E-[%3Cvalue%3E])
[sub/sid property](https://mpv.io/manual/master/#options-sid)
### Subtitle > Toggle Visibility
Cycles the subtitle visibility using the following command:
@@ -1329,7 +1138,7 @@ Increases the subtitle font size using the following command:
Increases the volume using the following command:
`add volume 10`
`add volume 2`
[add command](https://mpv.io/manual/master/#command-interface-add-%3Cname%3E-[%3Cvalue%3E])
@@ -1340,7 +1149,7 @@ Increases the volume using the following command:
Decreases the volume using the following command:
`add volume -10`
`add volume -2`
[add command](https://mpv.io/manual/master/#command-interface-add-%3Cname%3E-[%3Cvalue%3E])
@@ -1413,11 +1222,6 @@ Resets the speed using the following command:
[speed property](https://mpv.io/manual/master/#options-speed)
### Extensions > Rating > 0stars
A plugin the writes the rating to the filename.
### View > On Top > Enable
Forces the player to stay on top of other windows using the following command:
@@ -1472,24 +1276,6 @@ Toggles OSC Visibility using the following command:
[script-binding command](https://mpv.io/manual/master/#command-interface-script-binding)
### View > Show Playlist
Shows the playlist for 5 seconds using the following command:
`show-text ${playlist} 5000`
[show-text command](https://mpv.io/manual/master/#command-interface-show-text)
### View > Show Audio/Video/Subtitle List
Shows the Audio/Video/Subtitle list for 5 seconds using the following command:
`show-text ${track-list} 5000`
[show-text command](https://mpv.io/manual/master/#command-interface-show-text)
### Settings > Show Config Editor
Shows mpv.net's config editor.
@@ -1512,23 +1298,6 @@ input.conf containing mpv key and mouse bindings
User scripts and user extensions
### Tools > Command Palette
Shows the command palette window which allows to quickly find and execute commands and key shortcuts.
### Tools > Show History
Shows a text file that contains the file history. If the file don't exist
it asks if the file should be created in the settings folder. Once the file
exist then the history is logged. It logges the playback history containing
the time and filename.
To ignore certain paths:
script-opt = history-discard=path1;path2
### Tools > Set/clear A-B loop points
Enables to set loop start and end points using the following command:
@@ -1572,12 +1341,12 @@ Shows the [mpv manual](https://mpv.io/manual/stable/).
### Help > Show mpv.net web site
Shows the [mpv.net web site](https://mpv-net.github.io/mpv.net-web-site/).
Shows the [mpv.net web site](https://github.com/mpvnet-player/mpv.net).
### Help > Show mpv.net manual
Shows the [mpv.net manual](https://github.com/stax76/mpv.net/blob/master/Manual.md).
Shows the [mpv.net manual](https://github.com/mpvnet-player/mpv.net/blob/main/manual.md).
### Help > About mpv.net

View File

@@ -2,7 +2,7 @@
mpv.net手册
==============
适配版本 [v6.0.0.0-beta](https://github.com/stax76/mpv.net/releases/tag/v6.0.0.0-beta)
适配版本 [Master_commit_220819](https://github.com/mpvnet-player/mpv.net/commit/22960af78b7e1b7255954d845b3d378330aa449b)
**[ENGLISH](Manual.md)** | **简体中文**
@@ -36,13 +36,11 @@ mpv.net手册
mpv.net是基于受欢迎的mpv的Windows现代媒体播放器。
mpv.net出于兼容mpv而设计几乎所有mpv的功能都可用因为它们都包含在libmpv中
这意味着[mpv官方手册](https://mpv.io/manual/master/) 也适用于mpv.net。
mpv.net出于兼容mpv而设计几乎所有mpv的功能都可用因为它们都包含在libmpv中这意味着[mpv官方手册](https://mpv.io/manual/master/) 也适用于mpv.net。
mpv专注命令行与终端的使用而mpv.net保留了这些并加入了现代化的图形界面。
与mpv一样mpv.net也是为高级用户设计的,对于普通用户,
有一个正在建设中的 [mpv.net-next](https://github.com/mpv-net-player/mpv.net-next) 项目。
与mpv一样mpv.net也是为高级用户设计的
下载
@@ -65,36 +63,39 @@ mpv.net需要.NET Framework 4.8运行库和高于win7版本的系统以及一张
互联网流媒体需要:
- 下载[yt-dlp](https://github.com/yt-dlp/yt-dlp)并将其添加到[用户环境变量PATH](https://www.google.com/search?q=user+environment+variable+PATH)
- 在使用代理服务器的情况下,需要[手动配置](https://github.com/stax76/mpv.net/issues/401)。
- 在使用代理服务器的情况下,需要[手动配置](https://github.com/mpvnet-player/mpv.net/issues/401)。
#### 文件关联
可以使用上下文菜单注册文件关联。 'Settings > Setup'
注册完文件关联后,进入 "Windows设置 > 应用 > 默认应用" (Win+I, ms-settings:defaultapps)
然后选择mpv. net作为视频/音频/图像的默认程序。
注册完文件关联后,进入 "Windows设置 > 应用 > 默认应用" (Win+I, ms-settings:defaultapps) 然后选择mpv. net作为视频/音频/图像的默认程序。
另一种注册文件关联的方式是使用文件资源管理器,选中媒体文件后,
选择上下文菜单的 '打开方式 > 选择其它应用' 。
另一种注册文件关联的方式是使用文件资源管理器,选中媒体文件后,选择上下文菜单的 '打开方式 > 选择其它应用' 。
[Open with++](#open-with) 可用来扩展资源管理器的上下文菜单
[Play with mpv.net](https://github.com/stax76/OpenWithPlusPlus#play-with-mpvnet) 和
[Add to mpv.net playlist](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist).
可用来获取 'Play with mpv.net' 和 'Add to mpv.net playlist' 的菜单子项
[Open with++](#open-with) 可用来扩展资源管理器的上下文菜单。[Play with mpv.net](https://github.com/stax76/OpenWithPlusPlus#play-with-mpvnet) 和 [Add to mpv.net playlist](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist) 可用来获取 'Play with mpv.net' 和 'Add to mpv.net playlist' 的菜单子项
当在资源管理器中选择多个文件并按 enter 键时文件会在mpv.net随机排序打开
最多限制15个文件。
当在资源管理器中选择多个文件并按 enter 键时文件会在mpv.net随机排序打开最多限制15个文件。
支持
-------
在提出支持请求之前,先尝试最新的测试版
在提出支持请求之前,先尝试最新的 [测试版](../../../releases)
程序错误和功能请求可以在github的 [问题追踪](../../../issues) 上提出,
任何与mpv. net相关的东西都可以使用欢迎提交使用上出现的问题。
可以在这些地方请求支持:
或者浏览VideoHelp论坛的 [讨论帖](https://forum.videohelp.com/threads/392514-mpv-net-a-extendable-media-player-for-windows)
初学者提问:
https://www.reddit.com/r/mpv
mpv.net的错误报告、功能请求和高级问题
https://github.com/mpvnet-player/mpv.net/issues
高级的mpv问题
https://github.com/mpv-player/mpv/issues
设置
@@ -105,20 +106,15 @@ mpv.net在以下路径寻找设置文件夹
1. <程序启动目录>\portable_config
2. %APPDATA%\mpv.net (`C:\Users\%USERNAME%\AppData\Roaming\mpv.net`)
mpv的选项保存在mpv.conf文件中
mpv.net的专属选项保存在 mpvnet.conf 文件中,
参数解释请参阅 [此处](#mpvnet的专属选项)
mpv的选项保存在mpv.conf文件中mpv.net的专属选项保存在 mpvnet.conf 文件中,参数解释请参阅 [此处](#mpvnet的专属选项)
快捷键和上下文菜单
----------------------
键鼠的快捷键和上下文菜单的操作保存在 input.conf 文件中,
如果设置目录中不存在mpv.net会用默认值生成它。
键鼠的快捷键和上下文菜单的操作保存在 input.conf 文件中,如果设置目录中不存在mpv.net会用默认值生成它。
请注意,一旦 input.conf 存在, mpv.net 就不能更新它,这意味着当 mpv.net 升级了
新的版本或改变了的默认菜单项时,菜单条目就会过时。获得最新菜单的唯一方法是
通过删除 input.conf 来重置菜单,或者通过手动编辑 input.conf 来更新它。
请注意,一旦 input.conf 存在, mpv.net 就不能更新它,这意味着当 mpv.net 升级了新的版本或改变了的默认菜单项时,菜单条目就会过时。获得最新菜单的唯一方法是通过删除 input.conf 来重置菜单,或者通过手动编辑 input.conf 来更新它。
通过 global-input.conf 文件支持全局热键。
@@ -128,11 +124,10 @@ input 和 config editor 可以在上下文菜单的该条目中找到 'Settings'
输入测试模式可以通过命令行启动: --input-test
输入的键位列表可由该参数输出 --input-keylist
或从上下文菜单的该条目获取 `View > Advanced > Show Keys`
输入的键位列表可由该参数输出 --input-keylist 或从上下文菜单的该条目获取 `View > Advanced > Show Keys`
mpv.net的默认input.conf文件
https://github.com/stax76/mpv.net/blob/master/src/Resources/input.conf.txt
https://github.com/mpvnet-player/mpv.net/blob/master/src/Resources/input.conf.txt
mpv的默认input.conf文件
https://github.com/mpv-player/mpv/blob/master/etc/input.conf
@@ -230,6 +225,9 @@ mpv.net命令可在mpv命令不存在或缺乏某种功能时使用。
### load-sub
显示一个资源管理器的对话框来加载外部字幕文件。
### move-window [left|top|right|bottom|center]
将窗口移动到屏幕边缘 (Alt+方向键) 或中心 (Alt+Backspace)。
### open-conf-folder
用Windows资源管理器打开配置文件夹。
@@ -237,12 +235,10 @@ mpv.net命令可在mpv命令不存在或缺乏某种功能时使用。
**append**
追加文件到播放列表中。
打开一个资源管理器的对话框,以便选择要打开的文件。资源管理器的对话框
支持多选以一次性加载多个文件。按住CTRL键可以将这些文件追加到播放列表中。
打开一个资源管理器的对话框,以便选择要打开的文件。资源管理器的对话框支持多选以一次性加载多个文件。按住CTRL键可以将这些文件追加到播放列表中。
### open-optical-media
显示一个资源管理器的对话框来打开一个DVD或BD文件夹。ISO镜像不需要被挂载
但可以直接用 open-files 命令打开。
显示一个资源管理器的对话框来打开一个DVD或BD文件夹。ISO镜像不需要被挂载但可以直接用 open-files 命令打开。
### open-clipboard
从剪贴板打开单个的URL或文件路径或以文件剪贴板中的格式打开多个文件。
@@ -259,9 +255,11 @@ mpv.net命令可在mpv命令不存在或缺乏某种功能时使用。
### playlist-last
跳转到播放列表的最后一个条目,如果加载的文件已经是最后一个条目,则无动作。
### playlist-random
跳转到播放列表的任一条目。
### quick-bookmark
第一次触发时,书签被保存,第二次触发时,它被恢复并移除。当加载新文件时,
书签也会被移除。
第一次触发时,书签被保存,第二次触发时,它被恢复并移除。当加载新文件时,书签也会被移除。
### reg-file-assoc \<audio|video|image\>
注册文件关联。
@@ -269,6 +267,9 @@ mpv.net命令可在mpv命令不存在或缺乏某种功能时使用。
### scale-window \<factor\>
减小或增大窗口的尺寸。
### select-profile
显示命令面板以选择一个profile。
### shell-execute \<file|URL\>
Shell执行单个文件或URL。
@@ -281,6 +282,9 @@ Shell执行单个文件或URL。
### show-audio-tracks
在命令面板中显示可用的音轨,并允许加载选中的音轨。
### show-chapters
在命令面板中显示章节。
### show-command-palette
显示命令面板。
@@ -299,9 +303,6 @@ Shell执行单个文件或URL。
### show-history
显示已有的历史文件。
### show-info
在屏幕上显示mediainfo第二次触发可显示更详细的媒体信息。
### show-input-editor
显示器快捷键编辑器。
@@ -362,15 +363,19 @@ mpv.net的专属选项
这些专属选项被修改后被保存在 mpvnet.conf 文件中。
#### --autofit-audio \<integer\>
音频文件的初始窗口高度以百分比为单位。默认70
#### --autofit-image \<integer\>
图片文件的初始窗口高度以百分比为单位。默认80
#### --queue \<files\>
添加文件到播放列表,需要设置 [--process-instance=single](#--process-instancevalue) 。
也可以在资源管理器中使用 [Open with++](#open-with) 添加文件。
添加文件到播放列表,需要设置 [--process-instance=single](#--process-instancevalue) 。也可以在资源管理器中使用 [Open with++](#open-with) 添加文件。
#### --command=\<input command\>
通过命令行向正在运行的mpv.net实例发送输入命令例如使用 AutoHotkey 创建
全局热键,必须设置 [process-instance=single](#--process-instancevalue) 。
通过命令行向正在运行的mpv.net实例发送输入命令例如使用 AutoHotkey 创建全局热键,必须设置 [process-instance=single](#--process-instancevalue) 。
### Audio
@@ -407,16 +412,14 @@ mpv.net的专属选项
始终记住大小。
#### --start-threshold=\<milliseconds\>
在显示窗口之前等待libmpv返回视频分辨率的阈值毫秒
否则将使用由 --autofit 和 --start-size 定义的初始大小。默认1500
#### --minimum-aspect-ratio=\<float\>
最小宽高比,如果窗口宽高比小于定义的值,那么将窗口宽高比设置为16/9
这避免了音乐封面的方形窗口。默认1.2
最小宽高比,如果窗口宽高比小于定义的值,那么将窗口宽高比将被强制设为该值
#### --minimum-aspect-ratio-audio=\<float\>
同上但仅用于音频文件。
#### --remember-window-position=\<yes|no\>
@@ -424,6 +427,11 @@ mpv.net的专属选项
在退出时保存窗口的位置。默认no
#### --start-threshold=\<milliseconds\>
在显示窗口之前等待libmpv返回视频分辨率的阈值毫秒否则将使用由 --autofit 和 --start-size 定义的初始大小。默认1500
### Playback
#### --auto-load-folder=\<yes|no\>
@@ -442,8 +450,9 @@ mpv.net的专属选项
定义是否允许多个 mpv.net 进程。
提示:当打开文件或 url 时只要按下CTRL键就不会清除当前的播放列表
而只将文件或 url 追加到列表中。这不仅适用于进程启动,也适用于所有打开文件和 url 的功能。
当打开文件或 url 时只要按下CTRL键就不会清除当前的播放列表而只将文件或 url 追加到列表中。这不仅适用于进程启动,也适用于所有打开文件和 url 的功能。
也可以通过按住SHIFT键来启动多个进程。
**multi**
每次从 shell 启动 mpv.net 时创建一个新进程。
@@ -464,6 +473,9 @@ mpv.net的专属选项
使用MediaInfo而不是mpv来访问媒体信息。默认yes
#### --history-filter
要从历史日志功能中排除的路径的分号分隔列表。
#### --video-file-extensions=\<string\>
@@ -530,17 +542,13 @@ mpv.net的专属选项
### Play with mpv
[Play with mpv](https://chrome.google.com/webstore/detail/play-with-mpv/hahklcmnfgffdlchjigehabfbiigleji)
是一个支持调用mpv播放YouTube等网站视频的谷歌浏览器的扩展。
[Play with mpv](https://chrome.google.com/webstore/detail/play-with-mpv/hahklcmnfgffdlchjigehabfbiigleji) 是一个支持调用mpv播放YouTube等网站视频的谷歌浏览器的扩展。
由于Chrome扩展无法启动一个应用程序需要另一个与扩展程序通信的应用程序该程序可以从
[此处](http://www.mediafire.com/file/lezj8lwqt5zf75v/play-with-mpvnet-server.7z/file)下载。
只有当该程序运行时扩展才能正常工作,为了让应用程序始终运行,应将其放在系统自启动目录中:
由于Chrome扩展无法启动一个应用程序需要另一个与扩展程序通信的应用程序该程序可以从[此处](http://www.mediafire.com/file/lezj8lwqt5zf75v/play-with-mpvnet-server.7z/file)下载。只有当该程序运行时扩展才能正常工作,为了让应用程序始终运行,应将其放在系统自启动目录中:
`C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup`
这将使该程序随系统共同启动并在后台运行。当mpv.net的文件关联注册被执行后
该程序应该会找到mpv.net的位置或者将mpv.net文件夹添加到环境变量PATH。
这将使该程序随系统共同启动并在后台运行。当mpv.net的文件关联注册被执行后该程序应该会找到mpv.net的位置或者将mpv.net文件夹添加到环境变量PATH。
### Open With
@@ -550,35 +558,7 @@ mpv.net的专属选项
### Open with++
[Open with++](#open-with) 可用来扩展资源管理器的上下文菜单
[Play with mpv.net](https://github.com/stax76/OpenWithPlusPlus#play-with-mpvnet) 和
[Add to mpv.net playlist](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist).
可用来获取 'Play with mpv.net' 和 'Add to mpv.net playlist' 的菜单子项
### Universal Remote 安卓应用
Universal Remote 是一个收费的安卓远程控制APP。
https://www.unifiedremote.com
https://play.google.com/store/apps/details?id=com.Relmtech.Remote
https://play.google.com/store/apps/details?id=com.Relmtech.RemotePaid
https://www.unifiedremote.com/tutorials/how-to-create-a-custom-keyboard-shortcuts-remote
https://www.unifiedremote.com/tutorials/how-to-install-a-custom-remote
[我的配置](./Universal%20Remote)
Universal Remote 的 File Browser 功能十分有用。
### One For All Contour URC1210 and FLIRC USB
然而我的主要远程控制解决方案适用于所有人,
Philips code 0556 和 FLIRC USB (gen2) 一同被使用。
[Open with++](#open-with) 可用来扩展资源管理器的上下文菜单。[Play with mpv.net](https://github.com/stax76/OpenWithPlusPlus#play-with-mpvnet) 和 [Add to mpv.net playlist](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist) 可用来获取 'Play with mpv.net' 和 'Add to mpv.net playlist' 的菜单子项
### External Application Button
@@ -595,67 +575,34 @@ args: `-- pwsh -NoLogo -Command "yt-dlp --ignore-errors --download-archive 'C:\E
#### Lua
文件类型: `lua`
可以在 [mpv wiki](https://github.com/mpv-player/mpv/wiki/User-Scripts) 中找到一个庞大的用户Lua脚本的集合。
文件位置: `<config folder>\scripts`
Lua脚本的host由libmpv内建。
错误和调试消息输出在终端上。
Lua脚本在第一个媒体文件打开之前加载。
[mpv Lua 文档](https://mpv.io/manual/master/#lua-scripting)
[mpv 用户脚本 wiki](https://github.com/mpv-player/mpv/wiki/User-Scripts)
[mpv 用户脚本 GitHub](https://github.com/topics/mpv-script)
[mpv 用户脚本 Google](https://www.google.com/search?q=mpv+script)
Lua脚本在 [mpv.net wiki](https://github.com/mpvnet-player/mpv.net/wiki/Extending-mpv-and-mpv.net-via-Lua-scripting) 上有进一步记录。
#### JavaScript
文件类型: `js`
文件位置: `<config folder>\scripts`
JavaScriptLua脚本的host由libmpv内建。
错误和调试消息输出在终端上。
JavaScript脚本在第一个媒体文件打开之前加载。
[mpv JavaScript 文档](https://mpv.io/manual/master/#javascript)
[mpv用户脚本](https://github.com/mpv-player/mpv/wiki/User-Scripts)
#### PowerShell
文件类型: `ps1`
文件位置: `<config folder>\scripts-ps`
PS脚本的host类似于扩展在打开媒体文件前尚未初始化。
mpv.net没有定义脚本接口而是公开了它的完整内部没有兼容性保证。
PS脚本在打开媒体文件前尚未初始化。
[示例脚本](../../../tree/master/src/Scripts)
#### C#
文件类型: `cs`
文件位置: `<config folder>\scripts-cs`
mpv.net没有定义脚本接口而是公开了它的完整内部没有兼容性保证。
没有兼容性保证。
脚本代码可以在C#[扩展](../../../tree/master/src/Extensions)中编写,这样
就可以获得完整的代码和调试器支持。一旦代码被调试和开发完成,就可以将其
从扩展转移到轻量级的独立脚本。脚本host使用的是旧的C#版本,像字符串插值
这样的现代功能是不存在的。
脚本代码可以在C#[扩展](../../../tree/master/src/Extensions)中编写,这样就可以获得完整的代码和调试器支持。一旦代码被调试和开发完成就可以将其从扩展转移到轻量级的独立脚本。脚本host使用的是旧的C#版本,像字符串插值这样的现代功能是不存在的。
有同步事件和异步事件,更偏好异步事件,不要阻断同步事件和观察到的属性,因为这样会阻断主事件循环。
C#脚本的host类似于[扩展](../../../tree/master/src/Extensions),在打开媒体文件前尚未初始化。
@@ -671,7 +618,7 @@ C#脚本的host类似于[扩展](../../../tree/master/src/Extensions),在打
<config folder>\extensions\ExampleExtension\ExampleExtension.dll
```
mpv.net没有定义脚本接口而是公开了它的完整内部没有兼容性保证
有同步事件和异步事件,更偏好异步事件,不要阻断同步事件和观察到的属性,因为这样会阻断主事件循环
### 创建扩展演示
@@ -679,14 +626,9 @@ mpv.net没有定义脚本接口而是公开了它的完整内部没有兼
- 下载安装 [Visual Studio Community](https://visualstudio.microsoft.com) 。
- 创建新的项目类型 **Class Library .NET Framework** 并确保项目名称以 **Extension** 作结尾。
- 增加一个 reference 到 **System.ComponentModel.Composition**.
- 增加一个 reference 到 mpvnet.exe ,在 Solution Explorer 中选择 mpvnet 的 reference
打开 Properties 窗口并设置 **Copy Local** 为 false 来阻止在项目编译时 mpvnet.exe 被复制到输出目录。
- 现在打开 project properties 并在 Build 标签页设置 output path
扩展类似于位于配置文件夹中的脚本,例如:
`<config folder>\extensions\ExampleExtension\ExampleExtension.dll`
- 同样在 project properties 的 Debug 标签页中选择选项 **Start external program**
并且定义到 mpvnet.exe 的路径。
在 Debug 标签页中你还可以定义 command line arguments ,例如开始调试时要播放的视频文件。
- 增加一个 reference 到 mpvnet.exe ,在 Solution Explorer 中选择 mpvnet 的 reference 打开 Properties 窗口并设置 **Copy Local** 为 false 来阻止在项目编译时 mpvnet.exe 被复制到输出目录。
- 现在打开 project properties 并在 Build 标签页设置 output path ,扩展类似于位于配置文件夹中的脚本,例如: `<config folder>\extensions\ExampleExtension\ExampleExtension.dll`
- 同样在 project properties 的 Debug 标签页中选择选项 **Start external program** 并且定义到 mpvnet.exe 的路径。在 Debug 标签页中你还可以定义 command line arguments ,例如开始调试时要播放的视频文件。
### 代码样本
@@ -735,11 +677,9 @@ Python和VapourSynth必须在环境变量PATH中。
隐藏功能
---------------
使用mpv.net在资源管理器中选择多个文件并按下回车键打开。
资源管理器将此限制为最多15个并且顺序将是随机的。
使用mpv.net在资源管理器中选择多个文件并按下回车键打开。资源管理器将此限制为最多15个并且顺序将是随机的。
当打开文件或url时只要按下CTRL键就不会清除播放列表而是将文件或url附加到播放列表中。
这适用于mpv.net的所有打开文件或url的功能。
当打开文件或url时只要按下CTRL键就不会清除播放列表而是将文件或url附加到播放列表中。这适用于mpv.net的所有打开文件或url的功能。
在打开单个文件时按下SHIFT键将禁止该文件夹的其它文件添加到播放列表中。
@@ -770,6 +710,7 @@ https://mpv.io/manual/master/#window
- [keepaspect-window](https://mpv.io/manual/master/#options-keepaspect-window)
- [ontop](https://mpv.io/manual/master/#options-ontop)
- [screen](https://mpv.io/manual/master/#options-screen)
- [snap-window](https://mpv.io/manual/master/#options-snap-window)
- [title](https://mpv.io/manual/master/#options-title)
- [window-maximized](https://mpv.io/manual/master/#options-window-maximized)
- [window-minimized](https://mpv.io/manual/master/#options-window-minimized)
@@ -779,8 +720,11 @@ https://mpv.io/manual/master/#window
**部分支持的属性:**
- [autofit](https://mpv.io/manual/master/#options-autofit)
仅支持0-100范围内的整数
- [autofit-smaller](https://mpv.io/manual/master/#options-autofit-smaller)
同上
- [autofit-larger](https://mpv.io/manual/master/#options-autofit-larger)
同上
mpv.net的专属窗口功能在 [屏幕设置](#screen) 部分。
@@ -802,9 +746,7 @@ mpv.net支持基于属性的mpv命令行选项这意味着它支持mpv几乎
### 其它限制
mpv的属性 [idle](https://mpv.io/manual/master/#options-idle) 在mpv.net中
也会相应的发挥作用但是LUA脚本获取到的值始终是 `yes` 因为mpv.net必须
设置它才能正常工作这是一个难以攻克的来自libmpv的限制。
mpv的属性 [idle](https://mpv.io/manual/master/#options-idle) 在mpv.net中也会相应的发挥作用但是LUA脚本获取到的值始终是 `yes` 因为mpv.net必须设置它才能正常工作这是一个难以攻克的来自libmpv的限制。
### mpv.net的专属选项
@@ -819,8 +761,7 @@ mpv.net的专属选项保存在 mpvnet.conf 文件中与mpv一样可由命令
mpv.net使用 C#7 编写并且需要 .NET Framework 4.8 来运行。
扩展的实现基于
[Managed Extensibility Framework](https://docs.microsoft.com/en-us/dotnet/framework/mef/).
扩展的实现基于 [Managed Extensibility Framework](https://docs.microsoft.com/en-us/dotnet/framework/mef/)
主窗口基于WinForms与WPF相比对libmpv集成的更友好所有其他窗口都是基于WPF的。
@@ -837,7 +778,7 @@ mpv.net的上下文菜单由设置目录中的文件 input.conf 定义。
如果 input.conf 文件不存在mpv.net由以下文件生成默认
<https://github.com/stax76/mpv.net/tree/master/src/Resources/input.conf.txt>
<https://github.com/mpvnet-player/mpv.net/tree/master/src/Resources/input.conf.txt>
input.conf 定义mpv的快捷键同时mpv.net使用注释定义上下文菜单。
@@ -850,8 +791,7 @@ input.conf 定义mpv的快捷键同时mpv.net使用注释定义上下文菜
第三种方法是拖放文件到主窗口上。
每当打开文件或URL时按下控制键时播放列表不会被清除但文件或URL会追加到播放列表中。
这适用于所有打开文件或URL的mpv.net的功能。
每当打开文件或URL时按下控制键时播放列表不会被清除但文件或URL会追加到播放列表中。这适用于所有打开文件或URL的mpv.net的功能。
在打开单个文件时按shift键将临时禁止加载文件夹中的其它文件。
@@ -870,14 +810,12 @@ input.conf 定义mpv的快捷键同时mpv.net使用注释定义上下文菜
### Open > Load external audio files
允许加载外部音轨文件。也可以根据文件名自动检测,该选项可在下面的设置中找到
'Settings > Show Config Editor > Audio > audio-file-auto' 。
允许加载外部音轨文件。也可以根据文件名自动检测,该选项可在下面的设置中找到 'Settings > Show Config Editor > Audio > audio-file-auto'
### Open > Load external subtitle files
允许加载外部字幕文件。也可以根据文件名自动检测,该选项可在下面的设置中找到
'Settings > Show Config Editor > Subtitles > sub-auto' 。
允许加载外部字幕文件。也可以根据文件名自动检测,该选项可在下面的设置中找到 'Settings > Show Config Editor > Subtitles > sub-auto'
### Play/Pause
@@ -975,8 +913,7 @@ input.conf 定义mpv的快捷键同时mpv.net使用注释定义上下文菜
`no-osd seek sec`
sec是跳转的相对秒数使用no osd前缀是因为mpv.net包含一个脚本
该脚本显示执行寻道操作时的位置,该脚本使用更简单的时间格式。
sec是跳转的相对秒数使用no osd前缀是因为mpv.net包含一个脚本该脚本显示执行寻道操作时的位置,该脚本使用更简单的时间格式。
[no-osd command prefix](https://mpv.io/manual/master/#command-interface-no-osd)
@@ -1220,7 +1157,7 @@ sec是跳转的相对秒数使用no osd前缀是因为mpv.net包含一个脚
使用以下命令改变到下一个可用的字幕轨:
`cycle sub`
`script-message-to mpvnet cycle-subtitles`
[cycle command](https://mpv.io/manual/master/#command-interface-cycle-%3Cname%3E-[%3Cvalue%3E])
@@ -1499,8 +1436,7 @@ input.conf 文件内涵mpv的键鼠绑定
### Tools > Show History
显示包含历史记录的文本文件。如果文件不存在,则会询问是否在设置文件夹中
创建该文件。一旦文件存在,则写入历史记录(包括时间和文件名)
显示包含历史记录的文本文件。如果文件不存在,则会询问是否在设置文件夹中创建该文件。一旦文件存在,则写入历史记录(包括时间和文件名)
屏蔽部分路径的参数:
@@ -1554,7 +1490,7 @@ script-opt = history-discard=path1;path2
### Help > Show mpv.net manual
显示 [mpv.net手册](https://github.com/stax76/mpv.net/blob/master/Manual.md).
显示 [mpv.net手册](https://github.com/mpvnet-player/mpv.net/blob/master/Manual.md).
### Help > About mpv.net

34
lang/create-mo-files.ps1 Normal file
View File

@@ -0,0 +1,34 @@
$PoFiles = Get-ChildItem $PSScriptRoot/po
$ExeFolder = "$PSScriptRoot/../src/MpvNet.Windows/bin/Debug"
function CreateFolder
{
param($path)
if (-not (Test-Path $path))
{
mkdir $path
}
if (-not (Test-Path $path))
{
throw
}
}
foreach ($it in $PoFiles)
{
$folder = "$ExeFolder/Locale/$($it.BaseName)/LC_MESSAGES"
New-Item -ItemType Directory -Path $folder
$moPath = "$folder/mpvnet.mo"
New-Item -ItemType File -Path $moPath
msgfmt --output-file=$moPath $it.FullName
if ($LASTEXITCODE -ne 0)
{
throw
}
$moPath
}

111
lang/cs-files.txt Normal file
View File

@@ -0,0 +1,111 @@
D:\Projects\CS\mpv.net\src\MpvNet\App.cs
D:\Projects\CS\mpv.net\src\MpvNet\AppInfo.cs
D:\Projects\CS\mpv.net\src\MpvNet\Binding.cs
D:\Projects\CS\mpv.net\src\MpvNet\Chapter.cs
D:\Projects\CS\mpv.net\src\MpvNet\Command.cs
D:\Projects\CS\mpv.net\src\MpvNet\ExtensionLoader.cs
D:\Projects\CS\mpv.net\src\MpvNet\FileTypes.cs
D:\Projects\CS\mpv.net\src\MpvNet\Folder.cs
D:\Projects\CS\mpv.net\src\MpvNet\Global.cs
D:\Projects\CS\mpv.net\src\MpvNet\GlobalUsings.cs
D:\Projects\CS\mpv.net\src\MpvNet\InputConf.cs
D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet\MediaTrack.cs
D:\Projects\CS\mpv.net\src\MpvNet\MpvClient.cs
D:\Projects\CS\mpv.net\src\MpvNet\Player.cs
D:\Projects\CS\mpv.net\src\MpvNet\Settings.cs
D:\Projects\CS\mpv.net\src\MpvNet\Terminal.cs
D:\Projects\CS\mpv.net\src\MpvNet\Translator.cs
D:\Projects\CS\mpv.net\src\MpvNet\ExtensionMethod\ObjectExtension.cs
D:\Projects\CS\mpv.net\src\MpvNet\ExtensionMethod\PathStringExtension.cs
D:\Projects\CS\mpv.net\src\MpvNet\ExtensionMethod\StringExtension.cs
D:\Projects\CS\mpv.net\src\MpvNet\Help\FileHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet\Help\MpvHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet\Help\ProcessHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet\Help\StringHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet\Help\TaskHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet\MVVM\Messages.cs
D:\Projects\CS\mpv.net\src\MpvNet\Native\LibMpv.cs
D:\Projects\CS\mpv.net\src\MpvNet\Native\MediaInfo.cs
D:\Projects\CS\mpv.net\src\MpvNet\Native\StringLogicalComparer.cs
D:\Projects\CS\mpv.net\src\MpvNet.Extension\ExampleExtension\ExampleExtension.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Conf.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\FileAssociation.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\GlobalUsings.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Program.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Settings.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\StringPair.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Help\RegistryHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Help\WinMpvHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Native\StockIcon.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Native\Taskbar.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Native\WinApi.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Properties\Resources.Designer.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\UI\CommandPalette.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\UI\CommandPaletteItem.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\UI\GlobalHotkey.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\UI\Theme.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\UI\TreeNode.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.Designer.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\SnapManager.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\BindingProxy.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\ConfWindow.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\InputWindow.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\ISettingControl.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\LearnWindow.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MenuHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Msg.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\WpfApplication.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\WpfTranslator.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Controls\CommandPaletteControl.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Controls\HyperlinkEx.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Controls\OptionSettingControl.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Controls\SearchControl.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Controls\StringSettingControl.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Controls\ScrollViewer.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Controls\SimplePanel.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Controls\Attach\BorderElement.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Controls\Attach\IconElement.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Controls\Attach\MenuTopLineAttach.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Controls\Attach\ScrollViewerAttach.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Data\ValueBoxes.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\AnimationHelper.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\RegexPatterns.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Converter\BorderCircularConverter.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Extension\StringExtension.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Helper\ScreenHelper.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Helper\VisualHelper.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Interop\InteropMethods.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Interop\InteropValues.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Interop\Handle\BitmapHandle.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Interop\Handle\CommonHandles.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Interop\Handle\HandleCollector.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Interop\Handle\WpfSafeHandle.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MessageBoxEx.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MsgBoxExCheckBoxData.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MsgBoxExDelegate.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MsgBoxExStatic.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MsgBoxExtendedFunctionality.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MsgBoxUrl.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MsgEnum.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\ViewModels\AboutViewModel.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\ViewModels\NodeViewModel.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\ViewModels\ViewModelBase.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Views\AboutWindow.xaml.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\ChangeCultureCommand.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\CompositionRoot.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\CultureEventArgs.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\CultureTracker.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\GettextExtension.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\GettextFormatConverterExtension.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\IWeakCultureObserver.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\Localizer.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\TrackCurrentCultureBehavior.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\Translation.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\Common\GettextStringFormatConverter.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\EnumTranslation\EnumLocalizer.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\EnumTranslation\EnumMsgIdAttribute.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\EnumTranslation\LocalizeEnumConverter.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\Properties\AssemblyInfo.cs

783
lang/po/de.po Normal file
View File

@@ -0,0 +1,783 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Frank Skare, 2023
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-08 06:42+0100\n"
"PO-Revision-Date: 2023-12-08 00:34+0000\n"
"Last-Translator: Frank Skare, 2023\n"
"Language-Team: German (https://app.transifex.com/stax76/teams/179964/de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:98
msgid "+10%"
msgstr "+10%"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:97
msgid "-10%"
msgstr "-10%"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:121
msgid "100 %"
msgstr "100 %"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:122
msgid "200 %"
msgstr "200 %"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:123
msgid "300 %"
msgstr "300 %"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:120
msgid "50 %"
msgstr "50 %"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:152
msgid "About mpv.net"
msgstr "Über mpv.net"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:16
msgid "Add external audio files..."
msgstr "Externe Audiodateien hinzufügen..."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:17
msgid "Add external subtitle files..."
msgstr "Externe Untertiteldateien hinzufügen..."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:19
msgid "Add files to playlist..."
msgstr "Dateien zur Wiedergabeliste hinzufügen..."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:75
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:76
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:77
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:78
msgid "Audio"
msgstr "Audio"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:162
msgid "Backward"
msgstr "Rückwärts"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:128
msgid "Center"
msgstr "Mitte"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:73
msgid "Change Aspect Ratio"
msgstr "Seitenverhältnis ändern"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\InputWindow.xaml.cs:120
msgid "Changes will be available on next startup."
msgstr "Änderungen werden beim nächsten Start verfügbar sein."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:44
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:351
msgid "Chapter"
msgstr "Kapitel"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:144
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:449
msgid "Custom"
msgstr "Benutzerdefiniert"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:61
msgid "Decrease Brightness"
msgstr "Helligkeit verringern"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:58
msgid "Decrease Contrast"
msgstr "Kontrast verringern"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:88
msgid "Decrease Font Size"
msgstr "Schriftgröße verringern"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:64
msgid "Decrease Gamma"
msgstr "Gamma verringern"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:54
msgid "Decrease Height"
msgstr "Höhe verringern"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:67
msgid "Decrease Saturation"
msgstr "Sättigung verringern"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:45
msgid "Decrease Size"
msgstr "Größe verringern"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:77
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:83
msgid "Delay +0.1"
msgstr "Verzögerung +0.1"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:78
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:82
msgid "Delay -0.1"
msgstr "Verzögerung -0.1"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:101
msgid "Double"
msgstr "Doppelt"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:94
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:127
msgid "Down"
msgstr "Runter"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:117
msgid "Enlarge"
msgstr "Vergrößern"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs:177
msgid "Error creating file associations."
msgstr "Fehler beim Erstellen von Dateizuordnungen."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:22
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:153
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:155
msgid "Exit"
msgstr "Beenden"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:143
msgid "Exit Watch Later"
msgstr "Beenden und später anschauen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:12
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:13
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:14
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:15
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:16
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:17
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:18
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:19
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:20
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:21
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:22
msgid "File"
msgstr "Datei"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs:169
msgid "File Explorer icons will refresh after process restart."
msgstr ""
"Datei-Explorer-Symbole werden nach dem Neustart des Prozesses aktualisiert."
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs:174
msgid "File associations were successfully created."
msgstr "Dateizuordnungen wurden erfolgreich erstellt."
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs:172
msgid "File associations were successfully removed."
msgstr "Dateizuordnungen wurden erfolgreich entfernt."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:161
msgid "Forward"
msgstr "Vorwärts"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:116
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:174
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:175
msgid "Fullscreen"
msgstr "Vollbild"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:100
msgid "Half"
msgstr "Halb"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:145
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:146
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:147
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:148
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:149
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:150
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:151
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:152
msgid "Help"
msgstr "Hilfe"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:173
msgid "Ignore left mouse butten"
msgstr "Ignoriere die linke Maustaste"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:62
msgid "Increase Brightness"
msgstr "Helligkeit erhöhen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:59
msgid "Increase Contrast"
msgstr "Kontrast erhöhen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:89
msgid "Increase Font Size"
msgstr "Schriftgröße erhöhen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:65
msgid "Increase Gamma"
msgstr "Gamma erhöhen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:55
msgid "Increase Height"
msgstr "Höhe erhöhen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:68
msgid "Increase Saturation"
msgstr "Sättigung erhöhen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:46
msgid "Increase Size"
msgstr "Größe erhöhen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:38
msgid "Jump 30 sec backward"
msgstr "30 Sekunden rückwärts springen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:37
msgid "Jump 30 sec forward"
msgstr "30 Sekunden vorwärts springen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:41
msgid "Jump 5 min backward"
msgstr "5 Minuten rückwärts springen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:40
msgid "Jump 5 min forward"
msgstr "5 Minuten vorwärts springen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:35
msgid "Jump 5 sec backward"
msgstr "5 Sekunden rückwärts springen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:34
msgid "Jump 5 sec forward"
msgstr "5 Sekunden vorwärts springen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:31
msgid "Jump To Next Frame"
msgstr "Zum nächsten Bild springen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:32
msgid "Jump To Previous Frame"
msgstr "Zum vorherigen Bild springen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:124
msgid "Left"
msgstr "Links"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:148
msgid "Manual mpv"
msgstr "Handbuch mpv"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:149
msgid "Manual mpv.net"
msgstr "Handbuch mpv.net"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:181
msgid "Mark position for revert-seek"
msgstr "Markieren der Position für die Rückwärtssuche"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:91
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:110
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:111
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:112
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:113
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:114
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:115
msgid "More"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:124
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:125
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:126
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:127
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:128
msgid "Move"
msgstr "Verschieben"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:52
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:86
msgid "Move Down"
msgstr "Nach unten bewegen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:48
msgid "Move Left"
msgstr "Nach links bewegen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:49
msgid "Move Right"
msgstr "Nach rechts bewegen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:51
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:85
msgid "Move Up"
msgstr "Nach oben bewegen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:96
msgid "Mute"
msgstr "Stumm"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:25
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:26
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:27
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:28
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:29
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:30
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:31
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:32
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:33
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:34
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:35
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:36
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:37
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:38
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:39
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:40
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:41
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:42
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:43
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:44
msgid "Navigate"
msgstr "Navigieren"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:28
msgid "Next Chapter"
msgstr "Nächstes Kapitel"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:26
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:168
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:170
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:172
msgid "Next File"
msgstr "Nächste Datei"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:75
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:79
msgid "Next Track"
msgstr "Nächster Titel"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:134
msgid "Open Config Folder"
msgstr "Konfigurationsordner öffnen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:14
msgid "Open DVD/Blu-ray Drive/Folder..."
msgstr "DVD/Blu-ray-Laufwerk/Ordner öffnen..."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:12
msgid "Open Files..."
msgstr "Dateien öffnen..."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:13
msgid "Open URL or file from clipboard"
msgstr "URL oder Datei aus der Zwischenablage öffnen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:45
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:46
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:47
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:48
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:49
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:50
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:51
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:52
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:53
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:54
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:55
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:56
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:57
msgid "Pan & Scan"
msgstr "Pan & Scan"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:23
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:156
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:157
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:158
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:159
msgid "Play/Pause"
msgstr "Wiedergabe/Pause"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:23
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:24
msgid "Playback"
msgstr "Wiedergabe"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:29
msgid "Previous Chapter"
msgstr "Vorheriges Kapitel"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:25
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:167
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:169
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:171
msgid "Previous File"
msgstr "Vorherige Datei"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:131
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:427
msgid "Profile"
msgstr "Profil"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:20
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:372
msgid "Recent Files"
msgstr "Zuletzt geöffnete Dateien"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:136
msgid "Register audio file associations"
msgstr "Audio-Dateizuordnungen registrieren"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:137
msgid "Register image file associations"
msgstr "Bild-Dateizuordnungen registrieren"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:135
msgid "Register video file associations"
msgstr "Video-Dateizuordnungen registrieren"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:57
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:103
msgid "Reset"
msgstr "Zurücksetzen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:125
msgid "Right"
msgstr "Rechts"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:74
msgid "Rotate Video"
msgstr "Video drehen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:177
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:179
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:185
msgid "Seek Backward"
msgstr "Suchen rückwärts"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:176
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:178
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:184
msgid "Seek Forward"
msgstr "Suchen vorwärts"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:183
msgid "Seek to next subtitle"
msgstr "Zum nächsten Untertitel springen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:182
msgid "Seek to previous subtitle"
msgstr "Zum vorherigen Untertitel springen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:139
msgid "Set/clear A-B loop points"
msgstr "Setzen/Löschen von A-B Schleifenpunkten"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:132
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:133
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:134
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:135
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:136
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:137
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:138
msgid "Settings"
msgstr "Einstellungen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:135
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:136
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:137
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:138
msgid "Setup"
msgstr "Einrichten"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:111
msgid "Show Audio Devices"
msgstr "Audio-Geräte anzeigen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:115
msgid "Show Bindings"
msgstr "Tastenkombinationen anzeigen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:112
msgid "Show Commands"
msgstr "Befehle anzeigen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:132
msgid "Show Config Editor"
msgstr "Konfigurationseditor anzeigen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:110
msgid "Show Console"
msgstr "Konsole anzeigen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:114
msgid "Show Decoders"
msgstr "Dekodierer anzeigen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:113
msgid "Show Demuxers"
msgstr "Demultiplexer anzeigen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:133
msgid "Show Input Editor"
msgstr "Tastenkombinationeneditor anzeigen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:108
msgid "Show Media Info Message Box"
msgstr "Medieninformation in Nachrichtenbox anzeigen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:107
msgid "Show Media Info On-Screen"
msgstr "Medieninformationen auf dem Bildschirm anzeigen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:154
msgid "Show Menu"
msgstr "Menü anzeigen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:104
msgid "Show Profiles"
msgstr "Profile anzeigen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:109
msgid "Show Progress"
msgstr "Fortschritt anzeigen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:118
msgid "Shrink"
msgstr "Verkleinern"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:141
msgid "Shuffle Playlist"
msgstr "Wiedergabeliste mischen"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:1297
msgid "Shutdown thread failed to complete within 10 seconds."
msgstr ""
"Shutdown-Thread konnte nicht innerhalb von 10 Sekunden abgeschlossen werden."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:97
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:98
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:99
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:100
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:101
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:102
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:103
msgid "Speed"
msgstr "Geschwindigkeit"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:24
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:160
msgid "Stop"
msgstr "Stopp"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:79
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:80
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:81
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:82
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:83
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:84
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:85
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:86
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:87
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:88
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:89
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:90
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:91
msgid "Subtitle"
msgstr "Untertitel"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:70
msgid "Take Screenshot"
msgstr "Bildschirmfoto machen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:71
msgid "Take Screenshot without subtitles"
msgstr "Bildschirmfoto ohne Untertitel machen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:43
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:394
msgid "Title"
msgstr "Titel"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:129
msgid "Toggle Border"
msgstr "Rahmen umschalten"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:72
msgid "Toggle Deinterlace"
msgstr "Deinterlace umschalten"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:142
msgid "Toggle Hardware Decoding"
msgstr "Hardware-Decodierung umschalten"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:106
msgid "Toggle OSC Visibility"
msgstr "Bildschirmschaltflächen-Sichtbarkeit umschalten"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:130
msgid "Toggle On Top"
msgstr "Fenster im Vordergrund umschalten"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:105
msgid "Toggle Statistics"
msgstr "Statistiken umschalten"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:80
msgid "Toggle Visibility"
msgstr "Sichtbarkeit umschalten"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:140
msgid "Toggle infinite file looping"
msgstr "Unendliche Dateischleife umschalten"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:91
msgid "Toggle overriding SSA/ASS styles with normal styles"
msgstr "Überschreiben von SSA/ASS-Stilen mit normalen Stilen umschalten"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:139
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:140
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:141
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:142
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:143
msgid "Tools"
msgstr "Werkzeuge"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:92
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:289
msgid "Track"
msgstr "Spur"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:180
msgid "Undo previous (or marked) seek"
msgstr "Rückgängig machen vorherige (oder markierte) Suche"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:138
msgid "Unregister file associations"
msgstr "Dateizuordnungen entfernen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:93
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:126
msgid "Up"
msgstr "Hoch"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:58
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:59
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:60
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:61
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:62
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:63
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:64
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:65
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:66
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:67
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:68
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:69
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:70
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:71
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:72
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:73
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:74
msgid "Video"
msgstr "Video"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:104
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:105
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:106
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:107
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:108
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:109
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:110
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:111
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:112
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:113
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:114
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:115
msgid "View"
msgstr "Ansicht"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:93
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:94
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:95
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:96
msgid "Volume"
msgstr "Lautstärke"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:164
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:166
msgid "Volume Down"
msgstr "Lautstärke verringern"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:163
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:165
msgid "Volume Up"
msgstr "Lautstärke erhöhen"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:145
msgid "Website mpv"
msgstr "Webseite mpv"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:146
msgid "Website mpv.net"
msgstr "Webseite mpv.net"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:116
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:117
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:118
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:119
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:120
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:121
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:122
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:123
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:124
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:125
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:126
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:127
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:128
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:129
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:130
msgid "Window"
msgstr "Fenster"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:117
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:118
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:119
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:120
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:121
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:122
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:123
msgid "Zoom"
msgstr "Zoom"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:151
msgid "awesome-mpv"
msgstr "awesome-mpv"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\Properties\Resources.Designer.cs:79
msgid "editor_conf"
msgstr "editor_conf"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\Properties\Resources.Designer.cs:114
msgid "theme"
msgstr "theme"
#~ msgid "Advanced"
#~ msgstr "Fortgeschritten"
#~ msgid "Down 2"
#~ msgstr "Runter 2"
#~ msgid "Up 2"
#~ msgstr "Hoch 2"

778
lang/po/zh_CN.po Normal file
View File

@@ -0,0 +1,778 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# dyphire, 2023
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-08 01:19+0100\n"
"PO-Revision-Date: 2023-12-08 00:34+0000\n"
"Last-Translator: dyphire, 2023\n"
"Language-Team: Chinese (China) (https://app.transifex.com/stax76/teams/179964/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:12
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:13
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:14
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:15
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:16
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:17
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:18
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:19
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:20
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:21
msgid "File"
msgstr "文件"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:12
msgid "Open Files..."
msgstr "打开文件..."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:13
msgid "Open URL or file from clipboard"
msgstr "从剪贴板打开 URL 或文件"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:14
msgid "Open DVD/Blu-ray Drive/Folder..."
msgstr "打开 DVD/蓝光驱动器/文件夹..."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:16
msgid "Add external audio files..."
msgstr "添加外部音频文件..."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:17
msgid "Add external subtitle files..."
msgstr "添加外部字幕文件..."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:19
msgid "Add files to playlist..."
msgstr "添加文件到播放列表..."
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:21
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:373
msgid "Recent Files"
msgstr "近期文件"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:22
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:23
msgid "Playback"
msgstr "回放"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:22
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:156
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:157
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:158
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:159
msgid "Play/Pause"
msgstr "播放/暂停"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:23
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:160
msgid "Stop"
msgstr "停止"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:24
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:25
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:26
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:27
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:28
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:29
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:30
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:31
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:32
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:33
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:34
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:35
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:36
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:37
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:38
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:39
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:40
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:41
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:42
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:43
msgid "Navigate"
msgstr "导航"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:24
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:167
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:169
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:171
msgid "Previous File"
msgstr "上一个文件"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:25
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:168
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:170
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:172
msgid "Next File"
msgstr "下一个文件"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:27
msgid "Next Chapter"
msgstr "下一个章节"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:28
msgid "Previous Chapter"
msgstr "上一个章节"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:30
msgid "Jump To Next Frame"
msgstr "跳至下一帧"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:31
msgid "Jump To Previous Frame"
msgstr "跳至上一帧"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:33
msgid "Jump 5 sec forward"
msgstr "快进 5 秒"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:34
msgid "Jump 5 sec backward"
msgstr "快退 5 秒"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:36
msgid "Jump 30 sec forward"
msgstr "快进 30 秒"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:37
msgid "Jump 30 sec backward"
msgstr "快退 30 秒"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:39
msgid "Jump 5 min forward"
msgstr "快进 5 分钟"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:40
msgid "Jump 5 min backward"
msgstr "快退 5 分钟"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:42
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:395
msgid "Title"
msgstr "标题"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:43
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:352
msgid "Chapter"
msgstr "章"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:44
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:45
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:46
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:47
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:48
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:49
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:50
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:51
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:52
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:53
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:54
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:55
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:56
msgid "Pan & Scan"
msgstr "平移&扫描"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:44
msgid "Decrease Size"
msgstr "缩减大小"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:45
msgid "Increase Size"
msgstr "增加大小"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:47
msgid "Move Left"
msgstr "左移"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:48
msgid "Move Right"
msgstr "右移"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:50
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:84
msgid "Move Up"
msgstr "上移"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:51
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:85
msgid "Move Down"
msgstr "下移"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:53
msgid "Decrease Height"
msgstr "降低高度"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:54
msgid "Increase Height"
msgstr "增加高度"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:56
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:102
msgid "Reset"
msgstr "重置"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:57
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:58
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:59
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:60
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:61
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:62
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:63
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:64
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:65
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:66
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:67
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:68
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:69
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:70
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:71
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:72
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:73
msgid "Video"
msgstr "视频"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:57
msgid "Decrease Contrast"
msgstr "降低对比度"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:58
msgid "Increase Contrast"
msgstr "增加对比度"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:60
msgid "Decrease Brightness"
msgstr "降低亮度"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:61
msgid "Increase Brightness"
msgstr "增加亮度"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:63
msgid "Decrease Gamma"
msgstr "降低伽马"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:64
msgid "Increase Gamma"
msgstr "增加伽马"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:66
msgid "Decrease Saturation"
msgstr "降低饱和度"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:67
msgid "Increase Saturation"
msgstr "增加饱和度"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:69
msgid "Take Screenshot"
msgstr "截屏"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:70
msgid "Take Screenshot without subtitles"
msgstr "截图(无字幕)"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:71
msgid "Toggle Deinterlace"
msgstr "切换 去隔行"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:72
msgid "Change Aspect Ratio"
msgstr "更改纵横比"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:73
msgid "Rotate Video"
msgstr "旋转视频"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:74
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:75
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:76
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:77
msgid "Audio"
msgstr "音频"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:74
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:78
msgid "Next Track"
msgstr "下一个轨道"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:76
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:82
msgid "Delay +0.1"
msgstr "延迟 +0.1"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:77
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:81
msgid "Delay -0.1"
msgstr "延迟 -0.1"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:78
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:79
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:80
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:81
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:82
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:83
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:84
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:85
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:86
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:87
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:88
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:89
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:90
msgid "Subtitle"
msgstr "字幕"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:79
msgid "Toggle Visibility"
msgstr "切换 可见性"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:87
msgid "Decrease Font Size"
msgstr "减小字体大小"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:88
msgid "Increase Font Size"
msgstr "增加字体大小"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:90
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:109
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:110
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:111
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:112
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:113
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:114
msgid "Advanced"
msgstr "高级"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:90
msgid "Toggle overriding SSA/ASS styles with normal styles"
msgstr "切换 使用常规样式覆盖 SSA/ASS 样式"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:91
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:290
msgid "Track"
msgstr "轨道"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:92
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:93
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:94
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:95
msgid "Volume"
msgstr "音量"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:92
msgid "Up 2"
msgstr "增加 2"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:93
msgid "Down 2"
msgstr "降低 2"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:95
msgid "Mute"
msgstr "静音"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:96
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:97
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:98
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:99
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:100
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:101
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:102
msgid "Speed"
msgstr "速度"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:96
msgid "-10%"
msgstr "-10%"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:97
msgid "+10%"
msgstr "+10%"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:99
msgid "Half"
msgstr "半"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:100
msgid "Double"
msgstr "倍"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:103
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:104
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:105
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:106
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:107
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:108
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:109
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:110
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:111
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:112
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:113
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:114
msgid "View"
msgstr "查看"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:103
msgid "Show Profiles"
msgstr "显示配置文件"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:104
msgid "Toggle Statistics"
msgstr "切换 统计信息"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:105
msgid "Toggle OSC Visibility"
msgstr "切换 OSC 可见性"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:106
msgid "Show Media Info On-Screen"
msgstr "在 OSD 上显示媒体信息"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:107
msgid "Show Media Info Message Box"
msgstr "显示媒体信息消息框"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:108
msgid "Show Progress"
msgstr "显示进度"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:109
msgid "Show Console"
msgstr "显示控制台"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:110
msgid "Show Audio Devices"
msgstr "显示音频设备"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:111
msgid "Show Commands"
msgstr "显示命令"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:112
msgid "Show Demuxers"
msgstr "显示解复用器"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:113
msgid "Show Decoders"
msgstr "显示解码器"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:114
msgid "Show Bindings"
msgstr "显示绑定"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:115
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:116
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:117
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:118
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:119
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:120
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:121
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:122
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:123
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:124
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:125
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:126
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:127
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:128
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:129
msgid "Window"
msgstr "窗口"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:115
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:174
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:175
msgid "Fullscreen"
msgstr "全屏"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:116
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:117
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:118
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:119
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:120
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:121
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:122
msgid "Zoom"
msgstr "缩放"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:116
msgid "Enlarge"
msgstr "放大"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:117
msgid "Shrink"
msgstr "缩小"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:119
msgid "50 %"
msgstr "50 %"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:120
msgid "100 %"
msgstr "100 %"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:121
msgid "200 %"
msgstr "200 %"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:122
msgid "300 %"
msgstr "300 %"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:123
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:124
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:125
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:126
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:127
msgid "Move"
msgstr "移动"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:123
msgid "Left"
msgstr "左"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:124
msgid "Right"
msgstr "右"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:125
msgid "Up"
msgstr "上"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:126
msgid "Down"
msgstr "下"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:127
msgid "Center"
msgstr "中"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:128
msgid "Toggle Border"
msgstr "切换 边框"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:129
msgid "Toggle On Top"
msgstr "切换 置顶"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:130
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:428
msgid "Profile"
msgstr "配置文件"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:131
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:132
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:133
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:134
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:135
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:136
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:137
msgid "Settings"
msgstr "设置"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:131
msgid "Show Config Editor"
msgstr "显示配置编辑器"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:132
msgid "Show Input Editor"
msgstr "显示输入编辑器"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:133
msgid "Open Config Folder"
msgstr "打开配置文件夹"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:134
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:135
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:136
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:137
msgid "Setup"
msgstr "设置"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:134
msgid "Register video file associations"
msgstr "注册视频文件关联"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:135
msgid "Register audio file associations"
msgstr "注册音频文件关联"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:136
msgid "Register image file associations"
msgstr "注册图像文件关联"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:137
msgid "Unregister file associations"
msgstr "注销文件关联"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:138
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:139
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:140
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:141
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:142
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:143
msgid "Tools"
msgstr "工具"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:138
msgid "Set/clear A-B loop points"
msgstr "设置/清除 A-B 循环点"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:139
msgid "Toggle infinite file looping"
msgstr "切换 无限文件循环"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:140
msgid "Shuffle Playlist"
msgstr "随机播放列表"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:141
msgid "Toggle Hardware Decoding"
msgstr "切换 硬件解码"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:142
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:153
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:155
msgid "Exit"
msgstr "退出"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:143
msgid "Exit Watch Later"
msgstr "退出(稍后观看)"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:144
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:450
msgid "Custom"
msgstr "自定义"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:145
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:146
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:147
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:148
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:149
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:150
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:151
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:152
msgid "Help"
msgstr "帮助"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:145
msgid "Website mpv"
msgstr "mpv 网址"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:146
msgid "Website mpv.net"
msgstr "mpv.net 网址"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:148
msgid "Manual mpv"
msgstr "mpv 手册"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:149
msgid "Manual mpv.net"
msgstr "mpv.net 手册"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:151
msgid "awesome-mpv"
msgstr "awesome-mpv"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:152
msgid "About mpv.net"
msgstr "关于 mpv.net"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:154
msgid "Show Menu"
msgstr "显示菜单"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:161
msgid "Forward"
msgstr "前进"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:162
msgid "Backward"
msgstr "后退"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:163
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:165
msgid "Volume Up"
msgstr "增加 音量"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:164
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:166
msgid "Volume Down"
msgstr "降低 音量"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:173
msgid "Ignore left mouse butten"
msgstr "忽略左键"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:176
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:178
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:184
msgid "Seek Forward"
msgstr "向前跳转"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:177
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:179
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:185
msgid "Seek Backward"
msgstr "向后跳转"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:180
msgid "Undo previous (or marked) seek"
msgstr "撤销之前(或标记的)跳转"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:181
msgid "Mark position for revert-seek"
msgstr "标记回退查找的位置"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:182
msgid "Seek to previous subtitle"
msgstr "跳至上一个字幕行"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:183
msgid "Seek to next subtitle"
msgstr "跳至下一个字幕行"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs:169
msgid "File Explorer icons will refresh after process restart."
msgstr "文件资源管理器图标将在进程重新启动后刷新"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs:172
msgid "File associations were successfully removed."
msgstr "文件关联已成功删除"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs:174
msgid "File associations were successfully created."
msgstr "文件关联已成功创建"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs:177
msgid "Error creating file associations."
msgstr "创建文件关联时出错"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\Properties\Resources.Designer.cs:79
msgid "editor_conf"
msgstr "editor_conf"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\Properties\Resources.Designer.cs:114
msgid "theme"
msgstr "主题"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:1298
msgid "Shutdown thread failed to complete within 10 seconds."
msgstr "线程关闭未能在 10 秒内完成"
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\InputWindow.xaml.cs:120
msgid "Changes will be available on next startup."
msgstr "更改将在下次启动时应用"

768
lang/source.pot Normal file
View File

@@ -0,0 +1,768 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-08 06:47+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:12
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:13
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:14
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:15
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:16
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:17
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:18
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:19
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:20
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:21
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:22
msgid "File"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:12
msgid "Open Files..."
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:13
msgid "Open URL or file from clipboard"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:14
msgid "Open DVD/Blu-ray Drive/Folder..."
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:16
msgid "Add external audio files..."
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:17
msgid "Add external subtitle files..."
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:19
msgid "Add files to playlist..."
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:20
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:372
msgid "Recent Files"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:22
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:153
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:155
msgid "Exit"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:23
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:24
msgid "Playback"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:23
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:156
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:157
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:158
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:159
msgid "Play/Pause"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:24
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:160
msgid "Stop"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:25
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:26
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:27
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:28
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:29
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:30
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:31
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:32
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:33
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:34
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:35
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:36
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:37
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:38
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:39
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:40
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:41
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:42
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:43
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:44
msgid "Navigate"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:25
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:167
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:169
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:171
msgid "Previous File"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:26
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:168
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:170
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:172
msgid "Next File"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:28
msgid "Next Chapter"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:29
msgid "Previous Chapter"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:31
msgid "Jump To Next Frame"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:32
msgid "Jump To Previous Frame"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:34
msgid "Jump 5 sec forward"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:35
msgid "Jump 5 sec backward"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:37
msgid "Jump 30 sec forward"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:38
msgid "Jump 30 sec backward"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:40
msgid "Jump 5 min forward"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:41
msgid "Jump 5 min backward"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:43
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:394
msgid "Title"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:44
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:351
msgid "Chapter"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:45
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:46
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:47
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:48
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:49
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:50
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:51
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:52
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:53
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:54
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:55
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:56
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:57
msgid "Pan & Scan"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:45
msgid "Decrease Size"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:46
msgid "Increase Size"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:48
msgid "Move Left"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:49
msgid "Move Right"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:51
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:85
msgid "Move Up"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:52
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:86
msgid "Move Down"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:54
msgid "Decrease Height"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:55
msgid "Increase Height"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:57
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:103
msgid "Reset"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:58
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:59
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:60
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:61
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:62
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:63
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:64
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:65
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:66
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:67
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:68
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:69
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:70
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:71
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:72
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:73
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:74
msgid "Video"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:58
msgid "Decrease Contrast"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:59
msgid "Increase Contrast"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:61
msgid "Decrease Brightness"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:62
msgid "Increase Brightness"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:64
msgid "Decrease Gamma"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:65
msgid "Increase Gamma"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:67
msgid "Decrease Saturation"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:68
msgid "Increase Saturation"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:70
msgid "Take Screenshot"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:71
msgid "Take Screenshot without subtitles"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:72
msgid "Toggle Deinterlace"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:73
msgid "Change Aspect Ratio"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:74
msgid "Rotate Video"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:75
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:76
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:77
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:78
msgid "Audio"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:75
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:79
msgid "Next Track"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:77
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:83
msgid "Delay +0.1"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:78
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:82
msgid "Delay -0.1"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:79
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:80
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:81
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:82
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:83
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:84
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:85
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:86
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:87
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:88
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:89
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:90
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:91
msgid "Subtitle"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:80
msgid "Toggle Visibility"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:88
msgid "Decrease Font Size"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:89
msgid "Increase Font Size"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:91
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:110
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:111
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:112
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:113
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:114
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:115
msgid "More"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:91
msgid "Toggle overriding SSA/ASS styles with normal styles"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:92
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:289
msgid "Track"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:93
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:94
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:95
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:96
msgid "Volume"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:93
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:126
msgid "Up"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:94
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:127
msgid "Down"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:96
msgid "Mute"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:97
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:98
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:99
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:100
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:101
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:102
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:103
msgid "Speed"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:97
msgid "-10%"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:98
msgid "+10%"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:100
msgid "Half"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:101
msgid "Double"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:104
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:105
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:106
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:107
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:108
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:109
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:110
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:111
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:112
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:113
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:114
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:115
msgid "View"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:104
msgid "Show Profiles"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:105
msgid "Toggle Statistics"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:106
msgid "Toggle OSC Visibility"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:107
msgid "Show Media Info On-Screen"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:108
msgid "Show Media Info Message Box"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:109
msgid "Show Progress"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:110
msgid "Show Console"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:111
msgid "Show Audio Devices"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:112
msgid "Show Commands"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:113
msgid "Show Demuxers"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:114
msgid "Show Decoders"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:115
msgid "Show Bindings"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:116
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:117
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:118
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:119
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:120
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:121
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:122
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:123
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:124
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:125
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:126
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:127
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:128
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:129
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:130
msgid "Window"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:116
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:174
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:175
msgid "Fullscreen"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:117
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:118
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:119
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:120
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:121
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:122
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:123
msgid "Zoom"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:117
msgid "Enlarge"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:118
msgid "Shrink"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:120
msgid "50 %"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:121
msgid "100 %"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:122
msgid "200 %"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:123
msgid "300 %"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:124
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:125
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:126
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:127
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:128
msgid "Move"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:124
msgid "Left"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:125
msgid "Right"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:128
msgid "Center"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:129
msgid "Toggle Border"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:130
msgid "Toggle On Top"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:131
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:427
msgid "Profile"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:132
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:133
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:134
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:135
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:136
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:137
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:138
msgid "Settings"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:132
msgid "Show Config Editor"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:133
msgid "Show Input Editor"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:134
msgid "Open Config Folder"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:135
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:136
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:137
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:138
msgid "Setup"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:135
msgid "Register video file associations"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:136
msgid "Register audio file associations"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:137
msgid "Register image file associations"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:138
msgid "Unregister file associations"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:139
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:140
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:141
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:142
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:143
msgid "Tools"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:139
msgid "Set/clear A-B loop points"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:140
msgid "Toggle infinite file looping"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:141
msgid "Shuffle Playlist"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:142
msgid "Toggle Hardware Decoding"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:143
msgid "Exit Watch Later"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:144
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:449
msgid "Custom"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:145
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:146
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:147
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:148
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:149
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:150
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:151
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:152
msgid "Help"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:145
msgid "Website mpv"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:146
msgid "Website mpv.net"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:148
msgid "Manual mpv"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:149
msgid "Manual mpv.net"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:151
msgid "awesome-mpv"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:152
msgid "About mpv.net"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:154
msgid "Show Menu"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:161
msgid "Forward"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:162
msgid "Backward"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:163
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:165
msgid "Volume Up"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:164
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:166
msgid "Volume Down"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:173
msgid "Ignore left mouse butten"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:176
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:178
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:184
msgid "Seek Forward"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:177
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:179
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:185
msgid "Seek Backward"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:180
msgid "Undo previous (or marked) seek"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:181
msgid "Mark position for revert-seek"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:182
msgid "Seek to previous subtitle"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs:183
msgid "Seek to next subtitle"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs:169
msgid "File Explorer icons will refresh after process restart."
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs:172
msgid "File associations were successfully removed."
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs:174
msgid "File associations were successfully created."
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs:177
msgid "Error creating file associations."
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\Properties\Resources.Designer.cs:79
msgid "editor_conf"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\Properties\Resources.Designer.cs:114
msgid "theme"
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs:1297
msgid "Shutdown thread failed to complete within 10 seconds."
msgstr ""
#: D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\InputWindow.xaml.cs:120
msgid "Changes will be available on next startup."
msgstr ""

View File

@@ -0,0 +1,18 @@
# Write list of .cs files into cs-files.txt file
Get-ChildItem $PSScriptRoot/.. -Recurse -File -Filter '*.cs' |
Where-Object { $_ -notmatch '[/\\]obj[/\\]' } |
ForEach-Object { $_.FullName } |
Out-File $PSScriptRoot/cs-files.txt
# Create .pot file
xgettext --force-po --from-code=UTF-8 '--language=c#' -o $PSScriptRoot/source.pot --files-from=$PSScriptRoot/cs-files.txt --keyword=_
# Backup .po files
$BackupTargetFolder = $env:TEMP + '/mpv.net po backup ' + (Get-Date -Format 'yyyy-MM-dd HH_mm_ss')
Copy-Item $PSScriptRoot/po $BackupTargetFolder -Force -Recurse
'PO file backup: ' + (Resolve-Path $BackupTargetFolder)
# Update .po files
(Get-ChildItem $PSScriptRoot/PO -Filter '*.po').FullName |
ForEach-Object { msgmerge --sort-output --backup=none --update $_ $PSScriptRoot/source.pot }

View File

@@ -1,22 +1,7 @@
[*.cs]
# IDE0058: Expression value is never used
dotnet_diagnostic.IDE0058.severity = none
# IDE0090: Use 'new(...)'
csharp_style_implicit_object_creation_when_type_is_apparent = true
# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = none
# IDE0022: Use block body for methods
dotnet_diagnostic.IDE0022.severity = none
# IDE0040: Add accessibility modifiers
dotnet_diagnostic.IDE0040.severity = none
# IDE0011: Add braces
dotnet_diagnostic.IDE0011.severity = none
# IDE0010: Add missing cases
dotnet_diagnostic.IDE0010.severity = none
# IDE0044: Add readonly modifier
dotnet_diagnostic.IDE0044.severity = silent
# IDE0090: Use 'new(...)'
dotnet_diagnostic.IDE0090.severity = silent

View File

@@ -1,135 +0,0 @@
// This extension writes a rating to the filename of rated videos when mpv.net shuts down.
// The input.conf setup:
// KP0 script-message rate-file 0 #menu: Extensions > Rating > 0stars
// KP1 script-message rate-file 1 #menu: Extensions > Rating > 1stars
// KP2 script-message rate-file 2 #menu: Extensions > Rating > 2stars
// KP3 script-message rate-file 3 #menu: Extensions > Rating > 3stars
// KP4 script-message rate-file 4 #menu: Extensions > Rating > 4stars
// KP5 script-message rate-file 5 #menu: Extensions > Rating > 5stars
// _ ignore #menu: Extensions > Rating > -
// _ script-message rate-file about #menu: Extensions > Rating > About
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using System.Threading;
using System.Windows.Forms;
using Microsoft.VisualBasic.FileIO;
using mpvnet;
using static mpvnet.Global;
namespace RatingExtension // the assembly name must end with 'Extension'!
{
[Export(typeof(IExtension))]
public class RatingExtension : IExtension
{
//Script script = new Script();
// dictionory to store the filename and the rating
Dictionary<string, int> Dic = new Dictionary<string, int>();
string FileToDelete;
DateTime DeleteTime;
public RatingExtension() // plugin initialization
{
Core.ClientMessage += ClientMessage; //handles keys defined in input.conf
Core.Shutdown += Shutdown; // handles MPV_EVENT_SHUTDOWN
}
// handles MPV_EVENT_SHUTDOWN
void Shutdown()
{
foreach (var i in Dic)
{
string filepath = i.Key;
int rating = i.Value;
if (string.IsNullOrEmpty(filepath) || !File.Exists(filepath))
return;
string basename = Path.GetFileNameWithoutExtension(filepath);
for (int x = 0; x < 6; x++)
if (basename.Contains(" (" + x + "stars)"))
basename = basename.Replace(" (" + x + "stars)", "");
basename += $" ({rating}stars)";
string newPath = Path.Combine(Path.GetDirectoryName(filepath),
basename + Path.GetExtension(filepath));
if (filepath.ToLower() != newPath.ToLower())
File.Move(filepath, newPath);
File.SetLastWriteTime(newPath, DateTime.Now);
}
}
//handles keys defined in input.conf
void ClientMessage(string[] args)
{
if (args[0] != "rate-file")
return;
if (int.TryParse(args[1], out int rating))
{
string path = Core.GetPropertyString("path");
if (!File.Exists(path))
return;
if (rating == 0 || rating == 1)
Delete(rating);
else
{
Dic[path] = rating;
Core.CommandV("show-text", $"Rating: {rating}");
}
}
else if (args[1] == "about")
MessageBox.Show($"This extension writes a rating to the filename of rated videos " +
"when mpv.net shuts down." + BR2 +
"The input.conf defaults contain key bindings for this extension to set ratings.",
"Rating Extension");
}
void Delete(int rating)
{
if (rating == 0)
{
FileToDelete = Core.GetPropertyString("path");
DeleteTime = DateTime.Now;
Core.CommandV("show-text", "Press 1 to delete file", "5000");
}
else
{
TimeSpan ts = DateTime.Now - DeleteTime;
string path = Core.GetPropertyString("path");
if (FileToDelete == path && ts.TotalSeconds < 5 && File.Exists(FileToDelete))
{
Core.Command("playlist-remove current");
int pos = Core.GetPropertyInt("playlist-pos");
if (pos == -1)
{
int count = Core.GetPropertyInt("playlist-count");
if (count > 0)
Core.SetPropertyInt("playlist-pos", count - 1);
}
Thread.Sleep(2000);
FileSystem.DeleteFile(FileToDelete, UIOption.OnlyErrorDialogs, RecycleOption.SendToRecycleBin);
}
}
}
}
}

View File

@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{55C88710-539D-4402-84C8-31694841C731}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RatingExtension</RootNamespace>
<AssemblyName>RatingExtension</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="RatingExtension.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ScriptDevelopment.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\mpv.net.csproj">
<Project>{1751f378-8edf-4b62-be6d-304c7c287089}</Project>
<Name>mpv.net</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -1,42 +0,0 @@

//// This script adds dynamic menu items for profile switching.
//// In input.conf add a menu item called 'Profiles'
//using mpvnet;
//using System.ComponentModel;
//using System.Linq;
//class Script
//{
// MainForm MainForm;
// CorePlayer Core;
// public Script()
// {
// Core = Global.Core;
// MainForm = MainForm.Instance;
// MainForm.ContextMenu.Opening += ContextMenu_Opening;
// }
// void ContextMenu_Opening(object sender, CancelEventArgs e)
// {
// MenuItem menuItem = MainForm.FindMenuItem("My Menu");
// if (menuItem == null)
// {
// Terminal.WriteError("Profiles menu item not found.", "switch-profile-context-menu.cs");
// return;
// }
// menuItem.DropDownItems.Clear();
// var editionTracks = Core.MediaTracks.Where(track => track.Type == "e");
// foreach (int i in new[] {1, 2, 3})
// {
// MenuItem mi = new MenuItem(i.ToString());
// mi.Action = () => { Core.commandv("show-text", i.ToString()); };
// menuItem.DropDownItems.Add(mi);
// }
// }
//}

View File

@@ -1,294 +0,0 @@

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
using System.Threading.Tasks;
using static mpvnet.Global;
namespace mpvnet
{
public static class App
{
public static List<string> TempFiles { get; } = new List<string>();
public static string ConfPath { get => Core.ConfigFolder + "mpvnet.conf"; }
public static string ProcessInstance { get; set; } = "single";
public static string DarkMode { get; set; } = "always";
public static string DarkTheme { get; set; } = "dark";
public static string LightTheme { get; set; } = "light";
public static string StartSize { get; set; } = "height-session";
public static bool AutoLoadFolder { get; set; } = true;
public static bool AutoPlay { get; set; }
public static bool DebugMode { get; set; }
public static bool Exit { get; set; }
public static bool IsTerminalAttached { get; } = Environment.GetEnvironmentVariable("_started_from_console") == "yes";
public static bool MediaInfo { get; set; } = true;
public static bool Queue { get; set; }
public static bool RememberVolume { get; set; } = true;
public static bool RememberWindowPosition { get; set; }
public static bool ShowLogo { get; set; } = true;
public static bool ShowSantaLogo { get; set; } = true;
public static int StartThreshold { get; set; } = 1500;
public static int RecentCount { get; set; } = 15;
public static float AutofitAudio { get; set; } = 0.7f;
public static float AutofitImage { get; set; } = 0.8f;
public static float MinimumAspectRatio { get; set; }
public static float MinimumAspectRatioAudio { get; set; }
public static float QuickBookmark { get; set; }
public static Extension Extension { get; set; }
public static bool IsDarkMode => (DarkMode == "system" && Sys.IsDarkTheme) || DarkMode == "always";
static AppSettings _Settings;
public static AppSettings Settings {
get {
if (_Settings == null)
_Settings = SettingsManager.Load();
return _Settings;
}
}
public static void Init()
{
var useless1 = Core.ConfigFolder;
var useless2 = Core.Conf;
foreach (var i in Conf)
ProcessProperty(i.Key, i.Value, true);
if (DebugMode)
{
try
{
string filePath = Core.ConfigFolder + "mpvnet-debug.log";
if (File.Exists(filePath))
File.Delete(filePath);
Trace.Listeners.Add(new TextWriterTraceListener(filePath));
Trace.AutoFlush = true;
//if (App.DebugMode)
// Trace.WriteLine("");
}
catch (Exception e)
{
Msg.ShowException(e);
}
}
InitTheme();
Core.Shutdown += Core_Shutdown;
Core.Initialized += Core_Initialized;
}
public static void InitTheme()
{
string themeContent = null;
if (File.Exists(Core.ConfigFolder + "theme.conf"))
themeContent = File.ReadAllText(Core.ConfigFolder + "theme.conf");
Theme.Init(
themeContent,
Properties.Resources.theme,
IsDarkMode ? DarkTheme : LightTheme);
}
public static void UpdateWpfColors()
{
var dic = System.Windows.Application.Current.Resources;
dic.Remove("BorderColor");
dic.Add("BorderColor", Theme.Current.GetColor("menu-highlight"));
dic.Remove("RegionColor");
dic.Add("RegionColor", Theme.Current.GetColor("menu-background"));
dic.Remove("SecondaryRegionColor");
dic.Add("SecondaryRegionColor", Theme.Current.GetColor("menu-highlight"));
dic.Remove("PrimaryTextColor");
dic.Add("PrimaryTextColor", Theme.Current.GetColor("menu-foreground"));
dic.Remove("HighlightColor");
dic.Add("HighlightColor", Theme.Current.GetColor("highlight"));
}
public static void RunTask(Action action)
{
Task.Run(() => {
try {
action.Invoke();
}
catch (Exception e) {
ShowException(e);
}
});
}
public static string Version => "Copyright (C) 2000-2022 mpv.net/mpv/mplayer\n" +
$"mpv.net {Application.ProductVersion}" + GetLastWriteTime(Application.ExecutablePath) + "\n" +
$"{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)
{
if (IsTerminalAttached)
Terminal.WriteError(obj.ToString());
else
{
if (obj is Exception e)
InvokeOnMainThread(() => Msg.ShowException(e));
else
InvokeOnMainThread(() => Msg.ShowError(obj.ToString()));
}
}
public static void InvokeOnMainThread(Action action)
{
if (action == null)
return;
if (MainForm.Instance == null)
action.Invoke();
else
MainForm.Instance.BeginInvoke(action);
}
public static void ShowInfo(string msg)
{
if (IsTerminalAttached)
{
if (msg != null)
Terminal.Write(msg);
}
else
InvokeOnMainThread(() => Msg.ShowInfo(msg));
}
public static void ShowError(string msg)
{
if (IsTerminalAttached)
{
if (msg != null)
Terminal.WriteError(msg);
}
else
InvokeOnMainThread(() => Msg.ShowError(msg));
}
static void Core_Initialized()
{
if (RememberVolume)
{
Core.SetPropertyInt("volume", Settings.Volume);
Core.SetPropertyString("mute", Settings.Mute);
}
}
static void Core_Shutdown()
{
Settings.Volume = Core.GetPropertyInt("volume");
Settings.Mute = Core.GetPropertyString("mute");
SettingsManager.Save(Settings);
foreach (string file in TempFiles)
FileHelp.Delete(file);
}
static Dictionary<string, string> _Conf;
public static Dictionary<string, string> Conf {
get {
if (_Conf == null)
{
_Conf = new Dictionary<string, string>();
if (File.Exists(ConfPath))
foreach (string i in File.ReadAllLines(ConfPath))
if (i.Contains("=") && !i.StartsWith("#"))
_Conf[i.Substring(0, i.IndexOf("=")).Trim()] = i.Substring(i.IndexOf("=") + 1).Trim();
}
return _Conf;
}
}
public static bool ProcessProperty(string name, string value, bool writeError = false)
{
switch (name)
{
case "audio-file-extensions": CorePlayer.AudioTypes = value.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); return true;
case "auto-load-folder": AutoLoadFolder = value == "yes"; return true;
case "auto-play": AutoPlay = value == "yes"; return true;
case "autofit-image": AutofitImage = value.Trim('%').ToInt() / 100f; return true;
case "autofit-audio": AutofitAudio = value.Trim('%').ToInt() / 100f; return true;
case "dark-mode": DarkMode = value; return true;
case "dark-theme": DarkTheme = value.Trim('\'', '"'); return true;
case "debug-mode": DebugMode = value == "yes"; return true;
case "image-file-extensions": CorePlayer.ImageTypes = value.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); return true;
case "light-theme": LightTheme = value.Trim('\'', '"'); return true;
case "media-info": MediaInfo = value == "yes"; return true;
case "minimum-aspect-ratio": MinimumAspectRatio = value.ToFloat(); return true;
case "minimum-aspect-ratio-audio": MinimumAspectRatioAudio = value.ToFloat(); return true;
case "process-instance": ProcessInstance = value; return true;
case "queue": Queue = value == "yes"; return true;
case "recent-count": RecentCount = value.ToInt(); return true;
case "remember-volume": RememberVolume = value == "yes"; return true;
case "remember-window-position": RememberWindowPosition = value == "yes"; return true;
case "show-logo": ShowLogo = value == "yes"; return true;
case "show-santa-logo": ShowSantaLogo = value == "yes"; return true;
case "start-size": StartSize = value; return true;
case "start-threshold": StartThreshold = value.ToInt(); return true;
case "video-file-extensions": CorePlayer.VideoTypes = value.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); return true;
default:
if (writeError)
Terminal.WriteError($"unknown mpvnet.conf property: {name}");
return false;
}
}
public static void CopyMpvnetCom()
{
string dir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData).AddSep() +
"Microsoft\\WindowsApps\\";
if (File.Exists(dir + "mpvnet.exe") && !File.Exists(dir + "mpvnet.com"))
File.Copy(Folder.Startup + "mpvnet.com", dir + "mpvnet.com");
}
public static (string Title, string Path) GetTitleAndPath(string input)
{
if (input.Contains("|"))
{
var a = input.Split('|');
return (a[1], a[0]);
}
return (input, input);
}
}
}

View File

@@ -1,71 +0,0 @@

using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using Microsoft.CSharp;
using static mpvnet.Global;
namespace mpvnet
{
class CSharpScriptHost
{
static List<object> References = new List<object>();
public static void ExecuteScriptsInFolder(string folder)
{
if (Directory.Exists(folder))
foreach (string file in Directory.GetFiles(folder, "*.cs"))
App.RunTask(() => Execute(file));
}
static void Execute(string file)
{
string code = File.ReadAllText(file);
string filename = Path.GetFileNameWithoutExtension(file) + " " + StringHelp.GetMD5Hash(code) + "-v6.dll";
string outputFile = Path.Combine(Path.GetTempPath(), filename);
if (!File.Exists(outputFile))
Compile(outputFile, file);
if (File.Exists(outputFile))
{
object instance = Assembly.LoadFile(outputFile).CreateInstance("Script");
if (instance != null)
References.Add(instance);
else
Terminal.WriteError("Failed to initialize script.", outputFile.FileName());
}
}
public static void Compile(string outputFile, string file)
{
CSharpCodeProvider provider = new CSharpCodeProvider();
CompilerParameters parameters = new CompilerParameters();
string[] dependencies = {
Folder.Startup + "mpvnet.exe",
"Microsoft.VisualBasic.dll",
"System.Core.dll", "System.Data.dll", "System.dll", "System.Drawing.dll", "System.Web.dll",
"System.Windows.Forms.dll", "System.Xaml.dll", "System.Xml.dll", "System.Xml.Linq.dll",
"WPF\\PresentationCore.dll", "WPF\\PresentationFramework.dll", "WPF\\WindowsBase.dll"
};
foreach (string i in dependencies)
parameters.ReferencedAssemblies.Add(i);
parameters.OutputAssembly = outputFile;
CompilerResults results = provider.CompileAssemblyFromFile(parameters, file);
var errors = results.Errors.Cast<CompilerError>().Select(i => "Line Number " +
i.Line + "\n" + "Error Number: " + i.ErrorNumber + "\n" + i.ErrorText);
if (errors.Count() > 0)
Terminal.WriteError(string.Join(BR2, errors), Path.GetFileName(file));
}
}
}

View File

@@ -1,720 +0,0 @@

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows;
using System.Windows.Forms;
using System.Windows.Interop;
using System.Windows.Media;
using WinForms = System.Windows.Forms;
using static mpvnet.Global;
namespace mpvnet
{
public class Commands
{
public static void Execute(string id, string[] args)
{
switch (id)
{
case "add-files-to-playlist": OpenFiles("append"); break; // deprecated 2019
case "cycle-audio": CycleAudio(); break;
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-sub": LoadSubtitle(); break;
case "open-clipboard": OpenFromClipboard(); break;
case "open-conf-folder": ProcessHelp.ShellExecute(Core.ConfigFolder); break;
case "open-files": OpenFiles(args); break;
case "open-optical-media": Open_DVD_Or_BD_Folder(); break;
case "open-url": OpenFromClipboard(); break; // deprecated 2022
case "play-pause": PlayPause(); break;
case "playlist-add": PlaylistAdd(Convert.ToInt32(args[0])); break;
case "playlist-first": PlaylistFirst(); break;
case "playlist-last": PlaylistLast(); break;
case "quick-bookmark": QuickBookmark(); break;
case "reg-file-assoc": RegisterFileAssociations(args[0]); break;
case "scale-window": ScaleWindow(float.Parse(args[0], CultureInfo.InvariantCulture)); break;
case "select-profile": SelectProfile(); break;
case "shell-execute": ProcessHelp.ShellExecute(args[0]); break;
case "show-about": ShowDialog(typeof(AboutWindow)); break;
case "show-audio-devices": Msg.ShowInfo(Core.GetPropertyOsdString("audio-device-list")); break;
case "show-audio-tracks": ShowAudioTracks(); break;
case "show-chapters": ShowChapters(); break;
case "show-command-palette": ShowCommandPalette(); break;
case "show-commands": ShowCommands(); break;
case "show-conf-editor": ShowDialog(typeof(ConfWindow)); break;
case "show-decoders": ShowStrings(mpvHelp.GetDecoders().Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)); break;
case "show-demuxers": ShowStrings(mpvHelp.GetDemuxers().Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)); break;
case "show-history": ShowHistory(); break;
case "show-info": ShowInfo(); break;
case "show-input-editor": ShowDialog(typeof(InputWindow)); break;
case "show-keys": ShowStrings(Core.GetPropertyString("input-key-list").Split(',')); break;
case "show-media-info": ShowMediaInfo(args); break;
case "show-menu": ShowMenu(); break;
case "show-playlist": ShowPlaylist(); break;
case "show-profiles": Msg.ShowInfo(mpvHelp.GetProfiles()); break;
case "show-progress": ShowProgress(); break;
case "show-properties": ShowProperties(); break;
case "show-protocols": ShowStrings(mpvHelp.GetProtocols().Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)); break;
case "show-recent": ShowRecent(); break;
case "show-setup-dialog": ShowSetupDialog(); break; // deprecated 2022
case "show-subtitle-tracks": ShowSubtitleTracks(); 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;
}
}
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(() =>
{
Window win = Activator.CreateInstance(winType) as Window;
new WindowInteropHelper(win).Owner = MainForm.Instance.Handle;
win.ShowDialog();
});
public static void OpenFiles(params string[] args)
{
bool append = Control.ModifierKeys.HasFlag(Keys.Control);
foreach (string arg in args)
if (arg == "append")
append = true;
App.InvokeOnMainThread(new Action(() => {
using (var d = new OpenFileDialog() { Multiselect = true })
if (d.ShowDialog() == DialogResult.OK)
Core.LoadFiles(d.FileNames, true, append);
}));
}
public static void Open_DVD_Or_BD_Folder() => App.InvokeOnMainThread(() =>
{
var dialog = new FolderBrowser();
if (dialog.Show())
Core.LoadDiskFolder(dialog.SelectedPath);
});
public static void PlaylistFirst()
{
if (Core.PlaylistPos != 0)
Core.SetPropertyInt("playlist-pos", 0);
}
public static void PlaylistLast()
{
int count = Core.GetPropertyInt("playlist-count");
if (Core.PlaylistPos < count - 1)
Core.SetPropertyInt("playlist-pos", count - 1);
}
public static void PlayPause()
{
int count = Core.GetPropertyInt("playlist-count");
if (count > 0)
Core.Command("cycle pause");
else if (App.Settings.RecentFiles.Count > 0)
{
foreach (string i in App.Settings.RecentFiles)
{
if (i.Contains("://") || File.Exists(i))
{
Core.LoadFiles(new[] { i }, true, false);
break;
}
}
}
}
public static void ShowHistory()
{
if (File.Exists(Core.ConfigFolder + "history.txt"))
ProcessHelp.ShellExecute(Core.ConfigFolder + "history.txt");
else
{
if (Msg.ShowQuestion("Create history.txt file in config folder?" + BR2 +
"mpv.net will write the date, time and filename of opened files to it.") == MessageBoxResult.OK)
File.WriteAllText(Core.ConfigFolder + "history.txt", "");
}
}
static int LastShowInfo;
public static void ShowInfo()
{
if (Core.PlaylistPos == -1)
return;
if (Environment.TickCount - LastShowInfo < 5000)
{
Core.Command("script-message-to mpvnet show-media-info osd");
LastShowInfo = 0;
return;
}
LastShowInfo = Environment.TickCount;
string text;
long fileSize = 0;
string path = Core.GetPropertyString("path");
if (File.Exists(path))
{
fileSize = new FileInfo(path).Length;
if (CorePlayer.AudioTypes.Contains(path.Ext()))
{
text = Core.GetPropertyOsdString("filtered-metadata");
Core.CommandV("show-text", text, "5000");
return;
}
else if (CorePlayer.ImageTypes.Contains(path.Ext()))
{
text = "Width: " + Core.GetPropertyInt("width") + "\n" +
"Height: " + Core.GetPropertyInt("height") + "\n" +
"Size: " + Convert.ToInt32(fileSize / 1024.0) + " KB\n" +
"Type: " + path.Ext().ToUpper();
Core.CommandV("show-text", text, "5000");
return;
}
}
if (path.Contains("://")) path = Core.GetPropertyString("media-title");
string videoFormat = Core.GetPropertyString("video-format").ToUpper();
string audioCodec = Core.GetPropertyString("audio-codec-name").ToUpper();
int width = Core.GetPropertyInt("video-params/w");
int height = Core.GetPropertyInt("video-params/h");
TimeSpan len = TimeSpan.FromSeconds(Core.GetPropertyDouble("duration"));
text = path.FileName() + "\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}";
Core.CommandV("show-text", text, "5000");
}
static string FormatTime(double value) => ((int)value).ToString("00");
public static void ShowProgress()
{
TimeSpan position = TimeSpan.FromSeconds(Core.GetPropertyDouble("time-pos"));
TimeSpan duration = TimeSpan.FromSeconds(Core.GetPropertyDouble("duration"));
string text = FormatTime(position.TotalMinutes) + ":" +
FormatTime(position.Seconds) + " / " +
FormatTime(duration.TotalMinutes) + ":" +
FormatTime(duration.Seconds) + " " +
DateTime.Now.ToString("H:mm dddd d MMMM", CultureInfo.InvariantCulture);
Core.CommandV("show-text", text, "5000");
}
public static void OpenFromClipboard() => App.InvokeOnMainThread(() =>
{
if (WinForms.Clipboard.ContainsFileDropList())
{
string[] files = WinForms.Clipboard.GetFileDropList().Cast<string>().ToArray();
Core.LoadFiles(files, false, Control.ModifierKeys.HasFlag(Keys.Control));
}
else
{
string clipboard = WinForms.Clipboard.GetText();
List<string> files = new List<string>();
foreach (string i in clipboard.Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries))
if (i.Contains("://") || File.Exists(i))
files.Add(i);
if (files.Count == 0)
{
App.ShowError("The clipboard does not contain a valid URL or file.");
return;
}
Core.LoadFiles(files.ToArray(), false, Control.ModifierKeys.HasFlag(Keys.Control));
}
});
public static void LoadSubtitle() => App.InvokeOnMainThread(() =>
{
using (var d = new OpenFileDialog())
{
string path = Core.GetPropertyString("path");
if (File.Exists(path))
d.InitialDirectory = Path.GetDirectoryName(path);
d.Multiselect = true;
if (d.ShowDialog() == DialogResult.OK)
foreach (string filename in d.FileNames)
Core.CommandV("sub-add", filename);
}
});
public static void LoadAudio() => App.InvokeOnMainThread(() =>
{
using (var d = new OpenFileDialog())
{
string path = Core.GetPropertyString("path");
if (File.Exists(path))
d.InitialDirectory = Path.GetDirectoryName(path);
d.Multiselect = true;
if (d.ShowDialog() == DialogResult.OK)
foreach (string i in d.FileNames)
Core.CommandV("audio-add", i);
}
});
public static void CycleAudio()
{
Core.UpdateExternalTracks();
lock (Core.MediaTracksLock)
{
MediaTrack[] tracks = Core.MediaTracks.Where(track => track.Type == "a").ToArray();
if (tracks.Length < 1)
{
Core.CommandV("show-text", "No audio tracks");
return;
}
int aid = Core.GetPropertyInt("aid");
if (tracks.Length > 1)
{
if (++aid > tracks.Length)
aid = 1;
Core.CommandV("set", "aid", aid.ToString());
}
Core.CommandV("show-text", aid + "/" + tracks.Length + ": " + tracks[aid - 1].Text.Substring(3), "5000");
}
}
public static void ShowCommands()
{
string jsonString = Core.GetPropertyString("command-list");
var jsonObject = jsonString.FromJson<List<Dictionary<string, object>>>().OrderBy(i => i["name"]);
StringBuilder sb = new StringBuilder();
foreach (Dictionary<string, object> dic in jsonObject)
{
sb.AppendLine();
sb.AppendLine(dic["name"].ToString());
foreach (Dictionary<string, object> i2 in dic["args"] as List<object>)
{
string value = i2["name"].ToString() + " <" + i2["type"].ToString().ToLower() + ">";
if ((bool)i2["optional"] == true)
value = "[" + value + "]";
sb.AppendLine(" " + value);
}
}
ShowTextWithEditor("command-list", sb.ToString());
}
public static void ScaleWindow(float factor) => Core.RaiseScaleWindow(factor);
public static void WindowScale(float value) => Core.RaiseWindowScaleNET(value);
public static void ShowText(string text, int duration = 0, int fontSize = 0)
{
if (string.IsNullOrEmpty(text))
return;
if (duration == 0)
duration = Core.GetPropertyInt("osd-duration");
if (fontSize == 0)
fontSize = Core.GetPropertyInt("osd-font-size");
Core.Command("show-text \"${osd-ass-cc/0}{\\\\fs" + fontSize +
"}${osd-ass-cc/1}" + text + "\" " + duration);
}
public static void ShowMediaInfo(string[] args) => App.InvokeOnMainThread(() =>
{
if (args == null || args.Length == 0)
{
(string Name, string Value)[] pairs = {
("Show text box", "script-message-to mpvnet show-media-info default"),
("Show text editor", "script-message-to mpvnet show-media-info editor"),
("Show on screen", "script-message-to mpvnet show-media-info osd"),
("Show full", "script-message-to mpvnet show-media-info editor full"),
("Show raw", "script-message-to mpvnet 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 text = "";
bool full = args.Contains("full");
bool raw = args.Contains("raw");
bool editor = args.Contains("editor");
bool osd = args.Contains("osd");
if (App.MediaInfo && !osd && File.Exists(path) && !path.Contains(@"\\.\pipe\"))
using (MediaInfo mediaInfo = new MediaInfo(path))
text = Regex.Replace(mediaInfo.GetSummary(full, raw), "Unique ID.+", "");
else
{
Core.UpdateExternalTracks();
lock (Core.MediaTracksLock)
foreach (MediaTrack track in Core.MediaTracks)
text += track.Text + BR;
}
text = text.TrimEx();
if (editor)
ShowTextWithEditor("media-info", text);
else if (osd)
ShowText(text.Replace("\r", ""), 5000, 17);
else
{
MsgBoxEx.MessageBoxEx.MsgFontFamily = new FontFamily("Consolas");
Msg.ShowInfo(text);
MsgBoxEx.MessageBoxEx.MsgFontFamily = new FontFamily("Segoe UI");
}
});
public static void ShowCommandPalette() => App.InvokeOnMainThread(() =>
{
CommandPalette.Instance.SetItems(CommandPalette.GetItems());
MainForm.Instance.ShowCommandPalette();
CommandPalette.Instance.SelectFirst();
});
public static void ShowAudioTracks() => App.InvokeOnMainThread(() =>
{
Core.UpdateExternalTracks();
lock (Core.MediaTracksLock)
{
MediaTrack[] tracks = Core.MediaTracks.Where(track => track.Type == "a").ToArray();
if (tracks.Length < 1)
{
Core.CommandV("show-text", "No audio tracks");
return;
}
List<CommandPaletteItem> items = new List<CommandPaletteItem>();
foreach (MediaTrack i in tracks)
{
MediaTrack track = i;
CommandPaletteItem item = new CommandPaletteItem()
{
Text = track.Text,
Action = () => {
Core.CommandV("set", "aid", track.ID.ToString());
Core.CommandV("show-text", track.ID + "/" + tracks.Length + ": " +
tracks[track.ID - 1].Text.Substring(3), "5000");
}
};
items.Add(item);
}
CommandPalette.Instance.SetItems(items);
MainForm.Instance.ShowCommandPalette();
CommandPalette.Instance.SelectFirst();
}
});
public static void ShowSubtitleTracks() => App.InvokeOnMainThread(() =>
{
Core.UpdateExternalTracks();
lock (Core.MediaTracksLock)
{
MediaTrack[] tracks = Core.MediaTracks.Where(track => track.Type == "s").ToArray();
if (tracks.Length < 1)
{
Core.CommandV("show-text", "No subtitle tracks");
return;
}
List<CommandPaletteItem> items = new List<CommandPaletteItem>();
foreach (MediaTrack i in tracks)
{
MediaTrack track = i;
CommandPaletteItem item = new CommandPaletteItem()
{
Text = track.Text,
Action = () => {
Core.CommandV("set", "sid", track.ID.ToString());
Core.CommandV("show-text", track.ID + "/" + tracks.Length + ": " +
tracks[track.ID - 1].Text.Substring(3), "5000");
}
};
items.Add(item);
}
CommandPalette.Instance.SetItems(items);
MainForm.Instance.ShowCommandPalette();
CommandPalette.Instance.SelectFirst();
}
});
public static void ShowPlaylist() => App.InvokeOnMainThread(() =>
{
int count = Core.GetPropertyInt("playlist-count");
string currentPath = Core.GetPropertyString("path");
CommandPaletteItem currentItem = null;
if (count < 1)
return;
List<CommandPaletteItem> items = new List<CommandPaletteItem>();
for (int i = 0; i < count; i++)
{
int index = i;
string file = Core.GetPropertyString($"playlist/{i}/filename");
CommandPaletteItem item = new CommandPaletteItem()
{
Text = file.FileName(),
Action = () => Core.SetPropertyInt("playlist-pos", index)
};
items.Add(item);
if (currentPath.ToLowerEx() == file.ToLowerEx())
currentItem = item;
}
CommandPalette.Instance.SetItems(items);
if (currentItem != null)
{
CommandPalette.Instance.MainListView.SelectedItem = currentItem;
CommandPalette.Instance.MainListView.ScrollIntoView(
CommandPalette.Instance.MainListView.SelectedItem);
}
MainForm.Instance.ShowCommandPalette();
});
public static void ShowProperties() => App.InvokeOnMainThread(() =>
{
var props = Core.GetPropertyString("property-list").Split(',').OrderBy(prop => prop);
List<CommandPaletteItem> items = new List<CommandPaletteItem>();
foreach (string i in props)
{
string prop = i;
CommandPaletteItem item = new CommandPaletteItem()
{
Text = prop,
Action = () =>
{
string propValue = Core.GetPropertyString(prop);
if (propValue.ContainsEx("${"))
propValue += BR2 + Core.Expand(propValue);
App.ShowInfo(prop + "\n\n" + propValue);
}
};
items.Add(item);
}
CommandPalette.Instance.SetItems(items);
MainForm.Instance.ShowCommandPalette();
});
public static void ShowRecent() => App.InvokeOnMainThread(() =>
{
List<CommandPaletteItem> items = new List<CommandPaletteItem>();
foreach (string path in App.Settings.RecentFiles)
{
var file = App.GetTitleAndPath(path);
CommandPaletteItem item = new CommandPaletteItem()
{
Text = file.Title.ShortPath(60),
Action = () => Core.LoadFiles(new[] { file.Path }, true, Control.ModifierKeys.HasFlag(Keys.Control))
};
items.Add(item);
}
CommandPalette.Instance.SetItems(items);
MainForm.Instance.ShowCommandPalette();
CommandPalette.Instance.SelectFirst();
});
public static void RegisterFileAssociations(string perceivedType)
{
string[] extensions = { };
switch (perceivedType)
{
case "video": extensions = CorePlayer.VideoTypes; break;
case "audio": extensions = CorePlayer.AudioTypes; break;
case "image": extensions = CorePlayer.ImageTypes; break;
}
try
{
using (Process proc = new Process())
{
proc.StartInfo.FileName = WinForms.Application.ExecutablePath;
proc.StartInfo.Arguments = "--register-file-associations " +
perceivedType + " " + string.Join(" ", extensions);
proc.StartInfo.Verb = "runas";
proc.StartInfo.UseShellExecute = true;
proc.Start();
proc.WaitForExit();
if (proc.ExitCode == 0)
Msg.ShowInfo("File associations were successfully " +
(perceivedType == "unreg" ? "removed" : "created") +
".\n\nFile Explorer icons will refresh after process restart.");
else
Msg.ShowError("Error creating file associations.");
}
} catch { }
}
public static void ShowStrings(string[] strings) => App.InvokeOnMainThread(() =>
{
List<CommandPaletteItem> items = new List<CommandPaletteItem>();
foreach (string i in strings)
{
string str = i;
CommandPaletteItem item = new CommandPaletteItem()
{
Text = str,
Action = () => Msg.ShowInfo(str)
};
items.Add(item);
}
CommandPalette.Instance.SetItems(items);
MainForm.Instance.ShowCommandPalette();
CommandPalette.Instance.SelectFirst();
});
public static void ShowSetupDialog() => App.InvokeOnMainThread(() =>
{
(string Name, string Value)[] pairs = {
("Register video file associations", "script-message-to mpvnet reg-file-assoc video"),
("Register audio file associations", "script-message-to mpvnet reg-file-assoc audio"),
("Register image file associations", "script-message-to mpvnet reg-file-assoc image"),
("Unregister file associations", "script-message-to mpvnet reg-file-assoc unreg") };
var list = pairs.Select(i => new CommandPaletteItem(i.Name, () => Core.Command(i.Value)));
CommandPalette.Instance.SetItems(list);
MainForm.Instance.ShowCommandPalette();
CommandPalette.Instance.SelectFirst();
});
public static void SelectProfile() => App.InvokeOnMainThread(() =>
{
var items = Core.ProfileNames.Where(i => !i.StartsWith("extension."))
.Select(i => new CommandPaletteItem(i, () => {
Core.CommandV("show-text", i);
Core.CommandV("apply-profile", i);
}));
CommandPalette.Instance.SetItems(items);
MainForm.Instance.ShowCommandPalette();
CommandPalette.Instance.SelectFirst();
});
public static void ShowChapters() => App.InvokeOnMainThread(() =>
{
var items = Core.GetChapters().Select(i => new CommandPaletteItem(i.Title, i.TimeDisplay, () =>
Core.CommandV("seek", i.Time.ToString(CultureInfo.InvariantCulture), "absolute")));
CommandPalette.Instance.SetItems(items);
MainForm.Instance.ShowCommandPalette();
CommandPalette.Instance.SelectFirst();
});
public static void ShowMenu() => Core.RaiseShowMenu();
public static void PlaylistAdd(int value)
{
int pos = Core.PlaylistPos;
int count = Core.GetPropertyInt("playlist-count");
if (count < 2)
return;
pos = pos + value;
if (pos < 0)
pos = count - 1;
if (pos > count - 1)
pos = 0;
Core.SetPropertyInt("playlist-pos", pos);
}
public static void QuickBookmark()
{
if (App.QuickBookmark == 0)
{
App.QuickBookmark = (float)Core.GetPropertyDouble("time-pos");
if (App.QuickBookmark != 0)
Core.Command("show-text 'Bookmark Saved'");
}
else
{
Core.SetPropertyDouble("time-pos", App.QuickBookmark);
App.QuickBookmark = 0;
}
}
}
}

View File

@@ -1,69 +0,0 @@

using System.Collections.Generic;
using System.Linq;
namespace mpvnet
{
public class StringPair
{
public string Name { get; set; }
public string Value { get; set; }
}
public class ConfParser
{
public static List<ConfSection> Parse(string content)
{
string[] lines = content.Split("\r\n".ToCharArray());
var sections = new List<ConfSection>();
ConfSection currentGroup = null;
foreach (string i in lines)
{
string line = i.Trim();
if (string.IsNullOrEmpty(line))
continue;
if (line.StartsWith("[") && line.EndsWith("]"))
{
currentGroup = new ConfSection() { Name = line.TrimStart('[').TrimEnd(']') };
sections.Add(currentGroup);
}
else if (line.Contains("="))
{
string name = line.Substring(0, line.IndexOf("=")).Trim();
string value = line.Substring(line.IndexOf("=") + 1).Trim();
currentGroup.Items.Add(new StringPair() { Name = name, Value = value });
}
}
return sections;
}
}
public class ConfSection
{
public string Name { get; set; }
public List<StringPair> Items { get; set; } = new List<StringPair>();
public bool HasName(string name)
{
foreach (var i in Items)
if (i.Name == name)
return true;
return false;
}
public string GetValue(string name)
{
foreach (var i in Items)
if (i.Name == name)
return i.Value;
return null;
}
public List<StringPair> GetValues(string name) => Items.Where(i => i.Name == name).ToList();
}
}

View File

@@ -1,164 +0,0 @@

using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Navigation;
namespace mpvnet
{
public class Conf
{
public static List<SettingBase> LoadConf(string content)
{
List<SettingBase> settingsList = new List<SettingBase>();
foreach (ConfSection section in ConfParser.Parse(content))
{
SettingBase baseSetting = null;
if (section.HasName("option"))
{
OptionSetting optionSetting = new OptionSetting();
baseSetting = optionSetting;
optionSetting.Default = section.GetValue("default");
optionSetting.Value = optionSetting.Default;
foreach (var i in section.GetValues("option"))
{
var opt = new OptionSettingOption();
if (i.Value.Contains(" "))
{
opt.Name = i.Value.Substring(0, i.Value.IndexOf(" "));
opt.Help = i.Value.Substring(i.Value.IndexOf(" ")).Trim();
}
else
opt.Name = i.Value;
if (opt.Name == optionSetting.Default)
opt.Text = opt.Name + " (Default)";
opt.OptionSetting = optionSetting;
optionSetting.Options.Add(opt);
}
}
else
{
StringSetting stringSetting = new StringSetting();
baseSetting = stringSetting;
stringSetting.Default = section.HasName("default") ? section.GetValue("default") : "";
}
baseSetting.Name = section.GetValue("name");
baseSetting.File = section.GetValue("file");
baseSetting.Filter = section.GetValue("filter");
if (section.HasName("help")) baseSetting.Help = section.GetValue("help");
if (section.HasName("url")) baseSetting.URL = section.GetValue("url");
if (section.HasName("width")) baseSetting.Width = Convert.ToInt32(section.GetValue("width"));
if (section.HasName("type")) baseSetting.Type = section.GetValue("type");
if (baseSetting.Help.ContainsEx("\\n"))
baseSetting.Help = baseSetting.Help.Replace("\\n", "\n");
settingsList.Add(baseSetting);
}
return settingsList;
}
}
public class ConfItem
{
public string Comment { get; set; } = "";
public string File { get; set; } = "";
public string LineComment { get; set; } = "";
public string Name { get; set; } = "";
public string Section { get; set; } = "";
public string Value { get; set; } = "";
public bool IsSectionItem { get; set; }
public SettingBase SettingBase { get; set; }
}
public abstract class SettingBase
{
public string Default { get; set; }
public string File { get; set; }
public string Filter { get; set; }
public string Help { get; set; }
public string Name { get; set; }
public string StartValue { get; set; }
public string Type { get; set; }
public string URL { get; set; }
public string Value { get; set; }
public int Width { get; set; }
public ConfItem ConfItem { get; set; }
}
public class StringSetting : SettingBase
{
}
public class OptionSetting : SettingBase
{
public List<OptionSettingOption> Options = new List<OptionSettingOption>();
}
public class OptionSettingOption
{
public string Name { get; set; }
public string Help { get; set; }
public OptionSetting OptionSetting { get; set; }
string _Text;
public string Text
{
get => string.IsNullOrEmpty(_Text) ? Name : _Text;
set => _Text = value;
}
public bool Checked
{
get => OptionSetting.Value == Name ;
set {
if (value)
OptionSetting.Value = Name;
}
}
public Visibility Visibility
{
get => string.IsNullOrEmpty(Help) ? Visibility.Collapsed : Visibility.Visible;
}
}
interface ISettingControl
{
bool Contains(string searchString);
SettingBase SettingBase { get; }
}
public class HyperlinkEx : Hyperlink
{
void HyperLinkEx_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
ProcessHelp.ShellExecute(e.Uri.AbsoluteUri);
}
public void SetURL(string url)
{
if (string.IsNullOrEmpty(url))
return;
NavigateUri = new Uri(url);
RequestNavigate += HyperLinkEx_RequestNavigate;
Inlines.Clear();
Inlines.Add(url);
}
}
}

View File

@@ -1,46 +0,0 @@

using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.IO;
using static mpvnet.Global;
namespace mpvnet
{
public class Extension
{
[ImportMany]
public IEnumerable<IExtension> Extensions = null;
readonly CompositionContainer CompositionContainer;
public Extension()
{
try
{
AggregateCatalog catalog = new AggregateCatalog();
string dir = Core.ConfigFolder + "extensions";
if (Directory.Exists(dir))
foreach (string extDir in Directory.GetDirectories(dir))
catalog.Catalogs.Add(new DirectoryCatalog(extDir, Path.GetFileName(extDir) + ".dll"));
if (catalog.Catalogs.Count > 0)
{
CompositionContainer = new CompositionContainer(catalog);
CompositionContainer.ComposeParts(this);
}
}
catch (Exception ex)
{
App.ShowException(ex);
}
}
}
public interface IExtension
{
}
}

View File

@@ -1,132 +0,0 @@

using System.Globalization;
using System.IO;
using System.Text.RegularExpressions;
public static class TestStringExtension
{
public static bool ContainsEx(this string instance, string value)
{
if (instance != null && value != null)
return instance.Contains(value);
return false;
}
public static bool StartsWithEx(this string instance, string value)
{
if (instance != null && value != null)
return instance.StartsWith(value);
return false;
}
}
public static class ConvertToStringExtension
{
public static string ToUpperEx(this string instance)
{
if (instance != null)
return instance.ToUpperInvariant();
return "";
}
public static string ToLowerEx(this string instance)
{
if (instance != null)
return instance.ToLowerInvariant();
return "";
}
public static string TrimEx(this string instance)
{
if (instance == null)
return "";
return instance.Trim();
}
}
public static class ConvertStringExtension
{
public static int ToInt(this string instance)
{
int.TryParse(instance, out int result);
return result;
}
public static float ToFloat(this string instance)
{
float.TryParse(instance.Replace(",", "."), NumberStyles.Float,
CultureInfo.InvariantCulture, out float result);
return result;
}
}
public static class PathStringExtension
{
public static string Ext(this string filepath) => Ext(filepath, false);
public static string Ext(this string filepath, bool includeDot)
{
if (string.IsNullOrEmpty(filepath))
return "";
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)
{
if (string.IsNullOrEmpty(instance))
return "";
int index = instance.LastIndexOf('\\');
if (index > -1)
return instance.Substring(index + 1);
index = instance.LastIndexOf('/');
if (index > -1)
return instance.Substring(index + 1);
return instance;
}
public static string ShortPath(this string instance, int maxLength)
{
if (string.IsNullOrEmpty(instance))
return "";
if (instance.Length > maxLength && instance.Substring(1, 2) == ":\\")
instance = instance.Substring(0, 3) + "...\\" + instance.FileName();
return instance;
}
// Ensure trailing directory separator char
public static string AddSep(this string instance)
{
if (string.IsNullOrEmpty(instance))
return "";
if (!instance.EndsWith(Path.DirectorySeparatorChar.ToString()))
instance = instance + Path.DirectorySeparatorChar;
return instance;
}
}

View File

@@ -1,124 +0,0 @@

using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace mpvnet
{
public class FolderBrowser
{
public string SelectedPath { get; set; }
string _initialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
public string InitialDirectory {
get => _initialDirectory;
set {
if (Directory.Exists(value))
_initialDirectory = value;
}
}
public bool Show() => Show(GetOwnerHandle());
public bool Show(IntPtr hWndOwner)
{
ShowDialogResult result = VistaDialog.Show(hWndOwner, InitialDirectory);
if (result.Result)
SelectedPath = result.FileName;
return result.Result;
}
struct ShowDialogResult
{
public bool Result { get; set; }
public string FileName { get; set; }
}
public static IntPtr GetOwnerHandle()
{
IntPtr foregroundWindow = GetForegroundWindow();
GetWindowThreadProcessId(foregroundWindow, out var procID);
using (var proc = Process.GetCurrentProcess())
if (proc.Id == procID)
return foregroundWindow;
return IntPtr.Zero;
}
[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")]
public static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);
static class VistaDialog
{
const string foldersFilter = "Folders|\n";
const BindingFlags flags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
static Assembly windowsFormsAssembly = typeof(FileDialog).Assembly;
static Type iFileDialogType = windowsFormsAssembly.GetType("System.Windows.Forms.FileDialogNative+IFileDialog");
static MethodInfo createVistaDialogMethodInfo = typeof(OpenFileDialog).GetMethod("CreateVistaDialog", flags);
static MethodInfo onBeforeVistaDialogMethodInfo = typeof(OpenFileDialog).GetMethod("OnBeforeVistaDialog", flags);
static MethodInfo getOptionsMethodInfo = typeof(FileDialog).GetMethod("GetOptions", flags);
static MethodInfo setOptionsMethodInfo = iFileDialogType.GetMethod("SetOptions", flags);
static uint fosPickFoldersBitFlag = (uint)windowsFormsAssembly
.GetType("System.Windows.Forms.FileDialogNative+FOS")
.GetField("FOS_PICKFOLDERS")
.GetValue(null);
static ConstructorInfo vistaDialogEventsConstructorInfo = windowsFormsAssembly
.GetType("System.Windows.Forms.FileDialog+VistaDialogEvents")
.GetConstructor(flags, null, new[] { typeof(FileDialog) }, null);
static MethodInfo adviseMethodInfo = iFileDialogType.GetMethod("Advise");
static MethodInfo unAdviseMethodInfo = iFileDialogType.GetMethod("Unadvise");
static MethodInfo showMethodInfo = iFileDialogType.GetMethod("Show");
public static ShowDialogResult Show(IntPtr ownerHandle, string initialDirectory)
{
var openFileDialog = new OpenFileDialog
{
AddExtension = false,
CheckFileExists = false,
DereferenceLinks = true,
Filter = foldersFilter,
InitialDirectory = initialDirectory,
Multiselect = false,
};
var iFileDialog = createVistaDialogMethodInfo.Invoke(openFileDialog, new object[] { });
onBeforeVistaDialogMethodInfo.Invoke(openFileDialog, new[] { iFileDialog });
setOptionsMethodInfo.Invoke(iFileDialog, new object[] { (uint)getOptionsMethodInfo.Invoke(openFileDialog, new object[] { }) | fosPickFoldersBitFlag });
var adviseParametersWithOutputConnectionToken = new[] { vistaDialogEventsConstructorInfo.Invoke(new object[] { openFileDialog }), 0U };
adviseMethodInfo.Invoke(iFileDialog, adviseParametersWithOutputConnectionToken);
try
{
int retVal = (int)showMethodInfo.Invoke(iFileDialog, new object[] { ownerHandle });
return new ShowDialogResult
{
Result = retVal == 0,
FileName = openFileDialog.FileName
};
}
finally
{
unAdviseMethodInfo.Invoke(iFileDialog, new[] { adviseParametersWithOutputConnectionToken[1] });
}
}
}
class WindowWrapper : IWin32Window
{
IntPtr _handle;
public WindowWrapper(IntPtr handle) { _handle = handle; }
public IntPtr Handle => _handle;
}
}
}

View File

@@ -1,13 +0,0 @@

using System;
namespace mpvnet
{
public class Global
{
public static string BR = Environment.NewLine;
public static string BR2 = Environment.NewLine + Environment.NewLine;
public static CorePlayer Core { get; } = new CorePlayer();
}
}

View File

@@ -1,188 +0,0 @@

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Runtime.InteropServices;
using static mpvnet.Global;
namespace mpvnet
{
class GlobalHotkey
{
public static Dictionary<int, string> Commands { get; set; }
static int ID;
static IntPtr HWND;
public static void RegisterGlobalHotkeys(IntPtr hwnd)
{
HWND = hwnd;
string path = Core.ConfigFolder + "global-input.conf";
if (!File.Exists(path))
return;
foreach (string i in File.ReadAllLines(path))
{
string line = i.Trim();
if (line.StartsWith("#") || !line.Contains(" "))
continue;
ProcessGlobalHotkeyLine(line);
}
}
static void ProcessGlobalHotkeyLine(string line)
{
string key = line.Substring(0, line.IndexOf(" "));
string command = line.Substring(line.IndexOf(" ") + 1);
string[] parts = key.Split('+');
KeyModifiers mod = KeyModifiers.None;
int vk;
for (int i = 0; i < parts.Length - 1; i++)
{
string umod = parts[i].ToUpper();
if (umod == "ALT") mod |= KeyModifiers.Alt;
if (umod == "CTRL") mod |= KeyModifiers.Ctrl;
if (umod == "SHIFT") mod |= KeyModifiers.Shift;
if (umod == "WIN") mod |= KeyModifiers.Win;
}
key = parts[parts.Length - 1];
if (key.Length == 1)
{
short result = VkKeyScanEx(key[0], GetKeyboardLayout(0));
int hi = result >> 8;
int lo = result & 0xFF;
vk = lo;
if ((hi & 1) == 1) mod |= KeyModifiers.Shift;
if ((hi & 2) == 2) mod |= KeyModifiers.Ctrl;
if ((hi & 4) == 4) mod |= KeyModifiers.Alt;
}
else
vk = mpv_to_VK(key);
if (Commands == null)
Commands = new Dictionary<int, string>();
if (vk > 0)
{
Commands[ID] = command.Trim();
bool success = RegisterHotKey(HWND, ID++, mod, vk);
if (!success)
Terminal.WriteError(line + ": " + new Win32Exception().Message + "\n", "global-input.conf");
}
}
public static void Execute(int id)
{
if (Commands.ContainsKey(id))
Core.Command(Commands[id]);
}
static int mpv_to_VK(string value)
{
switch (value.ToUpperEx())
{
case "NEXT" : return 0xB0; // VK_MEDIA_NEXT_TRACK
case "PREV" : return 0xB1; // VK_MEDIA_PREV_TRACK
case "STOP" : return 0xB2; // VK_MEDIA_STOP
case "PLAYPAUSE" : return 0xB3; // VK_MEDIA_PLAY_PAUSE
case "SLEEP" : return 0x5F; // VK_SLEEP
case "RIGHT" : return 0x27; // VK_RIGHT
case "UP" : return 0x26; // VK_UP
case "LEFT" : return 0x25; // VK_LEFT
case "DOWN" : return 0x28; // VK_DOWN
case "PGUP" : return 0x21; // VK_PRIOR
case "PGDWN" : return 0x22; // VK_NEXT
case "PAUSE" : return 0x13; // VK_PAUSE
case "PRINT" : return 0x2A; // VK_PRINT
case "HOME" : return 0x24; // VK_HOME
case "INS" : return 0x2D; // VK_INSERT
case "KP_INS" : return 0x2D; // VK_INSERT
case "DEL" : return 0x2E; // VK_DELETE
case "KP_DEL" : return 0x2E; // VK_DELETE
case "END" : return 0x23; // VK_END
case "F1" : return 0x70; // VK_F1
case "F2" : return 0x71; // VK_F2
case "F3" : return 0x72; // VK_F3
case "F4" : return 0x73; // VK_F4
case "F5" : return 0x74; // VK_F5
case "F6" : return 0x75; // VK_F6
case "F7" : return 0x76; // VK_F7
case "F8" : return 0x77; // VK_F8
case "F9" : return 0x78; // VK_F9
case "F10" : return 0x79; // VK_F10
case "F11" : return 0x7A; // VK_F11
case "F12" : return 0x7B; // VK_F12
case "F13" : return 0x7C; // VK_F13
case "F14" : return 0x7D; // VK_F14
case "F15" : return 0x7E; // VK_F15
case "F16" : return 0x7F; // VK_F16
case "F17" : return 0x80; // VK_F17
case "F18" : return 0x81; // VK_F18
case "F19" : return 0x82; // VK_F19
case "F20" : return 0x83; // VK_F20
case "F21" : return 0x84; // VK_F21
case "F22" : return 0x85; // VK_F22
case "F23" : return 0x86; // VK_F23
case "F24" : return 0x87; // VK_F24
case "ENTER" : return 0x0D; // VK_RETURN
case "KP_ENTER" : return 0x0D; // VK_RETURN
case "TAB" : return 0x09; // VK_TAB
case "MENU" : return 0x5D; // VK_APPS
case "CANCEL" : return 0x03; // VK_CANCEL
case "BS" : return 0x08; // VK_BACK
case "KP_DEC" : return 0x6E; // VK_DECIMAL
case "ESC" : return 0x1B; // VK_ESCAPE
case "KP0" : return 0x60; // VK_NUMPAD0
case "KP1" : return 0x61; // VK_NUMPAD1
case "KP2" : return 0x62; // VK_NUMPAD2
case "KP3" : return 0x63; // VK_NUMPAD3
case "KP4" : return 0x64; // VK_NUMPAD4
case "KP5" : return 0x65; // VK_NUMPAD5
case "KP6" : return 0x66; // VK_NUMPAD6
case "KP7" : return 0x67; // VK_NUMPAD7
case "KP8" : return 0x68; // VK_NUMPAD8
case "KP9" : return 0x69; // VK_NUMPAD9
case "FAVORITES" : return 0xAB; // VK_BROWSER_FAVORITES
case "SEARCH" : return 0xAA; // VK_BROWSER_SEARCH
case "MAIL" : return 0xB4; // VK_LAUNCH_MAIL
case "VOLUME_UP" : return 0xAF; // VK_VOLUME_UP
case "VOLUME_DOWN": return 0xAE; // VK_VOLUME_DOWN
case "MUTE" : return 0xAD; // VK_VOLUME_MUTE
case "SPACE" : return 0x20; // VK_SPACE
case "IDEOGRAPHIC_SPACE": return 0x20; // VK_SPACE
default: return 0;
}
}
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
static extern short VkKeyScanEx(char ch, IntPtr dwhkl);
[DllImport("user32.dll")]
static extern IntPtr GetKeyboardLayout(uint idThread);
[DllImport("user32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
static extern bool RegisterHotKey(IntPtr hWnd, int id, KeyModifiers fsModifiers, int vk);
[Flags]
enum KeyModifiers
{
None = 0,
Alt = 1,
Ctrl = 2,
Shift = 4,
Win = 8
}
}
}

View File

@@ -1,217 +0,0 @@

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
using static mpvnet.Global;
namespace mpvnet
{
public static class StringHelp
{
public static string GetMD5Hash(string txt)
{
using (MD5 md5 = MD5.Create())
{
byte[] inputBuffer = Encoding.UTF8.GetBytes(txt);
byte[] hashBuffer = md5.ComputeHash(inputBuffer);
return BitConverter.ToString(md5.ComputeHash(inputBuffer)).Replace("-", "");
}
}
}
public static class FileHelp
{
public static void Delete(string path)
{
try {
if (File.Exists(path))
File.Delete(path);
} catch (Exception ex) {
Terminal.WriteError("Failed to delete file:" + BR + path + BR + ex.Message);
}
}
}
public static class ProcessHelp
{
public static void Execute(string file, string arguments = null)
{
using (Process proc = new Process())
{
proc.StartInfo.FileName = file;
proc.StartInfo.Arguments = arguments;
proc.StartInfo.UseShellExecute = false;
proc.Start();
}
}
public static void ShellExecute(string file, string arguments = null)
{
using (Process proc = new Process())
{
proc.StartInfo.FileName = file;
proc.StartInfo.Arguments = arguments;
proc.StartInfo.UseShellExecute = true;
proc.Start();
}
}
}
public class CursorHelp
{
static bool IsVisible = true;
public static void Show()
{
if (!IsVisible)
{
Cursor.Show();
IsVisible = true;
}
}
public static void Hide()
{
if (IsVisible)
{
Cursor.Hide();
IsVisible = false;
}
}
public static bool IsPosDifferent(Point screenPos)
{
return Math.Abs(screenPos.X - Control.MousePosition.X) > 10 ||
Math.Abs(screenPos.Y - Control.MousePosition.Y) > 10;
}
}
public class mpvHelp
{
public static string GetProfiles()
{
string json = Core.GetPropertyString("profile-list");
var o = json.FromJson<List<Dictionary<string, object>>>().OrderBy(i => i["name"]);
StringBuilder sb = new StringBuilder();
foreach (Dictionary<string, object> i in o)
{
sb.Append(i["name"].ToString() + BR2);
foreach (Dictionary<string, object> i2 in i["options"] as List<object>)
sb.AppendLine(" " + i2["key"] + " = " + i2["value"]);
sb.Append(BR);
}
return sb.ToString();
}
public static string GetDecoders()
{
string json = Core.GetPropertyString("decoder-list");
var o = json.FromJson<List<Dictionary<string, object>>>().OrderBy(i => i["codec"]);
StringBuilder sb = new StringBuilder();
foreach (Dictionary<string, object> i in o)
sb.AppendLine(i["codec"] + " - " + i["description"]);
return sb.ToString();
}
public static string GetProtocols()
{
string list = Core.GetPropertyString("protocol-list");
return string.Join(BR, list.Split(',').OrderBy(a => a));
}
public static string GetDemuxers()
{
string list = Core.GetPropertyString("demuxer-lavf-list");
return string.Join(BR, list.Split(',').OrderBy(a => a));
}
}
public class RegistryHelp
{
public static string ApplicationKey { get; } = @"HKCU\Software\" + Application.ProductName;
public static void SetInt(string name, object value)
{
SetValue(ApplicationKey, name, value);
}
public static void SetString(string name, string value)
{
SetValue(ApplicationKey, name, value);
}
public static void SetValue(string name, object value)
{
using (RegistryKey regKey = GetRootKey(ApplicationKey).CreateSubKey(ApplicationKey.Substring(5), RegistryKeyPermissionCheck.ReadWriteSubTree))
regKey.SetValue(name, value);
}
public static void SetValue(string path, string name, object value)
{
using (RegistryKey regKey = GetRootKey(path).CreateSubKey(path.Substring(5), RegistryKeyPermissionCheck.ReadWriteSubTree))
regKey.SetValue(name, value);
}
public static string GetString(string name, string defaultValue = "")
{
object value = GetValue(ApplicationKey, name, defaultValue);
return !(value is string) ? defaultValue : value.ToString();
}
public static int GetInt(string name, int defaultValue = 0)
{
object value = GetValue(ApplicationKey, name, defaultValue);
return !(value is int) ? defaultValue : (int)value;
}
public static object GetValue(string name) => GetValue(ApplicationKey, name, null);
public static object GetValue(string path, string name, object defaultValue = null)
{
using (RegistryKey regKey = GetRootKey(path).OpenSubKey(path.Substring(5)))
return regKey == null ? null : regKey.GetValue(name, defaultValue);
}
public static void RemoveKey(string path)
{
try {
GetRootKey(path).DeleteSubKeyTree(path.Substring(5), false);
} catch { }
}
public static void RemoveValue(string path, string name)
{
try {
using (RegistryKey regKey = GetRootKey(path).OpenSubKey(path.Substring(5), true))
if (regKey != null)
regKey.DeleteValue(name, false);
} catch { }
}
static RegistryKey GetRootKey(string path)
{
switch (path.Substring(0, 4))
{
case "HKLM": return Registry.LocalMachine;
case "HKCU": return Registry.CurrentUser;
case "HKCR": return Registry.ClassesRoot;
default: throw new Exception();
}
}
}
}

View File

@@ -1,415 +0,0 @@

// https://github.com/zanders3/json
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text;
namespace mpvnet
{
public static class JSONParser
{
[ThreadStatic] static Stack<List<string>> splitArrayPool;
[ThreadStatic] static StringBuilder stringBuilder;
[ThreadStatic] static Dictionary<Type, Dictionary<string, FieldInfo>> fieldInfoCache;
[ThreadStatic] static Dictionary<Type, Dictionary<string, PropertyInfo>> propertyInfoCache;
public static T FromJson<T>(this string json)
{
// Initialize, if needed, the ThreadStatic variables
if (propertyInfoCache == null)
propertyInfoCache = new Dictionary<Type, Dictionary<string, PropertyInfo>>();
if (fieldInfoCache == null)
fieldInfoCache = new Dictionary<Type, Dictionary<string, FieldInfo>>();
if (stringBuilder == null)
stringBuilder = new StringBuilder();
if (splitArrayPool == null)
splitArrayPool = new Stack<List<string>>();
//Remove all whitespace not within strings to make parsing simpler
stringBuilder.Length = 0;
for (int i = 0; i < json.Length; i++)
{
char c = json[i];
if (c == '"')
{
i = AppendUntilStringEnd(true, i, json);
continue;
}
if (char.IsWhiteSpace(c))
continue;
stringBuilder.Append(c);
}
//Parse the thing!
return (T)ParseValue(typeof(T), stringBuilder.ToString());
}
static int AppendUntilStringEnd(bool appendEscapeCharacter, int startIdx, string json)
{
stringBuilder.Append(json[startIdx]);
for (int i = startIdx + 1; i < json.Length; i++)
{
if (json[i] == '\\')
{
if (appendEscapeCharacter)
stringBuilder.Append(json[i]);
stringBuilder.Append(json[i + 1]);
i++;//Skip next character as it is escaped
}
else if (json[i] == '"')
{
stringBuilder.Append(json[i]);
return i;
}
else
stringBuilder.Append(json[i]);
}
return json.Length - 1;
}
//Splits { <value>:<value>, <value>:<value> } and [ <value>, <value> ] into a list of <value> strings
static List<string> Split(string json)
{
List<string> splitArray = splitArrayPool.Count > 0 ? splitArrayPool.Pop() : new List<string>();
splitArray.Clear();
if (json.Length == 2)
return splitArray;
int parseDepth = 0;
stringBuilder.Length = 0;
for (int i = 1; i < json.Length - 1; i++)
{
switch (json[i])
{
case '[':
case '{':
parseDepth++;
break;
case ']':
case '}':
parseDepth--;
break;
case '"':
i = AppendUntilStringEnd(true, i, json);
continue;
case ',':
case ':':
if (parseDepth == 0)
{
splitArray.Add(stringBuilder.ToString());
stringBuilder.Length = 0;
continue;
}
break;
}
stringBuilder.Append(json[i]);
}
splitArray.Add(stringBuilder.ToString());
return splitArray;
}
internal static object ParseValue(Type type, string json)
{
if (type == typeof(string))
{
if (json.Length <= 2)
return string.Empty;
StringBuilder parseStringBuilder = new StringBuilder(json.Length);
for (int i = 1; i < json.Length - 1; ++i)
{
if (json[i] == '\\' && i + 1 < json.Length - 1)
{
int j = "\"\\nrtbf/".IndexOf(json[i + 1]);
if (j >= 0)
{
parseStringBuilder.Append("\"\\\n\r\t\b\f/"[j]);
++i;
continue;
}
if (json[i + 1] == 'u' && i + 5 < json.Length - 1)
{
uint c = 0;
if (uint.TryParse(json.Substring(i + 2, 4), System.Globalization.NumberStyles.AllowHexSpecifier, null, out c))
{
parseStringBuilder.Append((char)c);
i += 5;
continue;
}
}
}
parseStringBuilder.Append(json[i]);
}
return parseStringBuilder.ToString();
}
if (type.IsPrimitive)
{
var result = Convert.ChangeType(json, type, System.Globalization.CultureInfo.InvariantCulture);
return result;
}
if (type == typeof(decimal))
{
decimal result;
decimal.TryParse(json, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out result);
return result;
}
if (json == "null")
return null;
if (type.IsEnum)
{
if (json[0] == '"')
json = json.Substring(1, json.Length - 2);
try
{
return Enum.Parse(type, json, false);
}
catch
{
return 0;
}
}
if (type.IsArray)
{
Type arrayType = type.GetElementType();
if (json[0] != '[' || json[json.Length - 1] != ']')
return null;
List<string> elems = Split(json);
Array newArray = Array.CreateInstance(arrayType, elems.Count);
for (int i = 0; i < elems.Count; i++)
newArray.SetValue(ParseValue(arrayType, elems[i]), i);
splitArrayPool.Push(elems);
return newArray;
}
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(List<>))
{
Type listType = type.GetGenericArguments()[0];
if (json[0] != '[' || json[json.Length - 1] != ']')
return null;
List<string> elems = Split(json);
var list = (IList)type.GetConstructor(new Type[] { typeof(int) }).Invoke(new object[] { elems.Count });
for (int i = 0; i < elems.Count; i++)
list.Add(ParseValue(listType, elems[i]));
splitArrayPool.Push(elems);
return list;
}
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Dictionary<,>))
{
Type keyType, valueType;
{
Type[] args = type.GetGenericArguments();
keyType = args[0];
valueType = args[1];
}
//Refuse to parse dictionary keys that aren't of type string
if (keyType != typeof(string))
return null;
//Must be a valid dictionary element
if (json[0] != '{' || json[json.Length - 1] != '}')
return null;
//The list is split into key/value pairs only, this means the split must be divisible by 2 to be valid JSON
List<string> elems = Split(json);
if (elems.Count % 2 != 0)
return null;
var dictionary = (IDictionary)type.GetConstructor(new Type[] { typeof(int) }).Invoke(new object[] { elems.Count / 2 });
for (int i = 0; i < elems.Count; i += 2)
{
if (elems[i].Length <= 2)
continue;
string keyValue = elems[i].Substring(1, elems[i].Length - 2);
object val = ParseValue(valueType, elems[i + 1]);
dictionary[keyValue] = val;
}
return dictionary;
}
if (type == typeof(object))
return ParseAnonymousValue(json);
if (json[0] == '{' && json[json.Length - 1] == '}')
return ParseObject(type, json);
return null;
}
static object ParseAnonymousValue(string json)
{
if (json.Length == 0)
return null;
if (json[0] == '{' && json[json.Length - 1] == '}')
{
List<string> elems = Split(json);
if (elems.Count % 2 != 0)
return null;
var dict = new Dictionary<string, object>(elems.Count / 2);
for (int i = 0; i < elems.Count; i += 2)
dict[elems[i].Substring(1, elems[i].Length - 2)] = ParseAnonymousValue(elems[i + 1]);
return dict;
}
if (json[0] == '[' && json[json.Length - 1] == ']')
{
List<string> items = Split(json);
var finalList = new List<object>(items.Count);
for (int i = 0; i < items.Count; i++)
finalList.Add(ParseAnonymousValue(items[i]));
return finalList;
}
if (json[0] == '"' && json[json.Length - 1] == '"')
{
string str = json.Substring(1, json.Length - 2);
return str.Replace("\\", string.Empty);
}
if (char.IsDigit(json[0]) || json[0] == '-')
{
if (json.Contains("."))
{
double result;
double.TryParse(json, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out result);
return result;
}
else
{
int result;
int.TryParse(json, out result);
return result;
}
}
if (json == "true")
return true;
if (json == "false")
return false;
// handles json == "null" as well as invalid JSON
return null;
}
static Dictionary<string, T> CreateMemberNameDictionary<T>(T[] members) where T : MemberInfo
{
Dictionary<string, T> nameToMember = new Dictionary<string, T>(StringComparer.OrdinalIgnoreCase);
for (int i = 0; i < members.Length; i++)
{
T member = members[i];
if (member.IsDefined(typeof(IgnoreDataMemberAttribute), true))
continue;
string name = member.Name;
if (member.IsDefined(typeof(DataMemberAttribute), true))
{
DataMemberAttribute dataMemberAttribute = (DataMemberAttribute)Attribute.GetCustomAttribute(member, typeof(DataMemberAttribute), true);
if (!string.IsNullOrEmpty(dataMemberAttribute.Name))
name = dataMemberAttribute.Name;
}
nameToMember.Add(name, member);
}
return nameToMember;
}
static object ParseObject(Type type, string json)
{
object instance = FormatterServices.GetUninitializedObject(type);
//The list is split into key/value pairs only, this means the split must be divisible by 2 to be valid JSON
List<string> elems = Split(json);
if (elems.Count % 2 != 0)
return instance;
Dictionary<string, FieldInfo> nameToField;
Dictionary<string, PropertyInfo> nameToProperty;
if (!fieldInfoCache.TryGetValue(type, out nameToField))
{
nameToField = CreateMemberNameDictionary(type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.FlattenHierarchy));
fieldInfoCache.Add(type, nameToField);
}
if (!propertyInfoCache.TryGetValue(type, out nameToProperty))
{
nameToProperty = CreateMemberNameDictionary(type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.FlattenHierarchy));
propertyInfoCache.Add(type, nameToProperty);
}
for (int i = 0; i < elems.Count; i += 2)
{
if (elems[i].Length <= 2)
continue;
string key = elems[i].Substring(1, elems[i].Length - 2);
string value = elems[i + 1];
FieldInfo fieldInfo;
PropertyInfo propertyInfo;
if (nameToField.TryGetValue(key, out fieldInfo))
fieldInfo.SetValue(instance, ParseValue(fieldInfo.FieldType, value));
else if (nameToProperty.TryGetValue(key, out propertyInfo))
propertyInfo.SetValue(instance, ParseValue(propertyInfo.PropertyType, value), null);
}
return instance;
}
}
}

View File

@@ -1,315 +0,0 @@

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Windows.Forms;
using Microsoft.Win32;
using static mpvnet.Global;
namespace mpvnet
{
public class Sys
{
public static bool IsDarkTheme {
get {
object value = Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", "AppsUseLightTheme", 1);
if (value is null)
value = 1;
return (int)value == 0;
}
}
}
public class StringLogicalComparer : IComparer, IComparer<string>
{
[DllImport("shlwapi.dll", CharSet = CharSet.Unicode)]
public static extern int StrCmpLogical(string x, string y);
int IComparer_Compare(object x, object y) => StrCmpLogical(x.ToString(), y.ToString());
int IComparer.Compare(object x, object y) => IComparer_Compare(x, y);
int IComparerOfString_Compare(string x, string y) => StrCmpLogical(x, y);
int IComparer<string>.Compare(string x, string y) => IComparerOfString_Compare(x, y);
}
public class Input
{
public static string WM_APPCOMMAND_to_mpv_key(int value)
{
switch (value)
{
case 5: return "SEARCH"; // BROWSER_SEARCH
case 6: return "FAVORITES"; // BROWSER_FAVORITES
case 7: return "HOMEPAGE"; // BROWSER_HOME
case 15: return "MAIL"; // LAUNCH_MAIL
case 33: return "PRINT"; // PRINT
case 11: return "NEXT"; // MEDIA_NEXTTRACK
case 12: return "PREV"; // MEDIA_PREVIOUSTRACK
case 13: return "STOP"; // MEDIA_STOP
case 14: return "PLAYPAUSE"; // MEDIA_PLAY_PAUSE
case 46: return "PLAY"; // MEDIA_PLAY
case 47: return "PAUSE"; // MEDIA_PAUSE
case 48: return "RECORD"; // MEDIA_RECORD
case 49: return "FORWARD"; // MEDIA_FAST_FORWARD
case 50: return "REWIND"; // MEDIA_REWIND
case 51: return "CHANNEL_UP"; // MEDIA_CHANNEL_UP
case 52: return "CHANNEL_DOWN"; // MEDIA_CHANNEL_DOWN
}
return null;
}
}
public class FileAssociation
{
static string ExePath = Application.ExecutablePath;
static string ExeFilename = Path.GetFileName(Application.ExecutablePath);
static string ExeFilenameNoExt = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
public static void Register(string perceivedType, string[] extensions)
{
string[] protocols = { "ytdl", "rtsp", "srt", "srtp" };
if (perceivedType != "unreg")
{
foreach (string i in protocols)
{
RegistryHelp.SetValue($@"HKCR\{i}", $"{i.ToUpper()} Protocol", "");
RegistryHelp.SetValue($@"HKCR\{i}\shell\open\command", null, $"\"{ExePath}\" \"%1\"");
}
RegistryHelp.SetValue(@"HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\" + ExeFilename, null, ExePath);
RegistryHelp.SetValue(@"HKCR\Applications\" + ExeFilename, "FriendlyAppName", "mpv.net media player");
RegistryHelp.SetValue(@"HKCR\Applications\" + ExeFilename + @"\shell\open\command", null, $"\"{ExePath}\" \"%1\"");
RegistryHelp.SetValue(@"HKCR\SystemFileAssociations\video\OpenWithList\" + ExeFilename, null, "");
RegistryHelp.SetValue(@"HKCR\SystemFileAssociations\audio\OpenWithList\" + ExeFilename, null, "");
RegistryHelp.SetValue(@"HKLM\SOFTWARE\RegisteredApplications", "mpv.net", @"SOFTWARE\Clients\Media\mpv.net\Capabilities");
RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities", "ApplicationDescription", "mpv.net media player");
RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities", "ApplicationName", "mpv.net");
foreach (string ext in extensions)
{
RegistryHelp.SetValue(@"HKCR\Applications\" + ExeFilename + @"\SupportedTypes", "." + ext, "");
RegistryHelp.SetValue(@"HKCR\" + "." + ext, null, ExeFilenameNoExt + "." + ext);
RegistryHelp.SetValue(@"HKCR\" + "." + ext + @"\OpenWithProgIDs", ExeFilenameNoExt + "." + ext, "");
RegistryHelp.SetValue(@"HKCR\" + "." + ext, "PerceivedType", perceivedType);
RegistryHelp.SetValue(@"HKCR\" + ExeFilenameNoExt + "." + ext + @"\shell\open\command", null, $"\"{ExePath}\" \"%1\"");
RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities\FileAssociations", "." + ext, ExeFilenameNoExt + "." + ext);
}
}
else
{
foreach (string i in protocols)
RegistryHelp.RemoveKey($@"HKCR\{i}");
RegistryHelp.RemoveKey(@"HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\" + ExeFilename);
RegistryHelp.RemoveKey(@"HKCR\Applications\" + ExeFilename);
RegistryHelp.RemoveKey(@"HKLM\SOFTWARE\Clients\Media\mpv.net");
RegistryHelp.RemoveKey(@"HKCR\SystemFileAssociations\video\OpenWithList\" + ExeFilename);
RegistryHelp.RemoveKey(@"HKCR\SystemFileAssociations\audio\OpenWithList\" + ExeFilename);
RegistryHelp.RemoveValue(@"HKLM\SOFTWARE\RegisteredApplications", "mpv.net");
foreach (string id in Registry.ClassesRoot.GetSubKeyNames())
{
if (id.StartsWith(ExeFilenameNoExt + "."))
Registry.ClassesRoot.DeleteSubKeyTree(id);
RegistryHelp.RemoveValue($@"HKCR\Software\Classes\{id}\OpenWithProgIDs", ExeFilenameNoExt + id);
RegistryHelp.RemoveValue($@"HKLM\Software\Classes\{id}\OpenWithProgIDs", ExeFilenameNoExt + id);
}
}
}
}
public class MediaTrack
{
public int ID { get; set; }
public bool External { get; set; }
public string Text { get; set; } = "";
public string Type { get; set; }
}
public class CommandItem : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public string Path { get; set; } = "";
public string Command { get; set; } = "";
public string Display {
get {
if (string.IsNullOrEmpty(Path))
{
if (Command.Length > 47)
return Command.Substring(0, 47) + "...";
return Command;
}
else
return Path;
}
}
public CommandItem() { }
public CommandItem(SerializationInfo info, StreamingContext context) { }
void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
string _Input = "";
public string Input {
get => _Input;
set {
_Input = value;
NotifyPropertyChanged();
}
}
public string Alias {
get {
if (Input.Contains("SHARP") || Input.Contains("sharp") || Input.Contains("Sharp"))
return "#";
return null;
}
}
public static ObservableCollection<CommandItem> GetItems(string content)
{
var items = new ObservableCollection<CommandItem>();
if (!string.IsNullOrEmpty(content))
{
foreach (string line in content.Split('\r', '\n'))
{
string val = line.Trim();
if (val.StartsWith("#"))
continue;
if (!val.Contains(" "))
continue;
CommandItem item = new CommandItem();
item.Input = val.Substring(0, val.IndexOf(" "));
if (item.Input == "_")
item.Input = "";
val = val.Substring(val.IndexOf(" ") + 1);
if (val.Contains("#menu:"))
{
item.Path = val.Substring(val.IndexOf("#menu:") + 6).Trim();
val = val.Substring(0, val.IndexOf("#menu:"));
if (item.Path.Contains(";"))
item.Path = item.Path.Substring(item.Path.IndexOf(";") + 1).Trim();
}
item.Command = val.Trim();
if (item.Command == "")
continue;
if (item.Command.ToLower() == "ignore")
item.Command = "";
items.Add(item);
}
}
return items;
}
static ObservableCollection<CommandItem> _Items;
public static ObservableCollection<CommandItem> Items {
get {
if (_Items is null)
_Items = GetItems(File.ReadAllText(Core.InputConfPath));
return _Items;
}
}
}
public class Folder
{
public static string Startup { get; } = Application.StartupPath.AddSep();
public static string AppData { get; } = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).AddSep();
}
public class CommandPaletteItem
{
public CommandPaletteItem() {}
public CommandPaletteItem(string text, Action action)
{
Text = text;
Action = action;
}
public CommandPaletteItem(string text, string secondaryText, Action action)
{
Text = text;
Action = action;
SecondaryText = secondaryText;
}
public string Text { get; set; } = "";
public string SecondaryText { get; set; } = "";
public Action Action { get; set; }
public CommandItem CommandItem { get; set; }
}
public class CommandPalette
{
public static CommandPaletteControl Instance { get; } = new CommandPaletteControl();
public static IEnumerable<CommandPaletteItem> GetItems()
{
return CommandItem.Items
.Where(i => i.Command != "")
.Select(i => new CommandPaletteItem() {
Text = i.Display,
SecondaryText = i.Input,
Action = () => Core.Command(i.Command),
CommandItem = i
});
}
}
public class Chapter
{
public string Title { get; set; }
public double Time { get; set; }
string _TimeDisplay;
public string TimeDisplay {
get {
if (_TimeDisplay == null)
{
_TimeDisplay = TimeSpan.FromSeconds(Time).ToString();
if (_TimeDisplay.ContainsEx("."))
_TimeDisplay = _TimeDisplay.Substring(0, _TimeDisplay.LastIndexOf("."));
}
return _TimeDisplay;
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,243 +0,0 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Threading;
using static mpvnet.Global;
namespace mpvnet
{
public class PowerShell
{
public Runspace Runspace { get; set; }
public Pipeline Pipeline { get; set; }
public string Module { get; set; }
public bool Print { get; set; }
public List<string> Scripts { get; } = new List<string>();
public List<KeyValuePair<string, object>> Variables = new List<KeyValuePair<string, object>>();
public string[] Arguments { get; }
public event Action<string, object[]> Event;
public event Action<string, object> PropertyChanged;
public List<KeyValuePair<string, ScriptBlock>> EventHandlers = new List<KeyValuePair<string, ScriptBlock>>();
public List<KeyValuePair<string, ScriptBlock>> PropChangedHandlers = new List<KeyValuePair<string, ScriptBlock>>();
public static List<PowerShell> References { get; } = new List<PowerShell>();
public object Invoke() => Invoke(null, null);
public object Invoke(string variable, object obj)
{
try
{
Runspace = RunspaceFactory.CreateRunspace();
Runspace.ApartmentState = ApartmentState.STA;
Runspace.Open();
Pipeline = Runspace.CreatePipeline();
foreach (string script in Scripts)
Pipeline.Commands.AddScript(script);
if (Arguments != null)
foreach (string param in Arguments)
foreach (Command command in Pipeline.Commands)
command.Parameters.Add(null, param);
Runspace.SessionStateProxy.SetVariable("mp", this);
foreach (var i in Variables)
Runspace.SessionStateProxy.SetVariable(i.Key, i.Value);
if (!string.IsNullOrEmpty(variable))
Runspace.SessionStateProxy.SetVariable(variable, obj);
if (Print)
{
Pipeline.Output.DataReady += Output_DataReady;
Pipeline.Error.DataReady += Error_DataReady;
}
return Pipeline.Invoke();
}
catch (RuntimeException e)
{
string message = e.Message + BR + BR + e.ErrorRecord.ScriptStackTrace.Replace(
" <ScriptBlock>, <No file>", "") + BR + BR + Module + BR;
throw new PowerShellException(message);
}
catch (Exception e)
{
throw e;
}
}
public static string InvokeAndReturnString(string code, string varName, object varValue)
{
PowerShell ps = new PowerShell() { Print = false };
ps.Scripts.Add(code);
string ret = string.Join(Environment.NewLine, (ps.Invoke(varName, varValue)
as IEnumerable<object>).Select(item => item.ToString())).ToString();
ps.Runspace.Dispose();
return ret;
}
public void Output_DataReady(object sender, EventArgs e)
{
var output = sender as PipelineReader<PSObject>;
while (output.Count > 0)
Terminal.Write(output.Read(), Module);
}
public void Error_DataReady(object sender, EventArgs e)
{
var output = sender as PipelineReader<object>;
while (output.Count > 0)
Terminal.WriteError(output.Read(), Module);
}
public void RedirectStreams(PSEventJob job)
{
if (Print)
{
job.Output.DataAdded += Output_DataAdded;
job.Error.DataAdded += Error_DataAdded;
}
}
public void CommandV(params string[] args) => Core.CommandV(args);
public void Command(string command) => Core.Command(command);
public bool GetPropertyBool(string name) => Core.GetPropertyBool(name);
public void SetPropertyBool(string name, bool value) => Core.SetPropertyBool(name, value);
public int GetPropertyInt(string name) => Core.GetPropertyInt(name);
public void SetPropertyInt(string name, int value) => Core.SetPropertyInt(name, value);
public double GetPropertyDouble(string name) => Core.GetPropertyDouble(name);
public void SetPropertyDouble(string name, double value) => Core.SetPropertyDouble(name, value);
public string GetPropertyString(string name) => Core.GetPropertyString(name);
public void SetPropertyString(string name, string value) => Core.SetPropertyString(name, value);
public void ObserveProperty(string name, string type, ScriptBlock sb)
{
PropChangedHandlers.Add(new KeyValuePair<string, ScriptBlock>(name, sb));
switch (type)
{
case "bool": case "boolean":
Core.ObservePropertyBool(name, value => App.RunTask(() => PropertyChanged.Invoke(name, value)));
break;
case "string":
Core.ObservePropertyString(name, value => App.RunTask(() => PropertyChanged.Invoke(name, value)));
break;
case "int": case "integer":
Core.ObservePropertyInt(name, value => App.RunTask(() => PropertyChanged.Invoke(name, value)));
break;
case "float": case "double":
Core.ObservePropertyDouble(name, value => App.RunTask(() => PropertyChanged.Invoke(name, value)));
break;
case "nil": case "none": case "native":
Core.ObserveProperty(name, () => App.RunTask(() => PropertyChanged.Invoke(name, null)));
break;
default:
App.ShowError("Invalid Type, valid types are: bool or boolean, string, int or integer, float or double, nil or none or native");
break;
}
}
public void RegisterEvent(string name, ScriptBlock sb)
{
EventHandlers.Add(new KeyValuePair<string, ScriptBlock>(name, sb));
switch (name)
{
case "log-message":
Core.LogMessageAsync += (level, msg) => Event.Invoke("log-message", new object[] { level, msg });
break;
case "end-file":
Core.EndFileAsync += reason => Event.Invoke("end-file", new object[] { reason });
break;
case "client-message":
Core.ClientMessageAsync += args => Event.Invoke("client-message", args);
break;
case "shutdown":
Core.Shutdown += () => Event.Invoke("shutdown", null);
break;
case "get-property-reply":
Core.GetPropertyReplyAsync += () => Event.Invoke("get-property-reply", null);
break;
case "set-property-reply":
Core.SetPropertyReplyAsync += () => Event.Invoke("set-property-reply", null);
break;
case "command-reply":
Core.CommandReplyAsync += () => Event.Invoke("command-reply", null);
break;
case "start-file":
Core.StartFileAsync += () => Event.Invoke("start-file", null);
break;
case "file-loaded":
Core.FileLoadedAsync += () => Event.Invoke("file-loaded", null);
break;
case "video-reconfig":
Core.VideoReconfigAsync += () => Event.Invoke("video-reconfig", null);
break;
case "audio-reconfig":
Core.AudioReconfigAsync += () => Event.Invoke("audio-reconfig", null);
break;
case "seek":
Core.SeekAsync += () => Event.Invoke("seek", null);
break;
case "playback-restart":
Core.PlaybackRestartAsync += () => Event.Invoke("playback-restart", null);
break;
}
}
void Output_DataAdded(object sender, DataAddedEventArgs e)
{
var output = sender as PSDataCollection<PSObject>;
Terminal.Write(output[e.Index], Module);
}
void Error_DataAdded(object sender, DataAddedEventArgs e)
{
var error = sender as PSDataCollection<ErrorRecord>;
Terminal.WriteError(error[e.Index], Module);
}
}
public class PowerShellException : Exception
{
public PowerShellException(string message) : base(message)
{
}
}
}

View File

@@ -1,97 +0,0 @@

using System;
using System.Windows.Forms;
using System.Linq;
using System.Collections.Generic;
using System.Threading;
using System.Diagnostics;
namespace mpvnet
{
static class Program
{
[STAThread]
static void Main()
{
try
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (App.IsTerminalAttached)
Native.AttachConsole(-1 /*ATTACH_PARENT_PROCESS*/);
string[] args = Environment.GetCommandLineArgs().Skip(1).ToArray();
if (args.Length > 0 && args[0] == "--register-file-associations")
{
FileAssociation.Register(args[1], args.Skip(1).ToArray());
return;
}
App.Init();
Mutex mutex = new Mutex(true, StringHelp.GetMD5Hash(App.ConfPath), out bool isFirst);
if ((App.ProcessInstance == "single" || App.ProcessInstance == "queue") && !isFirst)
{
List<string> args2 = new List<string>();
args2.Add(App.ProcessInstance);
foreach (string arg in args)
{
if (!arg.StartsWith("--") && (arg == "-" || arg.Contains("://") ||
arg.Contains(":\\") || arg.StartsWith("\\\\")))
args2.Add(arg);
else if (arg == "--queue")
args2[0] = "queue";
else if (arg.StartsWith("--command="))
{
args2[0] = "command";
args2.Add(arg.Substring(10));
}
}
Process[] procs = Process.GetProcessesByName("mpvnet");
for (int i = 0; i < 20; i++)
{
foreach (Process proc in procs)
{
if (proc.MainWindowHandle != IntPtr.Zero)
{
Native.AllowSetForegroundWindow(proc.Id);
var data = new Native.COPYDATASTRUCT();
data.lpData = string.Join("\n", args2.ToArray());
data.cbData = data.lpData.Length * 2 + 1;
Native.SendMessage(proc.MainWindowHandle, 0x004A /*WM_COPYDATA*/, IntPtr.Zero, ref data);
mutex.Dispose();
if (App.IsTerminalAttached)
Native.FreeConsole();
return;
}
}
Thread.Sleep(50);
}
mutex.Dispose();
return;
}
Application.Run(new MainForm());
if (App.IsTerminalAttached)
Native.FreeConsole();
mutex.Dispose();
}
catch (Exception ex)
{
Msg.ShowException(ex);
}
}
}
}

View File

@@ -1,69 +0,0 @@

using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using System.Xml;
using static mpvnet.Global;
namespace mpvnet
{
[Serializable()]
public class AppSettings
{
public bool InputDefaultBindingsFixApplied;
public bool ShowMenuFixApplied;
public int Volume = 70;
public List<string> RecentFiles = new List<string>();
public Point WindowLocation;
public Point WindowPosition;
public Size WindowSize;
public string ConfigEditorSearch = "Video:";
public string Mute = "no";
}
class SettingsManager
{
public static string SettingsFile => Core.ConfigFolder + "settings.xml";
public static AppSettings Load()
{
if (!File.Exists(SettingsFile))
return new AppSettings();
try
{
XmlSerializer serializer = new XmlSerializer(typeof(AppSettings));
using (FileStream fs = new FileStream(SettingsFile, FileMode.Open))
return (AppSettings)serializer.Deserialize(fs);
}
catch (Exception ex)
{
Terminal.WriteError(ex.ToString());
return new AppSettings();
}
}
public static void Save(object obj)
{
try
{
using (XmlTextWriter writer = new XmlTextWriter(SettingsFile, Encoding.UTF8))
{
writer.Formatting = Formatting.Indented;
writer.Indentation = 4;
XmlSerializer serializer = new XmlSerializer(obj.GetType());
serializer.Serialize(writer, obj);
}
}
catch (Exception ex)
{
Terminal.WriteError(ex.ToString());
}
}
}
}

View File

@@ -1,50 +0,0 @@

using System;
using System.Diagnostics;
namespace mpvnet
{
public static class Terminal
{
static int Padding { get; } = 60;
public static void WriteError(object obj, string module = "mpv.net")
{
Write(obj, module, ConsoleColor.DarkRed, false);
}
public static void Write(object obj, string module = "mpv.net")
{
Write(obj, module, ConsoleColor.Black, true);
}
public static void Write(object obj, string module, ConsoleColor color, bool useDefaultColor)
{
if (obj == null)
return;
string value = obj.ToString();
if (!string.IsNullOrEmpty(module))
module = "[" + module + "] ";
if (useDefaultColor)
Console.ResetColor();
else
Console.ForegroundColor = color;
value = module + value;
if (value.Length < Padding)
value = value.PadRight(Padding);
if (color == ConsoleColor.Red || color == ConsoleColor.DarkRed)
Console.Error.WriteLine(value);
else
Console.WriteLine(value);
Console.ResetColor();
Trace.WriteLine(obj);
}
}
}

View File

@@ -1,99 +0,0 @@

using System.Collections.Generic;
using System.Windows.Media;
namespace mpvnet
{
public class Theme
{
public string Name { get; set; }
public Dictionary<string, string> Dictionary { get; } = new Dictionary<string, string>();
public static List<Theme> DefaultThemes { get; set; }
public static List<Theme> CustomThemes { get; set; }
public static Theme Current { get; set; }
public Brush Background { get; set; }
public Brush Foreground { get; set; }
public Brush Foreground2 { get; set; }
public Brush Heading { get; set; }
public Brush MenuBackground { get; set; }
public Brush MenuHighlight { get; set; }
public Brush GetBrush(string key)
{
return new SolidColorBrush((Color)ColorConverter.ConvertFromString(Dictionary[key]));
}
public Color GetColor(string key) => (Color)ColorConverter.ConvertFromString(Dictionary[key]);
public static void Init(string customContent, string defaultContent, string activeTheme)
{
Current = null;
DefaultThemes = Load(defaultContent);
CustomThemes = Load(customContent);
foreach (Theme theme in CustomThemes)
{
if (theme.Name == activeTheme)
{
bool isKeyMissing = false;
foreach (string key in DefaultThemes[0].Dictionary.Keys)
{
if (!theme.Dictionary.ContainsKey(key))
{
isKeyMissing = true;
Terminal.WriteError($"Theme '{activeTheme}' misses '{key}'");
break;
}
}
if (!isKeyMissing)
Current = theme;
break;
}
}
if (Current == null)
foreach (Theme theme in DefaultThemes)
if (theme.Name == activeTheme)
Current = theme;
if (Current == null)
Current = DefaultThemes[0];
Current.Background = Current.GetBrush("background");
Current.Foreground = Current.GetBrush("foreground");
Current.Foreground2 = Current.GetBrush("foreground2");
Current.Heading = Current.GetBrush("heading");
Current.MenuBackground = Current.GetBrush("menu-background");
Current.MenuHighlight = Current.GetBrush("menu-highlight");
}
static List<Theme> Load(string content)
{
List<Theme> list = new List<Theme>();
Theme theme = null;
foreach (string currentLine in (content ?? "").Split(new [] { '\r', '\n' }))
{
string line = currentLine.Trim();
if (line.StartsWith("[") && line.EndsWith("]"))
list.Add(theme = new Theme() { Name = line.Substring(1, line.Length - 2).Trim() });
if (line.Contains("=") && theme != null)
{
string left = line.Substring(0, line.IndexOf("=")).Trim();
theme.Dictionary[left] = line.Substring(line.IndexOf("=") + 1).Trim();
}
}
return list;
}
}
}

View File

@@ -0,0 +1,24 @@

namespace MpvNet.Extension.ExampleExtension;
public class Extension : IExtension
{
public MpvClient Player { get; set; }
public Extension()
{
Player = Global.Player.CreateNewPlayer("example");
Player.ObservePropertyBool("fullscreen", FullscreenChange);
Player.FileLoaded += Player_FileLoaded;
}
void Player_FileLoaded()
{
Terminal.Write("File loaded: " + Player.GetPropertyString("path"));
}
void FullscreenChange(bool value)
{
Player.CommandV("show-text", "fullscreen: " + value);
}
}

View File

@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>C:\Users\frank\AppData\Roaming\mpv.net-experimental\extensions\ExampleExtension</OutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\MpvNet\MpvNet.csproj">
<Private>False</Private>
</ProjectReference>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.7.34018.315
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExampleExtension", "ExampleExtension.csproj", "{4D6623A0-E890-44E5-956F-D5A5A24A6619}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4D6623A0-E890-44E5-956F-D5A5A24A6619}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4D6623A0-E890-44E5-956F-D5A5A24A6619}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D6623A0-E890-44E5-956F-D5A5A24A6619}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D6623A0-E890-44E5-956F-D5A5A24A6619}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {47E1F7E3-3833-4E05-841B-4683C1DEA133}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,25 @@
[*.cs]
# IDE0058: Expression value is never used
dotnet_diagnostic.IDE0058.severity = none
# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = none
# IDE0022: Use block body for methods
dotnet_diagnostic.IDE0022.severity = none
# IDE0040: Add accessibility modifiers
dotnet_diagnostic.IDE0040.severity = none
# IDE0011: Add braces
dotnet_diagnostic.IDE0011.severity = none
# IDE0010: Add missing cases
dotnet_diagnostic.IDE0010.severity = none
# IDE0044: Add readonly modifier
dotnet_diagnostic.IDE0044.severity = silent
# Member does not access instance data and can be marked as static
dotnet_diagnostic.CA1822.severity = none

View File

@@ -2,7 +2,4 @@
<configuration>
<configSections>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
</configuration>

134
src/MpvNet.Windows/Conf.cs Normal file
View File

@@ -0,0 +1,134 @@

using MpvNet.ExtensionMethod;
namespace MpvNet.Windows;
public class Conf
{
public static List<Setting> LoadConf(string content)
{
List<Setting> settingsList = new List<Setting>();
foreach (ConfSection? section in ConfParser.Parse(content))
{
Setting? baseSetting = null;
if (section.HasName("option"))
{
OptionSetting optionSetting = new OptionSetting();
baseSetting = optionSetting;
optionSetting.Default = section.GetValue("default");
optionSetting.Value = optionSetting.Default;
foreach (var it in section.GetValues("option"))
{
var opt = new OptionSettingOption();
if (it.Value.ContainsEx(" "))
{
opt.Name = it.Value![..it.Value!.IndexOf(" ")];
opt.Help = it.Value[it.Value.IndexOf(" ")..].Trim();
}
else
opt.Name = it.Value;
if (opt.Name == optionSetting.Default)
opt.Text = opt.Name + " (Default)";
opt.OptionSetting = optionSetting;
optionSetting.Options.Add(opt);
}
}
else
{
StringSetting stringSetting = new StringSetting();
baseSetting = stringSetting;
stringSetting.Default = section.HasName("default") ? section.GetValue("default") : "";
}
baseSetting.Name = section.GetValue("name");
baseSetting.File = section.GetValue("file");
baseSetting.Directory = section.GetValue("directory");
if (section.HasName("help")) baseSetting.Help = section.GetValue("help");
if (section.HasName("url")) baseSetting.URL = section.GetValue("url");
if (section.HasName("width")) baseSetting.Width = Convert.ToInt32(section.GetValue("width"));
if (section.HasName("type")) baseSetting.Type = section.GetValue("type");
if (baseSetting.Help.ContainsEx("\\n"))
baseSetting.Help = baseSetting.Help?.Replace("\\n", "\n");
settingsList.Add(baseSetting);
}
return settingsList;
}
}
public class ConfItem
{
public string Comment { get; set; } = "";
public string File { get; set; } = "";
public string LineComment { get; set; } = "";
public string Name { get; set; } = "";
public string Section { get; set; } = "";
public string Value { get; set; } = "";
public bool IsSectionItem { get; set; }
public Setting? SettingBase { get; set; }
}
public class ConfParser
{
public static List<ConfSection> Parse(string content)
{
string[] lines = content.Split('\n');
var sections = new List<ConfSection>();
ConfSection? currentGroup = null;
foreach (string it in lines)
{
string line = it.Trim();
if (line == "")
{
currentGroup = new ConfSection();
sections.Add(currentGroup);
}
else if (line.Contains('='))
{
string name = line[..line.IndexOf("=")].Trim();
string value = line[(line.IndexOf("=") + 1)..].Trim();
currentGroup?.Items.Add(new StringPair(name, value));
}
}
return sections;
}
}
public class ConfSection
{
public List<StringPair> Items { get; set; } = new List<StringPair>();
public bool HasName(string name)
{
foreach (var i in Items)
if (i.Name == name)
return true;
return false;
}
public string? GetValue(string name)
{
foreach (var i in Items)
if (i.Name == name)
return i.Value;
return null;
}
public List<StringPair> GetValues(string name) => Items.Where(i => i.Name == name).ToList();
}

View File

@@ -0,0 +1,68 @@

using Microsoft.Win32;
using MpvNet.Windows.Help;
namespace MpvNet.Windows;
public static class FileAssociation
{
public static void Register(string perceivedType, string[] extensions)
{
string exePath = Environment.ProcessPath!;
string exeFilename = Path.GetFileName(exePath);
string exeFilenameNoExt = Path.GetFileNameWithoutExtension(exePath);
string[] protocols = { "ytdl", "rtsp", "srt", "srtp" };
if (perceivedType != "unreg")
{
foreach (string it in protocols)
{
RegistryHelp.SetValue($@"HKCR\{it}", $"{it.ToUpper()} Protocol", "");
RegistryHelp.SetValue($@"HKCR\{it}\shell\open\command", "", $"\"{exePath}\" \"%1\"");
}
RegistryHelp.SetValue(@"HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\" + exeFilename, "", exePath);
RegistryHelp.SetValue(@"HKCR\Applications\" + exeFilename, "FriendlyAppName", "mpv.net media player");
RegistryHelp.SetValue(@"HKCR\Applications\" + exeFilename + @"\shell\open\command", "", $"\"{exePath}\" \"%1\"");
RegistryHelp.SetValue(@"HKCR\SystemFileAssociations\video\OpenWithList\" + exeFilename, "", "");
RegistryHelp.SetValue(@"HKCR\SystemFileAssociations\audio\OpenWithList\" + exeFilename, "", "");
RegistryHelp.SetValue(@"HKLM\SOFTWARE\RegisteredApplications", "mpv.net", @"SOFTWARE\Clients\Media\mpv.net\Capabilities");
RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities", "ApplicationDescription", "mpv.net media player");
RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities", "ApplicationName", "mpv.net");
foreach (string ext in extensions)
{
RegistryHelp.SetValue(@"HKCR\Applications\" + exeFilename + @"\SupportedTypes", "." + ext, "");
RegistryHelp.SetValue(@"HKCR\" + "." + ext, "", exeFilenameNoExt + "." + ext);
RegistryHelp.SetValue(@"HKCR\" + "." + ext + @"\OpenWithProgIDs", exeFilenameNoExt + "." + ext, "");
RegistryHelp.SetValue(@"HKCR\" + "." + ext, "PerceivedType", perceivedType);
RegistryHelp.SetValue(@"HKCR\" + exeFilenameNoExt + "." + ext + @"\shell\open\command", "", $"\"{exePath}\" \"%1\"");
RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities\FileAssociations", "." + ext, exeFilenameNoExt + "." + ext);
}
}
else
{
foreach (string i in protocols)
RegistryHelp.RemoveKey($@"HKCR\{i}");
RegistryHelp.RemoveKey(@"HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\" + exeFilename);
RegistryHelp.RemoveKey(@"HKCR\Applications\" + exeFilename);
RegistryHelp.RemoveKey(@"HKLM\SOFTWARE\Clients\Media\mpv.net");
RegistryHelp.RemoveKey(@"HKCR\SystemFileAssociations\video\OpenWithList\" + exeFilename);
RegistryHelp.RemoveKey(@"HKCR\SystemFileAssociations\audio\OpenWithList\" + exeFilename);
RegistryHelp.RemoveValue(@"HKLM\SOFTWARE\RegisteredApplications", "mpv.net");
foreach (string id in Registry.ClassesRoot.GetSubKeyNames())
{
if (id.StartsWith(exeFilenameNoExt + "."))
Registry.ClassesRoot.DeleteSubKeyTree(id);
RegistryHelp.RemoveValue($@"HKCR\Software\Classes\{id}\OpenWithProgIDs", exeFilenameNoExt + id);
RegistryHelp.RemoveValue($@"HKLM\Software\Classes\{id}\OpenWithProgIDs", exeFilenameNoExt + id);
}
}
}
}

View File

@@ -0,0 +1,8 @@
global using System;
global using System.Collections.Generic;
global using System.Diagnostics;
global using System.IO;
global using System.Linq;
global using static MpvNet.Global;

View File

@@ -0,0 +1,322 @@

using System.Text;
using System.Text.RegularExpressions;
using System.Globalization;
using System.Windows.Forms;
using System.Windows.Interop;
using System.Windows;
using MpvNet.ExtensionMethod;
using MpvNet.Windows.WinForms;
using MpvNet.Windows.WPF.Views;
using MpvNet.Windows.WPF;
using MpvNet.Windows.WPF.MsgBox;
namespace MpvNet;
public class GuiCommand
{
Dictionary<string, Action<IList<string>>>? _commands;
public event Action<float>? ScaleWindow;
public event Action<string>? MoveWindow;
public event Action<float>? WindowScaleNet;
public event Action? ShowMenu;
public static GuiCommand Current { get; } = new();
public Dictionary<string, Action<IList<string>>> Commands => _commands ??= new()
{
["show-about"] = args => ShowDialog(typeof(AboutWindow)),
["show-conf-editor"] = args => ShowDialog(typeof(ConfWindow)),
["show-input-editor"] = args => ShowDialog(typeof(InputWindow)),
["show-audio-devices"] = args => Msg.ShowInfo(Player.GetPropertyOsdString("audio-device-list")),
["show-profiles"] = args => Msg.ShowInfo(Player.GetProfiles()),
["load-sub"] = LoadSubtitle,
["open-files"] = OpenFiles,
["open-optical-media"] = Open_DVD_Or_BD_Folder,
["load-audio"] = LoadAudio,
["open-clipboard"] = OpenFromClipboard,
["reg-file-assoc"] = RegisterFileAssociations,
["scale-window"] = args => ScaleWindow?.Invoke(float.Parse(args[0], CultureInfo.InvariantCulture)),
["show-media-info"] = ShowMediaInfo,
["move-window"] = args => MoveWindow?.Invoke(args[0]),
["window-scale"] = args => WindowScaleNet?.Invoke(float.Parse(args[0], CultureInfo.InvariantCulture)),
["show-menu"] = args => ShowMenu?.Invoke(),
["show-bindings"] = args => ShowBindings(),
["show-playlist"] = args => ShowPlaylist(),
// deprecated
["show-info"] = args => ShowMediaInfo(new[] { "osd" }), // deprecated
["quick-bookmark"] = args => QuickBookmark(), // deprecated
["show-history"] = args => ShowHistory(), // deprecated
["show-command-palette"] = args => ShowCommandPalette(), // deprecated
};
public void ShowDialog(Type winType)
{
Window? win = Activator.CreateInstance(winType) as Window;
new WindowInteropHelper(win).Owner = MainForm.Instance!.Handle;
win?.ShowDialog();
}
public void LoadSubtitle(IList<string> args)
{
using var dialog = new OpenFileDialog();
string path = Player.GetPropertyString("path");
if (File.Exists(path))
dialog.InitialDirectory = Path.GetDirectoryName(path);
dialog.Multiselect = true;
if (dialog.ShowDialog() == DialogResult.OK)
foreach (string filename in dialog.FileNames)
Player.CommandV("sub-add", filename);
}
public void OpenFiles(IList<string> args)
{
bool append = false;
foreach (string arg in args)
if (arg == "append")
append = true;
using var dialog = new OpenFileDialog() { Multiselect = true };
if (dialog.ShowDialog() == DialogResult.OK)
Player.LoadFiles(dialog.FileNames, true, append);
}
public void Open_DVD_Or_BD_Folder(IList<string> args)
{
var dialog = new FolderBrowserDialog();
if (dialog.ShowDialog() == DialogResult.OK)
Player.LoadDiskFolder(dialog.SelectedPath);
}
public void OpenFromClipboard(IList<string> args)
{
if (System.Windows.Forms.Clipboard.ContainsFileDropList())
{
string[] files = System.Windows.Forms.Clipboard.GetFileDropList().Cast<string>().ToArray();
Player.LoadFiles(files, false, false);
}
else
{
string clipboard = System.Windows.Forms.Clipboard.GetText();
List<string> files = new List<string>();
foreach (string i in clipboard.Split(BR.ToCharArray(), StringSplitOptions.RemoveEmptyEntries))
if (i.Contains("://") || File.Exists(i))
files.Add(i);
if (files.Count == 0)
{
Terminal.WriteError("The clipboard does not contain a valid URL or file.");
return;
}
Player.LoadFiles(files.ToArray(), false, false);
}
}
public void LoadAudio(IList<string> args)
{
using var dialog = new OpenFileDialog();
string path = Player.GetPropertyString("path");
if (File.Exists(path))
dialog.InitialDirectory = Path.GetDirectoryName(path);
dialog.Multiselect = true;
if (dialog.ShowDialog() == DialogResult.OK)
foreach (string i in dialog.FileNames)
Player.CommandV("audio-add", i);
}
public void RegisterFileAssociations(IList<string> args)
{
string perceivedType = args[0];
string[] extensions = Array.Empty<string>();
switch (perceivedType)
{
case "video": extensions = FileTypes.Video; break;
case "audio": extensions = FileTypes.Audio; break;
case "image": extensions = FileTypes.Image; break;
}
try
{
using Process proc = new Process();
proc.StartInfo.FileName = Environment.ProcessPath;
proc.StartInfo.Arguments = "--register-file-associations " +
perceivedType + " " + string.Join(" ", extensions);
proc.StartInfo.Verb = "runas";
proc.StartInfo.UseShellExecute = true;
proc.Start();
proc.WaitForExit();
if (proc.ExitCode == 0)
{
string msgRestart = _("File Explorer icons will refresh after process restart.");
if (perceivedType == "unreg")
Msg.ShowInfo(_("File associations were successfully removed.") + BR2 + msgRestart);
else
Msg.ShowInfo(_("File associations were successfully created.") + BR2 + msgRestart);
}
else
Msg.ShowError(_("Error creating file associations."));
}
catch { }
}
public void ShowMediaInfo(IList<string> args)
{
if (Player.PlaylistPos == -1)
return;
bool full = args.Contains("full");
bool raw = args.Contains("raw");
bool editor = args.Contains("editor");
bool osd = args.Contains("osd") || args == null || args.Count == 0;
long fileSize = 0;
string text = "";
string path = Player.GetPropertyString("path");
if (File.Exists(path) && osd)
{
if (FileTypes.Audio.Contains(path.Ext()))
{
text = Player.GetPropertyOsdString("filtered-metadata");
Player.CommandV("show-text", text, "5000");
return;
}
else if (FileTypes.Image.Contains(path.Ext()))
{
fileSize = new FileInfo(path).Length;
text = "Width: " + Player.GetPropertyInt("width") + "\n" +
"Height: " + Player.GetPropertyInt("height") + "\n" +
"Size: " + Convert.ToInt32(fileSize / 1024.0) + " KB\n" +
"Type: " + path.Ext().ToUpper();
Player.CommandV("show-text", text, "5000");
return;
}
}
if (path.Contains("://"))
{
if (path.Contains("://"))
path = Player.GetPropertyString("media-title");
string videoFormat = Player.GetPropertyString("video-format").ToUpper();
string audioCodec = Player.GetPropertyString("audio-codec-name").ToUpper();
int width = Player.GetPropertyInt("video-params/w");
int height = Player.GetPropertyInt("video-params/h");
TimeSpan len = TimeSpan.FromSeconds(Player.GetPropertyDouble("duration"));
text = path.FileName() + "\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}";
Player.CommandV("show-text", text, "5000");
return;
}
if (App.MediaInfo && !osd && File.Exists(path) && !path.Contains(@"\\.\pipe\"))
using (MediaInfo mediaInfo = new MediaInfo(path))
text = Regex.Replace(mediaInfo.GetSummary(full, raw), "Unique ID.+", "");
else
{
Player.UpdateExternalTracks();
text = "N: " + Player.GetPropertyString("filename") + BR;
lock (Player.MediaTracksLock)
foreach (MediaTrack track in Player.MediaTracks)
text += track.Text + BR;
}
text = text.TrimEx();
if (editor)
Command.ShowTextWithEditor("media-info", text);
else if (osd)
Command.ShowText(text.Replace("\r", ""), 5000, 16);
else
{
MessageBoxEx.SetFont("Consolas");
Msg.ShowInfo(text);
MessageBoxEx.SetFont("Segoe UI");
}
}
public static string FormatTime(double value) => ((int)value).ToString("00");
public void ShowBindings() => Command.ShowTextWithEditor("Bindings", Player.UsedInputConfContent);
public void ShowPlaylist()
{
var count = Player.GetPropertyInt("playlist-count");
if (count < 1)
return;
StringBuilder sb = new StringBuilder();
for (int i = 0; i < count; i++)
{
string name = Player.GetPropertyString($"playlist/{i}/title");
if (string.IsNullOrEmpty(name))
name = Player.GetPropertyString($"playlist/{i}/filename").FileName();
sb.AppendLine(name);
}
string header = BR + "For a playlist menu the following user scripts exist:" + BR2 +
"https://github.com/stax76/mpv-scripts#command_palette" + BR +
"https://github.com/stax76/mpv-scripts#search_menu" + BR +
"https://github.com/tomasklaen/uosc" + BR +
"https://github.com/jonniek/mpv-playlistmanager" + BR2;
Msg.ShowInfo(header + sb.ToString().TrimEnd());
}
// deprecated
public void QuickBookmark() =>
Msg.ShowInfo("This feature was moved to a user script,\nwhich can be found here:\n\n" +
"https://github.com/stax76/mpv-scripts/blob/main/misc.lua");
// deprecated
public void ShowHistory() =>
Msg.ShowInfo("This feature was moved to a user script,\nwhich can be found here:\n\n" +
"https://github.com/stax76/mpv-scripts/blob/main/history.lua");
// deprecated
public void ShowCommandPalette() =>
Msg.ShowInfo(
"This feature was removed but is still available in the form of user scripts:" + BR2 +
"https://github.com/stax76/mpv-scripts#command_palette" + BR +
"https://github.com/stax76/mpv-scripts#search_menu" + BR +
"https://github.com/tomasklaen/uosc");
}
//public void ShowCommandPalette()
//{
// MainForm.Instance?.BeginInvoke(() => {
// CommandPalette.Instance.SetItems(CommandPalette.GetItems());
// MainForm.Instance.ShowCommandPalette();
// CommandPalette.Instance.SelectFirst();
// });
//}

View File

@@ -0,0 +1,74 @@

using Microsoft.Win32;
namespace MpvNet.Windows.Help;
public static class RegistryHelp
{
static string? _appKey;
public static string? ProductName { get; set; }
public static string AppKey {
get
{
if (ProductName == null)
throw new Exception("ProductName cannot be null.");
return _appKey ??= @"HKCU\Software\" + ProductName;
}
}
public static void SetInt(string name, object value) => SetValue(AppKey, name, value);
public static void SetString(string name, string value) => SetValue(AppKey, name, value);
public static void SetValue(string name, object value)
{
using RegistryKey regKey = GetRootKey(AppKey).CreateSubKey(AppKey[5..], RegistryKeyPermissionCheck.ReadWriteSubTree);
regKey.SetValue(name, value);
}
public static void SetValue(string path, string name, object value)
{
using RegistryKey regKey = GetRootKey(path).CreateSubKey(path[5..], RegistryKeyPermissionCheck.ReadWriteSubTree);
regKey.SetValue(name, value);
}
public static string GetString(string name, string defaultValue = "") =>
GetValue(AppKey, name, defaultValue)?.ToString() ?? defaultValue;
public static int GetInt(string name, int defaultValue = 0) =>
GetValue(AppKey, name, defaultValue) is int i ? i : defaultValue;
public static object? GetValue(string name) => GetValue(AppKey, name, null);
public static object? GetValue(string path, string name, object? defaultValue = null)
{
using RegistryKey? regKey = GetRootKey(path).OpenSubKey(path[5..]);
return regKey?.GetValue(name, defaultValue);
}
public static void RemoveKey(string path)
{
try {
GetRootKey(path).DeleteSubKeyTree(path[5..], false);
} catch { }
}
public static void RemoveValue(string path, string name)
{
try {
using RegistryKey? regKey = GetRootKey(path).OpenSubKey(path[5..], true);
regKey?.DeleteValue(name, false);
} catch { }
}
static RegistryKey GetRootKey(string path) => path[..4] switch
{
"HKLM" => Registry.LocalMachine,
"HKCU" => Registry.CurrentUser,
"HKCR" => Registry.ClassesRoot,
_ => throw new Exception(),
};
}

View File

@@ -0,0 +1,16 @@

using MpvNet.ExtensionMethod;
namespace MpvNet.Windows.Help;
public class WinMpvHelp
{
public static void CopyMpvNetCom()
{
string dir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData).AddSep() +
"Microsoft\\WindowsApps\\";
if (File.Exists(dir + "mpvnet.exe") && !File.Exists(dir + "mpvnet.com"))
File.Copy(Folder.Startup + "mpvnet.com", dir + "mpvnet.com");
}
}

View File

@@ -0,0 +1,45 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<RootNamespace>MpvNet.Windows</RootNamespace>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<PublishSingleFile>true</PublishSingleFile>
<AssemblyName>mpvnet</AssemblyName>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>mpv-icon.ico</ApplicationIcon>
<Product>mpv.net</Product>
<AssemblyVersion>7.0.0.1</AssemblyVersion>
<FileVersion>7.0.0.1</FileVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Content Include="mpv-icon.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MpvNet\MpvNet.csproj" />
<ProjectReference Include="..\NGettext.Wpf\NGettext.Wpf.csproj" />
</ItemGroup>
<ItemGroup>
<Page Update="WPF\Views\AboutWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>Wpf</XamlRuntime>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.77" />
</ItemGroup>
<ItemGroup>
<Folder Include="Misc\" />
</ItemGroup>
</Project>

View File

@@ -1,5 +1,4 @@

using System;
using System.Runtime.InteropServices;
public class StockIcon

View File

@@ -1,5 +1,4 @@

using System;
using System.Runtime.InteropServices;
public class Taskbar
@@ -52,4 +51,4 @@ public enum TaskbarStates
Normal = 0x2,
Error = 0x4,
Paused = 0x8
}
}

View File

@@ -0,0 +1,211 @@

using System.Drawing;
using System.Runtime.InteropServices;
namespace MpvNet.Windows.Native;
public static class WinApi
{
public static Version WindowsTen1607 { get; } = new Version(10, 0, 14393); // Windows 10 1607
[DllImport("kernel32.dll")]
public static extern bool AttachConsole(int dwProcessId);
[DllImport("kernel32.dll")]
public static extern bool FreeConsole();
[DllImport("kernel32.dll")]
public static extern IntPtr LoadLibrary(string path);
[DllImport("user32.dll")]
public static extern uint ActivateKeyboardLayout(IntPtr hkl, uint flags);
[DllImport("user32.dll")]
public static extern bool GetWindowRect(IntPtr hwnd, out Rect lpRect);
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
public static extern IntPtr FindWindowEx(
IntPtr parentHandle, IntPtr childAfter, string lclassName, string? windowTitle);
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, ref CopyDataStruct lParam);
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
public static extern IntPtr PostMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
public static extern int RegisterWindowMessage(string id);
[DllImport("user32.dll")]
public static extern bool AllowSetForegroundWindow(int dwProcessId);
[DllImport("user32.dll")]
public static extern void ReleaseCapture();
[DllImport("user32.dll")]
public static extern int GetDpiForWindow(IntPtr hwnd);
[DllImport("user32.dll")]
public static extern bool AdjustWindowRect(ref Rect lpRect, uint dwStyle, bool bMenu);
[DllImport("user32.dll")]
public static extern bool AdjustWindowRectExForDpi(
ref Rect lpRect, uint dwStyle, bool bMenu, uint dwExStyle, uint dpi);
[DllImport("user32.dll")]
public static extern bool SetWindowPos(
IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, uint uFlags);
[DllImport("user32.dll", EntryPoint = "GetWindowLong")]
static extern IntPtr GetWindowLong32(IntPtr hWnd, int nIndex);
[DllImport("user32.dll")]
static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex);
public static IntPtr GetWindowLong(IntPtr hWnd, int nIndex)
{
if (IntPtr.Size == 8)
return GetWindowLongPtr(hWnd, nIndex);
else
return GetWindowLong32(hWnd, nIndex);
}
[DllImport("user32.dll", EntryPoint = "SetWindowLong")]
public static extern IntPtr SetWindowLong32(IntPtr hWnd, int nIndex, uint dwNewLong);
[DllImport("user32.dll")]
public static extern IntPtr SetWindowLongPtr(IntPtr hWnd, int nIndex, uint dwNewLong);
public static IntPtr SetWindowLong(IntPtr hWnd, int nIndex, uint dwNewLong)
{
if (IntPtr.Size == 8)
return SetWindowLongPtr(hWnd, nIndex, dwNewLong);
else
return SetWindowLong32(hWnd, nIndex, dwNewLong);
}
[DllImport("gdi32.dll")]
public static extern int GetDeviceCaps(IntPtr hdc, int nIndex);
[DllImport("dwmapi.dll")]
public static extern int DwmGetWindowAttribute(
IntPtr hwnd, uint dwAttribute, out Rect pvAttribute, uint cbAttribute);
public static bool GetDwmWindowRect(IntPtr handle, out Rect rect)
{
const uint DWMWA_EXTENDED_FRAME_BOUNDS = 9;
return 0 == DwmGetWindowAttribute(handle, DWMWA_EXTENDED_FRAME_BOUNDS,
out rect, (uint)Marshal.SizeOf<Rect>());
}
public static Rectangle GetWorkingArea(IntPtr handle, Rectangle workingArea)
{
if (handle != IntPtr.Zero && GetDwmWindowRect(handle, out Rect dwmRect) &&
GetWindowRect(handle, out Rect rect))
{
int left = workingArea.Left;
int top = workingArea.Top;
int right = workingArea.Right;
int bottom = workingArea.Bottom;
left += rect.Left - dwmRect.Left;
top -= rect.Top - dwmRect.Top;
right -= dwmRect.Right - rect.Right;
bottom -= dwmRect.Bottom - rect.Bottom;
return new Rectangle(left, top, right - left, bottom - top);
}
return workingArea;
}
[StructLayout(LayoutKind.Sequential)]
public struct Rect
{
public int Left;
public int Top;
public int Right;
public int Bottom;
public Rect(Rectangle r)
{
Left = r.Left;
Top = r.Top;
Right = r.Right;
Bottom = r.Bottom;
}
public Rect(int left, int top, int right, int bottom)
{
Left = left;
Top = top;
Right = right;
Bottom = bottom;
}
public Rectangle ToRectangle() => Rectangle.FromLTRB(Left, Top, Right, Bottom);
public Size Size => new Size(Right - Left, Bottom - Top);
public int Width => Right - Left;
public int Height => Bottom - Top;
public static Rect FromRectangle(Rectangle rect)
{
return new Rect(rect.X, rect.Y, rect.X + rect.Width, rect.Y + rect.Height);
}
public override string ToString()
{
return "{Left=" + Left + ",Top=" + Top + ",Right=" + Right + ",Bottom=" + Bottom + "}";
}
}
[StructLayout(LayoutKind.Sequential)]
public struct CopyDataStruct
{
public IntPtr dwData;
public int cbData;
[MarshalAs(UnmanagedType.LPTStr)]
public string lpData;
}
public static int GetResizeBorder(int v)
{
switch (v)
{
case 1 /* WMSZ_LEFT */ : return 3;
case 3 /* WMSZ_TOP */ : return 2;
case 2 /* WMSZ_RIGHT */ : return 3;
case 6 /* WMSZ_BOTTOM */ : return 2;
case 4 /* WMSZ_TOPLEFT */ : return 1;
case 5 /* WMSZ_TOPRIGHT */ : return 1;
case 7 /* WMSZ_BOTTOMLEFT */ : return 3;
case 8 /* WMSZ_BOTTOMRIGHT */ : return 3;
default: return -1;
}
}
public static void SubtractWindowBorders(IntPtr hwnd, ref Rect rc, int dpi)
{
Rect r = new Rect(0, 0, 0, 0);
AddWindowBorders(hwnd, ref r, dpi);
rc.Left -= r.Left;
rc.Top -= r.Top;
rc.Right -= r.Right;
rc.Bottom -= r.Bottom;
}
public static void AddWindowBorders(IntPtr hwnd, ref Rect rc, int dpi)
{
uint windowStyle = (uint)GetWindowLong(hwnd, -16); // GWL_STYLE
uint windowStyleEx = (uint)GetWindowLong(hwnd, -20); // GWL_EXSTYLE
if (Environment.OSVersion.Version >= WindowsTen1607)
AdjustWindowRectExForDpi(ref rc, windowStyle, false, windowStyleEx, (uint)dpi);
else
AdjustWindowRect(ref rc, windowStyle, false);
}
}

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -11,7 +11,7 @@
<Identity
Name="5664FrankSkare.mpv.net"
Publisher="CN=6A1A1E69-736C-4C77-B310-7B6D38E32617"
Version="5.7.0.0" />
Version="6.0.3.0" />
<Properties>
<DisplayName>mpv.net</DisplayName>
@@ -45,7 +45,7 @@
<Extensions>
<uap3:Extension Category="windows.appExecutionAlias">
<uap3:AppExecutionAlias>
<desktop:ExecutionAlias Alias="mpvnet.exe" />
<desktop:ExecutionAlias Alias="MpvNet.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>

View File

@@ -27,7 +27,7 @@
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<AppxBundlePlatforms>neutral</AppxBundlePlatforms>
<AppxBundlePlatforms>x64</AppxBundlePlatforms>
<GenerateTemporaryStoreCertificate>True</GenerateTemporaryStoreCertificate>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
</PropertyGroup>
@@ -51,8 +51,8 @@
<Link>mpv.net\Microsoft.Management.Infrastructure.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\bin\mpv-2.dll">
<Link>mpv.net\mpv-2.dll</Link>
<Content Include="..\bin\libmpv-2.dll">
<Link>mpv.net\libmpv-2.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\bin\mpvnet.com">

View File

@@ -0,0 +1,122 @@

using System.Windows.Forms;
using System.Threading;
using MpvNet.Windows.Native;
using MpvNet.Help;
using MpvNet.Windows.UI;
using MpvNet.Windows.Help;
using MpvNet.Windows.WPF;
using System.Diagnostics;
namespace MpvNet.Windows;
static class Program
{
[STAThread]
static void Main()
{
try
{
RegistryHelp.ProductName = AppInfo.Product;
Translator.Current = new WpfTranslator();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
AppDomain.CurrentDomain.UnhandledException += (sender, e) => Terminal.WriteError(e.ExceptionObject);
Application.ThreadException += (sender, e) => Terminal.WriteError(e.Exception);
if (App.IsTerminalAttached)
WinApi.AttachConsole(-1 /*ATTACH_PARENT_PROCESS*/);
string[] args = Environment.GetCommandLineArgs().Skip(1).ToArray();
if (args.Length > 0 && args[0] == "--register-file-associations")
{
FileAssociation.Register(args[1], args.Skip(1).ToArray());
return;
}
App.Init();
Theme.Init();
Mutex mutex = new Mutex(true, StringHelp.GetMD5Hash(App.ConfPath), out bool isFirst);
if (Control.ModifierKeys.HasFlag(Keys.Shift) ||
App.CommandLine.Contains("--process-instance=multi") ||
App.CommandLine.Contains("--o="))
{
App.ProcessInstance = "multi";
}
if ((App.ProcessInstance == "single" || App.ProcessInstance == "queue") && !isFirst)
{
List<string> args2 = new List<string> { App.ProcessInstance };
foreach (string arg in args)
{
if (!arg.StartsWith("--") && (arg == "-" || arg.Contains("://") ||
arg.Contains(":\\") || arg.StartsWith("\\\\")))
args2.Add(arg);
else if (arg == "--queue")
args2[0] = "queue";
else if (arg.StartsWith("--command="))
{
args2[0] = "command";
args2.Add(arg[10..]);
}
}
Process[] procs = Process.GetProcessesByName("mpvnet");
for (int i = 0; i < 20; i++)
{
foreach (Process proc in procs)
{
if (proc.MainWindowHandle != IntPtr.Zero)
{
WinApi.AllowSetForegroundWindow(proc.Id);
var data = new WinApi.CopyDataStruct();
data.lpData = string.Join("\n", args2.ToArray());
data.cbData = data.lpData.Length * 2 + 1;
WinApi.SendMessage(proc.MainWindowHandle, 0x004A /*WM_COPYDATA*/, IntPtr.Zero, ref data);
mutex.Dispose();
if (App.IsTerminalAttached)
WinApi.FreeConsole();
return;
}
}
Thread.Sleep(50);
}
mutex.Dispose();
return;
}
if (App.CommandLine.Contains("--o="))
{
App.AutoLoadFolder = false;
Player.Init(IntPtr.Zero);
Player.ProcessCommandLineFiles();
Player.SetPropertyString("idle", "no");
Player.EventLoop();
Player.Destroy();
}
else
Application.Run(new WinForms.MainForm());
if (App.IsTerminalAttached)
WinApi.FreeConsole();
mutex.Dispose();
}
catch (Exception ex)
{
Terminal.WriteError(ex);
}
}
}

View File

@@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace mpvnet.Properties {
namespace MpvNet.Windows.Properties {
using System;
@@ -20,7 +20,7 @@ namespace mpvnet.Properties {
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[DebuggerNonUserCode()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@@ -39,7 +39,7 @@ namespace mpvnet.Properties {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mpvnet.Properties.Resources", typeof(Resources).Assembly);
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MpvNet.Windows.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
@@ -79,48 +79,7 @@ namespace mpvnet.Properties {
return ResourceManager.GetString("editor_conf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to
///# This file defines the key and mouse bindings and also the context menu of mpv.net.
///
///# A input and config editor can be found in the context menu under &apos;Settings&apos;.
///
///# The mpv.conf defaults of mpv.net contain input-default-bindings=yes and
///# input-builtin-bindings=no which disables the input defaults of mpv.
///
///# The input test mode can be started via command line: --input-test
///
///# The input key list can be printed with --input-keylist or
///# shown from the context menu under: View &gt; Show Keys
///
///# m [rest of string was truncated]&quot;;.
/// </summary>
internal static string input_conf {
get {
return ResourceManager.GetString("input_conf", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap mpvnet {
get {
object obj = ResourceManager.GetObject("mpvnet", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap mpvnet_santa {
get {
object obj = ResourceManager.GetObject("mpvnet_santa", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized string similar to

View File

@@ -121,15 +121,6 @@
<data name="editor_conf" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\editor_conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="input_conf" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\input.conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="mpvnet" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\mpvnet.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mpvnet_santa" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\mpvnet-santa.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="theme" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\theme.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>

View File

@@ -1,82 +1,68 @@
[setting]
name = process-instance
file = mpvnet
default = single
filter = General
help = Defines if more then one mpv.net process is allowed. (mpv.net specific option)\n\nTip: Whenever the control key is pressed when files or URLs are opened, 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.
directory = General
help = Defines if more then one mpv.net process is allowed. (mpv.net option)\n\nMulti can alternatively be enabled by pressing the SHIFT key.
option = multi Create a new process everytime the shell starts mpv.net
option = single Force a single process everytime the shell starts mpv.net
option = queue Force a single process and add files to playlist
[setting]
name = recent-count
file = mpvnet
filter = General
help = <int> Amount of recent files to be remembered. Default: 15 (mpv.net specific option)
directory = General
help = <int> Amount of recent files to be remembered. Default: 15 (mpv.net option)
[setting]
name = media-info
file = mpvnet
default = yes
filter = General
help = Usage of the media info library instead of mpv to access media information. (mpv.net specific option)
directory = General
help = Usage of the media info library instead of mpv to access media information. (mpv.net option)
option = yes
option = no
[setting]
name = video-file-extensions
file = mpvnet
filter = General
directory = General
width = 500
help = Video file extensions used to create file associations and used by the auto-load-folder feature. (mpv.net specific option)
help = Video file extensions used to create file associations and used by the auto-load-folder feature. (mpv.net option)
[setting]
name = audio-file-extensions
file = mpvnet
filter = General
directory = General
width = 500
help = Audio file extensions used to create file associations and used by the auto-load-folder feature. (mpv.net specific option)
help = Audio file extensions used to create file associations and used by the auto-load-folder feature. (mpv.net option)
[setting]
name = image-file-extensions
file = mpvnet
filter = General
directory = General
width = 500
help = Image file extensions used to create file associations and used by the auto-load-folder feature. (mpv.net specific option)
help = Image file extensions used to create file associations and used by the auto-load-folder feature. (mpv.net option)
[setting]
name = debug-mode
file = mpvnet
default = no
filter = General
help = Enable this only when a developer asks for it. (mpv.net specific option)
directory = General
help = Enable this only when a developer asks for it. (mpv.net option)
option = yes
option = no
[setting]
name = vo
file = mpv
default = gpu
filter = Video
directory = Video
help = Video output drivers to be used.\n\nFor more information visit:
url = https://mpv.io/manual/master/#video-output-drivers-vo
option = gpu General purpose, customizable, GPU-accelerated video output driver. It supports extended scaling methods, dithering, color management, custom shaders, HDR, and more.
option = gpu-next Experimental video renderer based on libplacebo. This supports almost the same set of features as --vo=gpu.
option = direct3d Video output driver that uses the Direct3D interface.
[setting]
name = hwdec
file = mpv
default = no
filter = Video
directory = Video
url = https://mpv.io/manual/master/#options-hwdec
help = Specify the hardware video decoding API that should be used if possible. Whether hardware decoding is actually done depends on the video codec. If hardware decoding is not possible, mpv will fall back on software decoding.\n\nFor more information visit:
option = no always use software decoding
option = auto enable best hw decoder
option = yes exactly the same as auto
@@ -91,24 +77,20 @@ option = cuda-copy copies video back to system RAM (Any platform CUDA is ava
option = nvdec requires vo=gpu (Any platform CUDA is available)
option = nvdec-copy copies video back to system RAM (Any platform CUDA is available)
[setting]
name = gpu-api
file = mpv
default = auto
filter = Video
directory = Video
help = Controls which type of graphics APIs will be accepted. Auto uses d3d11, it should only be changed in case of problems, Vulkan is not recommended.
option = auto Use any available API
option = d3d11 Allow only gpu-context=d3d11
option = opengl Allow only OpenGL (requires OpenGL 2.1+ or GLES 2.0+)
option = vulkan Allow only Vulkan
[setting]
name = gpu-context
file = mpv
default = auto
filter = Video
directory = Video
option = auto auto-select
option = d3d11 Win32, with native Direct3D 11 rendering.
option = angle Direct3D11 through the OpenGL ES translation layer ANGLE. This supports almost everything the win backend does (if the ANGLE build is new enough).
@@ -116,14 +98,12 @@ option = win Win32/WGL
option = dxinterop (experimental) Win32, using WGL for rendering and Direct3D 9Ex for presentation. Works on Nvidia and AMD. Newer Intel chips with the latest drivers may also work.
option = winvk VK_KHR_win32_surface
[setting]
name = video-sync
file = mpv
default = audio
filter = Video
directory = Video
help = How the player synchronizes audio and video.\n\nFor more information visit:
url = https://mpv.io/manual/master/#options-video-sync
option = audio
option = display-resample
option = display-resample-vdrop
@@ -133,13 +113,11 @@ option = display-adrop
option = display-desync
option = desync
[setting]
name = scale
file = mpv
default = bilinear
filter = Video
directory = Video
help = The GPU renderer filter function to use when upscaling video. There are some more filters, but most are not as useful. For a complete list, pass help as value, e.g.: mpv --scale=help
option = bilinear Bilinear hardware texture filtering (fastest, very low quality).
option = spline36 Mid quality and speed. This is the default when using gpu-hq.
option = lanczos Lanczos scaling. Provides mid quality and speed. Generally worse than spline36, but it results in a slightly sharper image which is good for some content types. The number of taps can be controlled with scale-radius, but is best left unchanged. (This filter is an alias for sinc-windowed sinc)
@@ -148,13 +126,11 @@ option = ewa_lanczossharp A slightly sharpened version of ewa_lanczos, preconfi
option = mitchell Mitchell-Netravali. The B and C parameters can be set with scale-param1 and scale-param2. This filter is very good at downscaling (see dscale).
option = oversample A version of nearest neighbour that (naively) oversamples pixels, so that pixels overlapping edges get linearly interpolated instead of rounded. This essentially removes the small imperfections and judder artifacts caused by nearest-neighbour interpolation, in exchange for adding some blur. This filter is good at temporal interpolation, and also known as "smoothmotion" (see tscale).
[setting]
name = cscale
file = mpv
default = bilinear
filter = Video
directory = Video
help = As scale, but for interpolating chroma information. If the image is not subsampled, this option is ignored entirely.
option = bilinear Bilinear hardware texture filtering (fastest, very low quality).
option = spline36 Mid quality and speed. This is the default when using gpu-hq.
option = lanczos Lanczos scaling. Provides mid quality and speed. Generally worse than spline36, but it results in a slightly sharper image which is good for some content types. The number of taps can be controlled with scale-radius, but is best left unchanged. (This filter is an alias for sinc-windowed sinc)
@@ -163,13 +139,11 @@ option = ewa_lanczossharp A slightly sharpened version of ewa_lanczos, preconfi
option = mitchell Mitchell-Netravali. The B and C parameters can be set with scale-param1 and scale-param2. This filter is very good at downscaling (see dscale).
option = oversample A version of nearest neighbour that (naively) oversamples pixels, so that pixels overlapping edges get linearly interpolated instead of rounded. This essentially removes the small imperfections and judder artifacts caused by nearest-neighbour interpolation, in exchange for adding some blur. This filter is good at temporal interpolation, and also known as "smoothmotion" (see tscale).
[setting]
name = dscale
file = mpv
default =
filter = Video
directory = Video
help = Like scale, but apply these filters on downscaling instead. \nIf no option is selected, it will keep the same with the upscaler.
option = bilinear Bilinear hardware texture filtering (fastest, very low quality).
option = spline36 Mid quality and speed. This is the default when using gpu-hq.
option = lanczos Lanczos scaling. Provides mid quality and speed. Generally worse than spline36, but it results in a slightly sharper image which is good for some content types. The number of taps can be controlled with scale-radius, but is best left unchanged. (This filter is an alias for sinc-windowed sinc)
@@ -178,269 +152,224 @@ option = ewa_lanczossharp A slightly sharpened version of ewa_lanczos, preconfi
option = mitchell Mitchell-Netravali. The B and C parameters can be set with scale-param1 and scale-param2. This filter is very good at downscaling (see dscale).
option = oversample A version of nearest neighbour that (naively) oversamples pixels, so that pixels overlapping edges get linearly interpolated instead of rounded. This essentially removes the small imperfections and judder artifacts caused by nearest-neighbour interpolation, in exchange for adding some blur. This filter is good at temporal interpolation, and also known as "smoothmotion" (see tscale).
[setting]
name = dither-depth
file = mpv
default = no
filter = Video
directory = Video
help = Set dither target depth to N. Note that the depth of the connected video display device cannot be detected. Often, LCD panels will do dithering on their own, which conflicts with this option and leads to ugly output.
option = no Disable any dithering done by mpv.
option = auto Automatic selection. If output bit depth cannot be detected, 8 bits per component are assumed.
option = 8 Dither to 8 bit output.
option = 10 Dither to 10 bit output.
[setting]
name = correct-downscaling
file = mpv
default = no
filter = Video
directory = Video
help = When using convolution based filters, extend the filter size when downscaling. Increases quality, but reduces performance while downscaling.\n\nThis will perform slightly sub-optimally for anamorphic video (but still better than without it) since it will extend the size to match only the milder of the scale factors between the axes.
option = yes
option = no
[setting]
name = sigmoid-upscaling
file = mpv
default = no
filter = Video
directory = Video
help = When upscaling, use a sigmoidal color transform to avoid emphasizing ringing artifacts. This also implies linear-scaling.
option = yes
option = no
[setting]
name = deband
file = mpv
default = no
filter = Video
directory = Video
help = Enable the debanding algorithm. This greatly reduces the amount of visible banding, blocking and other quantization artifacts, at the expense of very slightly blurring some of the finest details. In practice, it's virtually always an improvement - the only reason to disable it would be for performance.
option = yes
option = no
[setting]
name = d3d11va-zero-copy
file = mpv
default = no
filter = Video
directory = Video
help = By default, when using hardware decoding with --gpu-api=d3d11, the video image will be copied (GPU-to-GPU) from the decoder surface to a shader resource. Set this option to avoid that copy by sampling directly from the decoder image. This may increase performance and reduce power usage, but can cause the image to be sampled incorrectly on the bottom and right edges due to padding, and may invoke driver bugs, since Direct3D 11 technically does not allow sampling from a decoder surface (though most drivers support it.)
option = yes
option = no
[setting]
name = hdr-compute-peak
file = mpv
default = auto
filter = Video
directory = Video
help = Compute the HDR peak and frame average brightness per-frame instead of relying on tagged metadata. These values are averaged over local regions as well as over several frames to prevent the value from jittering around too much. This option basically gives you dynamic, per-scene tone mapping. Requires compute shaders, which is a fairly recent OpenGL feature, and will probably also perform horribly on some drivers, so enable at your own risk. The special value auto (default) will enable HDR peak computation automatically if compute shaders and SSBOs are supported.
option = auto
option = yes
option = no
[setting]
name = allow-delayed-peak-detect
file = mpv
default = yes
filter = Video
directory = Video
help = When using --hdr-compute-peak, allow delaying the detected peak by a frame when beneficial for performance. In particular, this is required to avoid an unnecessary FBO indirection when no advanced rendering is required otherwise. Has no effect if there already is an indirect pass, such as when advanced scaling is enabled. (Only affects --vo=gpu-next, note that --vo=gpu always delays the peak.)
option = yes
option = no
[setting]
name = volume
file = mpv
filter = Audio
directory = Audio
help = Set the startup volume. 0 means silence, 100 means no volume reduction or amplification. Negative values can be passed for compatibility, but are treated as 0. Since mpv 0.18.1, this always controls the internal mixer (aka "softvol"). Default: 100
[setting]
name = remember-volume
file = mpvnet
default = yes
filter = Audio
help = Save volume and mute on exit and restore it on start. (mpv.net specific option)
directory = Audio
help = Save volume and mute on exit and restore it on start. (mpv.net option)
option = yes
option = no
[setting]
name = alang
file = mpv
filter = Audio
directory = Audio
type = string
help = Specify a priority list of audio languages to use. Different container formats employ different language codes. DVDs use ISO 639-1 two-letter language codes, Matroska, MPEG-TS and NUT use ISO 639-2 three-letter language codes, while OGM uses a free-form identifier. See also aid.\n\nExamples\n\nmpv dvd://1 alang=hu,en chooses the Hungarian language track on a DVD and falls back on English if Hungarian is not available.\n\nmpv alang=jpn example.mkv plays a Matroska file with Japanese audio.
[setting]
name = audio-file-auto
file = mpv
default = no
filter = Audio
directory = Audio
help = Load additional audio files matching the video filename. The parameter specifies how external audio files are matched.
option = no Don't automatically load external audio files.
option = exact Load the media filename with audio file extension.
option = fuzzy Load all audio files containing media filename.
option = all Load all audio files in the current and audio-file-paths directories.
[setting]
name = audio-device
file = mpv
filter = Audio
directory = Audio
type = string
url = https://mpv.io/manual/master/#options-audio-device
help = <name> Use the given audio device. This consists of the audio output name, e.g. alsa, followed by /, followed by the audio output specific device name. The default value for this option is auto, which tries every audio output in preference order with the default device.\nAvailable devices can be found in the context menu under:\nView > Advanced > Show Audio Devices
help = <name> Use the given audio device. This consists of the audio output name, e.g. alsa, followed by /, followed by the audio output specific device name. The default value for this option is auto, which tries every audio output in preference order with the default device.
[setting]
name = slang
file = mpv
filter = Subtitle
directory = Subtitle
type = string
help = Specify a priority list of subtitle languages to use. Different container formats employ different language codes. DVDs use ISO 639-1 two letter language codes, Matroska uses ISO 639-2 three letter language codes while OGM uses a free-form identifier. See also sid.
[setting]
name = sub-auto
file = mpv
default = exact
filter = Subtitle
directory = Subtitle
help = Load additional subtitle files matching the video filename. The parameter specifies how external subtitle files are matched. exact is enabled by default.
option = no Don't automatically load external subtitle files.
option = exact Load the media filename with subtitle file extension.
option = fuzzy Load all subs containing media filename.
option = all Load all subs in the current and sub-file-paths directories.
[setting]
name = sub-font
file = mpv
filter = Subtitle
directory = Subtitle
type = string
help = Specify font to use for subtitles that do not themselves specify a particular font. The default is sans-serif.
[setting]
name = sub-font-size
file = mpv
filter = Subtitle
directory = Subtitle
help = Specify the sub font size. The unit is the size in scaled pixels at a window height of 720. The actual pixel size is scaled with the window height: if the window height is larger or smaller than 720, the actual size of the text increases or decreases as well. Default: 55
[setting]
name = sub-color
file = mpv
type = color
filter = Subtitle
help = Specify the color used for unstyled text subtitles.\n\nThe color is specified in the form r/g/b, where each color component is specified as number in the range 0.0 to 1.0. It's also possible to specify the transparency by using r/g/b/a, where the alpha value 0 means fully transparent, and 1.0 means opaque. If the alpha component is not given, the color is 100% opaque.\n\nPassing a single number to the option sets the sub to gray, and the form gray/a lets you specify alpha additionally.\n\nExamples\n\n1.0/0.0/0.0 set sub to opaque red\n1.0/0.0/0.0/0.75 set sub to opaque red with 75% alpha\n0.5/0.75 set sub to 50% gray with 75% alpha\n\nAlternatively, the color can be specified as a RGB hex triplet in the form #RRGGBB, where each 2-digit group expresses a color value in the range 0 (00) to 255 (FF). For example, #FF0000 is red. This is similar to web colors. Alpha is given with #AARRGGBB.\n\nExamples\n\n#FF0000 set sub to opaque red\n#C0808080 set sub to 50% gray with 75% alpha
directory = Subtitle
url = https://mpv.io/manual/master/#options-sub-color
help = Specify the color used for unstyled text subtitles.\n\nA usage description and examples can be found in the manual at:
[setting]
name = sub-border-color
file = mpv
type = color
filter = Subtitle
directory = Subtitle
help = See sub-color. Color used for the sub font border. Ignored when sub-back-color is specified (or more exactly: when that option is not set to completely transparent).
[setting]
name = sub-back-color
file = mpv
type = color
filter = Subtitle
directory = Subtitle
help = See sub-color. Color used for sub text background. You can use sub-shadow-offset to change its size relative to the text.
[setting]
name = fullscreen
file = mpv
default = no
filter = Screen
directory = Screen
help = Start the player in fullscreen mode.
option = yes
option = no
[setting]
name = border
file = mpv
default = yes
filter = Screen
directory = Screen
help = Show window with decoration (titlebar, border).
option = yes
option = no
[setting]
name = screen
file = mpv
filter = Screen
directory = Screen
help = <0-32> In multi-monitor configurations (i.e. a single desktop that spans across multiple displays), this option tells mpv which screen to display the video on.
[setting]
name = osd-playing-msg
file = mpv
width = 300
filter = Screen
directory = Screen
type = string
help = Show a message on OSD when playback starts. The string is expanded for properties, e.g. osd-playing-msg='file: ${filename}' will show the message file: followed by a space and the currently played filename. For more information visit:
url = https://mpv.io/manual/master/#property-expansion
[setting]
name = osd-font-size
file = mpv
filter = Screen
directory = Screen
help = Specify the OSD font size. See sub-font-size for details. Default: 55
[setting]
name = osd-duration
file = mpv
filter = Screen
directory = Screen
help = Set the duration of the OSD messages in ms. Default: 1000
[setting]
name = osd-scale-by-window
file = mpv
default = yes
filter = Screen
directory = Screen
help = Whether to scale the OSD with the window size. If this is disabled, osd-font-size and other OSD options that use scaled pixels are always in actual pixels. The effect is that changing the window size won't change the OSD font size.
option = yes
option = no
[setting]
name = autofit
file = mpv
filter = Screen
directory = Screen
help = <int> Initial window height in percent. Default: 60
[setting]
name = autofit-image
file = mpvnet
filter = Screen
directory = Screen
help = <int> Initial window height in percent for image files. Default: 80
[setting]
name = autofit-audio
file = mpvnet
filter = Screen
directory = Screen
help = <int> Initial window height in percent for audio files. Default: 70
[setting]
name = autofit-smaller
file = mpv
filter = Screen
directory = Screen
help = <int> Minimum window height in percent. Default: 10
[setting]
name = autofit-larger
file = mpv
filter = Screen
directory = Screen
help = <int> Maximum window height in percent. Default: 80
[setting]
name = start-size
file = mpvnet
default = height-session
filter = Screen
help = Setting to remember the window size. (mpv.net specific option)
directory = Screen
help = Setting to remember the window size. (mpv.net option)
option = width-session Window width is remembered in the current session
option = width-always Window width is always remembered
option = height-session Window height is remembered in the current session
@@ -449,322 +378,251 @@ option = video Window size is set to video resolution
option = session Window size is remembered in the current session
option = always Window size is always remembered
[setting]
name = keepaspect-window
file = mpv
default = yes
filter = Screen
directory = Screen
help = keepaspect-window will lock the window size to the video aspect. Default: yes
option = yes
option = no
[setting]
name = minimum-aspect-ratio
file = mpvnet
filter = Screen
help = <float> Minimum aspect ratio of the window. Useful to force a wider window and therefore a larger OSC. (mpv.net specific option)
directory = Screen
help = <float> Minimum aspect ratio of the window. Useful to force a wider window and therefore a larger OSC. (mpv.net option)
[setting]
name = minimum-aspect-ratio-audio
file = mpvnet
filter = Screen
directory = Screen
help = Same as minimum-aspect-ratio but used for audio files.
[setting]
name = remember-window-position
file = mpvnet
default = no
filter = Screen
help = Save the window position on exit. (mpv.net specific option)
directory = Screen
help = Save the window position on exit. (mpv.net option)
option = yes
option = no
[setting]
name = snap-window
file = mpv
default = no
filter = Screen
directory = Screen
help = Snap the player window to screen edges.
option = yes
option = no
[setting]
name = window-maximized
file = mpv
default = no
filter = Screen
directory = Screen
help = Start with a maximized window.
option = yes
option = no
[setting]
name = start-threshold
file = mpvnet
filter = Screen
help = Threshold in milliseconds to wait for libmpv returning the video resolution before the window is shown, otherwise default dimensions are used as defined by autofit and start-size. Default: 1500 (mpv.net specific option)
directory = Screen
help = Threshold in milliseconds to wait for libmpv returning the video resolution before the window is shown, otherwise default dimensions are used as defined by autofit and start-size. Default: 1500 (mpv.net option)
[setting]
name = taskbar-progress
file = mpv
default = yes
filter = Playback
directory = Playback
help = Show progress in taskbar.
option = yes
option = no
[setting]
name = keep-open
file = mpv
default = no
filter = Playback
directory = Playback
option = yes If the current file ends, go to the next file, keep the last file open.
option = no If the current file ends, go to the next file. If idle is set to no, the player exits after the last file.
option = always Playback will never automatically advance to the next file.
[setting]
name = keep-open-pause
file = mpv
default = yes
filter = Playback
directory = Playback
help = If set to no, instead of pausing when keep-open is active, just stop at end of file and continue playing forward when you seek backwards until end where it stops again.
option = yes
option = no
[setting]
name = idle
file = mpv
default = yes
filter = Playback
directory = Playback
help = If set to no and keep-open is also set to no, the player exits after the last file ends.
option = yes
option = no
option = once
[setting]
name = auto-play
file = mpvnet
default = no
filter = Playback
help = Sets pause=no on file load. (mpv.net specific option)
option = yes
option = no
[setting]
name = loop-file
file = mpv
filter = Playback
directory = Playback
help = <N|inf|no> Loop a single file N times. inf means forever, no means normal playback.\n\nThe difference to loop-playlist is that this doesn't loop the playlist, just the file itself. If the playlist contains only a single file, the difference between the two option is that this option performs a seek on loop, instead of reloading the file. loop is an alias for this option.
[setting]
name = save-position-on-quit
file = mpv
default = no
filter = Playback
directory = Playback
help = Always save the current playback position on quit. When this file is played again later, the player will seek to the old playback position on start. This does not happen if playback of a file is stopped in any other way than quitting. For example, going to the next file in the playlist will not save the position, and start playback at beginning the next time the file is played.\n\nThis behavior is disabled by default, but is always available when quitting the player with Shift+Q.
option = yes
option = no
[setting]
name = watch-later-options
file = mpv
filter = Playback
directory = Playback
help = The options that are saved in "watch later" files if they have been changed since when mpv started. These values will be restored the next time the files are played. This is a string list option. For more information visit:
url = https://mpv.io/manual/master/#options-watch-later-options
[setting]
name = hr-seek
file = mpv
default = absolute
filter = Playback
directory = Playback
help = Select when to use precise seeks that are not limited to keyframes. Such seeks require decoding video from the previous keyframe up to the target position and so can take some time depending on decoding performance. For some video formats, precise seeks are disabled. This option selects the default choice to use for seeks; it is possible to explicitly override that default in the definition of key bindings and in input commands.
option = yes Use precise seeks whenever possible.
option = no Never use precise seeks.
option = absolute Use precise seeks if the seek is to an absolute position in the file, such as a chapter seek, but not for relative seeks like the default behavior of arrow keys.
option = always Same as yes (for compatibility).
[setting]
name = track-auto-selection
file = mpv
default = yes
filter = Playback
directory = Playback
help = Enable the default track auto-selection. Enabling this will make the player select streams according to aid, alang, and others. If it is disabled, no tracks are selected. In addition, the player will not exit if no tracks are selected, and wait instead (this wait mode is similar to pausing, but the pause option is not set).\n\nThis is useful with lavfi-complex: you can start playback in this mode, and then set select tracks at runtime by setting the filter graph. Note that if lavfi-complex is set before playback is started, the referenced tracks are always selected.
option = yes
option = no
[setting]
name = loop-playlist
file = mpv
filter = Playback
directory = Playback
help = <N|inf|force|no> Loops playback N times. A value of 1 plays it one time (default), 2 two times, etc. inf means forever. no is the same as 1 and disables looping. If several files are specified on command line, the entire playlist is looped. The force mode is like inf, but does not skip playlist entries which have been marked as failing. This means the player might waste CPU time trying to loop a file that doesn't exist. But it might be useful for playing webradios under very bad network conditions.
[setting]
name = auto-load-folder
file = mpvnet
default = yes
filter = Playback
help = For single files automatically load the entire directory into the playlist. Can be suppressed via shift key. (mpv.net specific option)
directory = Playback
help = For single files automatically load the entire directory into the playlist. (mpv.net option)
option = yes
option = no
[setting]
name = input-ar-delay
file = mpv
filter = Input
directory = Input
help = Delay in milliseconds before we start to autorepeat a key (0 to disable).
[setting]
name = input-ar-rate
file = mpv
filter = Input
directory = Input
help = Number of key presses to generate per second on autorepeat.
[setting]
name = language
file = mpvnet
default = system
directory = UI
help = User interface display language.\nmpv.net must be restarted after a change.\nInterested joining our translation team?:
url = https://app.transifex.com/stax76/teams/
option = system
option = english
option = chinese-china
option = german
name = dark-mode
file = mpvnet
default = always
filter = UI
directory = UI
help = Changes between a light and dark theme.\nmpv.net must be restarted after a change.\nmpv.net specific option.
option = always
option = system Available on Windows 10 or higher
option = never
[setting]
name = dark-theme
file = mpvnet
filter = UI
url = https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#color-theme
directory = UI
url = https://github.com/mpvnet-player/mpv.net/blob/main/docs/manual.md#color-theme
help = Color theme used in dark mode.\nmpv.net must be restarted after a change.\nmpv.net specific option. Default: dark
[setting]
name = light-theme
file = mpvnet
filter = UI
url = https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#color-theme
directory = UI
url = https://github.com/mpvnet-player/mpv.net/blob/main/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
[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
[setting]
name = show-santa-logo
file = mpvnet
default = yes
filter = UI
help = Draws the blue mpv.net logo with a santa hat in december, the option is called greenandgrumpy in mpv.
option = yes
option = no
[setting]
name = screenshot-directory
file = mpv
width = 500
type = folder
filter = Screenshot
directory = Video/Screenshot
help = Store screenshots in this directory. This path is joined with the filename generated by screenshot-template. If the template filename is already absolute, the directory is ignored.\n\nIf the directory does not exist, it is created on the first screenshot. If it is not a directory, an error is generated when trying to write a screenshot.
[setting]
name = screenshot-format
file = mpv
default = jpg
filter = Screenshot
directory = Video/Screenshot
help = Set the image file type used for saving screenshots.
option = jpg
option = png
[setting]
name = screenshot-tag-colorspace
file = mpv
default = no
filter = Screenshot
directory = Video/Screenshot
help = Tag screenshots with the appropriate colorspace. Note that not all formats are supported.
option = yes
option = no
[setting]
name = screenshot-high-bit-depth
file = mpv
default = yes
filter = Screenshot
directory = Video/Screenshot
help = If possible, write screenshots with a bit depth similar to the source video. This is interesting in particular for PNG, as this sometimes triggers writing 16 bit PNGs with huge file sizes. This will also include an unused alpha channel in the resulting files if 16 bit is used.
option = yes
option = no
[setting]
name = screenshot-jpeg-source-chroma
file = mpv
default = yes
filter = Screenshot
directory = Video/Screenshot
help = Write JPEG files with the same chroma subsampling as the video. If disabled, the libjpeg default is used.
option = yes
option = no
[setting]
name = screenshot-template
file = mpv
filter = Screenshot
directory = Video/Screenshot
type = string
help = Specify the filename template used to save screenshots. The template specifies the filename without file extension, and can contain format specifiers, which will be substituted when taking a screenshot. By default, the template is mpv-shot%n, which results in filenames like mpv-shot0012.png for example.\n\nFind the full documentation here:
url = https://mpv.io/manual/master/#options-screenshot-template
[setting]
name = screenshot-jpeg-quality
file = mpv
filter = Screenshot
directory = Video/Screenshot
help = <0-100> Set the JPEG quality level. Higher means better quality. The default is 90.
[setting]
name = screenshot-png-compression
file = mpv
filter = Screenshot
directory = Video/Screenshot
help = <0-9> Set the PNG compression level. Higher means better compression. This will affect the file size of the written screenshot file and the time it takes to write a screenshot. Too high compression might occupy enough CPU time to interrupt playback. The default is 7.
[setting]
name = screenshot-png-filter
file = mpv
filter = Screenshot
directory = Video/Screenshot
help = <0-5> Set the filter applied prior to PNG compression. 0 is none, 1 is 'sub', 2 is 'up', 3 is 'average', 4 is 'Paeth', and 5 is 'mixed'. This affects the level of compression that can be achieved. For most images, 'mixed' achieves the best compression ratio, hence it is the default.
[setting]
name = cache
file = mpv
default = auto
filter = Cache
directory = Cache
help = Decide whether to use network cache settings.
url = https://mpv.io/manual/master/#options-cache
option = yes
option = no
option = auto
[setting]
name = demuxer-max-bytes
file = mpv
filter = Demuxer
directory = Demuxer
help = <bytesize> Controls how much the demuxer is allowed to buffer ahead.\nSuffixes such as KiB and MiB are supported.
url = https://mpv.io/manual/master/#options-demuxer-max-bytes
url = https://mpv.io/manual/master/#options-demuxer-max-bytes

View File

@@ -0,0 +1,61 @@

using System.Windows;
namespace MpvNet.Windows;
public abstract class Setting
{
public string? Default { get; set; }
public string? File { get; set; }
public string? Directory { get; set; }
public string? Help { get; set; }
public string? Name { get; set; }
public string? StartValue { get; set; }
public string? Type { get; set; }
public string? URL { get; set; }
public string? Value { get; set; }
public int Width { get; set; }
public ConfItem? ConfItem { get; set; }
}
public class StringSetting : Setting
{
}
public class OptionSetting : Setting
{
public List<OptionSettingOption> Options { get; } = new List<OptionSettingOption>();
}
public class OptionSettingOption
{
string? _text;
public string? Name { get; set; }
public string? Help { get; set; }
public OptionSetting? OptionSetting { get; set; }
public string? Text
{
get => string.IsNullOrEmpty(_text) ? Name : _text;
set => _text = value;
}
public bool Checked
{
get => OptionSetting?.Value == Name;
set
{
if (value)
OptionSetting!.Value = Name;
}
}
public Visibility Visibility
{
get => string.IsNullOrEmpty(Help) ? Visibility.Collapsed : Visibility.Visible;
}
}

View File

@@ -0,0 +1,13 @@
namespace MpvNet.Windows;
public class StringPair
{
public string Name { get; set; }
public string Value { get; set; }
public StringPair(string name, string value)
{
Name = name;
Value = value;
}
}

View File

@@ -0,0 +1,22 @@

using MpvNet.Windows.WPF.Controls;
namespace MpvNet.Windows.UI;
public class CommandPalette
{
public static CommandPaletteControl Instance { get; } = new CommandPaletteControl();
public static IEnumerable<CommandPaletteItem> GetItems()
{
return InputHelp.GetBindingsFromContent(App.InputConf.GetContent())
.Where(i => i.Command != "")
.Select(i => new CommandPaletteItem()
{
Text = i.Comment,
SecondaryText = i.Input,
Action = () => Core.Command(i.Command),
Binding = i
});
}
}

View File

@@ -0,0 +1,25 @@

namespace MpvNet.Windows.UI;
public class CommandPaletteItem
{
public CommandPaletteItem() { }
public CommandPaletteItem(string text, Action action)
{
Text = text;
Action = action;
}
public CommandPaletteItem(string text, string secondaryText, Action action)
{
Text = text;
Action = action;
SecondaryText = secondaryText;
}
public string Text { get; set; } = "";
public string SecondaryText { get; set; } = "";
public Action? Action { get; set; }
public Binding? Binding { get; set; }
}

View File

@@ -0,0 +1,183 @@

using System.ComponentModel;
using System.Runtime.InteropServices;
using MpvNet.ExtensionMethod;
namespace MpvNet.Windows.UI;
class GlobalHotkey
{
public static Dictionary<int, string>? Commands { get; set; }
static int ID;
static IntPtr HWND;
public static void RegisterGlobalHotkeys(IntPtr hwnd)
{
HWND = hwnd;
string path = Player.ConfigFolder + "global-input.conf";
if (!File.Exists(path))
return;
foreach (string i in File.ReadAllLines(path))
{
string line = i.Trim();
if (line.StartsWith("#") || !line.Contains(' '))
continue;
ProcessGlobalHotkeyLine(line);
}
}
static void ProcessGlobalHotkeyLine(string line)
{
string key = line[..line.IndexOf(" ")];
string command = line[(line.IndexOf(" ") + 1)..];
string[] parts = key.Split('+');
KeyModifiers mod = KeyModifiers.None;
int vk;
for (int i = 0; i < parts.Length - 1; i++)
{
string umod = parts[i].ToUpper();
if (umod == "ALT") mod |= KeyModifiers.Alt;
if (umod == "CTRL") mod |= KeyModifiers.Ctrl;
if (umod == "SHIFT") mod |= KeyModifiers.Shift;
if (umod == "WIN") mod |= KeyModifiers.Win;
}
key = parts[^1];
if (key.Length == 1)
{
short result = VkKeyScanEx(key[0], GetKeyboardLayout(0));
int hi = result >> 8;
int lo = result & 0xFF;
vk = lo;
if ((hi & 1) == 1) mod |= KeyModifiers.Shift;
if ((hi & 2) == 2) mod |= KeyModifiers.Ctrl;
if ((hi & 4) == 4) mod |= KeyModifiers.Alt;
}
else
vk = Mpv_to_VK(key);
Commands ??= new Dictionary<int, string>();
if (vk > 0)
{
Commands[ID] = command.Trim();
bool success = RegisterHotKey(HWND, ID++, mod, vk);
if (!success)
Terminal.WriteError(line + ": " + new Win32Exception().Message + "\n", "global-input.conf");
}
}
public static void Execute(int id)
{
if (Commands!.ContainsKey(id))
Player.Command(Commands[id]);
}
static int Mpv_to_VK(string value)
{
return value.ToUpperEx() switch
{
"NEXT" => 0xB0,// VK_MEDIA_NEXT_TRACK
"PREV" => 0xB1,// VK_MEDIA_PREV_TRACK
"STOP" => 0xB2,// VK_MEDIA_STOP
"PLAYPAUSE" => 0xB3,// VK_MEDIA_PLAY_PAUSE
"SLEEP" => 0x5F,// VK_SLEEP
"RIGHT" => 0x27,// VK_RIGHT
"UP" => 0x26,// VK_UP
"LEFT" => 0x25,// VK_LEFT
"DOWN" => 0x28,// VK_DOWN
"PGUP" => 0x21,// VK_PRIOR
"PGDWN" => 0x22,// VK_NEXT
"PAUSE" => 0x13,// VK_PAUSE
"PRINT" => 0x2A,// VK_PRINT
"HOME" => 0x24,// VK_HOME
"INS" => 0x2D,// VK_INSERT
"KP_INS" => 0x2D,// VK_INSERT
"DEL" => 0x2E,// VK_DELETE
"KP_DEL" => 0x2E,// VK_DELETE
"END" => 0x23,// VK_END
"F1" => 0x70,// VK_F1
"F2" => 0x71,// VK_F2
"F3" => 0x72,// VK_F3
"F4" => 0x73,// VK_F4
"F5" => 0x74,// VK_F5
"F6" => 0x75,// VK_F6
"F7" => 0x76,// VK_F7
"F8" => 0x77,// VK_F8
"F9" => 0x78,// VK_F9
"F10" => 0x79,// VK_F10
"F11" => 0x7A,// VK_F11
"F12" => 0x7B,// VK_F12
"F13" => 0x7C,// VK_F13
"F14" => 0x7D,// VK_F14
"F15" => 0x7E,// VK_F15
"F16" => 0x7F,// VK_F16
"F17" => 0x80,// VK_F17
"F18" => 0x81,// VK_F18
"F19" => 0x82,// VK_F19
"F20" => 0x83,// VK_F20
"F21" => 0x84,// VK_F21
"F22" => 0x85,// VK_F22
"F23" => 0x86,// VK_F23
"F24" => 0x87,// VK_F24
"ENTER" => 0x0D,// VK_RETURN
"KP_ENTER" => 0x0D,// VK_RETURN
"TAB" => 0x09,// VK_TAB
"MENU" => 0x5D,// VK_APPS
"CANCEL" => 0x03,// VK_CANCEL
"BS" => 0x08,// VK_BACK
"KP_DEC" => 0x6E,// VK_DECIMAL
"ESC" => 0x1B,// VK_ESCAPE
"KP0" => 0x60,// VK_NUMPAD0
"KP1" => 0x61,// VK_NUMPAD1
"KP2" => 0x62,// VK_NUMPAD2
"KP3" => 0x63,// VK_NUMPAD3
"KP4" => 0x64,// VK_NUMPAD4
"KP5" => 0x65,// VK_NUMPAD5
"KP6" => 0x66,// VK_NUMPAD6
"KP7" => 0x67,// VK_NUMPAD7
"KP8" => 0x68,// VK_NUMPAD8
"KP9" => 0x69,// VK_NUMPAD9
"FAVORITES" => 0xAB,// VK_BROWSER_FAVORITES
"SEARCH" => 0xAA,// VK_BROWSER_SEARCH
"MAIL" => 0xB4,// VK_LAUNCH_MAIL
"VOLUME_UP" => 0xAF,// VK_VOLUME_UP
"VOLUME_DOWN" => 0xAE,// VK_VOLUME_DOWN
"MUTE" => 0xAD,// VK_VOLUME_MUTE
"SPACE" => 0x20,// VK_SPACE
"IDEOGRAPHIC_SPACE" => 0x20,// VK_SPACE
_ => 0,
};
}
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
static extern short VkKeyScanEx(char ch, IntPtr dwhkl);
[DllImport("user32.dll")]
static extern IntPtr GetKeyboardLayout(uint idThread);
[DllImport("user32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
static extern bool RegisterHotKey(IntPtr hWnd, int id, KeyModifiers fsModifiers, int vk);
[Flags]
enum KeyModifiers
{
None = 0,
Alt = 1,
Ctrl = 2,
Shift = 4,
Win = 8
}
}

View File

@@ -0,0 +1,155 @@

using System.Windows;
using System.Windows.Media;
using Microsoft.Win32;
namespace MpvNet.Windows.UI;
public class Theme
{
public string? Name { get; set; }
public Dictionary<string, string> Dictionary { get; } = new Dictionary<string, string>();
public static List<Theme>? DefaultThemes { get; set; }
public static List<Theme>? CustomThemes { get; set; }
public static Theme? Current { get; set; }
public Brush? Background { get; set; }
public Brush? Foreground { get; set; }
public Brush? Foreground2 { get; set; }
public Brush? Heading { get; set; }
public Brush? MenuBackground { get; set; }
public Brush? MenuHighlight { get; set; }
public Color BackgroundColor { get; set; }
public Color ForegroundColor { get; set; }
public Color Foreground2Color { get; set; }
public Color HeadingColor { get; set; }
public Color MenuBackgroundColor { get; set; }
public Color MenuHighlightColor { get; set; }
public Brush GetBrush(string key)
{
return new SolidColorBrush((Color)ColorConverter.ConvertFromString(Dictionary[key]));
}
public Color GetColor(string key) => (Color)ColorConverter.ConvertFromString(Dictionary[key]);
public static void Init()
{
string? themeContent = null;
if (File.Exists(Player.ConfigFolder + "theme.conf"))
themeContent = File.ReadAllText(Player.ConfigFolder + "theme.conf");
Init(themeContent, Properties.Resources.theme, DarkMode ? App.DarkTheme : App.LightTheme);
}
public static void Init(string? customContent, string defaultContent, string activeTheme)
{
Current = null;
DefaultThemes = Load(defaultContent);
CustomThemes = Load(customContent);
foreach (Theme theme in CustomThemes)
{
if (theme.Name == activeTheme)
{
bool isKeyMissing = false;
foreach (string key in DefaultThemes[0].Dictionary.Keys)
{
if (!theme.Dictionary.ContainsKey(key))
{
isKeyMissing = true;
Terminal.WriteError($"Theme '{activeTheme}' misses '{key}'");
break;
}
}
if (!isKeyMissing)
Current = theme;
break;
}
}
if (Current == null)
foreach (Theme theme in DefaultThemes)
if (theme.Name == activeTheme)
Current = theme;
if (Current == null)
Current = DefaultThemes[0];
Current.Background = Current.GetBrush("background");
Current.Foreground = Current.GetBrush("foreground");
Current.Foreground2 = Current.GetBrush("foreground2");
Current.Heading = Current.GetBrush("heading");
Current.MenuBackground = Current.GetBrush("menu-background");
Current.MenuHighlight = Current.GetBrush("menu-highlight");
Current.BackgroundColor = Current.GetColor("background");
Current.ForegroundColor = Current.GetColor("foreground");
Current.Foreground2Color = Current.GetColor("foreground2");
Current.HeadingColor = Current.GetColor("heading");
Current.MenuBackgroundColor = Current.GetColor("menu-background");
Current.MenuHighlightColor = Current.GetColor("menu-highlight");
}
static List<Theme> Load(string? content)
{
List<Theme> list = new List<Theme>();
Theme? theme = null;
foreach (string currentLine in (content ?? "").Split('\r', '\n'))
{
string line = currentLine.Trim();
if (line.StartsWith("[") && line.EndsWith("]"))
list.Add(theme = new Theme() { Name = line[1..^1].Trim() });
if (line.Contains('=') && theme != null)
{
string left = line[..line.IndexOf("=")].Trim();
theme.Dictionary[left] = line[(line.IndexOf("=") + 1)..].Trim();
}
}
return list;
}
public static void UpdateWpfColors()
{
var dic = Application.Current.Resources;
dic.Remove("BorderColor");
dic.Add("BorderColor", Current!.GetColor("menu-highlight"));
dic.Remove("RegionColor");
dic.Add("RegionColor", Current.GetColor("menu-background"));
dic.Remove("SecondaryRegionColor");
dic.Add("SecondaryRegionColor", Current.GetColor("menu-highlight"));
dic.Remove("PrimaryTextColor");
dic.Add("PrimaryTextColor", Current.GetColor("menu-foreground"));
dic.Remove("HighlightColor");
dic.Add("HighlightColor", Current.GetColor("highlight"));
}
static bool DarkModeSystem
{
get
{
string key = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize";
return (int)(Registry.GetValue(key, "AppsUseLightTheme", 1) ?? 1) == 0;
}
}
public static bool DarkMode => App.DarkMode == "system" && DarkModeSystem || App.DarkMode == "always";
}

View File

@@ -0,0 +1,11 @@

namespace MpvNet.Windows.UI;
public class TreeNode
{
readonly List<TreeNode> _children = new List<TreeNode>();
public IList<TreeNode> Children => _children;
public string Name { get; set; } = "";
}

View File

@@ -0,0 +1,20 @@

using System.Windows;
namespace MpvNet.Windows.WPF;
public class BindingProxy : Freezable
{
protected override Freezable CreateInstanceCore() => new BindingProxy();
public object Data
{
get { return GetValue(DataProperty); }
set { SetValue(DataProperty, value); }
}
// Using a DependencyProperty as the backing store for Data.
// This enables animation, styling, binding, etc...
public static readonly DependencyProperty DataProperty =
DependencyProperty.Register("Data", typeof(object), typeof(BindingProxy), new UIPropertyMetadata(null));
}

View File

@@ -0,0 +1,162 @@
<Window
x:Name="ConfWindow1"
x:Class="MpvNet.Windows.WPF.ConfWindow"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:controls="clr-namespace:MpvNet.Windows.WPF.Controls"
xmlns:wpf="clr-namespace:MpvNet.Windows.WPF"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
mc:Ignorable="d"
Title="Config Editor"
Height="550"
Width="800"
Foreground="{Binding Theme.Foreground}"
Background="{Binding Theme.Background}"
ShowInTaskbar="False"
WindowStartupLocation="CenterScreen"
Loaded="ConfWindow1_Loaded"
>
<Window.Resources>
<wpf:BindingProxy x:Key="BindingProxy" Data="{Binding}" />
</Window.Resources>
<Window.InputBindings>
<KeyBinding Key="n" Modifiers="Ctrl" Command="{Binding ShowMpvNetSpecificSettingsCommand}"/>
<KeyBinding Key="F5" Command="{Binding PreviewMpvConfFileCommand}"/>
<KeyBinding Key="F6" Command="{Binding PreviewMpvNetConfFileCommand}"/>
<KeyBinding Key="F1" Command="{Binding ShowMpvManualCommand}"/>
<KeyBinding Key="F2" Command="{Binding ShowMpvNetManualCommand}"/>
</Window.InputBindings>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="170" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<controls:SearchControl
x:Name="SearchControl"
HintText="Find a setting (Ctrl+F)"
Margin="20,20,0,10"
Text="{Binding SearchText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
/>
<ScrollViewer
Name="MainScrollViewer"
VerticalScrollBarVisibility="Auto"
Grid.RowSpan="3"
Grid.Column="2"
Margin="0,0,0,10"
>
<StackPanel x:Name="MainStackPanel"></StackPanel>
</ScrollViewer>
<TreeView
x:Name="TreeView"
ItemsSource="{Binding Nodes}"
Margin="20,0,0,0"
Grid.Row="1"
BorderThickness="0"
Foreground="{Binding Theme.Foreground}"
Background="{Binding Theme.Background}"
SelectedItemChanged="TreeView_SelectedItemChanged"
>
<TreeView.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.Theme.Background}" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.Theme.Background}" />
</TreeView.Resources>
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="Cursor" Value="Hand" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="FontSize" Value="14" />
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.Theme.Foreground2}" />
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Background" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.Theme.Background2}" />
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.Theme.Foreground}" />
</Trigger>
</Style.Triggers>
</Style>
</TreeView.ItemContainerStyle>
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<TextBlock Text="{Binding Name}" />
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
<TextBlock
Name="MenuTextBlock"
Text="Menu"
Cursor="Hand"
Foreground="LightGray"
TextDecorations="Underline"
HorizontalAlignment="Center"
Margin="20,5,10,10"
Grid.Row="2"
>
<TextBlock.ContextMenu>
<ContextMenu Name="MainContextMenu">
<MenuItem
Header="Show mpv.net options"
InputGestureText="Ctrl+n"
Command="{Binding Data.ShowMpvNetSpecificSettingsCommand, Source={StaticResource BindingProxy}}"
/>
<Separator />
<MenuItem
Header="Preview mpv.conf"
InputGestureText="F5"
Command="{Binding Data.PreviewMpvConfFileCommand, Source={StaticResource BindingProxy}}"
/>
<MenuItem
Header="Preview mpvnet.conf"
InputGestureText="F6"
Command="{Binding Data.PreviewMpvNetConfFileCommand, Source={StaticResource BindingProxy}}"
/>
<Separator />
<MenuItem
Header="Show mpv manual"
InputGestureText="F1"
Command="{Binding Data.ShowMpvManualCommand, Source={StaticResource BindingProxy}}"
/>
<MenuItem
Header="Show mpv.net manual"
InputGestureText="F2"
Command="{Binding Data.ShowMpvNetManualCommand, Source={StaticResource BindingProxy}}"
/>
</ContextMenu>
</TextBlock.ContextMenu>
<b:Interaction.Triggers>
<b:EventTrigger EventName="MouseLeftButtonDown">
<b:ChangePropertyAction TargetObject="{Binding ContextMenu, ElementName=MenuTextBlock}"
PropertyName="PlacementTarget"
Value="{Binding ElementName=MenuTextBlock, Mode=OneWay}"/>
<b:ChangePropertyAction TargetObject="{Binding ContextMenu, ElementName=MenuTextBlock}"
PropertyName="IsOpen"
Value="True"/>
</b:EventTrigger>
</b:Interaction.Triggers>
</TextBlock>
</Grid>
</Window>

View File

@@ -0,0 +1,482 @@

using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Threading;
using CommunityToolkit.Mvvm.Input;
using MpvNet.Help;
using MpvNet.Windows.UI;
using MpvNet.Windows.WPF.Controls;
using MpvNet.Windows.WPF.ViewModels;
namespace MpvNet.Windows.WPF;
public partial class ConfWindow : Window, INotifyPropertyChanged
{
List<Setting> Settings = Conf.LoadConf(Properties.Resources.editor_conf.TrimEnd());
List<ConfItem> ConfItems = new List<ConfItem>();
public ObservableCollection<string> FilterStrings { get; } = new();
string InitialContent;
string ThemeConf = GetThemeConf();
string? _searchText;
List<NodeViewModel>? _nodes;
public event PropertyChangedEventHandler? PropertyChanged;
public ConfWindow()
{
InitializeComponent();
DataContext = this;
LoadConf(Player.ConfPath);
LoadConf(App.ConfPath);
LoadSettings();
InitialContent = GetCompareString();
if (string.IsNullOrEmpty(App.Settings.ConfigEditorSearch))
SearchControl.Text = "General:";
else
SearchControl.Text = App.Settings.ConfigEditorSearch;
foreach (var node in Nodes)
SelectNodeFromSearchText(node);
foreach (var node in Nodes)
ExpandNode(node);
}
public Theme? Theme => Theme.Current;
public string SearchText
{
get => _searchText ?? "";
set
{
_searchText = value;
SearchTextChanged();
OnPropertyChanged();
}
}
public List<NodeViewModel> Nodes
{
get
{
if (_nodes == null)
{
var rootNode = new TreeNode();
foreach (Setting setting in Settings)
AddNode(rootNode.Children, setting.Directory!);
_nodes = new NodeViewModel(rootNode).Children;
}
return _nodes;
}
}
public static TreeNode? AddNode(IList<TreeNode> nodes, string path)
{
string[] parts = path.Split('/', StringSplitOptions.RemoveEmptyEntries);
for (int x = 0; x < parts.Length; x++)
{
bool found = false;
foreach (var node in nodes)
{
if (x < parts.Length - 1)
{
if (node.Name == parts[x])
{
found = true;
nodes = node.Children;
}
}
else if (x == parts.Length - 1 && node.Name == parts[x])
{
found = true;
}
}
if (!found)
{
if (x == parts.Length - 1)
{
var item = new TreeNode() { Name = parts[x] };
nodes?.Add(item);
return item;
}
}
}
return null;
}
void LoadSettings()
{
foreach (Setting setting in Settings)
{
setting.StartValue = setting.Value;
if (!FilterStrings.Contains(setting.Directory!))
FilterStrings.Add(setting.Directory!);
foreach (ConfItem confItem in ConfItems)
{
if (setting.Name == confItem.Name && confItem.Section == "" && !confItem.IsSectionItem)
{
setting.Value = confItem.Value.Trim('\'', '"');
setting.StartValue = setting.Value;
setting.ConfItem = confItem;
confItem.SettingBase = setting;
}
}
switch (setting)
{
case StringSetting s:
MainStackPanel.Children.Add(new StringSettingControl(s) { Visibility = Visibility.Collapsed });
break;
case OptionSetting s:
MainStackPanel.Children.Add(new OptionSettingControl(s) { Visibility = Visibility.Collapsed });
break;
}
}
}
static string GetThemeConf() => Theme.DarkMode + App.DarkTheme + App.LightTheme;
protected override void OnClosed(EventArgs e)
{
base.OnClosed(e);
App.Settings.ConfigEditorSearch = SearchControl.Text;
if (InitialContent == GetCompareString())
return;
File.WriteAllText(Player.ConfPath, GetContent("mpv"));
File.WriteAllText(App.ConfPath, GetContent("mpvnet"));
foreach (Setting it in Settings)
{
if (it.Value != it.StartValue)
{
if (it.File == "mpv")
{
Player.ProcessProperty(it.Name, it.Value);
Player.SetPropertyString(it.Name!, it.Value!);
}
else if (it.File == "mpvnet")
App.ProcessProperty(it.Name ?? "", it.Value ?? "", true);
}
}
Theme.Init();
Theme.UpdateWpfColors();
if (ThemeConf != GetThemeConf())
MessageBox.Show("Changed theme settings require mpv.net being restarted.", "Info");
}
bool _shown;
protected override void OnContentRendered(EventArgs e)
{
base.OnContentRendered(e);
if (_shown)
return;
_shown = true;
Application.Current.Dispatcher.BeginInvoke(() => {
SearchControl.SearchTextBox.SelectAll();
},
DispatcherPriority.Background);
}
string GetCompareString()
{
return string.Join("", Settings.Select(item => item.Name + item.Value).ToArray());
}
void LoadConf(string file)
{
if (!File.Exists(file))
return;
string comment = "";
string section = "";
bool isSectionItem = false;
foreach (string currentLine in File.ReadAllLines(file))
{
string line = currentLine.Trim();
if (line == "")
{
comment += "\r\n";
}
else if (line.StartsWith("#"))
{
comment += line.Trim() + "\r\n";
}
else if (line.StartsWith("[") && line.Contains("]"))
{
if (!isSectionItem && comment != "" && comment != "\r\n")
ConfItems.Add(new ConfItem() {
Comment = comment, File = Path.GetFileNameWithoutExtension(file)});
section = line.Substring(0, line.IndexOf("]") + 1);
comment = "";
isSectionItem = true;
}
else if (line.Contains("="))
{
ConfItem item = new ConfItem();
item.File = Path.GetFileNameWithoutExtension(file);
item.IsSectionItem = isSectionItem;
item.Comment = comment;
comment = "";
item.Section = section;
section = "";
if (line.Contains("#") && !line.Contains("'") && !line.Contains("\""))
{
item.LineComment = line.Substring(line.IndexOf("#")).Trim();
line = line.Substring(0, line.IndexOf("#")).Trim();
}
int pos = line.IndexOf("=");
string left = line.Substring(0, pos).Trim().ToLower();
string right = line.Substring(pos + 1).Trim();
if (left == "fs")
left = "fullscreen";
if (left == "loop")
left = "loop-file";
item.Name = left;
item.Value = right;
ConfItems.Add(item);
}
}
}
string GetContent(string filename)
{
StringBuilder sb = new StringBuilder();
List<string> namesWritten = new List<string>();
foreach (ConfItem item in ConfItems)
{
if (filename != item.File || item.Section != "" || item.IsSectionItem)
continue;
if (item.Comment != "")
sb.Append(item.Comment);
if (item.SettingBase == null)
{
if (item.Name != "")
{
sb.Append(item.Name + " = " + item.Value);
if (item.LineComment != "")
sb.Append(" " + item.LineComment);
sb.AppendLine();
namesWritten.Add(item.Name);
}
}
else if ((item.SettingBase.Value ?? "") != item.SettingBase.Default)
{
string? value;
if (item.SettingBase.Type == "string" ||
item.SettingBase.Type == "folder" ||
item.SettingBase.Type == "color")
value = "'" + item.SettingBase.Value + "'";
else
value = item.SettingBase.Value;
sb.Append(item.Name + " = " + value);
if (item.LineComment != "")
sb.Append(" " + item.LineComment);
sb.AppendLine();
namesWritten.Add(item.Name);
}
}
if (!sb.ToString().Contains("# Editor"))
sb.AppendLine("# Editor");
foreach (Setting setting in Settings)
{
if (filename != setting.File || namesWritten.Contains(setting.Name!))
continue;
if ((setting.Value ?? "") != setting.Default)
{
string? value;
if (setting.Type == "string" ||
setting.Type == "folder" ||
setting.Type == "color")
value = "'" + setting.Value + "'";
else
value = setting.Value;
sb.AppendLine(setting.Name + " = " + value);
}
}
foreach (ConfItem item in ConfItems)
{
if (filename != item.File || (item.Section == "" && !item.IsSectionItem))
continue;
if (item.Section != "")
{
if (!sb.ToString().EndsWith("\r\n\r\n"))
sb.AppendLine();
sb.AppendLine(item.Section);
}
if (item.Comment != "")
sb.Append(item.Comment);
sb.Append(item.Name + " = " + item.Value);
if (item.LineComment != "")
sb.Append(" " + item.LineComment);
sb.AppendLine();
namesWritten.Add(item.Name);
}
return "\r\n" + sb.ToString().Trim() + "\r\n";
}
void SearchTextChanged()
{
string activeFilter = "";
foreach (string i in FilterStrings)
if (SearchText == i + ":")
activeFilter = i;
if (activeFilter == "")
{
foreach (UIElement i in MainStackPanel.Children)
if ((i as ISettingControl)!.Contains(SearchText) && SearchText.Length > 1)
i.Visibility = Visibility.Visible;
else
i.Visibility = Visibility.Collapsed;
foreach (var node in Nodes)
UnselectNode(node);
}
else
foreach (UIElement i in MainStackPanel.Children)
if ((i as ISettingControl)!.Setting.Directory == activeFilter)
i.Visibility = Visibility.Visible;
else
i.Visibility = Visibility.Collapsed;
MainScrollViewer.ScrollToTop();
}
void ConfWindow1_Loaded(object sender, RoutedEventArgs e)
{
SearchControl.SearchTextBox.SelectAll();
Keyboard.Focus(SearchControl.SearchTextBox);
foreach (var i in MainStackPanel.Children.OfType<StringSettingControl>())
i.Update();
}
protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
if (e.Key == Key.Escape)
Close();
if (e.Key == Key.F3 || e.Key == Key.F6 || (e.Key == Key.F && Keyboard.Modifiers == ModifierKeys.Control))
{
Keyboard.Focus(SearchControl.SearchTextBox);
SearchControl.SearchTextBox.SelectAll();
}
}
protected void OnPropertyChanged([CallerMemberName] string? name = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}
void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
{
var node = TreeView.SelectedItem as NodeViewModel;
if (node == null)
return;
Application.Current.Dispatcher.BeginInvoke(() => {
SearchText = node!.Path + ":";
},
DispatcherPriority.Background);
}
void SelectNodeFromSearchText(NodeViewModel node)
{
if (node.Path + ":" == SearchControl.Text)
{
node.IsSelected = true;
return;
}
foreach (var it in node.Children)
SelectNodeFromSearchText(it);
}
void UnselectNode(NodeViewModel node)
{
if (node.IsSelected)
node.IsSelected = false;
foreach (var it in node.Children)
UnselectNode(it);
}
void ExpandNode(NodeViewModel node)
{
node.IsExpanded = true;
foreach (var it in node.Children)
ExpandNode(it);
}
[RelayCommand] void ShowMpvNetSpecificSettings() => SearchControl.Text = "mpv.net";
[RelayCommand] void PreviewMpvConfFile() => Msg.ShowInfo(GetContent("mpv"));
[RelayCommand] void PreviewMpvNetConfFile() => Msg.ShowInfo(GetContent("mpvnet"));
[RelayCommand] void ShowMpvManual() => ProcessHelp.ShellExecute("https://mpv.io/manual/master/");
[RelayCommand] void ShowMpvNetManual() => ProcessHelp.ShellExecute("https://github.com/mpvnet-player/mpv.net/blob/main/docs/manual.md");
}

View File

@@ -1,10 +1,10 @@
<UserControl
x:Class="mpvnet.CommandPaletteControl"
x:Class="MpvNet.Windows.WPF.Controls.CommandPaletteControl"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:mpvnet"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:controls="clr-namespace:MpvNet.Windows.WPF.Controls"
mc:Ignorable="d"
FontSize="13"
@@ -37,8 +37,8 @@
CornerRadius="3"
Margin="7"
>
<local:SearchTextBoxUserControl
<controls:SearchControl
HintText="Search"
x:Name="SearchControl"
Grid.ColumnSpan="2"
@@ -46,15 +46,16 @@
/>
</Border>
<ListView Name="MainListView"
Grid.Row="1"
Foreground="{Binding Theme.Foreground}"
Background="{Binding Theme.Background}"
BorderThickness="0"
MaxHeight="202"
SizeChanged="MainListView_SizeChanged"
MouseUp="MainListView_MouseUp"
>
<ListView
Name="MainListView"
Grid.Row="1"
Foreground="{Binding Theme.Foreground}"
Background="{Binding Theme.Background}"
BorderThickness="0"
MaxHeight="202"
SizeChanged="MainListView_SizeChanged"
MouseUp="MainListView_MouseUp"
>
<ListView.ItemContainerStyle>
<Style TargetType="ListBoxItem">

View File

@@ -0,0 +1,151 @@

using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;
using MpvNet.Windows.UI;
using MpvNet.Windows.WinForms;
namespace MpvNet.Windows.WPF.Controls;
public partial class CommandPaletteControl : UserControl
{
public ICollectionView CollectionView { get; set; }
public CollectionViewSource CollectionViewSource { get; }
public ObservableCollection<CommandPaletteItem> Items { get; } = new ObservableCollection<CommandPaletteItem>();
public CommandPaletteControl()
{
InitializeComponent();
DataContext = this;
CollectionViewSource = new CollectionViewSource() { Source = Items };
CollectionView = CollectionViewSource.View;
CollectionView.Filter = new Predicate<object>(item => Filter((CommandPaletteItem)item));
MainListView.ItemsSource = CollectionView;
SearchControl.SearchTextBox.PreviewKeyDown += SearchTextBox_PreviewKeyDown;
SearchControl.SearchTextBox.TextChanged += SearchTextBox_TextChanged;
SearchControl.HideClearButton = true;
if (Environment.OSVersion.Version < new Version(10, 0))
MainBorder.CornerRadius = new CornerRadius(0);
}
void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e)
{
CollectionView.Refresh();
SelectFirst();
}
void SearchTextBox_PreviewKeyDown(object sender, KeyEventArgs e)
{
switch (e.Key)
{
case Key.Up:
{
int index = MainListView.SelectedIndex;
index -= 1;
if (index < 0)
index = 0;
MainListView.SelectedIndex = index;
MainListView.ScrollIntoView(MainListView.SelectedItem);
}
break;
case Key.Down:
{
int index = MainListView.SelectedIndex;
if (++index > MainListView.Items.Count - 1)
index = MainListView.Items.Count - 1;
MainListView.SelectedIndex = index;
MainListView.ScrollIntoView(MainListView.SelectedItem);
}
break;
}
}
void MainListView_SizeChanged(object sender, SizeChangedEventArgs e) => AdjustHeight();
void MainListView_MouseUp(object sender, MouseButtonEventArgs e) => ExecuteInternal();
[RelayCommand]
void Escape(object param) => MainForm.Instance?.HideCommandPalette();
[RelayCommand]
void Execute() => ExecuteInternal();
void OnLoaded(object sender, RoutedEventArgs e) => Keyboard.Focus(SearchControl.SearchTextBox);
public Theme Theme => Theme.Current!;
bool Filter(CommandPaletteItem item)
{
string filter = SearchControl.SearchTextBox.Text.ToLower();
if (item.Binding != null)
{
// TODO: CommandItem.Alias
//if (item.CommandItem.Alias.ContainsEx(filter))
// return true;
if (filter.Length == 1)
return item.Binding.Input.ToLower()
.Replace("ctrl+", "")
.Replace("shift+", "")
.Replace("alt+", "") == filter.ToLower();
if (item.Binding.Command.ToLower().Contains(filter))
return true;
}
if (filter == "" || item.Text.ToLower().Contains(filter) ||
item.SecondaryText.ToLower().Contains(filter))
return true;
return false;
}
public void SelectFirst()
{
if (MainListView.Items.Count > 0)
{
MainListView.SelectedIndex = 0;
MainListView.ScrollIntoView(MainListView.SelectedItem);
}
}
void ExecuteInternal()
{
if (MainListView.SelectedItem != null)
{
CommandPaletteItem? item = MainListView.SelectedItem as CommandPaletteItem;
MainForm.Instance?.HideCommandPalette();
item?.Action?.Invoke();
//MainForm.Instance.Voodoo(); //TODO: Voodoo
}
}
public void SetItems(IEnumerable<CommandPaletteItem> items)
{
Items.Clear();
foreach (var i in items)
Items.Add(i);
}
public void AdjustHeight()
{
double actualHeight = SearchControl.ActualHeight + MainListView.ActualHeight + 5 + 16;
int dpi = MainForm.GetDpi(MainForm.Instance!.Handle);
MainForm.Instance.CommandPaletteHost.Height = (int)(actualHeight / 96.0 * dpi);
}
}

View File

@@ -0,0 +1,25 @@

using System.Windows.Documents;
using System.Windows.Navigation;
using MpvNet.Help;
// TODO: change namespace to MpvNet.Windows.WPF.Controls
namespace MpvNet.Windows.WPF;
public class HyperlinkEx : Hyperlink
{
void HyperLinkEx_RequestNavigate(object sender, RequestNavigateEventArgs e) =>
ProcessHelp.ShellExecute(e.Uri.AbsoluteUri);
public void SetURL(string? url)
{
if (string.IsNullOrEmpty(url))
return;
NavigateUri = new Uri(url);
RequestNavigate += HyperLinkEx_RequestNavigate;
Inlines.Clear();
Inlines.Add(url);
}
}

View File

@@ -1,10 +1,11 @@
<UserControl
x:Name="OptionSettingControl1" x:Class="DynamicGUI.OptionSettingControl"
x:Name="OptionSettingControl1"
x:Class="MpvNet.Windows.WPF.OptionSettingControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:mpvnet"
xmlns:local="clr-namespace:MpvNet.Windows.WPF"
mc:Ignorable="d"
d:DesignHeight="450"

View File

@@ -0,0 +1,60 @@

using System.Windows;
using System.Windows.Controls;
using MpvNet.Windows.UI;
namespace MpvNet.Windows.WPF;
public partial class OptionSettingControl : UserControl, ISettingControl
{
OptionSetting OptionSetting;
public OptionSettingControl(OptionSetting optionSetting)
{
OptionSetting = optionSetting;
InitializeComponent();
DataContext = this;
TitleTextBox.Text = optionSetting.Name;
if (string.IsNullOrEmpty(optionSetting.Help))
HelpTextBox.Visibility = Visibility.Collapsed;
HelpTextBox.Text = optionSetting.Help;
ItemsControl.ItemsSource = optionSetting.Options;
if (string.IsNullOrEmpty(optionSetting.URL))
LinkTextBlock.Visibility = Visibility.Collapsed;
Link.SetURL(optionSetting.URL);
}
public Theme? Theme => Theme.Current;
public Setting Setting => OptionSetting;
public bool Contains(string searchString) => ContainsInternal(searchString.ToLower());
public bool ContainsInternal(string search)
{
if (TitleTextBox.Text.IndexOf(search, StringComparison.InvariantCultureIgnoreCase) > -1)
return true;
if (HelpTextBox.Text.IndexOf(search, StringComparison.InvariantCultureIgnoreCase) > -1)
return true;
foreach (var i in OptionSetting.Options)
{
if (i.Text?.IndexOf(search, StringComparison.InvariantCultureIgnoreCase) > -1)
return true;
if (i.Help?.IndexOf(search, StringComparison.InvariantCultureIgnoreCase) > -1)
return true;
if (i.Name?.IndexOf(search, StringComparison.InvariantCultureIgnoreCase) > -1)
return true;
}
return false;
}
}

View File

@@ -1,23 +1,20 @@
<UserControl
x:Class="mpvnet.SearchTextBoxUserControl"
x:Class="MpvNet.Windows.WPF.Controls.SearchControl"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:controls="clr-namespace:MpvNet.Windows.WPF.Controls"
mc:Ignorable="d"
d:DesignHeight="450"
d:DesignWidth="800"
>
<Grid
Name="SearchTextBoxUserControl1"
Background="{Binding Theme.Background}"
>
<Grid Background="{Binding Theme.Background}">
<TextBlock
Name="HintTextBlock"
Padding="6,1"
Text="Find a setting"
VerticalAlignment="Center"
Foreground="{Binding Theme.Foreground2}"
Background="{Binding Theme.Background}"
@@ -29,9 +26,14 @@
BorderThickness="2"
Padding="2"
Background="Transparent"
TextChanged="SearchTextBox_TextChanged"
Foreground="{Binding Theme.Foreground}"
CaretBrush="{Binding Theme.Foreground}"
GotFocus="SearchTextBox_GotFocus"
PreviewMouseUp="SearchTextBox_PreviewMouseUp"
PreviewKeyDown="SearchTextBox_PreviewKeyDown"
Text="{Binding RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type controls:SearchControl}},
Path=Text, UpdateSourceTrigger=PropertyChanged}"
/>
<Button
@@ -44,7 +46,8 @@
Height="17"
Margin="2,0,4,0"
Visibility="Hidden"
Click="SearchClearButton_Click"
Command="{Binding RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type controls:SearchControl}}, Path=ClearCommand}"
>r
<Button.Resources>

View File

@@ -0,0 +1,81 @@

using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;
using MpvNet.Windows.UI;
namespace MpvNet.Windows.WPF.Controls;
public partial class SearchControl : UserControl
{
string? _hintText;
bool _gotFocus;
public bool HideClearButton { get; set; }
public SearchControl() => InitializeComponent();
public Theme? Theme => Theme.Current;
public string HintText {
get => _hintText ??= "";
set {
_hintText = value;
UpdateControls();
}
}
[RelayCommand]
void Clear()
{
Text = "";
Keyboard.Focus(SearchTextBox);
}
void UpdateControls()
{
HintTextBlock.Text = string.IsNullOrEmpty(Text) ? HintText : "";
if (string.IsNullOrEmpty(Text) || HideClearButton)
SearchClearButton.Visibility = Visibility.Hidden;
else
SearchClearButton.Visibility = Visibility.Visible;
}
public string Text
{
get => (string)GetValue(TextProperty);
set => SetValue(TextProperty, value);
}
public static readonly DependencyProperty TextProperty =
DependencyProperty.Register("Text", typeof(string),
typeof(SearchControl), new PropertyMetadata(OnCustomerChangedCallBack));
static void OnCustomerChangedCallBack(
DependencyObject sender, DependencyPropertyChangedEventArgs e) =>
(sender as SearchControl)?.UpdateControls();
void SearchTextBox_GotFocus(object sender, RoutedEventArgs e) => _gotFocus = true;
void SearchTextBox_PreviewMouseUp(object sender, MouseButtonEventArgs e)
{
if (_gotFocus)
{
SearchTextBox?.SelectAll();
_gotFocus = false;
}
}
void SearchTextBox_PreviewKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Escape && !string.IsNullOrEmpty(Text))
{
Text = "";
e.Handled = true;
}
}
}

View File

@@ -1,10 +1,11 @@
<UserControl
x:Name="StringSettingControl1" x:Class="DynamicGUI.StringSettingControl"
x:Name="StringSettingControl1"
x:Class="MpvNet.Windows.WPF.StringSettingControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:mpvnet"
xmlns:local="clr-namespace:MpvNet.Windows.WPF"
mc:Ignorable="d"
d:DesignHeight="450"
d:DesignWidth="800">

View File

@@ -0,0 +1,128 @@

using System.Globalization;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using Forms = System.Windows.Forms;
using MpvNet.Windows.UI;
namespace MpvNet.Windows.WPF;
public partial class StringSettingControl : UserControl, ISettingControl
{
StringSetting StringSetting;
public StringSettingControl(StringSetting stringSetting)
{
StringSetting = stringSetting;
InitializeComponent();
DataContext = this;
TitleTextBox.Text = stringSetting.Name;
HelpTextBox.Text = stringSetting.Help;
ValueTextBox.Text = StringSetting.Value;
if (StringSetting.Width > 0)
ValueTextBox.Width = StringSetting.Width;
if (StringSetting.Type != "folder" && StringSetting.Type != "color")
Button.Visibility = Visibility.Hidden;
Link.SetURL(StringSetting.URL);
if (string.IsNullOrEmpty(stringSetting.URL))
LinkTextBlock.Visibility = Visibility.Collapsed;
}
public Theme? Theme => Theme.Current;
public bool Contains(string search)
{
if (TitleTextBox.Text.IndexOf(search, StringComparison.InvariantCultureIgnoreCase) > -1)
return true;
if (HelpTextBox.Text.IndexOf(search, StringComparison.InvariantCultureIgnoreCase) > -1)
return true;
if (ValueTextBox.Text.IndexOf(search, StringComparison.InvariantCultureIgnoreCase) > -1)
return true;
return false;
}
public Setting Setting => StringSetting;
public string? Text
{
get => StringSetting.Value;
set => StringSetting.Value = value;
}
void Button_Click(object sender, RoutedEventArgs e)
{
switch (StringSetting.Type)
{
case "folder":
{
var dialog = new Forms.FolderBrowserDialog { InitialDirectory = ValueTextBox.Text };
if (dialog.ShowDialog() == Forms.DialogResult.OK)
ValueTextBox.Text = dialog.SelectedPath;
}
break;
case "color":
using (var dialog = new Forms.ColorDialog())
{
dialog.FullOpen = true;
try
{
if (!string.IsNullOrEmpty(ValueTextBox.Text))
{
Color col = GetColor(ValueTextBox.Text);
dialog.Color = System.Drawing.Color.FromArgb(col.A, col.R, col.G, col.B);
}
} catch {}
if (dialog.ShowDialog() == Forms.DialogResult.OK)
ValueTextBox.Text = "#" + dialog.Color.ToArgb().ToString("X8");
}
break;
}
}
void ValueTextBox_TextChanged(object sender, TextChangedEventArgs e) => Update();
Color GetColor(string value)
{
if (value.Contains('/'))
{
string[] a = value.Split('/');
if (a.Length == 3)
return Color.FromRgb(ToByte(a[0]), ToByte(a[1]), ToByte(a[2]));
else if (a.Length == 4)
return Color.FromArgb(ToByte(a[3]), ToByte(a[0]), ToByte(a[1]), ToByte(a[2]));
}
return (Color)ColorConverter.ConvertFromString(value);
byte ToByte(string val) => Convert.ToByte(Convert.ToSingle(val, CultureInfo.InvariantCulture) * 255);
}
public void Update()
{
if (StringSetting.Type == "color")
{
Color color = Colors.Transparent;
if (ValueTextBox.Text != "")
try {
color = GetColor(ValueTextBox.Text);
} catch {}
ValueTextBox.Background = new SolidColorBrush(color);
}
}
}

Some files were not shown because too many files have changed in this diff Show More