Compare commits
442 Commits
5.4.9.0
...
v7.0.0.4-b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3b9c653fa | ||
|
|
ed48f5c559 | ||
|
|
d328f6b7ec | ||
|
|
16ba94d67d | ||
|
|
7978170133 | ||
|
|
ab313eb442 | ||
|
|
f40008d94a | ||
|
|
75e19d8d18 | ||
|
|
9bb978f612 | ||
|
|
7ea3fbc917 | ||
|
|
3af5b458ba | ||
|
|
b23542d681 | ||
|
|
e0616dee76 | ||
|
|
cd54e67b87 | ||
|
|
9d4779fd96 | ||
|
|
d4d147e5fc | ||
|
|
35b17bc620 | ||
|
|
3eb4af5e75 | ||
|
|
49f22a1f81 | ||
|
|
7cd5686488 | ||
|
|
0d63feec57 | ||
|
|
0ee8318ca4 | ||
|
|
8e45cdb47d | ||
|
|
a61a0506fd | ||
|
|
b3877492dd | ||
|
|
090f15fc47 | ||
|
|
d57692c5d1 | ||
|
|
60dfbee16d | ||
|
|
74f586744f | ||
|
|
9b93eaa9e9 | ||
|
|
a4eed2d939 | ||
|
|
34a3855941 | ||
|
|
dfd9abeba4 | ||
|
|
f937273fe3 | ||
|
|
8d601525b5 | ||
|
|
5dd3716012 | ||
|
|
a4709de918 | ||
|
|
c24b9b2c83 | ||
|
|
3686231cf2 | ||
|
|
4c12097063 | ||
|
|
da7f877f2a | ||
|
|
1dbb1e4af9 | ||
|
|
abea225b54 | ||
|
|
2053042e19 | ||
|
|
a3046258d4 | ||
|
|
207da8d0a6 | ||
|
|
f7ed3bf01f | ||
|
|
3c8cd407e1 | ||
|
|
ea56b6d06c | ||
|
|
d4c4296196 | ||
|
|
1b4be52ce6 | ||
|
|
286686f8c4 | ||
|
|
146852ca19 | ||
|
|
3f6181f77b | ||
|
|
8997a2eacb | ||
|
|
a6642a4db8 | ||
|
|
8a8ac75b29 | ||
|
|
1cc2422117 | ||
|
|
0fa3feef1f | ||
|
|
3ae923ba0e | ||
|
|
11e150b0f9 | ||
|
|
1ed8c234a3 | ||
|
|
948e600f96 | ||
|
|
1050e7d25f | ||
|
|
2ff1b07449 | ||
|
|
4466217063 | ||
|
|
01adf213bc | ||
|
|
c1308434b1 | ||
|
|
e854598cd2 | ||
|
|
f6ca5a3b96 | ||
|
|
8fe196bf8a | ||
|
|
3abb3c32f0 | ||
|
|
867c9c2989 | ||
|
|
c1c8e08c9d | ||
|
|
bdcfa4e722 | ||
|
|
7879bda5c1 | ||
|
|
ef062d1b10 | ||
|
|
8b6204ed2b | ||
|
|
f14d1a98f9 | ||
|
|
9ec518a952 | ||
|
|
8ee67f832c | ||
|
|
684e103e12 | ||
|
|
1d3fe0a924 | ||
|
|
b41ca3cd89 | ||
|
|
aa0e88129b | ||
|
|
4baa26d7a0 | ||
|
|
4c4088b28a | ||
|
|
ea8944c1cc | ||
|
|
d7e1e32654 | ||
|
|
9878e6da46 | ||
|
|
37320fb975 | ||
|
|
0148a71281 | ||
|
|
9f4baa9d99 | ||
|
|
5706d7b66d | ||
|
|
fb27bb8727 | ||
|
|
80c827974a | ||
|
|
d2e7d4551f | ||
|
|
308e3ed044 | ||
|
|
f563342eb5 | ||
|
|
16d6e4d471 | ||
|
|
030aa930a1 | ||
|
|
3a6df857da | ||
|
|
7d9340d9d5 | ||
|
|
9dca27c941 | ||
|
|
6f2b30f762 | ||
|
|
89be723132 | ||
|
|
ec1dde650f | ||
|
|
dbf1a32580 | ||
|
|
a81ed58983 | ||
|
|
33df960d04 | ||
|
|
337bee9f28 | ||
|
|
e57c41a254 | ||
|
|
62d06c65ab | ||
|
|
e70a935d7a | ||
|
|
c8e6ce678a | ||
|
|
22960af78b | ||
|
|
95e31a1d3f | ||
|
|
06ff83b75c | ||
|
|
1f6025a10f | ||
|
|
00bfa20fac | ||
|
|
1475d5ee66 | ||
|
|
b73d2e7107 | ||
|
|
a7fa76d63a | ||
|
|
e2c720346a | ||
|
|
01a853e865 | ||
|
|
6510de2bd8 | ||
|
|
7fc1de2ce3 | ||
|
|
b0d399e9ee | ||
|
|
7f680829ef | ||
|
|
603f956261 | ||
|
|
6d06df9004 | ||
|
|
5ea086d05b | ||
|
|
1ad819fa9d | ||
|
|
f2dd6205b5 | ||
|
|
b2a3c231ff | ||
|
|
f6c223a411 | ||
|
|
e7a2ba6805 | ||
|
|
5a08d9ccd6 | ||
|
|
5714a5e62a | ||
|
|
def7e5ac5a | ||
|
|
601bb20492 | ||
|
|
59600df977 | ||
|
|
e1b9730e9b | ||
|
|
e378551938 | ||
|
|
a82b2ef571 | ||
|
|
6157a01701 | ||
|
|
ec17ae8ce9 | ||
|
|
f719528017 | ||
|
|
966b45eb65 | ||
|
|
eeae6994a2 | ||
|
|
07809d882f | ||
|
|
e970f0b4e4 | ||
|
|
a36b6a3fdf | ||
|
|
4febca257f | ||
|
|
9d493b4d08 | ||
|
|
9a6bf5a481 | ||
|
|
40565e8b3d | ||
|
|
fb294c441d | ||
|
|
03b775370b | ||
|
|
1015f87533 | ||
|
|
cadc5d65cf | ||
|
|
3e2f104aa7 | ||
|
|
c87ce3b66f | ||
|
|
3093dd43a4 | ||
|
|
061bb39b60 | ||
|
|
d994c79d5d | ||
|
|
9ca66db07b | ||
|
|
4a382d4e29 | ||
|
|
69a5ba4470 | ||
|
|
4a890a4da7 | ||
|
|
023c1db417 | ||
|
|
7ef1f9315e | ||
|
|
a148c88435 | ||
|
|
f6ad169f9d | ||
|
|
e69a5559e8 | ||
|
|
500fe9abc4 | ||
|
|
55f4a340af | ||
|
|
b17ed3675e | ||
|
|
34031fa15d | ||
|
|
d6d31d8ae9 | ||
|
|
0bfee26418 | ||
|
|
71d6b96c10 | ||
|
|
d1b7250a7a | ||
|
|
39b81d0664 | ||
|
|
6337818dbc | ||
|
|
2257af6294 | ||
|
|
572257b645 | ||
|
|
6eb82b6b7e | ||
|
|
7ef703da42 | ||
|
|
f7f8aa550a | ||
|
|
8d693b5e01 | ||
|
|
e8bc8311e6 | ||
|
|
19c4a1d6c1 | ||
|
|
a53fa7178f | ||
|
|
09aee26cd4 | ||
|
|
0c6e486eb0 | ||
|
|
1561ed90f6 | ||
|
|
c2f965ced9 | ||
|
|
aed524bbc5 | ||
|
|
8cf7e4fd71 | ||
|
|
0ebcf12502 | ||
|
|
2af13e995f | ||
|
|
2e2562fefc | ||
|
|
1860c42114 | ||
|
|
8782ae8ad2 | ||
|
|
5d9cde10ce | ||
|
|
2ee2b31bc0 | ||
|
|
4cd92db141 | ||
|
|
8ee389e8cb | ||
|
|
971fe1fe7c | ||
|
|
e9df0f9f99 | ||
|
|
d465b13a03 | ||
|
|
412d4d7238 | ||
|
|
1dd93bfcff | ||
|
|
4ebf241306 | ||
|
|
1a714a39df | ||
|
|
b2b387c017 | ||
|
|
bf43328e7a | ||
|
|
4cba6bb03c | ||
|
|
72f9f156b8 | ||
|
|
c78719c3bf | ||
|
|
7e4ea640cf | ||
|
|
6ddca6d608 | ||
|
|
0fae17b42a | ||
|
|
7e834cea6d | ||
|
|
6fc546c69c | ||
|
|
e8baa21d42 | ||
|
|
4c3c65dded | ||
|
|
843f7d1a41 | ||
|
|
673d5a8c0e | ||
|
|
6bd4540106 | ||
|
|
5b57e6214e | ||
|
|
27f7935127 | ||
|
|
cd84819a03 | ||
|
|
0efc335232 | ||
|
|
b04fb9b789 | ||
|
|
354d5493c4 | ||
|
|
3e499befbc | ||
|
|
bc0fc2a29d | ||
|
|
229ace708d | ||
|
|
2708937554 | ||
|
|
66654537fe | ||
|
|
5d16d7b2d1 | ||
|
|
b3ebf85772 | ||
|
|
733f0999e1 | ||
|
|
2aec8856c7 | ||
|
|
a0d5a6f234 | ||
|
|
d9afd172f9 | ||
|
|
3b9368230c | ||
|
|
7d510a8ba7 | ||
|
|
e7f08bf0a7 | ||
|
|
ad3235bb96 | ||
|
|
b5b18f2a1a | ||
|
|
28f9df1cee | ||
|
|
cd2f2aeec8 | ||
|
|
a15d2cdbbe | ||
|
|
f489d59168 | ||
|
|
309ddbf08e | ||
|
|
1bc6fb9509 | ||
|
|
88e5628d7b | ||
|
|
27dc98af21 | ||
|
|
ce12eb61fd | ||
|
|
8ed62df8e2 | ||
|
|
f4b4be5466 | ||
|
|
9a33bea7e7 | ||
|
|
3f469897b0 | ||
|
|
1aa380f768 | ||
|
|
b0c3988a9d | ||
|
|
8c02bb59ee | ||
|
|
d60bf050cf | ||
|
|
a0f2e8bd92 | ||
|
|
63db623d07 | ||
|
|
ab0b2c4da2 | ||
|
|
091e159d10 | ||
|
|
91fa89b058 | ||
|
|
36d3543852 | ||
|
|
72ed687390 | ||
|
|
c56855bbc7 | ||
|
|
9377804b06 | ||
|
|
c50ac7a53b | ||
|
|
677e7b5a59 | ||
|
|
8066d07a76 | ||
|
|
e8d6081f9f | ||
|
|
5fb888262e | ||
|
|
a4ffab7b50 | ||
|
|
8d25803b71 | ||
|
|
df4baca6bc | ||
|
|
dc43ab4c8f | ||
|
|
2249174f96 | ||
|
|
6916a63de6 | ||
|
|
1064a80dad | ||
|
|
4844215462 | ||
|
|
b84889b03d | ||
|
|
b38bfd9c65 | ||
|
|
b807ad8002 | ||
|
|
f5854cde1b | ||
|
|
bde4849465 | ||
|
|
8677efdb06 | ||
|
|
2bbd5705c2 | ||
|
|
0bf9b73ba8 | ||
|
|
42fd54269e | ||
|
|
28f1c5c132 | ||
|
|
30b60a5b4e | ||
|
|
f0c9dd7956 | ||
|
|
78ee4fbba2 | ||
|
|
243b45326e | ||
|
|
4efe85aad7 | ||
|
|
975f918703 | ||
|
|
d9f4218bb4 | ||
|
|
671c15385a | ||
|
|
091b9aad5b | ||
|
|
e51b745a13 | ||
|
|
ad1ea92cbd | ||
|
|
66bfb80f3c | ||
|
|
ef6b453673 | ||
|
|
5496d22c48 | ||
|
|
7cd3a8276d | ||
|
|
99ea7285ba | ||
|
|
9722d46d00 | ||
|
|
b115cf82d9 | ||
|
|
f4e72b5a99 | ||
|
|
24596626bd | ||
|
|
6e761c0a4e | ||
|
|
2a3738f79e | ||
|
|
1a475f9fe8 | ||
|
|
819b026ec7 | ||
|
|
38a816a255 | ||
|
|
e8af1d2ccf | ||
|
|
33cd881ae6 | ||
|
|
a3b6af9f22 | ||
|
|
458007862e | ||
|
|
2fac5d76e9 | ||
|
|
1e886fc124 | ||
|
|
c075278180 | ||
|
|
333d0ee62f | ||
|
|
7a6b2011e4 | ||
|
|
e4c65cd84e | ||
|
|
10e2a2cf3b | ||
|
|
0d72731ce7 | ||
|
|
33fb645694 | ||
|
|
d369c9db8e | ||
|
|
a935cac791 | ||
|
|
a08a4b4f92 | ||
|
|
bd2ba612de | ||
|
|
306d186bef | ||
|
|
da67d62946 | ||
|
|
50cc295e9e | ||
|
|
bec97545d1 | ||
|
|
db5f0334c4 | ||
|
|
42c623c8ca | ||
|
|
d3c1e2ab56 | ||
|
|
57e60287ff | ||
|
|
007fbf8be5 | ||
|
|
d3baa47f93 | ||
|
|
225905ebff | ||
|
|
c08ddd5057 | ||
|
|
970dfc069d | ||
|
|
9b5f9a64fd | ||
|
|
6720e2429e | ||
|
|
5070b166d9 | ||
|
|
8b6d12d57b | ||
|
|
8888747137 | ||
|
|
d83b5b14a8 | ||
|
|
17ecd9cb82 | ||
|
|
0829b4bd9e | ||
|
|
fbc9652f20 | ||
|
|
c7d9d658f2 | ||
|
|
1c525618e2 | ||
|
|
9ead5dbd19 | ||
|
|
625e887dc1 | ||
|
|
60cbf894e5 | ||
|
|
95a3403898 | ||
|
|
fbf50e7466 | ||
|
|
e9b6988a69 | ||
|
|
8d49c96c57 | ||
|
|
ea56dcdda8 | ||
|
|
5ef8340ba3 | ||
|
|
51e1e85867 | ||
|
|
b24f740129 | ||
|
|
653d66c343 | ||
|
|
3dd4ae1bfc | ||
|
|
27c8ae79e0 | ||
|
|
53e3231452 | ||
|
|
bcf98d847a | ||
|
|
b6ee67d506 | ||
|
|
3f13747413 | ||
|
|
54046d5c9d | ||
|
|
8966f25e06 | ||
|
|
27fca2cb82 | ||
|
|
0d1a17a41a | ||
|
|
517e4a1142 | ||
|
|
a380f87b5f | ||
|
|
35d9d29d40 | ||
|
|
e1c9d81496 | ||
|
|
fbeeb3f015 | ||
|
|
48735a602a | ||
|
|
886f3349ae | ||
|
|
43c150a18b | ||
|
|
33bbc4a2c4 | ||
|
|
6c4a014e57 | ||
|
|
ce0dd9ceec | ||
|
|
3520ce6a3f | ||
|
|
376f8226ab | ||
|
|
6b6ae6bfef | ||
|
|
b13dbf0b59 | ||
|
|
0f7ac5c0ba | ||
|
|
25b94bc2c1 | ||
|
|
445730a833 | ||
|
|
fd1590142e | ||
|
|
c41adc54c5 | ||
|
|
a3f6b105de | ||
|
|
6e402d4931 | ||
|
|
c40a0d8835 | ||
|
|
28416dc3d2 | ||
|
|
1bde5b6836 | ||
|
|
d1619bca22 | ||
|
|
a123c38dfd | ||
|
|
e02d1850a2 | ||
|
|
bd37761fc5 | ||
|
|
897b901c7c | ||
|
|
da882c3c11 | ||
|
|
bd1a46d18d | ||
|
|
1c23c10c81 | ||
|
|
55f16d2c53 | ||
|
|
bac8b2b96c | ||
|
|
08328c91c4 | ||
|
|
6634ef094c | ||
|
|
3b6e6167b0 | ||
|
|
f55dfa7a73 | ||
|
|
93f0c970da | ||
|
|
aa94da9767 | ||
|
|
8340c18257 | ||
|
|
075e238c46 | ||
|
|
6e6b5ae98c | ||
|
|
2078ff867b | ||
|
|
446d88e16a | ||
|
|
ebacaa0341 | ||
|
|
8420abd915 | ||
|
|
650c41eb8a | ||
|
|
db3018bbf5 | ||
|
|
539f94d1c9 | ||
|
|
f56502d8f3 |
2
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
github: stax76
|
||||||
|
ko_fi: stax76
|
||||||
30
.github/ISSUE_TEMPLATE/ask-a-question.md
vendored
@@ -8,3 +8,33 @@ assignees: stax76
|
|||||||
---
|
---
|
||||||
|
|
||||||
This template is meant for usage questions of mpv.net.
|
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
|
||||||
|
|||||||
9
.github/ISSUE_TEMPLATE/report-a-bug.md
vendored
@@ -11,6 +11,11 @@ assignees: stax76
|
|||||||
A clear and concise description of what the bug is.
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
**To Reproduce**
|
**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:
|
Steps to reproduce the behavior:
|
||||||
1. Go to '...'
|
1. Go to '...'
|
||||||
2. Click on '....'
|
2. Click on '....'
|
||||||
@@ -25,3 +30,7 @@ If applicable, add screenshots to help explain your problem.
|
|||||||
|
|
||||||
**Additional context**
|
**Additional context**
|
||||||
Add any other context about the problem here.
|
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
@@ -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
@@ -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
|
||||||
340
License.txt
Normal file
@@ -0,0 +1,340 @@
|
|||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License.
|
||||||
90
README.md
@@ -6,8 +6,12 @@
|
|||||||
🎞 mpv.net
|
🎞 mpv.net
|
||||||
==========
|
==========
|
||||||
|
|
||||||
mpv.net is a modern 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.
|
||||||
|
|
||||||
|
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
|
#### Graphical User Interface
|
||||||
|
|
||||||
@@ -16,12 +20,14 @@ Modern GUI with customizable color themes.
|
|||||||
|
|
||||||
#### Command Line Interface
|
#### Command Line Interface
|
||||||
|
|
||||||
mpv.net supports mpvs property based command line switches.
|
mpv.net supports mpvs command line interface.
|
||||||
|
|
||||||
|
|
||||||
#### High quality video output
|
#### High quality video output
|
||||||
|
|
||||||
Video output that is capable of many features loved by videophiles, such as video scaling with popular high quality algorithms, color management, frame timing, interpolation, HDR, and more.
|
Video output that is capable of many features loved by videophiles,
|
||||||
|
such as video scaling with popular high quality algorithms,
|
||||||
|
color management, frame timing, interpolation, HDR, and more.
|
||||||
|
|
||||||
|
|
||||||
#### On Screen Controller
|
#### On Screen Controller
|
||||||
@@ -34,76 +40,75 @@ Play controls with a modern flat design.
|
|||||||
Leverages the FFmpeg hwaccel APIs to support DXVA2 video decoding acceleration.
|
Leverages the FFmpeg hwaccel APIs to support DXVA2 video decoding acceleration.
|
||||||
|
|
||||||
|
|
||||||
#### Active development
|
|
||||||
|
|
||||||
mpv.net is under active development.
|
|
||||||
|
|
||||||
|
|
||||||
#### Based on libmpv
|
#### Based on libmpv
|
||||||
|
|
||||||
mpv.net is based on libmpv which offers a straightforward C API that was designed from the ground up to make mpv usable as a library and facilitate easy integration into other applications. mpv is like VLC not based on DirectShow or Media Foundation.
|
mpv.net is based on libmpv which offers a straightforward C API that
|
||||||
|
was designed from the ground up to make mpv usable as a library and
|
||||||
|
facilitate easy integration into other applications.
|
||||||
|
mpv is like VLC not based on DirectShow or Media Foundation.
|
||||||
|
|
||||||
|
|
||||||
Table of contents
|
Table of contents
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
- [Features](#features)
|
- [Features](#features-that-mpv-and-mpvnet-have-in-common)
|
||||||
- [Support](#support)
|
- [Support](#support)
|
||||||
- [Download](#download)
|
- [Download](#download)
|
||||||
- [Manual](#manual)
|
- [Manual](#manual)
|
||||||
- [Screenshots](#screenshots)
|
- [Screenshots](#screenshots)
|
||||||
|
|
||||||
|
|
||||||
Features
|
Features that mpv and mpv.net have in common
|
||||||
--------
|
--------------------------------------------
|
||||||
|
|
||||||
- High degree of mpv compatibility, almost all mpv features are available
|
- Lua and JavaScript Scripting ([awesome-mpv lists a large collection of available user scripts](https://github.com/stax76/awesome-mpv))
|
||||||
- Customizable context menu defined in the same file as the key bindings
|
- Simple config files that are easy to read and edit
|
||||||
- Config dialog
|
|
||||||
- Shorcut key editor
|
|
||||||
- Global hotkeys
|
|
||||||
- Many features like the config editor and shortcut key editor are fully searchable
|
|
||||||
- Configuration files that are easy to read and edit
|
|
||||||
- Command palette to quickly find commands and keys
|
|
||||||
- Modern graphical user interface with customizable color themes
|
|
||||||
- Extension API for .NET languages (C#, VB.NET and F#)
|
|
||||||
- Scripting API for C#, Lua, JavaScript and PowerShell
|
|
||||||
- JSON IPC to control the player with a external programs
|
- 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
|
- Command Line Interface
|
||||||
- Started from a terminal status and debug output is printed on the terminal
|
- Started from a terminal status, error and debug output is printed on the terminal
|
||||||
- DXVA2 video decoding acceleration
|
- DXVA2 video decoding acceleration
|
||||||
- Video output capable of features loved by videophiles, such as video scaling with popular high quality algorithms, color management, frame timing, interpolation, HDR, and more
|
- Video output capable of features loved by videophiles, such as video scaling with popular high quality algorithms, color management, frame timing, interpolation, HDR, and more
|
||||||
- File search feature powered by the popular search and index tool Everything
|
|
||||||
- Browser extensions to start mpv.net from the browser
|
- Browser extensions to start mpv.net from the browser
|
||||||
- Fast seek performance
|
- Fast seek performance
|
||||||
- Fast startup performance
|
- Fast startup performance
|
||||||
- Usable as video player, audio player and image viewer with a wide range of supported formats
|
- Usable as video player, audio player and image viewer with a wide range of supported formats
|
||||||
- Built-in decoders, no external codecs have to be installed
|
- Built-in decoders, no external codecs have to be installed
|
||||||
- Setup as x64 installer, portable and Chocolatey
|
- Build-in media streaming (requires yt-dlp being installed)
|
||||||
- Build-in media streaming (requires youtube-dl being installed)
|
|
||||||
- File associations can be created by the setup and from the player
|
|
||||||
- External audio and subtitle files can be loaded manually or automatically
|
- External audio and subtitle files can be loaded manually or automatically
|
||||||
- Screenshot feature
|
- Screenshot feature
|
||||||
|
- Internationalization using gettext and transifex
|
||||||
|
|
||||||
|
|
||||||
|
Features exclusive to mpv.net
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
- Very high degree of mpv compatibility, almost all mpv features are available
|
||||||
|
- Modern graphical user interface with customizable color themes
|
||||||
|
- Customizable context menu defined in the same file as the key bindings
|
||||||
|
- Searchable config editor
|
||||||
|
- Searchable input (shorcut keys) editor
|
||||||
|
- C# and PowerShell Scripting
|
||||||
|
- Global keyboard shortcuts
|
||||||
|
- 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
|
- File history feature to log time and filename
|
||||||
- Watch later feature to save the position
|
|
||||||
- Files can be enqueued from File Explorer
|
- Files can be enqueued from File Explorer
|
||||||
- Update check and update routine
|
|
||||||
|
|
||||||
|
|
||||||
## [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
|
Screenshots
|
||||||
@@ -111,7 +116,7 @@ Screenshots
|
|||||||
|
|
||||||
#### Main Window
|
#### Main Window
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
#### Context Menu
|
#### Context Menu
|
||||||
@@ -139,11 +144,4 @@ OSD console and status printed on the terminal.
|
|||||||
|
|
||||||
Searchable key and mouse binding editor.
|
Searchable key and mouse binding editor.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
#### Command Palette
|
|
||||||
|
|
||||||
Command Palette to find commands and shortcut keys easily.
|
|
||||||
|
|
||||||

|
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
|
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (C) 2017-2021 mpv.net/mpv/mplayer
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
|
||||||
obtaining a copy of this software and ssociated documentation
|
|
||||||
files (the "Software"), to deal in the Software without restriction,
|
|
||||||
including without limitation the rights to use, copy, modify, merge,
|
|
||||||
publish, distribute, sublicense, and/or sell copies of the Software,
|
|
||||||
and to permit persons to whom the Software is furnished to do so,
|
|
||||||
subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
|
|
||||||
THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
@@ -1,4 +1,404 @@
|
|||||||
|
|
||||||
|
# v7.0.0.4 Beta (2023-12-19)
|
||||||
|
|
||||||
|
- When mpv.net is started for the first time from a new startup location,
|
||||||
|
it asks if file associations should be registered.
|
||||||
|
- Setup supports installing per user in non admin mode.
|
||||||
|
- Command line parser supports list options with `-add` suffix.
|
||||||
|
- Fix window sometimes shown with wrong size.
|
||||||
|
- Limited support for the mpv option `geometry`, it supports location in percent,
|
||||||
|
for size use `autofit`. Read the instructions in the mpv.net manual or in the conf editor.
|
||||||
|
- Improved manual.
|
||||||
|
- Improved bindings.
|
||||||
|
- Conf editor reorganized according to options categories used in mpv manual.
|
||||||
|
- mpv.net is available via command line package manager winget.
|
||||||
|
- New libplacebo config editor options added.
|
||||||
|
- The conf editor uses a newly developed combo box control (dropdown menu)
|
||||||
|
instead of radio buttons whenever an option has more than 3 items,
|
||||||
|
this improves the look and feel, usability and performance.
|
||||||
|
The navigation tree view was improved.
|
||||||
|
- New zhongfly libmpv build.
|
||||||
|
|
||||||
|
|
||||||
|
# v7.0.0.3 Beta (2023-12-15)
|
||||||
|
|
||||||
|
- New conf editor option `Video/libplacebo/preset`.
|
||||||
|
- New conf editor option `Video/libplacebo/Scaling/upscaler`.
|
||||||
|
- New menu item `Settings/Setup/Add mpv.net to Path environment variable' added.
|
||||||
|
- New menu item `Settings/Edit mpv.conf` added for opening mpv.conf with a text editor. Default binding `c`.
|
||||||
|
- New menu item `Settings/Edit input.conf` added for opening input.conf with a text editor. Default binding `k`.
|
||||||
|
- mpv.net can no longer be downloaded from the Microsoft store due
|
||||||
|
to a general very poor experience with the package creation and submission.
|
||||||
|
I've submitted mpv.net to the winget package repository, it's not yet processed.
|
||||||
|
- Improved conf file reader/writer.
|
||||||
|
- Conf editor support added for the mpv options:
|
||||||
|
`reset-on-next-file`, `input-ipc-server`, `background`, `title`
|
||||||
|
- Conf editor crash fixed.
|
||||||
|
- When mpv.net is started for the first time from a new startup location,
|
||||||
|
it asks if mpv.net should be added to the Path environment variable.
|
||||||
|
|
||||||
|
# v7.0.0.2 Beta (2023-12-13)
|
||||||
|
|
||||||
|
- Besides a portable download there is now again a setup installer.
|
||||||
|
- Fix dynamic menu items missing in context menu.
|
||||||
|
- Fix certain binding setups shown poorly or incorrectly in the main menu.
|
||||||
|
- Fix conf editor not remembering the search text.
|
||||||
|
- Fix quit-watch-later not working.
|
||||||
|
- New option `menu-syntax`. Default: `#menu:`
|
||||||
|
- New zhongfly libmpv build.
|
||||||
|
|
||||||
|
# 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). An 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.
|
||||||
|
|
||||||
|
|
||||||
|
# 6.0.2.0 (2022-07-02)
|
||||||
|
|
||||||
|
- Fix main window shown collapsed when the player was started with full screen.
|
||||||
|
|
||||||
|
|
||||||
|
# 6.0.1.0 (2022-06-30)
|
||||||
|
|
||||||
|
- 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
|
||||||
|
in future sessions. What is recorded and restored is the volume offset relative to the session average volume.
|
||||||
|
- New support of the mpv option `snap-window`.
|
||||||
|
- New feature to show chapters in the command palette, see binding and menu definition below.
|
||||||
|
- New option minimum-aspect-ratio-audio, same as minimum-aspect-ratio but used for audio files.
|
||||||
|
- Fix long commands causing key bindings not visible in the command palette.
|
||||||
|
- Fix script compatibility with mordenx and mpv-osc-tethys.
|
||||||
|
- Fix borderless window not resizable with mouse.
|
||||||
|
- Fix start-size=session not working.
|
||||||
|
- Fix chapters that are script created after the media file is loaded.
|
||||||
|
- Width of command palette slightly increased.
|
||||||
|
- The default key bindings for 0 and 9 change the volume, like mpv.
|
||||||
|
- When a menu item is defined multiple times with different key bindings,
|
||||||
|
only one menu item is created, it shows all bindings.
|
||||||
|
- libmpv zhongfly 2022-06-19
|
||||||
|
|
||||||
|
input.conf changes:
|
||||||
|
|
||||||
|
New:
|
||||||
|
|
||||||
|
```
|
||||||
|
Ctrl+c script-message-to mpvnet show-chapters #menu: View > Show Chapters
|
||||||
|
```
|
||||||
|
|
||||||
|
# 6.0.0.0 Beta (2022-06-05)
|
||||||
|
|
||||||
|
- The options `cache` and `demuxer-max-bytes`have been added
|
||||||
|
to the conf editor.
|
||||||
|
- Command messages are dispatched with `script-message-to mpvnet`.
|
||||||
|
- New feature to change profile using the command palette.
|
||||||
|
- New feature to show media info on screen, the command palette shows
|
||||||
|
an osd option and the show-info command shows more detailed info
|
||||||
|
after a second key press. Media info display in the track menu
|
||||||
|
was also improved. Thanks to dyphire helping with code.
|
||||||
|
- New `media-info` option allowing to use mpv `track-list`
|
||||||
|
instead of the media info library.
|
||||||
|
- New show-santa-logo (green and grumpy) option.
|
||||||
|
- New quick bookmark feature, see manual.
|
||||||
|
- Progress command shows time and date.
|
||||||
|
- When input.conf is created on the very first start and a
|
||||||
|
script-opts folder does not exist, a script-opts folder
|
||||||
|
is created with osc and console defaults:
|
||||||
|
`console-scale=1.5`
|
||||||
|
`osc-idlescreen=no` (hides the original mpv logo)
|
||||||
|
`osc-hidetimeout=2000`
|
||||||
|
`osc-scalewindowed=1.5`
|
||||||
|
- Support mpv idle property, see manual for remarks.
|
||||||
|
- Fix external audio and subtitle files not shown in all use cases.
|
||||||
|
- Fix various mpv options not working in case of existing same line comments.
|
||||||
|
- Fix crash choosing Matroska edition in the menu.
|
||||||
|
- Fix auto-play and auto-load-folder not working with user scripts.
|
||||||
|
- Fix slow startup using `osd-scale-by-window=no`.
|
||||||
|
- Fix URL shown instead of media title on file change OSD,
|
||||||
|
in recent menu and in recent command palette.
|
||||||
|
- Fix chapter time display in menu.
|
||||||
|
- Fix incorrect startup window size using gpu-api=vulkan.
|
||||||
|
- Fix logo not hiding sometimes using gpu-api=vulkan.
|
||||||
|
- libmpv shinchiro 2022-06-05
|
||||||
|
|
||||||
|
input.conf changes:
|
||||||
|
|
||||||
|
Old:
|
||||||
|
|
||||||
|
```
|
||||||
|
F9 show-text ${track-list} 5000 #menu: View > Show Tracks
|
||||||
|
```
|
||||||
|
|
||||||
|
New:
|
||||||
|
|
||||||
|
```
|
||||||
|
F9 script-message-to mpvnet show-media-info osd #menu: View > Show Tracks
|
||||||
|
Ctrl+p script-message-to mpvnet select-profile #menu: View > Show Profile Selection
|
||||||
|
Alt+q script-message-to mpvnet quick-bookmark
|
||||||
|
```
|
||||||
|
|
||||||
|
All occurrences of `script-message mpv.net` were changed to `script-message-to mpvnet`.
|
||||||
|
|
||||||
|
|
||||||
|
# 5.9.0.0 Beta (2022-05-08)
|
||||||
|
|
||||||
|
- Fix startup without media file not working with gpu-api=vulkan.
|
||||||
|
- Fix keyboard layout change not working.
|
||||||
|
- Fix multi monitor setup with different DPI values not working.
|
||||||
|
- Fix config editor handling `keep-open` and `keep-open-pause` incorrectly.
|
||||||
|
- New mpv.net specific option `keep-open-exit` added. If set to yes and
|
||||||
|
keep-open is set to no, mpv.net exits after the last file ends.
|
||||||
|
- New `playlist-add` command added to change the playlist position,
|
||||||
|
jumps to the other end when the beginning or end is reached.
|
||||||
|
Ctrl+F11 goes 10 positions backward.
|
||||||
|
Ctrl+F12 goes 10 positions forward.
|
||||||
|
- libmpv zhongfly 2022-05-07
|
||||||
|
|
||||||
|
|
||||||
|
5.8.0.0 Beta (2022-04-02)
|
||||||
|
|
||||||
|
- Fix crash on Windows 7 systems without PowerShell.
|
||||||
|
- Fix showing incorrect timestamps in About dialog of Store version.
|
||||||
|
- Fix Store page showing non-existent ARM and x86 support.
|
||||||
|
- Fix opening zip files.
|
||||||
|
- The list of available input commands is like before shown
|
||||||
|
by the text editor, so it's like everything else searchable.
|
||||||
|
- Media Info isn't shown directly, instead the command palette
|
||||||
|
shows several choices. The command palette can be bypassed
|
||||||
|
using the arguments: msgbox, editor, full, raw.
|
||||||
|
https://github.com/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/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
|
||||||
|
the drawing of the blue mpv.net logo on top of the native OSC logo.
|
||||||
|
- MediaInfo 22.03
|
||||||
|
|
||||||
|
|
||||||
|
5.7.0.0 Stable (2022-03-09)
|
||||||
|
|
||||||
|
- Improved title and chapter menu for Blu-Rays.
|
||||||
|
- Fix of conf folder virtualization issue of MS Store version.
|
||||||
|
|
||||||
|
5.6.2.0 Beta (2022-03-05)
|
||||||
|
|
||||||
|
- Fix script-opts files being ignored, removed options are:
|
||||||
|
script-opts = osc-scalewindowed=1.5,osc-hidetimeout=2000,console-scale=1.5
|
||||||
|
- Update MediaInfo to version 21.9.0.0 and
|
||||||
|
write version and date in About dialog.
|
||||||
|
- Provide setup options in command palette to ensure backward
|
||||||
|
compatibility with previous input.conf definitions.
|
||||||
|
|
||||||
|
5.6.1.0 Beta (2022-03-05)
|
||||||
|
|
||||||
|
- Various conf editor improvements. (hooke007)
|
||||||
|
- Custom conf folder location feature removed.
|
||||||
|
- Inno Setup replaced with Microsoft Store setup.
|
||||||
|
- Fix script-opts files being ignored.
|
||||||
|
- Showing the recent list in the command palette,
|
||||||
|
the top item gets auto selected.
|
||||||
|
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/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.
|
||||||
|
- The usability of the menu structure was improved.
|
||||||
|
- Audio and subtitle tracks and various other features
|
||||||
|
are now available in the command palette.
|
||||||
|
- Single character input in the command palette searches exclusively
|
||||||
|
key bindings, much like the search field of the input editor.
|
||||||
|
- Various default key bindings improved.
|
||||||
|
- New protocol registrations, so far supported are: ytdl, rtsp, srt, srtp
|
||||||
|
- libmpv zhongfly 2022-02-27
|
||||||
|
|
||||||
|
|
||||||
|
5.5.0.4 Beta (2021-11-05)
|
||||||
|
|
||||||
|
- Window size flicker issue fix when changing files.
|
||||||
|
- Support input-builtin-bindings to make mp.add_key_binding behave same as in mpv.
|
||||||
|
- window-scale property support.
|
||||||
|
- libmpv shinchiro 2021-10-31
|
||||||
|
|
||||||
|
|
||||||
|
5.5.0.3 Beta (2021-09-23)
|
||||||
|
|
||||||
|
- New mpv.net option auto-play which sets pause=no on file load and
|
||||||
|
selecting from the playlist. Disabled by default.
|
||||||
|
- New option start-size=session to freeze the window size per session.
|
||||||
|
- Changed keepaspect-window behavior.
|
||||||
|
|
||||||
|
|
||||||
|
5.5.0.2 Beta (2021-09-15)
|
||||||
|
|
||||||
|
- Fix of keepaspect-window=no.
|
||||||
|
|
||||||
|
|
||||||
|
5.4.9.8 Beta (2021-09-05)
|
||||||
|
|
||||||
|
- All PowerShell dependencies except the scipt host were
|
||||||
|
removed in order to improve Windows 7 compatibility.
|
||||||
|
- Fix message box not working when ontop is enabled.
|
||||||
|
- Use Vista folder browser.
|
||||||
|
- Improved context menu performance.
|
||||||
|
- libmpv shinchiro 2021-09-05
|
||||||
|
|
||||||
|
|
||||||
|
5.4.9.7 Beta (2021-08-28)
|
||||||
|
|
||||||
|
- Fix exception closing command palette on Windows 7.
|
||||||
|
|
||||||
|
|
||||||
|
5.4.9.6 Beta (2021-08-26)
|
||||||
|
|
||||||
|
- Message box fix.
|
||||||
|
|
||||||
|
|
||||||
|
5.4.9.5 Beta (2021-08-25)
|
||||||
|
|
||||||
|
- Message boxes are themed.
|
||||||
|
|
||||||
|
|
||||||
|
5.4.9.4 Beta (2021-08-24)
|
||||||
|
|
||||||
|
- Fix of command palette crash on Windows 7.
|
||||||
|
|
||||||
|
|
||||||
|
5.4.9.3 Beta (2021-08-22)
|
||||||
|
|
||||||
|
- Leaving fullscreen using keepaspect-window=no restores the correct size.
|
||||||
|
- Major UI rework!
|
||||||
|
- libmpv shinchiro 2021-08-15
|
||||||
|
|
||||||
|
|
||||||
|
5.4.9.2 Beta (2021-08-08)
|
||||||
|
|
||||||
|
- Manual translated to simplified Chinese. (hooke007)
|
||||||
|
- watch-later-options support added to conf editor. (hooke007)
|
||||||
|
- Showing the playlist selects the currently played file/stream in the playlist.
|
||||||
|
- Properties are shown in the command palette instead of the text editor
|
||||||
|
making it very easy to find a property and show/print its value.
|
||||||
|
- Support for --keep-open=no.
|
||||||
|
- Profile selection in the context menu.
|
||||||
|
- Use defaults in case settings.xml fails loading (not reproducible).
|
||||||
|
- conf editor support for keepaspect-window.
|
||||||
|
- Drawing flicker in the command palette (playlist) was fixed.
|
||||||
|
- Saving window size and position was fixed.
|
||||||
|
- Some scroll bars where replaced with Windows 10 styled scroll bars,
|
||||||
|
complex code used from HandyControl project.
|
||||||
|
- Some UI elements use rounded corners.
|
||||||
|
- The recent list can also be shown in the command palette:
|
||||||
|
Alt+r script-message mpv.net show-recent #menu: View > Show Recent
|
||||||
|
- The recent context menu removes the folder info in case of very long paths.
|
||||||
|
- libmpv shinchiro 2021-08-01
|
||||||
|
|
||||||
|
|
||||||
|
5.4.9.1 Beta (2021-06-23)
|
||||||
|
=========================
|
||||||
|
|
||||||
|
- Fix exception using named pipes.
|
||||||
|
- The mpv window property keepaspect-window was implemented.
|
||||||
|
- Everything search removed to keep the core player lightweight,
|
||||||
|
it might come back as user script or extension.
|
||||||
|
- The command palette is integrated into the main window.
|
||||||
|
- Playlist is shown with the command palette and not using the OSD.
|
||||||
|
- New media info command: `Ctrl+m script-message mpv.net show-media-info #menu: View > Show Media Info`
|
||||||
|
- Context menu font render quality fix.
|
||||||
|
- Context menu and `cycle-audio` command supports external audio and subtitle tracks.
|
||||||
|
- Fix window size not being saved.
|
||||||
|
- libmpv shinchiro 2021-06-20
|
||||||
|
|
||||||
|
|
||||||
5.4.9.0 (2021-05-29)
|
5.4.9.0 (2021-05-29)
|
||||||
====================
|
====================
|
||||||
|
|
||||||
@@ -258,27 +658,27 @@ stable release, no changes since the last beta
|
|||||||
https://mpv.io/manual/master/#legacy-option-syntax
|
https://mpv.io/manual/master/#legacy-option-syntax
|
||||||
- new: PowerShell script host was completely rewritten, events can be assigned
|
- new: PowerShell script host was completely rewritten, events can be assigned
|
||||||
by using `Register-ObjectEvent`, the scripting wiki page was updated
|
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
|
- 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
|
- 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
|
- 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: config editor tab is now remembered
|
||||||
- new: osd-duration setting added to config editor and default mpv.conf
|
- 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
|
- new: external console replaced with internal console, in case mpv.conf is missing it's
|
||||||
generated with correct Hight DPI font size scale settings.
|
generated with correct Hight DPI font size scale settings.
|
||||||
`script-opts=console-scale=<dpiscale>`
|
`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
|
https://mpv.io/manual/master/#console
|
||||||
- new: blue color in dark theme is now less intense
|
- 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
|
- 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
|
- new: `script-message mpv.net playlist-first`, unlike mpv does not
|
||||||
restart if the first file is already active
|
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
|
- 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
|
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'
|
- fix: update routine did only work when mpv.net was located in 'Program Files'
|
||||||
@@ -295,7 +695,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 check, it must be enabled first in the conf editor under General
|
||||||
- new: update feature, requires PowerShell 5 and curl,
|
- new: update feature, requires PowerShell 5 and curl,
|
||||||
an up to date Windows 10 system has both included.
|
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
|
- update: libmpv shinchiro 2019-11-10
|
||||||
|
|
||||||
@@ -304,17 +704,17 @@ stable release, no changes since the last beta
|
|||||||
- fix: the file association routine uses no longer 'Play with mpv.net' for the
|
- 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,
|
default open verb caption because it doesn't support multi selection,
|
||||||
it shows now only Open, the manual explains how to get 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
|
- fix: x86 builds had an older version included because
|
||||||
of a misconfiguration in the solution file
|
of a misconfiguration in the solution file
|
||||||
|
|
||||||
### 5.4.3.0
|
### 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: 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/stax76/mpv.net/blob/master/Manual.md):
|
- 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/stax76/mpv.net/blob/master/Manual.md#color-theme)
|
1. [Color Theme](https://github.com/mpvnet-player/mpv.net/blob/main/Manual.md#color-theme)
|
||||||
2. [Hidden and secret features](https://github.com/stax76/mpv.net/blob/master/Manual.md#hidden-and-secret-features)
|
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/stax76/mpv.net/blob/master/Manual.md#external-tools)
|
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: window restore from maximized and from minimized was broken
|
||||||
- fix: it's possible to multi select files in File Explorer and press
|
- fix: it's possible to multi select files in File Explorer and press
|
||||||
@@ -334,13 +734,13 @@ stable release, no changes since the last beta
|
|||||||
context menu item in explorer with multi selection support use my
|
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
|
[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
|
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 config editor keeps profiles and comments in mpv.conf intact!
|
||||||
- the options in the config editor are better organized
|
- the options in the config editor are better organized
|
||||||
|
|
||||||
### 5.4.2
|
### 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: 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
|
- 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
|
instead of displaying the URL, mpv.conf defaults were changed to use
|
||||||
@@ -408,7 +808,7 @@ stable release, no changes since the last beta
|
|||||||
|
|
||||||
### 5.1
|
### 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 logo/icon had a very small cosmetic change
|
||||||
- the help in the context menu was improved,
|
- the help in the context menu was improved,
|
||||||
for quick access consider the command palette (F1 key)
|
for quick access consider the command palette (F1 key)
|
||||||
@@ -442,7 +842,7 @@ stable release, no changes since the last beta
|
|||||||
|
|
||||||
### 5.0
|
### 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
|
- libmpv was updated to shinchiro 2019-07-14
|
||||||
- new or improved config editor settings: screenshot-directory,
|
- new or improved config editor settings: screenshot-directory,
|
||||||
screenshot-format, screenshot-tag-colorspace, screenshot-high-bit-depth,
|
screenshot-format, screenshot-tag-colorspace, screenshot-high-bit-depth,
|
||||||
@@ -461,7 +861,7 @@ stable release, no changes since the last beta
|
|||||||
the script is located at startup/scripts
|
the script is located at startup/scripts
|
||||||
- terminal support added using mpvnet.com !
|
- terminal support added using mpvnet.com !
|
||||||
- script engine performance and error handling was improved
|
- 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
|
- 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
|
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
|
- there was a copy paste bug in the file association feature resulting in keys
|
||||||
@@ -531,7 +931,7 @@ stable release, no changes since the last beta
|
|||||||
pressed, the files are opened as selected, the order is random though
|
pressed, the files are opened as selected, the order is random though
|
||||||
because Explorer starts multiple mpv.net processes concurrently
|
because Explorer starts multiple mpv.net processes concurrently
|
||||||
- libmpv was updated to shinchiro 2019-06-30
|
- 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
|
- 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
|
the window size will use a aspect ratio of 1.8
|
||||||
- new JavaScript script osc-visibility.js included in the distribution
|
- new JavaScript script osc-visibility.js included in the distribution
|
||||||
@@ -549,7 +949,7 @@ stable release, no changes since the last beta
|
|||||||
- invalid command-line arguments were ignored, now an error message is shown
|
- 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
|
- 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
|
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,
|
- new config setting remember-height added to remember the window height,
|
||||||
otherwise the video's native resolution is used
|
otherwise the video's native resolution is used
|
||||||
- support for protocols other then http added
|
- support for protocols other then http added
|
||||||
@@ -564,13 +964,13 @@ stable release, no changes since the last beta
|
|||||||
- the playlist is never cleared whenever the control key is down but
|
- the playlist is never cleared whenever the control key is down but
|
||||||
files and URLs are appended instead
|
files and URLs are appended instead
|
||||||
- powershell script hosting bugs were fixed and a new powershell example script
|
- 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 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 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
|
- 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
|
- 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
|
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
|
### 4.3.1
|
||||||
|
|
||||||
@@ -585,7 +985,7 @@ stable release, no changes since the last beta
|
|||||||
- the help and layout in the config editor was improved
|
- the help and layout in the config editor was improved
|
||||||
- clipboard monitoring for URLs can be disabled in the settings
|
- clipboard monitoring for URLs can be disabled in the settings
|
||||||
- the context menu has a new feature: Open > Add files to playlist,
|
- 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
|
- a setting was added to force using a single mpv.net process instance
|
||||||
|
|
||||||
### 4.1
|
### 4.1
|
||||||
@@ -599,8 +999,7 @@ stable release, no changes since the last beta
|
|||||||
### 4.0
|
### 4.0
|
||||||
|
|
||||||
- on the start screen the mpv.NET icon is shown instead of the mpv icon,
|
- 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
|
feedback and contributions regarding the icon are welcome!
|
||||||
pdn and png source is located [here](https://github.com/stax76/mpv.net/tree/master/img)
|
|
||||||
- everytime only one file is opened the complete folder is loaded in the playlist
|
- everytime only one file is opened the complete folder is loaded in the playlist
|
||||||
- the info command (i key) shows the audio format
|
- the info command (i key) shows the audio format
|
||||||
- new options osd-font-size, sub-font, sub-font-size
|
- new options osd-font-size, sub-font, sub-font-size
|
||||||
@@ -627,7 +1026,7 @@ stable release, no changes since the last beta
|
|||||||
- there was a bug that caused underscores beeing removed from input like MBTN_LEFT_DBL
|
- 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
|
- 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
|
- 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
|
### 3.5
|
||||||
|
|
||||||
@@ -640,6 +1039,6 @@ stable release, no changes since the last beta
|
|||||||
|
|
||||||
### 3.4
|
### 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 zip download option added
|
||||||
- new x86 download option added
|
- new x86 download option added
|
||||||
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 212 KiB After Width: | Height: | Size: 272 KiB |
|
Before Width: | Height: | Size: 214 KiB |
BIN
docs/img/InputEditor.webp
Normal file
|
After Width: | Height: | Size: 251 KiB |
|
Before Width: | Height: | Size: 2.5 MiB |
BIN
docs/img/Main.webp
Normal file
|
After Width: | Height: | Size: 442 KiB |
|
Before Width: | Height: | Size: 628 KiB |
|
Before Width: | Height: | Size: 603 KiB After Width: | Height: | Size: 536 KiB |
|
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 355 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
1516
docs/manual_chs.md
Normal file
2
docs/privacy.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
mpv.net does not collect any personal information.
|
||||||
34
lang/create-mo-files.ps1
Normal 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
@@ -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
@@ -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
@@ -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
@@ -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 ""
|
||||||
18
lang/update-po-and-pot-files.ps1
Normal 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 }
|
||||||
7
src/.editorconfig
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[*.cs]
|
||||||
|
|
||||||
|
# IDE0090: Use 'new(...)'
|
||||||
|
csharp_style_implicit_object_creation_when_type_is_apparent = true
|
||||||
|
|
||||||
|
# IDE0090: Use 'new(...)'
|
||||||
|
dotnet_diagnostic.IDE0090.severity = silent
|
||||||
@@ -1,165 +0,0 @@
|
|||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Navigation;
|
|
||||||
|
|
||||||
using Tommy;
|
|
||||||
using mpvnet;
|
|
||||||
|
|
||||||
namespace DynamicGUI
|
|
||||||
{
|
|
||||||
public class Settings
|
|
||||||
{
|
|
||||||
public static List<SettingBase> LoadSettings(string content)
|
|
||||||
{
|
|
||||||
TomlTable table;
|
|
||||||
|
|
||||||
using (StringReader reader = new StringReader(content))
|
|
||||||
table = TOML.Parse(reader);
|
|
||||||
|
|
||||||
List<SettingBase> settingsList = new List<SettingBase>();
|
|
||||||
|
|
||||||
foreach (TomlTable setting in table["settings"])
|
|
||||||
{
|
|
||||||
SettingBase baseSetting = null;
|
|
||||||
|
|
||||||
if (setting.HasKey("options"))
|
|
||||||
{
|
|
||||||
OptionSetting optionSetting = new OptionSetting();
|
|
||||||
baseSetting = optionSetting;
|
|
||||||
optionSetting.Default = setting["default"];
|
|
||||||
optionSetting.Value = optionSetting.Default;
|
|
||||||
|
|
||||||
foreach (TomlTable option in setting["options"])
|
|
||||||
{
|
|
||||||
var opt = new OptionSettingOption();
|
|
||||||
opt.Name = option["name"];
|
|
||||||
|
|
||||||
if (option.HasKey("help"))
|
|
||||||
opt.Help = option["help"];
|
|
||||||
|
|
||||||
if (option.HasKey("text"))
|
|
||||||
opt.Text = option["text"];
|
|
||||||
else 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 = setting.HasKey("default") ? setting["default"].ToString() : "";
|
|
||||||
}
|
|
||||||
|
|
||||||
baseSetting.Name = setting["name"];
|
|
||||||
baseSetting.File = setting["file"];
|
|
||||||
baseSetting.Filter = setting["filter"];
|
|
||||||
|
|
||||||
if (setting.HasKey("help")) baseSetting.Help = setting["help"];
|
|
||||||
if (setting.HasKey("url")) baseSetting.URL = setting["url"];
|
|
||||||
if (setting.HasKey("width")) baseSetting.Width = setting["width"];
|
|
||||||
if (setting.HasKey("type")) baseSetting.Type = setting["type"];
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
|
|
||||||
using mpvnet;
|
|
||||||
|
|
||||||
namespace DynamicGUI
|
|
||||||
{
|
|
||||||
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 {
|
|
||||||
get => Theme.Current;
|
|
||||||
}
|
|
||||||
|
|
||||||
string _SearchableText;
|
|
||||||
|
|
||||||
public string SearchableText {
|
|
||||||
get {
|
|
||||||
if (_SearchableText is null)
|
|
||||||
{
|
|
||||||
_SearchableText = TitleTextBox.Text + HelpTextBox.Text;
|
|
||||||
|
|
||||||
foreach (var i in OptionSetting.Options)
|
|
||||||
_SearchableText += i.Text + i.Help + i.Name;
|
|
||||||
|
|
||||||
_SearchableText = _SearchableText.ToLower();
|
|
||||||
}
|
|
||||||
return _SearchableText;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public SettingBase SettingBase => OptionSetting;
|
|
||||||
public bool Contains(string searchString) => SearchableText.Contains(searchString.ToLower());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,129 +0,0 @@
|
|||||||
|
|
||||||
using mpvnet;
|
|
||||||
using System;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Media;
|
|
||||||
|
|
||||||
using WinForms = System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace DynamicGUI
|
|
||||||
{
|
|
||||||
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 {
|
|
||||||
get => Theme.Current;
|
|
||||||
}
|
|
||||||
|
|
||||||
string _SearchableText;
|
|
||||||
|
|
||||||
public string SearchableText {
|
|
||||||
get {
|
|
||||||
if (_SearchableText is null)
|
|
||||||
_SearchableText = (TitleTextBox.Text + HelpTextBox.Text +ValueTextBox.Text).ToLower();
|
|
||||||
|
|
||||||
return _SearchableText;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Contains(string searchString) => SearchableText.Contains(searchString.ToLower());
|
|
||||||
public SettingBase SettingBase => StringSetting;
|
|
||||||
|
|
||||||
public string Text
|
|
||||||
{
|
|
||||||
get => StringSetting.Value;
|
|
||||||
set => StringSetting.Value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Button_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
switch (StringSetting.Type)
|
|
||||||
{
|
|
||||||
case "folder":
|
|
||||||
using (var d = new WinForms.FolderBrowserDialog())
|
|
||||||
{
|
|
||||||
d.Description = "Choose a folder.";
|
|
||||||
d.SelectedPath = ValueTextBox.Text;
|
|
||||||
|
|
||||||
if (d.ShowDialog() == WinForms.DialogResult.OK)
|
|
||||||
ValueTextBox.Text = d.SelectedPath;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "color":
|
|
||||||
using (var dialog = new WinForms.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() == WinForms.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 c = Colors.Transparent;
|
|
||||||
|
|
||||||
if (ValueTextBox.Text != "")
|
|
||||||
try { c = GetColor(ValueTextBox.Text); } catch {}
|
|
||||||
|
|
||||||
ValueTextBox.Background = new SolidColorBrush(c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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.get_property_string("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.get_property_string("path");
|
|
||||||
DeleteTime = DateTime.Now;
|
|
||||||
Core.commandv("show-text", "Press 1 to delete file", "5000");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TimeSpan ts = DateTime.Now - DeleteTime;
|
|
||||||
string path = Core.get_property_string("path");
|
|
||||||
|
|
||||||
if (FileToDelete == path && ts.TotalSeconds < 5 && File.Exists(FileToDelete))
|
|
||||||
{
|
|
||||||
Core.command("playlist-remove current");
|
|
||||||
int pos = Core.get_property_int("playlist-pos");
|
|
||||||
|
|
||||||
if (pos == -1)
|
|
||||||
{
|
|
||||||
int count = Core.get_property_int("playlist-count");
|
|
||||||
|
|
||||||
if (count > 0)
|
|
||||||
Core.set_property_int("playlist-pos", count - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
Thread.Sleep(2000);
|
|
||||||
FileSystem.DeleteFile(FileToDelete, UIOption.OnlyErrorDialogs, RecycleOption.SendToRecycleBin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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|AnyCPU'">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>bin\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<LangVersion>7.3</LangVersion>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
|
||||||
<OutputPath>bin\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>AnyCPU</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>
|
|
||||||
@@ -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);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
214
src/Misc/App.cs
@@ -1,214 +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 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 RememberWindowPosition { get; set; }
|
|
||||||
public static bool DebugMode { get; set; }
|
|
||||||
public static bool IsStartedFromTerminal { get; } = Environment.GetEnvironmentVariable("_started_from_console") == "yes";
|
|
||||||
public static bool RememberVolume { get; set; } = true;
|
|
||||||
public static bool AutoLoadFolder { get; set; } = true;
|
|
||||||
public static bool Queue { get; set; }
|
|
||||||
public static bool UpdateCheck { get; set; }
|
|
||||||
|
|
||||||
public static int StartThreshold { get; set; } = 1500;
|
|
||||||
public static int RecentCount { get; set; } = 15;
|
|
||||||
|
|
||||||
public static float MinimumAspectRatio { get; set; } = 1.2f;
|
|
||||||
|
|
||||||
public static Extension Extension { get; set; }
|
|
||||||
|
|
||||||
public static bool IsDarkMode {
|
|
||||||
get => (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 += Shutdown;
|
|
||||||
Core.Initialized += 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);
|
|
||||||
|
|
||||||
ToolStripRendererEx.ForegroundColor = Theme.Current.GetWinFormsColor("menu-foreground");
|
|
||||||
ToolStripRendererEx.BackgroundColor = Theme.Current.GetWinFormsColor("menu-background");
|
|
||||||
ToolStripRendererEx.SelectionColor = Theme.Current.GetWinFormsColor("menu-highlight");
|
|
||||||
ToolStripRendererEx.BorderColor = Theme.Current.GetWinFormsColor("menu-border");
|
|
||||||
ToolStripRendererEx.CheckedColor = Theme.Current.GetWinFormsColor("menu-checked");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void RunTask(Action action)
|
|
||||||
{
|
|
||||||
Task.Run(() => {
|
|
||||||
try {
|
|
||||||
action.Invoke();
|
|
||||||
} catch (Exception e) {
|
|
||||||
ShowException(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string Version {
|
|
||||||
get {
|
|
||||||
return "Copyright (C) 2000-2021 mpv.net/mpv/mplayer\n" +
|
|
||||||
$"mpv.net {Application.ProductVersion} ({File.GetLastWriteTime(Application.ExecutablePath).ToShortDateString()})\n" +
|
|
||||||
$"{Core.get_property_string("mpv-version")} ({File.GetLastWriteTime(Folder.Startup + "mpv-1.dll").ToShortDateString()})\nffmpeg {Core.get_property_string("ffmpeg-version")}\nMIT License";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ShowException(object obj)
|
|
||||||
{
|
|
||||||
if (IsStartedFromTerminal)
|
|
||||||
Terminal.WriteError(obj.ToString());
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (obj is Exception e)
|
|
||||||
Msg.ShowException(e);
|
|
||||||
else
|
|
||||||
Msg.ShowError(obj.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ShowError(string title, string msg = null)
|
|
||||||
{
|
|
||||||
if (IsStartedFromTerminal)
|
|
||||||
{
|
|
||||||
if (title != null)
|
|
||||||
Terminal.WriteError(title);
|
|
||||||
|
|
||||||
if (msg != null)
|
|
||||||
Terminal.WriteError(msg);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Msg.ShowError(title, msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Initialized()
|
|
||||||
{
|
|
||||||
if (RememberVolume)
|
|
||||||
{
|
|
||||||
Core.set_property_int("volume", Settings.Volume);
|
|
||||||
Core.set_property_string("mute", Settings.Mute);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Shutdown()
|
|
||||||
{
|
|
||||||
Settings.Volume = Core.get_property_int("volume");
|
|
||||||
Settings.Mute = Core.get_property_string("mute");
|
|
||||||
|
|
||||||
SettingsManager.Save(Settings);
|
|
||||||
}
|
|
||||||
|
|
||||||
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 "remember-window-position": RememberWindowPosition = value == "yes"; return true;
|
|
||||||
case "debug-mode": DebugMode = value == "yes"; return true;
|
|
||||||
case "remember-volume": RememberVolume = value == "yes"; return true;
|
|
||||||
case "queue": Queue = value == "yes"; return true;
|
|
||||||
case "auto-load-folder": AutoLoadFolder = value == "yes"; return true;
|
|
||||||
case "update-check": UpdateCheck = value == "yes"; return true;
|
|
||||||
case "start-size": StartSize = value; return true;
|
|
||||||
case "process-instance": ProcessInstance = value; return true;
|
|
||||||
case "dark-mode": DarkMode = value; return true;
|
|
||||||
case "start-threshold": StartThreshold = value.ToInt(); return true;
|
|
||||||
case "recent-count": RecentCount = value.ToInt(); return true;
|
|
||||||
case "minimum-aspect-ratio": MinimumAspectRatio = value.ToFloat(); return true;
|
|
||||||
case "dark-theme": DarkTheme = value.Trim('\'', '"'); return true;
|
|
||||||
case "light-theme": LightTheme = value.Trim('\'', '"'); return true;
|
|
||||||
case "video-file-extensions": CorePlayer.VideoTypes = value.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); return true;
|
|
||||||
case "audio-file-extensions": CorePlayer.AudioTypes = value.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); return true;
|
|
||||||
case "image-file-extensions": CorePlayer.ImageTypes = value.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); return true;
|
|
||||||
default:
|
|
||||||
if (writeError)
|
|
||||||
Terminal.WriteError($"unknown mpvnet.conf property: {name}");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
|
|
||||||
using System;
|
|
||||||
using System.CodeDom.Compiler;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
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) + " " + GetMD5(code) + ".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));
|
|
||||||
}
|
|
||||||
|
|
||||||
static string GetMD5(string code)
|
|
||||||
{
|
|
||||||
using (MD5 md5 = MD5.Create())
|
|
||||||
{
|
|
||||||
byte[] inputBuffer = Encoding.UTF8.GetBytes(code);
|
|
||||||
byte[] hashBuffer = md5.ComputeHash(inputBuffer);
|
|
||||||
return BitConverter.ToString(md5.ComputeHash(inputBuffer)).Replace("-", "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,382 +0,0 @@
|
|||||||
|
|
||||||
using System;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Windows.Interop;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
using VB = Microsoft.VisualBasic;
|
|
||||||
|
|
||||||
using static mpvnet.Global;
|
|
||||||
|
|
||||||
namespace mpvnet
|
|
||||||
{
|
|
||||||
public class Commands
|
|
||||||
{
|
|
||||||
public static void Execute(string id, string[] args = null)
|
|
||||||
{
|
|
||||||
switch (id)
|
|
||||||
{
|
|
||||||
case "add-files-to-playlist": OpenFiles("append"); break; // deprecated 2019
|
|
||||||
case "cycle-audio": CycleAudio(); break;
|
|
||||||
case "execute-mpv-command": Msg.ShowError("Command was removed, reset input.conf."); break;
|
|
||||||
case "load-audio": LoadAudio(); break;
|
|
||||||
case "load-sub": LoadSubtitle(); 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": OpenURL(); break;
|
|
||||||
case "playlist-first": PlaylistFirst(); break;
|
|
||||||
case "playlist-last": PlaylistLast(); break;
|
|
||||||
case "scale-window": ScaleWindow(float.Parse(args[0], CultureInfo.InvariantCulture)); break;
|
|
||||||
case "shell-execute": ProcessHelp.ShellExecute(args[0]); break;
|
|
||||||
case "show-about": ShowDialog(typeof(AboutWindow)); break;
|
|
||||||
case "show-audio-devices": ShowTextWithEditor("audio-device-list", Core.get_property_osd_string("audio-device-list")); break;
|
|
||||||
case "show-command-palette": ShowDialog(typeof(CommandPaletteWindow)); break;
|
|
||||||
case "show-commands": ShowCommands(); break;
|
|
||||||
case "show-conf-editor": ShowDialog(typeof(ConfWindow)); break;
|
|
||||||
case "show-decoders": ShowTextWithEditor("decoder-list", mpvHelp.GetDecoders()); break;
|
|
||||||
case "show-demuxers": ShowTextWithEditor("demuxer-lavf-list", mpvHelp.GetDemuxers()); break;
|
|
||||||
case "show-history": ShowHistory(); break;
|
|
||||||
case "show-info": ShowInfo(); break;
|
|
||||||
case "show-input-editor": ShowDialog(typeof(InputWindow)); break;
|
|
||||||
case "show-keys": ShowTextWithEditor("input-key-list", Core.get_property_string("input-key-list").Replace(",", BR)); break;
|
|
||||||
case "show-media-search": ShowDialog(typeof(EverythingWindow)); break;
|
|
||||||
case "show-playlist": ShowPlaylist(); break;
|
|
||||||
case "show-profiles": ShowTextWithEditor("profile-list", mpvHelp.GetProfiles()); break;
|
|
||||||
case "show-properties": ShowProperties(); break;
|
|
||||||
case "show-protocols": ShowTextWithEditor("protocol-list", mpvHelp.GetProtocols()); break;
|
|
||||||
case "show-setup-dialog": ShowDialog(typeof(SetupWindow)); break;
|
|
||||||
case "show-text": ShowText(args[0], Convert.ToInt32(args[1]), Convert.ToInt32(args[2])); break;
|
|
||||||
case "update-check": UpdateCheck.CheckOnline(true); break;
|
|
||||||
case "window-scale": WindowScale(float.Parse(args[0], CultureInfo.InvariantCulture)); break;
|
|
||||||
|
|
||||||
default: Msg.ShowError($"No command '{id}' found."); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void InvokeOnMainThread(Action action) => MainForm.Instance.BeginInvoke(action);
|
|
||||||
|
|
||||||
public static void ShowDialog(Type winType)
|
|
||||||
{
|
|
||||||
InvokeOnMainThread(new Action(() => {
|
|
||||||
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);
|
|
||||||
bool loadFolder = true;
|
|
||||||
|
|
||||||
foreach (string arg in args)
|
|
||||||
{
|
|
||||||
if (arg == "append") append = true;
|
|
||||||
if (arg == "no-folder") loadFolder = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
InvokeOnMainThread(new Action(() => {
|
|
||||||
using (var d = new OpenFileDialog() { Multiselect = true })
|
|
||||||
if (d.ShowDialog() == DialogResult.OK)
|
|
||||||
Core.LoadFiles(d.FileNames, loadFolder, append);
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Open_DVD_Or_BD_Folder()
|
|
||||||
{
|
|
||||||
InvokeOnMainThread(new Action(() => {
|
|
||||||
using (var dialog = new FolderBrowserDialog())
|
|
||||||
{
|
|
||||||
dialog.Description = "Select a DVD or Blu-ray folder.";
|
|
||||||
dialog.ShowNewFolderButton = false;
|
|
||||||
|
|
||||||
if (dialog.ShowDialog() == DialogResult.OK)
|
|
||||||
{
|
|
||||||
Core.command("stop");
|
|
||||||
Thread.Sleep(500);
|
|
||||||
|
|
||||||
if (Directory.Exists(dialog.SelectedPath + "\\BDMV"))
|
|
||||||
{
|
|
||||||
Core.set_property_string("bluray-device", dialog.SelectedPath);
|
|
||||||
Core.LoadFiles(new[] { @"bd://" }, false, false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Core.set_property_string("dvd-device", dialog.SelectedPath);
|
|
||||||
Core.LoadFiles(new[] { @"dvd://" }, false, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void PlaylistFirst()
|
|
||||||
{
|
|
||||||
int pos = Core.get_property_int("playlist-pos");
|
|
||||||
|
|
||||||
if (pos != 0)
|
|
||||||
Core.set_property_int("playlist-pos", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void PlaylistLast()
|
|
||||||
{
|
|
||||||
int pos = Core.get_property_int("playlist-pos");
|
|
||||||
int count = Core.get_property_int("playlist-count");
|
|
||||||
|
|
||||||
if (pos < count - 1)
|
|
||||||
Core.set_property_int("playlist-pos", count - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
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?",
|
|
||||||
"mpv.net will write the date, time and filename of opened files to it.") == DialogResult.OK)
|
|
||||||
|
|
||||||
File.WriteAllText(Core.ConfigFolder + "history.txt", "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ShowInfo()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string performer, title, album, genre, date, duration, text = "";
|
|
||||||
long fileSize = 0;
|
|
||||||
string path = Core.get_property_string("path");
|
|
||||||
|
|
||||||
if (path.Contains("://"))
|
|
||||||
path = Core.get_property_string("media-title");
|
|
||||||
|
|
||||||
int width = Core.get_property_int("video-params/w");
|
|
||||||
int height = Core.get_property_int("video-params/h");
|
|
||||||
|
|
||||||
if (File.Exists(path))
|
|
||||||
{
|
|
||||||
fileSize = new FileInfo(path).Length;
|
|
||||||
|
|
||||||
if (CorePlayer.AudioTypes.Contains(path.Ext()))
|
|
||||||
{
|
|
||||||
using (MediaInfo mediaInfo = new MediaInfo(path))
|
|
||||||
{
|
|
||||||
performer = mediaInfo.GetInfo(MediaInfoStreamKind.General, "Performer");
|
|
||||||
title = mediaInfo.GetInfo(MediaInfoStreamKind.General, "Title");
|
|
||||||
album = mediaInfo.GetInfo(MediaInfoStreamKind.General, "Album");
|
|
||||||
genre = mediaInfo.GetInfo(MediaInfoStreamKind.General, "Genre");
|
|
||||||
date = mediaInfo.GetInfo(MediaInfoStreamKind.General, "Recorded_Date");
|
|
||||||
duration = mediaInfo.GetInfo(MediaInfoStreamKind.Audio, "Duration/String");
|
|
||||||
|
|
||||||
if (performer != "") text += "Artist: " + performer + "\n";
|
|
||||||
if (title != "") text += "Title: " + title + "\n";
|
|
||||||
if (album != "") text += "Album: " + album + "\n";
|
|
||||||
if (genre != "") text += "Genre: " + genre + "\n";
|
|
||||||
if (date != "") text += "Year: " + date + "\n";
|
|
||||||
if (duration != "") text += "Length: " + duration + "\n";
|
|
||||||
text += "Size: " + mediaInfo.GetInfo(MediaInfoStreamKind.General, "FileSize/String") + "\n";
|
|
||||||
text += "Type: " + path.Ext().ToUpper();
|
|
||||||
|
|
||||||
Core.commandv("show-text", text, "5000");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (CorePlayer.ImageTypes.Contains(path.Ext()))
|
|
||||||
{
|
|
||||||
using (MediaInfo mediaInfo = new MediaInfo(path))
|
|
||||||
{
|
|
||||||
text =
|
|
||||||
"Width: " + mediaInfo.GetInfo(MediaInfoStreamKind.Image, "Width") + "\n" +
|
|
||||||
"Height: " + mediaInfo.GetInfo(MediaInfoStreamKind.Image, "Height") + "\n" +
|
|
||||||
"Size: " + mediaInfo.GetInfo(MediaInfoStreamKind.General, "FileSize/String") + "\n" +
|
|
||||||
"Type: " + path.Ext().ToUpper();
|
|
||||||
|
|
||||||
Core.commandv("show-text", text, "5000");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TimeSpan position = TimeSpan.FromSeconds(Core.get_property_number("time-pos"));
|
|
||||||
TimeSpan duration2 = TimeSpan.FromSeconds(Core.get_property_number("duration"));
|
|
||||||
string videoFormat = Core.get_property_string("video-format").ToUpper();
|
|
||||||
string audioCodec = Core.get_property_string("audio-codec-name").ToUpper();
|
|
||||||
|
|
||||||
text = path.FileName() + "\n" +
|
|
||||||
FormatTime(position.TotalMinutes) + ":" +
|
|
||||||
FormatTime(position.Seconds) + " / " +
|
|
||||||
FormatTime(duration2.TotalMinutes) + ":" +
|
|
||||||
FormatTime(duration2.Seconds) + "\n" +
|
|
||||||
$"{width} x {height}\n";
|
|
||||||
|
|
||||||
if (fileSize > 0)
|
|
||||||
text += Convert.ToInt32(fileSize / 1024.0 / 1024.0) + " MB\n";
|
|
||||||
|
|
||||||
text += $"{videoFormat}\n{audioCodec}";
|
|
||||||
|
|
||||||
Core.commandv("show-text", text, "5000");
|
|
||||||
string FormatTime(double value) => ((int)value).ToString("00");
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
App.ShowException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void OpenURL()
|
|
||||||
{
|
|
||||||
InvokeOnMainThread(new Action(() => {
|
|
||||||
string clipboard = System.Windows.Forms.Clipboard.GetText();
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(clipboard) || (!clipboard.Contains("://") && !File.Exists(clipboard)) ||
|
|
||||||
clipboard.Contains("\n"))
|
|
||||||
{
|
|
||||||
App.ShowError("No URL found", "The clipboard does not contain a valid URL or file.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Core.LoadFiles(new [] { clipboard }, false, Control.ModifierKeys.HasFlag(Keys.Control));
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void LoadSubtitle()
|
|
||||||
{
|
|
||||||
InvokeOnMainThread(new Action(() => {
|
|
||||||
using (var d = new OpenFileDialog())
|
|
||||||
{
|
|
||||||
string path = Core.get_property_string("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()
|
|
||||||
{
|
|
||||||
InvokeOnMainThread(new Action(() => {
|
|
||||||
using (var d = new OpenFileDialog())
|
|
||||||
{
|
|
||||||
string path = Core.get_property_string("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()
|
|
||||||
{
|
|
||||||
MediaTrack[] audioTracks = Core.MediaTracks.Where(track => track.Type == "a").ToArray();
|
|
||||||
int len = audioTracks.Length;
|
|
||||||
|
|
||||||
if (len < 1)
|
|
||||||
{
|
|
||||||
Core.commandv("show-text", "No audio tracks");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int aid = Core.get_property_int("aid");
|
|
||||||
|
|
||||||
if (len > 1)
|
|
||||||
{
|
|
||||||
if (++aid > len)
|
|
||||||
aid = 1;
|
|
||||||
|
|
||||||
Core.commandv("set", "aid", aid.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
Core.commandv("show-text", aid + "/" + len + ": " + audioTracks[aid - 1].Text.Substring(3), "5000");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ShowCommands()
|
|
||||||
{
|
|
||||||
string code = @"
|
|
||||||
foreach ($item in ($json | ConvertFrom-Json | foreach { $_ } | sort name))
|
|
||||||
{
|
|
||||||
''
|
|
||||||
$item.name
|
|
||||||
|
|
||||||
foreach ($arg in $item.args)
|
|
||||||
{
|
|
||||||
$value = $arg.name + ' <' + $arg.type.ToLower() + '>'
|
|
||||||
|
|
||||||
if ($arg.optional -eq $true)
|
|
||||||
{
|
|
||||||
$value = '[' + $value + ']'
|
|
||||||
}
|
|
||||||
|
|
||||||
' ' + $value
|
|
||||||
}
|
|
||||||
}";
|
|
||||||
|
|
||||||
string json = Core.get_property_string("command-list");
|
|
||||||
ShowTextWithEditor("command-list", PowerShell.InvokeAndReturnString(code, "json", json));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ShowProperties()
|
|
||||||
{
|
|
||||||
var props = Core.get_property_string("property-list").Split(',').OrderBy(prop => prop);
|
|
||||||
ShowTextWithEditor("property-list", string.Join(BR, props));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ShowTextWithEditor(string name, string text)
|
|
||||||
{
|
|
||||||
string file = Path.GetTempPath() + $"\\{name}.txt";
|
|
||||||
File.WriteAllText(file, BR + text.Trim() + BR);
|
|
||||||
ProcessHelp.ShellExecute(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ScaleWindow(float factor) => Core.RaiseScaleWindow(factor);
|
|
||||||
|
|
||||||
public static void WindowScale(float value) => Core.RaiseWindowScale(value);
|
|
||||||
|
|
||||||
public static void ShowText(string text, int duration = 0, int fontSize = 0)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(text))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (duration == 0)
|
|
||||||
duration = Core.get_property_int("osd-duration");
|
|
||||||
|
|
||||||
if (fontSize == 0)
|
|
||||||
fontSize = Core.get_property_int("osd-font-size");
|
|
||||||
|
|
||||||
Core.command("show-text \"${osd-ass-cc/0}{\\\\fs" + fontSize +
|
|
||||||
"}${osd-ass-cc/1}" + text + "\" " + duration);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ShowPlaylist(string[] args = null)
|
|
||||||
{
|
|
||||||
int duration = 5000;
|
|
||||||
|
|
||||||
if (args?.Length == 1)
|
|
||||||
duration = Convert.ToInt32(args[0]);
|
|
||||||
|
|
||||||
var size = Core.get_property_number("osd-font-size");
|
|
||||||
Core.set_property_number("osd-font-size", 40);
|
|
||||||
Core.command("show-text ${playlist} " + duration);
|
|
||||||
|
|
||||||
App.RunTask(() => {
|
|
||||||
Thread.Sleep(6000);
|
|
||||||
Core.set_property_number("osd-font-size", size);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel.Composition;
|
|
||||||
using System.ComponentModel.Composition.Hosting;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
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 = Folder.Startup + "Extensions";
|
|
||||||
|
|
||||||
if (Directory.Exists(dir))
|
|
||||||
{
|
|
||||||
string[] knownExtensions = { "RatingExtension", "ScriptingExtension" };
|
|
||||||
|
|
||||||
foreach (string extDir in Directory.GetDirectories(dir))
|
|
||||||
{
|
|
||||||
if (knownExtensions.Contains(Path.GetFileName(extDir)))
|
|
||||||
catalog.Catalogs.Add(new DirectoryCatalog(extDir, Path.GetFileName(extDir) + ".dll"));
|
|
||||||
else
|
|
||||||
Terminal.WriteError("Failed to load extension:" + BR2 + extDir +
|
|
||||||
BR2 + "Only extensions that ship with mpv.net are allowed in <startup>\\extensions" +
|
|
||||||
BR2 + "User extensions have to use <config folder>\\extensions" +
|
|
||||||
BR2 + "Never copy or install a new mpv.net version over a old mpv.net version.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
|
|
||||||
using System.Globalization;
|
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
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
|
|
||||||
{
|
|
||||||
// return extension with lower case and without dot.
|
|
||||||
public static string Ext(this string instance)
|
|
||||||
{
|
|
||||||
if (instance == null)
|
|
||||||
return "";
|
|
||||||
|
|
||||||
return Path.GetExtension(instance).TrimStart('.').ToLower();
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsIdenticalFolder(this string instance, string testFolder)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(instance) || string.IsNullOrEmpty(testFolder))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return instance.ToLowerInvariant().AddSep() == testFolder.ToLowerInvariant().AddSep();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,191 +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;
|
|
||||||
|
|
||||||
if (lo == -1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
189
src/Misc/Help.cs
@@ -1,189 +0,0 @@
|
|||||||
|
|
||||||
using System;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
using Microsoft.Win32;
|
|
||||||
|
|
||||||
using static mpvnet.Global;
|
|
||||||
|
|
||||||
namespace mpvnet
|
|
||||||
{
|
|
||||||
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 code = @"
|
|
||||||
foreach ($item in ($json | ConvertFrom-Json | foreach { $_ } | sort name))
|
|
||||||
{
|
|
||||||
$item.name
|
|
||||||
''
|
|
||||||
|
|
||||||
foreach ($option in $item.options)
|
|
||||||
{
|
|
||||||
' ' + $option.key + ' = ' + $option.value
|
|
||||||
}
|
|
||||||
|
|
||||||
''
|
|
||||||
}";
|
|
||||||
|
|
||||||
string json = Core.get_property_string("profile-list");
|
|
||||||
return PowerShell.InvokeAndReturnString(code, "json", json).Trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetDecoders()
|
|
||||||
{
|
|
||||||
string code = @"
|
|
||||||
foreach ($item in ($json | ConvertFrom-Json | foreach { $_ } | sort codec))
|
|
||||||
{
|
|
||||||
$item.codec + ' - ' + $item.description
|
|
||||||
}";
|
|
||||||
|
|
||||||
string json = Core.get_property_string("decoder-list");
|
|
||||||
return PowerShell.InvokeAndReturnString(code, "json", json).Trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetProtocols()
|
|
||||||
{
|
|
||||||
string list = Core.get_property_string("protocol-list");
|
|
||||||
return string.Join(BR, list.Split(',').OrderBy(a => a));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetDemuxers()
|
|
||||||
{
|
|
||||||
string list = Core.get_property_string("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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
231
src/Misc/Misc.cs
@@ -1,231 +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);
|
|
||||||
static string[] Types;
|
|
||||||
|
|
||||||
public static void Register(string[] types)
|
|
||||||
{
|
|
||||||
Types = types;
|
|
||||||
|
|
||||||
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(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities", "ApplicationDescription", "mpv.net media player");
|
|
||||||
RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities", "ApplicationName", "mpv.net");
|
|
||||||
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");
|
|
||||||
|
|
||||||
foreach (string ext in Types)
|
|
||||||
{
|
|
||||||
RegistryHelp.SetValue($@"HKCR\Applications\{ExeFilename}\SupportedTypes", "." + ext, "");
|
|
||||||
RegistryHelp.SetValue($@"HKCR\" + "." + ext, null, ExeFilenameNoExt + "." + ext);
|
|
||||||
RegistryHelp.SetValue($@"HKCR\" + "." + ext + @"\OpenWithProgIDs", ExeFilenameNoExt + "." + ext, "");
|
|
||||||
|
|
||||||
if (CorePlayer.VideoTypes.Contains(ext))
|
|
||||||
RegistryHelp.SetValue(@"HKCR\" + "." + ext, "PerceivedType", "video");
|
|
||||||
|
|
||||||
if (CorePlayer.AudioTypes.Contains(ext))
|
|
||||||
RegistryHelp.SetValue(@"HKCR\" + "." + ext, "PerceivedType", "audio");
|
|
||||||
|
|
||||||
if (CorePlayer.ImageTypes.Contains(ext))
|
|
||||||
RegistryHelp.SetValue(@"HKCR\" + "." + ext, "PerceivedType", "image");
|
|
||||||
|
|
||||||
RegistryHelp.SetValue($@"HKCR\" + ExeFilenameNoExt + "." + ext + @"\shell\open\command", null, $"\"{ExePath}\" \"%1\"");
|
|
||||||
RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities\FileAssociations", "." + ext, ExeFilenameNoExt + "." + ext);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class MediaTrack
|
|
||||||
{
|
|
||||||
public string Text { get; set; }
|
|
||||||
public string Type { get; set; }
|
|
||||||
public int ID { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CommandItem : INotifyPropertyChanged
|
|
||||||
{
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
|
||||||
|
|
||||||
public string Path { get; set; } = "";
|
|
||||||
public string Command { get; set; } = "";
|
|
||||||
public string Display { get { return string.IsNullOrEmpty(Path) ? Command : 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 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 static string CustomSettings {
|
|
||||||
get {
|
|
||||||
string linkFile = Startup + "settings-directory.txt";
|
|
||||||
|
|
||||||
if (File.Exists(linkFile))
|
|
||||||
{
|
|
||||||
string linkTarget = File.ReadAllText(linkFile).Trim();
|
|
||||||
|
|
||||||
if (linkTarget.StartsWithEx("."))
|
|
||||||
linkTarget = Startup + linkTarget;
|
|
||||||
|
|
||||||
if (Directory.Exists(linkTarget))
|
|
||||||
return linkTarget.AddSep();
|
|
||||||
}
|
|
||||||
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
|
|
||||||
using System;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
using static mpvnet.Global;
|
|
||||||
|
|
||||||
public class Msg
|
|
||||||
{
|
|
||||||
public static void ShowInfo(object title, object content = null)
|
|
||||||
{
|
|
||||||
Show(title, content, MessageBoxIcon.Information);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ShowError(object title, object content = null)
|
|
||||||
{
|
|
||||||
Show(title, content, MessageBoxIcon.Error);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ShowWarning(object title, object content = null)
|
|
||||||
{
|
|
||||||
Show(title, content, MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static DialogResult ShowQuestion(object title, object content = null,
|
|
||||||
MessageBoxButtons buttons = MessageBoxButtons.OKCancel)
|
|
||||||
{
|
|
||||||
return Show(title, content, MessageBoxIcon.Question, buttons);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ShowException(Exception exception)
|
|
||||||
{
|
|
||||||
Show(exception, null, MessageBoxIcon.Error);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static DialogResult Show(object title, object content, MessageBoxIcon icon,
|
|
||||||
MessageBoxButtons buttons = MessageBoxButtons.OK)
|
|
||||||
{
|
|
||||||
string msg = (title?.ToString().TrimEx() + BR2 + content?.ToString().TrimEx()).Trim();
|
|
||||||
return MessageBox.Show(msg, Application.ProductName, buttons, icon);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,242 +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 get_property_bool(string name) => Core.get_property_bool(name);
|
|
||||||
|
|
||||||
public void set_property_bool(string name, bool value) => Core.set_property_bool(name, value);
|
|
||||||
|
|
||||||
public int get_property_int(string name) => Core.get_property_int(name);
|
|
||||||
|
|
||||||
public void set_property_int(string name, int value) => Core.set_property_int(name, value);
|
|
||||||
|
|
||||||
public double get_property_number(string name) => Core.get_property_number(name);
|
|
||||||
|
|
||||||
public void set_property_number(string name, double value) => Core.set_property_number(name, value);
|
|
||||||
|
|
||||||
public string get_property_string(string name) => Core.get_property_string(name);
|
|
||||||
|
|
||||||
public void set_property_string(string name, string value) => Core.set_property_string(name, value);
|
|
||||||
|
|
||||||
public void observe_property(string name, string type, ScriptBlock sb)
|
|
||||||
{
|
|
||||||
PropChangedHandlers.Add(new KeyValuePair<string, ScriptBlock>(name, sb));
|
|
||||||
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case "bool": case "boolean":
|
|
||||||
Core.observe_property_bool(name, value => App.RunTask(() => PropertyChanged.Invoke(name, value)));
|
|
||||||
break;
|
|
||||||
case "string":
|
|
||||||
Core.observe_property_string(name, value => App.RunTask(() => PropertyChanged.Invoke(name, value)));
|
|
||||||
break;
|
|
||||||
case "int": case "integer":
|
|
||||||
Core.observe_property_int(name, value => App.RunTask(() => PropertyChanged.Invoke(name, value)));
|
|
||||||
break;
|
|
||||||
case "float": case "double":
|
|
||||||
Core.observe_property_double(name, value => App.RunTask(() => PropertyChanged.Invoke(name, value)));
|
|
||||||
break;
|
|
||||||
case "nil": case "none": case "native":
|
|
||||||
Core.observe_property(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 register_event(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 "idle":
|
|
||||||
Core.IdleAsync += () => Event.Invoke("idle", 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)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,105 +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.IsStartedFromTerminal)
|
|
||||||
Native.AttachConsole(-1 /*ATTACH_PARENT_PROCESS*/);
|
|
||||||
|
|
||||||
string[] args = Environment.GetCommandLineArgs().Skip(1).ToArray();
|
|
||||||
|
|
||||||
if (args.Length >= 2 && args[0] == "--reg-file-assoc")
|
|
||||||
{
|
|
||||||
if (args[1] == "audio")
|
|
||||||
FileAssociation.Register(CorePlayer.AudioTypes);
|
|
||||||
else if (args[1] == "video")
|
|
||||||
FileAssociation.Register(CorePlayer.VideoTypes);
|
|
||||||
else if (args[1] == "image")
|
|
||||||
FileAssociation.Register(CorePlayer.ImageTypes);
|
|
||||||
else
|
|
||||||
FileAssociation.Register(args.Skip(1).ToArray());
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
App.Init();
|
|
||||||
Mutex mutex = new Mutex(true, "mpvnetProcessInstance", 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.IsStartedFromTerminal)
|
|
||||||
Native.FreeConsole();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Thread.Sleep(50);
|
|
||||||
}
|
|
||||||
|
|
||||||
mutex.Dispose();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Application.Run(new MainForm());
|
|
||||||
|
|
||||||
if (App.IsStartedFromTerminal)
|
|
||||||
Native.FreeConsole();
|
|
||||||
|
|
||||||
mutex.Dispose();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Msg.ShowException(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,56 +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 int LastUpdateCheck;
|
|
||||||
public int Volume = 70;
|
|
||||||
public List<string> RecentFiles = new List<string>();
|
|
||||||
public Point WindowLocation;
|
|
||||||
public Point WindowPosition;
|
|
||||||
public Size WindowSize;
|
|
||||||
public string ConfigEditorSearch = "";
|
|
||||||
public string Mute = "no";
|
|
||||||
public string UpdateCheckVersion = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
class SettingsManager
|
|
||||||
{
|
|
||||||
public static string SettingsFile {
|
|
||||||
get => Core.ConfigFolder + "settings.xml";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static AppSettings Load()
|
|
||||||
{
|
|
||||||
if (!File.Exists(SettingsFile))
|
|
||||||
return new AppSettings();
|
|
||||||
|
|
||||||
XmlSerializer serializer = new XmlSerializer(typeof(AppSettings));
|
|
||||||
|
|
||||||
using (FileStream fs = new FileStream(SettingsFile, FileMode.Open))
|
|
||||||
return (AppSettings)serializer.Deserialize(fs);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Save(object obj)
|
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,98 +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 Foreground { get; set; }
|
|
||||||
public Brush Foreground2 { get; set; }
|
|
||||||
public Brush Background { get; set; }
|
|
||||||
public Brush Heading { get; set; }
|
|
||||||
|
|
||||||
public System.Drawing.Color GetWinFormsColor(string key)
|
|
||||||
{
|
|
||||||
return System.Drawing.ColorTranslator.FromHtml(Dictionary[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Brush GetBrush(string key)
|
|
||||||
{
|
|
||||||
return new SolidColorBrush((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.Foreground = Current.GetBrush("foreground");
|
|
||||||
Current.Foreground2 = Current.GetBrush("foreground2");
|
|
||||||
Current.Background = Current.GetBrush("background");
|
|
||||||
Current.Heading = Current.GetBrush("heading");
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
|
|
||||||
using System;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
using static mpvnet.Global;
|
|
||||||
|
|
||||||
namespace mpvnet
|
|
||||||
{
|
|
||||||
class UpdateCheck
|
|
||||||
{
|
|
||||||
public static void DailyCheck()
|
|
||||||
{
|
|
||||||
if (App.UpdateCheck && App.Settings.LastUpdateCheck != DateTime.Now.DayOfYear)
|
|
||||||
CheckOnline();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static async void CheckOnline(bool showUpToDateMessage = false)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
using (HttpClient client = new HttpClient())
|
|
||||||
{
|
|
||||||
App.Settings.LastUpdateCheck = DateTime.Now.DayOfYear;
|
|
||||||
client.DefaultRequestHeaders.Add("User-Agent", "mpv.net");
|
|
||||||
var response = await client.GetAsync("https://api.github.com/repos/stax76/mpv.net/releases/latest");
|
|
||||||
response.EnsureSuccessStatusCode();
|
|
||||||
string content = await response.Content.ReadAsStringAsync();
|
|
||||||
Match match = Regex.Match(content, @"""mpv\.net-([\d\.]+)-portable\.zip""");
|
|
||||||
|
|
||||||
if (!match.Success)
|
|
||||||
{
|
|
||||||
App.ShowError("Update check is currently not available.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Version onlineVersion = Version.Parse(match.Groups[1].Value);
|
|
||||||
Version currentVersion = Assembly.GetEntryAssembly().GetName().Version;
|
|
||||||
|
|
||||||
if (onlineVersion <= currentVersion)
|
|
||||||
{
|
|
||||||
if (showUpToDateMessage)
|
|
||||||
Msg.ShowInfo($"{Application.ProductName} is up to date.");
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((App.Settings.UpdateCheckVersion != onlineVersion.ToString() ||
|
|
||||||
showUpToDateMessage) && Msg.ShowQuestion(
|
|
||||||
$"New version {onlineVersion} is available, update now?") == DialogResult.OK)
|
|
||||||
{
|
|
||||||
string url = $"https://github.com/stax76/mpv.net/releases/download/{onlineVersion}/mpv.net-{onlineVersion}-portable.zip";
|
|
||||||
|
|
||||||
using (Process proc = new Process())
|
|
||||||
{
|
|
||||||
proc.StartInfo.UseShellExecute = true;
|
|
||||||
proc.StartInfo.WorkingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
|
||||||
proc.StartInfo.FileName = "powershell.exe";
|
|
||||||
proc.StartInfo.Arguments = $"-NoExit -ExecutionPolicy Bypass -File \"{Folder.Startup + "Setup\\update.ps1"}\" \"{url}\" \"{Folder.Startup.TrimEnd(Path.DirectorySeparatorChar)}\"";
|
|
||||||
|
|
||||||
if (Folder.Startup.Contains("Program Files"))
|
|
||||||
proc.StartInfo.Verb = "runas";
|
|
||||||
|
|
||||||
proc.Start();
|
|
||||||
}
|
|
||||||
|
|
||||||
Core.command("quit");
|
|
||||||
}
|
|
||||||
|
|
||||||
App.Settings.UpdateCheckVersion = onlineVersion.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
if (showUpToDateMessage)
|
|
||||||
App.ShowException(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
24
src/MpvNet.Extension/ExampleExtension/ExampleExtension.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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>
|
||||||
25
src/MpvNet.Extension/ExampleExtension/ExampleExtension.sln
Normal 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
|
||||||
34
src/MpvNet.Windows/.editorconfig
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
[*.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
|
||||||
|
|
||||||
|
# IDE0057: Use range operator
|
||||||
|
csharp_style_prefer_range_operator = false
|
||||||
|
|
||||||
|
# CA1401: P/Invokes should not be visible
|
||||||
|
dotnet_diagnostic.CA1401.severity = none
|
||||||
|
|
||||||
|
# IDE0017: Simplify object initialization
|
||||||
|
dotnet_style_object_initializer = false
|
||||||
@@ -2,7 +2,4 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
</configSections>
|
</configSections>
|
||||||
<startup>
|
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
|
||||||
</startup>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
138
src/MpvNet.Windows/Conf.cs
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
|
||||||
|
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("option-name-width")) baseSetting.OptionNameWidth = Convert.ToInt32(section.GetValue("option-name-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.StartsWith('#'))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
68
src/MpvNet.Windows/FileAssociation.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
8
src/MpvNet.Windows/GlobalUsings.cs
Normal 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;
|
||||||
392
src/MpvNet.Windows/GuiCommand.cs
Normal file
@@ -0,0 +1,392 @@
|
|||||||
|
|
||||||
|
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;
|
||||||
|
using MpvNet.Help;
|
||||||
|
using System.Text.Json;
|
||||||
|
using MpvNet.Windows.Help;
|
||||||
|
|
||||||
|
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(),
|
||||||
|
["add-to-path"] = args => AddToPath(),
|
||||||
|
["edit-conf-file"] = EditCongFile,
|
||||||
|
["show-commands"] = args => ShowCommands(),
|
||||||
|
|
||||||
|
|
||||||
|
// 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 EditCongFile(IList<string> args)
|
||||||
|
{
|
||||||
|
string file = Player.ConfigFolder + args[0];
|
||||||
|
|
||||||
|
if (File.Exists(file))
|
||||||
|
ProcessHelp.ShellExecute(WinApiHelp.GetAppPathForExtension("txt"), "\"" + file + "\"");
|
||||||
|
}
|
||||||
|
|
||||||
|
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(WinApiHelp.GetAppPathForExtension("txt"), "\"" + file + "\"");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ShowCommands()
|
||||||
|
{
|
||||||
|
string json = Core.GetPropertyString("command-list");
|
||||||
|
var enumerator = JsonDocument.Parse(json).RootElement.EnumerateArray();
|
||||||
|
var commands = enumerator.OrderBy(it => it.GetProperty("name").GetString());
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
foreach (var cmd in commands)
|
||||||
|
{
|
||||||
|
sb.AppendLine();
|
||||||
|
sb.AppendLine(cmd.GetProperty("name").GetString());
|
||||||
|
|
||||||
|
foreach (var args in cmd.GetProperty("args").EnumerateArray())
|
||||||
|
{
|
||||||
|
string value = args.GetProperty("name").GetString() + " <" +
|
||||||
|
args.GetProperty("type").GetString()!.ToLower() + ">";
|
||||||
|
|
||||||
|
if (args.GetProperty("optional").GetBoolean())
|
||||||
|
value = "[" + value + "]";
|
||||||
|
|
||||||
|
sb.AppendLine(" " + value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string header = BR +
|
||||||
|
"https://mpv.io/manual/master/#list-of-input-commands" + BR2 +
|
||||||
|
"https://github.com/stax76/mpv-scripts#command_palette" + BR;
|
||||||
|
|
||||||
|
ShowTextWithEditor("Input Commands", header + sb.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
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() => ShowTextWithEditor("Bindings", Player.UsedInputConfContent);
|
||||||
|
|
||||||
|
public void AddToPath()
|
||||||
|
{
|
||||||
|
string path = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.User)!;
|
||||||
|
|
||||||
|
if (path.ToLower().Contains(Folder.Startup.TrimEnd(Path.DirectorySeparatorChar).ToLower()))
|
||||||
|
{
|
||||||
|
Msg.ShowWarning("mpv.net is already in Path.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Environment.SetEnvironmentVariable("Path",
|
||||||
|
Folder.Startup.TrimEnd(Path.DirectorySeparatorChar) + ";" + path,
|
||||||
|
EnvironmentVariableTarget.User);
|
||||||
|
|
||||||
|
Msg.ShowInfo("mpv.net successfully was added to Path.");
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
// });
|
||||||
|
//}
|
||||||
74
src/MpvNet.Windows/Help/RegistryHelp.cs
Normal 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(),
|
||||||
|
};
|
||||||
|
}
|
||||||
126
src/MpvNet.Windows/Help/WinApiHelp.cs
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
using static MpvNet.Windows.Native.WinApi;
|
||||||
|
|
||||||
|
namespace MpvNet.Windows.Help;
|
||||||
|
|
||||||
|
public class WinApiHelp
|
||||||
|
{
|
||||||
|
public static Version WindowsTen1607 { get; } = new Version(10, 0, 14393); // Windows 10 1607
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 IntPtr GetWindowLong(IntPtr hWnd, int nIndex)
|
||||||
|
{
|
||||||
|
if (IntPtr.Size == 8)
|
||||||
|
return GetWindowLongPtr(hWnd, nIndex);
|
||||||
|
else
|
||||||
|
return GetWindowLong32(hWnd, nIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetAppPathForExtension(params string[] extensions)
|
||||||
|
{
|
||||||
|
foreach (string it in extensions)
|
||||||
|
{
|
||||||
|
string extension = it;
|
||||||
|
|
||||||
|
if (!extension.StartsWith("."))
|
||||||
|
extension = "." + extension;
|
||||||
|
|
||||||
|
uint c = 0U;
|
||||||
|
|
||||||
|
if (AssocQueryString(0x40, 2, extension, null, null, ref c) == 1)
|
||||||
|
{
|
||||||
|
if (c > 0L)
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder((int)c);
|
||||||
|
|
||||||
|
if (0 == AssocQueryString(0x40, 2, extension, default, sb, ref c))
|
||||||
|
{
|
||||||
|
string ret = sb.ToString();
|
||||||
|
|
||||||
|
if (File.Exists(ret))
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
58
src/MpvNet.Windows/Help/WinMpvHelp.cs
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
|
||||||
|
using System.Windows;
|
||||||
|
using MpvNet.Windows.WPF;
|
||||||
|
|
||||||
|
namespace MpvNet.Windows.Help;
|
||||||
|
|
||||||
|
public class WinMpvHelp
|
||||||
|
{
|
||||||
|
public static void Setup()
|
||||||
|
{
|
||||||
|
string dir = RegistryHelp.GetString("PathEnvVarCheck"); // backward compatibility
|
||||||
|
|
||||||
|
if (dir == Folder.Startup)
|
||||||
|
return;
|
||||||
|
|
||||||
|
dir = RegistryHelp.GetString("Setup");
|
||||||
|
|
||||||
|
if (dir == Folder.Startup)
|
||||||
|
return;
|
||||||
|
|
||||||
|
string path = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.User)!;
|
||||||
|
|
||||||
|
if (!path.ToLower().Contains(Folder.Startup.TrimEnd(Path.DirectorySeparatorChar).ToLower()))
|
||||||
|
{
|
||||||
|
var result = Msg.ShowQuestion("Would you like to add mpv.net to the Path environment variable?" + BR2 +
|
||||||
|
"This will allow using mpv.net in a console/terminal.", MessageBoxButton.YesNo);
|
||||||
|
|
||||||
|
if (result == MessageBoxResult.Yes)
|
||||||
|
{
|
||||||
|
Environment.SetEnvironmentVariable("Path",
|
||||||
|
Folder.Startup.TrimEnd(Path.DirectorySeparatorChar) + ";" + path,
|
||||||
|
EnvironmentVariableTarget.User);
|
||||||
|
|
||||||
|
Msg.ShowInfo("mpv.net was added successfully to Path.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Msg.ShowInfo("If you want to add mpv.net to the Path environment variable later," + BR +
|
||||||
|
"you can do so with the context menu (Settings/Setup)");
|
||||||
|
}
|
||||||
|
|
||||||
|
var result2 = Msg.ShowQuestion("Would you like to register video file associations?", MessageBoxButton.YesNo);
|
||||||
|
|
||||||
|
if (result2 == MessageBoxResult.Yes)
|
||||||
|
{
|
||||||
|
Player.Command("script-message-to mpvnet reg-file-assoc video");
|
||||||
|
|
||||||
|
result2 = Msg.ShowQuestion("Would you like to register audio file associations?", MessageBoxButton.YesNo);
|
||||||
|
|
||||||
|
if (result2 == MessageBoxResult.Yes)
|
||||||
|
Player.Command("script-message-to mpvnet reg-file-assoc audio");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Msg.ShowInfo("If you want to register file associations later," + BR +
|
||||||
|
"you can do so with the context menu (Settings/Setup)");
|
||||||
|
|
||||||
|
RegistryHelp.SetString("Setup", Folder.Startup);
|
||||||
|
}
|
||||||
|
}
|
||||||
49
src/MpvNet.Windows/MpvNet.Windows.csproj
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<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>
|
||||||
|
<FileVersion>7.0.0.4</FileVersion>
|
||||||
|
<AssemblyVersion>7.0.0.4</AssemblyVersion>
|
||||||
|
<InformationalVersion>7.0.0.4</InformationalVersion>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="Misc\**" />
|
||||||
|
<EmbeddedResource Remove="Misc\**" />
|
||||||
|
<None Remove="Misc\**" />
|
||||||
|
<Page Remove="Misc\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
public class StockIcon
|
public class StockIcon
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
public class Taskbar
|
public class Taskbar
|
||||||
@@ -52,4 +51,4 @@ public enum TaskbarStates
|
|||||||
Normal = 0x2,
|
Normal = 0x2,
|
||||||
Error = 0x4,
|
Error = 0x4,
|
||||||
Paused = 0x8
|
Paused = 0x8
|
||||||
}
|
}
|
||||||
132
src/MpvNet.Windows/Native/WinApi.cs
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace MpvNet.Windows.Native;
|
||||||
|
|
||||||
|
public static class WinApi
|
||||||
|
{
|
||||||
|
[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")]
|
||||||
|
public static extern IntPtr GetWindowLong32(IntPtr hWnd, int nIndex);
|
||||||
|
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
public static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int 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);
|
||||||
|
|
||||||
|
[DllImport("gdi32.dll")]
|
||||||
|
public static extern int GetDeviceCaps(IntPtr hdc, int nIndex);
|
||||||
|
|
||||||
|
[DllImport("shlwapi", CharSet = CharSet.Auto)]
|
||||||
|
public static extern uint AssocQueryString(
|
||||||
|
uint flags, uint str, string? pszAssoc, string? pszExtra, [Out] StringBuilder? pszOut, ref uint pcchOut);
|
||||||
|
|
||||||
|
[DllImport("dwmapi.dll")]
|
||||||
|
public static extern int DwmGetWindowAttribute(
|
||||||
|
IntPtr hwnd, uint dwAttribute, out Rect pvAttribute, uint cbAttribute);
|
||||||
|
|
||||||
|
[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;
|
||||||
|
}
|
||||||
|
}
|
||||||
168
src/MpvNet.Windows/Program.cs
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
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 (ProcessCommandLineArguments())
|
||||||
|
Environment.GetCommandLineArgs();
|
||||||
|
else if (App.CommandLine.Contains("--o="))
|
||||||
|
{
|
||||||
|
App.AutoLoadFolder = false;
|
||||||
|
Player.Init(IntPtr.Zero);
|
||||||
|
Player.ProcessCommandLineArgsPost();
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool ProcessCommandLineArguments()
|
||||||
|
{
|
||||||
|
foreach (string arg in Environment.GetCommandLineArgs().Skip(1))
|
||||||
|
{
|
||||||
|
if (arg == "--profile=help")
|
||||||
|
{
|
||||||
|
Player.Init(IntPtr.Zero, false);
|
||||||
|
Console.WriteLine(Player.GetProfiles());
|
||||||
|
Player.Destroy();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (arg == "--vd=help" || arg == "--ad=help")
|
||||||
|
{
|
||||||
|
Player.Init(IntPtr.Zero, false);
|
||||||
|
Console.WriteLine(Player.GetDecoders());
|
||||||
|
Player.Destroy();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (arg == "--audio-device=help")
|
||||||
|
{
|
||||||
|
Player.Init(IntPtr.Zero, false);
|
||||||
|
Console.WriteLine(Player.GetPropertyOsdString("audio-device-list"));
|
||||||
|
Player.Destroy();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (arg == "--input-keylist")
|
||||||
|
{
|
||||||
|
Player.Init(IntPtr.Zero, false);
|
||||||
|
Console.WriteLine(Player.GetPropertyString("input-key-list").Replace(",", BR));
|
||||||
|
Player.Destroy();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (arg == "--version")
|
||||||
|
{
|
||||||
|
Player.Init(IntPtr.Zero, false);
|
||||||
|
Console.WriteLine(AppClass.About);
|
||||||
|
Player.Destroy();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
118
src/MpvNet.Windows/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace MpvNet.Windows.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// 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")]
|
||||||
|
[DebuggerNonUserCode()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MpvNet.Windows.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to
|
||||||
|
///[setting]
|
||||||
|
///name = hwdec
|
||||||
|
///file = mpv
|
||||||
|
///default = no
|
||||||
|
///filter = 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 exact [rest of string was truncated]";.
|
||||||
|
/// </summary>
|
||||||
|
internal static string editor_conf {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("editor_conf", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to
|
||||||
|
///[dark]
|
||||||
|
///
|
||||||
|
///heading = #3C8CC8
|
||||||
|
///foreground = #DDDDDD
|
||||||
|
///foreground2 = #AAAAAA
|
||||||
|
///background = #323232
|
||||||
|
///highlight = #404040
|
||||||
|
///
|
||||||
|
///menu-foreground = #DDDDDD
|
||||||
|
///menu-background = #323232
|
||||||
|
///menu-highlight = #505050
|
||||||
|
///
|
||||||
|
///
|
||||||
|
///[light]
|
||||||
|
///
|
||||||
|
///heading = #0068B2
|
||||||
|
///foreground = #000000
|
||||||
|
///foreground2 = #4C4C4C
|
||||||
|
///background = #F7F7F7
|
||||||
|
///highlight = #DFDFDF
|
||||||
|
///
|
||||||
|
///menu-foreground = #000000
|
||||||
|
///menu-background = #DFDFDF
|
||||||
|
///menu-highlight = #BFBFBF
|
||||||
|
///.
|
||||||
|
/// </summary>
|
||||||
|
internal static string theme {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("theme", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -118,20 +118,8 @@
|
|||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="editor_toml" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="editor_conf" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\editor.toml.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
<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="mpv_conf" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\mpv.conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="theme" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<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>
|
<value>..\Resources\theme.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||||
7
src/MpvNet.Windows/Properties/launchSettings.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"profiles": {
|
||||||
|
"MpvNet.Windows": {
|
||||||
|
"commandName": "Project"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
800
src/MpvNet.Windows/Resources/editor_conf.txt
Normal file
@@ -0,0 +1,800 @@
|
|||||||
|
|
||||||
|
name = process-instance
|
||||||
|
file = mpvnet
|
||||||
|
default = single
|
||||||
|
directory = General
|
||||||
|
help = Defines if more then one mpv.net process is allowed.\nMulti can alternatively be enabled by pressing the SHIFT key. (mpv.net option)
|
||||||
|
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
|
||||||
|
|
||||||
|
name = recent-count
|
||||||
|
file = mpvnet
|
||||||
|
directory = General
|
||||||
|
help = <int> Amount of recent files to be remembered. Default: 15 (mpv.net option)
|
||||||
|
|
||||||
|
name = media-info
|
||||||
|
file = mpvnet
|
||||||
|
default = yes
|
||||||
|
directory = General
|
||||||
|
help = Usage of the media info library instead of mpv to access media information. (mpv.net option)
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = video-file-extensions
|
||||||
|
file = mpvnet
|
||||||
|
directory = General
|
||||||
|
width = 500
|
||||||
|
help = Video file extensions used to create file associations and used by the auto-load-folder feature. (mpv.net option)
|
||||||
|
|
||||||
|
name = audio-file-extensions
|
||||||
|
file = mpvnet
|
||||||
|
directory = General
|
||||||
|
width = 500
|
||||||
|
help = Audio file extensions used to create file associations and used by the auto-load-folder feature. (mpv.net option)
|
||||||
|
|
||||||
|
name = image-file-extensions
|
||||||
|
file = mpvnet
|
||||||
|
directory = General
|
||||||
|
width = 500
|
||||||
|
help = Image file extensions used to create file associations and used by the auto-load-folder feature. (mpv.net option)
|
||||||
|
|
||||||
|
name = menu-syntax
|
||||||
|
file = mpvnet
|
||||||
|
directory = General
|
||||||
|
help = Used menu syntax for defining the context menu in input.conf.\nmpv.net by default uses '#menu:', uosc uses '#!' by default.
|
||||||
|
|
||||||
|
name = video-sync
|
||||||
|
file = mpv
|
||||||
|
default = audio
|
||||||
|
directory = General
|
||||||
|
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
|
||||||
|
option = display-resample-desync
|
||||||
|
option = display-vdrop
|
||||||
|
option = display-adrop
|
||||||
|
option = display-desync
|
||||||
|
option = desync
|
||||||
|
|
||||||
|
name = debug-mode
|
||||||
|
file = mpvnet
|
||||||
|
default = no
|
||||||
|
directory = General
|
||||||
|
help = Enable this only when a developer asks for it. (mpv.net option)
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = vo
|
||||||
|
file = mpv
|
||||||
|
default = gpu
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = hwdec
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
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
|
||||||
|
option = auto-copy enable best hw decoder with copy-back
|
||||||
|
option = auto-safe enable any whitelisted hw decoder
|
||||||
|
option = dxva2 requires vo=gpu with gpu-context=d3d11, gpu-context=angle or gpu-context=dxinterop
|
||||||
|
option = dxva2-copy copies video back to system RAM
|
||||||
|
option = d3d11va requires vo=gpu with gpu-context=d3d11 or gpu-context=angle
|
||||||
|
option = d3d11va-copy copies video back to system RAM
|
||||||
|
option = cuda requires vo=gpu (Any platform CUDA is available)
|
||||||
|
option = cuda-copy copies video back to system RAM
|
||||||
|
option = nvdec requires vo=gpu (Any platform CUDA is available)
|
||||||
|
option = nvdec-copy copies video back to system RAM
|
||||||
|
|
||||||
|
name = gpu-api
|
||||||
|
file = mpv
|
||||||
|
default = auto
|
||||||
|
directory = Video/Render Options
|
||||||
|
help = Controls which type of graphics APIs will be accepted. On Windows this defaults to d3d11 and should not be changed without a good reason.
|
||||||
|
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
|
||||||
|
|
||||||
|
name = gpu-context
|
||||||
|
file = mpv
|
||||||
|
default = auto
|
||||||
|
directory = Video/Render Options
|
||||||
|
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).
|
||||||
|
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
|
||||||
|
|
||||||
|
name = scale
|
||||||
|
file = mpv
|
||||||
|
default = lanczos
|
||||||
|
directory = Video/Render Options/Scaling
|
||||||
|
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
|
||||||
|
url = https://mpv.io/manual/master/#options-scale
|
||||||
|
option = bilinear
|
||||||
|
option = spline36
|
||||||
|
option = lanczos
|
||||||
|
option = ewa_lanczos
|
||||||
|
option = ewa_lanczossharp
|
||||||
|
option = mitchell
|
||||||
|
option = oversample
|
||||||
|
|
||||||
|
name = cscale
|
||||||
|
file = mpv
|
||||||
|
default = bilinear
|
||||||
|
directory = Video/Render Options/Scaling
|
||||||
|
help = As scale, but for interpolating chroma information. If the image is not subsampled, this option is ignored entirely.
|
||||||
|
url = https://mpv.io/manual/master/#options-cscale
|
||||||
|
option = bilinear
|
||||||
|
option = spline36
|
||||||
|
option = lanczos
|
||||||
|
option = ewa_lanczos
|
||||||
|
option = ewa_lanczossharp
|
||||||
|
option = mitchell
|
||||||
|
option = oversample
|
||||||
|
|
||||||
|
name = dscale
|
||||||
|
file = mpv
|
||||||
|
default = lanczos
|
||||||
|
directory = Video/Render Options/Scaling
|
||||||
|
help = Like scale, but apply these filters on downscaling instead. \nIf no option is selected, it will keep the same with the upscaler.
|
||||||
|
url = https://mpv.io/manual/master/#options-dscale
|
||||||
|
option = bilinear
|
||||||
|
option = spline36
|
||||||
|
option = lanczos
|
||||||
|
option = ewa_lanczos
|
||||||
|
option = ewa_lanczossharp
|
||||||
|
option = mitchell
|
||||||
|
option = oversample
|
||||||
|
|
||||||
|
name = correct-downscaling
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
directory = Video/Render Options/Scaling
|
||||||
|
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
|
||||||
|
|
||||||
|
name = sigmoid-upscaling
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
directory = Video/Render Options/Scaling
|
||||||
|
help = When upscaling, use a sigmoidal color transform to avoid emphasizing ringing artifacts. This also implies linear-scaling.
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = dither-depth
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
directory = Video/Render Options
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = deband
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
directory = Video/Render Options
|
||||||
|
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
|
||||||
|
|
||||||
|
name = hdr-compute-peak
|
||||||
|
file = mpv
|
||||||
|
default = auto
|
||||||
|
directory = Video/Render Options
|
||||||
|
url = https://mpv.io/manual/master/#options-hdr-compute-peak
|
||||||
|
option = auto
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = allow-delayed-peak-detect
|
||||||
|
file = mpv
|
||||||
|
default = yes
|
||||||
|
directory = Video/Render Options
|
||||||
|
url = https://mpv.io/manual/master/#options-allow-delayed-peak-detect
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = d3d11va-zero-copy
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
directory = Video/Render Options
|
||||||
|
url = https://mpv.io/manual/master/#options-d3d11va-zero-copy
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = background
|
||||||
|
file = mpv
|
||||||
|
directory = Video/Render Options
|
||||||
|
help = Color used to draw parts of the mpv window not covered by video. See the --sub-color option for how colors are defined.
|
||||||
|
|
||||||
|
name = libplacebo-opts
|
||||||
|
file = mpv
|
||||||
|
directory = Video/Render Options
|
||||||
|
help = Passes extra raw option to the libplacebo rendering backend (used by --vo=gpu-next). May override the effects of any other options set using the normal options system.
|
||||||
|
|
||||||
|
name = preset
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo
|
||||||
|
default = default
|
||||||
|
help = Override all libplacebo options by the values from the given preset.
|
||||||
|
url = https://libplacebo.org/options/#presetdefaultfasthigh_quality
|
||||||
|
option = default Default settings, tuned to provide a balance of performance and quality.
|
||||||
|
option = fast Disable all advanced rendering, equivalent to passing no to every option.
|
||||||
|
option = high_quality Reset all everything to high quality presets (where available).
|
||||||
|
|
||||||
|
name = upscaler
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Scaling
|
||||||
|
default = lanczos
|
||||||
|
help = Sets the filter used for upscaling.
|
||||||
|
url = https://libplacebo.org/options/#upscalerfilter
|
||||||
|
option-name-width = 135
|
||||||
|
option = none No filter, only use basic GPU texture sampling.
|
||||||
|
option = nearest Nearest-neighbour (box) sampling (very fast).
|
||||||
|
option = bilinear Bilinear sampling (very fast).
|
||||||
|
option = oversample Aspect-ratio preserving nearest neighbour sampling (very fast).
|
||||||
|
option = bicubic Bicubic interpolation (fast).
|
||||||
|
option = gaussian Gaussian smoothing (fast).
|
||||||
|
option = catmull_rom Catmull-Rom cubic spline.
|
||||||
|
option = lanczos Lanczos reconstruction.
|
||||||
|
option = ewa_lanczos EWA Lanczos ("Jinc") reconstruction (slow).
|
||||||
|
option = ewa_lanczossharp Sharpened version of ewa_lanczos (slow).
|
||||||
|
option = ewa_lanczos4sharpest Very sharp version of ewa_lanczos, with anti-ringing (very slow).
|
||||||
|
|
||||||
|
name = downscaler
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Scaling
|
||||||
|
default = hermite
|
||||||
|
help = Sets the filter used for downscaling. The most relevant options, roughly ordered from fastest to slowest.
|
||||||
|
option = none Use the same filter as specified for upscaler
|
||||||
|
option = box Box averaging (very fast)
|
||||||
|
option = hermite Hermite-weighted averaging (fast)
|
||||||
|
option = bilinear Bilinear (triangle) averaging (fast)
|
||||||
|
option = bicubic Bicubic interpolation (fast)
|
||||||
|
option = gaussian Gaussian smoothing (fast)
|
||||||
|
option = catmull_rom Catmull-Rom cubic spline
|
||||||
|
option = mitchell Mitchell-Netravalia cubic spline
|
||||||
|
option = lanczos Lanczos reconstruction
|
||||||
|
|
||||||
|
name = plane_upscaler
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Scaling
|
||||||
|
default = none
|
||||||
|
help = Override the filter used for upscaling planes, e.g. chroma/alpha. If set to none, use the same setting as upscaler, respectively.
|
||||||
|
option = none Use the same filter as specified for upscaler
|
||||||
|
option = box Box averaging (very fast)
|
||||||
|
option = hermite Hermite-weighted averaging (fast)
|
||||||
|
option = bilinear Bilinear (triangle) averaging (fast)
|
||||||
|
option = bicubic Bicubic interpolation (fast)
|
||||||
|
option = gaussian Gaussian smoothing (fast)
|
||||||
|
option = catmull_rom Catmull-Rom cubic spline
|
||||||
|
option = mitchell Mitchell-Netravalia cubic spline
|
||||||
|
option = lanczos Lanczos reconstruction
|
||||||
|
|
||||||
|
name = plane_downscaler
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Scaling
|
||||||
|
default = none
|
||||||
|
help = Override the filter used for downscaling planes, e.g. chroma/alpha. If set to none, use the same setting as downscaler, respectively.
|
||||||
|
option = none Use the same filter as specified for upscaler
|
||||||
|
option = box Box averaging (very fast)
|
||||||
|
option = hermite Hermite-weighted averaging (fast)
|
||||||
|
option = bilinear Bilinear (triangle) averaging (fast)
|
||||||
|
option = bicubic Bicubic interpolation (fast)
|
||||||
|
option = gaussian Gaussian smoothing (fast)
|
||||||
|
option = catmull_rom Catmull-Rom cubic spline
|
||||||
|
option = mitchell Mitchell-Netravalia cubic spline
|
||||||
|
option = lanczos Lanczos reconstruction
|
||||||
|
|
||||||
|
name = frame_mixer
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Scaling
|
||||||
|
default = oversample
|
||||||
|
help = Sets the filter used for frame mixing (temporal interpolation). Roughly ordered from fastest to slowest.
|
||||||
|
option = none Disable frame mixing, show nearest frame to target PTS
|
||||||
|
option = oversample Oversampling, only mix "edge" frames while preserving FPS
|
||||||
|
option = hermite Hermite-weighted frame mixing
|
||||||
|
option = linear Linear frame mixing
|
||||||
|
option = cubic Cubic B-spline frame mixing
|
||||||
|
|
||||||
|
name = antiringing_strength
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Scaling
|
||||||
|
help = <0.0..1.0> Antiringing strength to use for all filters. A value of 0.0 disables antiringing, and a value of 1.0 enables full-strength antiringing. Defaults to 0.0.
|
||||||
|
|
||||||
|
name = deband
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Debanding
|
||||||
|
help = Enables debanding using libplacebo.
|
||||||
|
default = no
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = deband_iterations
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Debanding
|
||||||
|
help = <0..16> The number of debanding steps to perform per sample. Each step reduces a bit more banding, but takes time to compute. Note that the strength of each step falls off very quickly, so high numbers (>4) are practically useless. Defaults to 1.
|
||||||
|
|
||||||
|
name = deband_threshold
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Debanding
|
||||||
|
help = <0.0..1000.0> The debanding filter's cut-off threshold. Higher numbers increase the debanding strength dramatically, but progressively diminish image details. Defaults to 3.0.
|
||||||
|
|
||||||
|
name = deband_radius
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Debanding
|
||||||
|
help = <0.0..1000.0> The debanding filter's initial radius. The radius increases linearly for each iteration. A higher radius will find more gradients, but a lower radius will smooth more aggressively. Defaults to 16.0.
|
||||||
|
|
||||||
|
name = deband_grain
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Debanding
|
||||||
|
help = <0.0..1000.0> Add some extra noise to the image. This significantly helps cover up remaining quantization artifacts. Higher numbers add more noise. Defaults to 4.0, which is very mild.
|
||||||
|
|
||||||
|
name = sigmoid
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Sigmoidization
|
||||||
|
help = Enables sigmoidization.
|
||||||
|
default = yes
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = sigmoid_center
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Sigmoidization
|
||||||
|
help = <0.0..1.0> The center (bias) of the sigmoid curve. Defaults to 0.75.
|
||||||
|
|
||||||
|
name = sigmoid_slope
|
||||||
|
file = libplacebo
|
||||||
|
directory = Video/libplacebo/Sigmoidization
|
||||||
|
help = <1.0..20.0> The slope (steepness) of the sigmoid curve. Defaults to 6.5.
|
||||||
|
|
||||||
|
name = screenshot-directory
|
||||||
|
file = mpv
|
||||||
|
width = 500
|
||||||
|
type = folder
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = screenshot-format
|
||||||
|
file = mpv
|
||||||
|
default = jpg
|
||||||
|
directory = Video/Screenshot
|
||||||
|
help = Set the image file type used for saving screenshots.
|
||||||
|
option = jpg
|
||||||
|
option = png
|
||||||
|
|
||||||
|
name = screenshot-tag-colorspace
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
directory = Video/Screenshot
|
||||||
|
help = Tag screenshots with the appropriate colorspace. Note that not all formats are supported.
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = screenshot-high-bit-depth
|
||||||
|
file = mpv
|
||||||
|
default = yes
|
||||||
|
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
|
||||||
|
|
||||||
|
name = screenshot-jpeg-source-chroma
|
||||||
|
file = mpv
|
||||||
|
default = yes
|
||||||
|
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
|
||||||
|
|
||||||
|
name = screenshot-template
|
||||||
|
file = mpv
|
||||||
|
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
|
||||||
|
|
||||||
|
name = screenshot-jpeg-quality
|
||||||
|
file = mpv
|
||||||
|
directory = Video/Screenshot
|
||||||
|
help = <0-100> Set the JPEG quality level. Higher means better quality. The default is 90.
|
||||||
|
|
||||||
|
name = screenshot-png-compression
|
||||||
|
file = mpv
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = screenshot-png-filter
|
||||||
|
file = mpv
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = volume
|
||||||
|
file = mpv
|
||||||
|
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
|
||||||
|
|
||||||
|
name = remember-volume
|
||||||
|
file = mpvnet
|
||||||
|
default = yes
|
||||||
|
directory = Audio
|
||||||
|
help = Save volume and mute on exit and restore it on start. (mpv.net option)
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = alang
|
||||||
|
file = mpv
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = audio-file-auto
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = audio-device
|
||||||
|
file = mpv
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = slang
|
||||||
|
file = mpv
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = sub-auto
|
||||||
|
file = mpv
|
||||||
|
default = exact
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = sub-font
|
||||||
|
file = mpv
|
||||||
|
directory = Subtitle
|
||||||
|
type = string
|
||||||
|
help = Specify font to use for subtitles that do not themselves specify a particular font. The default is sans-serif.
|
||||||
|
|
||||||
|
name = sub-font-size
|
||||||
|
file = mpv
|
||||||
|
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
|
||||||
|
|
||||||
|
name = sub-color
|
||||||
|
file = mpv
|
||||||
|
type = color
|
||||||
|
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:
|
||||||
|
|
||||||
|
name = sub-border-color
|
||||||
|
file = mpv
|
||||||
|
type = color
|
||||||
|
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).
|
||||||
|
|
||||||
|
name = sub-back-color
|
||||||
|
file = mpv
|
||||||
|
type = color
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = title
|
||||||
|
file = mpv
|
||||||
|
directory = Window
|
||||||
|
width = 400
|
||||||
|
help = Set the window title. This is used for the video window, and if possible, also sets the audio stream title. Properties are expanded. Warning! There is a danger of this causing significant CPU usage, depending on the properties used.
|
||||||
|
|
||||||
|
name = fullscreen
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
directory = Window
|
||||||
|
help = Start the player in fullscreen mode.
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = border
|
||||||
|
file = mpv
|
||||||
|
default = yes
|
||||||
|
directory = Window
|
||||||
|
help = Show window with decoration (titlebar, border).
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = screen
|
||||||
|
file = mpv
|
||||||
|
directory = Window
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = taskbar-progress
|
||||||
|
file = mpv
|
||||||
|
default = yes
|
||||||
|
directory = Window
|
||||||
|
help = Show progress in taskbar.
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = osd-playing-msg
|
||||||
|
file = mpv
|
||||||
|
width = 300
|
||||||
|
directory = Window
|
||||||
|
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
|
||||||
|
|
||||||
|
name = osd-font-size
|
||||||
|
file = mpv
|
||||||
|
directory = Window
|
||||||
|
help = Specify the OSD font size. See sub-font-size for details. Default: 55
|
||||||
|
|
||||||
|
name = osd-duration
|
||||||
|
file = mpv
|
||||||
|
directory = Window
|
||||||
|
help = Set the duration of the OSD messages in ms. Default: 1000
|
||||||
|
|
||||||
|
name = osd-scale-by-window
|
||||||
|
file = mpv
|
||||||
|
default = yes
|
||||||
|
directory = Window
|
||||||
|
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
|
||||||
|
|
||||||
|
name = autofit
|
||||||
|
file = mpv
|
||||||
|
directory = Window
|
||||||
|
help = <int> Initial window height in percent. Default: 60
|
||||||
|
|
||||||
|
name = autofit-smaller
|
||||||
|
file = mpv
|
||||||
|
directory = Window
|
||||||
|
help = <int> Minimum window height in percent. Default: 10
|
||||||
|
|
||||||
|
name = autofit-larger
|
||||||
|
file = mpv
|
||||||
|
directory = Window
|
||||||
|
help = <int> Maximum window height in percent. Default: 80
|
||||||
|
|
||||||
|
name = autofit-image
|
||||||
|
file = mpvnet
|
||||||
|
directory = Window
|
||||||
|
help = <int> Initial window height in percent for image files. Default: 80
|
||||||
|
|
||||||
|
name = autofit-audio
|
||||||
|
file = mpvnet
|
||||||
|
directory = Window
|
||||||
|
help = <int> Initial window height in percent for audio files. Default: 70
|
||||||
|
|
||||||
|
name = geometry
|
||||||
|
file = mpvnet
|
||||||
|
directory = Window
|
||||||
|
help = <x:y> Initial window location in percent. Default: 50:50 (centered)\n\nx=0 docks the window to the left side.\nx=100 docks the window to the right side.\ny=0 docks the window to the top side.\ny=100 docks the window to the bottom side.
|
||||||
|
|
||||||
|
name = start-size
|
||||||
|
file = mpvnet
|
||||||
|
default = height-session
|
||||||
|
directory = Window
|
||||||
|
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
|
||||||
|
option = height-always Window height is always remembered
|
||||||
|
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
|
||||||
|
|
||||||
|
name = keepaspect-window
|
||||||
|
file = mpv
|
||||||
|
default = yes
|
||||||
|
directory = Window
|
||||||
|
help = keepaspect-window will lock the window size to the video aspect. Default: yes
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = minimum-aspect-ratio
|
||||||
|
file = mpvnet
|
||||||
|
directory = Window
|
||||||
|
help = <float> Minimum aspect ratio of the window. Useful to force a wider window and therefore a larger OSC. (mpv.net option)
|
||||||
|
|
||||||
|
name = minimum-aspect-ratio-audio
|
||||||
|
file = mpvnet
|
||||||
|
directory = Window
|
||||||
|
help = Same as minimum-aspect-ratio but used for audio files.
|
||||||
|
|
||||||
|
name = remember-window-position
|
||||||
|
file = mpvnet
|
||||||
|
default = no
|
||||||
|
directory = Window
|
||||||
|
help = Save the window position on exit. (mpv.net option)
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = snap-window
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
directory = Window
|
||||||
|
help = Snap the player window to screen edges.
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = window-maximized
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
directory = Window
|
||||||
|
help = Start with a maximized window.
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = keep-open
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = keep-open-pause
|
||||||
|
file = mpv
|
||||||
|
default = yes
|
||||||
|
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
|
||||||
|
|
||||||
|
name = idle
|
||||||
|
file = mpv
|
||||||
|
default = yes
|
||||||
|
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
|
||||||
|
|
||||||
|
name = loop-file
|
||||||
|
file = mpv
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = save-position-on-quit
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
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
|
||||||
|
|
||||||
|
name = watch-later-options
|
||||||
|
file = mpv
|
||||||
|
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
|
||||||
|
|
||||||
|
name = hr-seek
|
||||||
|
file = mpv
|
||||||
|
default = absolute
|
||||||
|
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).
|
||||||
|
|
||||||
|
name = track-auto-selection
|
||||||
|
file = mpv
|
||||||
|
default = yes
|
||||||
|
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
|
||||||
|
|
||||||
|
name = loop-playlist
|
||||||
|
file = mpv
|
||||||
|
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.
|
||||||
|
|
||||||
|
name = auto-load-folder
|
||||||
|
file = mpvnet
|
||||||
|
default = yes
|
||||||
|
directory = Playback
|
||||||
|
help = For single files automatically load the entire directory into the playlist. (mpv.net option)
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
|
||||||
|
name = reset-on-next-file
|
||||||
|
file = mpv
|
||||||
|
directory = Program Behavior
|
||||||
|
help = Normally, mpv will try to keep all settings when playing the next file on the playlist, even if they were changed by the user during playback. This can be changed with this option. It accepts a list of options, and mpv will reset the value of these options on playback start to the initial value.
|
||||||
|
width = 400
|
||||||
|
|
||||||
|
name = input-ar-delay
|
||||||
|
file = mpv
|
||||||
|
directory = Input
|
||||||
|
help = Delay in milliseconds before we start to autorepeat a key (0 to disable).
|
||||||
|
|
||||||
|
name = input-ar-rate
|
||||||
|
file = mpv
|
||||||
|
directory = Input
|
||||||
|
help = Number of key presses to generate per second on autorepeat.
|
||||||
|
|
||||||
|
name = input-ipc-server
|
||||||
|
file = mpv
|
||||||
|
directory = Input
|
||||||
|
help = Enable the IPC support and create the listening socket at the given path.
|
||||||
|
url = https://mpv.io/manual/master/#options-input-ipc-server
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
|
||||||
|
name = dark-theme
|
||||||
|
file = mpvnet
|
||||||
|
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
|
||||||
|
|
||||||
|
name = light-theme
|
||||||
|
file = mpvnet
|
||||||
|
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
|
||||||
|
|
||||||
|
name = cache
|
||||||
|
file = mpv
|
||||||
|
default = auto
|
||||||
|
directory = Cache
|
||||||
|
help = Decide whether to use network cache settings.
|
||||||
|
url = https://mpv.io/manual/master/#options-cache
|
||||||
|
option = yes
|
||||||
|
option = no
|
||||||
|
option = auto
|
||||||
|
|
||||||
|
name = demuxer-max-bytes
|
||||||
|
file = mpv
|
||||||
|
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
|
||||||
@@ -5,12 +5,11 @@ heading = #3C8CC8
|
|||||||
foreground = #DDDDDD
|
foreground = #DDDDDD
|
||||||
foreground2 = #AAAAAA
|
foreground2 = #AAAAAA
|
||||||
background = #323232
|
background = #323232
|
||||||
|
highlight = #404040
|
||||||
|
|
||||||
menu-foreground = #DDDDDD
|
menu-foreground = #DDDDDD
|
||||||
menu-background = #323232
|
menu-background = #323232
|
||||||
menu-highlight = #505050
|
menu-highlight = #505050
|
||||||
menu-border = #FFFFFF
|
|
||||||
menu-checked = #5A5A5A
|
|
||||||
|
|
||||||
|
|
||||||
[light]
|
[light]
|
||||||
@@ -19,9 +18,8 @@ heading = #0068B2
|
|||||||
foreground = #000000
|
foreground = #000000
|
||||||
foreground2 = #4C4C4C
|
foreground2 = #4C4C4C
|
||||||
background = #F7F7F7
|
background = #F7F7F7
|
||||||
|
highlight = #DFDFDF
|
||||||
|
|
||||||
menu-foreground = #000000
|
menu-foreground = #000000
|
||||||
menu-background = #DFDFDF
|
menu-background = #DFDFDF
|
||||||
menu-highlight = #BFBFBF
|
menu-highlight = #BFBFBF
|
||||||
menu-border = #6A6A6A
|
|
||||||
menu-checked = #AAAAAA
|
|
||||||
63
src/MpvNet.Windows/Settings.cs
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
|
||||||
|
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 int OptionNameWidth { get; set; } = 100;
|
||||||
|
|
||||||
|
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 int OptionWidth { get => OptionSetting!.OptionNameWidth; }
|
||||||
|
|
||||||
|
public OptionSetting? OptionSetting { get; set; }
|
||||||
|
|
||||||
|
public string? Text
|
||||||
|
{
|
||||||
|
get => _text ?? Name;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
22
src/MpvNet.Windows/UI/CommandPalette.cs
Normal 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
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
25
src/MpvNet.Windows/UI/CommandPaletteItem.cs
Normal 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; }
|
||||||
|
}
|
||||||
183
src/MpvNet.Windows/UI/GlobalHotkey.cs
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
155
src/MpvNet.Windows/UI/Theme.cs
Normal 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";
|
||||||
|
}
|
||||||
11
src/MpvNet.Windows/UI/TreeNode.cs
Normal 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; } = "";
|
||||||
|
}
|
||||||
20
src/MpvNet.Windows/WPF/BindingProxy.cs
Normal 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));
|
||||||
|
}
|
||||||
18
src/MpvNet.Windows/WPF/ComboBoxTemplateSelector.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace MpvNet.Windows.WPF;
|
||||||
|
|
||||||
|
public class ComboBoxTemplateSelector : DataTemplateSelector
|
||||||
|
{
|
||||||
|
public override DataTemplate SelectTemplate(object item, DependencyObject container)
|
||||||
|
{
|
||||||
|
ContentPresenter presenter = (ContentPresenter)container;
|
||||||
|
|
||||||
|
if (presenter.TemplatedParent is ComboBox)
|
||||||
|
return (DataTemplate)presenter.FindResource("ComboBoxCollapsedDataTemplate");
|
||||||
|
else // Templated parent is ComboBoxItem
|
||||||
|
return (DataTemplate)presenter.FindResource("ComboBoxExpandedDataTemplate");
|
||||||
|
}
|
||||||
|
}
|
||||||
162
src/MpvNet.Windows/WPF/ConfWindow.xaml
Normal 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" Modifiers="Ctrl" Command="{Binding ShowMpvManualCommand}"/>
|
||||||
|
<KeyBinding Key="F2" Modifiers="Ctrl" Command="{Binding ShowMpvNetManualCommand}"/>
|
||||||
|
</Window.InputBindings>
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="180" />
|
||||||
|
<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="Ctrl+F1"
|
||||||
|
Command="{Binding Data.ShowMpvManualCommand, Source={StaticResource BindingProxy}}"
|
||||||
|
/>
|
||||||
|
<MenuItem
|
||||||
|
Header="Show mpv.net manual"
|
||||||
|
InputGestureText="Ctrl+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>
|
||||||
532
src/MpvNet.Windows/WPF/ConfWindow.xaml.cs
Normal file
@@ -0,0 +1,532 @@
|
|||||||
|
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
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);
|
||||||
|
LoadLibplaceboConf();
|
||||||
|
LoadSettings();
|
||||||
|
InitialContent = GetCompareString();
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(App.Settings.ConfigEditorSearch))
|
||||||
|
SearchText = "General:";
|
||||||
|
else
|
||||||
|
SearchText = App.Settings.ConfigEditorSearch;
|
||||||
|
|
||||||
|
foreach (var node in Nodes)
|
||||||
|
SelectNodeFromSearchText(node);
|
||||||
|
|
||||||
|
foreach (var node in Nodes)
|
||||||
|
node.IsExpanded = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(path))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
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 item in ConfItems)
|
||||||
|
{
|
||||||
|
if (setting.Name == item.Name &&
|
||||||
|
setting.File == item.File &&
|
||||||
|
item.Section == "" && !item.IsSectionItem)
|
||||||
|
{
|
||||||
|
setting.Value = item.Value;
|
||||||
|
setting.StartValue = setting.Value;
|
||||||
|
setting.ConfItem = item;
|
||||||
|
item.SettingBase = setting;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (setting)
|
||||||
|
{
|
||||||
|
case StringSetting s:
|
||||||
|
MainStackPanel.Children.Add(new StringSettingControl(s) { Visibility = Visibility.Collapsed });
|
||||||
|
break;
|
||||||
|
case OptionSetting s:
|
||||||
|
if (s.Options.Count > 3)
|
||||||
|
MainStackPanel.Children.Add(new ComboBoxSettingControl(s) { Visibility = Visibility.Collapsed });
|
||||||
|
else
|
||||||
|
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 = SearchText;
|
||||||
|
|
||||||
|
if (InitialContent == GetCompareString())
|
||||||
|
return;
|
||||||
|
|
||||||
|
foreach (Setting setting in Settings)
|
||||||
|
{
|
||||||
|
if (setting.Name == "libplacebo-opts")
|
||||||
|
{
|
||||||
|
setting.Value = GetKeyValueContent("libplacebo");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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() => 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('=') || Regex.Match(line, "^[\\w-]+$").Success)
|
||||||
|
{
|
||||||
|
if (!line.Contains('='))
|
||||||
|
line += "=yes";
|
||||||
|
|
||||||
|
ConfItem item = new();
|
||||||
|
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().TrimStart('-');
|
||||||
|
string right = line.Substring(pos + 1).Trim();
|
||||||
|
|
||||||
|
if (right.StartsWith('\'') && right.EndsWith('\''))
|
||||||
|
right = right.Trim('\'');
|
||||||
|
|
||||||
|
if (right.StartsWith('"') && right.EndsWith('"'))
|
||||||
|
right = right.Trim('"');
|
||||||
|
|
||||||
|
if (left == "fs")
|
||||||
|
left = "fullscreen";
|
||||||
|
|
||||||
|
if (left == "loop")
|
||||||
|
left = "loop-file";
|
||||||
|
|
||||||
|
item.Name = left;
|
||||||
|
item.Value = right;
|
||||||
|
ConfItems.Add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string GetKeyValueContent(string filename)
|
||||||
|
{
|
||||||
|
List<string> pairs = new();
|
||||||
|
|
||||||
|
foreach (Setting setting in Settings)
|
||||||
|
{
|
||||||
|
if (filename != setting.File)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ((setting.Value ?? "") != setting.Default)
|
||||||
|
pairs.Add(setting.Name + "=" + EscapeValue(setting.Value!));
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.Join(',', pairs);
|
||||||
|
}
|
||||||
|
|
||||||
|
void LoadLibplaceboConf()
|
||||||
|
{
|
||||||
|
foreach (ConfItem item in ConfItems.ToArray())
|
||||||
|
if (item.Name == "libplacebo-opts")
|
||||||
|
LoadKeyValueList(item.Value, "libplacebo");
|
||||||
|
}
|
||||||
|
|
||||||
|
void LoadKeyValueList(string options, string file)
|
||||||
|
{
|
||||||
|
string[] optionStrings = options.Split(",", StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
|
foreach (string pair in optionStrings)
|
||||||
|
{
|
||||||
|
if (!pair.Contains('='))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
int pos = pair.IndexOf("=");
|
||||||
|
string left = pair.Substring(0, pos).Trim().ToLower();
|
||||||
|
string right = pair.Substring(pos + 1).Trim();
|
||||||
|
|
||||||
|
ConfItem item = new();
|
||||||
|
item.Name = left;
|
||||||
|
item.Value = right;
|
||||||
|
item.File = file;
|
||||||
|
ConfItems.Add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string EscapeValue(string value)
|
||||||
|
{
|
||||||
|
if (value.Contains('\''))
|
||||||
|
return '"' + value + '"';
|
||||||
|
|
||||||
|
if (value.Contains('"'))
|
||||||
|
return '\'' + value + '\'';
|
||||||
|
|
||||||
|
if (value.Contains('"') || value.Contains('#') || value.StartsWith("%") ||
|
||||||
|
value.StartsWith(" ") || value.EndsWith(" "))
|
||||||
|
{
|
||||||
|
return '\'' + value + '\'';
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 + " = " + EscapeValue(item.Value));
|
||||||
|
|
||||||
|
if (item.LineComment != "")
|
||||||
|
sb.Append(" " + item.LineComment);
|
||||||
|
|
||||||
|
sb.AppendLine();
|
||||||
|
namesWritten.Add(item.Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((item.SettingBase.Value ?? "") != item.SettingBase.Default)
|
||||||
|
{
|
||||||
|
sb.Append(item.Name + " = " + EscapeValue(item.SettingBase.Value!));
|
||||||
|
|
||||||
|
if (item.LineComment != "")
|
||||||
|
sb.Append(" " + item.LineComment);
|
||||||
|
|
||||||
|
sb.AppendLine();
|
||||||
|
namesWritten.Add(item.Name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (Setting setting in Settings)
|
||||||
|
{
|
||||||
|
if (filename != setting.File || namesWritten.Contains(setting.Name!))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ((setting.Value ?? "") != setting.Default)
|
||||||
|
sb.AppendLine(setting.Name + " = " + EscapeValue(setting.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 + " = " + EscapeValue(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 + ":" == SearchText)
|
||||||
|
{
|
||||||
|
node.IsSelected = true;
|
||||||
|
node.IsExpanded = 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
[RelayCommand] void ShowMpvNetSpecificSettings() => SearchText = "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");
|
||||||
|
}
|
||||||
72
src/MpvNet.Windows/WPF/Controls/ComboBoxSettingControl.xaml
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Name="ComboBoxSettingControl1"
|
||||||
|
x:Class="MpvNet.Windows.WPF.ComboBoxSettingControl"
|
||||||
|
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.Windows.WPF"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
|
||||||
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="800">
|
||||||
|
|
||||||
|
<Grid Margin="20,0">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBox
|
||||||
|
x:Name="TitleTextBox"
|
||||||
|
FontSize="24"
|
||||||
|
Margin="0,10"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Foreground="{Binding Theme.Heading}"
|
||||||
|
Background="{Binding Theme.Background}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ComboBox
|
||||||
|
Name="ComboBoxControl"
|
||||||
|
Width="200"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
MaxDropDownHeight="2000"
|
||||||
|
Foreground="{Binding Theme.Foreground}"
|
||||||
|
Background="{Binding Theme.Background}"
|
||||||
|
|
||||||
|
SelectionChanged="ComboBoxControl_SelectionChanged"
|
||||||
|
>
|
||||||
|
<ComboBox.ItemTemplateSelector>
|
||||||
|
<local:ComboBoxTemplateSelector/>
|
||||||
|
</ComboBox.ItemTemplateSelector>
|
||||||
|
|
||||||
|
<ComboBox.ItemContainerStyle>
|
||||||
|
<Style TargetType="ComboBoxItem">
|
||||||
|
<Style.Resources>
|
||||||
|
<Style TargetType="Border">
|
||||||
|
<Setter Property="CornerRadius" Value="3"/>
|
||||||
|
</Style>
|
||||||
|
</Style.Resources>
|
||||||
|
</Style>
|
||||||
|
</ComboBox.ItemContainerStyle>
|
||||||
|
</ComboBox>
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
x:Name="HelpTextBox"
|
||||||
|
TextWrapping="WrapWithOverflow"
|
||||||
|
BorderThickness="0"
|
||||||
|
IsReadOnly="True"
|
||||||
|
Margin="0,10,0,0"
|
||||||
|
Foreground="{Binding Theme.Foreground}"
|
||||||
|
Background="{Binding Theme.Background}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextBlock
|
||||||
|
x:Name="LinkTextBlock"
|
||||||
|
Margin="2,0"
|
||||||
|
>
|
||||||
|
<local:HyperlinkEx
|
||||||
|
x:Name="Link"
|
||||||
|
Foreground="{Binding Theme.Heading}"
|
||||||
|
/>
|
||||||
|
</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
|
||||||
|
using MpvNet.Windows.UI;
|
||||||
|
|
||||||
|
namespace MpvNet.Windows.WPF;
|
||||||
|
|
||||||
|
public partial class ComboBoxSettingControl : UserControl, ISettingControl
|
||||||
|
{
|
||||||
|
OptionSetting OptionSetting;
|
||||||
|
|
||||||
|
public ComboBoxSettingControl(OptionSetting optionSetting)
|
||||||
|
{
|
||||||
|
OptionSetting = optionSetting;
|
||||||
|
InitializeComponent();
|
||||||
|
DataContext = this;
|
||||||
|
TitleTextBox.Text = optionSetting.Name;
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(optionSetting.Help))
|
||||||
|
HelpTextBox.Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
|
HelpTextBox.Text = optionSetting.Help;
|
||||||
|
ComboBoxControl.ItemsSource = optionSetting.Options;
|
||||||
|
|
||||||
|
foreach (var item in optionSetting.Options)
|
||||||
|
if (item.Name == optionSetting.Value)
|
||||||
|
ComboBoxControl.SelectedItem = item;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ComboBoxControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
OptionSetting.Value = (ComboBoxControl.SelectedItem as OptionSettingOption)?.Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
127
src/MpvNet.Windows/WPF/Controls/CommandPaletteControl.xaml
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
<UserControl
|
||||||
|
x:Class="MpvNet.Windows.WPF.Controls.CommandPaletteControl"
|
||||||
|
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"
|
||||||
|
|
||||||
|
FontSize="13"
|
||||||
|
Loaded="OnLoaded"
|
||||||
|
Background="#111111"
|
||||||
|
>
|
||||||
|
|
||||||
|
<UserControl.InputBindings>
|
||||||
|
<KeyBinding Gesture="Esc" Command="{Binding EscapeCommand}"/>
|
||||||
|
<KeyBinding Gesture="Enter" Command="{Binding ExecuteCommand}"/>
|
||||||
|
</UserControl.InputBindings>
|
||||||
|
|
||||||
|
<Border Name="MainBorder"
|
||||||
|
BorderThickness="1,0,1,1"
|
||||||
|
CornerRadius="0,0,5,5"
|
||||||
|
Padding="0,0,0,5"
|
||||||
|
BorderBrush="{Binding Theme.MenuHighlight}"
|
||||||
|
Background="{Binding Theme.Background}"
|
||||||
|
SnapsToDevicePixels="True"
|
||||||
|
>
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Border BorderBrush="{Binding Theme.Heading}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="3"
|
||||||
|
Margin="7"
|
||||||
|
>
|
||||||
|
|
||||||
|
<controls:SearchControl
|
||||||
|
HintText="Search"
|
||||||
|
x:Name="SearchControl"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Padding="1,1,1,0"
|
||||||
|
/>
|
||||||
|
</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.ItemContainerStyle>
|
||||||
|
<Style TargetType="ListBoxItem">
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
|
||||||
|
<Setter Property="Height" Value="25"></Setter>
|
||||||
|
<Setter Property="BorderThickness" Value="0"></Setter>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||||
|
<Border x:Name="BD"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
Padding="{TemplateBinding Padding}"
|
||||||
|
SnapsToDevicePixels="true">
|
||||||
|
|
||||||
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||||
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="True" />
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Background" TargetName="BD" Value="{DynamicResource HighlightBrush}" />
|
||||||
|
</MultiTrigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="Selector.IsSelectionActive" Value="False" />
|
||||||
|
<Condition Property="IsSelected" Value="True" />
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Background" TargetName="BD" Value="{DynamicResource BorderBrush}" />
|
||||||
|
</MultiTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
|
||||||
|
<Style.Resources>
|
||||||
|
<Style TargetType="Border">
|
||||||
|
<Setter Property="CornerRadius" Value="3"/>
|
||||||
|
</Style>
|
||||||
|
</Style.Resources>
|
||||||
|
</Style>
|
||||||
|
</ListView.ItemContainerStyle>
|
||||||
|
|
||||||
|
<ListView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Text="{Binding Text}"></TextBlock>
|
||||||
|
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="1"
|
||||||
|
Text="{Binding SecondaryText}"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListView.ItemTemplate>
|
||||||
|
</ListView>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</UserControl>
|
||||||
151
src/MpvNet.Windows/WPF/Controls/CommandPaletteControl.xaml.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
24
src/MpvNet.Windows/WPF/Controls/HyperlinkEx.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
|
||||||
|
using MpvNet.Help;
|
||||||
|
|
||||||
|
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("Manual");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
<UserControl
|
<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="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:DynamicGUI"
|
xmlns:local="clr-namespace:MpvNet.Windows.WPF"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
|
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
@@ -64,9 +65,15 @@
|
|||||||
Foreground="{Binding Theme.Foreground}"
|
Foreground="{Binding Theme.Foreground}"
|
||||||
Background="{Binding Theme.Background}"
|
Background="{Binding Theme.Background}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextBlock x:Name="LinkTextBlock" Margin="0,10">
|
<TextBlock
|
||||||
<local:HyperlinkEx x:Name="Link"></local:HyperlinkEx>
|
x:Name="LinkTextBlock"
|
||||||
|
Margin="2,0,0,0"
|
||||||
|
>
|
||||||
|
<local:HyperlinkEx
|
||||||
|
x:Name="Link"
|
||||||
|
Foreground="{Binding Theme.Heading}"
|
||||||
|
/>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
64
src/MpvNet.Windows/WPF/Controls/OptionSettingControl.xaml.cs
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(optionSetting.Help))
|
||||||
|
LinkTextBlock.Margin = new Thickness(2, 6, 0, 0);
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,23 +1,20 @@
|
|||||||
<UserControl
|
<UserControl
|
||||||
x:Class="Controls.SearchTextBoxUserControl"
|
x:Class="MpvNet.Windows.WPF.Controls.SearchControl"
|
||||||
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: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"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
>
|
>
|
||||||
|
|
||||||
<Grid
|
<Grid Background="{Binding Theme.Background}">
|
||||||
Name="SearchTextBoxUserControl1"
|
|
||||||
Background="{Binding Theme.Background}"
|
|
||||||
>
|
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Name="HintTextBlock"
|
Name="HintTextBlock"
|
||||||
Margin="5,2"
|
Padding="6,1"
|
||||||
Text="Find a setting"
|
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Foreground="{Binding Theme.Foreground2}"
|
Foreground="{Binding Theme.Foreground2}"
|
||||||
Background="{Binding Theme.Background}"
|
Background="{Binding Theme.Background}"
|
||||||
@@ -26,12 +23,17 @@
|
|||||||
<TextBox
|
<TextBox
|
||||||
Name="SearchTextBox"
|
Name="SearchTextBox"
|
||||||
Height="25"
|
Height="25"
|
||||||
Padding="1,2,0,0"
|
|
||||||
BorderThickness="2"
|
BorderThickness="2"
|
||||||
|
Padding="2"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
TextChanged="SearchTextBox_TextChanged"
|
|
||||||
Foreground="{Binding Theme.Foreground}"
|
Foreground="{Binding Theme.Foreground}"
|
||||||
CaretBrush="{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
|
<Button
|
||||||
@@ -44,9 +46,16 @@
|
|||||||
Height="17"
|
Height="17"
|
||||||
Margin="2,0,4,0"
|
Margin="2,0,4,0"
|
||||||
Visibility="Hidden"
|
Visibility="Hidden"
|
||||||
Click="SearchClearButton_Click"
|
Command="{Binding RelativeSource={RelativeSource FindAncestor,
|
||||||
|
AncestorType={x:Type controls:SearchControl}}, Path=ClearCommand}"
|
||||||
>r
|
>r
|
||||||
|
|
||||||
|
<Button.Resources>
|
||||||
|
<Style TargetType="{x:Type Border}">
|
||||||
|
<Setter Property="CornerRadius" Value="3"/>
|
||||||
|
</Style>
|
||||||
|
</Button.Resources>
|
||||||
|
|
||||||
<Button.Style>
|
<Button.Style>
|
||||||
<Style TargetType="Button">
|
<Style TargetType="Button">
|
||||||
<Setter Property="Background" Value="{Binding Theme.Background}"/>
|
<Setter Property="Background" Value="{Binding Theme.Background}"/>
|
||||||
81
src/MpvNet.Windows/WPF/Controls/SearchControl.xaml.cs
Normal 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 || Text.Length > 21)
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
<UserControl
|
<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="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:DynamicGUI"
|
xmlns:local="clr-namespace:MpvNet.Windows.WPF"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450"
|
d:DesignHeight="450"
|
||||||
d:DesignWidth="800">
|
d:DesignWidth="800">
|
||||||
@@ -30,7 +31,8 @@
|
|||||||
x:Name="ValueTextBox"
|
x:Name="ValueTextBox"
|
||||||
Text="{Binding Path=Text, ElementName=StringSettingControl1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
Text="{Binding Path=Text, ElementName=StringSettingControl1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
Width="150"
|
Width="150"
|
||||||
Height="20"
|
FontSize="13"
|
||||||
|
Padding="2"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Foreground="{Binding Theme.Foreground}"
|
Foreground="{Binding Theme.Foreground}"
|
||||||
Background="{Binding Theme.Background}"
|
Background="{Binding Theme.Background}"
|
||||||
@@ -40,12 +42,13 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
x:Name="Button"
|
x:Name="Button"
|
||||||
Height="20"
|
Width="25"
|
||||||
|
Height="25"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
Width="20"
|
|
||||||
Click="Button_Click"
|
Click="Button_Click"
|
||||||
>...</Button>
|
>...
|
||||||
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<TextBox
|
<TextBox
|
||||||
@@ -57,8 +60,14 @@
|
|||||||
Background="{Binding Theme.Background}"
|
Background="{Binding Theme.Background}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextBlock x:Name="LinkTextBlock" Margin="0,10">
|
<TextBlock
|
||||||
<local:HyperlinkEx x:Name="Link"></local:HyperlinkEx>
|
x:Name="LinkTextBlock"
|
||||||
|
Margin="2,0"
|
||||||
|
>
|
||||||
|
<local:HyperlinkEx
|
||||||
|
x:Name="Link"
|
||||||
|
Foreground="{Binding Theme.Heading}"
|
||||||
|
/>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
128
src/MpvNet.Windows/WPF/Controls/StringSettingControl.xaml.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
using HandyControl.Data;
|
||||||
|
using HandyControl.Tools.Converter;
|
||||||
|
|
||||||
|
namespace HandyControl.Controls
|
||||||
|
{
|
||||||
|
public class BorderElement
|
||||||
|
{
|
||||||
|
public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"CornerRadius", typeof(CornerRadius), typeof(BorderElement), new FrameworkPropertyMetadata(default(CornerRadius), FrameworkPropertyMetadataOptions.Inherits));
|
||||||
|
|
||||||
|
public static void SetCornerRadius(DependencyObject element, CornerRadius value) => element.SetValue(CornerRadiusProperty, value);
|
||||||
|
|
||||||
|
public static CornerRadius GetCornerRadius(DependencyObject element) => (CornerRadius) element.GetValue(CornerRadiusProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty CircularProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"Circular", typeof(bool), typeof(BorderElement), new PropertyMetadata(ValueBoxes.FalseBox, OnCircularChanged));
|
||||||
|
|
||||||
|
private static void OnCircularChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (d is Border border)
|
||||||
|
{
|
||||||
|
if ((bool) e.NewValue)
|
||||||
|
{
|
||||||
|
var binding = new MultiBinding
|
||||||
|
{
|
||||||
|
Converter = new BorderCircularConverter()
|
||||||
|
};
|
||||||
|
binding.Bindings.Add(new Binding(FrameworkElement.ActualWidthProperty.Name) { Source = border });
|
||||||
|
binding.Bindings.Add(new Binding(FrameworkElement.ActualHeightProperty.Name) { Source = border });
|
||||||
|
border.SetBinding(Border.CornerRadiusProperty, binding);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BindingOperations.ClearBinding(border, FrameworkElement.ActualWidthProperty);
|
||||||
|
BindingOperations.ClearBinding(border, FrameworkElement.ActualHeightProperty);
|
||||||
|
BindingOperations.ClearBinding(border, Border.CornerRadiusProperty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetCircular(DependencyObject element, bool value)
|
||||||
|
=> element.SetValue(CircularProperty, ValueBoxes.BooleanBox(value));
|
||||||
|
|
||||||
|
public static bool GetCircular(DependencyObject element)
|
||||||
|
=> (bool) element.GetValue(CircularProperty);
|
||||||
|
}
|
||||||
|
}
|
||||||