Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eff75d2029 | ||
|
|
f9615491b3 | ||
|
|
4252bd88e9 | ||
|
|
00917a0393 | ||
|
|
4cdcd2f2e4 | ||
|
|
27006cfa99 | ||
|
|
bdbd667584 | ||
|
|
4b243d38b9 | ||
|
|
cd31b2e2e6 | ||
|
|
f185ebd554 | ||
|
|
7d679c9d78 | ||
|
|
17184881f3 | ||
|
|
a39a2a25eb | ||
|
|
e0f1695260 | ||
|
|
d0ffd49f69 | ||
|
|
bfb6aa01b9 | ||
|
|
6f273b0aa8 | ||
|
|
3a93ec80ec | ||
|
|
dd0fd1c828 | ||
|
|
ec93062600 | ||
|
|
822333bf34 | ||
|
|
ffc20b26d4 | ||
|
|
3a612df3d3 | ||
|
|
afda61119e | ||
|
|
bb66ab6526 | ||
|
|
ec2b94e367 | ||
|
|
5401b5005f | ||
|
|
d38f7cf78f | ||
|
|
633ce11c88 | ||
|
|
7a3f63683e | ||
|
|
3e6ebcdb6a | ||
|
|
c38c0cf55d | ||
|
|
5d2302b322 | ||
|
|
51a8b971f6 | ||
|
|
3319df4538 | ||
|
|
1e6bd01987 | ||
|
|
e10cc7d273 | ||
|
|
19dea4b31e | ||
|
|
653fada5dc | ||
|
|
65b42bca3f | ||
|
|
5fe5534bae | ||
|
|
f07feaaa52 | ||
|
|
92014404f5 | ||
|
|
e2a7a7ab4b | ||
|
|
cedd448ef2 | ||
|
|
2208d6c637 | ||
|
|
187eeb19d3 | ||
|
|
955c75db60 | ||
|
|
9446f976a4 | ||
|
|
7988c83bec | ||
|
|
ebec3ad20c | ||
|
|
3b18b44cd2 | ||
|
|
cf4fc74d68 | ||
|
|
c75c87f527 | ||
|
|
e71c39271c | ||
|
|
de547884f8 | ||
|
|
4700cc5bd4 | ||
|
|
07d25f5d5f | ||
|
|
1f09c07e96 | ||
|
|
e8769e7059 | ||
|
|
88430ba7b6 | ||
|
|
25a2187bf4 | ||
|
|
fb084d3ea1 | ||
|
|
da7aef4548 | ||
|
|
91c23786f2 | ||
|
|
18a5041334 | ||
|
|
94dbae0af9 | ||
|
|
05c4d6dff3 | ||
|
|
ef2db78310 | ||
|
|
955bc9548c | ||
|
|
ef8026797c | ||
|
|
ed4be7b96d | ||
|
|
fdaff3687d | ||
|
|
f573eda657 | ||
|
|
708a1391e3 | ||
|
|
9e4230597f | ||
|
|
720d0d2604 | ||
|
|
dee12ac336 | ||
|
|
5f9f0964b2 | ||
|
|
bf89925d6a | ||
|
|
aa6e9648bb | ||
|
|
c4b9da0950 | ||
|
|
c7b023222c | ||
|
|
060926b749 | ||
|
|
aa3c83bad1 | ||
|
|
70606c8ac5 | ||
|
|
5010833da9 | ||
|
|
f5901389e0 | ||
|
|
11e1a1464e | ||
|
|
2664caf004 | ||
|
|
8594a7bc52 | ||
|
|
8a7d767e54 | ||
|
|
d09893470f | ||
|
|
a40879849b | ||
|
|
20953152b6 | ||
|
|
876a44b244 | ||
|
|
e9a706fa72 | ||
|
|
8820c0e059 | ||
|
|
45770e1ad6 | ||
|
|
afdec05dbf | ||
|
|
81e036dc4f | ||
|
|
8555254e81 | ||
|
|
1781fc06ae | ||
|
|
810f1e5da5 | ||
|
|
244b291255 | ||
|
|
7fc136f592 | ||
|
|
130e0d6f40 | ||
|
|
8fabf56337 | ||
|
|
b1e218f0ad | ||
|
|
624e8a2991 | ||
|
|
0ac5f49e5e | ||
|
|
de6f8d6cb6 | ||
|
|
b42ee26840 | ||
|
|
50bc245677 | ||
|
|
646832c6b1 | ||
|
|
43242673fb | ||
|
|
87aa7d9d81 | ||
|
|
91d9aad721 | ||
|
|
221902c946 | ||
|
|
8a8c2ecb87 | ||
|
|
f6c6808352 | ||
|
|
036d99f11f | ||
|
|
e78f7cee5e | ||
|
|
f03c84e8dc | ||
|
|
d5a12c404a | ||
|
|
dc74300ef5 | ||
|
|
b2c3fe61b3 | ||
|
|
97e65a811c | ||
|
|
d9d66fe54e | ||
|
|
ed7dae601a | ||
|
|
024af35bf5 | ||
|
|
9bd5732f2b | ||
|
|
117d1b8882 | ||
|
|
f6aad1b8fc | ||
|
|
c602936d2a | ||
|
|
a351ca70ba | ||
|
|
396a5a8453 | ||
|
|
db6d5cadd9 | ||
|
|
5568266c99 | ||
|
|
a605db31f9 | ||
|
|
35ca723c20 | ||
|
|
7057ee93ac | ||
|
|
6cde5b6bd1 | ||
|
|
08564bba20 | ||
|
|
495f2e3640 | ||
|
|
31d2d9dc98 | ||
|
|
68d34f81a0 | ||
|
|
e733a0abc7 | ||
|
|
c800baeb25 | ||
|
|
4080c812d2 | ||
|
|
617bf64105 | ||
|
|
9f19082d47 | ||
|
|
5b9719b96f | ||
|
|
3fd4320e52 | ||
|
|
d66e5af289 | ||
|
|
c5867861eb | ||
|
|
fdede5f643 | ||
|
|
bb0f70c75c | ||
|
|
dcffb74529 | ||
|
|
d8f665ef97 | ||
|
|
6bd203f606 | ||
|
|
240389fb6d | ||
|
|
ca6cb46ba8 | ||
|
|
616ed72503 | ||
|
|
310d4b46b2 | ||
|
|
d6b47f9d51 | ||
|
|
19a0128363 | ||
|
|
3433dcb21c | ||
|
|
62e3cbcfd0 | ||
|
|
4688e1eb5e | ||
|
|
f5e0e8c8b5 | ||
|
|
8c8fc13baf | ||
|
|
a9a8fa388e | ||
|
|
6371d7a36e | ||
|
|
425da3ab7d | ||
|
|
7aaa373bdf | ||
|
|
23d958fac8 | ||
|
|
e61f0002e5 | ||
|
|
303bd406c2 | ||
|
|
ce7e936931 | ||
|
|
f049c65623 | ||
|
|
7f8c066062 | ||
|
|
edff1f29db | ||
|
|
87696d77d1 | ||
|
|
0dbcda25e7 | ||
|
|
ebbcc60e13 | ||
|
|
1ce561a1ad | ||
|
|
c36fee17dd | ||
|
|
eeed34e2df | ||
|
|
52b70a0080 | ||
|
|
feba5b6f74 | ||
|
|
c2cd2dea37 | ||
|
|
5d87c6808d | ||
|
|
0531c33b0c | ||
|
|
e4e8299981 | ||
|
|
d0a93d57dd | ||
|
|
1949c22b85 | ||
|
|
3a69e49ab8 | ||
|
|
df94e83592 | ||
|
|
1de91a598c | ||
|
|
49a86e402c | ||
|
|
3d023962e1 | ||
|
|
a13cfedbce | ||
|
|
2b59de91c7 | ||
|
|
2479e1faaa | ||
|
|
77401bef32 | ||
|
|
e961bc6293 | ||
|
|
bf2584d90f | ||
|
|
e8729a4e27 | ||
|
|
1582fdbd5b | ||
|
|
431c20f817 | ||
|
|
4a5cb224b1 | ||
|
|
d5d9da046e | ||
|
|
0c6796ebe7 | ||
|
|
d73b9182cc | ||
|
|
39bcd9b943 | ||
|
|
ca5d87143b | ||
|
|
1e54344ec3 | ||
|
|
c10cf55f2d | ||
|
|
05aeee1124 | ||
|
|
74c6af2980 | ||
|
|
0883fe2e36 | ||
|
|
e95475f845 | ||
|
|
b2cd0c2c37 | ||
|
|
06b3c9645c | ||
|
|
557ef69697 | ||
|
|
eb49ead83b | ||
|
|
e2be6a0093 | ||
|
|
d4235a286a | ||
|
|
fd701e5d1f | ||
|
|
e6c1923b0e | ||
|
|
839465b7f2 | ||
|
|
7c331e51e6 | ||
|
|
775998466d | ||
|
|
ee020d81bd | ||
|
|
93d196572f | ||
|
|
f69068eb63 | ||
|
|
1edf3da984 | ||
|
|
4665f2a5d8 | ||
|
|
fd898e0567 | ||
|
|
48ba923f47 | ||
|
|
e1c9ce6f71 | ||
|
|
5937e5c721 | ||
|
|
3b7b532a8d | ||
|
|
bc57ffb930 | ||
|
|
1fd415ae31 | ||
|
|
6d265e7bae | ||
|
|
4667b104d2 | ||
|
|
2f524cffae | ||
|
|
87215d9e7b | ||
|
|
65e19706f8 | ||
|
|
f96342bd81 | ||
|
|
f7a6ab25c3 | ||
|
|
fa88d35b2b | ||
|
|
64d5c1f6aa | ||
|
|
56baa48223 | ||
|
|
ad3edd4652 | ||
|
|
81bac6ee9b | ||
|
|
a715f4e26b | ||
|
|
6115c21b44 | ||
|
|
f367260acd | ||
|
|
7f8b827c0e | ||
|
|
0a1abfcbbb | ||
|
|
f53592f32b | ||
|
|
fd1d187ede | ||
|
|
b4e78febc0 | ||
|
|
ff2928b18f | ||
|
|
8b34307975 | ||
|
|
9cca40420c | ||
|
|
3da51f9d64 | ||
|
|
2bd9e6655f | ||
|
|
d2b01100a5 | ||
|
|
47837edb01 | ||
|
|
91057c12a4 | ||
|
|
66b32468eb | ||
|
|
1e62c6c756 | ||
|
|
f8132e7bdb | ||
|
|
dec2e1c9fc | ||
|
|
ee20965218 | ||
|
|
2e429840d2 | ||
|
|
e63920e23b | ||
|
|
11d2e40e34 | ||
|
|
ddb4a91b08 | ||
|
|
157669bd76 | ||
|
|
f055759c7a | ||
|
|
34815f22ee | ||
|
|
1d3ae3e1c5 | ||
|
|
3cf1ebc09b | ||
|
|
360741674d | ||
|
|
c369f2c3d7 | ||
|
|
65e22fbbbd | ||
|
|
74b2d76fea | ||
|
|
6c61e0e4c9 | ||
|
|
a60e1e7f42 | ||
|
|
1b1c4b741b | ||
|
|
f9d8549e56 | ||
|
|
bdd9d24d32 | ||
|
|
a7ba837cb1 | ||
|
|
d04781e4b3 | ||
|
|
f87f0b0807 | ||
|
|
59346f4b67 | ||
|
|
06174af16c | ||
|
|
f1867ddeb7 | ||
|
|
79f7de1b4c | ||
|
|
15de88463c | ||
|
|
c032d97c5f | ||
|
|
2eca47ab69 | ||
|
|
caa70dd460 | ||
|
|
6b0e65b563 | ||
|
|
e0308be8bb | ||
|
|
4663c435c9 | ||
|
|
8380980abd | ||
|
|
771c431188 | ||
|
|
1e1bb9176a | ||
|
|
6eb5c847af | ||
|
|
e50fdc4eb9 | ||
|
|
4edf1a8c42 | ||
|
|
cb455d379c | ||
|
|
d093023ce7 | ||
|
|
a55650bc40 | ||
|
|
6cbf0980c5 | ||
|
|
4cb65c1bfa | ||
|
|
f30e47dbd7 | ||
|
|
7ab6b9720f | ||
|
|
2f7c87d437 | ||
|
|
bc4b4955da | ||
|
|
f7e3408c86 | ||
|
|
2126a38f39 | ||
|
|
b81f6eaa96 | ||
|
|
17eb37cb37 | ||
|
|
9208aa8d16 | ||
|
|
bd7f7894ed | ||
|
|
6dfdb62df8 | ||
|
|
3be302d69f | ||
|
|
66ebc547f0 | ||
|
|
3366b83a89 | ||
|
|
cd3db94b5d | ||
|
|
d56067e7cc | ||
|
|
7c3cee692c | ||
|
|
a948d82c24 | ||
|
|
77893bb9ba | ||
|
|
1b2ecd9de4 | ||
|
|
b92842f9ac | ||
|
|
91d191b3d8 | ||
|
|
21accaa883 | ||
|
|
c6f2e949a7 | ||
|
|
9d9d9bb311 | ||
|
|
0b20300572 | ||
|
|
f47bcb69fd | ||
|
|
c20bb93f1f | ||
|
|
497259ca16 | ||
|
|
4322ffc6e5 | ||
|
|
8b40e0993f | ||
|
|
966b6371f5 | ||
|
|
5b493a70b0 | ||
|
|
1cb793d781 | ||
|
|
7f237c9c7b | ||
|
|
d0934295b0 | ||
|
|
8d40ba3011 | ||
|
|
f926deb63b | ||
|
|
b82c612f94 | ||
|
|
e7ae108c49 | ||
|
|
08689df2f5 | ||
|
|
87c308f6ca | ||
|
|
15b22f75a8 | ||
|
|
8e7431e7e5 | ||
|
|
c034f9b66e | ||
|
|
5cf53f8cfa | ||
|
|
e4de7f1ecb | ||
|
|
bf9913ba0f | ||
|
|
6ac8c905c9 | ||
|
|
603b5b5105 | ||
|
|
7528dcec71 | ||
|
|
d96848181d | ||
|
|
16b6ea8f29 | ||
|
|
7150ea2987 | ||
|
|
bc2febf480 | ||
|
|
11ec48a506 | ||
|
|
f08989cc99 | ||
|
|
424351092d | ||
|
|
df72c3e6f4 | ||
|
|
82e605a1c6 | ||
|
|
7a91675054 | ||
|
|
edf4eb2090 | ||
|
|
de1b37b7e9 | ||
|
|
928206a179 | ||
|
|
52b8944d71 | ||
|
|
0db5cb7025 | ||
|
|
cef8f5efe2 | ||
|
|
83ff87c79f | ||
|
|
00f5357403 | ||
|
|
010ace58fa | ||
|
|
b3cf4ebf12 | ||
|
|
f707b7b5f2 | ||
|
|
29ab2ddad3 | ||
|
|
627024bd13 | ||
|
|
c4a71048f5 | ||
|
|
bd07b7f011 | ||
|
|
93496849ec | ||
|
|
9984f42176 | ||
|
|
a262c94f88 | ||
|
|
8f326e692d | ||
|
|
7b8a47aac1 | ||
|
|
b46f1cccb1 | ||
|
|
5880451401 | ||
|
|
3c59452782 | ||
|
|
7d35132509 | ||
|
|
dbb3e14c50 | ||
|
|
d1d45c4998 | ||
|
|
c9db6e528e | ||
|
|
062fd82de1 | ||
|
|
122cff359d | ||
|
|
ef96ccb623 | ||
|
|
8a66cf6d92 | ||
|
|
16dd352231 | ||
|
|
fb275ea242 | ||
|
|
533472299a | ||
|
|
da95901d39 | ||
|
|
29101c310b | ||
|
|
91db6d0e57 | ||
|
|
504da89223 | ||
|
|
4a54b897ac | ||
|
|
9565682eda | ||
|
|
17741a2f61 | ||
|
|
f5407ecac8 | ||
|
|
c57cbfb2f6 | ||
|
|
339a767304 | ||
|
|
4c534b44d4 | ||
|
|
984125a79e | ||
|
|
17f1075e64 | ||
|
|
64a5874566 | ||
|
|
b16a6a6bd5 | ||
|
|
87da5b400e | ||
|
|
3f1da5f289 | ||
|
|
45525a4f14 | ||
|
|
fc7892daed | ||
|
|
51a49cfca3 | ||
|
|
da8b583286 | ||
|
|
2c12a07257 | ||
|
|
3a82119c2a | ||
|
|
e6ea1b056a | ||
|
|
1a96d2b418 | ||
|
|
8eb716505d | ||
|
|
ddb157809a | ||
|
|
ad8faab9ea | ||
|
|
6a7644935f | ||
|
|
684196aa36 | ||
|
|
56697303f9 | ||
|
|
3306a28892 | ||
|
|
059509354d | ||
|
|
53d50dbc3b | ||
|
|
46ebda944a | ||
|
|
0bb200a785 | ||
|
|
d3602201c6 | ||
|
|
beb78fada0 | ||
|
|
a05efef3c8 | ||
|
|
36d63860e2 | ||
|
|
ad9be7f132 | ||
|
|
8e9968628a | ||
|
|
e33db4f6d7 | ||
|
|
ab5ad3c839 | ||
|
|
fa4af97fb0 | ||
|
|
25e3c4a543 |
@@ -0,0 +1,9 @@
|
||||
BasedOnStyle: Google
|
||||
AlignAfterOpenBracket: AlwaysBreak
|
||||
ColumnLimit: 120
|
||||
IndentWidth: 2
|
||||
ContinuationIndentWidth: 4
|
||||
DerivePointerAlignment: false
|
||||
LineEnding: LF
|
||||
PointerAlignment: Left
|
||||
SortIncludes: true
|
||||
@@ -1,19 +0,0 @@
|
||||
.git
|
||||
build/
|
||||
.dart_tool/
|
||||
.idea/
|
||||
*.tar.gz
|
||||
nul
|
||||
libmpv-prefix/
|
||||
steamfiles/
|
||||
pubspec_overrides.yaml
|
||||
|
||||
# Flutter ephemeral / generated plugin symlinks
|
||||
linux/flutter/ephemeral/
|
||||
windows/flutter/
|
||||
macos/Flutter/
|
||||
ios/Flutter/
|
||||
android/.gradle/
|
||||
android/app/build/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
@@ -0,0 +1,28 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.{c,cc,cpp,h,hpp,m,mm}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.dart]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.{kt,kts,java}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
|
||||
ktlint_code_style = android_studio
|
||||
ktlint_standard_max-line-length = disabled
|
||||
ktlint_standard_no-wildcard-imports = disabled
|
||||
ktlint_standard_property-naming = disabled
|
||||
|
||||
[*.swift]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -uo pipefail
|
||||
|
||||
if [ "${SKIP_HOOKS:-}" = "1" ]; then
|
||||
echo "[pre-commit] skipped (SKIP_HOOKS=1)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
GIT_DIR="$(git rev-parse --git-dir)"
|
||||
if [ -f "$GIT_DIR/MERGE_MSG" ] || [ -f "$GIT_DIR/MERGE_HEAD" ] || [ -f "$GIT_DIR/REVERT_HEAD" ]; then
|
||||
echo "[pre-commit] skipped (merge/revert in progress)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if git diff --cached --quiet; then
|
||||
echo "[pre-commit] nothing staged — skipping checks"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ROOT="$(git rev-parse --show-toplevel)"
|
||||
exec "$ROOT/scripts/ci_checks.sh"
|
||||
@@ -1 +1,2 @@
|
||||
github: edde746
|
||||
liberapay: edde746
|
||||
|
||||
@@ -68,10 +68,21 @@ body:
|
||||
- Windows
|
||||
- macOS
|
||||
- Android TV
|
||||
- tvOS
|
||||
- Linux
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: media-server
|
||||
attributes:
|
||||
label: Media Server
|
||||
description: Are you using Jellyfin or Plex?
|
||||
multiple: true
|
||||
options:
|
||||
- Jellyfin
|
||||
- Plex
|
||||
|
||||
- type: input
|
||||
id: device
|
||||
attributes:
|
||||
|
||||
@@ -54,9 +54,21 @@ body:
|
||||
- Windows
|
||||
- macOS
|
||||
- Android TV
|
||||
- tvOS
|
||||
- Linux
|
||||
- All platforms
|
||||
|
||||
- type: dropdown
|
||||
id: media-server
|
||||
attributes:
|
||||
label: Media Server
|
||||
description: Is this for Jellyfin, Plex, or both?
|
||||
multiple: true
|
||||
options:
|
||||
- Jellyfin
|
||||
- Plex
|
||||
- Both
|
||||
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
|
||||
@@ -6,6 +6,8 @@ on:
|
||||
env:
|
||||
SENTRY_DART_DEFINE: ${{ github.repository == 'edde746/plezy' && '--dart-define=ENABLE_SENTRY=true' || '' }}
|
||||
GIT_COMMIT_DART_DEFINE: --dart-define=GIT_COMMIT=${{ github.sha }}
|
||||
SENTRY_ENV_DART_DEFINE: --dart-define=SENTRY_ENVIRONMENT=github
|
||||
DONATIONS_DART_DEFINE: --dart-define=ENABLE_DONATIONS=true
|
||||
|
||||
jobs:
|
||||
build-android:
|
||||
@@ -28,15 +30,14 @@ jobs:
|
||||
with:
|
||||
channel: "stable"
|
||||
cache: true
|
||||
pub-cache: false
|
||||
|
||||
- name: Cache Pub dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.pub-cache
|
||||
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pub-
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }}
|
||||
|
||||
- name: Cache Gradle
|
||||
uses: actions/cache@v4
|
||||
@@ -49,7 +50,7 @@ jobs:
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
run: flutter pub get --enforce-lockfile --no-example
|
||||
|
||||
- name: Configure Android signing
|
||||
run: |
|
||||
@@ -62,7 +63,39 @@ jobs:
|
||||
EOF
|
||||
|
||||
- name: Build APKs
|
||||
run: flutter build apk --release --split-per-abi --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }}
|
||||
run: flutter build apk --release --split-per-abi --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --obfuscate --split-debug-info=debug-info/android-apk
|
||||
|
||||
- name: Stage symbols for upload
|
||||
if: github.repository == 'edde746/plezy'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
SYMBOL_ROOT="symbol-inputs/android-apk"
|
||||
rm -rf "$SYMBOL_ROOT"
|
||||
mkdir -p "$SYMBOL_ROOT"
|
||||
|
||||
if [ -d "debug-info/android-apk" ]; then
|
||||
mkdir -p "$SYMBOL_ROOT/debug-info"
|
||||
cp -R "debug-info/android-apk" "$SYMBOL_ROOT/debug-info/"
|
||||
fi
|
||||
|
||||
if [ -d "build/app/intermediates/merged_native_libs" ]; then
|
||||
while IFS= read -r -d '' file; do
|
||||
mkdir -p "$SYMBOL_ROOT/$(dirname "$file")"
|
||||
cp "$file" "$SYMBOL_ROOT/$file"
|
||||
done < <(find build/app/intermediates/merged_native_libs -name '*.so' -type f -print0)
|
||||
fi
|
||||
|
||||
find "$SYMBOL_ROOT" -type f -print -quit | grep -q .
|
||||
|
||||
- name: Upload symbols artifact
|
||||
if: github.repository == 'edde746/plezy'
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: symbols-android-apk
|
||||
path: symbol-inputs/android-apk
|
||||
retention-days: 3
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Clean up keystore
|
||||
if: always()
|
||||
@@ -105,15 +138,14 @@ jobs:
|
||||
with:
|
||||
channel: "stable"
|
||||
cache: true
|
||||
pub-cache: false
|
||||
|
||||
- name: Cache Pub dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.pub-cache
|
||||
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pub-
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }}
|
||||
|
||||
- name: Cache CocoaPods
|
||||
uses: actions/cache@v4
|
||||
@@ -127,10 +159,42 @@ jobs:
|
||||
${{ runner.os }}-pods-
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
run: flutter pub get --enforce-lockfile --no-example
|
||||
|
||||
- name: Build iOS (no codesign)
|
||||
run: flutter build ios --release --no-codesign --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }}
|
||||
run: flutter build ios --release --no-codesign --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/ios
|
||||
|
||||
- name: Stage symbols for upload
|
||||
if: github.repository == 'edde746/plezy'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
SYMBOL_ROOT="symbol-inputs/ios"
|
||||
rm -rf "$SYMBOL_ROOT"
|
||||
mkdir -p "$SYMBOL_ROOT"
|
||||
|
||||
if [ -d "debug-info/ios" ]; then
|
||||
mkdir -p "$SYMBOL_ROOT/debug-info"
|
||||
cp -R "debug-info/ios" "$SYMBOL_ROOT/debug-info/"
|
||||
fi
|
||||
|
||||
if [ -d "build/ios" ]; then
|
||||
while IFS= read -r -d '' file; do
|
||||
mkdir -p "$SYMBOL_ROOT/$(dirname "$file")"
|
||||
cp "$file" "$SYMBOL_ROOT/$file"
|
||||
done < <(find build/ios -path '*.dSYM/Contents/Resources/DWARF/*' -type f -print0)
|
||||
fi
|
||||
|
||||
find "$SYMBOL_ROOT" -type f -print -quit | grep -q .
|
||||
|
||||
- name: Upload symbols artifact
|
||||
if: github.repository == 'edde746/plezy'
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: symbols-ios
|
||||
path: symbol-inputs/ios
|
||||
retention-days: 3
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Create IPA
|
||||
run: |
|
||||
@@ -163,15 +227,14 @@ jobs:
|
||||
with:
|
||||
channel: "stable"
|
||||
cache: true
|
||||
pub-cache: false
|
||||
|
||||
- name: Cache Pub dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.pub-cache
|
||||
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pub-
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }}
|
||||
|
||||
- name: Cache CocoaPods
|
||||
uses: actions/cache@v4
|
||||
@@ -185,10 +248,42 @@ jobs:
|
||||
${{ runner.os }}-macos-pods-
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
run: flutter pub get --enforce-lockfile --no-example
|
||||
|
||||
- name: Build macOS
|
||||
run: flutter build macos --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }}
|
||||
run: flutter build macos --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/macos
|
||||
|
||||
- name: Stage symbols for upload
|
||||
if: github.repository == 'edde746/plezy'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
SYMBOL_ROOT="symbol-inputs/macos"
|
||||
rm -rf "$SYMBOL_ROOT"
|
||||
mkdir -p "$SYMBOL_ROOT"
|
||||
|
||||
if [ -d "debug-info/macos" ]; then
|
||||
mkdir -p "$SYMBOL_ROOT/debug-info"
|
||||
cp -R "debug-info/macos" "$SYMBOL_ROOT/debug-info/"
|
||||
fi
|
||||
|
||||
if [ -d "build/macos/Build/Products/Release" ]; then
|
||||
while IFS= read -r -d '' file; do
|
||||
mkdir -p "$SYMBOL_ROOT/$(dirname "$file")"
|
||||
cp "$file" "$SYMBOL_ROOT/$file"
|
||||
done < <(find build/macos/Build/Products/Release -path '*.dSYM/Contents/Resources/DWARF/*' -type f -print0)
|
||||
fi
|
||||
|
||||
find "$SYMBOL_ROOT" -type f -print -quit | grep -q .
|
||||
|
||||
- name: Upload symbols artifact
|
||||
if: github.repository == 'edde746/plezy'
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: symbols-macos
|
||||
path: symbol-inputs/macos
|
||||
retention-days: 3
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Import Code Signing Certificate
|
||||
env:
|
||||
@@ -325,21 +420,66 @@ jobs:
|
||||
with:
|
||||
channel: "stable"
|
||||
cache: true
|
||||
pub-cache: false
|
||||
|
||||
- name: Cache Pub dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~\AppData\Local\Pub\Cache
|
||||
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pub-
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }}
|
||||
|
||||
- name: Cache Windows native dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build/windows/x64/_deps
|
||||
key: windows-native-x64-${{ hashFiles('windows/CMakeLists.txt') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
run: flutter pub get --enforce-lockfile --no-example
|
||||
|
||||
- name: Build Windows x64
|
||||
run: flutter build windows --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }}
|
||||
run: flutter build windows --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/windows-x64
|
||||
|
||||
- name: Stage symbols for upload
|
||||
if: github.repository == 'edde746/plezy'
|
||||
shell: pwsh
|
||||
continue-on-error: true
|
||||
run: |
|
||||
$symbolRoot = 'symbol-inputs/windows-x64'
|
||||
Remove-Item -Path $symbolRoot -Recurse -Force -ErrorAction SilentlyContinue
|
||||
New-Item -ItemType Directory -Path $symbolRoot -Force | Out-Null
|
||||
|
||||
$debugInfo = 'debug-info/windows-x64'
|
||||
if (Test-Path $debugInfo) {
|
||||
$debugInfoRoot = Join-Path $symbolRoot 'debug-info'
|
||||
New-Item -ItemType Directory -Path $debugInfoRoot -Force | Out-Null
|
||||
Copy-Item -Path $debugInfo -Destination $debugInfoRoot -Recurse -Force
|
||||
}
|
||||
|
||||
$pdbRoot = 'build/windows/x64/runner/Release'
|
||||
if (Test-Path $pdbRoot) {
|
||||
Get-ChildItem -Path $pdbRoot -Filter '*.pdb' -Recurse | ForEach-Object {
|
||||
$relative = [System.IO.Path]::GetRelativePath((Get-Location).Path, $_.FullName)
|
||||
$destination = Join-Path $symbolRoot $relative
|
||||
New-Item -ItemType Directory -Path (Split-Path -Parent $destination) -Force | Out-Null
|
||||
Copy-Item -Path $_.FullName -Destination $destination -Force
|
||||
}
|
||||
}
|
||||
|
||||
if (-not (Get-ChildItem -Path $symbolRoot -File -Recurse)) {
|
||||
throw 'No symbol files staged'
|
||||
}
|
||||
|
||||
- name: Upload symbols artifact
|
||||
if: github.repository == 'edde746/plezy'
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: symbols-windows-x64
|
||||
path: symbol-inputs/windows-x64
|
||||
retention-days: 3
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload x64 build
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -354,7 +494,17 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Cache Windows native dependencies
|
||||
id: windows-native-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
build/windows/arm64/_deps
|
||||
build/windows/arm64/mpv-dev-arm64
|
||||
key: windows-native-arm64-${{ hashFiles('windows/CMakeLists.txt') }}
|
||||
|
||||
- name: Install 7-Zip
|
||||
if: steps.windows-native-cache.outputs.cache-hit != 'true'
|
||||
run: choco install 7zip -y
|
||||
|
||||
- name: Setup Flutter
|
||||
@@ -362,21 +512,60 @@ jobs:
|
||||
with:
|
||||
channel: "master"
|
||||
cache: true
|
||||
pub-cache: false
|
||||
|
||||
- name: Cache Pub dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~\AppData\Local\Pub\Cache
|
||||
key: ${{ runner.os }}-arm64-pub-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-arm64-pub-
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
run: flutter pub get --no-example
|
||||
|
||||
- name: Build Windows arm64
|
||||
run: flutter build windows --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }}
|
||||
run: flutter build windows --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/windows-arm64
|
||||
|
||||
- name: Stage symbols for upload
|
||||
if: github.repository == 'edde746/plezy'
|
||||
shell: pwsh
|
||||
continue-on-error: true
|
||||
run: |
|
||||
$symbolRoot = 'symbol-inputs/windows-arm64'
|
||||
Remove-Item -Path $symbolRoot -Recurse -Force -ErrorAction SilentlyContinue
|
||||
New-Item -ItemType Directory -Path $symbolRoot -Force | Out-Null
|
||||
|
||||
$debugInfo = 'debug-info/windows-arm64'
|
||||
if (Test-Path $debugInfo) {
|
||||
$debugInfoRoot = Join-Path $symbolRoot 'debug-info'
|
||||
New-Item -ItemType Directory -Path $debugInfoRoot -Force | Out-Null
|
||||
Copy-Item -Path $debugInfo -Destination $debugInfoRoot -Recurse -Force
|
||||
}
|
||||
|
||||
$pdbRoot = 'build/windows/arm64/runner/Release'
|
||||
if (Test-Path $pdbRoot) {
|
||||
Get-ChildItem -Path $pdbRoot -Filter '*.pdb' -Recurse | ForEach-Object {
|
||||
$relative = [System.IO.Path]::GetRelativePath((Get-Location).Path, $_.FullName)
|
||||
$destination = Join-Path $symbolRoot $relative
|
||||
New-Item -ItemType Directory -Path (Split-Path -Parent $destination) -Force | Out-Null
|
||||
Copy-Item -Path $_.FullName -Destination $destination -Force
|
||||
}
|
||||
}
|
||||
|
||||
if (-not (Get-ChildItem -Path $symbolRoot -File -Recurse)) {
|
||||
throw 'No symbol files staged'
|
||||
}
|
||||
|
||||
- name: Upload symbols artifact
|
||||
if: github.repository == 'edde746/plezy'
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: symbols-windows-arm64
|
||||
path: symbol-inputs/windows-arm64
|
||||
retention-days: 3
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload arm64 build
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -481,15 +670,14 @@ jobs:
|
||||
with:
|
||||
channel: "stable"
|
||||
cache: true
|
||||
pub-cache: false
|
||||
|
||||
- name: Cache Pub dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.pub-cache
|
||||
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pub-
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }}
|
||||
|
||||
- name: Cache APT packages
|
||||
uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
@@ -517,13 +705,45 @@ jobs:
|
||||
run: sudo gem install fpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
run: flutter pub get --enforce-lockfile --no-example
|
||||
|
||||
- name: Build Linux x64
|
||||
run: flutter build linux --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }}
|
||||
run: flutter build linux --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/linux-x64
|
||||
env:
|
||||
PKG_CONFIG_PATH: ${{ github.workspace }}/libmpv-prefix/lib/pkgconfig:${{ github.workspace }}/libmpv-prefix/lib/x86_64-linux-gnu/pkgconfig
|
||||
|
||||
- name: Stage symbols for upload
|
||||
if: github.repository == 'edde746/plezy'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
SYMBOL_ROOT="symbol-inputs/linux-x64"
|
||||
rm -rf "$SYMBOL_ROOT"
|
||||
mkdir -p "$SYMBOL_ROOT"
|
||||
|
||||
if [ -d "debug-info/linux-x64" ]; then
|
||||
mkdir -p "$SYMBOL_ROOT/debug-info"
|
||||
cp -R "debug-info/linux-x64" "$SYMBOL_ROOT/debug-info/"
|
||||
fi
|
||||
|
||||
if [ -d "build/linux" ]; then
|
||||
while IFS= read -r -d '' file; do
|
||||
mkdir -p "$SYMBOL_ROOT/$(dirname "$file")"
|
||||
cp "$file" "$SYMBOL_ROOT/$file"
|
||||
done < <(find build/linux -path '*/release/bundle/plezy' -type f -print0)
|
||||
fi
|
||||
|
||||
find "$SYMBOL_ROOT" -type f -print -quit | grep -q .
|
||||
|
||||
- name: Upload symbols artifact
|
||||
if: github.repository == 'edde746/plezy'
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: symbols-linux-x64
|
||||
path: symbol-inputs/linux-x64
|
||||
retention-days: 3
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Build Linux Packages
|
||||
run: ARCH_SUFFIX=x64 OUTPUT_DIR=$GITHUB_WORKSPACE python3 linux/packaging/build-packages.py
|
||||
|
||||
@@ -589,15 +809,14 @@ jobs:
|
||||
with:
|
||||
channel: "master"
|
||||
cache: true
|
||||
pub-cache: false
|
||||
|
||||
- name: Cache Pub dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.pub-cache
|
||||
key: ${{ runner.os }}-arm64-pub-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-arm64-pub-
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-pub-v2-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }}
|
||||
|
||||
- name: Cache APT packages
|
||||
uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
@@ -625,13 +844,45 @@ jobs:
|
||||
run: sudo gem install fpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
run: flutter pub get --no-example
|
||||
|
||||
- name: Build Linux arm64
|
||||
run: flutter build linux --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }}
|
||||
run: flutter build linux --release --dart-define=ENABLE_UPDATE_CHECK=true ${{ env.SENTRY_DART_DEFINE }} ${{ env.GIT_COMMIT_DART_DEFINE }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/linux-arm64
|
||||
env:
|
||||
PKG_CONFIG_PATH: ${{ github.workspace }}/libmpv-prefix/lib/pkgconfig:${{ github.workspace }}/libmpv-prefix/lib/aarch64-linux-gnu/pkgconfig
|
||||
|
||||
- name: Stage symbols for upload
|
||||
if: github.repository == 'edde746/plezy'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
SYMBOL_ROOT="symbol-inputs/linux-arm64"
|
||||
rm -rf "$SYMBOL_ROOT"
|
||||
mkdir -p "$SYMBOL_ROOT"
|
||||
|
||||
if [ -d "debug-info/linux-arm64" ]; then
|
||||
mkdir -p "$SYMBOL_ROOT/debug-info"
|
||||
cp -R "debug-info/linux-arm64" "$SYMBOL_ROOT/debug-info/"
|
||||
fi
|
||||
|
||||
if [ -d "build/linux" ]; then
|
||||
while IFS= read -r -d '' file; do
|
||||
mkdir -p "$SYMBOL_ROOT/$(dirname "$file")"
|
||||
cp "$file" "$SYMBOL_ROOT/$file"
|
||||
done < <(find build/linux -path '*/release/bundle/plezy' -type f -print0)
|
||||
fi
|
||||
|
||||
find "$SYMBOL_ROOT" -type f -print -quit | grep -q .
|
||||
|
||||
- name: Upload symbols artifact
|
||||
if: github.repository == 'edde746/plezy'
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: symbols-linux-arm64
|
||||
path: symbol-inputs/linux-arm64
|
||||
retention-days: 3
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Find bundle directory
|
||||
id: find-bundle
|
||||
run: |
|
||||
@@ -693,6 +944,51 @@ jobs:
|
||||
plezy-linux-arm64.rpm
|
||||
plezy-linux-arm64.pkg.tar.zst
|
||||
|
||||
upload-symbols:
|
||||
if: github.repository == 'edde746/plezy'
|
||||
needs: [build-android, build-ios, build-macos, build-windows-x64, build-windows-arm64, build-linux-x64, build-linux-arm64]
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: android-apk
|
||||
os: ubuntu-latest
|
||||
command: ./scripts/upload-symbols.sh android-apk symbol-inputs/android-apk
|
||||
- platform: ios
|
||||
os: ubuntu-latest
|
||||
command: ./scripts/upload-symbols.sh ios symbol-inputs/ios
|
||||
- platform: macos
|
||||
os: ubuntu-latest
|
||||
command: ./scripts/upload-symbols.sh macos symbol-inputs/macos
|
||||
- platform: windows-x64
|
||||
os: windows-latest
|
||||
command: ./scripts/upload-symbols.ps1 windows-x64 symbol-inputs/windows-x64
|
||||
- platform: windows-arm64
|
||||
os: windows-latest
|
||||
command: ./scripts/upload-symbols.ps1 windows-arm64 symbol-inputs/windows-arm64
|
||||
- platform: linux-x64
|
||||
os: ubuntu-latest
|
||||
command: ./scripts/upload-symbols.sh linux-x64 symbol-inputs/linux-x64
|
||||
- platform: linux-arm64
|
||||
os: ubuntu-latest
|
||||
command: ./scripts/upload-symbols.sh linux-arm64 symbol-inputs/linux-arm64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Download symbols artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: symbols-${{ matrix.platform }}
|
||||
path: symbol-inputs/${{ matrix.platform }}
|
||||
|
||||
- name: Upload symbols to bugs.plezy.app
|
||||
env:
|
||||
BUGS_ADMIN_TOKEN: ${{ secrets.BUGS_ADMIN_TOKEN }}
|
||||
run: ${{ matrix.command }}
|
||||
|
||||
create-release:
|
||||
needs: [build-android, build-ios, build-macos, package-windows, build-linux-x64, build-linux-arm64]
|
||||
runs-on: ubuntu-latest
|
||||
@@ -704,10 +1000,53 @@ jobs:
|
||||
sparse-checkout: pubspec.yaml
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
- name: Download all artifacts
|
||||
- name: Download Android artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts
|
||||
name: android-apk
|
||||
path: artifacts/android-apk
|
||||
|
||||
- name: Download iOS artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ios-ipa
|
||||
path: artifacts/ios-ipa
|
||||
|
||||
- name: Download macOS artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: macos-dmg
|
||||
path: artifacts/macos-dmg
|
||||
|
||||
- name: Download Windows x64 artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: windows-x64-portable
|
||||
path: artifacts/windows-x64-portable
|
||||
|
||||
- name: Download Windows arm64 artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: windows-arm64-portable
|
||||
path: artifacts/windows-arm64-portable
|
||||
|
||||
- name: Download Windows installer artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: windows-installer
|
||||
path: artifacts/windows-installer
|
||||
|
||||
- name: Download Linux x64 artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: linux-x64
|
||||
path: artifacts/linux-x64
|
||||
|
||||
- name: Download Linux arm64 artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: linux-arm64
|
||||
path: artifacts/linux-arm64
|
||||
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R artifacts
|
||||
|
||||
@@ -24,15 +24,14 @@ jobs:
|
||||
with:
|
||||
channel: "stable"
|
||||
cache: true
|
||||
pub-cache: false
|
||||
|
||||
- name: Cache Pub dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.pub-cache
|
||||
key: ${{ runner.os }}-pub-v2-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pub-v2-
|
||||
key: ${{ runner.os }}-pub-v3-${{ hashFiles('**/pubspec.yaml', '**/pubspec.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -107,15 +106,14 @@ jobs:
|
||||
with:
|
||||
channel: "stable"
|
||||
cache: true
|
||||
pub-cache: false
|
||||
|
||||
- name: Cache Pub dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.pub-cache
|
||||
key: ${{ runner.os }}-pub-v2-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pub-v2-
|
||||
key: ${{ runner.os }}-pub-v3-${{ hashFiles('**/pubspec.yaml', '**/pubspec.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -130,6 +128,24 @@ jobs:
|
||||
echo "No tests found, skipping test execution"
|
||||
fi
|
||||
|
||||
native-format:
|
||||
name: Native Formatting
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: "17"
|
||||
|
||||
- name: Verify native formatting
|
||||
run: scripts/format_native.sh --check
|
||||
|
||||
dependency-check:
|
||||
name: Dependency Validation
|
||||
runs-on: ubuntu-latest
|
||||
@@ -144,15 +160,14 @@ jobs:
|
||||
with:
|
||||
channel: "stable"
|
||||
cache: true
|
||||
pub-cache: false
|
||||
|
||||
- name: Cache Pub dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.pub-cache
|
||||
key: ${{ runner.os }}-pub-v2-${{ hashFiles('**/pubspec.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pub-v2-
|
||||
key: ${{ runner.os }}-pub-v3-${{ hashFiles('**/pubspec.yaml', '**/pubspec.lock') }}
|
||||
|
||||
- name: Verify dependencies
|
||||
run: |
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
name: SonarQube
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sonarqube:
|
||||
name: SonarQube
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: "stable"
|
||||
cache: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: SonarQube Scan
|
||||
uses: SonarSource/sonarqube-scan-action@v6
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
@@ -34,6 +34,20 @@ migrate_working_dir/
|
||||
/build/
|
||||
/debug-info/
|
||||
|
||||
# tvOS: build artifacts and generated assets (regenerated by xcode_appletv.sh)
|
||||
tvos/build/
|
||||
tvos/Pods/
|
||||
tvos/Podfile.lock
|
||||
tvos/Runner.xcworkspace/xcuserdata/
|
||||
tvos/Runner.xcodeproj/xcuserdata/
|
||||
tvos/Runner.xcodeproj/project.xcworkspace/xcuserdata/
|
||||
tvos/Flutter/Generated.xcconfig
|
||||
tvos/Flutter/flutter_export_environment.sh
|
||||
tvos/Flutter/libPods-Runner.a
|
||||
tvos/tvos_flutter_assets/
|
||||
tvos/Runner/GeneratedPluginRegistrant.h
|
||||
tvos/Runner/GeneratedPluginRegistrant.m
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
@@ -55,3 +69,5 @@ duplication-report/
|
||||
**/fastlane/**/
|
||||
**/fastlane/report.xml
|
||||
maestro/**/*.png
|
||||
|
||||
server/deploy.sh
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"threshold": 5,
|
||||
"reporters": ["html", "console"],
|
||||
"ignore": [
|
||||
"**/*.g.dart",
|
||||
"**/*.freezed.dart",
|
||||
"**/*.mocks.dart",
|
||||
"**/generated/**",
|
||||
"**/*.config.dart"
|
||||
],
|
||||
"absolute": true,
|
||||
"gitignore": true,
|
||||
"format": ["dart"],
|
||||
"minLines": 5,
|
||||
"minTokens": 50,
|
||||
"output": "./duplication-report",
|
||||
"mode": "strict",
|
||||
"formatsExts": {
|
||||
"dart": ["dart"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"indentation" : {
|
||||
"spaces" : 2
|
||||
},
|
||||
"lineLength" : 120,
|
||||
"maximumBlankLines" : 1,
|
||||
"respectsExistingLineBreaks" : true,
|
||||
"rules" : {},
|
||||
"version" : 1
|
||||
}
|
||||
@@ -10,7 +10,8 @@
|
||||
## Development
|
||||
|
||||
- Follow Dart/Flutter conventions
|
||||
- Run `dart format .` to format your code (note: generated files like `*.g.dart` are excluded from CI checks)
|
||||
- Run `dart format .` to format Dart code (note: generated files like `*.g.dart` are excluded from CI checks)
|
||||
- Run `scripts/format_native.sh --fix` to format Kotlin, Swift, C++, C, Objective-C, and native headers
|
||||
- Run `flutter analyze` before submitting to check for issues
|
||||
- Run `flutter test` if tests are available
|
||||
- Test your changes thoroughly
|
||||
@@ -19,8 +20,9 @@
|
||||
|
||||
The project includes automated CI checks that run on all pull requests:
|
||||
|
||||
1. **Code Formatting**: Ensures code follows Dart formatting standards
|
||||
- Run locally: `dart format .` to format all files
|
||||
1. **Code Formatting**: Ensures code follows Dart and native formatting standards
|
||||
- Run locally: `dart format .` to format Dart files
|
||||
- Run locally: `scripts/format_native.sh --fix` to format native files
|
||||
- Note: CI only checks non-generated files (excludes `.g.dart`, `.freezed.dart`)
|
||||
- Generated files are reformatted automatically by build tools
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
cask "plezy" do
|
||||
version "1.29.0"
|
||||
sha256 "5f856275e7d5fe66f25238708a41e9f04fa4d327a932a16626b1424807b05866"
|
||||
version "1.35.2"
|
||||
sha256 "e3a65f5688bd8ac010b0dad2238a24f6f3b4b5a6f5ca2b5127a9e1a817dd73d9"
|
||||
|
||||
url "https://github.com/edde746/plezy/releases/download/#{version}/plezy-macos.dmg"
|
||||
name "Plezy"
|
||||
desc "Modern Plex client built with Flutter"
|
||||
desc "Modern Plex and Jellyfin client built with Flutter"
|
||||
homepage "https://github.com/edde746/plezy"
|
||||
|
||||
livecheck do
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Plezy
|
||||
</h1>
|
||||
|
||||
A modern Plex client for desktop and mobile. Built with Flutter for native performance and a clean interface.
|
||||
A modern client for Plex and Jellyfin on desktop and mobile. Built with Flutter for native performance and a clean interface.
|
||||
|
||||
<p align="center">
|
||||
<img src="assets/screenshots/macos-home.png" alt="Plezy macOS Home Screen" width="800" />
|
||||
@@ -20,7 +20,7 @@ A modern Plex client for desktop and mobile. Built with Flutter for native perfo
|
||||
- [Windows (x64, arm64)](https://github.com/edde746/plezy/releases/latest/download/plezy-windows-installer.exe)
|
||||
- [macOS (x64, arm64)](https://github.com/edde746/plezy/releases/latest/download/plezy-macos.dmg)
|
||||
- [Linux (x64, arm64)](https://github.com/edde746/plezy/releases/latest) - .deb, .rpm, .pkg.tar.zst, and portable tar.gz available
|
||||
- [NixOS/Nix](https://github.com/mio-19/nurpkgs/tree/main/pkgs/plezy) - Community package by [@mio-19](https://github.com/mio-19)
|
||||
- [Nix](https://search.nixos.org/packages?channel=unstable&query=plezy) - Community package by [@mio-19](https://github.com/mio-19) and [@MiniHarinn](https://github.com/MiniHarinn)
|
||||
- **Homebrew** (macOS):
|
||||
```bash
|
||||
brew tap edde746/plezy https://github.com/edde746/plezy
|
||||
@@ -37,43 +37,60 @@ A modern Plex client for desktop and mobile. Built with Flutter for native perfo
|
||||
|
||||
## Features
|
||||
|
||||
### 🔐 Authentication
|
||||
- Sign in with Plex
|
||||
- Automatic server discovery and smart connection selection
|
||||
- Persistent sessions with auto-login
|
||||
### <img src="assets/readme_icons/browse.svg" height="20" alt="" align="center" /> Browse & Discover
|
||||
- Libraries, collections, and playlists
|
||||
- Discover hub — Continue Watching, Next Up, trending, and recommendations
|
||||
- Cross-server search
|
||||
- Filtering, sorting, and alphabetical jump navigation
|
||||
- Extras — trailers, deleted scenes, behind-the-scenes
|
||||
|
||||
### 📚 Media Browsing
|
||||
- Browse libraries with rich metadata
|
||||
- Advanced search across all media
|
||||
- Collections and playlists
|
||||
|
||||
### 🎬 Playback
|
||||
### <img src="assets/readme_icons/playback.svg" height="20" alt="" align="center" /> Playback
|
||||
- Wide codec support (HEVC, AV1, VP9, and more)
|
||||
- HDR and Dolby Vision (not Linux)
|
||||
- Full ASS/SSA subtitle support
|
||||
- Audio and subtitle preferences synced with Plex profile
|
||||
- Full ASS/SSA subtitles with customizable styling
|
||||
- Online subtitle search & download
|
||||
- Audio & subtitle preferences synced with your server profile
|
||||
- Progress sync and resume
|
||||
- Auto-play next episode
|
||||
- Auto-play next episode with skip intro / skip credits
|
||||
- Chapter navigation with thumbnail scrub previews
|
||||
- Playback speed, audio sync offset, sleep timer
|
||||
- Ambient lighting and GLSL shader presets
|
||||
- Picture-in-Picture on Android, iOS, and macOS
|
||||
- Refresh-rate matching on Windows and Android
|
||||
- External player launch (VLC, MX Player, etc.)
|
||||
|
||||
### 📺 Live TV & DVR
|
||||
- EPG guide grid
|
||||
- Channel tuning
|
||||
- DVR recording rules and scheduled recordings
|
||||
- Multi-server DVR support
|
||||
### <img src="assets/readme_icons/live-tv.svg" height="20" alt="" align="center" /> Live TV & DVR
|
||||
- Live TV channel browsing with favorites
|
||||
- Plex DVR support with EPG guide, recording rules, and scheduled recordings
|
||||
- Multi-server Live TV support where available
|
||||
|
||||
### 📥 Downloads
|
||||
### <img src="assets/readme_icons/downloads.svg" height="20" alt="" align="center" /> Downloads & Offline
|
||||
- Download media for offline viewing
|
||||
- Background downloads with queue management
|
||||
- Background queue with pause / resume
|
||||
- Sync rules for automatic downloads
|
||||
- Offline browsing with watch state sync-back on reconnect
|
||||
|
||||
### 👥 Watch Together
|
||||
### <img src="assets/readme_icons/watch-together.svg" height="20" alt="" align="center" /> Watch Together
|
||||
- Synchronized playback with friends
|
||||
- Real-time play/pause and seek sync
|
||||
- Real-time play / pause / seek sync
|
||||
|
||||
### <img src="assets/readme_icons/integrations.svg" height="20" alt="" align="center" /> Integrations
|
||||
- Discord Rich Presence for Plex
|
||||
- Trakt scrobbling
|
||||
- Plezy Remote — control desktop and TV from mobile
|
||||
- Android TV Watch Next row
|
||||
|
||||
### <img src="assets/readme_icons/customization.svg" height="20" alt="" align="center" /> Platform & Customization
|
||||
- Desktop, mobile, and TV — full D-pad, keyboard, and gamepad support
|
||||
- Customizable keyboard shortcuts on desktop
|
||||
- Plex metadata and artwork editing
|
||||
- Localized in 14 languages
|
||||
|
||||
## Building from Source
|
||||
|
||||
### Prerequisites
|
||||
- Flutter SDK 3.8.1+
|
||||
- A Plex account with server access
|
||||
- A Plex account or Jellyfin server with user credentials
|
||||
|
||||
### Setup
|
||||
|
||||
@@ -96,5 +113,5 @@ dart run build_runner build --delete-conflicting-outputs
|
||||
## Acknowledgments
|
||||
|
||||
- Built with [Flutter](https://flutter.dev)
|
||||
- Designed for [Plex Media Server](https://www.plex.tv)
|
||||
- Supports [Plex Media Server](https://www.plex.tv) and [Jellyfin](https://jellyfin.org)
|
||||
- Playback powered by [mpv](https://mpv.io) via [MPVKit](https://github.com/mpvkit/MPVKit) and [libmpv-android](https://github.com/jarnedemeulemeester/libmpv-android)
|
||||
|
||||
@@ -7,6 +7,16 @@ analyzer:
|
||||
plugins:
|
||||
- dart_code_linter
|
||||
|
||||
linter:
|
||||
rules:
|
||||
unawaited_futures: true
|
||||
cancel_subscriptions: true
|
||||
close_sinks: true
|
||||
use_super_parameters: true
|
||||
prefer_final_locals: true
|
||||
prefer_final_in_for_each: true
|
||||
avoid_print: true
|
||||
|
||||
dart_code_linter:
|
||||
extends:
|
||||
- package:dart_code_linter/presets/recommended.yaml
|
||||
|
||||
@@ -1,191 +1,191 @@
|
||||
import java.util.Properties
|
||||
import java.io.FileInputStream
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
}
|
||||
|
||||
val mpvVersion = "v1.0.6"
|
||||
val mpvVersion = "v1.0.7"
|
||||
val mpvDir = layout.buildDirectory.dir("libmpv").get().asFile
|
||||
val mpvAar = "libmpv-release.aar"
|
||||
|
||||
val downloadLibmpv by tasks.registering {
|
||||
val stamp = File(mpvDir, ".version")
|
||||
outputs.upToDateWhen { stamp.exists() && stamp.readText().trim() == mpvVersion }
|
||||
doLast {
|
||||
mpvDir.mkdirs()
|
||||
val url = "https://github.com/edde746/libmpv-android/releases/download/$mpvVersion/$mpvAar"
|
||||
exec { commandLine("curl", "-sfL", url, "-o", File(mpvDir, mpvAar).absolutePath) }
|
||||
stamp.writeText(mpvVersion)
|
||||
}
|
||||
val stamp = File(mpvDir, ".version")
|
||||
outputs.upToDateWhen { stamp.exists() && stamp.readText().trim() == mpvVersion }
|
||||
doLast {
|
||||
mpvDir.mkdirs()
|
||||
val url = "https://github.com/edde746/libmpv-android/releases/download/$mpvVersion/$mpvAar"
|
||||
exec { commandLine("curl", "-sfL", url, "-o", File(mpvDir, mpvAar).absolutePath) }
|
||||
stamp.writeText(mpvVersion)
|
||||
}
|
||||
}
|
||||
|
||||
val assVersion = "safety-2"
|
||||
val assVersion = "fp-3"
|
||||
val assDir = layout.buildDirectory.dir("libass").get().asFile
|
||||
val assAars = listOf("lib_ass-release.aar", "lib_ass_kt-release.aar", "lib_ass_media-release.aar")
|
||||
|
||||
val downloadLibass by tasks.registering {
|
||||
val stamp = File(assDir, ".version")
|
||||
outputs.upToDateWhen { stamp.exists() && stamp.readText().trim() == assVersion }
|
||||
doLast {
|
||||
assDir.mkdirs()
|
||||
val baseUrl = "https://github.com/edde746/libass-android/releases/download/$assVersion"
|
||||
assAars.forEach { name ->
|
||||
val dest = File(assDir, name)
|
||||
exec { commandLine("curl", "-sfL", "$baseUrl/$name", "-o", dest.absolutePath) }
|
||||
}
|
||||
stamp.writeText(assVersion)
|
||||
val stamp = File(assDir, ".version")
|
||||
outputs.upToDateWhen { stamp.exists() && stamp.readText().trim() == assVersion }
|
||||
doLast {
|
||||
assDir.mkdirs()
|
||||
val baseUrl = "https://github.com/edde746/libass-android/releases/download/$assVersion"
|
||||
assAars.forEach { name ->
|
||||
val dest = File(assDir, name)
|
||||
exec { commandLine("curl", "-sfL", "$baseUrl/$name", "-o", dest.absolutePath) }
|
||||
}
|
||||
stamp.writeText(assVersion)
|
||||
}
|
||||
}
|
||||
|
||||
val doviVersion = "2.3.1"
|
||||
val doviDir = layout.buildDirectory.dir("libdovi").get().asFile
|
||||
val doviAbis = mapOf(
|
||||
"arm64-v8a" to "aarch64-linux-android",
|
||||
"armeabi-v7a" to "armv7-linux-androideabi",
|
||||
"x86" to "i686-linux-android",
|
||||
"x86_64" to "x86_64-linux-android",
|
||||
"arm64-v8a" to "aarch64-linux-android",
|
||||
"armeabi-v7a" to "armv7-linux-androideabi",
|
||||
"x86" to "i686-linux-android",
|
||||
"x86_64" to "x86_64-linux-android"
|
||||
)
|
||||
|
||||
val downloadLibdovi by tasks.registering {
|
||||
val stamp = File(doviDir, ".version")
|
||||
outputs.upToDateWhen { stamp.exists() && stamp.readText().trim() == doviVersion }
|
||||
doLast {
|
||||
doviDir.mkdirs()
|
||||
val baseUrl = "https://github.com/edde746/libdovi-builds/releases/download/v$doviVersion"
|
||||
doviAbis.forEach { (abi, triple) ->
|
||||
val archive = File(doviDir, "$triple.tar.gz")
|
||||
exec { commandLine("curl", "-sfL", "$baseUrl/libdovi-$triple.tar.gz", "-o", archive.absolutePath) }
|
||||
val outDir = File(doviDir, "$abi/lib")
|
||||
outDir.mkdirs()
|
||||
exec { commandLine("tar", "-xzf", archive.absolutePath, "-C", outDir.absolutePath) }
|
||||
archive.delete()
|
||||
}
|
||||
stamp.writeText(doviVersion)
|
||||
val stamp = File(doviDir, ".version")
|
||||
outputs.upToDateWhen { stamp.exists() && stamp.readText().trim() == doviVersion }
|
||||
doLast {
|
||||
doviDir.mkdirs()
|
||||
val baseUrl = "https://github.com/edde746/libdovi-builds/releases/download/v$doviVersion"
|
||||
doviAbis.forEach { (abi, triple) ->
|
||||
val archive = File(doviDir, "$triple.tar.gz")
|
||||
exec { commandLine("curl", "-sfL", "$baseUrl/libdovi-$triple.tar.gz", "-o", archive.absolutePath) }
|
||||
val outDir = File(doviDir, "$abi/lib")
|
||||
outDir.mkdirs()
|
||||
exec { commandLine("tar", "-xzf", archive.absolutePath, "-C", outDir.absolutePath) }
|
||||
archive.delete()
|
||||
}
|
||||
stamp.writeText(doviVersion)
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.edde746.plezy"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
namespace = "com.edde746.plezy"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.edde746.plezy"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||
minSdk = 25 // Fire OS 6.x (API 25); overrides libmpv-android's minSdk=26
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments += listOf(
|
||||
"-DDOVI_ENABLE_LIBDOVI=ON",
|
||||
"-DDOVI_LIBDOVI_PREBUILT_ROOT=${doviDir.absolutePath}"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (System.getenv("AMAZON") != null) {
|
||||
versionCode = (flutter.versionCode ?: 0) + 3000
|
||||
ndk {
|
||||
abiFilters += listOf("armeabi-v7a", "arm64-v8a")
|
||||
}
|
||||
}
|
||||
}
|
||||
defaultConfig {
|
||||
applicationId = "com.edde746.plezy"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||
minSdk = 25 // Fire OS 6.x (API 25); overrides libmpv-android's minSdk=26
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path = file("src/main/cpp/CMakeLists.txt")
|
||||
}
|
||||
cmake {
|
||||
arguments += listOf(
|
||||
"-DDOVI_ENABLE_LIBDOVI=ON",
|
||||
"-DDOVI_LIBDOVI_PREBUILT_ROOT=${doviDir.absolutePath}"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
val keystorePropertiesFile = rootProject.file("key.properties")
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
val keystoreProperties = Properties()
|
||||
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
||||
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["keyPassword"] as String
|
||||
storeFile = file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["storePassword"] as String
|
||||
}
|
||||
}
|
||||
if (System.getenv("AMAZON") != null) {
|
||||
versionCode = (flutter.versionCode ?: 0) + 3000
|
||||
ndk {
|
||||
abiFilters += listOf("armeabi-v7a", "arm64-v8a")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// Only use release signing if key.properties exists (not in CI/CD)
|
||||
val keystorePropertiesFile = rootProject.file("key.properties")
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
// If key.properties doesn't exist, it will use debug signing for CI builds
|
||||
ndk {
|
||||
debugSymbolLevel = "FULL"
|
||||
}
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path = file("src/main/cpp/CMakeLists.txt")
|
||||
}
|
||||
}
|
||||
|
||||
packaging {
|
||||
jniLibs {
|
||||
// Resolve conflict between libass-android and libmpv native libraries
|
||||
pickFirsts.add("lib/*/libc++_shared.so")
|
||||
}
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
val keystorePropertiesFile = rootProject.file("key.properties")
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
val keystoreProperties = Properties()
|
||||
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
||||
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["keyPassword"] as String
|
||||
storeFile = file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["storePassword"] as String
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// Only use release signing if key.properties exists (not in CI/CD)
|
||||
val keystorePropertiesFile = rootProject.file("key.properties")
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
// If key.properties doesn't exist, it will use debug signing for CI builds
|
||||
ndk {
|
||||
debugSymbolLevel = "FULL"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
packaging {
|
||||
jniLibs {
|
||||
// Resolve conflict between libass-android and libmpv native libraries
|
||||
pickFirsts.add("lib/*/libc++_shared.so")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
source = "../.."
|
||||
}
|
||||
|
||||
// Download libdovi before any CMake/native build task
|
||||
tasks.matching { it.name.contains("CMake") || it.name.contains("externalNative") }.configureEach {
|
||||
dependsOn(downloadLibdovi)
|
||||
dependsOn(downloadLibdovi)
|
||||
}
|
||||
|
||||
// Download libmpv and libass AARs before compilation
|
||||
tasks.matching { it.name.startsWith("pre") && it.name.endsWith("Build") }.configureEach {
|
||||
dependsOn(downloadLibmpv)
|
||||
dependsOn(downloadLibass)
|
||||
dependsOn(downloadLibmpv)
|
||||
dependsOn(downloadLibass)
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
implementation(files(File(mpvDir, mpvAar)))
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
|
||||
implementation(files(File(mpvDir, mpvAar)))
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
|
||||
|
||||
// Android TV Watch Next integration
|
||||
implementation("androidx.tvprovider:tvprovider:1.0.0")
|
||||
// Android TV Watch Next integration
|
||||
implementation("androidx.tvprovider:tvprovider:1.0.0")
|
||||
|
||||
// Media3 ExoPlayer for Android
|
||||
implementation("androidx.media3:media3-exoplayer:1.9.2")
|
||||
implementation("androidx.media3:media3-ui:1.9.2")
|
||||
implementation("androidx.media3:media3-common:1.9.2")
|
||||
// Media3 ExoPlayer for Android
|
||||
implementation("androidx.media3:media3-exoplayer:1.9.2")
|
||||
implementation("androidx.media3:media3-exoplayer-hls:1.9.2")
|
||||
implementation("androidx.media3:media3-ui:1.9.2")
|
||||
implementation("androidx.media3:media3-common:1.9.2")
|
||||
|
||||
// Cronet for HTTP/2 multiplexing + better connection management
|
||||
implementation("androidx.media3:media3-datasource-cronet:1.9.2")
|
||||
implementation("org.chromium.net:cronet-embedded:143.7445.0")
|
||||
// Cronet for HTTP/2 multiplexing + better connection management
|
||||
implementation("androidx.media3:media3-datasource-cronet:1.9.2")
|
||||
implementation("org.chromium.net:cronet-embedded:143.7445.0")
|
||||
|
||||
// FFmpeg audio decoder for unsupported codecs (ALAC, DTS, TrueHD, etc.)
|
||||
implementation("org.jellyfin.media3:media3-ffmpeg-decoder:1.9.0+1")
|
||||
// FFmpeg audio decoder for unsupported codecs (ALAC, DTS, TrueHD, etc.)
|
||||
implementation("org.jellyfin.media3:media3-ffmpeg-decoder:1.9.0+1")
|
||||
|
||||
// libass-android for ASS/SSA subtitle rendering
|
||||
assAars.forEach { implementation(files(File(assDir, it))) }
|
||||
// libass-android for ASS/SSA subtitle rendering
|
||||
assAars.forEach { implementation(files(File(assDir, it))) }
|
||||
}
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
<!-- Internet access permissions -->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<!-- Camera permission for QR code scanning (companion remote pairing) -->
|
||||
<uses-permission android:name="android.permission.CAMERA"/>
|
||||
|
||||
<!-- PIP and media session foreground service permissions -->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"/>
|
||||
<uses-permission android:name="android.permission.REORDER_TASKS"/>
|
||||
|
||||
<!-- Background download notifications and foreground service -->
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
@@ -23,6 +22,7 @@
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove" />
|
||||
|
||||
|
||||
<!-- Android TV support (not required, but allow detection) -->
|
||||
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||
<!-- Android TV Watch Next integration -->
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#include <jni.h>
|
||||
#include <android/log.h>
|
||||
#include <jni.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <new>
|
||||
#include <vector>
|
||||
|
||||
#define TAG "DoviBridge"
|
||||
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__)
|
||||
@@ -11,95 +14,133 @@
|
||||
#endif
|
||||
|
||||
static const char* BRIDGE_VERSION = "1.0.0";
|
||||
static constexpr jint CONVERT_FAILED = -1;
|
||||
static constexpr jint DESTINATION_TOO_SMALL = -2;
|
||||
static constexpr jint MAX_RPU_INPUT_SIZE = 8192;
|
||||
static constexpr size_t MAX_RPU_OUTPUT_SIZE = 16384;
|
||||
|
||||
extern "C" JNIEXPORT jbyteArray JNICALL
|
||||
Java_com_edde746_plezy_exoplayer_DoviBridge_nativeConvertDv7RpuToDv81(
|
||||
JNIEnv *env, jclass, jbyteArray payload, jint mode) {
|
||||
extern "C" JNIEXPORT jint JNICALL Java_com_edde746_plezy_exoplayer_DoviBridge_nativeConvertDv7RpuToDv81(
|
||||
JNIEnv* env, jclass, jbyteArray payload, jint payload_offset, jint payload_length, jbyteArray output,
|
||||
jint output_offset, jint output_capacity, jint mode) {
|
||||
#if !DOVI_REAL_LINKED
|
||||
return nullptr;
|
||||
return CONVERT_FAILED;
|
||||
#else
|
||||
if (payload == nullptr) return nullptr;
|
||||
if (payload == nullptr || output == nullptr) return CONVERT_FAILED;
|
||||
if (payload_offset < 0 || payload_length <= 0 || output_offset < 0 || output_capacity < 0) {
|
||||
return CONVERT_FAILED;
|
||||
}
|
||||
|
||||
jsize len = env->GetArrayLength(payload);
|
||||
if (len <= 0) return nullptr;
|
||||
const jsize payload_array_len = env->GetArrayLength(payload);
|
||||
const jsize output_array_len = env->GetArrayLength(output);
|
||||
if (payload_offset > payload_array_len || payload_length > payload_array_len - payload_offset) {
|
||||
return CONVERT_FAILED;
|
||||
}
|
||||
if (output_offset > output_array_len) return DESTINATION_TOO_SMALL;
|
||||
|
||||
jbyte *buf = env->GetByteArrayElements(payload, nullptr);
|
||||
if (buf == nullptr) return nullptr;
|
||||
const jsize logical_output_len = output_capacity < output_array_len ? output_capacity : output_array_len;
|
||||
if (output_offset > logical_output_len) return DESTINATION_TOO_SMALL;
|
||||
|
||||
// Try dovi_parse_unspec62_nalu first (handles escaped NALs), fallback to dovi_parse_rpu
|
||||
DoviRpuOpaque *rpu = dovi_parse_unspec62_nalu(
|
||||
reinterpret_cast<const uint8_t *>(buf), static_cast<size_t>(len));
|
||||
// Valid RPU NALs are typically <2 KiB; reject unreasonable sizes
|
||||
if (payload_length > MAX_RPU_INPUT_SIZE) {
|
||||
LOGW("RPU payload too large (%d bytes), skipping", payload_length);
|
||||
return CONVERT_FAILED;
|
||||
}
|
||||
|
||||
// Copy to native heap so libdovi never touches JVM heap memory.
|
||||
// Do not use GetPrimitiveArrayCritical here: it can block concurrent GC
|
||||
// compaction during sustained playback. A thread-local scratch buffer avoids
|
||||
// per-frame heap churn while keeping libdovi away from JVM heap memory.
|
||||
thread_local std::vector<uint8_t> scratch;
|
||||
try {
|
||||
scratch.resize(static_cast<size_t>(payload_length));
|
||||
} catch (...) {
|
||||
return CONVERT_FAILED;
|
||||
}
|
||||
|
||||
env->GetByteArrayRegion(payload, payload_offset, payload_length, reinterpret_cast<jbyte*>(scratch.data()));
|
||||
if (env->ExceptionCheck()) {
|
||||
return CONVERT_FAILED;
|
||||
}
|
||||
|
||||
// Try dovi_parse_unspec62_nalu first (handles escaped NALs), fallback to dovi_parse_rpu
|
||||
const auto rpu_len = static_cast<size_t>(payload_length);
|
||||
DoviRpuOpaque* rpu = dovi_parse_unspec62_nalu(scratch.data(), rpu_len);
|
||||
|
||||
if (rpu == nullptr) {
|
||||
return CONVERT_FAILED;
|
||||
}
|
||||
|
||||
const char* err = dovi_rpu_get_error(rpu);
|
||||
if (err != nullptr) {
|
||||
// Fallback: try dovi_parse_rpu (raw RPU without NAL framing)
|
||||
dovi_rpu_free(rpu);
|
||||
rpu = dovi_parse_rpu(scratch.data(), rpu_len);
|
||||
if (rpu == nullptr) {
|
||||
env->ReleaseByteArrayElements(payload, buf, JNI_ABORT);
|
||||
return nullptr;
|
||||
return CONVERT_FAILED;
|
||||
}
|
||||
|
||||
const char *err = dovi_rpu_get_error(rpu);
|
||||
err = dovi_rpu_get_error(rpu);
|
||||
if (err != nullptr) {
|
||||
// Fallback: try dovi_parse_rpu (raw RPU without NAL framing)
|
||||
dovi_rpu_free(rpu);
|
||||
rpu = dovi_parse_rpu(
|
||||
reinterpret_cast<const uint8_t *>(buf), static_cast<size_t>(len));
|
||||
if (rpu == nullptr) {
|
||||
env->ReleaseByteArrayElements(payload, buf, JNI_ABORT);
|
||||
return nullptr;
|
||||
}
|
||||
err = dovi_rpu_get_error(rpu);
|
||||
if (err != nullptr) {
|
||||
LOGW("RPU parse failed: %s", err);
|
||||
dovi_rpu_free(rpu);
|
||||
env->ReleaseByteArrayElements(payload, buf, JNI_ABORT);
|
||||
return nullptr;
|
||||
}
|
||||
LOGW("RPU parse failed: %s", err);
|
||||
dovi_rpu_free(rpu);
|
||||
return CONVERT_FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
env->ReleaseByteArrayElements(payload, buf, JNI_ABORT);
|
||||
// Convert to target profile (mode 2 = P8.1 with no-op curves)
|
||||
int32_t ret = dovi_convert_rpu_with_mode(rpu, static_cast<uint8_t>(mode));
|
||||
if (ret != 0) {
|
||||
err = dovi_rpu_get_error(rpu);
|
||||
LOGW("RPU conversion failed (mode %d): %s", mode, err ? err : "unknown");
|
||||
dovi_rpu_free(rpu);
|
||||
return CONVERT_FAILED;
|
||||
}
|
||||
|
||||
// Convert to target profile (mode 2 = P8.1 with no-op curves)
|
||||
int32_t ret = dovi_convert_rpu_with_mode(rpu, static_cast<uint8_t>(mode));
|
||||
if (ret != 0) {
|
||||
err = dovi_rpu_get_error(rpu);
|
||||
LOGW("RPU conversion failed (mode %d): %s", mode, err ? err : "unknown");
|
||||
dovi_rpu_free(rpu);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Write back as UNSPEC62 NAL
|
||||
const DoviData *out = dovi_write_unspec62_nalu(rpu);
|
||||
if (out == nullptr || out->data == nullptr || out->len == 0) {
|
||||
err = dovi_rpu_get_error(rpu);
|
||||
LOGW("RPU write failed: %s", err ? err : "unknown");
|
||||
if (out != nullptr) dovi_data_free(out);
|
||||
dovi_rpu_free(rpu);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
jbyteArray result = env->NewByteArray(static_cast<jsize>(out->len));
|
||||
if (result != nullptr) {
|
||||
env->SetByteArrayRegion(result, 0, static_cast<jsize>(out->len),
|
||||
reinterpret_cast<const jbyte *>(out->data));
|
||||
}
|
||||
// Write back as UNSPEC62 NAL
|
||||
const DoviData* out = dovi_write_unspec62_nalu(rpu);
|
||||
if (out == nullptr || out->data == nullptr || out->len == 0) {
|
||||
err = dovi_rpu_get_error(rpu);
|
||||
LOGW("RPU write failed: %s", err ? err : "unknown");
|
||||
if (out != nullptr) dovi_data_free(out);
|
||||
dovi_rpu_free(rpu);
|
||||
return CONVERT_FAILED;
|
||||
}
|
||||
|
||||
if (out->len > MAX_RPU_OUTPUT_SIZE) {
|
||||
LOGW("RPU output unexpectedly large (%zu bytes), discarding", out->len);
|
||||
dovi_data_free(out);
|
||||
dovi_rpu_free(rpu);
|
||||
return CONVERT_FAILED;
|
||||
}
|
||||
|
||||
return result;
|
||||
const auto writable = static_cast<size_t>(logical_output_len - output_offset);
|
||||
if (out->len > writable) {
|
||||
dovi_data_free(out);
|
||||
dovi_rpu_free(rpu);
|
||||
return DESTINATION_TOO_SMALL;
|
||||
}
|
||||
|
||||
env->SetByteArrayRegion(
|
||||
output, output_offset, static_cast<jsize>(out->len), reinterpret_cast<const jbyte*>(out->data));
|
||||
const bool write_failed = env->ExceptionCheck();
|
||||
const auto written = static_cast<jint>(out->len);
|
||||
|
||||
dovi_data_free(out);
|
||||
dovi_rpu_free(rpu);
|
||||
|
||||
return write_failed ? CONVERT_FAILED : written;
|
||||
#endif
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jboolean JNICALL
|
||||
Java_com_edde746_plezy_exoplayer_DoviBridge_nativeIsConversionPathReady(
|
||||
JNIEnv *, jclass) {
|
||||
Java_com_edde746_plezy_exoplayer_DoviBridge_nativeIsConversionPathReady(JNIEnv*, jclass) {
|
||||
#if DOVI_REAL_LINKED
|
||||
return JNI_TRUE;
|
||||
return JNI_TRUE;
|
||||
#else
|
||||
return JNI_FALSE;
|
||||
return JNI_FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jstring JNICALL
|
||||
Java_com_edde746_plezy_exoplayer_DoviBridge_nativeGetBridgeVersion(
|
||||
JNIEnv *env, jclass) {
|
||||
return env->NewStringUTF(BRIDGE_VERSION);
|
||||
Java_com_edde746_plezy_exoplayer_DoviBridge_nativeGetBridgeVersion(JNIEnv* env, jclass) {
|
||||
return env->NewStringUTF(BRIDGE_VERSION);
|
||||
}
|
||||
|
||||
@@ -1,380 +1,460 @@
|
||||
package com.edde746.plezy
|
||||
|
||||
import android.content.Intent
|
||||
import android.graphics.SurfaceTexture
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.app.ActivityManager
|
||||
import android.app.AppOpsManager
|
||||
import android.app.PictureInPictureParams
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.content.res.Configuration
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.util.Rational
|
||||
import android.view.KeyEvent
|
||||
import android.view.TextureView
|
||||
import android.view.ViewGroup
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.FrameLayout
|
||||
import androidx.core.content.FileProvider
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.engine.FlutterShellArgs
|
||||
import io.flutter.embedding.android.FlutterTextureView
|
||||
import io.flutter.embedding.android.RenderMode
|
||||
import io.flutter.embedding.android.TransparencyMode
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import com.edde746.plezy.exoplayer.ExoPlayerPlugin
|
||||
import com.edde746.plezy.mpv.MpvPlayerPlugin
|
||||
import com.edde746.plezy.shared.ThemeHelper
|
||||
import com.edde746.plezy.watchnext.WatchNextPlugin
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.android.RenderMode
|
||||
import io.flutter.embedding.android.TransparencyMode
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.embedding.engine.FlutterShellArgs
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import java.io.File
|
||||
|
||||
class MainActivity : FlutterActivity() {
|
||||
|
||||
companion object {
|
||||
var usingSkia = false
|
||||
companion object {
|
||||
private const val TAG = "MainActivity"
|
||||
var usingSkia = false
|
||||
}
|
||||
|
||||
private val PIP_CHANNEL = "com.plezy/pip"
|
||||
private val EXTERNAL_PLAYER_CHANNEL = "com.plezy/external_player"
|
||||
private val THEME_CHANNEL = "com.plezy/theme"
|
||||
private val DEVICE_CHANNEL = "com.plezy/device"
|
||||
private val APP_EXIT_CHANNEL = "com.plezy/app_exit"
|
||||
private val APP_FOREGROUND_CHANNEL = "com.plezy/app_foreground"
|
||||
private var watchNextPlugin: WatchNextPlugin? = null
|
||||
|
||||
// Auto PiP state
|
||||
private var autoPipReady = false
|
||||
private var autoPipWidth: Int = 16
|
||||
private var autoPipHeight: Int = 9
|
||||
|
||||
private fun isAndroidTvDevice(): Boolean = getAndroidTvDetection()["isTv"] as Boolean
|
||||
|
||||
private fun getAndroidTvDetection(): Map<String, Any> {
|
||||
val pm = packageManager
|
||||
val uiModeType = resources.configuration.uiMode and Configuration.UI_MODE_TYPE_MASK
|
||||
val isTelevisionUiMode = uiModeType == Configuration.UI_MODE_TYPE_TELEVISION
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
val hasTelevisionFeature = pm.hasSystemFeature(PackageManager.FEATURE_TELEVISION)
|
||||
val hasLeanback = pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK)
|
||||
val hasFireTvFeature = pm.hasSystemFeature("amazon.hardware.fire_tv")
|
||||
val hasTouchscreen = pm.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN)
|
||||
val hasFakeTouch = pm.hasSystemFeature(PackageManager.FEATURE_FAKETOUCH)
|
||||
|
||||
val reasons = mutableListOf<String>()
|
||||
if (isTelevisionUiMode) reasons.add("ui_mode_television")
|
||||
if (hasTelevisionFeature) reasons.add("television_feature")
|
||||
if (hasLeanback) reasons.add("leanback")
|
||||
if (hasFireTvFeature) reasons.add("fire_tv")
|
||||
if (!hasTouchscreen) reasons.add("no_touchscreen")
|
||||
|
||||
return mapOf(
|
||||
"isTv" to reasons.isNotEmpty(),
|
||||
"reasons" to reasons,
|
||||
"isTelevisionUiMode" to isTelevisionUiMode,
|
||||
"hasTelevisionFeature" to hasTelevisionFeature,
|
||||
"hasLeanback" to hasLeanback,
|
||||
"hasFireTvFeature" to hasFireTvFeature,
|
||||
"hasTouchscreen" to hasTouchscreen,
|
||||
"hasFakeTouch" to hasFakeTouch,
|
||||
"manufacturer" to Build.MANUFACTURER,
|
||||
"model" to Build.MODEL
|
||||
)
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
// Apply persisted theme color to the window background before anything
|
||||
// else renders. This prevents a white flash between the native splash
|
||||
// screen and Flutter's first frame for non-default themes (e.g. OLED).
|
||||
val prefs = getSharedPreferences("plezy_prefs", Context.MODE_PRIVATE)
|
||||
val savedTheme = prefs.getString("splash_theme", null)
|
||||
ThemeHelper.themeColor(savedTheme)?.let { window.decorView.setBackgroundColor(it) }
|
||||
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
// Disable the Android splash screen fade-out animation to avoid
|
||||
// a flicker before Flutter draws its first frame.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
splashScreen.setOnExitAnimationListener { splashScreenView -> splashScreenView.remove() }
|
||||
}
|
||||
|
||||
private val PIP_CHANNEL = "com.plezy/pip"
|
||||
private val EXTERNAL_PLAYER_CHANNEL = "com.plezy/external_player"
|
||||
private val THEME_CHANNEL = "com.plezy/theme"
|
||||
private var watchNextPlugin: WatchNextPlugin? = null
|
||||
// Disable Android's default focus highlight ring that appears when using
|
||||
// D-pad navigation so the Flutter UI can render its own focus state.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
window.decorView.defaultFocusHighlightEnabled = false
|
||||
}
|
||||
|
||||
// Auto PiP state
|
||||
private var autoPipReady = false
|
||||
private var autoPipWidth: Int = 16
|
||||
private var autoPipHeight: Int = 9
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
// Apply persisted theme color to the window background before anything
|
||||
// else renders. This prevents a white flash between the native splash
|
||||
// screen and Flutter's first frame for non-default themes (e.g. OLED).
|
||||
val prefs = getSharedPreferences("plezy_prefs", Context.MODE_PRIVATE)
|
||||
val savedTheme = prefs.getString("splash_theme", null)
|
||||
ThemeHelper.themeColor(savedTheme)?.let { window.decorView.setBackgroundColor(it) }
|
||||
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
// Disable the Android splash screen fade-out animation to avoid
|
||||
// a flicker before Flutter draws its first frame.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
splashScreen.setOnExitAnimationListener { splashScreenView -> splashScreenView.remove() }
|
||||
}
|
||||
|
||||
// Disable Android's default focus highlight ring that appears when using
|
||||
// D-pad navigation so the Flutter UI can render its own focus state.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
window.decorView.defaultFocusHighlightEnabled = false
|
||||
}
|
||||
|
||||
// Wrap the content view in a layout that intercepts DPAD key events
|
||||
// before the IME input stage, which can consume DPAD direction events
|
||||
// from virtual remotes before they reach Flutter's key handler.
|
||||
val content = findViewById<ViewGroup>(android.R.id.content)
|
||||
val wrapper = object : FrameLayout(this) {
|
||||
override fun dispatchKeyEventPreIme(event: KeyEvent): Boolean {
|
||||
when (event.keyCode) {
|
||||
KeyEvent.KEYCODE_DPAD_UP,
|
||||
KeyEvent.KEYCODE_DPAD_DOWN,
|
||||
KeyEvent.KEYCODE_DPAD_LEFT,
|
||||
KeyEvent.KEYCODE_DPAD_RIGHT,
|
||||
KeyEvent.KEYCODE_DPAD_CENTER -> {
|
||||
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
if (!imm.isAcceptingText) {
|
||||
super.dispatchKeyEvent(event)
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.dispatchKeyEventPreIme(event)
|
||||
// Wrap the content view in a layout that intercepts DPAD key events
|
||||
// before the IME input stage, which can consume DPAD direction events
|
||||
// from virtual remotes before they reach Flutter's key handler.
|
||||
val content = findViewById<ViewGroup>(android.R.id.content)
|
||||
val wrapper = object : FrameLayout(this) {
|
||||
override fun dispatchKeyEventPreIme(event: KeyEvent): Boolean {
|
||||
when (event.keyCode) {
|
||||
KeyEvent.KEYCODE_DPAD_UP,
|
||||
KeyEvent.KEYCODE_DPAD_DOWN,
|
||||
KeyEvent.KEYCODE_DPAD_LEFT,
|
||||
KeyEvent.KEYCODE_DPAD_RIGHT,
|
||||
KeyEvent.KEYCODE_DPAD_CENTER -> {
|
||||
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
if (!imm.isAcceptingText) {
|
||||
super.dispatchKeyEvent(event)
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
while (content.childCount > 0) {
|
||||
val child = content.getChildAt(0)
|
||||
content.removeViewAt(0)
|
||||
wrapper.addView(child)
|
||||
return super.dispatchKeyEventPreIme(event)
|
||||
}
|
||||
}
|
||||
while (content.childCount > 0) {
|
||||
val child = content.getChildAt(0)
|
||||
content.removeViewAt(0)
|
||||
wrapper.addView(child)
|
||||
}
|
||||
content.addView(
|
||||
wrapper,
|
||||
ViewGroup.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT
|
||||
)
|
||||
)
|
||||
|
||||
// Handle Watch Next deep link from initial launch
|
||||
handleWatchNextIntent(intent)
|
||||
}
|
||||
|
||||
override fun onNewIntent(intent: Intent) {
|
||||
super.onNewIntent(intent)
|
||||
// Handle Watch Next deep link when app is already running
|
||||
handleWatchNextIntent(intent)
|
||||
}
|
||||
|
||||
private fun handleWatchNextIntent(intent: Intent?) {
|
||||
val contentId = WatchNextPlugin.handleIntent(intent)
|
||||
if (contentId != null) {
|
||||
// Notify the plugin to send event to Flutter
|
||||
watchNextPlugin?.notifyDeepLink(contentId)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getFlutterShellArgs(): FlutterShellArgs {
|
||||
val args = super.getFlutterShellArgs()
|
||||
usingSkia = shouldDisableImpeller()
|
||||
if (usingSkia) args.add("--enable-impeller=false")
|
||||
return args
|
||||
}
|
||||
|
||||
private fun shouldDisableImpeller(): Boolean {
|
||||
// Android TV devices — weaker GPUs, less Impeller testing
|
||||
if (isAndroidTvDevice()) return true
|
||||
// Google Tensor SoC (Mali GPU) — Pixel 6+
|
||||
// SOC_MODEL may return marketing name ("Tensor G2") or internal ID ("GS201")
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
val soc = Build.SOC_MODEL
|
||||
if (soc.startsWith("Tensor", ignoreCase = true) ||
|
||||
soc.startsWith("GS", ignoreCase = true)
|
||||
) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
// NVIDIA Tegra (Shield TV)
|
||||
if (Build.MANUFACTURER.equals("NVIDIA", ignoreCase = true)) return true
|
||||
// Huawei/HONOR Kirin SoCs use Mali GPUs
|
||||
if (Build.MANUFACTURER.equals("Huawei", ignoreCase = true) ||
|
||||
Build.MANUFACTURER.equals("HONOR", ignoreCase = true)
|
||||
) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
override fun getRenderMode(): RenderMode = RenderMode.surface
|
||||
|
||||
override fun getTransparencyMode(): TransparencyMode {
|
||||
// Keep Flutter transparent so video/subtitles are visible below.
|
||||
return TransparencyMode.transparent
|
||||
}
|
||||
|
||||
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
||||
super.configureFlutterEngine(flutterEngine)
|
||||
flutterEngine.plugins.add(MpvPlayerPlugin())
|
||||
flutterEngine.plugins.add(ExoPlayerPlugin())
|
||||
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, DEVICE_CHANNEL).setMethodCallHandler { call, result ->
|
||||
when (call.method) {
|
||||
"getTvDetection" -> result.success(getAndroidTvDetection())
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, APP_EXIT_CHANNEL).setMethodCallHandler { call, result ->
|
||||
when (call.method) {
|
||||
"requestExit" -> {
|
||||
result.success(true)
|
||||
window.decorView.post {
|
||||
finishAndRemoveTask()
|
||||
}
|
||||
}
|
||||
content.addView(wrapper, ViewGroup.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT))
|
||||
|
||||
// Handle Watch Next deep link from initial launch
|
||||
handleWatchNextIntent(intent)
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onNewIntent(intent: Intent) {
|
||||
super.onNewIntent(intent)
|
||||
// Handle Watch Next deep link when app is already running
|
||||
handleWatchNextIntent(intent)
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, APP_FOREGROUND_CHANNEL).setMethodCallHandler { call, result ->
|
||||
when (call.method) {
|
||||
"requestForeground" -> result.success(requestForeground())
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleWatchNextIntent(intent: Intent?) {
|
||||
val contentId = WatchNextPlugin.handleIntent(intent)
|
||||
if (contentId != null) {
|
||||
// Notify the plugin to send event to Flutter
|
||||
watchNextPlugin?.notifyDeepLink(contentId)
|
||||
}
|
||||
}
|
||||
// External player: open local video files with proper content:// URIs
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, EXTERNAL_PLAYER_CHANNEL).setMethodCallHandler { call, result ->
|
||||
when (call.method) {
|
||||
"openVideo" -> {
|
||||
val filePath = call.argument<String>("filePath")
|
||||
val packageName = call.argument<String>("package")
|
||||
|
||||
override fun getFlutterShellArgs(): FlutterShellArgs {
|
||||
val args = super.getFlutterShellArgs()
|
||||
usingSkia = shouldDisableImpeller()
|
||||
if (usingSkia) args.add("--enable-impeller=false")
|
||||
return args
|
||||
}
|
||||
if (filePath == null) {
|
||||
result.error("INVALID_ARGUMENT", "filePath is required", null)
|
||||
return@setMethodCallHandler
|
||||
}
|
||||
|
||||
private fun shouldDisableImpeller(): Boolean {
|
||||
// Android TV devices — weaker GPUs, less Impeller testing
|
||||
if (packageManager.hasSystemFeature("android.software.leanback")) return true
|
||||
// Google Tensor SoC (Mali GPU) — Pixel 6+
|
||||
// SOC_MODEL may return marketing name ("Tensor G2") or internal ID ("GS201")
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
val soc = Build.SOC_MODEL
|
||||
if (soc.startsWith("Tensor", ignoreCase = true) ||
|
||||
soc.startsWith("GS", ignoreCase = true)) return true
|
||||
}
|
||||
// NVIDIA Tegra (Shield TV)
|
||||
if (Build.MANUFACTURER.equals("NVIDIA", ignoreCase = true)) return true
|
||||
return false
|
||||
}
|
||||
try {
|
||||
val uri: Uri
|
||||
val grantRead: Boolean
|
||||
|
||||
override fun getRenderMode(): RenderMode {
|
||||
// Use TextureView so Flutter doesn't occupy a SurfaceView layer.
|
||||
// This allows the libass subtitle SurfaceView to sit between video and Flutter UI.
|
||||
return RenderMode.texture
|
||||
}
|
||||
|
||||
override fun getTransparencyMode(): TransparencyMode {
|
||||
// Keep Flutter transparent so video/subtitles are visible below.
|
||||
return TransparencyMode.transparent
|
||||
}
|
||||
|
||||
override fun onFlutterTextureViewCreated(flutterTextureView: FlutterTextureView) {
|
||||
val original = flutterTextureView.surfaceTextureListener ?: return
|
||||
val handler = Handler(Looper.getMainLooper())
|
||||
var pendingResize: Runnable? = null
|
||||
var lastWidth = 0
|
||||
var lastHeight = 0
|
||||
|
||||
flutterTextureView.surfaceTextureListener = object : TextureView.SurfaceTextureListener {
|
||||
override fun onSurfaceTextureAvailable(surface: SurfaceTexture, w: Int, h: Int) {
|
||||
original.onSurfaceTextureAvailable(surface, w, h)
|
||||
if (filePath.startsWith("http://") || filePath.startsWith("https://")) {
|
||||
uri = Uri.parse(filePath)
|
||||
grantRead = false
|
||||
} else if (filePath.startsWith("content://")) {
|
||||
uri = Uri.parse(filePath)
|
||||
grantRead = true
|
||||
} else {
|
||||
val path = if (filePath.startsWith("file://")) filePath.removePrefix("file://") else filePath
|
||||
uri = FileProvider.getUriForFile(this, "com.edde746.plezy.fileprovider", File(path))
|
||||
grantRead = true
|
||||
}
|
||||
override fun onSurfaceTextureSizeChanged(surface: SurfaceTexture, w: Int, h: Int) {
|
||||
if (w == lastWidth && h == lastHeight) return
|
||||
lastWidth = w; lastHeight = h
|
||||
pendingResize?.let { handler.removeCallbacks(it) }
|
||||
pendingResize = Runnable {
|
||||
if (flutterTextureView.isAvailable) {
|
||||
original.onSurfaceTextureSizeChanged(surface, w, h)
|
||||
}
|
||||
}
|
||||
handler.postDelayed(pendingResize!!, 100)
|
||||
}
|
||||
override fun onSurfaceTextureUpdated(surface: SurfaceTexture) {
|
||||
original.onSurfaceTextureUpdated(surface)
|
||||
}
|
||||
override fun onSurfaceTextureDestroyed(surface: SurfaceTexture): Boolean {
|
||||
pendingResize?.let { handler.removeCallbacks(it) }
|
||||
pendingResize = null
|
||||
lastWidth = 0; lastHeight = 0
|
||||
return original.onSurfaceTextureDestroyed(surface)
|
||||
|
||||
val intent = Intent(Intent.ACTION_VIEW).apply {
|
||||
setDataAndType(uri, "video/*")
|
||||
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
if (grantRead) {
|
||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
}
|
||||
if (packageName != null) {
|
||||
setPackage(packageName)
|
||||
}
|
||||
}
|
||||
startActivity(intent)
|
||||
result.success(true)
|
||||
} catch (e: android.content.ActivityNotFoundException) {
|
||||
result.error("APP_NOT_FOUND", "No app found for package: $packageName", null)
|
||||
} catch (e: Exception) {
|
||||
result.error("LAUNCH_FAILED", e.message ?: e.javaClass.simpleName, null)
|
||||
}
|
||||
}
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
||||
super.configureFlutterEngine(flutterEngine)
|
||||
flutterEngine.plugins.add(MpvPlayerPlugin())
|
||||
flutterEngine.plugins.add(ExoPlayerPlugin())
|
||||
// Splash screen theme: persist user's chosen theme for next launch (API 31+)
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, THEME_CHANNEL).setMethodCallHandler { call, result ->
|
||||
when (call.method) {
|
||||
"getRenderer" -> result.success(if (usingSkia) "Skia" else "Impeller")
|
||||
"setSplashTheme" -> {
|
||||
val mode = call.argument<String>("mode")
|
||||
|
||||
// External player: open local video files with proper content:// URIs
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, EXTERNAL_PLAYER_CHANNEL).setMethodCallHandler { call, result ->
|
||||
when (call.method) {
|
||||
"openVideo" -> {
|
||||
val filePath = call.argument<String>("filePath")
|
||||
val packageName = call.argument<String>("package")
|
||||
// Persist for next cold start & update window background now
|
||||
getSharedPreferences("plezy_prefs", Context.MODE_PRIVATE)
|
||||
.edit().putString("splash_theme", mode).apply()
|
||||
ThemeHelper.themeColor(mode)?.let { window.decorView.setBackgroundColor(it) }
|
||||
|
||||
if (filePath == null) {
|
||||
result.error("INVALID_ARGUMENT", "filePath is required", null)
|
||||
return@setMethodCallHandler
|
||||
}
|
||||
|
||||
try {
|
||||
val uri: Uri
|
||||
val grantRead: Boolean
|
||||
|
||||
if (filePath.startsWith("http://") || filePath.startsWith("https://")) {
|
||||
uri = Uri.parse(filePath)
|
||||
grantRead = false
|
||||
} else if (filePath.startsWith("content://")) {
|
||||
uri = Uri.parse(filePath)
|
||||
grantRead = true
|
||||
} else {
|
||||
val path = if (filePath.startsWith("file://")) filePath.removePrefix("file://") else filePath
|
||||
uri = FileProvider.getUriForFile(this, "com.edde746.plezy.fileprovider", File(path))
|
||||
grantRead = true
|
||||
}
|
||||
|
||||
val intent = Intent(Intent.ACTION_VIEW).apply {
|
||||
setDataAndType(uri, "video/*")
|
||||
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
if (grantRead) {
|
||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
}
|
||||
if (packageName != null) {
|
||||
setPackage(packageName)
|
||||
}
|
||||
}
|
||||
startActivity(intent)
|
||||
result.success(true)
|
||||
} catch (e: android.content.ActivityNotFoundException) {
|
||||
result.error("APP_NOT_FOUND", "No app found for package: $packageName", null)
|
||||
} catch (e: Exception) {
|
||||
result.error("LAUNCH_FAILED", e.message ?: e.javaClass.simpleName, null)
|
||||
}
|
||||
}
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
// Splash screen theme: persist user's chosen theme for next launch (API 31+)
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, THEME_CHANNEL).setMethodCallHandler { call, result ->
|
||||
when (call.method) {
|
||||
"getRenderer" -> result.success(if (usingSkia) "Skia" else "Impeller")
|
||||
"setSplashTheme" -> {
|
||||
val mode = call.argument<String>("mode")
|
||||
|
||||
// Persist for next cold start & update window background now
|
||||
getSharedPreferences("plezy_prefs", Context.MODE_PRIVATE)
|
||||
.edit().putString("splash_theme", mode).apply()
|
||||
ThemeHelper.themeColor(mode)?.let { window.decorView.setBackgroundColor(it) }
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
val themeId = when (mode) {
|
||||
"dark" -> R.style.SplashTheme_Dark
|
||||
"oled" -> R.style.SplashTheme_Oled
|
||||
"light" -> R.style.SplashTheme_Light
|
||||
"system" -> android.content.res.Resources.ID_NULL
|
||||
else -> android.content.res.Resources.ID_NULL
|
||||
}
|
||||
splashScreen.setSplashScreenTheme(themeId)
|
||||
}
|
||||
result.success(true)
|
||||
}
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
// Register Watch Next plugin and keep reference for deep link handling
|
||||
watchNextPlugin = WatchNextPlugin()
|
||||
flutterEngine.plugins.add(watchNextPlugin!!)
|
||||
|
||||
MethodChannel( flutterEngine.dartExecutor.binaryMessenger, PIP_CHANNEL ).setMethodCallHandler { call, result ->
|
||||
when (call.method) {
|
||||
"isSupported" -> {
|
||||
result.success(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
|
||||
}
|
||||
"enter" -> {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
result.success(mapOf("success" to false, "errorCode" to "android_version"))
|
||||
return@setMethodCallHandler
|
||||
}
|
||||
|
||||
if (!isPipPermissionGranted()) {
|
||||
result.success(mapOf("success" to false, "errorCode" to "permission_disabled"))
|
||||
return@setMethodCallHandler
|
||||
}
|
||||
|
||||
try {
|
||||
val width = call.argument<Int>("width") ?: 16
|
||||
val height = call.argument<Int>("height") ?: 9
|
||||
val clamped = clampAspectRatio(width, height)
|
||||
|
||||
val params = PictureInPictureParams.Builder()
|
||||
.setAspectRatio(Rational(clamped.first, clamped.second))
|
||||
.build()
|
||||
val success = enterPictureInPictureMode(params)
|
||||
if (success) {
|
||||
result.success(mapOf("success" to true))
|
||||
} else {
|
||||
result.success(mapOf("success" to false, "errorCode" to "failed"))
|
||||
}
|
||||
} catch (e: IllegalStateException) {
|
||||
result.success(mapOf("success" to false, "errorCode" to "not_supported"))
|
||||
} catch (e: Exception) {
|
||||
result.success(mapOf("success" to false, "errorCode" to "unknown", "errorMessage" to (e.message ?: "Unknown error")))
|
||||
}
|
||||
}
|
||||
"setAutoPipReady" -> {
|
||||
autoPipReady = call.argument<Boolean>("ready") ?: false
|
||||
autoPipWidth = call.argument<Int>("width") ?: 16
|
||||
autoPipHeight = call.argument<Int>("height") ?: 9
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
try {
|
||||
val clamped = clampAspectRatio(autoPipWidth, autoPipHeight)
|
||||
val params = PictureInPictureParams.Builder()
|
||||
.setAspectRatio(Rational(clamped.first, clamped.second))
|
||||
.setAutoEnterEnabled(autoPipReady)
|
||||
.build()
|
||||
setPictureInPictureParams(params)
|
||||
} catch (_: Exception) {}
|
||||
}
|
||||
result.success(true)
|
||||
}
|
||||
else -> result.notImplemented()
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
val themeId = when (mode) {
|
||||
"dark" -> R.style.SplashTheme_Dark
|
||||
"oled" -> R.style.SplashTheme_Oled
|
||||
"light" -> R.style.SplashTheme_Light
|
||||
"system" -> android.content.res.Resources.ID_NULL
|
||||
else -> android.content.res.Resources.ID_NULL
|
||||
}
|
||||
splashScreen.setSplashScreenTheme(themeId)
|
||||
}
|
||||
result.success(true)
|
||||
}
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean,newConfig: Configuration) {
|
||||
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig)
|
||||
flutterEngine?.let { engine ->
|
||||
MethodChannel(engine.dartExecutor.binaryMessenger, PIP_CHANNEL).invokeMethod("onPipChanged", isInPictureInPictureMode)
|
||||
engine.plugins.get(ExoPlayerPlugin::class.java)?.let { plugin ->
|
||||
(plugin as? ExoPlayerPlugin)?.onPipModeChanged(isInPictureInPictureMode)
|
||||
}
|
||||
}
|
||||
}
|
||||
// Register Watch Next plugin and keep reference for deep link handling
|
||||
watchNextPlugin = WatchNextPlugin()
|
||||
flutterEngine.plugins.add(watchNextPlugin!!)
|
||||
|
||||
override fun onUserLeaveHint() {
|
||||
super.onUserLeaveHint()
|
||||
// Auto PiP for API 26-30 (API 31+ uses setAutoEnterEnabled)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O &&
|
||||
Build.VERSION.SDK_INT < Build.VERSION_CODES.S &&
|
||||
autoPipReady && isPipPermissionGranted()) {
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, PIP_CHANNEL).setMethodCallHandler { call, result ->
|
||||
when (call.method) {
|
||||
"isSupported" -> {
|
||||
result.success(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !isAndroidTvDevice())
|
||||
}
|
||||
"enter" -> {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
result.success(mapOf("success" to false, "errorCode" to "android_version"))
|
||||
return@setMethodCallHandler
|
||||
}
|
||||
|
||||
if (isAndroidTvDevice()) {
|
||||
result.success(mapOf("success" to false, "errorCode" to "not_supported"))
|
||||
return@setMethodCallHandler
|
||||
}
|
||||
|
||||
if (!isPipPermissionGranted()) {
|
||||
result.success(mapOf("success" to false, "errorCode" to "permission_disabled"))
|
||||
return@setMethodCallHandler
|
||||
}
|
||||
|
||||
try {
|
||||
val width = call.argument<Int>("width") ?: 16
|
||||
val height = call.argument<Int>("height") ?: 9
|
||||
val params = buildPipParams(width, height)
|
||||
val success = enterPictureInPictureMode(params)
|
||||
if (success) {
|
||||
result.success(mapOf("success" to true))
|
||||
} else {
|
||||
result.success(mapOf("success" to false, "errorCode" to "failed"))
|
||||
}
|
||||
} catch (e: IllegalStateException) {
|
||||
result.success(mapOf("success" to false, "errorCode" to "not_supported"))
|
||||
} catch (e: Exception) {
|
||||
result.success(mapOf("success" to false, "errorCode" to "unknown", "errorMessage" to (e.message ?: "Unknown error")))
|
||||
}
|
||||
}
|
||||
"setAutoPipReady" -> {
|
||||
if (isAndroidTvDevice()) {
|
||||
autoPipReady = false
|
||||
result.success(true)
|
||||
return@setMethodCallHandler
|
||||
}
|
||||
|
||||
autoPipReady = call.argument<Boolean>("ready") ?: false
|
||||
autoPipWidth = call.argument<Int>("width") ?: 16
|
||||
autoPipHeight = call.argument<Int>("height") ?: 9
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
try {
|
||||
// Notify Flutter to prepare video filter before PiP
|
||||
flutterEngine?.dartExecutor?.binaryMessenger?.let { messenger ->
|
||||
MethodChannel(messenger, PIP_CHANNEL).invokeMethod("onAutoPipEntering", null)
|
||||
}
|
||||
val clamped = clampAspectRatio(autoPipWidth, autoPipHeight)
|
||||
val params = PictureInPictureParams.Builder()
|
||||
.setAspectRatio(Rational(clamped.first, clamped.second))
|
||||
.build()
|
||||
enterPictureInPictureMode(params)
|
||||
} catch (_: Exception) {}
|
||||
val params = buildPipParams(autoPipWidth, autoPipHeight, autoEnterEnabled = autoPipReady)
|
||||
setPictureInPictureParams(params)
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Failed to set auto-PiP params", e)
|
||||
}
|
||||
}
|
||||
result.success(true)
|
||||
}
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun isPipPermissionGranted(): Boolean {
|
||||
val appOpsManager = getSystemService(Context.APP_OPS_SERVICE) as AppOpsManager
|
||||
return appOpsManager.checkOpNoThrow(
|
||||
AppOpsManager.OPSTR_PICTURE_IN_PICTURE,
|
||||
applicationInfo.uid,
|
||||
packageName
|
||||
) == AppOpsManager.MODE_ALLOWED
|
||||
private fun requestForeground(): Boolean = try {
|
||||
val activityManager = getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
|
||||
activityManager.moveTaskToFront(taskId, 0)
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Failed to move task to foreground", e)
|
||||
try {
|
||||
val launchIntent = packageManager.getLaunchIntentForPackage(packageName)?.apply {
|
||||
addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)
|
||||
addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)
|
||||
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
}
|
||||
if (launchIntent != null) {
|
||||
startActivity(launchIntent)
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
} catch (launchError: Exception) {
|
||||
Log.w(TAG, "Failed to start foreground activity", launchError)
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
private fun clampAspectRatio(width: Int, height: Int): Pair<Int, Int> {
|
||||
val ratio = width.toFloat() / height.toFloat()
|
||||
return when {
|
||||
ratio < 0.42f -> Pair(5, 12)
|
||||
ratio > 2.39f -> Pair(12, 5)
|
||||
else -> Pair(width, height)
|
||||
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean, newConfig: Configuration) {
|
||||
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig)
|
||||
flutterEngine?.let { engine ->
|
||||
MethodChannel(engine.dartExecutor.binaryMessenger, PIP_CHANNEL).invokeMethod("onPipChanged", isInPictureInPictureMode)
|
||||
engine.plugins.get(ExoPlayerPlugin::class.java)?.let { plugin ->
|
||||
(plugin as? ExoPlayerPlugin)?.onPipModeChanged(isInPictureInPictureMode)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onUserLeaveHint() {
|
||||
super.onUserLeaveHint()
|
||||
// Auto PiP for API 26-30 (API 31+ uses setAutoEnterEnabled)
|
||||
if (!isAndroidTvDevice() &&
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O &&
|
||||
Build.VERSION.SDK_INT < Build.VERSION_CODES.S &&
|
||||
autoPipReady &&
|
||||
isPipPermissionGranted()
|
||||
) {
|
||||
try {
|
||||
// Notify Flutter to prepare video filter before PiP
|
||||
flutterEngine?.dartExecutor?.binaryMessenger?.let { messenger ->
|
||||
MethodChannel(messenger, PIP_CHANNEL).invokeMethod("onAutoPipEntering", null)
|
||||
}
|
||||
val params = buildPipParams(autoPipWidth, autoPipHeight)
|
||||
enterPictureInPictureMode(params)
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Failed to enter auto-PiP", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun isPipPermissionGranted(): Boolean {
|
||||
val appOpsManager = getSystemService(Context.APP_OPS_SERVICE) as AppOpsManager
|
||||
return appOpsManager.checkOpNoThrow(
|
||||
AppOpsManager.OPSTR_PICTURE_IN_PICTURE,
|
||||
applicationInfo.uid,
|
||||
packageName
|
||||
) == AppOpsManager.MODE_ALLOWED
|
||||
}
|
||||
|
||||
private fun buildPipParams(width: Int, height: Int, autoEnterEnabled: Boolean? = null): PictureInPictureParams {
|
||||
val (w, h) = if (width <= 0 || height <= 0) {
|
||||
Pair(16, 9)
|
||||
} else {
|
||||
val ratio = width.toFloat() / height.toFloat()
|
||||
when {
|
||||
ratio < 1f / 2.39f -> Pair(100, 239)
|
||||
ratio > 2.39f -> Pair(239, 100)
|
||||
else -> Pair(width, height)
|
||||
}
|
||||
}
|
||||
val builder = PictureInPictureParams.Builder()
|
||||
.setAspectRatio(Rational(w, h))
|
||||
if (autoEnterEnabled != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
builder.setAutoEnterEnabled(autoEnterEnabled)
|
||||
}
|
||||
return builder.build()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,149 +19,151 @@ import androidx.media3.extractor.TrackOutput
|
||||
*/
|
||||
@androidx.media3.common.util.UnstableApi
|
||||
class CuelessSeekExtractorWrapper(
|
||||
private val delegate: Extractor,
|
||||
private val delegate: Extractor
|
||||
) : Extractor {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "CuelessSeek"
|
||||
// MKV Cluster element ID: 0x1F43B675 (4-byte EBML Class-D ID)
|
||||
private val CLUSTER_ID = byteArrayOf(0x1F, 0x43, 0xB6.toByte(), 0x75)
|
||||
private const val SCAN_BUFFER_SIZE = 8192
|
||||
// Max bytes to scan for a Cluster boundary before giving up
|
||||
private const val MAX_SCAN_BYTES = 1024 * 1024 // 1 MB
|
||||
companion object {
|
||||
private const val TAG = "CuelessSeek"
|
||||
|
||||
// MKV Cluster element ID: 0x1F43B675 (4-byte EBML Class-D ID)
|
||||
private val CLUSTER_ID = byteArrayOf(0x1F, 0x43, 0xB6.toByte(), 0x75)
|
||||
private const val SCAN_BUFFER_SIZE = 8192
|
||||
|
||||
// Max bytes to scan for a Cluster boundary before giving up
|
||||
private const val MAX_SCAN_BYTES = 1024 * 1024 // 1 MB
|
||||
}
|
||||
|
||||
private var inputLength: Long = C.LENGTH_UNSET.toLong()
|
||||
private var needsClusterResync = false
|
||||
private var isApproximateSeeking = false
|
||||
private var pendingSeekTimeUs: Long = C.TIME_UNSET
|
||||
|
||||
override fun sniff(input: ExtractorInput): Boolean = delegate.sniff(input)
|
||||
|
||||
override fun init(output: ExtractorOutput) {
|
||||
delegate.init(SeekInterceptingOutput(output))
|
||||
}
|
||||
|
||||
override fun read(input: ExtractorInput, seekPosition: PositionHolder): Int {
|
||||
if (inputLength == C.LENGTH_UNSET.toLong()) {
|
||||
inputLength = input.length
|
||||
}
|
||||
|
||||
private var inputLength: Long = C.LENGTH_UNSET.toLong()
|
||||
private var needsClusterResync = false
|
||||
private var isApproximateSeeking = false
|
||||
private var pendingSeekTimeUs: Long = C.TIME_UNSET
|
||||
|
||||
override fun sniff(input: ExtractorInput): Boolean = delegate.sniff(input)
|
||||
|
||||
override fun init(output: ExtractorOutput) {
|
||||
delegate.init(SeekInterceptingOutput(output))
|
||||
if (needsClusterResync) {
|
||||
needsClusterResync = false
|
||||
return scanForCluster(input, seekPosition)
|
||||
}
|
||||
return delegate.read(input, seekPosition)
|
||||
}
|
||||
|
||||
override fun read(input: ExtractorInput, seekPosition: PositionHolder): Int {
|
||||
if (inputLength == C.LENGTH_UNSET.toLong()) {
|
||||
inputLength = input.length
|
||||
override fun seek(position: Long, timeUs: Long) {
|
||||
if (isApproximateSeeking && position > 0) {
|
||||
needsClusterResync = true
|
||||
pendingSeekTimeUs = timeUs
|
||||
}
|
||||
delegate.seek(position, timeUs)
|
||||
}
|
||||
|
||||
override fun release() = delegate.release()
|
||||
|
||||
/**
|
||||
* Scan forward from the current input position to find the next MKV Cluster
|
||||
* element ID (0x1F43B675). Returns [Extractor.RESULT_SEEK] with the Cluster's
|
||||
* byte position so ExoPlayer repositions the DataSource there.
|
||||
*/
|
||||
private fun scanForCluster(input: ExtractorInput, seekPosition: PositionHolder): Int {
|
||||
val buffer = ByteArray(SCAN_BUFFER_SIZE)
|
||||
var totalScanned = 0L
|
||||
// Carry over last 3 bytes across buffer boundaries to detect split IDs
|
||||
var carry = ByteArray(0)
|
||||
|
||||
while (totalScanned < MAX_SCAN_BYTES) {
|
||||
val toRead = minOf(SCAN_BUFFER_SIZE, (MAX_SCAN_BYTES - totalScanned).toInt())
|
||||
val bytesRead: Int
|
||||
try {
|
||||
bytesRead = input.read(buffer, 0, toRead)
|
||||
} catch (_: Exception) {
|
||||
break
|
||||
}
|
||||
if (bytesRead == C.RESULT_END_OF_INPUT) break
|
||||
|
||||
// Combine carry + new data for scanning
|
||||
val scanData = if (carry.isNotEmpty()) carry + buffer.copyOf(bytesRead) else buffer.copyOf(bytesRead)
|
||||
|
||||
for (i in 0..scanData.size - 4) {
|
||||
if (scanData[i] == CLUSTER_ID[0] &&
|
||||
scanData[i + 1] == CLUSTER_ID[1] &&
|
||||
scanData[i + 2] == CLUSTER_ID[2] &&
|
||||
scanData[i + 3] == CLUSTER_ID[3]
|
||||
) {
|
||||
// Compute the absolute byte position of this Cluster
|
||||
val clusterPosition = input.position - bytesRead - carry.size + i
|
||||
Log.d(TAG, "Found Cluster at byte $clusterPosition (scanned ${totalScanned + i} bytes)")
|
||||
seekPosition.position = clusterPosition
|
||||
delegate.seek(clusterPosition, pendingSeekTimeUs)
|
||||
pendingSeekTimeUs = C.TIME_UNSET
|
||||
return Extractor.RESULT_SEEK
|
||||
}
|
||||
if (needsClusterResync) {
|
||||
needsClusterResync = false
|
||||
return scanForCluster(input, seekPosition)
|
||||
}
|
||||
return delegate.read(input, seekPosition)
|
||||
}
|
||||
|
||||
// Keep last 3 bytes as carry for next iteration
|
||||
carry = if (scanData.size >= 3) scanData.copyOfRange(scanData.size - 3, scanData.size) else scanData.copyOf()
|
||||
totalScanned += bytesRead
|
||||
}
|
||||
|
||||
override fun seek(position: Long, timeUs: Long) {
|
||||
if (isApproximateSeeking && position > 0) {
|
||||
needsClusterResync = true
|
||||
pendingSeekTimeUs = timeUs
|
||||
// Failed to find a Cluster — fall back to position 0
|
||||
Log.w(TAG, "No Cluster found after scanning $totalScanned bytes, resetting to start")
|
||||
seekPosition.position = 0
|
||||
delegate.seek(0, 0)
|
||||
return Extractor.RESULT_SEEK
|
||||
}
|
||||
|
||||
/**
|
||||
* ExtractorOutput wrapper that intercepts [seekMap] calls to replace
|
||||
* [SeekMap.Unseekable] with an approximate proportional SeekMap.
|
||||
*/
|
||||
private inner class SeekInterceptingOutput(
|
||||
private val delegate: ExtractorOutput
|
||||
) : ExtractorOutput {
|
||||
|
||||
override fun track(id: Int, type: Int): TrackOutput = delegate.track(id, type)
|
||||
override fun endTracks() = delegate.endTracks()
|
||||
|
||||
override fun seekMap(seekMap: SeekMap) {
|
||||
if (seekMap is SeekMap.Unseekable) {
|
||||
val durationUs = seekMap.durationUs
|
||||
if (durationUs != C.TIME_UNSET && durationUs > 0) {
|
||||
Log.i(TAG, "Replacing Unseekable with approximate SeekMap (duration=${durationUs / 1_000_000}s)")
|
||||
isApproximateSeeking = true
|
||||
delegate.seekMap(ApproximateSeekMap(durationUs))
|
||||
return
|
||||
}
|
||||
delegate.seek(position, timeUs)
|
||||
}
|
||||
// File has real Cues or unknown duration — pass through
|
||||
isApproximateSeeking = false
|
||||
delegate.seekMap(seekMap)
|
||||
}
|
||||
}
|
||||
|
||||
override fun release() = delegate.release()
|
||||
/**
|
||||
* Approximate SeekMap that estimates byte positions proportionally.
|
||||
* Used when the MKV has no Cues but has a known duration.
|
||||
*/
|
||||
private inner class ApproximateSeekMap(
|
||||
private val durationUs: Long
|
||||
) : SeekMap {
|
||||
|
||||
/**
|
||||
* Scan forward from the current input position to find the next MKV Cluster
|
||||
* element ID (0x1F43B675). Returns [Extractor.RESULT_SEEK] with the Cluster's
|
||||
* byte position so ExoPlayer repositions the DataSource there.
|
||||
*/
|
||||
private fun scanForCluster(input: ExtractorInput, seekPosition: PositionHolder): Int {
|
||||
val buffer = ByteArray(SCAN_BUFFER_SIZE)
|
||||
var totalScanned = 0L
|
||||
// Carry over last 3 bytes across buffer boundaries to detect split IDs
|
||||
var carry = ByteArray(0)
|
||||
override fun isSeekable(): Boolean = true
|
||||
|
||||
while (totalScanned < MAX_SCAN_BYTES) {
|
||||
val toRead = minOf(SCAN_BUFFER_SIZE, (MAX_SCAN_BYTES - totalScanned).toInt())
|
||||
val bytesRead: Int
|
||||
try {
|
||||
bytesRead = input.read(buffer, 0, toRead)
|
||||
} catch (_: Exception) {
|
||||
break
|
||||
}
|
||||
if (bytesRead == C.RESULT_END_OF_INPUT) break
|
||||
override fun getDurationUs(): Long = durationUs
|
||||
|
||||
// Combine carry + new data for scanning
|
||||
val scanData = if (carry.isNotEmpty()) carry + buffer.copyOf(bytesRead) else buffer.copyOf(bytesRead)
|
||||
|
||||
for (i in 0..scanData.size - 4) {
|
||||
if (scanData[i] == CLUSTER_ID[0] &&
|
||||
scanData[i + 1] == CLUSTER_ID[1] &&
|
||||
scanData[i + 2] == CLUSTER_ID[2] &&
|
||||
scanData[i + 3] == CLUSTER_ID[3]
|
||||
) {
|
||||
// Compute the absolute byte position of this Cluster
|
||||
val clusterPosition = input.position - bytesRead - carry.size + i
|
||||
Log.d(TAG, "Found Cluster at byte $clusterPosition (scanned ${totalScanned + i} bytes)")
|
||||
seekPosition.position = clusterPosition
|
||||
delegate.seek(clusterPosition, pendingSeekTimeUs)
|
||||
pendingSeekTimeUs = C.TIME_UNSET
|
||||
return Extractor.RESULT_SEEK
|
||||
}
|
||||
}
|
||||
|
||||
// Keep last 3 bytes as carry for next iteration
|
||||
carry = if (scanData.size >= 3) scanData.copyOfRange(scanData.size - 3, scanData.size) else scanData.copyOf()
|
||||
totalScanned += bytesRead
|
||||
}
|
||||
|
||||
// Failed to find a Cluster — fall back to position 0
|
||||
Log.w(TAG, "No Cluster found after scanning $totalScanned bytes, resetting to start")
|
||||
seekPosition.position = 0
|
||||
delegate.seek(0, 0)
|
||||
return Extractor.RESULT_SEEK
|
||||
}
|
||||
|
||||
/**
|
||||
* ExtractorOutput wrapper that intercepts [seekMap] calls to replace
|
||||
* [SeekMap.Unseekable] with an approximate proportional SeekMap.
|
||||
*/
|
||||
private inner class SeekInterceptingOutput(
|
||||
private val delegate: ExtractorOutput,
|
||||
) : ExtractorOutput {
|
||||
|
||||
override fun track(id: Int, type: Int): TrackOutput = delegate.track(id, type)
|
||||
override fun endTracks() = delegate.endTracks()
|
||||
|
||||
override fun seekMap(seekMap: SeekMap) {
|
||||
if (seekMap is SeekMap.Unseekable) {
|
||||
val durationUs = seekMap.durationUs
|
||||
if (durationUs != C.TIME_UNSET && durationUs > 0) {
|
||||
Log.i(TAG, "Replacing Unseekable with approximate SeekMap (duration=${durationUs / 1_000_000}s)")
|
||||
isApproximateSeeking = true
|
||||
delegate.seekMap(ApproximateSeekMap(durationUs))
|
||||
return
|
||||
}
|
||||
}
|
||||
// File has real Cues or unknown duration — pass through
|
||||
isApproximateSeeking = false
|
||||
delegate.seekMap(seekMap)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Approximate SeekMap that estimates byte positions proportionally.
|
||||
* Used when the MKV has no Cues but has a known duration.
|
||||
*/
|
||||
private inner class ApproximateSeekMap(
|
||||
private val durationUs: Long,
|
||||
) : SeekMap {
|
||||
|
||||
override fun isSeekable(): Boolean = true
|
||||
|
||||
override fun getDurationUs(): Long = durationUs
|
||||
|
||||
override fun getSeekPoints(timeUs: Long): SeekMap.SeekPoints {
|
||||
val length = inputLength
|
||||
if (length == C.LENGTH_UNSET.toLong() || durationUs <= 0) {
|
||||
return SeekMap.SeekPoints(SeekPoint(0, 0))
|
||||
}
|
||||
val clampedTimeUs = timeUs.coerceIn(0, durationUs)
|
||||
val position = (clampedTimeUs.toDouble() / durationUs * length).toLong().coerceIn(0, length)
|
||||
return SeekMap.SeekPoints(SeekPoint(clampedTimeUs, position))
|
||||
}
|
||||
override fun getSeekPoints(timeUs: Long): SeekMap.SeekPoints {
|
||||
val length = inputLength
|
||||
if (length == C.LENGTH_UNSET.toLong() || durationUs <= 0) {
|
||||
return SeekMap.SeekPoints(SeekPoint(0, 0))
|
||||
}
|
||||
val clampedTimeUs = timeUs.coerceIn(0, durationUs)
|
||||
val position = (clampedTimeUs.toDouble() / durationUs * length).toLong().coerceIn(0, length)
|
||||
return SeekMap.SeekPoints(SeekPoint(clampedTimeUs, position))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,78 +8,103 @@ import android.util.Log
|
||||
enum class DvConversionMode { DISABLED, DV81, HEVC_STRIP }
|
||||
|
||||
object DoviBridge {
|
||||
private const val TAG = "DoviBridge"
|
||||
private const val TAG = "DoviBridge"
|
||||
|
||||
private val nativeLoaded: Boolean by lazy {
|
||||
try {
|
||||
System.loadLibrary("dovi_bridge")
|
||||
true
|
||||
} catch (_: UnsatisfiedLinkError) {
|
||||
Log.w(TAG, "Native lib not found")
|
||||
false
|
||||
}
|
||||
const val CONVERT_FAILED = -1
|
||||
const val DESTINATION_TOO_SMALL = -2
|
||||
|
||||
private val nativeLoaded: Boolean by lazy {
|
||||
try {
|
||||
System.loadLibrary("dovi_bridge")
|
||||
true
|
||||
} catch (_: UnsatisfiedLinkError) {
|
||||
Log.w(TAG, "Native lib not found")
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
fun isAvailable(): Boolean = nativeLoaded &&
|
||||
runCatching { nativeIsConversionPathReady() }.getOrDefault(false)
|
||||
private val conversionPathReady: Boolean by lazy {
|
||||
nativeLoaded && runCatching { nativeIsConversionPathReady() }.getOrDefault(false)
|
||||
}
|
||||
|
||||
private fun deviceSupportsDvProfile(profile: Int, minApi: Int = 0): Boolean {
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT < minApi) return false
|
||||
val codecList = MediaCodecList(MediaCodecList.REGULAR_CODECS)
|
||||
return codecList.codecInfos.any { info ->
|
||||
!info.isEncoder && info.supportedTypes.any { type ->
|
||||
type.equals("video/dolby-vision", ignoreCase = true) &&
|
||||
info.getCapabilitiesForType(type).profileLevels.any { it.profile == profile }
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Failed to query DV profile $profile support", e)
|
||||
return false
|
||||
}
|
||||
fun isAvailable(): Boolean = conversionPathReady
|
||||
|
||||
private fun deviceSupportsDvProfile(profile: Int, minApi: Int = 0): Boolean {
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT < minApi) return false
|
||||
val codecList = MediaCodecList(MediaCodecList.REGULAR_CODECS)
|
||||
return codecList.codecInfos.any { info ->
|
||||
!info.isEncoder &&
|
||||
info.supportedTypes.any { type ->
|
||||
type.equals("video/dolby-vision", ignoreCase = true) &&
|
||||
info.getCapabilitiesForType(type).profileLevels.any { it.profile == profile }
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Failed to query DV profile $profile support", e)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
val deviceSupportsDvProfile7: Boolean by lazy {
|
||||
deviceSupportsDvProfile(MediaCodecInfo.CodecProfileLevel.DolbyVisionProfileDvheDtr)
|
||||
.also { Log.i(TAG, "Device DV Profile 7 support: $it") }
|
||||
val deviceSupportsDvProfile7: Boolean by lazy {
|
||||
deviceSupportsDvProfile(MediaCodecInfo.CodecProfileLevel.DolbyVisionProfileDvheDtr)
|
||||
.also { Log.i(TAG, "Device DV Profile 7 support: $it") }
|
||||
}
|
||||
|
||||
val deviceSupportsDvProfile8: Boolean by lazy {
|
||||
deviceSupportsDvProfile(MediaCodecInfo.CodecProfileLevel.DolbyVisionProfileDvheSt, minApi = 27)
|
||||
.also { Log.i(TAG, "Device DV Profile 8 support: $it") }
|
||||
}
|
||||
|
||||
fun getConversionMode(): DvConversionMode = when {
|
||||
!isAvailable() -> DvConversionMode.DISABLED
|
||||
deviceSupportsDvProfile7 -> DvConversionMode.DISABLED // try native first; ExoPlayerCore retries with conversion on failure
|
||||
deviceSupportsDvProfile8 -> DvConversionMode.DV81
|
||||
else -> DvConversionMode.HEVC_STRIP
|
||||
}
|
||||
|
||||
/** Get the fallback mode when native DV7 decoding fails. */
|
||||
fun getDv7FallbackMode(): DvConversionMode = when {
|
||||
deviceSupportsDvProfile8 -> DvConversionMode.DV81
|
||||
else -> DvConversionMode.HEVC_STRIP
|
||||
}
|
||||
|
||||
fun convertRpuNalu(
|
||||
payload: ByteArray,
|
||||
payloadOffset: Int,
|
||||
payloadLength: Int,
|
||||
output: ByteArray,
|
||||
outputOffset: Int,
|
||||
outputCapacity: Int,
|
||||
mode: Int = 2
|
||||
): Int {
|
||||
if (!conversionPathReady || payloadLength <= 0) return CONVERT_FAILED
|
||||
return runCatching {
|
||||
nativeConvertDv7RpuToDv81(payload, payloadOffset, payloadLength, output, outputOffset, outputCapacity, mode)
|
||||
}
|
||||
.onFailure { Log.w(TAG, "RPU conversion failed: ${it.message}") }
|
||||
.getOrDefault(CONVERT_FAILED)
|
||||
}
|
||||
|
||||
val deviceSupportsDvProfile8: Boolean by lazy {
|
||||
deviceSupportsDvProfile(MediaCodecInfo.CodecProfileLevel.DolbyVisionProfileDvheSt, minApi = 27)
|
||||
.also { Log.i(TAG, "Device DV Profile 8 support: $it") }
|
||||
}
|
||||
fun getVersion(): String? {
|
||||
if (!nativeLoaded) return null
|
||||
return runCatching { nativeGetBridgeVersion() }.getOrNull()
|
||||
}
|
||||
|
||||
fun getConversionMode(): DvConversionMode = when {
|
||||
!isAvailable() -> DvConversionMode.DISABLED
|
||||
deviceSupportsDvProfile7 -> DvConversionMode.DISABLED // try native first; ExoPlayerCore retries with conversion on failure
|
||||
deviceSupportsDvProfile8 -> DvConversionMode.DV81
|
||||
else -> DvConversionMode.HEVC_STRIP
|
||||
}
|
||||
@JvmStatic
|
||||
private external fun nativeConvertDv7RpuToDv81(
|
||||
payload: ByteArray,
|
||||
payloadOffset: Int,
|
||||
payloadLength: Int,
|
||||
output: ByteArray,
|
||||
outputOffset: Int,
|
||||
outputCapacity: Int,
|
||||
mode: Int
|
||||
): Int
|
||||
|
||||
/** Get the fallback mode when native DV7 decoding fails. */
|
||||
fun getDv7FallbackMode(): DvConversionMode = when {
|
||||
deviceSupportsDvProfile8 -> DvConversionMode.DV81
|
||||
else -> DvConversionMode.HEVC_STRIP
|
||||
}
|
||||
@JvmStatic
|
||||
private external fun nativeIsConversionPathReady(): Boolean
|
||||
|
||||
fun convertRpuNalu(payload: ByteArray, mode: Int = 2): ByteArray? {
|
||||
if (!isAvailable() || payload.isEmpty()) return null
|
||||
return runCatching { nativeConvertDv7RpuToDv81(payload, mode) }
|
||||
.onFailure { Log.w(TAG, "RPU conversion failed: ${it.message}") }
|
||||
.getOrNull()
|
||||
}
|
||||
|
||||
fun getVersion(): String? {
|
||||
if (!nativeLoaded) return null
|
||||
return runCatching { nativeGetBridgeVersion() }.getOrNull()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
private external fun nativeConvertDv7RpuToDv81(payload: ByteArray, mode: Int): ByteArray?
|
||||
|
||||
@JvmStatic
|
||||
private external fun nativeIsConversionPathReady(): Boolean
|
||||
|
||||
@JvmStatic
|
||||
private external fun nativeGetBridgeVersion(): String
|
||||
@JvmStatic
|
||||
private external fun nativeGetBridgeVersion(): String
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import androidx.media3.common.Format
|
||||
import androidx.media3.common.MimeTypes
|
||||
import androidx.media3.common.util.ParsableByteArray
|
||||
import androidx.media3.extractor.TrackOutput
|
||||
import java.io.ByteArrayOutputStream
|
||||
|
||||
/**
|
||||
* TrackOutput wrapper that processes DV Profile 7 HEVC samples based on conversion mode:
|
||||
@@ -24,339 +23,499 @@ import java.io.ByteArrayOutputStream
|
||||
* - Type 63 (UNSPEC63): DV Enhancement Layer → strip
|
||||
* - nuh_layer_id > 0: Enhancement layer NAL → strip
|
||||
* - All retained NALs: normalize nuh_layer_id to 0
|
||||
*
|
||||
* All buffers are reused across samples to minimize GC pressure on the hot path.
|
||||
*/
|
||||
class DoviConvertingTrackOutput(
|
||||
private val delegate: TrackOutput,
|
||||
private val dvMode: DvConversionMode = DvConversionMode.HEVC_STRIP,
|
||||
private val delegate: TrackOutput,
|
||||
private val dvMode: DvConversionMode = DvConversionMode.HEVC_STRIP
|
||||
) : TrackOutput {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "DoviConvertTrack"
|
||||
private const val NAL_TYPE_UNSPEC62 = 62
|
||||
private const val NAL_TYPE_UNSPEC63 = 63
|
||||
private const val LIBDOVI_MODE_TO_81 = 2
|
||||
private val ANNEX_B_START_CODE = byteArrayOf(0, 0, 0, 1)
|
||||
}
|
||||
companion object {
|
||||
private const val TAG = "DoviConvertTrack"
|
||||
private const val NAL_TYPE_UNSPEC62 = 62
|
||||
private const val NAL_TYPE_UNSPEC63 = 63
|
||||
private const val LIBDOVI_MODE_TO_81 = 2
|
||||
private const val INITIAL_BUFFER_SIZE = 256 * 1024
|
||||
private const val MAX_CONVERTED_RPU_SIZE = 16 * 1024
|
||||
private val ANNEX_B_START_CODE = byteArrayOf(0, 0, 0, 1)
|
||||
}
|
||||
|
||||
var conversionActive = false
|
||||
private set
|
||||
var strippedNalCount = 0L
|
||||
private set
|
||||
var convertedRpuCount = 0L
|
||||
private set
|
||||
var conversionActive = false
|
||||
private set
|
||||
var strippedNalCount = 0L
|
||||
private set
|
||||
var convertedRpuCount = 0L
|
||||
private set
|
||||
var rpuConversionFailureCount = 0L
|
||||
private set
|
||||
var rpuOutputTooSmallCount = 0L
|
||||
private set
|
||||
val averageRpuConversionTimeUs: Long
|
||||
get() = if (rpuConversionCallCount > 0) totalRpuConversionTimeUs / rpuConversionCallCount else 0L
|
||||
val averageSampleProcessingTimeUs: Long
|
||||
get() = if (sampleCount > 0) totalSampleProcessingTimeUs / sampleCount else 0L
|
||||
|
||||
// Sample buffering between sampleData() and sampleMetadata()
|
||||
private val sampleBuffer = ByteArrayOutputStream(256 * 1024)
|
||||
private var buffering = false
|
||||
// Reusable buffers — grown as needed, never shrunk
|
||||
private var sampleBuf = ByteArray(INITIAL_BUFFER_SIZE)
|
||||
private var sampleLen = 0
|
||||
private var outputBuf = ByteArray(INITIAL_BUFFER_SIZE)
|
||||
private var outputLen = 0
|
||||
private val outputParsable = ParsableByteArray()
|
||||
private var buffering = false
|
||||
|
||||
override fun format(format: Format) {
|
||||
if (!conversionActive) {
|
||||
val codecs = format.codecs
|
||||
if (codecs != null && codecs.startsWith("dvhe.07")) {
|
||||
conversionActive = true
|
||||
Log.i(TAG, "DV Profile 7 detected ($codecs), mode=$dvMode")
|
||||
Log.i(TAG, "Original format: mime=${format.sampleMimeType}, codecs=$codecs, " +
|
||||
"initData=${format.initializationData.size} entries " +
|
||||
"(${format.initializationData.mapIndexed { i, d -> "$i:${d.size}B" }.joinToString()})")
|
||||
// Sample counter for periodic logging
|
||||
private var sampleCount = 0L
|
||||
private var rpuConversionCallCount = 0L
|
||||
private var totalRpuConversionTimeUs = 0L
|
||||
private var totalSampleProcessingTimeUs = 0L
|
||||
|
||||
val newFormat = when (dvMode) {
|
||||
DvConversionMode.DV81 -> {
|
||||
// Parse DV level from codec string: "dvhe.07.06" → 6
|
||||
val level = codecs.split('.').getOrNull(2)?.toIntOrNull() ?: 6
|
||||
val newCodecs = "dvhe.08.%02d".format(level)
|
||||
val dvConfigRecord = buildDv81ConfigRecord(level)
|
||||
Log.i(TAG, "DV81: rewriting to $newCodecs, config=${dvConfigRecord.size}B")
|
||||
override fun format(format: Format) {
|
||||
if (!conversionActive) {
|
||||
val codecs = format.codecs
|
||||
if (codecs != null && codecs.startsWith("dvhe.07")) {
|
||||
conversionActive = true
|
||||
Log.i(TAG, "DV Profile 7 detected ($codecs), mode=$dvMode")
|
||||
Log.i(
|
||||
TAG,
|
||||
"Original format: mime=${format.sampleMimeType}, codecs=$codecs, " +
|
||||
"initData=${format.initializationData.size} entries " +
|
||||
"(${format.initializationData.mapIndexed { i, d -> "$i:${d.size}B" }.joinToString()})"
|
||||
)
|
||||
|
||||
format.buildUpon()
|
||||
.setSampleMimeType(MimeTypes.VIDEO_DOLBY_VISION)
|
||||
.setCodecs(newCodecs)
|
||||
.setInitializationData(
|
||||
if (format.initializationData.isNotEmpty())
|
||||
listOf(format.initializationData[0], dvConfigRecord)
|
||||
else
|
||||
listOf(ByteArray(0), dvConfigRecord)
|
||||
)
|
||||
.build()
|
||||
}
|
||||
else -> {
|
||||
// HEVC_STRIP: present as plain HEVC
|
||||
Log.i(TAG, "HEVC_STRIP: rewriting to video/hevc")
|
||||
format.buildUpon()
|
||||
.setSampleMimeType(MimeTypes.VIDEO_H265)
|
||||
.setCodecs(null)
|
||||
.setInitializationData(
|
||||
if (format.initializationData.isNotEmpty())
|
||||
listOf(format.initializationData[0])
|
||||
else
|
||||
emptyList()
|
||||
)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
val newFormat = when (dvMode) {
|
||||
DvConversionMode.DV81 -> {
|
||||
// Parse DV level from codec string: "dvhe.07.06" → 6
|
||||
val level = codecs.split('.').getOrNull(2)?.toIntOrNull() ?: 6
|
||||
val newCodecs = "dvhe.08.%02d".format(level)
|
||||
val dvConfigRecord = buildDv81ConfigRecord(level)
|
||||
Log.i(TAG, "DV81: rewriting to $newCodecs, config=${dvConfigRecord.size}B")
|
||||
|
||||
Log.i(TAG, "Rewritten format: mime=${newFormat.sampleMimeType}, " +
|
||||
"codecs=${newFormat.codecs}, initData=${newFormat.initializationData.size} entries")
|
||||
delegate.format(newFormat)
|
||||
return
|
||||
}
|
||||
}
|
||||
delegate.format(format)
|
||||
}
|
||||
|
||||
override fun sampleData(
|
||||
input: DataReader, length: Int, allowEndOfInput: Boolean, sampleDataPart: Int
|
||||
): Int {
|
||||
if (!conversionActive) {
|
||||
return delegate.sampleData(input, length, allowEndOfInput, sampleDataPart)
|
||||
}
|
||||
|
||||
// Buffer sample data for processing at sampleMetadata() time
|
||||
buffering = true
|
||||
val buf = ByteArray(length)
|
||||
val bytesRead = input.read(buf, 0, length)
|
||||
if (bytesRead > 0) {
|
||||
sampleBuffer.write(buf, 0, bytesRead)
|
||||
}
|
||||
return bytesRead
|
||||
}
|
||||
|
||||
override fun sampleData(data: ParsableByteArray, length: Int, sampleDataPart: Int) {
|
||||
if (!conversionActive) {
|
||||
delegate.sampleData(data, length, sampleDataPart)
|
||||
return
|
||||
}
|
||||
|
||||
// Buffer sample data for processing at sampleMetadata() time
|
||||
buffering = true
|
||||
val bytes = ByteArray(length)
|
||||
data.readBytes(bytes, 0, length)
|
||||
sampleBuffer.write(bytes, 0, length)
|
||||
}
|
||||
|
||||
override fun sampleMetadata(
|
||||
timeUs: Long, flags: Int, size: Int, offset: Int, cryptoData: TrackOutput.CryptoData?
|
||||
) {
|
||||
if (!conversionActive || !buffering) {
|
||||
delegate.sampleMetadata(timeUs, flags, size, offset, cryptoData)
|
||||
return
|
||||
}
|
||||
|
||||
buffering = false
|
||||
val rawSample = sampleBuffer.toByteArray()
|
||||
sampleBuffer.reset()
|
||||
|
||||
val processed = try {
|
||||
processNalUnits(rawSample)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "NAL processing failed, passing raw sample", e)
|
||||
rawSample
|
||||
}
|
||||
|
||||
// Skip empty samples (all NALs were DV layers) — don't confuse the decoder
|
||||
if (processed.isEmpty()) return
|
||||
|
||||
// Write processed data to delegate. Offset must be 0 since we write exactly
|
||||
// the processed amount (no trailing data from next sample in the buffer).
|
||||
val parsable = ParsableByteArray(processed, processed.size)
|
||||
delegate.sampleData(parsable, processed.size, TrackOutput.SAMPLE_DATA_PART_MAIN)
|
||||
delegate.sampleMetadata(timeUs, flags, processed.size, 0, cryptoData)
|
||||
}
|
||||
|
||||
// Sample counter for periodic logging
|
||||
private var sampleCount = 0L
|
||||
|
||||
/**
|
||||
* Process a single NAL: convert RPU (DV81), strip DV layers, or keep.
|
||||
* Returns processed NAL data to write, or null if stripped.
|
||||
*/
|
||||
private fun processNal(nalData: ByteArray): ByteArray? {
|
||||
if (nalData.size < 2) return nalData
|
||||
val nalType = (nalData[0].toInt() ushr 1) and 0x3F
|
||||
val nuhLayerId = ((nalData[0].toInt() and 1) shl 5) or
|
||||
((nalData[1].toInt() ushr 3) and 0x1F)
|
||||
return when {
|
||||
nalType == NAL_TYPE_UNSPEC62 && dvMode == DvConversionMode.DV81 -> {
|
||||
val converted = DoviBridge.convertRpuNalu(nalData, LIBDOVI_MODE_TO_81)
|
||||
if (converted != null) {
|
||||
normalizeLayerId(converted)
|
||||
convertedRpuCount++
|
||||
converted
|
||||
format.buildUpon()
|
||||
.setSampleMimeType(MimeTypes.VIDEO_DOLBY_VISION)
|
||||
.setCodecs(newCodecs)
|
||||
.setInitializationData(
|
||||
if (format.initializationData.isNotEmpty()) {
|
||||
listOf(format.initializationData[0], dvConfigRecord)
|
||||
} else {
|
||||
strippedNalCount++
|
||||
null
|
||||
listOf(ByteArray(0), dvConfigRecord)
|
||||
}
|
||||
}
|
||||
nalType == NAL_TYPE_UNSPEC62 || nalType == NAL_TYPE_UNSPEC63 || nuhLayerId > 0 -> {
|
||||
strippedNalCount++
|
||||
null
|
||||
}
|
||||
else -> {
|
||||
normalizeLayerId(nalData)
|
||||
nalData
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process NAL units in the sample data. Auto-detects format:
|
||||
* - Annex B (00 00 00 01 / 00 00 01 start codes) — used by MatroskaExtractor
|
||||
* - Length-prefixed (4-byte big-endian length) — used by Mp4Extractor
|
||||
*/
|
||||
private fun processNalUnits(data: ByteArray): ByteArray {
|
||||
if (data.size < 4) return data
|
||||
|
||||
// Auto-detect: Annex B starts with 00 00 00 01 or 00 00 01
|
||||
val isAnnexB = (data.size >= 4 && data[0] == 0.toByte() && data[1] == 0.toByte() &&
|
||||
data[2] == 0.toByte() && data[3] == 1.toByte()) ||
|
||||
(data.size >= 3 && data[0] == 0.toByte() && data[1] == 0.toByte() &&
|
||||
data[2] == 1.toByte())
|
||||
|
||||
if (sampleCount == 0L) {
|
||||
Log.d(TAG, "NAL format detected: ${if (isAnnexB) "Annex B" else "length-prefixed"}, " +
|
||||
"first bytes: ${data.take(8).joinToString(" ") { "%02X".format(it) }}")
|
||||
}
|
||||
|
||||
return if (isAnnexB) processAnnexBNals(data) else processLengthPrefixedNals(data)
|
||||
}
|
||||
|
||||
/**
|
||||
* Find all Annex B start code positions (00 00 01 or 00 00 00 01) in the data.
|
||||
* Returns list of pairs: (startCodeEnd, startCodeLen) where startCodeEnd is the
|
||||
* byte index right after the start code, and startCodeLen is 3 or 4.
|
||||
*/
|
||||
private fun findAnnexBStartCodes(data: ByteArray): List<Pair<Int, Int>> {
|
||||
val positions = mutableListOf<Pair<Int, Int>>()
|
||||
var i = 0
|
||||
while (i < data.size - 2) {
|
||||
if (data[i] == 0.toByte() && data[i + 1] == 0.toByte()) {
|
||||
if (i + 3 < data.size && data[i + 2] == 0.toByte() && data[i + 3] == 1.toByte()) {
|
||||
positions.add(Pair(i + 4, 4))
|
||||
i += 4
|
||||
continue
|
||||
} else if (data[i + 2] == 1.toByte()) {
|
||||
positions.add(Pair(i + 3, 3))
|
||||
i += 3
|
||||
continue
|
||||
)
|
||||
.build()
|
||||
}
|
||||
else -> {
|
||||
// HEVC_STRIP: present as plain HEVC
|
||||
Log.i(TAG, "HEVC_STRIP: rewriting to video/hevc")
|
||||
format.buildUpon()
|
||||
.setSampleMimeType(MimeTypes.VIDEO_H265)
|
||||
.setCodecs(null)
|
||||
.setInitializationData(
|
||||
if (format.initializationData.isNotEmpty()) {
|
||||
listOf(format.initializationData[0])
|
||||
} else {
|
||||
emptyList()
|
||||
}
|
||||
}
|
||||
i++
|
||||
)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
return positions
|
||||
|
||||
Log.i(
|
||||
TAG,
|
||||
"Rewritten format: mime=${newFormat.sampleMimeType}, " +
|
||||
"codecs=${newFormat.codecs}, initData=${newFormat.initializationData.size} entries"
|
||||
)
|
||||
delegate.format(newFormat)
|
||||
return
|
||||
}
|
||||
}
|
||||
delegate.format(format)
|
||||
}
|
||||
|
||||
override fun sampleData(
|
||||
input: DataReader,
|
||||
length: Int,
|
||||
allowEndOfInput: Boolean,
|
||||
sampleDataPart: Int
|
||||
): Int {
|
||||
if (!conversionActive) {
|
||||
return delegate.sampleData(input, length, allowEndOfInput, sampleDataPart)
|
||||
}
|
||||
|
||||
/** Process Annex B formatted NAL units (MKV path). */
|
||||
private fun processAnnexBNals(data: ByteArray): ByteArray {
|
||||
val output = ByteArrayOutputStream(data.size)
|
||||
var kept = 0
|
||||
var stripped = 0
|
||||
buffering = true
|
||||
ensureSampleCapacity(sampleLen + length)
|
||||
val bytesRead = input.read(sampleBuf, sampleLen, length)
|
||||
if (bytesRead > 0) {
|
||||
sampleLen += bytesRead
|
||||
}
|
||||
return bytesRead
|
||||
}
|
||||
|
||||
val startCodes = findAnnexBStartCodes(data)
|
||||
if (startCodes.isEmpty()) {
|
||||
sampleCount++
|
||||
return data
|
||||
}
|
||||
|
||||
for (idx in startCodes.indices) {
|
||||
val nalStart = startCodes[idx].first
|
||||
val nalEnd = if (idx + 1 < startCodes.size) {
|
||||
startCodes[idx + 1].first - startCodes[idx + 1].second
|
||||
} else {
|
||||
data.size
|
||||
}
|
||||
if (nalEnd <= nalStart) continue
|
||||
|
||||
val result = processNal(data.copyOfRange(nalStart, nalEnd))
|
||||
if (result != null) {
|
||||
output.write(ANNEX_B_START_CODE)
|
||||
output.write(result)
|
||||
kept++
|
||||
} else {
|
||||
stripped++
|
||||
}
|
||||
}
|
||||
|
||||
sampleCount++
|
||||
if (sampleCount <= 3 || (sampleCount % 500 == 0L)) {
|
||||
Log.d(TAG, "Sample #$sampleCount (AnnexB): ${data.size}B -> ${output.size()}B, " +
|
||||
"kept=$kept stripped=$stripped NALs")
|
||||
}
|
||||
return output.toByteArray()
|
||||
override fun sampleData(data: ParsableByteArray, length: Int, sampleDataPart: Int) {
|
||||
if (!conversionActive) {
|
||||
delegate.sampleData(data, length, sampleDataPart)
|
||||
return
|
||||
}
|
||||
|
||||
/** Process length-prefixed NAL units (MP4 path). */
|
||||
private fun processLengthPrefixedNals(data: ByteArray): ByteArray {
|
||||
val output = ByteArrayOutputStream(data.size)
|
||||
var pos = 0
|
||||
var kept = 0
|
||||
var stripped = 0
|
||||
buffering = true
|
||||
ensureSampleCapacity(sampleLen + length)
|
||||
data.readBytes(sampleBuf, sampleLen, length)
|
||||
sampleLen += length
|
||||
}
|
||||
|
||||
while (pos + 4 <= data.size) {
|
||||
val nalLen = ((data[pos].toInt() and 0xFF) shl 24) or
|
||||
((data[pos + 1].toInt() and 0xFF) shl 16) or
|
||||
((data[pos + 2].toInt() and 0xFF) shl 8) or
|
||||
(data[pos + 3].toInt() and 0xFF)
|
||||
override fun sampleMetadata(
|
||||
timeUs: Long,
|
||||
flags: Int,
|
||||
size: Int,
|
||||
offset: Int,
|
||||
cryptoData: TrackOutput.CryptoData?
|
||||
) {
|
||||
if (!conversionActive || !buffering) {
|
||||
delegate.sampleMetadata(timeUs, flags, size, offset, cryptoData)
|
||||
return
|
||||
}
|
||||
|
||||
if (nalLen <= 0 || pos + 4 + nalLen > data.size) {
|
||||
if (sampleCount < 5) {
|
||||
Log.w(TAG, "Bad NAL length $nalLen at pos $pos (data.size=${data.size})")
|
||||
}
|
||||
break
|
||||
}
|
||||
buffering = false
|
||||
val srcLen = sampleLen
|
||||
sampleLen = 0
|
||||
|
||||
val result = processNal(data.copyOfRange(pos + 4, pos + 4 + nalLen))
|
||||
if (result != null) {
|
||||
writeLengthPrefixedNal(output, result)
|
||||
kept++
|
||||
} else {
|
||||
stripped++
|
||||
}
|
||||
val outLen: Int
|
||||
val outBuf: ByteArray
|
||||
val processStartNs = System.nanoTime()
|
||||
val success = try {
|
||||
processNalUnits(srcLen)
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "NAL processing failed, passing raw sample", e)
|
||||
false
|
||||
}
|
||||
if (success) {
|
||||
outLen = outputLen
|
||||
outBuf = outputBuf
|
||||
} else {
|
||||
outLen = srcLen
|
||||
outBuf = sampleBuf
|
||||
}
|
||||
if (success) {
|
||||
recordSampleProcessing((System.nanoTime() - processStartNs) / 1_000L)
|
||||
}
|
||||
|
||||
pos += 4 + nalLen
|
||||
// Skip empty samples (all NALs were DV layers) — don't confuse the decoder
|
||||
if (outLen == 0) return
|
||||
|
||||
outputParsable.reset(outBuf, outLen)
|
||||
delegate.sampleData(outputParsable, outLen, TrackOutput.SAMPLE_DATA_PART_MAIN)
|
||||
delegate.sampleMetadata(timeUs, flags, outLen, 0, cryptoData)
|
||||
}
|
||||
|
||||
/**
|
||||
* Process NAL units in sampleBuf[0..dataLen). Auto-detects format:
|
||||
* - Annex B (00 00 00 01 / 00 00 01 start codes) — used by MatroskaExtractor
|
||||
* - Length-prefixed (4-byte big-endian length) — used by Mp4Extractor
|
||||
*
|
||||
* Result is written to outputBuf[0..outputLen).
|
||||
*/
|
||||
private fun processNalUnits(dataLen: Int) {
|
||||
outputLen = 0
|
||||
if (dataLen < 4) {
|
||||
ensureOutputCapacity(dataLen)
|
||||
System.arraycopy(sampleBuf, 0, outputBuf, 0, dataLen)
|
||||
outputLen = dataLen
|
||||
return
|
||||
}
|
||||
|
||||
// Auto-detect: Annex B starts with 00 00 00 01 or 00 00 01
|
||||
val isAnnexB = (
|
||||
dataLen >= 4 &&
|
||||
sampleBuf[0] == 0.toByte() &&
|
||||
sampleBuf[1] == 0.toByte() &&
|
||||
sampleBuf[2] == 0.toByte() &&
|
||||
sampleBuf[3] == 1.toByte()
|
||||
) ||
|
||||
(
|
||||
dataLen >= 3 &&
|
||||
sampleBuf[0] == 0.toByte() &&
|
||||
sampleBuf[1] == 0.toByte() &&
|
||||
sampleBuf[2] == 1.toByte()
|
||||
)
|
||||
|
||||
if (sampleCount == 0L) {
|
||||
Log.d(
|
||||
TAG,
|
||||
"NAL format detected: ${if (isAnnexB) "Annex B" else "length-prefixed"}, " +
|
||||
"first bytes: ${sampleBuf.take(8).joinToString(" ") { "%02X".format(it) }}"
|
||||
)
|
||||
}
|
||||
|
||||
if (isAnnexB) processAnnexBNals(dataLen) else processLengthPrefixedNals(dataLen)
|
||||
}
|
||||
|
||||
/** Process Annex B formatted NAL units (MKV path). Scans inline, no list allocation. */
|
||||
private fun processAnnexBNals(dataLen: Int) {
|
||||
ensureOutputCapacity(dataLen)
|
||||
var kept = 0
|
||||
var stripped = 0
|
||||
|
||||
// Find first start code
|
||||
var scEnd = -1
|
||||
var i = 0
|
||||
while (i < dataLen - 2) {
|
||||
if (sampleBuf[i] == 0.toByte() && sampleBuf[i + 1] == 0.toByte()) {
|
||||
if (i + 3 < dataLen && sampleBuf[i + 2] == 0.toByte() && sampleBuf[i + 3] == 1.toByte()) {
|
||||
scEnd = i + 4
|
||||
break
|
||||
} else if (sampleBuf[i + 2] == 1.toByte()) {
|
||||
scEnd = i + 3
|
||||
break
|
||||
}
|
||||
}
|
||||
i++
|
||||
}
|
||||
|
||||
sampleCount++
|
||||
if (sampleCount <= 3 || (sampleCount % 500 == 0L)) {
|
||||
Log.d(TAG, "Sample #$sampleCount (LenPrefix): ${data.size}B -> ${output.size()}B, " +
|
||||
"kept=$kept stripped=$stripped NALs")
|
||||
if (scEnd < 0) {
|
||||
// No start codes found — pass through
|
||||
System.arraycopy(sampleBuf, 0, outputBuf, 0, dataLen)
|
||||
outputLen = dataLen
|
||||
sampleCount++
|
||||
return
|
||||
}
|
||||
|
||||
var nalStart = scEnd
|
||||
|
||||
while (nalStart < dataLen) {
|
||||
// Find next start code to determine end of current NAL
|
||||
var nalEnd = dataLen
|
||||
i = nalStart
|
||||
while (i < dataLen - 2) {
|
||||
if (sampleBuf[i] == 0.toByte() && sampleBuf[i + 1] == 0.toByte()) {
|
||||
if (i + 3 < dataLen && sampleBuf[i + 2] == 0.toByte() && sampleBuf[i + 3] == 1.toByte()) {
|
||||
nalEnd = i
|
||||
break
|
||||
} else if (sampleBuf[i + 2] == 1.toByte()) {
|
||||
nalEnd = i
|
||||
break
|
||||
}
|
||||
}
|
||||
return output.toByteArray()
|
||||
}
|
||||
i++
|
||||
}
|
||||
|
||||
private fun normalizeLayerId(nalData: ByteArray) {
|
||||
if (nalData.size >= 2) {
|
||||
nalData[0] = (nalData[0].toInt() and 0xFE).toByte() // Clear bit 0 of byte 0
|
||||
nalData[1] = (nalData[1].toInt() and 0x07).toByte() // Clear bits 7-3 of byte 1
|
||||
val nalLen = nalEnd - nalStart
|
||||
if (nalLen > 0) {
|
||||
val action = processNalInline(nalStart, nalLen)
|
||||
if (action == NalAction.KEEP) {
|
||||
ensureOutputCapacity(outputLen + 4 + nalLen)
|
||||
System.arraycopy(ANNEX_B_START_CODE, 0, outputBuf, outputLen, 4)
|
||||
outputLen += 4
|
||||
System.arraycopy(sampleBuf, nalStart, outputBuf, outputLen, nalLen)
|
||||
normalizeLayerId(outputBuf, outputLen)
|
||||
outputLen += nalLen
|
||||
kept++
|
||||
} else if (action == NalAction.CONVERT) {
|
||||
val convertedLen = convertRpuIntoOutput(nalStart, nalLen, outputLen + 4)
|
||||
if (convertedLen >= 0) {
|
||||
System.arraycopy(ANNEX_B_START_CODE, 0, outputBuf, outputLen, 4)
|
||||
outputLen += 4
|
||||
normalizeLayerId(outputBuf, outputLen)
|
||||
outputLen += convertedLen
|
||||
convertedRpuCount++
|
||||
kept++
|
||||
} else {
|
||||
strippedNalCount++
|
||||
stripped++
|
||||
}
|
||||
} else {
|
||||
strippedNalCount++
|
||||
stripped++
|
||||
}
|
||||
}
|
||||
|
||||
// Advance past the next start code
|
||||
if (nalEnd >= dataLen) break
|
||||
nalStart = if (nalEnd + 3 < dataLen && sampleBuf[nalEnd + 2] == 0.toByte() && sampleBuf[nalEnd + 3] == 1.toByte()) {
|
||||
nalEnd + 4
|
||||
} else {
|
||||
nalEnd + 3
|
||||
}
|
||||
}
|
||||
|
||||
private fun writeLengthPrefixedNal(output: ByteArrayOutputStream, nalData: ByteArray) {
|
||||
val len = nalData.size
|
||||
output.write((len ushr 24) and 0xFF)
|
||||
output.write((len ushr 16) and 0xFF)
|
||||
output.write((len ushr 8) and 0xFF)
|
||||
output.write(len and 0xFF)
|
||||
output.write(nalData)
|
||||
sampleCount++
|
||||
if (sampleCount <= 3 || (sampleCount % 500 == 0L)) {
|
||||
Log.d(
|
||||
TAG,
|
||||
"Sample #$sampleCount (AnnexB): ${dataLen}B -> ${outputLen}B, " +
|
||||
"kept=$kept stripped=$stripped NALs"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/** Process length-prefixed NAL units (MP4 path). */
|
||||
private fun processLengthPrefixedNals(dataLen: Int) {
|
||||
ensureOutputCapacity(dataLen)
|
||||
var pos = 0
|
||||
var kept = 0
|
||||
var stripped = 0
|
||||
|
||||
while (pos + 4 <= dataLen) {
|
||||
val nalLen = ((sampleBuf[pos].toInt() and 0xFF) shl 24) or
|
||||
((sampleBuf[pos + 1].toInt() and 0xFF) shl 16) or
|
||||
((sampleBuf[pos + 2].toInt() and 0xFF) shl 8) or
|
||||
(sampleBuf[pos + 3].toInt() and 0xFF)
|
||||
|
||||
if (nalLen <= 0 || pos + 4 + nalLen > dataLen) {
|
||||
if (sampleCount < 5) {
|
||||
Log.w(TAG, "Bad NAL length $nalLen at pos $pos (data.size=$dataLen)")
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
val nalStart = pos + 4
|
||||
val action = processNalInline(nalStart, nalLen)
|
||||
if (action == NalAction.KEEP) {
|
||||
ensureOutputCapacity(outputLen + 4 + nalLen)
|
||||
writeInt32BE(outputBuf, outputLen, nalLen)
|
||||
outputLen += 4
|
||||
System.arraycopy(sampleBuf, nalStart, outputBuf, outputLen, nalLen)
|
||||
normalizeLayerId(outputBuf, outputLen)
|
||||
outputLen += nalLen
|
||||
kept++
|
||||
} else if (action == NalAction.CONVERT) {
|
||||
val convertedLen = convertRpuIntoOutput(nalStart, nalLen, outputLen + 4)
|
||||
if (convertedLen >= 0) {
|
||||
writeInt32BE(outputBuf, outputLen, convertedLen)
|
||||
outputLen += 4
|
||||
normalizeLayerId(outputBuf, outputLen)
|
||||
outputLen += convertedLen
|
||||
convertedRpuCount++
|
||||
kept++
|
||||
} else {
|
||||
strippedNalCount++
|
||||
stripped++
|
||||
}
|
||||
} else {
|
||||
strippedNalCount++
|
||||
stripped++
|
||||
}
|
||||
|
||||
pos += 4 + nalLen
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a 24-byte DOVIDecoderConfigurationRecord for DV Profile 8.1.
|
||||
*
|
||||
* Binary layout (from Dolby Vision spec):
|
||||
* byte[0]: dv_version_major = 1
|
||||
* byte[1]: dv_version_minor = 0
|
||||
* byte[2]: dv_profile (7 bits) | dv_level MSB (1 bit)
|
||||
* byte[3]: dv_level low 5 bits (5 bits) | rpu_present (1) | el_present (1) | bl_present (1)
|
||||
* byte[4]: bl_compatibility_id (4 bits) | md_compression (2 bits) | reserved (2 bits)
|
||||
* byte[5-23]: reserved (zeros)
|
||||
*/
|
||||
private fun buildDv81ConfigRecord(level: Int): ByteArray {
|
||||
val record = ByteArray(24)
|
||||
record[0] = 0x01 // dv_version_major = 1
|
||||
record[1] = 0x00 // dv_version_minor = 0
|
||||
record[2] = ((8 shl 1) or ((level ushr 5) and 0x01)).toByte() // profile=8 | level MSB
|
||||
record[3] = (((level and 0x1F) shl 3) or 0x05).toByte() // level low 5 | rpu=1 el=0 bl=1
|
||||
record[4] = (1 shl 4).toByte() // bl_compatibility_id=1 (HDR10)
|
||||
// bytes 5-23 remain 0 (reserved)
|
||||
return record
|
||||
sampleCount++
|
||||
if (sampleCount <= 3 || (sampleCount % 500 == 0L)) {
|
||||
Log.d(
|
||||
TAG,
|
||||
"Sample #$sampleCount (LenPrefix): ${dataLen}B -> ${outputLen}B, " +
|
||||
"kept=$kept stripped=$stripped NALs"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private enum class NalAction { KEEP, STRIP, CONVERT }
|
||||
|
||||
private fun convertRpuIntoOutput(nalStart: Int, nalLen: Int, outputOffset: Int): Int {
|
||||
ensureOutputCapacity(outputOffset + MAX_CONVERTED_RPU_SIZE)
|
||||
|
||||
var retriedAfterResize = false
|
||||
while (true) {
|
||||
val startNs = System.nanoTime()
|
||||
val written = DoviBridge.convertRpuNalu(
|
||||
payload = sampleBuf,
|
||||
payloadOffset = nalStart,
|
||||
payloadLength = nalLen,
|
||||
output = outputBuf,
|
||||
outputOffset = outputOffset,
|
||||
outputCapacity = outputBuf.size,
|
||||
mode = LIBDOVI_MODE_TO_81
|
||||
)
|
||||
totalRpuConversionTimeUs += (System.nanoTime() - startNs) / 1_000L
|
||||
rpuConversionCallCount++
|
||||
|
||||
if (written >= 0) return written
|
||||
|
||||
if (written == DoviBridge.DESTINATION_TOO_SMALL) {
|
||||
rpuOutputTooSmallCount++
|
||||
if (!retriedAfterResize) {
|
||||
val doubled = if (outputBuf.size <= Int.MAX_VALUE / 2) outputBuf.size * 2 else Int.MAX_VALUE
|
||||
ensureOutputCapacity(maxOf(doubled, outputOffset + MAX_CONVERTED_RPU_SIZE))
|
||||
retriedAfterResize = true
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
rpuConversionFailureCount++
|
||||
return written
|
||||
}
|
||||
}
|
||||
|
||||
private fun recordSampleProcessing(elapsedUs: Long) {
|
||||
totalSampleProcessingTimeUs += elapsedUs
|
||||
if (sampleCount <= 3 || (sampleCount > 0 && sampleCount % 500 == 0L)) {
|
||||
Log.d(
|
||||
TAG,
|
||||
"Perf: avgSample=${averageSampleProcessingTimeUs}us, " +
|
||||
"avgRpu=${averageRpuConversionTimeUs}us, converted=$convertedRpuCount, " +
|
||||
"rpuFailures=$rpuConversionFailureCount, rpuTooSmall=$rpuOutputTooSmallCount"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/** Classify a NAL at sampleBuf[offset..offset+len) without copying. */
|
||||
private fun processNalInline(offset: Int, len: Int): NalAction {
|
||||
if (len < 2) return NalAction.KEEP
|
||||
val nalType = (sampleBuf[offset].toInt() ushr 1) and 0x3F
|
||||
val nuhLayerId = ((sampleBuf[offset].toInt() and 1) shl 5) or
|
||||
((sampleBuf[offset + 1].toInt() ushr 3) and 0x1F)
|
||||
return when {
|
||||
nalType == NAL_TYPE_UNSPEC62 && dvMode == DvConversionMode.DV81 -> NalAction.CONVERT
|
||||
nalType == NAL_TYPE_UNSPEC62 || nalType == NAL_TYPE_UNSPEC63 || nuhLayerId > 0 -> NalAction.STRIP
|
||||
else -> NalAction.KEEP
|
||||
}
|
||||
}
|
||||
|
||||
private fun normalizeLayerId(data: ByteArray, offset: Int) {
|
||||
if (data.size - offset >= 2) {
|
||||
data[offset] = (data[offset].toInt() and 0xFE).toByte()
|
||||
data[offset + 1] = (data[offset + 1].toInt() and 0x07).toByte()
|
||||
}
|
||||
}
|
||||
|
||||
private fun writeInt32BE(buf: ByteArray, offset: Int, value: Int) {
|
||||
buf[offset] = ((value ushr 24) and 0xFF).toByte()
|
||||
buf[offset + 1] = ((value ushr 16) and 0xFF).toByte()
|
||||
buf[offset + 2] = ((value ushr 8) and 0xFF).toByte()
|
||||
buf[offset + 3] = (value and 0xFF).toByte()
|
||||
}
|
||||
|
||||
private fun ensureSampleCapacity(needed: Int) {
|
||||
if (sampleBuf.size < needed) {
|
||||
sampleBuf = sampleBuf.copyOf(maxOf(needed, sampleBuf.size * 2))
|
||||
}
|
||||
}
|
||||
|
||||
private fun ensureOutputCapacity(needed: Int) {
|
||||
if (outputBuf.size < needed) {
|
||||
outputBuf = outputBuf.copyOf(maxOf(needed, outputBuf.size * 2))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a 24-byte DOVIDecoderConfigurationRecord for DV Profile 8.1.
|
||||
*
|
||||
* Binary layout (from Dolby Vision spec):
|
||||
* byte[0]: dv_version_major = 1
|
||||
* byte[1]: dv_version_minor = 0
|
||||
* byte[2]: dv_profile (7 bits) | dv_level MSB (1 bit)
|
||||
* byte[3]: dv_level low 5 bits (5 bits) | rpu_present (1) | el_present (1) | bl_present (1)
|
||||
* byte[4]: bl_compatibility_id (4 bits) | md_compression (2 bits) | reserved (2 bits)
|
||||
* byte[5-23]: reserved (zeros)
|
||||
*/
|
||||
private fun buildDv81ConfigRecord(level: Int): ByteArray {
|
||||
val record = ByteArray(24)
|
||||
record[0] = 0x01 // dv_version_major = 1
|
||||
record[1] = 0x00 // dv_version_minor = 0
|
||||
record[2] = ((8 shl 1) or ((level ushr 5) and 0x01)).toByte() // profile=8 | level MSB
|
||||
record[3] = (((level and 0x1F) shl 3) or 0x05).toByte() // level low 5 | rpu=1 el=0 bl=1
|
||||
record[4] = (1 shl 4).toByte() // bl_compatibility_id=1 (HDR10)
|
||||
// bytes 5-23 remain 0 (reserved)
|
||||
return record
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,22 +14,22 @@ import androidx.media3.extractor.TrackOutput
|
||||
* Shared by DoviExtractorWrapper for both MP4 and MKV containers.
|
||||
*/
|
||||
class DoviExtractorOutputWrapper(
|
||||
private val delegate: ExtractorOutput,
|
||||
private val dvMode: DvConversionMode,
|
||||
private val onVideoTrackWrapped: (DoviConvertingTrackOutput) -> Unit,
|
||||
private val delegate: ExtractorOutput,
|
||||
private val dvMode: DvConversionMode,
|
||||
private val onVideoTrackWrapped: (DoviConvertingTrackOutput) -> Unit
|
||||
) : ExtractorOutput {
|
||||
override fun track(id: Int, type: Int): TrackOutput {
|
||||
val original = delegate.track(id, type)
|
||||
if (type == C.TRACK_TYPE_VIDEO) {
|
||||
val wrapper = DoviConvertingTrackOutput(original, dvMode)
|
||||
onVideoTrackWrapped(wrapper)
|
||||
return wrapper
|
||||
}
|
||||
return original
|
||||
override fun track(id: Int, type: Int): TrackOutput {
|
||||
val original = delegate.track(id, type)
|
||||
if (type == C.TRACK_TYPE_VIDEO) {
|
||||
val wrapper = DoviConvertingTrackOutput(original, dvMode)
|
||||
onVideoTrackWrapped(wrapper)
|
||||
return wrapper
|
||||
}
|
||||
return original
|
||||
}
|
||||
|
||||
override fun endTracks() = delegate.endTracks()
|
||||
override fun seekMap(seekMap: SeekMap) = delegate.seekMap(seekMap)
|
||||
override fun endTracks() = delegate.endTracks()
|
||||
override fun seekMap(seekMap: SeekMap) = delegate.seekMap(seekMap)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,23 +38,22 @@ class DoviExtractorOutputWrapper(
|
||||
* DV Profile 7 → 8.1 conversion via inline NAL processing.
|
||||
*/
|
||||
class DoviExtractorWrapper(
|
||||
private val delegate: Extractor,
|
||||
private val dvMode: DvConversionMode = DvConversionMode.HEVC_STRIP,
|
||||
private val delegate: Extractor,
|
||||
private val dvMode: DvConversionMode = DvConversionMode.HEVC_STRIP
|
||||
) : Extractor {
|
||||
|
||||
@Volatile var doviTrackOutput: DoviConvertingTrackOutput? = null
|
||||
private set
|
||||
@Volatile var doviTrackOutput: DoviConvertingTrackOutput? = null
|
||||
private set
|
||||
|
||||
override fun sniff(input: ExtractorInput): Boolean = delegate.sniff(input)
|
||||
override fun sniff(input: ExtractorInput): Boolean = delegate.sniff(input)
|
||||
|
||||
override fun init(output: ExtractorOutput) {
|
||||
delegate.init(DoviExtractorOutputWrapper(output, dvMode) { doviTrackOutput = it })
|
||||
}
|
||||
override fun init(output: ExtractorOutput) {
|
||||
delegate.init(DoviExtractorOutputWrapper(output, dvMode) { doviTrackOutput = it })
|
||||
}
|
||||
|
||||
override fun read(input: ExtractorInput, seekPosition: PositionHolder): Int =
|
||||
delegate.read(input, seekPosition)
|
||||
override fun read(input: ExtractorInput, seekPosition: PositionHolder): Int = delegate.read(input, seekPosition)
|
||||
|
||||
override fun seek(position: Long, timeUs: Long) = delegate.seek(position, timeUs)
|
||||
override fun seek(position: Long, timeUs: Long) = delegate.seek(position, timeUs)
|
||||
|
||||
override fun release() = delegate.release()
|
||||
override fun release() = delegate.release()
|
||||
}
|
||||
|
||||
@@ -2,11 +2,13 @@ package com.edde746.plezy.exoplayer
|
||||
|
||||
import android.content.Context
|
||||
import android.media.AudioDeviceInfo
|
||||
import android.os.Build
|
||||
import androidx.annotation.OptIn
|
||||
import androidx.media3.common.PlaybackParameters
|
||||
import androidx.media3.common.util.Clock
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
import androidx.media3.exoplayer.DefaultRenderersFactory
|
||||
import androidx.media3.exoplayer.Renderer
|
||||
import androidx.media3.exoplayer.analytics.PlayerId
|
||||
import androidx.media3.exoplayer.audio.AudioOutput
|
||||
import androidx.media3.exoplayer.audio.AudioOutputProvider
|
||||
@@ -17,39 +19,43 @@ import androidx.media3.exoplayer.audio.DefaultAudioTrackBufferSizeProvider
|
||||
import androidx.media3.exoplayer.audio.ForwardingAudioSink
|
||||
import java.nio.ByteBuffer
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
import kotlin.math.abs
|
||||
|
||||
@OptIn(UnstableApi::class)
|
||||
class PlezyRenderersFactory(context: Context) : DefaultRenderersFactory(context) {
|
||||
|
||||
override fun buildAudioSink(
|
||||
context: Context,
|
||||
enableFloatOutput: Boolean,
|
||||
enableAudioOutputPlaybackParams: Boolean
|
||||
): AudioSink {
|
||||
AudioTrackAudioOutputProvider.failOnSpuriousAudioTimestamp = false
|
||||
/** Audio delay in microseconds. Shared with PositionFixAudioSink for live updates. */
|
||||
val audioDelayUs = AtomicLong(0L)
|
||||
|
||||
val bufferSizeProvider = DefaultAudioTrackBufferSizeProvider.Builder()
|
||||
.setMinPcmBufferDurationUs(500_000)
|
||||
.setMaxPcmBufferDurationUs(1_500_000)
|
||||
.setPcmBufferMultiplicationFactor(8)
|
||||
.build()
|
||||
override fun buildAudioSink(
|
||||
context: Context,
|
||||
enableFloatOutput: Boolean,
|
||||
enableAudioOutputPlaybackParams: Boolean
|
||||
): AudioSink {
|
||||
AudioTrackAudioOutputProvider.failOnSpuriousAudioTimestamp = false
|
||||
|
||||
val realProvider = AudioTrackAudioOutputProvider.Builder(context)
|
||||
.setAudioTrackBufferSizeProvider(bufferSizeProvider)
|
||||
.build()
|
||||
val bufferSizeProvider = DefaultAudioTrackBufferSizeProvider.Builder()
|
||||
.setMinPcmBufferDurationUs(500_000)
|
||||
.setMaxPcmBufferDurationUs(1_000_000)
|
||||
.setPcmBufferMultiplicationFactor(4)
|
||||
.build()
|
||||
|
||||
// Shared position: RawPositionAudioOutput writes the raw AudioTrack position,
|
||||
// PositionFixAudioSink reads it to bypass DefaultAudioSink's writtenDuration clamp.
|
||||
val rawPositionUs = AtomicLong(Long.MIN_VALUE)
|
||||
val realProvider = AudioTrackAudioOutputProvider.Builder(context)
|
||||
.setAudioTrackBufferSizeProvider(bufferSizeProvider)
|
||||
.build()
|
||||
|
||||
val defaultSink = DefaultAudioSink.Builder(context)
|
||||
.setEnableFloatOutput(enableFloatOutput)
|
||||
.setEnableAudioOutputPlaybackParameters(enableAudioOutputPlaybackParams)
|
||||
.setAudioOutputProvider(RawPositionOutputProvider(realProvider, rawPositionUs))
|
||||
.build()
|
||||
// Shared position: RawPositionAudioOutput writes the raw AudioTrack position,
|
||||
// PositionFixAudioSink reads it to bypass DefaultAudioSink's writtenDuration clamp.
|
||||
val rawPositionUs = AtomicLong(Long.MIN_VALUE)
|
||||
|
||||
return PositionFixAudioSink(defaultSink, rawPositionUs)
|
||||
}
|
||||
val defaultSink = DefaultAudioSink.Builder(context)
|
||||
.setEnableFloatOutput(enableFloatOutput)
|
||||
.setEnableAudioOutputPlaybackParameters(enableAudioOutputPlaybackParams)
|
||||
.setAudioOutputProvider(RawPositionOutputProvider(realProvider, rawPositionUs))
|
||||
.build()
|
||||
|
||||
return PositionFixAudioSink(defaultSink, rawPositionUs, audioDelayUs)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,186 +81,262 @@ class PlezyRenderersFactory(context: Context) : DefaultRenderersFactory(context)
|
||||
*/
|
||||
@OptIn(UnstableApi::class)
|
||||
private class PositionFixAudioSink(
|
||||
sink: AudioSink,
|
||||
private val rawPositionUs: AtomicLong
|
||||
sink: AudioSink,
|
||||
private val rawPositionUs: AtomicLong,
|
||||
private val audioDelayUs: AtomicLong
|
||||
) : ForwardingAudioSink(sink) {
|
||||
|
||||
private var startMediaTimeUs = Long.MIN_VALUE
|
||||
private var suppressedErrorCount = 0
|
||||
private var startMediaTimeUs = Long.MIN_VALUE
|
||||
private var suppressedErrorCount = 0
|
||||
|
||||
// Speed tracking for position bypass
|
||||
private var currentSpeed = 1.0f
|
||||
private var refMediaTimeUs = Long.MIN_VALUE
|
||||
private var refRawPositionUs = 0L
|
||||
// Speed tracking for position bypass
|
||||
private var currentSpeed = 1.0f
|
||||
private var refMediaTimeUs = Long.MIN_VALUE
|
||||
private var refRawPositionUs = 0L
|
||||
|
||||
override fun handleBuffer(
|
||||
buffer: ByteBuffer,
|
||||
presentationTimeUs: Long,
|
||||
encodedAccessUnitCount: Int
|
||||
): Boolean {
|
||||
if (startMediaTimeUs == Long.MIN_VALUE) {
|
||||
startMediaTimeUs = presentationTimeUs
|
||||
refMediaTimeUs = presentationTimeUs
|
||||
refRawPositionUs = 0
|
||||
// Transient counter-offset: after seek/flush, ramp offset from 0 to full
|
||||
// over recoveryDurationUs to prevent video frame drops.
|
||||
private var recoveryDurationUs = 0L
|
||||
|
||||
override fun handleBuffer(
|
||||
buffer: ByteBuffer,
|
||||
presentationTimeUs: Long,
|
||||
encodedAccessUnitCount: Int
|
||||
): Boolean {
|
||||
if (startMediaTimeUs == Long.MIN_VALUE) {
|
||||
startMediaTimeUs = presentationTimeUs
|
||||
refMediaTimeUs = presentationTimeUs
|
||||
refRawPositionUs = 0
|
||||
val delayUs = audioDelayUs.get()
|
||||
recoveryDurationUs = if (delayUs == 0L) 0L else maxOf(200_000L, 2L * abs(delayUs))
|
||||
}
|
||||
return super.handleBuffer(buffer, presentationTimeUs, encodedAccessUnitCount)
|
||||
}
|
||||
|
||||
override fun setPlaybackParameters(playbackParameters: PlaybackParameters) {
|
||||
// Capture reference point before speed changes
|
||||
val rawPos = rawPositionUs.get()
|
||||
if (rawPos > 0 && refMediaTimeUs != Long.MIN_VALUE) {
|
||||
refMediaTimeUs = refMediaTimeUs + ((rawPos - refRawPositionUs) * currentSpeed).toLong()
|
||||
refRawPositionUs = rawPos
|
||||
}
|
||||
currentSpeed = playbackParameters.speed
|
||||
super.setPlaybackParameters(playbackParameters)
|
||||
}
|
||||
|
||||
override fun getCurrentPositionUs(sourceEnded: Boolean): Long {
|
||||
val delegatePos = super.getCurrentPositionUs(sourceEnded)
|
||||
if (delegatePos == Long.MIN_VALUE || refMediaTimeUs == Long.MIN_VALUE) {
|
||||
return delegatePos
|
||||
}
|
||||
|
||||
val rawPos = rawPositionUs.get()
|
||||
val basePos = if (rawPos <= 0) {
|
||||
delegatePos
|
||||
} else {
|
||||
val expectedPos = refMediaTimeUs + ((rawPos - refRawPositionUs) * currentSpeed).toLong()
|
||||
if (expectedPos > delegatePos + 30_000) expectedPos else delegatePos
|
||||
}
|
||||
|
||||
// Audio delay with transient counter-offset to prevent frame drops after seeks.
|
||||
// After flush, offset ramps linearly from 0 to full over recoveryDurationUs.
|
||||
val delayUs = audioDelayUs.get()
|
||||
if (delayUs == 0L) return basePos
|
||||
|
||||
val elapsedUs = basePos - startMediaTimeUs
|
||||
val netOffsetUs = if (recoveryDurationUs <= 0L || elapsedUs >= recoveryDurationUs) {
|
||||
delayUs
|
||||
} else {
|
||||
(delayUs * elapsedUs) / recoveryDurationUs
|
||||
}
|
||||
return basePos + netOffsetUs
|
||||
}
|
||||
|
||||
// --- Suppress timestamp discontinuity errors ---
|
||||
|
||||
override fun setListener(listener: AudioSink.Listener) {
|
||||
super.setListener(
|
||||
@OptIn(UnstableApi::class) object : AudioSink.Listener {
|
||||
override fun onPositionDiscontinuity() = listener.onPositionDiscontinuity()
|
||||
override fun onPositionAdvancing(playoutStartSystemTimeUs: Long) = listener.onPositionAdvancing(playoutStartSystemTimeUs)
|
||||
override fun onUnderrun(bufferSize: Int, bufferSizeMs: Long, elapsedSinceLastFeedMs: Long) = listener.onUnderrun(bufferSize, bufferSizeMs, elapsedSinceLastFeedMs)
|
||||
override fun onSkipSilenceEnabledChanged(skipSilenceEnabled: Boolean) = listener.onSkipSilenceEnabledChanged(skipSilenceEnabled)
|
||||
override fun onOffloadBufferEmptying() = listener.onOffloadBufferEmptying()
|
||||
override fun onOffloadBufferFull() = listener.onOffloadBufferFull()
|
||||
override fun onAudioCapabilitiesChanged() = listener.onAudioCapabilitiesChanged()
|
||||
override fun onAudioTrackInitialized(audioTrackConfig: AudioSink.AudioTrackConfig) = listener.onAudioTrackInitialized(audioTrackConfig)
|
||||
override fun onAudioTrackReleased(audioTrackConfig: AudioSink.AudioTrackConfig) = listener.onAudioTrackReleased(audioTrackConfig)
|
||||
override fun onSilenceSkipped() = listener.onSilenceSkipped()
|
||||
override fun onAudioSessionIdChanged(audioSessionId: Int) = listener.onAudioSessionIdChanged(audioSessionId)
|
||||
|
||||
override fun onAudioSinkError(audioSinkError: Exception) {
|
||||
if (isTimestampDiscontinuity(audioSinkError)) {
|
||||
suppressedErrorCount++
|
||||
return
|
||||
}
|
||||
listener.onAudioSinkError(audioSinkError)
|
||||
}
|
||||
return super.handleBuffer(buffer, presentationTimeUs, encodedAccessUnitCount)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
override fun setPlaybackParameters(playbackParameters: PlaybackParameters) {
|
||||
// Capture reference point before speed changes
|
||||
val rawPos = rawPositionUs.get()
|
||||
if (rawPos > 0 && refMediaTimeUs != Long.MIN_VALUE) {
|
||||
refMediaTimeUs = refMediaTimeUs + ((rawPos - refRawPositionUs) * currentSpeed).toLong()
|
||||
refRawPositionUs = rawPos
|
||||
}
|
||||
currentSpeed = playbackParameters.speed
|
||||
super.setPlaybackParameters(playbackParameters)
|
||||
}
|
||||
override fun flush() {
|
||||
startMediaTimeUs = Long.MIN_VALUE
|
||||
refMediaTimeUs = Long.MIN_VALUE
|
||||
refRawPositionUs = 0
|
||||
recoveryDurationUs = 0L
|
||||
rawPositionUs.set(Long.MIN_VALUE)
|
||||
super.flush()
|
||||
}
|
||||
|
||||
override fun getCurrentPositionUs(sourceEnded: Boolean): Long {
|
||||
val delegatePos = super.getCurrentPositionUs(sourceEnded)
|
||||
if (delegatePos == Long.MIN_VALUE || refMediaTimeUs == Long.MIN_VALUE) {
|
||||
return delegatePos
|
||||
}
|
||||
override fun reset() {
|
||||
startMediaTimeUs = Long.MIN_VALUE
|
||||
refMediaTimeUs = Long.MIN_VALUE
|
||||
refRawPositionUs = 0
|
||||
recoveryDurationUs = 0L
|
||||
currentSpeed = 1.0f
|
||||
rawPositionUs.set(Long.MIN_VALUE)
|
||||
suppressedErrorCount = 0
|
||||
super.reset()
|
||||
}
|
||||
|
||||
val rawPos = rawPositionUs.get()
|
||||
if (rawPos <= 0) return delegatePos
|
||||
private fun isTimestampDiscontinuity(e: Exception): Boolean {
|
||||
val name = e.javaClass.simpleName
|
||||
val msg = e.message ?: ""
|
||||
return name == "InvalidAudioTrackTimestampException" ||
|
||||
name == "UnexpectedDiscontinuityException" ||
|
||||
msg.contains("timestamp discontinuity", ignoreCase = true)
|
||||
}
|
||||
}
|
||||
|
||||
val expectedPos = refMediaTimeUs + ((rawPos - refRawPositionUs) * currentSpeed).toLong()
|
||||
return if (expectedPos > delegatePos + 30_000) expectedPos else delegatePos
|
||||
}
|
||||
|
||||
// --- Suppress timestamp discontinuity errors ---
|
||||
|
||||
override fun setListener(listener: AudioSink.Listener) {
|
||||
super.setListener(@OptIn(UnstableApi::class) object : AudioSink.Listener {
|
||||
override fun onPositionDiscontinuity() = listener.onPositionDiscontinuity()
|
||||
override fun onPositionAdvancing(playoutStartSystemTimeUs: Long) = listener.onPositionAdvancing(playoutStartSystemTimeUs)
|
||||
override fun onUnderrun(bufferSize: Int, bufferSizeMs: Long, elapsedSinceLastFeedMs: Long) = listener.onUnderrun(bufferSize, bufferSizeMs, elapsedSinceLastFeedMs)
|
||||
override fun onSkipSilenceEnabledChanged(skipSilenceEnabled: Boolean) = listener.onSkipSilenceEnabledChanged(skipSilenceEnabled)
|
||||
override fun onOffloadBufferEmptying() = listener.onOffloadBufferEmptying()
|
||||
override fun onOffloadBufferFull() = listener.onOffloadBufferFull()
|
||||
override fun onAudioCapabilitiesChanged() = listener.onAudioCapabilitiesChanged()
|
||||
override fun onAudioTrackInitialized(audioTrackConfig: AudioSink.AudioTrackConfig) = listener.onAudioTrackInitialized(audioTrackConfig)
|
||||
override fun onAudioTrackReleased(audioTrackConfig: AudioSink.AudioTrackConfig) = listener.onAudioTrackReleased(audioTrackConfig)
|
||||
override fun onSilenceSkipped() = listener.onSilenceSkipped()
|
||||
override fun onAudioSessionIdChanged(audioSessionId: Int) = listener.onAudioSessionIdChanged(audioSessionId)
|
||||
|
||||
override fun onAudioSinkError(audioSinkError: Exception) {
|
||||
if (isTimestampDiscontinuity(audioSinkError)) {
|
||||
suppressedErrorCount++
|
||||
return
|
||||
}
|
||||
listener.onAudioSinkError(audioSinkError)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun flush() {
|
||||
startMediaTimeUs = Long.MIN_VALUE
|
||||
refMediaTimeUs = Long.MIN_VALUE
|
||||
refRawPositionUs = 0
|
||||
rawPositionUs.set(Long.MIN_VALUE)
|
||||
super.flush()
|
||||
}
|
||||
|
||||
override fun reset() {
|
||||
startMediaTimeUs = Long.MIN_VALUE
|
||||
refMediaTimeUs = Long.MIN_VALUE
|
||||
refRawPositionUs = 0
|
||||
currentSpeed = 1.0f
|
||||
rawPositionUs.set(Long.MIN_VALUE)
|
||||
suppressedErrorCount = 0
|
||||
super.reset()
|
||||
}
|
||||
|
||||
private fun isTimestampDiscontinuity(e: Exception): Boolean {
|
||||
val name = e.javaClass.simpleName
|
||||
val msg = e.message ?: ""
|
||||
return name == "InvalidAudioTrackTimestampException" ||
|
||||
name == "UnexpectedDiscontinuityException" ||
|
||||
msg.contains("timestamp discontinuity", ignoreCase = true)
|
||||
}
|
||||
/**
|
||||
* Wraps a text renderer to shift subtitle timing by [delayUs] microseconds.
|
||||
* Positive delay → subtitles appear later, negative → earlier.
|
||||
* Only render() needs the offset — the text renderer uses positionUs to decide
|
||||
* which cues are active; other Renderer methods are timing-independent.
|
||||
*/
|
||||
@OptIn(UnstableApi::class)
|
||||
internal class SubtitleDelayRenderer(
|
||||
private val delegate: Renderer,
|
||||
private val delayUs: AtomicLong
|
||||
) : Renderer by delegate {
|
||||
override fun render(positionUs: Long, elapsedRealtimeUs: Long) {
|
||||
delegate.render(positionUs - delayUs.get(), elapsedRealtimeUs)
|
||||
}
|
||||
}
|
||||
|
||||
// --- AudioOutput wrapping: shares raw position with PositionFixAudioSink ---
|
||||
// Also implements AudioTrack reuse across seeks to avoid expensive teardown/recreation.
|
||||
// DefaultAudioSink releases the AudioOutput on every flush (seek), which destroys the
|
||||
// AudioTrack and creates a new one. On Android TV with tunneled playback, this causes
|
||||
// 7-10s audio dropout while the hardware pipeline reinitializes (Sony Bravia, etc).
|
||||
// By flushing instead of releasing and caching the output, we skip the teardown cycle.
|
||||
|
||||
@OptIn(UnstableApi::class)
|
||||
private class RawPositionOutputProvider(
|
||||
private val delegate: AudioOutputProvider,
|
||||
private val rawPositionUs: AtomicLong
|
||||
private val delegate: AudioOutputProvider,
|
||||
private val rawPositionUs: AtomicLong
|
||||
) : AudioOutputProvider {
|
||||
|
||||
override fun getFormatSupport(config: AudioOutputProvider.FormatConfig) =
|
||||
delegate.getFormatSupport(config)
|
||||
private var cachedOutput: RawPositionAudioOutput? = null
|
||||
private var cachedConfig: AudioOutputProvider.OutputConfig? = null
|
||||
|
||||
override fun getOutputConfig(config: AudioOutputProvider.FormatConfig) =
|
||||
delegate.getOutputConfig(config)
|
||||
override fun getFormatSupport(config: AudioOutputProvider.FormatConfig) = delegate.getFormatSupport(config)
|
||||
|
||||
override fun getAudioOutput(config: AudioOutputProvider.OutputConfig): AudioOutput {
|
||||
val realOutput = delegate.getAudioOutput(config)
|
||||
return RawPositionAudioOutput(realOutput, rawPositionUs)
|
||||
override fun getOutputConfig(config: AudioOutputProvider.FormatConfig) = delegate.getOutputConfig(config)
|
||||
|
||||
override fun getAudioOutput(config: AudioOutputProvider.OutputConfig): AudioOutput {
|
||||
val cached = cachedOutput
|
||||
if (cached != null && cachedConfig == config) {
|
||||
cachedOutput = null
|
||||
return cached
|
||||
}
|
||||
cached?.forceRelease()
|
||||
cachedOutput = null
|
||||
|
||||
override fun addListener(listener: AudioOutputProvider.Listener) =
|
||||
delegate.addListener(listener)
|
||||
val realOutput = delegate.getAudioOutput(config)
|
||||
cachedConfig = config
|
||||
return RawPositionAudioOutput(realOutput, rawPositionUs, this)
|
||||
}
|
||||
|
||||
override fun removeListener(listener: AudioOutputProvider.Listener) =
|
||||
delegate.removeListener(listener)
|
||||
fun returnToCache(output: RawPositionAudioOutput) {
|
||||
val existing = cachedOutput
|
||||
if (existing != null && existing !== output) {
|
||||
existing.forceRelease()
|
||||
}
|
||||
cachedOutput = output
|
||||
}
|
||||
|
||||
override fun setClock(clock: Clock) = delegate.setClock(clock)
|
||||
override fun addListener(listener: AudioOutputProvider.Listener) = delegate.addListener(listener)
|
||||
|
||||
override fun release() = delegate.release()
|
||||
override fun removeListener(listener: AudioOutputProvider.Listener) = delegate.removeListener(listener)
|
||||
|
||||
override fun setClock(clock: Clock) = delegate.setClock(clock)
|
||||
|
||||
override fun release() {
|
||||
cachedOutput?.forceRelease()
|
||||
cachedOutput = null
|
||||
cachedConfig = null
|
||||
delegate.release()
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(UnstableApi::class)
|
||||
private class RawPositionAudioOutput(
|
||||
private val delegate: AudioOutput,
|
||||
private val rawPositionUs: AtomicLong
|
||||
private val delegate: AudioOutput,
|
||||
private val rawPositionUs: AtomicLong,
|
||||
private val provider: RawPositionOutputProvider
|
||||
) : AudioOutput {
|
||||
|
||||
override fun getPositionUs(): Long {
|
||||
val pos = delegate.getPositionUs()
|
||||
rawPositionUs.set(pos)
|
||||
return pos
|
||||
override fun getPositionUs(): Long {
|
||||
val pos = delegate.getPositionUs()
|
||||
rawPositionUs.set(pos)
|
||||
return pos
|
||||
}
|
||||
|
||||
override fun play() = delegate.play()
|
||||
override fun pause() = delegate.pause()
|
||||
|
||||
@Throws(AudioOutput.WriteException::class)
|
||||
override fun write(buffer: ByteBuffer, size: Int, presentationTimeUs: Long) = delegate.write(buffer, size, presentationTimeUs)
|
||||
|
||||
override fun flush() {
|
||||
rawPositionUs.set(Long.MIN_VALUE)
|
||||
delegate.flush()
|
||||
}
|
||||
|
||||
override fun stop() = delegate.stop()
|
||||
|
||||
override fun release() {
|
||||
rawPositionUs.set(Long.MIN_VALUE)
|
||||
if (Build.VERSION.SDK_INT >= 25) {
|
||||
delegate.stop()
|
||||
delegate.flush()
|
||||
provider.returnToCache(this)
|
||||
} else {
|
||||
delegate.release()
|
||||
}
|
||||
}
|
||||
|
||||
override fun play() = delegate.play()
|
||||
override fun pause() = delegate.pause()
|
||||
fun forceRelease() {
|
||||
rawPositionUs.set(Long.MIN_VALUE)
|
||||
delegate.release()
|
||||
}
|
||||
|
||||
@Throws(AudioOutput.WriteException::class)
|
||||
override fun write(buffer: ByteBuffer, size: Int, presentationTimeUs: Long) =
|
||||
delegate.write(buffer, size, presentationTimeUs)
|
||||
|
||||
override fun flush() {
|
||||
rawPositionUs.set(Long.MIN_VALUE)
|
||||
delegate.flush()
|
||||
}
|
||||
|
||||
override fun stop() = delegate.stop()
|
||||
|
||||
override fun release() {
|
||||
rawPositionUs.set(Long.MIN_VALUE)
|
||||
delegate.release()
|
||||
}
|
||||
|
||||
override fun setVolume(volume: Float) = delegate.setVolume(volume)
|
||||
override fun isOffloadedPlayback() = delegate.isOffloadedPlayback()
|
||||
override fun getAudioSessionId() = delegate.getAudioSessionId()
|
||||
override fun getSampleRate() = delegate.getSampleRate()
|
||||
override fun getBufferSizeInFrames() = delegate.getBufferSizeInFrames()
|
||||
override fun getPlaybackParameters() = delegate.getPlaybackParameters()
|
||||
override fun isStalled() = delegate.isStalled()
|
||||
override fun addListener(listener: AudioOutput.Listener) = delegate.addListener(listener)
|
||||
override fun removeListener(listener: AudioOutput.Listener) = delegate.removeListener(listener)
|
||||
override fun setPlaybackParameters(playbackParameters: PlaybackParameters) =
|
||||
delegate.setPlaybackParameters(playbackParameters)
|
||||
override fun setOffloadDelayPadding(delayInFrames: Int, paddingInFrames: Int) =
|
||||
delegate.setOffloadDelayPadding(delayInFrames, paddingInFrames)
|
||||
override fun setOffloadEndOfStream() = delegate.setOffloadEndOfStream()
|
||||
override fun setPlayerId(playerId: PlayerId) = delegate.setPlayerId(playerId)
|
||||
override fun attachAuxEffect(effectId: Int) = delegate.attachAuxEffect(effectId)
|
||||
override fun setAuxEffectSendLevel(level: Float) = delegate.setAuxEffectSendLevel(level)
|
||||
override fun setPreferredDevice(preferredDevice: AudioDeviceInfo?) =
|
||||
delegate.setPreferredDevice(preferredDevice)
|
||||
override fun setVolume(volume: Float) = delegate.setVolume(volume)
|
||||
override fun isOffloadedPlayback() = delegate.isOffloadedPlayback()
|
||||
override fun getAudioSessionId() = delegate.getAudioSessionId()
|
||||
override fun getSampleRate() = delegate.getSampleRate()
|
||||
override fun getBufferSizeInFrames() = delegate.getBufferSizeInFrames()
|
||||
override fun getPlaybackParameters() = delegate.getPlaybackParameters()
|
||||
override fun isStalled() = delegate.isStalled()
|
||||
override fun addListener(listener: AudioOutput.Listener) = delegate.addListener(listener)
|
||||
override fun removeListener(listener: AudioOutput.Listener) = delegate.removeListener(listener)
|
||||
override fun setPlaybackParameters(playbackParameters: PlaybackParameters) = delegate.setPlaybackParameters(playbackParameters)
|
||||
override fun setOffloadDelayPadding(delayInFrames: Int, paddingInFrames: Int) = delegate.setOffloadDelayPadding(delayInFrames, paddingInFrames)
|
||||
override fun setOffloadEndOfStream() = delegate.setOffloadEndOfStream()
|
||||
override fun setPlayerId(playerId: PlayerId) = delegate.setPlayerId(playerId)
|
||||
override fun attachAuxEffect(effectId: Int) = delegate.attachAuxEffect(effectId)
|
||||
override fun setAuxEffectSendLevel(level: Float) = delegate.setAuxEffectSendLevel(level)
|
||||
override fun setPreferredDevice(preferredDevice: AudioDeviceInfo?) = delegate.setPreferredDevice(preferredDevice)
|
||||
}
|
||||
|
||||
@@ -16,108 +16,115 @@ import java.util.zip.Inflater
|
||||
* All buffers are reused across samples to minimize GC pressure on the hot path.
|
||||
*/
|
||||
class ZlibInflatingTrackOutput(
|
||||
private val delegate: TrackOutput,
|
||||
private val delegate: TrackOutput
|
||||
) : TrackOutput {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "ZlibTrackOutput"
|
||||
private const val INITIAL_BUFFER_SIZE = 256 * 1024
|
||||
private const val INFLATE_CHUNK = 64 * 1024
|
||||
companion object {
|
||||
private const val TAG = "ZlibTrackOutput"
|
||||
private const val INITIAL_BUFFER_SIZE = 256 * 1024
|
||||
private const val INFLATE_CHUNK = 64 * 1024
|
||||
}
|
||||
|
||||
var active = false
|
||||
|
||||
private val inflater = Inflater()
|
||||
|
||||
// Reusable buffers — grown as needed, never shrunk
|
||||
private var compressedBuf = ByteArray(INITIAL_BUFFER_SIZE)
|
||||
private var compressedLen = 0
|
||||
private var inflateBuf = ByteArray(INITIAL_BUFFER_SIZE)
|
||||
private var readBuf = ByteArray(INFLATE_CHUNK)
|
||||
private val outputParsable = ParsableByteArray()
|
||||
private var buffering = false
|
||||
|
||||
override fun format(format: Format) = delegate.format(format)
|
||||
|
||||
override fun sampleData(
|
||||
input: DataReader,
|
||||
length: Int,
|
||||
allowEndOfInput: Boolean,
|
||||
sampleDataPart: Int
|
||||
): Int {
|
||||
if (!active) return delegate.sampleData(input, length, allowEndOfInput, sampleDataPart)
|
||||
|
||||
buffering = true
|
||||
if (readBuf.size < length) readBuf = ByteArray(length)
|
||||
val bytesRead = input.read(readBuf, 0, length)
|
||||
if (bytesRead > 0) appendCompressed(readBuf, 0, bytesRead)
|
||||
return bytesRead
|
||||
}
|
||||
|
||||
override fun sampleData(data: ParsableByteArray, length: Int, sampleDataPart: Int) {
|
||||
if (!active) {
|
||||
delegate.sampleData(data, length, sampleDataPart)
|
||||
return
|
||||
}
|
||||
|
||||
var active = false
|
||||
buffering = true
|
||||
ensureCompressedCapacity(compressedLen + length)
|
||||
data.readBytes(compressedBuf, compressedLen, length)
|
||||
compressedLen += length
|
||||
}
|
||||
|
||||
private val inflater = Inflater()
|
||||
|
||||
// Reusable buffers — grown as needed, never shrunk
|
||||
private var compressedBuf = ByteArray(INITIAL_BUFFER_SIZE)
|
||||
private var compressedLen = 0
|
||||
private var inflateBuf = ByteArray(INITIAL_BUFFER_SIZE)
|
||||
private var readBuf = ByteArray(INFLATE_CHUNK)
|
||||
private val outputParsable = ParsableByteArray()
|
||||
private var buffering = false
|
||||
|
||||
override fun format(format: Format) = delegate.format(format)
|
||||
|
||||
override fun sampleData(
|
||||
input: DataReader, length: Int, allowEndOfInput: Boolean, sampleDataPart: Int
|
||||
): Int {
|
||||
if (!active) return delegate.sampleData(input, length, allowEndOfInput, sampleDataPart)
|
||||
|
||||
buffering = true
|
||||
if (readBuf.size < length) readBuf = ByteArray(length)
|
||||
val bytesRead = input.read(readBuf, 0, length)
|
||||
if (bytesRead > 0) appendCompressed(readBuf, 0, bytesRead)
|
||||
return bytesRead
|
||||
override fun sampleMetadata(
|
||||
timeUs: Long,
|
||||
flags: Int,
|
||||
size: Int,
|
||||
offset: Int,
|
||||
cryptoData: TrackOutput.CryptoData?
|
||||
) {
|
||||
if (!active || !buffering) {
|
||||
delegate.sampleMetadata(timeUs, flags, size, offset, cryptoData)
|
||||
return
|
||||
}
|
||||
|
||||
override fun sampleData(data: ParsableByteArray, length: Int, sampleDataPart: Int) {
|
||||
if (!active) {
|
||||
delegate.sampleData(data, length, sampleDataPart)
|
||||
return
|
||||
}
|
||||
buffering = false
|
||||
val srcLen = compressedLen
|
||||
compressedLen = 0
|
||||
|
||||
buffering = true
|
||||
ensureCompressedCapacity(compressedLen + length)
|
||||
data.readBytes(compressedBuf, compressedLen, length)
|
||||
compressedLen += length
|
||||
val inflatedLen = try {
|
||||
inflater.reset()
|
||||
inflater.setInput(compressedBuf, 0, srcLen)
|
||||
var written = 0
|
||||
while (!inflater.finished()) {
|
||||
if (written == inflateBuf.size) growInflateBuf()
|
||||
val count = inflater.inflate(inflateBuf, written, inflateBuf.size - written)
|
||||
if (count == 0 && !inflater.finished()) break
|
||||
written += count
|
||||
}
|
||||
written
|
||||
} catch (e: DataFormatException) {
|
||||
Log.e(TAG, "Zlib inflate failed (${srcLen}B), passing raw", e)
|
||||
// Fall back to raw compressed data
|
||||
ensureInflateCapacity(srcLen)
|
||||
System.arraycopy(compressedBuf, 0, inflateBuf, 0, srcLen)
|
||||
srcLen
|
||||
}
|
||||
|
||||
override fun sampleMetadata(
|
||||
timeUs: Long, flags: Int, size: Int, offset: Int, cryptoData: TrackOutput.CryptoData?
|
||||
) {
|
||||
if (!active || !buffering) {
|
||||
delegate.sampleMetadata(timeUs, flags, size, offset, cryptoData)
|
||||
return
|
||||
}
|
||||
outputParsable.reset(inflateBuf, inflatedLen)
|
||||
delegate.sampleData(outputParsable, inflatedLen, TrackOutput.SAMPLE_DATA_PART_MAIN)
|
||||
delegate.sampleMetadata(timeUs, flags, inflatedLen, 0, cryptoData)
|
||||
}
|
||||
|
||||
buffering = false
|
||||
val srcLen = compressedLen
|
||||
compressedLen = 0
|
||||
private fun appendCompressed(src: ByteArray, offset: Int, length: Int) {
|
||||
ensureCompressedCapacity(compressedLen + length)
|
||||
System.arraycopy(src, offset, compressedBuf, compressedLen, length)
|
||||
compressedLen += length
|
||||
}
|
||||
|
||||
val inflatedLen = try {
|
||||
inflater.reset()
|
||||
inflater.setInput(compressedBuf, 0, srcLen)
|
||||
var written = 0
|
||||
while (!inflater.finished()) {
|
||||
if (written == inflateBuf.size) growInflateBuf()
|
||||
val count = inflater.inflate(inflateBuf, written, inflateBuf.size - written)
|
||||
if (count == 0 && !inflater.finished()) break
|
||||
written += count
|
||||
}
|
||||
written
|
||||
} catch (e: DataFormatException) {
|
||||
Log.e(TAG, "Zlib inflate failed (${srcLen}B), passing raw", e)
|
||||
// Fall back to raw compressed data
|
||||
ensureInflateCapacity(srcLen)
|
||||
System.arraycopy(compressedBuf, 0, inflateBuf, 0, srcLen)
|
||||
srcLen
|
||||
}
|
||||
|
||||
outputParsable.reset(inflateBuf, inflatedLen)
|
||||
delegate.sampleData(outputParsable, inflatedLen, TrackOutput.SAMPLE_DATA_PART_MAIN)
|
||||
delegate.sampleMetadata(timeUs, flags, inflatedLen, 0, cryptoData)
|
||||
private fun ensureCompressedCapacity(needed: Int) {
|
||||
if (compressedBuf.size < needed) {
|
||||
compressedBuf = compressedBuf.copyOf(maxOf(needed, compressedBuf.size * 2))
|
||||
}
|
||||
}
|
||||
|
||||
private fun appendCompressed(src: ByteArray, offset: Int, length: Int) {
|
||||
ensureCompressedCapacity(compressedLen + length)
|
||||
System.arraycopy(src, offset, compressedBuf, compressedLen, length)
|
||||
compressedLen += length
|
||||
private fun ensureInflateCapacity(needed: Int) {
|
||||
if (inflateBuf.size < needed) {
|
||||
inflateBuf = ByteArray(maxOf(needed, inflateBuf.size * 2))
|
||||
}
|
||||
}
|
||||
|
||||
private fun ensureCompressedCapacity(needed: Int) {
|
||||
if (compressedBuf.size < needed) {
|
||||
compressedBuf = compressedBuf.copyOf(maxOf(needed, compressedBuf.size * 2))
|
||||
}
|
||||
}
|
||||
|
||||
private fun ensureInflateCapacity(needed: Int) {
|
||||
if (inflateBuf.size < needed) {
|
||||
inflateBuf = ByteArray(maxOf(needed, inflateBuf.size * 2))
|
||||
}
|
||||
}
|
||||
|
||||
private fun growInflateBuf() {
|
||||
inflateBuf = inflateBuf.copyOf(inflateBuf.size * 2)
|
||||
}
|
||||
private fun growInflateBuf() {
|
||||
inflateBuf = inflateBuf.copyOf(inflateBuf.size * 2)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ import androidx.media3.extractor.ExtractorOutput
|
||||
import androidx.media3.extractor.SeekMap
|
||||
import androidx.media3.extractor.TrackOutput
|
||||
import androidx.media3.extractor.mkv.MatroskaExtractor
|
||||
import androidx.media3.extractor.text.SubtitleParser
|
||||
import io.github.peerless2012.ass.media.AssHandler
|
||||
import io.github.peerless2012.ass.media.extractor.AssMatroskaExtractor
|
||||
import androidx.media3.extractor.text.SubtitleParser
|
||||
|
||||
/**
|
||||
* Extends AssMatroskaExtractor to add support for MKV ContentCompAlgo 0 (zlib).
|
||||
@@ -20,97 +20,97 @@ import androidx.media3.extractor.text.SubtitleParser
|
||||
* - Skips ContentCompSettings for zlib tracks (not applicable)
|
||||
*/
|
||||
class ZlibMatroskaExtractor(
|
||||
subtitleParserFactory: SubtitleParser.Factory,
|
||||
assHandler: AssHandler,
|
||||
subtitleParserFactory: SubtitleParser.Factory,
|
||||
assHandler: AssHandler
|
||||
) : AssMatroskaExtractor(subtitleParserFactory, assHandler) {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "ZlibMkvExtractor"
|
||||
companion object {
|
||||
private const val TAG = "ZlibMkvExtractor"
|
||||
|
||||
// Matroska EBML element IDs
|
||||
private const val ID_SEGMENT = 0x18538067
|
||||
private const val ID_TRACK_ENTRY = 0xAE
|
||||
private const val ID_CONTENT_COMPRESSION_ALGORITHM = 0x4254
|
||||
private const val ID_CONTENT_COMPRESSION_SETTINGS = 0x4255
|
||||
// Matroska EBML element IDs
|
||||
private const val ID_SEGMENT = 0x18538067
|
||||
private const val ID_TRACK_ENTRY = 0xAE
|
||||
private const val ID_CONTENT_COMPRESSION_ALGORITHM = 0x4254
|
||||
private const val ID_CONTENT_COMPRESSION_SETTINGS = 0x4255
|
||||
|
||||
private val extractorOutputField by lazy {
|
||||
MatroskaExtractor::class.java.getDeclaredField("extractorOutput").apply {
|
||||
isAccessible = true
|
||||
}
|
||||
}
|
||||
private val extractorOutputField by lazy {
|
||||
MatroskaExtractor::class.java.getDeclaredField("extractorOutput").apply {
|
||||
isAccessible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var zlibOutput: ZlibExtractorOutputWrapper? = null
|
||||
private var currentTrackUsesZlib = false
|
||||
|
||||
override fun startMasterElement(id: Int, contentPosition: Long, contentSize: Long) {
|
||||
super.startMasterElement(id, contentPosition, contentSize)
|
||||
|
||||
// After super installs AssSubtitleExtractorOutput, wrap it with our zlib layer
|
||||
if (id == ID_SEGMENT && zlibOutput == null) {
|
||||
val currentOutput = extractorOutputField.get(this) as ExtractorOutput
|
||||
val wrapper = ZlibExtractorOutputWrapper(currentOutput)
|
||||
zlibOutput = wrapper
|
||||
extractorOutputField.set(this, wrapper)
|
||||
Log.d(TAG, "Installed zlib ExtractorOutput wrapper")
|
||||
}
|
||||
}
|
||||
|
||||
override fun integerElement(id: Int, value: Long) {
|
||||
if (id == ID_CONTENT_COMPRESSION_ALGORITHM && value == 0L) {
|
||||
currentTrackUsesZlib = true
|
||||
Log.i(TAG, "Track uses ContentCompAlgo 0 (zlib), will inflate samples")
|
||||
// Tell parent it's header stripping (algo 3) to avoid ParserException
|
||||
super.integerElement(id, 3)
|
||||
return
|
||||
}
|
||||
super.integerElement(id, value)
|
||||
}
|
||||
|
||||
override fun binaryElement(id: Int, contentSize: Int, input: ExtractorInput) {
|
||||
if (id == ID_CONTENT_COMPRESSION_SETTINGS && currentTrackUsesZlib) {
|
||||
// Skip ContentCompSettings for zlib tracks — parent would store these as
|
||||
// sampleStrippedBytes and prepend them to every sample, corrupting output.
|
||||
input.skipFully(contentSize)
|
||||
return
|
||||
}
|
||||
super.binaryElement(id, contentSize, input)
|
||||
}
|
||||
|
||||
override fun endMasterElement(id: Int) {
|
||||
val wasZlib = currentTrackUsesZlib
|
||||
super.endMasterElement(id)
|
||||
|
||||
if (id == ID_TRACK_ENTRY && wasZlib) {
|
||||
zlibOutput?.activateLast()
|
||||
currentTrackUsesZlib = false
|
||||
Log.i(TAG, "Activated zlib inflation for track")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ExtractorOutput wrapper that wraps all TrackOutputs with ZlibInflatingTrackOutput.
|
||||
* Tracks are created inactive; activateLast() enables inflation for the most recently
|
||||
* created track (called when we know a track uses zlib compression).
|
||||
*/
|
||||
private class ZlibExtractorOutputWrapper(
|
||||
private val delegate: ExtractorOutput
|
||||
) : ExtractorOutput {
|
||||
|
||||
private var lastCreatedWrapper: ZlibInflatingTrackOutput? = null
|
||||
|
||||
override fun track(id: Int, type: Int): TrackOutput {
|
||||
val original = delegate.track(id, type)
|
||||
val wrapper = ZlibInflatingTrackOutput(original)
|
||||
lastCreatedWrapper = wrapper
|
||||
return wrapper
|
||||
}
|
||||
|
||||
private var zlibOutput: ZlibExtractorOutputWrapper? = null
|
||||
private var currentTrackUsesZlib = false
|
||||
|
||||
override fun startMasterElement(id: Int, contentPosition: Long, contentSize: Long) {
|
||||
super.startMasterElement(id, contentPosition, contentSize)
|
||||
|
||||
// After super installs AssSubtitleExtractorOutput, wrap it with our zlib layer
|
||||
if (id == ID_SEGMENT && zlibOutput == null) {
|
||||
val currentOutput = extractorOutputField.get(this) as ExtractorOutput
|
||||
val wrapper = ZlibExtractorOutputWrapper(currentOutput)
|
||||
zlibOutput = wrapper
|
||||
extractorOutputField.set(this, wrapper)
|
||||
Log.d(TAG, "Installed zlib ExtractorOutput wrapper")
|
||||
}
|
||||
fun activateLast() {
|
||||
lastCreatedWrapper?.active = true
|
||||
}
|
||||
|
||||
override fun integerElement(id: Int, value: Long) {
|
||||
if (id == ID_CONTENT_COMPRESSION_ALGORITHM && value == 0L) {
|
||||
currentTrackUsesZlib = true
|
||||
Log.i(TAG, "Track uses ContentCompAlgo 0 (zlib), will inflate samples")
|
||||
// Tell parent it's header stripping (algo 3) to avoid ParserException
|
||||
super.integerElement(id, 3)
|
||||
return
|
||||
}
|
||||
super.integerElement(id, value)
|
||||
}
|
||||
|
||||
override fun binaryElement(id: Int, contentSize: Int, input: ExtractorInput) {
|
||||
if (id == ID_CONTENT_COMPRESSION_SETTINGS && currentTrackUsesZlib) {
|
||||
// Skip ContentCompSettings for zlib tracks — parent would store these as
|
||||
// sampleStrippedBytes and prepend them to every sample, corrupting output.
|
||||
input.skipFully(contentSize)
|
||||
return
|
||||
}
|
||||
super.binaryElement(id, contentSize, input)
|
||||
}
|
||||
|
||||
override fun endMasterElement(id: Int) {
|
||||
val wasZlib = currentTrackUsesZlib
|
||||
super.endMasterElement(id)
|
||||
|
||||
if (id == ID_TRACK_ENTRY && wasZlib) {
|
||||
zlibOutput?.activateLast()
|
||||
currentTrackUsesZlib = false
|
||||
Log.i(TAG, "Activated zlib inflation for track")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ExtractorOutput wrapper that wraps all TrackOutputs with ZlibInflatingTrackOutput.
|
||||
* Tracks are created inactive; activateLast() enables inflation for the most recently
|
||||
* created track (called when we know a track uses zlib compression).
|
||||
*/
|
||||
private class ZlibExtractorOutputWrapper(
|
||||
private val delegate: ExtractorOutput,
|
||||
) : ExtractorOutput {
|
||||
|
||||
private var lastCreatedWrapper: ZlibInflatingTrackOutput? = null
|
||||
|
||||
override fun track(id: Int, type: Int): TrackOutput {
|
||||
val original = delegate.track(id, type)
|
||||
val wrapper = ZlibInflatingTrackOutput(original)
|
||||
lastCreatedWrapper = wrapper
|
||||
return wrapper
|
||||
}
|
||||
|
||||
fun activateLast() {
|
||||
lastCreatedWrapper?.active = true
|
||||
}
|
||||
|
||||
override fun endTracks() = delegate.endTracks()
|
||||
override fun seekMap(seekMap: SeekMap) = delegate.seekMap(seekMap)
|
||||
}
|
||||
override fun endTracks() = delegate.endTracks()
|
||||
override fun seekMap(seekMap: SeekMap) = delegate.seekMap(seekMap)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,301 +10,376 @@ import io.flutter.plugin.common.EventChannel
|
||||
import io.flutter.plugin.common.MethodCall
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
|
||||
class MpvPlayerPlugin : FlutterPlugin, MethodChannel.MethodCallHandler,
|
||||
EventChannel.StreamHandler, ActivityAware, com.edde746.plezy.shared.PlayerDelegate {
|
||||
class MpvPlayerPlugin :
|
||||
FlutterPlugin,
|
||||
MethodChannel.MethodCallHandler,
|
||||
EventChannel.StreamHandler,
|
||||
ActivityAware,
|
||||
com.edde746.plezy.shared.PlayerDelegate {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "MpvPlayerPlugin"
|
||||
private const val METHOD_CHANNEL = "com.plezy/mpv_player"
|
||||
private const val EVENT_CHANNEL = "com.plezy/mpv_player/events"
|
||||
companion object {
|
||||
private const val TAG = "MpvPlayerPlugin"
|
||||
private const val METHOD_CHANNEL = "com.plezy/mpv_player"
|
||||
private const val EVENT_CHANNEL = "com.plezy/mpv_player/events"
|
||||
}
|
||||
|
||||
private lateinit var methodChannel: MethodChannel
|
||||
private lateinit var eventChannel: EventChannel
|
||||
private var eventSink: EventChannel.EventSink? = null
|
||||
private var playerCore: MpvPlayerCore? = null
|
||||
private var activity: Activity? = null
|
||||
private var activityBinding: ActivityPluginBinding? = null
|
||||
private val nameToId = mutableMapOf<String, Int>()
|
||||
private var sessionGeneration = 0
|
||||
|
||||
// Pending `MethodChannel.Result`s for an init that is currently in flight.
|
||||
// Concurrent `invoke('initialize')` calls share the same outcome instead
|
||||
// of each tearing down the in-flight core and starting their own — which
|
||||
// was the root cause of #930.
|
||||
private val pendingInitResults = mutableListOf<MethodChannel.Result>()
|
||||
|
||||
@Volatile private var isInitializing = false
|
||||
|
||||
// FlutterPlugin
|
||||
|
||||
override fun onAttachedToEngine(binding: FlutterPlugin.FlutterPluginBinding) {
|
||||
methodChannel = MethodChannel(binding.binaryMessenger, METHOD_CHANNEL)
|
||||
methodChannel.setMethodCallHandler(this)
|
||||
|
||||
eventChannel = EventChannel(binding.binaryMessenger, EVENT_CHANNEL)
|
||||
eventChannel.setStreamHandler(this)
|
||||
|
||||
Log.d(TAG, "Attached to engine")
|
||||
}
|
||||
|
||||
override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {
|
||||
methodChannel.setMethodCallHandler(null)
|
||||
eventChannel.setStreamHandler(null)
|
||||
Log.d(TAG, "Detached from engine")
|
||||
}
|
||||
|
||||
// ActivityAware
|
||||
|
||||
override fun onAttachedToActivity(binding: ActivityPluginBinding) {
|
||||
activity = binding.activity
|
||||
activityBinding = binding
|
||||
Log.d(TAG, "Attached to activity")
|
||||
}
|
||||
|
||||
override fun onDetachedFromActivity() {
|
||||
++sessionGeneration
|
||||
playerCore?.dispose()
|
||||
playerCore = null
|
||||
// Any in-flight init callback would never fire (its scope is cancelled
|
||||
// by dispose), so close out queued callers explicitly.
|
||||
completePendingInits(success = false)
|
||||
activity = null
|
||||
activityBinding = null
|
||||
Log.d(TAG, "Detached from activity")
|
||||
}
|
||||
|
||||
override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) {
|
||||
activity = binding.activity
|
||||
activityBinding = binding
|
||||
Log.d(TAG, "Reattached to activity for config changes")
|
||||
}
|
||||
|
||||
override fun onDetachedFromActivityForConfigChanges() {
|
||||
activity = null
|
||||
activityBinding = null
|
||||
Log.d(TAG, "Detached from activity for config changes")
|
||||
}
|
||||
|
||||
// EventChannel.StreamHandler
|
||||
|
||||
override fun onListen(arguments: Any?, events: EventChannel.EventSink?) {
|
||||
eventSink = events
|
||||
Log.d(TAG, "Event stream connected")
|
||||
}
|
||||
|
||||
override fun onCancel(arguments: Any?) {
|
||||
eventSink = null
|
||||
Log.d(TAG, "Event stream disconnected")
|
||||
}
|
||||
|
||||
// MethodChannel.MethodCallHandler
|
||||
|
||||
override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
|
||||
when (call.method) {
|
||||
"initialize" -> handleInitialize(result)
|
||||
"dispose" -> handleDispose(result)
|
||||
"setProperty" -> handleSetProperty(call, result)
|
||||
"getProperty" -> handleGetProperty(call, result)
|
||||
"observeProperty" -> handleObserveProperty(call, result)
|
||||
"command" -> handleCommand(call, result)
|
||||
"setVisible" -> handleSetVisible(call, result)
|
||||
"updateFrame" -> handleUpdateFrame(result)
|
||||
"setVideoFrameRate" -> handleSetVideoFrameRate(call, result)
|
||||
"clearVideoFrameRate" -> handleClearVideoFrameRate(result)
|
||||
"requestAudioFocus" -> handleRequestAudioFocus(result)
|
||||
"abandonAudioFocus" -> handleAbandonAudioFocus(result)
|
||||
"openContentFd" -> handleOpenContentFd(call, result)
|
||||
"isInitialized" -> result.success(playerCore?.isInitialized ?: false)
|
||||
"setLogLevel" -> result.success(null)
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleInitialize(result: MethodChannel.Result) {
|
||||
val currentActivity = activity
|
||||
if (currentActivity == null) {
|
||||
result.error("NO_ACTIVITY", "Activity not available", null)
|
||||
return
|
||||
}
|
||||
|
||||
private lateinit var methodChannel: MethodChannel
|
||||
private lateinit var eventChannel: EventChannel
|
||||
private var eventSink: EventChannel.EventSink? = null
|
||||
private var playerCore: MpvPlayerCore? = null
|
||||
private var activity: Activity? = null
|
||||
private var activityBinding: ActivityPluginBinding? = null
|
||||
private val nameToId = mutableMapOf<String, Int>()
|
||||
private var sessionGeneration = 0
|
||||
|
||||
// FlutterPlugin
|
||||
|
||||
override fun onAttachedToEngine(binding: FlutterPlugin.FlutterPluginBinding) {
|
||||
methodChannel = MethodChannel(binding.binaryMessenger, METHOD_CHANNEL)
|
||||
methodChannel.setMethodCallHandler(this)
|
||||
|
||||
eventChannel = EventChannel(binding.binaryMessenger, EVENT_CHANNEL)
|
||||
eventChannel.setStreamHandler(this)
|
||||
|
||||
Log.d(TAG, "Attached to engine")
|
||||
if (playerCore?.isInitialized == true) {
|
||||
Log.d(TAG, "Already initialized")
|
||||
result.success(true)
|
||||
return
|
||||
}
|
||||
|
||||
override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {
|
||||
methodChannel.setMethodCallHandler(null)
|
||||
eventChannel.setStreamHandler(null)
|
||||
Log.d(TAG, "Detached from engine")
|
||||
// Coalesce concurrent inits: the second caller waits for the first
|
||||
// call's outcome instead of disposing the in-flight core. The Dart
|
||||
// side memoizes too, but this is defense in depth for any direct
|
||||
// `invoke('initialize')` that bypasses _ensureInitialized.
|
||||
synchronized(pendingInitResults) {
|
||||
pendingInitResults += result
|
||||
if (isInitializing) {
|
||||
Log.d(TAG, "Init already in flight, queuing caller")
|
||||
return
|
||||
}
|
||||
isInitializing = true
|
||||
}
|
||||
|
||||
// ActivityAware
|
||||
|
||||
override fun onAttachedToActivity(binding: ActivityPluginBinding) {
|
||||
activity = binding.activity
|
||||
activityBinding = binding
|
||||
Log.d(TAG, "Attached to activity")
|
||||
}
|
||||
|
||||
override fun onDetachedFromActivity() {
|
||||
++sessionGeneration
|
||||
playerCore?.dispose()
|
||||
playerCore = null
|
||||
activity = null
|
||||
activityBinding = null
|
||||
Log.d(TAG, "Detached from activity")
|
||||
}
|
||||
|
||||
override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) {
|
||||
activity = binding.activity
|
||||
activityBinding = binding
|
||||
Log.d(TAG, "Reattached to activity for config changes")
|
||||
}
|
||||
|
||||
override fun onDetachedFromActivityForConfigChanges() {
|
||||
activity = null
|
||||
activityBinding = null
|
||||
Log.d(TAG, "Detached from activity for config changes")
|
||||
}
|
||||
|
||||
// EventChannel.StreamHandler
|
||||
|
||||
override fun onListen(arguments: Any?, events: EventChannel.EventSink?) {
|
||||
eventSink = events
|
||||
Log.d(TAG, "Event stream connected")
|
||||
}
|
||||
|
||||
override fun onCancel(arguments: Any?) {
|
||||
eventSink = null
|
||||
Log.d(TAG, "Event stream disconnected")
|
||||
}
|
||||
|
||||
// MethodChannel.MethodCallHandler
|
||||
|
||||
override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
|
||||
when (call.method) {
|
||||
"initialize" -> handleInitialize(result)
|
||||
"dispose" -> handleDispose(result)
|
||||
"setProperty" -> handleSetProperty(call, result)
|
||||
"getProperty" -> handleGetProperty(call, result)
|
||||
"observeProperty" -> handleObserveProperty(call, result)
|
||||
"command" -> handleCommand(call, result)
|
||||
"setVisible" -> handleSetVisible(call, result)
|
||||
"setVideoFrameRate" -> handleSetVideoFrameRate(call, result)
|
||||
"clearVideoFrameRate" -> handleClearVideoFrameRate(result)
|
||||
"requestAudioFocus" -> handleRequestAudioFocus(result)
|
||||
"abandonAudioFocus" -> handleAbandonAudioFocus(result)
|
||||
"openContentFd" -> handleOpenContentFd(call, result)
|
||||
"isInitialized" -> result.success(playerCore?.isInitialized ?: false)
|
||||
"setLogLevel" -> result.success(null)
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleInitialize(result: MethodChannel.Result) {
|
||||
val currentActivity = activity
|
||||
if (currentActivity == null) {
|
||||
result.error("NO_ACTIVITY", "Activity not available", null)
|
||||
return
|
||||
currentActivity.runOnUiThread {
|
||||
val gen: Int
|
||||
val core: MpvPlayerCore
|
||||
try {
|
||||
// Caller invariant: dispose() was already called explicitly,
|
||||
// OR `playerCore?.isInitialized == true` and we early-exited
|
||||
// above. We never tear down a core that's mid-initialization.
|
||||
if (playerCore != null && playerCore?.isInitialized != true) {
|
||||
Log.w(TAG, "Discarding stale uninitialized core before re-init")
|
||||
playerCore?.dispose()
|
||||
playerCore = null
|
||||
}
|
||||
|
||||
if (playerCore?.isInitialized == true) {
|
||||
Log.d(TAG, "Already initialized")
|
||||
result.success(true)
|
||||
return
|
||||
gen = ++sessionGeneration
|
||||
core = MpvPlayerCore(currentActivity).apply {
|
||||
delegate = this@MpvPlayerPlugin
|
||||
}
|
||||
playerCore = core
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to initialize: ${e.message}", e)
|
||||
completePendingInits(success = false, errorMessage = e.message)
|
||||
return@runOnUiThread
|
||||
}
|
||||
|
||||
currentActivity.runOnUiThread {
|
||||
try {
|
||||
// Dispose stale core idempotently
|
||||
playerCore?.dispose()
|
||||
playerCore = null
|
||||
|
||||
val gen = ++sessionGeneration
|
||||
val core = MpvPlayerCore(currentActivity).apply {
|
||||
delegate = this@MpvPlayerPlugin
|
||||
}
|
||||
playerCore = core
|
||||
|
||||
core.initialize { success ->
|
||||
if (gen != sessionGeneration || playerCore !== core) {
|
||||
Log.d(TAG, "Stale init callback (gen=$gen, current=$sessionGeneration)")
|
||||
result.success(false)
|
||||
return@initialize
|
||||
}
|
||||
// Start hidden - now safe because setVisible operates on the container,
|
||||
// not the SurfaceView directly (matching ExoPlayer's approach)
|
||||
core.setVisible(false)
|
||||
Log.d(TAG, "Initialized: $success")
|
||||
result.success(success)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to initialize: ${e.message}", e)
|
||||
result.error("INIT_FAILED", e.message, null)
|
||||
}
|
||||
core.initialize { success ->
|
||||
val stale = gen != sessionGeneration || playerCore !== core
|
||||
if (stale) {
|
||||
Log.d(TAG, "Stale init callback (gen=$gen, current=$sessionGeneration)")
|
||||
} else {
|
||||
// Start hidden - now safe because setVisible operates on the container,
|
||||
// not the SurfaceView directly (matching ExoPlayer's approach)
|
||||
core.setVisible(false)
|
||||
Log.d(TAG, "Initialized: $success")
|
||||
}
|
||||
completePendingInits(success = !stale && success)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleDispose(result: MethodChannel.Result) {
|
||||
activity?.runOnUiThread {
|
||||
val core = playerCore
|
||||
++sessionGeneration
|
||||
playerCore = null
|
||||
|
||||
core?.dispose {
|
||||
Log.d(TAG, "Disposed")
|
||||
result.success(null)
|
||||
} ?: result.success(null)
|
||||
} ?: result.success(null)
|
||||
private fun completePendingInits(success: Boolean, errorMessage: String? = null) {
|
||||
val pending = synchronized(pendingInitResults) {
|
||||
isInitializing = false
|
||||
val copy = pendingInitResults.toList()
|
||||
pendingInitResults.clear()
|
||||
copy
|
||||
}
|
||||
for (r in pending) {
|
||||
if (errorMessage != null) {
|
||||
r.error("INIT_FAILED", errorMessage, null)
|
||||
} else {
|
||||
r.success(success)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleSetProperty(call: MethodCall, result: MethodChannel.Result) {
|
||||
val name = call.argument<String>("name")
|
||||
val value = call.argument<String>("value")
|
||||
private fun handleDispose(result: MethodChannel.Result) {
|
||||
activity?.runOnUiThread {
|
||||
val core = playerCore
|
||||
++sessionGeneration
|
||||
playerCore = null
|
||||
|
||||
if (name == null || value == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'name' or 'value'", null)
|
||||
return
|
||||
}
|
||||
// Any in-flight init callback is cancelled with the scope, so
|
||||
// close out queued callers here instead of leaking them.
|
||||
completePendingInits(success = false)
|
||||
|
||||
playerCore?.setProperty(name, value)
|
||||
core?.dispose {
|
||||
Log.d(TAG, "Disposed")
|
||||
result.success(null)
|
||||
} ?: result.success(null)
|
||||
} ?: result.success(null)
|
||||
}
|
||||
|
||||
private fun handleSetProperty(call: MethodCall, result: MethodChannel.Result) {
|
||||
val name = call.argument<String>("name")
|
||||
val value = call.argument<String>("value")
|
||||
|
||||
if (name == null || value == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'name' or 'value'", null)
|
||||
return
|
||||
}
|
||||
|
||||
private fun handleGetProperty(call: MethodCall, result: MethodChannel.Result) {
|
||||
val name = call.argument<String>("name")
|
||||
playerCore?.setProperty(name, value)
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
if (name == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'name'", null)
|
||||
return
|
||||
private fun handleGetProperty(call: MethodCall, result: MethodChannel.Result) {
|
||||
val name = call.argument<String>("name")
|
||||
|
||||
if (name == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'name'", null)
|
||||
return
|
||||
}
|
||||
|
||||
val value = playerCore?.getProperty(name)
|
||||
result.success(value)
|
||||
}
|
||||
|
||||
private fun handleObserveProperty(call: MethodCall, result: MethodChannel.Result) {
|
||||
val name = call.argument<String>("name")
|
||||
val format = call.argument<String>("format")
|
||||
val id = call.argument<Int>("id")
|
||||
|
||||
if (name == null || format == null || id == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'name', 'format', or 'id'", null)
|
||||
return
|
||||
}
|
||||
|
||||
nameToId[name] = id
|
||||
playerCore?.observeProperty(name, format)
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleCommand(call: MethodCall, result: MethodChannel.Result) {
|
||||
val args = call.argument<List<String>>("args")
|
||||
|
||||
if (args == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'args'", null)
|
||||
return
|
||||
}
|
||||
|
||||
val core = playerCore
|
||||
if (core == null) {
|
||||
result.success(null)
|
||||
return
|
||||
}
|
||||
core.command(args.toTypedArray()) {
|
||||
result.success(null)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleSetVisible(call: MethodCall, result: MethodChannel.Result) {
|
||||
val visible = call.argument<Boolean>("visible")
|
||||
|
||||
if (visible == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'visible'", null)
|
||||
return
|
||||
}
|
||||
|
||||
playerCore?.setVisible(visible)
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleUpdateFrame(result: MethodChannel.Result) {
|
||||
playerCore?.updateFrame()
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleSetVideoFrameRate(call: MethodCall, result: MethodChannel.Result) {
|
||||
val fps = call.argument<Double>("fps")?.toFloat() ?: 0f
|
||||
val duration = call.argument<Number>("duration")?.toLong() ?: 0L
|
||||
val extraDelayMs = call.argument<Number>("extraDelayMs")?.toLong() ?: 0L
|
||||
|
||||
Log.d(TAG, "setVideoFrameRate: fps=$fps, duration=$duration, extraDelayMs=$extraDelayMs")
|
||||
val core = playerCore
|
||||
if (core == null) {
|
||||
result.success(false)
|
||||
return
|
||||
}
|
||||
core.setVideoFrameRate(fps, duration, extraDelayMs) { switched ->
|
||||
result.success(switched)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleClearVideoFrameRate(result: MethodChannel.Result) {
|
||||
Log.d(TAG, "clearVideoFrameRate")
|
||||
playerCore?.clearVideoFrameRate()
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleRequestAudioFocus(result: MethodChannel.Result) {
|
||||
Log.d(TAG, "requestAudioFocus")
|
||||
val granted = playerCore?.requestAudioFocus() ?: false
|
||||
result.success(granted)
|
||||
}
|
||||
|
||||
private fun handleAbandonAudioFocus(result: MethodChannel.Result) {
|
||||
Log.d(TAG, "abandonAudioFocus")
|
||||
playerCore?.abandonAudioFocus()
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleOpenContentFd(call: MethodCall, result: MethodChannel.Result) {
|
||||
val uriString = call.argument<String>("uri")
|
||||
if (uriString == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'uri'", null)
|
||||
return
|
||||
}
|
||||
|
||||
val contentResolver = activity?.contentResolver
|
||||
if (contentResolver == null) {
|
||||
result.error("NO_ACTIVITY", "Activity not available", null)
|
||||
return
|
||||
}
|
||||
|
||||
// Open file descriptor off UI thread to prevent ANR on slow storage
|
||||
Thread {
|
||||
try {
|
||||
val uri = Uri.parse(uriString)
|
||||
val pfd = contentResolver.openFileDescriptor(uri, "r")
|
||||
if (pfd == null) {
|
||||
activity?.runOnUiThread {
|
||||
result.error("OPEN_FAILED", "Failed to open file descriptor for $uriString", null)
|
||||
}
|
||||
return@Thread
|
||||
}
|
||||
|
||||
val value = playerCore?.getProperty(name)
|
||||
result.success(value)
|
||||
}
|
||||
val fd = pfd.detachFd()
|
||||
Log.d(TAG, "Opened content FD $fd for $uriString")
|
||||
activity?.runOnUiThread { result.success(fd) }
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to open content FD: ${e.message}", e)
|
||||
activity?.runOnUiThread { result.error("OPEN_FAILED", e.message, null) }
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
private fun handleObserveProperty(call: MethodCall, result: MethodChannel.Result) {
|
||||
val name = call.argument<String>("name")
|
||||
val format = call.argument<String>("format")
|
||||
val id = call.argument<Int>("id")
|
||||
// PlayerDelegate
|
||||
|
||||
if (name == null || format == null || id == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'name', 'format', or 'id'", null)
|
||||
return
|
||||
}
|
||||
override fun onPropertyChange(name: String, value: Any?) {
|
||||
val propId = nameToId[name] ?: return
|
||||
eventSink?.success(listOf(propId, value))
|
||||
}
|
||||
|
||||
nameToId[name] = id
|
||||
playerCore?.observeProperty(name, format)
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleCommand(call: MethodCall, result: MethodChannel.Result) {
|
||||
val args = call.argument<List<String>>("args")
|
||||
|
||||
if (args == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'args'", null)
|
||||
return
|
||||
}
|
||||
|
||||
playerCore?.command(args.toTypedArray())
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleSetVisible(call: MethodCall, result: MethodChannel.Result) {
|
||||
val visible = call.argument<Boolean>("visible")
|
||||
|
||||
if (visible == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'visible'", null)
|
||||
return
|
||||
}
|
||||
|
||||
playerCore?.setVisible(visible)
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleSetVideoFrameRate(call: MethodCall, result: MethodChannel.Result) {
|
||||
val fps = call.argument<Double>("fps")?.toFloat() ?: 0f
|
||||
val duration = call.argument<Number>("duration")?.toLong() ?: 0L
|
||||
|
||||
Log.d(TAG, "setVideoFrameRate: fps=$fps, duration=$duration")
|
||||
playerCore?.setVideoFrameRate(fps, duration)
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleClearVideoFrameRate(result: MethodChannel.Result) {
|
||||
Log.d(TAG, "clearVideoFrameRate")
|
||||
playerCore?.clearVideoFrameRate()
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleRequestAudioFocus(result: MethodChannel.Result) {
|
||||
Log.d(TAG, "requestAudioFocus")
|
||||
val granted = playerCore?.requestAudioFocus() ?: false
|
||||
result.success(granted)
|
||||
}
|
||||
|
||||
private fun handleAbandonAudioFocus(result: MethodChannel.Result) {
|
||||
Log.d(TAG, "abandonAudioFocus")
|
||||
playerCore?.abandonAudioFocus()
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleOpenContentFd(call: MethodCall, result: MethodChannel.Result) {
|
||||
val uriString = call.argument<String>("uri")
|
||||
if (uriString == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'uri'", null)
|
||||
return
|
||||
}
|
||||
|
||||
val contentResolver = activity?.contentResolver
|
||||
if (contentResolver == null) {
|
||||
result.error("NO_ACTIVITY", "Activity not available", null)
|
||||
return
|
||||
}
|
||||
|
||||
// Open file descriptor off UI thread to prevent ANR on slow storage
|
||||
Thread {
|
||||
try {
|
||||
val uri = Uri.parse(uriString)
|
||||
val pfd = contentResolver.openFileDescriptor(uri, "r")
|
||||
if (pfd == null) {
|
||||
activity?.runOnUiThread {
|
||||
result.error("OPEN_FAILED", "Failed to open file descriptor for $uriString", null)
|
||||
}
|
||||
return@Thread
|
||||
}
|
||||
|
||||
val fd = pfd.detachFd()
|
||||
Log.d(TAG, "Opened content FD $fd for $uriString")
|
||||
activity?.runOnUiThread { result.success(fd) }
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to open content FD: ${e.message}", e)
|
||||
activity?.runOnUiThread { result.error("OPEN_FAILED", e.message, null) }
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
||||
// PlayerDelegate
|
||||
|
||||
override fun onPropertyChange(name: String, value: Any?) {
|
||||
val propId = nameToId[name] ?: return
|
||||
eventSink?.success(listOf(propId, value))
|
||||
}
|
||||
|
||||
override fun onEvent(name: String, data: Map<String, Any>?) {
|
||||
val event = mutableMapOf<String, Any>(
|
||||
"type" to "event",
|
||||
"name" to name
|
||||
)
|
||||
data?.let { event["data"] = it }
|
||||
eventSink?.success(event)
|
||||
}
|
||||
override fun onEvent(name: String, data: Map<String, Any>?) {
|
||||
val event = mutableMapOf<String, Any>(
|
||||
"type" to "event",
|
||||
"name" to name
|
||||
)
|
||||
data?.let { event["data"] = it }
|
||||
eventSink?.success(event)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,97 +9,97 @@ import android.os.Handler
|
||||
import android.util.Log
|
||||
|
||||
class AudioFocusManager(
|
||||
context: Context,
|
||||
private val handler: Handler,
|
||||
private val onPause: () -> Unit,
|
||||
private val onResume: () -> Unit,
|
||||
private val isPaused: () -> Boolean,
|
||||
private val log: (String) -> Unit = { Log.d(TAG, it) }
|
||||
context: Context,
|
||||
private val handler: Handler,
|
||||
private val onPause: () -> Unit,
|
||||
private val onResume: () -> Unit,
|
||||
private val isPaused: () -> Boolean,
|
||||
private val log: (String) -> Unit = { Log.d(TAG, it) }
|
||||
) {
|
||||
companion object {
|
||||
private const val TAG = "AudioFocusManager"
|
||||
}
|
||||
companion object {
|
||||
private const val TAG = "AudioFocusManager"
|
||||
}
|
||||
|
||||
private val audioManager = context.getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
||||
private var audioFocusRequest: AudioFocusRequest? = null
|
||||
private var hasAudioFocus: Boolean = false
|
||||
var wasPlayingBeforeFocusLoss: Boolean = false
|
||||
private set
|
||||
private val audioManager = context.getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
||||
private var audioFocusRequest: AudioFocusRequest? = null
|
||||
private var hasAudioFocus: Boolean = false
|
||||
var wasPlayingBeforeFocusLoss: Boolean = false
|
||||
private set
|
||||
|
||||
private val audioFocusChangeListener = AudioManager.OnAudioFocusChangeListener { focusChange ->
|
||||
when (focusChange) {
|
||||
AudioManager.AUDIOFOCUS_GAIN -> {
|
||||
log("Focus gained")
|
||||
hasAudioFocus = true
|
||||
if (wasPlayingBeforeFocusLoss) {
|
||||
onResume()
|
||||
wasPlayingBeforeFocusLoss = false
|
||||
}
|
||||
}
|
||||
AudioManager.AUDIOFOCUS_LOSS -> {
|
||||
log("Focus lost permanently")
|
||||
hasAudioFocus = false
|
||||
wasPlayingBeforeFocusLoss = !isPaused()
|
||||
onPause()
|
||||
}
|
||||
AudioManager.AUDIOFOCUS_LOSS_TRANSIENT -> {
|
||||
log("Focus lost transiently")
|
||||
hasAudioFocus = false
|
||||
wasPlayingBeforeFocusLoss = !isPaused()
|
||||
onPause()
|
||||
}
|
||||
AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK -> {
|
||||
log("Focus lost transiently (can duck)")
|
||||
}
|
||||
private val audioFocusChangeListener = AudioManager.OnAudioFocusChangeListener { focusChange ->
|
||||
when (focusChange) {
|
||||
AudioManager.AUDIOFOCUS_GAIN -> {
|
||||
log("Focus gained")
|
||||
hasAudioFocus = true
|
||||
if (wasPlayingBeforeFocusLoss) {
|
||||
onResume()
|
||||
wasPlayingBeforeFocusLoss = false
|
||||
}
|
||||
}
|
||||
|
||||
fun requestAudioFocus(): Boolean {
|
||||
Log.d(TAG, "Requesting audio focus")
|
||||
|
||||
val result = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
val focusRequest = AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN)
|
||||
.setAudioAttributes(
|
||||
AudioAttributes.Builder()
|
||||
.setUsage(AudioAttributes.USAGE_MEDIA)
|
||||
.setContentType(AudioAttributes.CONTENT_TYPE_MOVIE)
|
||||
.build()
|
||||
)
|
||||
.setOnAudioFocusChangeListener(audioFocusChangeListener, handler)
|
||||
.build()
|
||||
|
||||
audioFocusRequest = focusRequest
|
||||
audioManager.requestAudioFocus(focusRequest)
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
audioManager.requestAudioFocus(
|
||||
audioFocusChangeListener,
|
||||
AudioManager.STREAM_MUSIC,
|
||||
AudioManager.AUDIOFOCUS_GAIN
|
||||
)
|
||||
}
|
||||
|
||||
hasAudioFocus = (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED)
|
||||
Log.d(TAG, "Audio focus request result: $result, granted: $hasAudioFocus")
|
||||
return hasAudioFocus
|
||||
}
|
||||
|
||||
fun abandonAudioFocus() {
|
||||
Log.d(TAG, "Abandoning audio focus")
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
audioFocusRequest?.let { audioManager.abandonAudioFocusRequest(it) }
|
||||
audioFocusRequest = null
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
audioManager.abandonAudioFocus(audioFocusChangeListener)
|
||||
}
|
||||
|
||||
}
|
||||
AudioManager.AUDIOFOCUS_LOSS -> {
|
||||
log("Focus lost permanently")
|
||||
hasAudioFocus = false
|
||||
wasPlayingBeforeFocusLoss = false
|
||||
wasPlayingBeforeFocusLoss = !isPaused()
|
||||
onPause()
|
||||
}
|
||||
AudioManager.AUDIOFOCUS_LOSS_TRANSIENT -> {
|
||||
log("Focus lost transiently")
|
||||
hasAudioFocus = false
|
||||
wasPlayingBeforeFocusLoss = !isPaused()
|
||||
onPause()
|
||||
}
|
||||
AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK -> {
|
||||
log("Focus lost transiently (can duck)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun requestAudioFocus(): Boolean {
|
||||
Log.d(TAG, "Requesting audio focus")
|
||||
|
||||
val result = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
val focusRequest = AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN)
|
||||
.setAudioAttributes(
|
||||
AudioAttributes.Builder()
|
||||
.setUsage(AudioAttributes.USAGE_MEDIA)
|
||||
.setContentType(AudioAttributes.CONTENT_TYPE_MOVIE)
|
||||
.build()
|
||||
)
|
||||
.setOnAudioFocusChangeListener(audioFocusChangeListener, handler)
|
||||
.build()
|
||||
|
||||
audioFocusRequest = focusRequest
|
||||
audioManager.requestAudioFocus(focusRequest)
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
audioManager.requestAudioFocus(
|
||||
audioFocusChangeListener,
|
||||
AudioManager.STREAM_MUSIC,
|
||||
AudioManager.AUDIOFOCUS_GAIN
|
||||
)
|
||||
}
|
||||
|
||||
fun release() {
|
||||
abandonAudioFocus()
|
||||
hasAudioFocus = (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED)
|
||||
Log.d(TAG, "Audio focus request result: $result, granted: $hasAudioFocus")
|
||||
return hasAudioFocus
|
||||
}
|
||||
|
||||
fun abandonAudioFocus() {
|
||||
Log.d(TAG, "Abandoning audio focus")
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
audioFocusRequest?.let { audioManager.abandonAudioFocusRequest(it) }
|
||||
audioFocusRequest = null
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
audioManager.abandonAudioFocus(audioFocusChangeListener)
|
||||
}
|
||||
|
||||
hasAudioFocus = false
|
||||
wasPlayingBeforeFocusLoss = false
|
||||
}
|
||||
|
||||
fun release() {
|
||||
abandonAudioFocus()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.edde746.plezy.shared
|
||||
|
||||
import android.graphics.PixelFormat
|
||||
import android.os.Build
|
||||
import android.view.SurfaceView
|
||||
import android.view.TextureView
|
||||
import android.view.View
|
||||
@@ -8,52 +9,84 @@ import android.view.ViewGroup
|
||||
|
||||
object FlutterOverlayHelper {
|
||||
|
||||
/**
|
||||
* Find the FlutterView container in the content view hierarchy.
|
||||
* First tries to match by class name (works in debug builds),
|
||||
* then falls back to picking the last ViewGroup with children
|
||||
* (needed for release builds where FlutterView may be obfuscated).
|
||||
*/
|
||||
fun findFlutterContainer(contentView: ViewGroup, excludeView: View? = null): ViewGroup? {
|
||||
// First pass: look for FlutterView by name (debug builds)
|
||||
for (i in 0 until contentView.childCount) {
|
||||
val child = contentView.getChildAt(i)
|
||||
if (child is ViewGroup && child.javaClass.name.contains("FlutterView")) {
|
||||
return child
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback for release (FlutterView may be obfuscated): pick the last ViewGroup
|
||||
// that is not our video container and has children.
|
||||
for (i in contentView.childCount - 1 downTo 0) {
|
||||
val child = contentView.getChildAt(i)
|
||||
if (child is ViewGroup && child != excludeView && child.childCount > 0) {
|
||||
return child
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
/**
|
||||
* Find the top-level container holding the Flutter render surface. Returns the
|
||||
* direct child of [contentView] that contains a FlutterSurfaceView/FlutterTextureView
|
||||
* at any depth — `bringChildToFront` only works for direct children, so this is the
|
||||
* node to pass to [configureFlutterZOrder].
|
||||
*
|
||||
* Searches any depth because an app may wrap Flutter (e.g. for key-event dispatch)
|
||||
* and push it below the direct-child level.
|
||||
*/
|
||||
fun findFlutterContainer(contentView: ViewGroup, excludeView: View? = null): ViewGroup? {
|
||||
for (i in contentView.childCount - 1 downTo 0) {
|
||||
val child = contentView.getChildAt(i)
|
||||
if (child === excludeView || child !is ViewGroup) continue
|
||||
if (findRenderSurface(child) != null) return child
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure z-ordering so the Flutter UI renders above the video surface.
|
||||
*
|
||||
* @param zOrderOnTop true for MPV (Flutter needs to be fully on top),
|
||||
* false for ExoPlayer (subtitle layer sits between video and Flutter)
|
||||
*/
|
||||
fun configureFlutterZOrder(contentView: ViewGroup, container: ViewGroup, zOrderOnTop: Boolean) {
|
||||
contentView.bringChildToFront(container)
|
||||
for (j in 0 until container.childCount) {
|
||||
val flutterChild = container.getChildAt(j)
|
||||
if (flutterChild is SurfaceView) {
|
||||
flutterChild.setZOrderOnTop(zOrderOnTop)
|
||||
flutterChild.setZOrderMediaOverlay(true)
|
||||
flutterChild.holder.setFormat(PixelFormat.TRANSLUCENT)
|
||||
break
|
||||
} else if (flutterChild is TextureView) {
|
||||
flutterChild.isOpaque = false
|
||||
break
|
||||
}
|
||||
}
|
||||
private fun findRenderSurface(root: ViewGroup): View? {
|
||||
for (i in 0 until root.childCount) {
|
||||
val child = root.getChildAt(i)
|
||||
if (child is SurfaceView || child is TextureView) return child
|
||||
if (child is ViewGroup) findRenderSurface(child)?.let { return it }
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply [SurfaceView.setCompositionOrder] on API 36+; no-op on older APIs where
|
||||
* the legacy [SurfaceView.setZOrderOnTop]/[SurfaceView.setZOrderMediaOverlay]
|
||||
* bucket settings govern Z-order instead.
|
||||
*
|
||||
* The value maps directly to the SurfaceView's `mSubLayer`. Per AOSP semantics:
|
||||
* `mSubLayer >= 0` (non-negative `order`) is composited above the parent window
|
||||
* and skips the hole-punch in `draw()`; `mSubLayer < 0` (negative `order`) is
|
||||
* behind the parent window and the SurfaceView is made visible by punching a
|
||||
* transparent hole in the parent canvas. Valid range is `[-2, 2]`. Picking the
|
||||
* right sign matters: any view that draws on the parent canvas (e.g. Media3's
|
||||
* `CanvasSubtitleOutput` for SRT/VTT/SDH) is hidden by SurfaceViews with
|
||||
* non-negative orders that sit on top of the same area.
|
||||
*/
|
||||
fun applyCompositionOrder(view: SurfaceView, order: Int) {
|
||||
if (Build.VERSION.SDK_INT >= 36) view.compositionOrder = order
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure z-ordering so the Flutter UI renders above the video/subtitle surfaces.
|
||||
*
|
||||
* On API 36+ the value is applied via [SurfaceView.setCompositionOrder] and maps
|
||||
* directly to `mSubLayer` (see [applyCompositionOrder] for the sign semantics).
|
||||
* On pre-36 SurfaceView builds the value is mapped to the legacy on-top bucket
|
||||
* when positive. On TextureView builds the value is unused (view hierarchy order
|
||||
* handles it).
|
||||
*
|
||||
* Pass a non-negative value (e.g. `1`) so Flutter renders above the parent canvas
|
||||
* and lets the legacy transparent-mode `setZOrderOnTop(true)` semantics carry over.
|
||||
*/
|
||||
fun configureFlutterZOrder(contentView: ViewGroup, container: ViewGroup, compositionOrder: Int) {
|
||||
contentView.bringChildToFront(container)
|
||||
when (val surface = findRenderSurface(container)) {
|
||||
is SurfaceView -> {
|
||||
if (Build.VERSION.SDK_INT >= 36) {
|
||||
// Clear legacy bucket hints so compositionOrder is authoritative.
|
||||
// Flutter's FlutterSurfaceView sets setZOrderOnTop(true) in its
|
||||
// transparent-mode constructor, which otherwise pins it to z=1.
|
||||
surface.setZOrderOnTop(false)
|
||||
surface.setZOrderMediaOverlay(false)
|
||||
surface.compositionOrder = compositionOrder
|
||||
} else {
|
||||
// Pre-36 has 3 coarse sublayer buckets. Put Flutter in the on-top
|
||||
// bucket so it renders above the video (default) and libass subtitle
|
||||
// (media overlay) SurfaceViews. NB: setZOrderMediaOverlay overwrites
|
||||
// mSubLayer internally, so don't call it here or it cancels setZOrderOnTop.
|
||||
surface.setZOrderOnTop(compositionOrder > 0)
|
||||
}
|
||||
surface.holder.setFormat(PixelFormat.TRANSLUCENT)
|
||||
}
|
||||
is TextureView -> surface.isOpaque = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,172 +13,280 @@ import java.math.BigDecimal
|
||||
import java.math.RoundingMode
|
||||
|
||||
class FrameRateManager(
|
||||
private val activity: Activity,
|
||||
private val handler: Handler,
|
||||
private val onDisplayChanged: () -> Unit,
|
||||
private val log: (String) -> Unit = { Log.d(TAG, it) }
|
||||
private val activity: Activity,
|
||||
private val handler: Handler,
|
||||
private val log: (String) -> Unit = { Log.d(TAG, it) }
|
||||
) {
|
||||
companion object {
|
||||
private const val TAG = "FrameRateManager"
|
||||
private const val SHORT_VIDEO_LENGTH_MS = 300000L // 5 minutes
|
||||
companion object {
|
||||
private const val TAG = "FrameRateManager"
|
||||
private const val SHORT_VIDEO_LENGTH_MS = 300000L // 5 minutes
|
||||
private const val DISPLAY_SETTLE_MS = 2000L
|
||||
private const val WATCHDOG_MARGIN_MS = 3000L
|
||||
}
|
||||
|
||||
private var currentVideoFps: Float = 0f
|
||||
private var displayListener: DisplayManager.DisplayListener? = null
|
||||
private var pendingSettleRunnable: Runnable? = null
|
||||
private var watchdogRunnable: Runnable? = null
|
||||
private var pendingCompletion: ((switched: Boolean) -> Unit)? = null
|
||||
|
||||
private fun getDisplayManager(): DisplayManager = activity.getSystemService(Context.DISPLAY_SERVICE) as DisplayManager
|
||||
|
||||
// / Request a display frame-rate switch. Invokes [onComplete] once, either:
|
||||
// / - immediately with `switched=false` when no switch is needed (invalid
|
||||
// / fps, no matching mode, seamless fallback); or
|
||||
// / - after the real DisplayListener event + [DISPLAY_SETTLE_MS] + the
|
||||
// / caller's [extraDelayMs], with `switched=true`; or
|
||||
// / - via a watchdog with `switched=true` if the real event never arrives,
|
||||
// / so the caller doesn't hang.
|
||||
// /
|
||||
// / The caller is responsible for pausing playback before calling and
|
||||
// / resuming it after [onComplete] fires.
|
||||
fun setVideoFrameRate(
|
||||
fps: Float,
|
||||
videoDurationMs: Long,
|
||||
surface: Surface?,
|
||||
extraDelayMs: Long,
|
||||
onComplete: (switched: Boolean) -> Unit
|
||||
) {
|
||||
currentVideoFps = fps
|
||||
if (fps <= 0f) {
|
||||
Log.d(TAG, "setVideoFrameRate: Invalid fps ($fps), skipping")
|
||||
onComplete(false)
|
||||
return
|
||||
}
|
||||
|
||||
private var currentVideoFps: Float = 0f
|
||||
private var displayListener: DisplayManager.DisplayListener? = null
|
||||
log("fps=$fps, duration=${videoDurationMs}ms, extraDelayMs=$extraDelayMs, API=${Build.VERSION.SDK_INT}")
|
||||
|
||||
private fun getDisplayManager(): DisplayManager {
|
||||
return activity.getSystemService(Context.DISPLAY_SERVICE) as DisplayManager
|
||||
when {
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
|
||||
if (surface == null) {
|
||||
Log.d(TAG, "setVideoFrameRate: Surface not available")
|
||||
onComplete(false)
|
||||
return
|
||||
}
|
||||
setFrameRateS(fps, surface, videoDurationMs, extraDelayMs, onComplete)
|
||||
}
|
||||
// API R's Surface.setFrameRate() only supports seamless switching (no
|
||||
// CHANGE_FRAME_RATE_ALWAYS), so 60→24Hz won't switch. Fall through to
|
||||
// preferredDisplayModeId which directly sets the display mode.
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M -> setFrameRateM(fps, extraDelayMs, onComplete)
|
||||
else -> onComplete(false)
|
||||
}
|
||||
}
|
||||
|
||||
fun clearVideoFrameRate() {
|
||||
Log.d(TAG, "clearVideoFrameRate")
|
||||
currentVideoFps = 0f
|
||||
// Resolve any pending setVideoFrameRate future as "not switched" so
|
||||
// the Dart caller's await doesn't hang on player dispose.
|
||||
firePendingCompletion("clear", switched = false)
|
||||
// Restore default display mode on API M (preferredDisplayModeId persists)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
activity.window?.attributes?.let { attrs ->
|
||||
attrs.preferredDisplayModeId = 0
|
||||
activity.window?.attributes = attrs
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Release pending callbacks/listener without restoring the display mode.
|
||||
// Used by player-core dispose paths so a backend handoff (e.g. ExoPlayer→MPV
|
||||
// audio fallback) doesn't clobber the just-applied refresh-rate switch —
|
||||
// window-scoped preferredDisplayModeId persists across the SurfaceView swap,
|
||||
// letting MPV inherit the rate without a second HDMI renegotiation.
|
||||
fun releasePending() {
|
||||
Log.d(TAG, "releasePending")
|
||||
currentVideoFps = 0f
|
||||
firePendingCompletion("release", switched = false)
|
||||
}
|
||||
|
||||
private fun cancelPendingCallbacks() {
|
||||
pendingSettleRunnable?.let { handler.removeCallbacks(it) }
|
||||
watchdogRunnable?.let { handler.removeCallbacks(it) }
|
||||
pendingSettleRunnable = null
|
||||
watchdogRunnable = null
|
||||
}
|
||||
|
||||
private fun firePendingCompletion(reason: String, switched: Boolean) {
|
||||
cancelPendingCallbacks()
|
||||
displayListener?.let {
|
||||
getDisplayManager().unregisterDisplayListener(it)
|
||||
displayListener = null
|
||||
}
|
||||
val cb = pendingCompletion ?: return
|
||||
pendingCompletion = null
|
||||
Log.d(TAG, "FrameRateManager complete ($reason, switched=$switched)")
|
||||
cb(switched)
|
||||
}
|
||||
|
||||
private fun registerDisplayListener(extraDelayMs: Long, onComplete: (switched: Boolean) -> Unit) {
|
||||
// Resolve any previous pending op before starting a new one.
|
||||
firePendingCompletion("superseded", switched = false)
|
||||
pendingCompletion = onComplete
|
||||
|
||||
displayListener = object : DisplayManager.DisplayListener {
|
||||
override fun onDisplayAdded(displayId: Int) = Unit
|
||||
override fun onDisplayRemoved(displayId: Int) = Unit
|
||||
override fun onDisplayChanged(displayId: Int) {
|
||||
// Unregister immediately so a chatty display (e.g. several
|
||||
// onDisplayChanged events during HDMI renegotiation) doesn't
|
||||
// queue multiple settle callbacks.
|
||||
getDisplayManager().unregisterDisplayListener(this)
|
||||
displayListener = null
|
||||
|
||||
val settle = Runnable { firePendingCompletion("display settled", switched = true) }
|
||||
pendingSettleRunnable = settle
|
||||
handler.postDelayed(settle, DISPLAY_SETTLE_MS + extraDelayMs)
|
||||
}
|
||||
}
|
||||
getDisplayManager().registerDisplayListener(displayListener, handler)
|
||||
|
||||
// Watchdog: if the TV never signals a display change (silently ignoring
|
||||
// the mode request), still complete after a bounded wait so the caller
|
||||
// doesn't hang.
|
||||
val watchdog = Runnable { firePendingCompletion("watchdog", switched = true) }
|
||||
watchdogRunnable = watchdog
|
||||
handler.postDelayed(watchdog, DISPLAY_SETTLE_MS + extraDelayMs + WATCHDOG_MARGIN_MS)
|
||||
}
|
||||
|
||||
private fun currentRateMatchesFps(fps: Float): Boolean {
|
||||
val current = activity.display?.mode?.refreshRate ?: return false
|
||||
if (current <= 0f) return false
|
||||
// Treat "equal within a frame" and "clean multiple" as a match —
|
||||
// same tolerance the API M matcher uses below.
|
||||
if (kotlin.math.abs(current - fps) < 0.1f) return true
|
||||
val mod = current % fps
|
||||
return mod < 0.1f || (fps - mod) < 0.1f
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.S)
|
||||
private fun setFrameRateS(
|
||||
fps: Float,
|
||||
surface: Surface,
|
||||
videoDurationMs: Long,
|
||||
extraDelayMs: Long,
|
||||
onComplete: (switched: Boolean) -> Unit
|
||||
) {
|
||||
Log.d(TAG, "setFrameRateS: fps=$fps, duration=${videoDurationMs}ms")
|
||||
|
||||
// If the current display rate already satisfies the video fps, issue
|
||||
// the hint for book-keeping but skip the listener — otherwise we'd
|
||||
// wait for an onDisplayChanged event that never fires and end up
|
||||
// burning the watchdog timeout for no reason.
|
||||
if (currentRateMatchesFps(fps)) {
|
||||
Log.d(TAG, "Current display rate already matches ${fps}fps, no switch needed")
|
||||
surface.setFrameRate(
|
||||
fps,
|
||||
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
|
||||
Surface.CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS
|
||||
)
|
||||
onComplete(false)
|
||||
return
|
||||
}
|
||||
|
||||
fun setVideoFrameRate(fps: Float, videoDurationMs: Long, surface: Surface?) {
|
||||
currentVideoFps = fps
|
||||
if (fps <= 0f) {
|
||||
Log.d(TAG, "setVideoFrameRate: Invalid fps ($fps), skipping")
|
||||
return
|
||||
}
|
||||
|
||||
log("fps=$fps, duration=${videoDurationMs}ms, API=${Build.VERSION.SDK_INT}")
|
||||
|
||||
when {
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
|
||||
if (surface == null) {
|
||||
Log.d(TAG, "setVideoFrameRate: Surface not available")
|
||||
return
|
||||
}
|
||||
setFrameRateS(fps, surface, videoDurationMs)
|
||||
}
|
||||
// API R's Surface.setFrameRate() only supports seamless switching (no
|
||||
// CHANGE_FRAME_RATE_ALWAYS), so 60→24Hz won't switch. Fall through to
|
||||
// preferredDisplayModeId which directly sets the display mode.
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M -> setFrameRateM(fps)
|
||||
}
|
||||
if (videoDurationMs < SHORT_VIDEO_LENGTH_MS) {
|
||||
Log.d(TAG, "Short video, using seamless-only switching")
|
||||
surface.setFrameRate(
|
||||
fps,
|
||||
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
|
||||
Surface.CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS
|
||||
)
|
||||
onComplete(false)
|
||||
return
|
||||
}
|
||||
|
||||
fun clearVideoFrameRate() {
|
||||
Log.d(TAG, "clearVideoFrameRate")
|
||||
currentVideoFps = 0f
|
||||
displayListener?.let {
|
||||
getDisplayManager().unregisterDisplayListener(it)
|
||||
displayListener = null
|
||||
}
|
||||
// Restore default display mode on API M (preferredDisplayModeId persists)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
activity.window?.attributes?.let { attrs ->
|
||||
attrs.preferredDisplayModeId = 0
|
||||
activity.window?.attributes = attrs
|
||||
}
|
||||
var seamless = false
|
||||
activity.display?.mode?.alternativeRefreshRates?.let { refreshRates ->
|
||||
for (rate in refreshRates) {
|
||||
if (fps.toString().startsWith(rate.toString()) ||
|
||||
rate.toString().startsWith(fps.toString()) ||
|
||||
rate % fps == 0f
|
||||
) {
|
||||
seamless = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun registerDisplayListener() {
|
||||
displayListener?.let {
|
||||
getDisplayManager().unregisterDisplayListener(it)
|
||||
}
|
||||
if (seamless) {
|
||||
log("Seamless switch available for ${fps}fps")
|
||||
surface.setFrameRate(
|
||||
fps,
|
||||
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
|
||||
Surface.CHANGE_FRAME_RATE_ALWAYS
|
||||
)
|
||||
registerDisplayListener(extraDelayMs, onComplete)
|
||||
} else {
|
||||
val userPreference = getDisplayManager().matchContentFrameRateUserPreference
|
||||
if (userPreference == DisplayManager.MATCH_CONTENT_FRAMERATE_ALWAYS) {
|
||||
Log.d(TAG, "User preference allows non-seamless switch")
|
||||
surface.setFrameRate(
|
||||
fps,
|
||||
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
|
||||
Surface.CHANGE_FRAME_RATE_ALWAYS
|
||||
)
|
||||
registerDisplayListener(extraDelayMs, onComplete)
|
||||
} else {
|
||||
Log.d(TAG, "Non-seamless switch not allowed, using seamless-only")
|
||||
surface.setFrameRate(
|
||||
fps,
|
||||
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
|
||||
Surface.CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS
|
||||
)
|
||||
onComplete(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
displayListener = object : DisplayManager.DisplayListener {
|
||||
override fun onDisplayAdded(displayId: Int) = Unit
|
||||
override fun onDisplayRemoved(displayId: Int) = Unit
|
||||
override fun onDisplayChanged(displayId: Int) {
|
||||
handler.postDelayed({
|
||||
onDisplayChanged()
|
||||
}, 2000L)
|
||||
getDisplayManager().unregisterDisplayListener(this)
|
||||
displayListener = null
|
||||
}
|
||||
}
|
||||
getDisplayManager().registerDisplayListener(displayListener, handler)
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
private fun setFrameRateM(fps: Float, extraDelayMs: Long, onComplete: (switched: Boolean) -> Unit) {
|
||||
Log.d(TAG, "setFrameRateM: fps=$fps")
|
||||
val wm = activity.getSystemService(Context.WINDOW_SERVICE) as WindowManager
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
val display = wm.defaultDisplay
|
||||
if (display == null) {
|
||||
onComplete(false)
|
||||
return
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.S)
|
||||
private fun setFrameRateS(fps: Float, surface: Surface, videoDurationMs: Long) {
|
||||
Log.d(TAG, "setFrameRateS: fps=$fps, duration=${videoDurationMs}ms")
|
||||
val supportedModes = display.supportedModes
|
||||
if (supportedModes == null) {
|
||||
onComplete(false)
|
||||
return
|
||||
}
|
||||
val currentMode = display.mode
|
||||
var modeToUse = currentMode
|
||||
|
||||
if (videoDurationMs < SHORT_VIDEO_LENGTH_MS) {
|
||||
Log.d(TAG, "Short video, using seamless-only switching")
|
||||
surface.setFrameRate(
|
||||
fps,
|
||||
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
|
||||
Surface.CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS
|
||||
)
|
||||
return
|
||||
}
|
||||
for (mode in supportedModes) {
|
||||
if (mode.physicalHeight != currentMode.physicalHeight ||
|
||||
mode.physicalWidth != currentMode.physicalWidth
|
||||
) {
|
||||
continue
|
||||
}
|
||||
|
||||
var seamless = false
|
||||
activity.display?.mode?.alternativeRefreshRates?.let { refreshRates ->
|
||||
for (rate in refreshRates) {
|
||||
if (fps.toString().startsWith(rate.toString()) ||
|
||||
rate.toString().startsWith(fps.toString()) ||
|
||||
rate % fps == 0f) {
|
||||
seamless = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (seamless) {
|
||||
log("Seamless switch available for ${fps}fps")
|
||||
surface.setFrameRate(
|
||||
fps,
|
||||
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
|
||||
Surface.CHANGE_FRAME_RATE_ALWAYS
|
||||
)
|
||||
registerDisplayListener()
|
||||
} else {
|
||||
val userPreference = getDisplayManager().matchContentFrameRateUserPreference
|
||||
if (userPreference == DisplayManager.MATCH_CONTENT_FRAMERATE_ALWAYS) {
|
||||
Log.d(TAG, "User preference allows non-seamless switch")
|
||||
surface.setFrameRate(
|
||||
fps,
|
||||
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
|
||||
Surface.CHANGE_FRAME_RATE_ALWAYS
|
||||
)
|
||||
registerDisplayListener()
|
||||
} else {
|
||||
Log.d(TAG, "Non-seamless switch not allowed, using seamless-only")
|
||||
surface.setFrameRate(
|
||||
fps,
|
||||
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
|
||||
Surface.CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS
|
||||
)
|
||||
}
|
||||
}
|
||||
if (BigDecimal(fps.toString()).setScale(1, RoundingMode.FLOOR) ==
|
||||
BigDecimal(mode.refreshRate.toString()).setScale(1, RoundingMode.FLOOR)
|
||||
) {
|
||||
modeToUse = mode
|
||||
break
|
||||
} else if ((mode.refreshRate % fps).let { it < 0.1f || (fps - it) < 0.1f }) {
|
||||
modeToUse = mode
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
private fun setFrameRateM(fps: Float) {
|
||||
Log.d(TAG, "setFrameRateM: fps=$fps")
|
||||
val wm = activity.getSystemService(Context.WINDOW_SERVICE) as WindowManager
|
||||
@Suppress("DEPRECATION")
|
||||
val display = wm.defaultDisplay ?: return
|
||||
|
||||
display.supportedModes?.let { supportedModes ->
|
||||
val currentMode = display.mode
|
||||
var modeToUse = currentMode
|
||||
|
||||
for (mode in supportedModes) {
|
||||
if (mode.physicalHeight != currentMode.physicalHeight ||
|
||||
mode.physicalWidth != currentMode.physicalWidth) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (BigDecimal(fps.toString()).setScale(1, RoundingMode.FLOOR) ==
|
||||
BigDecimal(mode.refreshRate.toString()).setScale(1, RoundingMode.FLOOR)) {
|
||||
modeToUse = mode
|
||||
break
|
||||
} else if ((mode.refreshRate % fps).let { it < 0.1f || (fps - it) < 0.1f }) {
|
||||
modeToUse = mode
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (modeToUse != currentMode) {
|
||||
Log.d(TAG, "Switching to mode ${modeToUse.modeId} (${modeToUse.refreshRate}Hz)")
|
||||
activity.window?.attributes?.let { attrs ->
|
||||
attrs.preferredDisplayModeId = modeToUse.modeId
|
||||
activity.window?.attributes = attrs
|
||||
}
|
||||
registerDisplayListener()
|
||||
}
|
||||
}
|
||||
if (modeToUse == currentMode) {
|
||||
onComplete(false)
|
||||
return
|
||||
}
|
||||
|
||||
Log.d(TAG, "Switching to mode ${modeToUse.modeId} (${modeToUse.refreshRate}Hz)")
|
||||
activity.window?.attributes?.let { attrs ->
|
||||
attrs.preferredDisplayModeId = modeToUse.modeId
|
||||
activity.window?.attributes = attrs
|
||||
}
|
||||
registerDisplayListener(extraDelayMs, onComplete)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.edde746.plezy.shared
|
||||
|
||||
interface PlayerDelegate {
|
||||
fun onPropertyChange(name: String, value: Any?)
|
||||
fun onEvent(name: String, data: Map<String, Any>?)
|
||||
fun onPropertyChange(name: String, value: Any?)
|
||||
fun onEvent(name: String, data: Map<String, Any>?)
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ package com.edde746.plezy.shared
|
||||
import android.graphics.Color
|
||||
|
||||
object ThemeHelper {
|
||||
fun themeColor(mode: String?): Int? = when (mode) {
|
||||
"oled" -> Color.BLACK
|
||||
"dark" -> Color.parseColor("#0E0F12")
|
||||
"light" -> Color.parseColor("#F7F7F8")
|
||||
else -> null
|
||||
}
|
||||
fun themeColor(mode: String?): Int? = when (mode) {
|
||||
"oled" -> Color.BLACK
|
||||
"dark" -> Color.parseColor("#0E0F12")
|
||||
"light" -> Color.parseColor("#F7F7F8")
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,167 +16,169 @@ import java.util.concurrent.Executors
|
||||
* Flutter plugin for Android TV Watch Next integration.
|
||||
* Syncs Plex "On Deck" content to the Android TV launcher's Watch Next row.
|
||||
*/
|
||||
class WatchNextPlugin : FlutterPlugin, MethodChannel.MethodCallHandler {
|
||||
class WatchNextPlugin :
|
||||
FlutterPlugin,
|
||||
MethodChannel.MethodCallHandler {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "WatchNextPlugin"
|
||||
private const val METHOD_CHANNEL = "com.plezy/watch_next"
|
||||
companion object {
|
||||
private const val TAG = "WatchNextPlugin"
|
||||
private const val METHOD_CHANNEL = "com.plezy/watch_next"
|
||||
|
||||
private var pendingDeepLink: String? = null
|
||||
|
||||
/**
|
||||
* Parse a Watch Next deep link intent.
|
||||
* Returns the content ID if this was a Watch Next intent, null otherwise.
|
||||
*/
|
||||
fun handleIntent(intent: Intent?): String? {
|
||||
val data = intent?.data ?: return null
|
||||
if (data.scheme == "plezy" && data.authority == "play") {
|
||||
return data.getQueryParameter("content_id")
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
private lateinit var methodChannel: MethodChannel
|
||||
private var applicationContext: Context? = null
|
||||
private var watchNextProvider: WatchNextProvider? = null
|
||||
private val ioExecutor by lazy { Executors.newSingleThreadExecutor() }
|
||||
private val mainHandler = Handler(Looper.getMainLooper())
|
||||
|
||||
override fun onAttachedToEngine(binding: FlutterPlugin.FlutterPluginBinding) {
|
||||
applicationContext = binding.applicationContext
|
||||
watchNextProvider = WatchNextProvider(binding.applicationContext)
|
||||
methodChannel = MethodChannel(binding.binaryMessenger, METHOD_CHANNEL)
|
||||
methodChannel.setMethodCallHandler(this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {
|
||||
methodChannel.setMethodCallHandler(null)
|
||||
applicationContext = null
|
||||
watchNextProvider = null
|
||||
ioExecutor.shutdown()
|
||||
}
|
||||
|
||||
override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
|
||||
when (call.method) {
|
||||
"isSupported" -> handleIsSupported(result)
|
||||
"sync" -> handleSync(call, result)
|
||||
"clear" -> handleClear(result)
|
||||
"remove" -> handleRemove(call, result)
|
||||
"getInitialDeepLink" -> handleGetInitialDeepLink(result)
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleIsSupported(result: MethodChannel.Result) {
|
||||
val context = applicationContext
|
||||
if (context == null) {
|
||||
result.success(false)
|
||||
return
|
||||
}
|
||||
result.success(context.packageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK))
|
||||
}
|
||||
|
||||
private fun handleSync(call: MethodCall, result: MethodChannel.Result) {
|
||||
val provider = watchNextProvider
|
||||
if (provider == null) {
|
||||
result.error("NOT_INITIALIZED", "WatchNextProvider not initialized", null)
|
||||
return
|
||||
}
|
||||
|
||||
val itemsData = call.argument<List<Map<String, Any?>>>("items")
|
||||
if (itemsData == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'items' argument", null)
|
||||
return
|
||||
}
|
||||
|
||||
val items = itemsData.mapNotNull { parseWatchNextItem(it) }
|
||||
executeOnIo(result) { provider.syncWatchNextPrograms(items) }
|
||||
}
|
||||
|
||||
private fun handleClear(result: MethodChannel.Result) {
|
||||
val provider = watchNextProvider
|
||||
if (provider == null) {
|
||||
result.error("NOT_INITIALIZED", "WatchNextProvider not initialized", null)
|
||||
return
|
||||
}
|
||||
executeOnIo(result) { provider.clearAll() }
|
||||
}
|
||||
|
||||
private fun handleRemove(call: MethodCall, result: MethodChannel.Result) {
|
||||
val provider = watchNextProvider
|
||||
if (provider == null) {
|
||||
result.error("NOT_INITIALIZED", "WatchNextProvider not initialized", null)
|
||||
return
|
||||
}
|
||||
|
||||
val contentId = call.argument<String>("contentId")
|
||||
if (contentId == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'contentId' argument", null)
|
||||
return
|
||||
}
|
||||
executeOnIo(result) { provider.removeItem(contentId) }
|
||||
}
|
||||
|
||||
private fun executeOnIo(result: MethodChannel.Result, block: () -> Any?) {
|
||||
try {
|
||||
ioExecutor.execute {
|
||||
try {
|
||||
val value = block()
|
||||
mainHandler.post { result.success(value) }
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "IO operation failed: ${e.message}", e)
|
||||
mainHandler.post { result.error("IO_ERROR", e.message, null) }
|
||||
}
|
||||
}
|
||||
} catch (e: java.util.concurrent.RejectedExecutionException) {
|
||||
result.error("SHUTDOWN", "Plugin is shutting down", null)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleGetInitialDeepLink(result: MethodChannel.Result) {
|
||||
val contentId = pendingDeepLink
|
||||
pendingDeepLink = null
|
||||
result.success(contentId)
|
||||
}
|
||||
|
||||
private fun parseWatchNextItem(data: Map<String, Any?>): WatchNextProvider.WatchNextItem? {
|
||||
val contentId = data["contentId"] as? String ?: return null
|
||||
val title = data["title"] as? String ?: return null
|
||||
|
||||
val typeString = data["type"] as? String ?: "movie"
|
||||
val type = when (typeString.lowercase()) {
|
||||
"episode" -> TvContractCompat.WatchNextPrograms.TYPE_TV_EPISODE
|
||||
"movie" -> TvContractCompat.WatchNextPrograms.TYPE_MOVIE
|
||||
else -> TvContractCompat.WatchNextPrograms.TYPE_MOVIE
|
||||
}
|
||||
|
||||
return WatchNextProvider.WatchNextItem(
|
||||
contentId = contentId,
|
||||
title = title,
|
||||
episodeTitle = data["episodeTitle"] as? String,
|
||||
description = data["description"] as? String,
|
||||
posterUri = data["posterUri"] as? String,
|
||||
type = type,
|
||||
duration = (data["duration"] as? Number)?.toLong() ?: 0L,
|
||||
lastPlaybackPosition = (data["lastPlaybackPosition"] as? Number)?.toLong() ?: 0L,
|
||||
lastEngagementTime = (data["lastEngagementTime"] as? Number)?.toLong() ?: System.currentTimeMillis(),
|
||||
seriesTitle = data["seriesTitle"] as? String,
|
||||
seasonNumber = (data["seasonNumber"] as? Number)?.toInt(),
|
||||
episodeNumber = (data["episodeNumber"] as? Number)?.toInt()
|
||||
)
|
||||
}
|
||||
private var pendingDeepLink: String? = null
|
||||
|
||||
/**
|
||||
* Store a deep link content ID for delivery to Flutter.
|
||||
* Called from MainActivity on intent receipt.
|
||||
* Parse a Watch Next deep link intent.
|
||||
* Returns the content ID if this was a Watch Next intent, null otherwise.
|
||||
*/
|
||||
fun notifyDeepLink(contentId: String) {
|
||||
pendingDeepLink = contentId
|
||||
try {
|
||||
methodChannel.invokeMethod("onWatchNextTap", mapOf("contentId" to contentId))
|
||||
} catch (e: Exception) {
|
||||
Log.d(TAG, "Method channel not ready, stored as pending deep link")
|
||||
}
|
||||
fun handleIntent(intent: Intent?): String? {
|
||||
val data = intent?.data ?: return null
|
||||
if (data.scheme == "plezy" && data.authority == "play") {
|
||||
return data.getQueryParameter("content_id")
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
private lateinit var methodChannel: MethodChannel
|
||||
private var applicationContext: Context? = null
|
||||
private var watchNextProvider: WatchNextProvider? = null
|
||||
private val ioExecutor by lazy { Executors.newSingleThreadExecutor() }
|
||||
private val mainHandler = Handler(Looper.getMainLooper())
|
||||
|
||||
override fun onAttachedToEngine(binding: FlutterPlugin.FlutterPluginBinding) {
|
||||
applicationContext = binding.applicationContext
|
||||
watchNextProvider = WatchNextProvider(binding.applicationContext)
|
||||
methodChannel = MethodChannel(binding.binaryMessenger, METHOD_CHANNEL)
|
||||
methodChannel.setMethodCallHandler(this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {
|
||||
methodChannel.setMethodCallHandler(null)
|
||||
applicationContext = null
|
||||
watchNextProvider = null
|
||||
ioExecutor.shutdown()
|
||||
}
|
||||
|
||||
override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
|
||||
when (call.method) {
|
||||
"isSupported" -> handleIsSupported(result)
|
||||
"sync" -> handleSync(call, result)
|
||||
"clear" -> handleClear(result)
|
||||
"remove" -> handleRemove(call, result)
|
||||
"getInitialDeepLink" -> handleGetInitialDeepLink(result)
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleIsSupported(result: MethodChannel.Result) {
|
||||
val context = applicationContext
|
||||
if (context == null) {
|
||||
result.success(false)
|
||||
return
|
||||
}
|
||||
result.success(context.packageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK))
|
||||
}
|
||||
|
||||
private fun handleSync(call: MethodCall, result: MethodChannel.Result) {
|
||||
val provider = watchNextProvider
|
||||
if (provider == null) {
|
||||
result.error("NOT_INITIALIZED", "WatchNextProvider not initialized", null)
|
||||
return
|
||||
}
|
||||
|
||||
val itemsData = call.argument<List<Map<String, Any?>>>("items")
|
||||
if (itemsData == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'items' argument", null)
|
||||
return
|
||||
}
|
||||
|
||||
val items = itemsData.mapNotNull { parseWatchNextItem(it) }
|
||||
executeOnIo(result) { provider.syncWatchNextPrograms(items) }
|
||||
}
|
||||
|
||||
private fun handleClear(result: MethodChannel.Result) {
|
||||
val provider = watchNextProvider
|
||||
if (provider == null) {
|
||||
result.error("NOT_INITIALIZED", "WatchNextProvider not initialized", null)
|
||||
return
|
||||
}
|
||||
executeOnIo(result) { provider.clearAll() }
|
||||
}
|
||||
|
||||
private fun handleRemove(call: MethodCall, result: MethodChannel.Result) {
|
||||
val provider = watchNextProvider
|
||||
if (provider == null) {
|
||||
result.error("NOT_INITIALIZED", "WatchNextProvider not initialized", null)
|
||||
return
|
||||
}
|
||||
|
||||
val contentId = call.argument<String>("contentId")
|
||||
if (contentId == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'contentId' argument", null)
|
||||
return
|
||||
}
|
||||
executeOnIo(result) { provider.removeItem(contentId) }
|
||||
}
|
||||
|
||||
private fun executeOnIo(result: MethodChannel.Result, block: () -> Any?) {
|
||||
try {
|
||||
ioExecutor.execute {
|
||||
try {
|
||||
val value = block()
|
||||
mainHandler.post { result.success(value) }
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "IO operation failed: ${e.message}", e)
|
||||
mainHandler.post { result.error("IO_ERROR", e.message, null) }
|
||||
}
|
||||
}
|
||||
} catch (e: java.util.concurrent.RejectedExecutionException) {
|
||||
result.error("SHUTDOWN", "Plugin is shutting down", null)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleGetInitialDeepLink(result: MethodChannel.Result) {
|
||||
val contentId = pendingDeepLink
|
||||
pendingDeepLink = null
|
||||
result.success(contentId)
|
||||
}
|
||||
|
||||
private fun parseWatchNextItem(data: Map<String, Any?>): WatchNextProvider.WatchNextItem? {
|
||||
val contentId = data["contentId"] as? String ?: return null
|
||||
val title = data["title"] as? String ?: return null
|
||||
|
||||
val typeString = data["type"] as? String ?: "movie"
|
||||
val type = when (typeString.lowercase()) {
|
||||
"episode" -> TvContractCompat.WatchNextPrograms.TYPE_TV_EPISODE
|
||||
"movie" -> TvContractCompat.WatchNextPrograms.TYPE_MOVIE
|
||||
else -> TvContractCompat.WatchNextPrograms.TYPE_MOVIE
|
||||
}
|
||||
|
||||
return WatchNextProvider.WatchNextItem(
|
||||
contentId = contentId,
|
||||
title = title,
|
||||
episodeTitle = data["episodeTitle"] as? String,
|
||||
description = data["description"] as? String,
|
||||
posterUri = data["posterUri"] as? String,
|
||||
type = type,
|
||||
duration = (data["duration"] as? Number)?.toLong() ?: 0L,
|
||||
lastPlaybackPosition = (data["lastPlaybackPosition"] as? Number)?.toLong() ?: 0L,
|
||||
lastEngagementTime = (data["lastEngagementTime"] as? Number)?.toLong() ?: System.currentTimeMillis(),
|
||||
seriesTitle = data["seriesTitle"] as? String,
|
||||
seasonNumber = (data["seasonNumber"] as? Number)?.toInt(),
|
||||
episodeNumber = (data["episodeNumber"] as? Number)?.toInt()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a deep link content ID for delivery to Flutter.
|
||||
* Called from MainActivity on intent receipt.
|
||||
*/
|
||||
fun notifyDeepLink(contentId: String) {
|
||||
pendingDeepLink = contentId
|
||||
try {
|
||||
methodChannel.invokeMethod("onWatchNextTap", mapOf("contentId" to contentId))
|
||||
} catch (e: Exception) {
|
||||
Log.d(TAG, "Method channel not ready, stored as pending deep link")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,154 +14,151 @@ import androidx.tvprovider.media.tv.WatchNextProgram
|
||||
*/
|
||||
class WatchNextProvider(private val context: Context) {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "WatchNextProvider"
|
||||
}
|
||||
companion object {
|
||||
private const val TAG = "WatchNextProvider"
|
||||
}
|
||||
|
||||
data class WatchNextItem(
|
||||
val contentId: String,
|
||||
val title: String,
|
||||
val episodeTitle: String?,
|
||||
val description: String?,
|
||||
val posterUri: String?,
|
||||
val type: Int,
|
||||
val duration: Long,
|
||||
val lastPlaybackPosition: Long,
|
||||
val lastEngagementTime: Long,
|
||||
val seriesTitle: String?,
|
||||
val seasonNumber: Int?,
|
||||
val episodeNumber: Int?
|
||||
data class WatchNextItem(
|
||||
val contentId: String,
|
||||
val title: String,
|
||||
val episodeTitle: String?,
|
||||
val description: String?,
|
||||
val posterUri: String?,
|
||||
val type: Int,
|
||||
val duration: Long,
|
||||
val lastPlaybackPosition: Long,
|
||||
val lastEngagementTime: Long,
|
||||
val seriesTitle: String?,
|
||||
val seasonNumber: Int?,
|
||||
val episodeNumber: Int?
|
||||
)
|
||||
|
||||
/**
|
||||
* Sync items to Watch Next row.
|
||||
* Uses applyBatch to delete + insert in a single transaction so the
|
||||
* launcher receives one content-change notification with the full set.
|
||||
*/
|
||||
fun syncWatchNextPrograms(items: List<WatchNextItem>): Boolean = try {
|
||||
val ops = ArrayList<ContentProviderOperation>()
|
||||
|
||||
ops.add(
|
||||
ContentProviderOperation.newDelete(
|
||||
TvContractCompat.WatchNextPrograms.CONTENT_URI
|
||||
).build()
|
||||
)
|
||||
|
||||
/**
|
||||
* Sync items to Watch Next row.
|
||||
* Uses applyBatch to delete + insert in a single transaction so the
|
||||
* launcher receives one content-change notification with the full set.
|
||||
*/
|
||||
fun syncWatchNextPrograms(items: List<WatchNextItem>): Boolean {
|
||||
return try {
|
||||
val ops = ArrayList<ContentProviderOperation>()
|
||||
for (item in items) {
|
||||
val program = buildProgram(item)
|
||||
ops.add(
|
||||
ContentProviderOperation.newInsert(
|
||||
TvContractCompat.WatchNextPrograms.CONTENT_URI
|
||||
).withValues(program.toContentValues()).build()
|
||||
)
|
||||
}
|
||||
|
||||
ops.add(
|
||||
ContentProviderOperation.newDelete(
|
||||
TvContractCompat.WatchNextPrograms.CONTENT_URI
|
||||
).build()
|
||||
context.contentResolver.applyBatch(TvContractCompat.AUTHORITY, ops)
|
||||
Log.d(TAG, "Synced ${items.size} Watch Next entries")
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to sync Watch Next programs", e)
|
||||
false
|
||||
}
|
||||
|
||||
fun clearAll(): Boolean = try {
|
||||
context.contentResolver.delete(
|
||||
TvContractCompat.WatchNextPrograms.CONTENT_URI,
|
||||
null,
|
||||
null
|
||||
)
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to clear Watch Next entries", e)
|
||||
false
|
||||
}
|
||||
|
||||
fun removeItem(contentId: String): Boolean {
|
||||
return try {
|
||||
val cursor = context.contentResolver.query(
|
||||
TvContractCompat.WatchNextPrograms.CONTENT_URI,
|
||||
arrayOf(
|
||||
TvContractCompat.WatchNextPrograms._ID,
|
||||
TvContractCompat.WatchNextPrograms.COLUMN_INTERNAL_PROVIDER_ID
|
||||
),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
|
||||
cursor?.use {
|
||||
val idIndex = it.getColumnIndex(TvContractCompat.WatchNextPrograms._ID)
|
||||
val providerIdIndex = it.getColumnIndex(TvContractCompat.WatchNextPrograms.COLUMN_INTERNAL_PROVIDER_ID)
|
||||
|
||||
if (idIndex < 0 || providerIdIndex < 0) return false
|
||||
|
||||
while (it.moveToNext()) {
|
||||
if (it.getString(providerIdIndex) == contentId) {
|
||||
val id = it.getLong(idIndex)
|
||||
val deleteUri = ContentUris.withAppendedId(
|
||||
TvContractCompat.WatchNextPrograms.CONTENT_URI,
|
||||
id
|
||||
)
|
||||
|
||||
for (item in items) {
|
||||
val program = buildProgram(item)
|
||||
ops.add(
|
||||
ContentProviderOperation.newInsert(
|
||||
TvContractCompat.WatchNextPrograms.CONTENT_URI
|
||||
).withValues(program.toContentValues()).build()
|
||||
)
|
||||
}
|
||||
|
||||
context.contentResolver.applyBatch(TvContractCompat.AUTHORITY, ops)
|
||||
Log.d(TAG, "Synced ${items.size} Watch Next entries")
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to sync Watch Next programs", e)
|
||||
false
|
||||
context.contentResolver.delete(deleteUri, null, null)
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to remove Watch Next item: $contentId", e)
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
private fun buildProgram(item: WatchNextItem): WatchNextProgram {
|
||||
val watchNextType = if (item.lastPlaybackPosition > 0) {
|
||||
TvContractCompat.WatchNextPrograms.WATCH_NEXT_TYPE_CONTINUE
|
||||
} else {
|
||||
TvContractCompat.WatchNextPrograms.WATCH_NEXT_TYPE_NEXT
|
||||
}
|
||||
|
||||
fun clearAll(): Boolean {
|
||||
return try {
|
||||
context.contentResolver.delete(
|
||||
TvContractCompat.WatchNextPrograms.CONTENT_URI,
|
||||
null,
|
||||
null
|
||||
)
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to clear Watch Next entries", e)
|
||||
false
|
||||
}
|
||||
val builder = WatchNextProgram.Builder()
|
||||
.setType(item.type)
|
||||
.setWatchNextType(watchNextType)
|
||||
.setTitle(item.title)
|
||||
.setInternalProviderId(item.contentId)
|
||||
.setLastEngagementTimeUtcMillis(item.lastEngagementTime)
|
||||
|
||||
item.description?.let { builder.setDescription(it) }
|
||||
|
||||
item.posterUri?.let { uri ->
|
||||
try {
|
||||
builder.setPosterArtUri(Uri.parse(uri))
|
||||
builder.setPosterArtAspectRatio(TvContractCompat.PreviewPrograms.ASPECT_RATIO_16_9)
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Failed to parse poster URI: $uri", e)
|
||||
}
|
||||
}
|
||||
|
||||
fun removeItem(contentId: String): Boolean {
|
||||
return try {
|
||||
val cursor = context.contentResolver.query(
|
||||
TvContractCompat.WatchNextPrograms.CONTENT_URI,
|
||||
arrayOf(
|
||||
TvContractCompat.WatchNextPrograms._ID,
|
||||
TvContractCompat.WatchNextPrograms.COLUMN_INTERNAL_PROVIDER_ID
|
||||
),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
|
||||
cursor?.use {
|
||||
val idIndex = it.getColumnIndex(TvContractCompat.WatchNextPrograms._ID)
|
||||
val providerIdIndex = it.getColumnIndex(TvContractCompat.WatchNextPrograms.COLUMN_INTERNAL_PROVIDER_ID)
|
||||
|
||||
if (idIndex < 0 || providerIdIndex < 0) return false
|
||||
|
||||
while (it.moveToNext()) {
|
||||
if (it.getString(providerIdIndex) == contentId) {
|
||||
val id = it.getLong(idIndex)
|
||||
val deleteUri = ContentUris.withAppendedId(
|
||||
TvContractCompat.WatchNextPrograms.CONTENT_URI,
|
||||
id
|
||||
)
|
||||
context.contentResolver.delete(deleteUri, null, null)
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to remove Watch Next item: $contentId", e)
|
||||
false
|
||||
}
|
||||
if (item.duration > 0) {
|
||||
builder.setDurationMillis(item.duration.toInt())
|
||||
if (item.lastPlaybackPosition > 0) {
|
||||
builder.setLastPlaybackPositionMillis(item.lastPlaybackPosition.toInt())
|
||||
}
|
||||
}
|
||||
|
||||
private fun buildProgram(item: WatchNextItem): WatchNextProgram {
|
||||
val watchNextType = if (item.lastPlaybackPosition > 0)
|
||||
TvContractCompat.WatchNextPrograms.WATCH_NEXT_TYPE_CONTINUE
|
||||
else
|
||||
TvContractCompat.WatchNextPrograms.WATCH_NEXT_TYPE_NEXT
|
||||
|
||||
val builder = WatchNextProgram.Builder()
|
||||
.setType(item.type)
|
||||
.setWatchNextType(watchNextType)
|
||||
.setTitle(item.title)
|
||||
.setInternalProviderId(item.contentId)
|
||||
.setLastEngagementTimeUtcMillis(item.lastEngagementTime)
|
||||
|
||||
item.description?.let { builder.setDescription(it) }
|
||||
|
||||
item.posterUri?.let { uri ->
|
||||
try {
|
||||
builder.setPosterArtUri(Uri.parse(uri))
|
||||
builder.setPosterArtAspectRatio(TvContractCompat.PreviewPrograms.ASPECT_RATIO_16_9)
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "Failed to parse poster URI: $uri", e)
|
||||
}
|
||||
}
|
||||
|
||||
if (item.duration > 0) {
|
||||
builder.setDurationMillis(item.duration.toInt())
|
||||
if (item.lastPlaybackPosition > 0) {
|
||||
builder.setLastPlaybackPositionMillis(item.lastPlaybackPosition.toInt())
|
||||
}
|
||||
}
|
||||
|
||||
if (item.type == TvContractCompat.WatchNextPrograms.TYPE_TV_EPISODE) {
|
||||
item.episodeTitle?.let { builder.setEpisodeTitle(it) }
|
||||
item.seasonNumber?.let { builder.setSeasonNumber(it) }
|
||||
item.episodeNumber?.let { builder.setEpisodeNumber(it) }
|
||||
}
|
||||
|
||||
val intentUri = Uri.Builder()
|
||||
.scheme("plezy")
|
||||
.authority("play")
|
||||
.appendQueryParameter("content_id", item.contentId)
|
||||
.build()
|
||||
builder.setIntentUri(intentUri)
|
||||
|
||||
return builder.build()
|
||||
if (item.type == TvContractCompat.WatchNextPrograms.TYPE_TV_EPISODE) {
|
||||
item.episodeTitle?.let { builder.setEpisodeTitle(it) }
|
||||
item.seasonNumber?.let { builder.setSeasonNumber(it) }
|
||||
item.episodeNumber?.let { builder.setEpisodeNumber(it) }
|
||||
}
|
||||
|
||||
val intentUri = Uri.Builder()
|
||||
.scheme("plezy")
|
||||
.authority("play")
|
||||
.appendQueryParameter("content_id", item.contentId)
|
||||
.build()
|
||||
builder.setIntentUri(intentUri)
|
||||
|
||||
return builder.build()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,11 +19,11 @@ platform :android do
|
||||
UI.user_error!("Could not extract version from pubspec.yaml")
|
||||
end
|
||||
|
||||
debug_info_dir = "./debug-info/#{version_name}+#{version_code}"
|
||||
git_commit = `git rev-parse --short HEAD`.strip
|
||||
|
||||
# Build the Flutter app
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build appbundle --dart-define=ENABLE_IN_APP_REVIEW=true --dart-define=ENABLE_SENTRY=true --dart-define=GIT_COMMIT=#{git_commit} --obfuscate --split-debug-info=#{debug_info_dir}/aab")
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build appbundle --dart-define=ENABLE_SENTRY=true --dart-define=GIT_COMMIT=#{git_commit} --dart-define=SENTRY_ENVIRONMENT=play-store --obfuscate --split-debug-info=debug-info/android-aab")
|
||||
sh("cd #{ENV['PWD']}/.. && ./scripts/upload-symbols.sh android-aab")
|
||||
|
||||
upload_to_play_store(
|
||||
track: "production",
|
||||
@@ -33,7 +33,8 @@ platform :android do
|
||||
)
|
||||
|
||||
# Build universal APK for Amazon Appstore (doesn't accept AABs, excludes x86 via env var)
|
||||
sh("cd #{ENV['PWD']}/.. && AMAZON=1 flutter build apk --release --dart-define=ENABLE_SENTRY=true --dart-define=GIT_COMMIT=#{git_commit} --obfuscate --split-debug-info=#{debug_info_dir}/apk")
|
||||
sh("cd #{ENV['PWD']}/.. && AMAZON=1 flutter build apk --release --dart-define=ENABLE_SENTRY=true --dart-define=GIT_COMMIT=#{git_commit} --dart-define=SENTRY_ENVIRONMENT=amazon --obfuscate --split-debug-info=debug-info/android-apk")
|
||||
sh("cd #{ENV['PWD']}/.. && ./scripts/upload-symbols.sh android-apk")
|
||||
|
||||
upload_to_amazon_appstore(
|
||||
apk_paths: [
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="75 75 363 363"><path fill="#02a9ff" d="M321.92 323.27V136.6c0-10.698-5.887-16.602-16.558-16.602h-36.433c-10.672 0-16.561 5.904-16.561 16.602v88.651c0 2.497 23.996 14.089 24.623 16.541 18.282 71.61 3.972 128.92-13.359 131.6 28.337 1.405 31.455 15.064 10.348 5.731 3.229-38.209 15.828-38.134 52.049-1.406.31.317 7.427 15.282 7.87 15.282h85.545c10.672 0 16.558-5.9 16.558-16.6v-36.524c0-10.698-5.886-16.602-16.558-16.602z"/><path fill="currentColor" d="M170.68 120 74.999 393h74.338l16.192-47.222h80.96L262.315 393h73.968l-95.314-273zm11.776 165.28 23.183-75.629 25.393 75.629z"/></svg>
|
||||
|
After Width: | Height: | Size: 633 B |
@@ -0,0 +1,4 @@
|
||||
<svg viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
|
||||
<path d="M24.2116 49.1581C22.6599 46.0424 32.8378 27.5879 35.9999 27.5879C39.1666 27.5895 49.3228 46.0764 47.7882 49.1581C46.2536 52.2398 25.7632 52.2738 24.2116 49.1581Z"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.481861 64.9951C-4.19479 55.6047 26.4765 0 36 0C45.5328 0 76.153 55.713 71.5274 64.9951C66.9018 74.2773 5.15852 74.3856 0.481861 64.9951ZM12.7358 56.847C15.8005 62.9995 56.2536 62.9314 59.2843 56.847C62.3149 50.761 42.2515 14.2605 36.0093 14.2605C29.767 14.2605 9.67118 50.6944 12.7358 56.847Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 614 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="25 37 900 900"><path fill="currentColor" d="M360.18,640.05h-93.37v-215.38h-.85l-71.97,95.92-70.16-95.92h-.96v215.38H29.5v-356.23h88.57l75.91,104.66,77.61-104.66h88.58v356.23Z"/><path fill="currentColor" d="M667.97,640.05h-93.37v-112.96h-101.99c.5,36.48,12.42,74.14,35.77,112.96l-75.8,50.14c-11.5-17.25-21.42-35.61-29.76-55.09-8.34-19.48-14.71-39.57-19.11-60.26-4.4-20.69-6.6-41.26-6.6-61.7s2.31-42.21,6.92-62.76c4.61-20.55,11.71-40.12,21.29-58.72,9.58-18.59,21.58-35.1,35.98-49.51,15.83-15.97,32.77-28.19,50.84-36.68,18.06-8.48,36.89-14.21,56.48-17.19,19.59-2.98,42.09-4.47,67.5-4.47h45.78l21.83,80.27h-73.25c-30.38,0-54.35,4.36-71.92,13.08-17.57,8.72-29.85,18.47-36.84,29.24-6.99,10.77-13.65,24.24-19.96,40.4h92.84v-71.76h93.37v264.99Z"/><path fill="currentColor" d="M797.69,559.78h122.54l-21.83,80.28h-194.08v-356.23h93.37v275.96Z"/></svg>
|
||||
|
After Width: | Height: | Size: 891 B |
@@ -0,0 +1,3 @@
|
||||
<svg viewBox="636.71 89.58 269.72 269.72" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
|
||||
<path d="M774.47 359.3H677.74L768.67 224.5L677.74 89.58H774.47L865.4 224.5L774.47 359.3Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 199 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><linearGradient id="g" x1="0" y1="24" x2="24" y2="0" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ab543a"/><stop offset="1" stop-color="#ff7e57"/></linearGradient></defs><path fill="url(#g)" d="M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm2.19 12.19L6 18l3.81-8.19L18 6l-3.81 8.19z"/></svg>
|
||||
|
After Width: | Height: | Size: 481 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><linearGradient id="g" x1="0" y1="24" x2="24" y2="0" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ab543a"/><stop offset="1" stop-color="#ff7e57"/></linearGradient></defs><path fill="url(#g)" d="M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"/></svg>
|
||||
|
After Width: | Height: | Size: 405 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><linearGradient id="g" x1="0" y1="24" x2="24" y2="0" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ab543a"/><stop offset="1" stop-color="#ff7e57"/></linearGradient></defs><path fill="url(#g)" d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>
|
||||
|
After Width: | Height: | Size: 327 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><linearGradient id="g" x1="0" y1="24" x2="24" y2="0" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ab543a"/><stop offset="1" stop-color="#ff7e57"/></linearGradient></defs><path fill="url(#g)" d="M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"/></svg>
|
||||
|
After Width: | Height: | Size: 578 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><linearGradient id="g" x1="0" y1="24" x2="24" y2="0" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ab543a"/><stop offset="1" stop-color="#ff7e57"/></linearGradient></defs><path fill="url(#g)" d="M21 6h-7.59l3.29-3.29L16 2l-4 4-4-4-.71.71L10.59 6H3c-1.1 0-2 .89-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.11-.9-2-2-2zm0 14H3V8h18v12zM9 10v8l7-4z"/></svg>
|
||||
|
After Width: | Height: | Size: 437 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><linearGradient id="g" x1="0" y1="24" x2="24" y2="0" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ab543a"/><stop offset="1" stop-color="#ff7e57"/></linearGradient></defs><path fill="url(#g)" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"/></svg>
|
||||
|
After Width: | Height: | Size: 376 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><linearGradient id="g" x1="0" y1="24" x2="24" y2="0" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ab543a"/><stop offset="1" stop-color="#ff7e57"/></linearGradient></defs><path fill="url(#g)" d="M12 12.75c1.63 0 3.07.39 4.24.9 1.08.48 1.76 1.56 1.76 2.73V18H6v-1.61c0-1.18.68-2.26 1.76-2.73 1.17-.52 2.61-.91 4.24-.91zM4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58C.48 14.9 0 15.62 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29zM20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57zM12 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z"/></svg>
|
||||
|
After Width: | Height: | Size: 794 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="205 196 1124 1124"><path fill="currentColor" d="M205.832 970.284c0 35.322 1.82 65.9 5.433 91.774 6.709 53.176 28.198 94.359 64.507 123.51 33.579 27.302 88.907 45.656 165.984 55.065 63.178 7.983 165.983 11.993 308.45 11.993 234.287 0 377.455-7.982 429.428-23.947 52.859-15.964 90.936-45.77 114.232-89.46 23.295-44.153 34.944-113.446 34.944-207.843 0-84.525-11.907-145.798-35.645-183.858-15.702-25.836-36.64-45.772-62.885-59.885-26.244-14.074-61.52-24.64-105.9-31.697-43.937-7.018-145.452-12.917-304.58-17.622-175.752-5.63-274.576-11.49-296.545-17.584-26.024-7.519-39-28.188-39-62.006 0-35.205 12.312-57.03 36.972-65.514 21.97-7.018 92.115-10.566 210.476-10.566 119.65 0 194.955 1.427 225.92 4.203 34.942 3.317 55.584 18.04 61.85 44.26 2.25 8.908 3.835 24.833 4.72 47.777h271c.368-22.442.589-38.83.589-49.127 0-95.475-21.527-161.676-64.58-198.657-31.847-26.683-83.858-45.386-156.032-56.183-54.7-7.944-148.4-11.915-281.099-11.915-204.024 0-333.149 4.704-387.407 14.075-60.082 10.797-104.942 33.047-134.505 66.748-39.477 44.538-59.198 121.158-59.198 229.823 0 51.555 4.017 93.278 12.09 125.129 14.338 57.649 44.822 98.407 91.451 122.276 36.309 18.741 98.861 29.538 187.622 32.353 34.058.926 108.444 4.204 223.228 9.833 111.172 5.63 184.23 8.445 219.212 8.445 50.645.926 82.678 8.213 96.168 21.787 9.843 9.832 14.783 26.915 14.783 51.286 0 35.63-7.852 58.612-23.518 68.908-11.206 7.018-34.502 11.953-69.887 14.73-18.837.963-87.84 1.658-207.011 2.12-86.954-.462-138.265-.924-153.93-1.387-31.369-.926-53.338-2.584-65.871-4.936-12.532-2.314-23.738-6.44-33.58-12.996-18.835-13.573-28.014-44.036-27.571-91.389H205.832v50.824-.347z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><circle cx="24" cy="24" r="24" fill="transparent"/><path fill="currentColor" d="M45.99 14.39 30.17 30.22l-1.46-1.46 16.31-16.32c-.15-.3-.32-.58-.5-.87l-17.2 17.2 2.16 2.16-1.46 1.46-3.62-3.62L43.34 9.82c-.18-.27-.38-.53-.6-.78L23.01 28.78l4.31 4.31-1.46 1.46-14.4-14.4 1.46-1.46 8.62 8.62L41.37 7.46c-.12-.14-.26-.28-.4-.42C36.62 2.69 30.62 0 24 0S11.38 2.69 7.03 7.03C2.69 11.37 0 17.37 0 24c0 13.25 10.75 24 24 24 6.62 0 12.62-2.69 16.97-7.03C45.31 36.64 48 30.64 48 24c0-3.42-.71-6.67-2.01-9.61ZM21.54 25.9l-7.93-7.92 1.46-1.46L23 24.44l-1.46 1.46Zm2.16-2.16-7.93-7.92 1.46-1.46 7.93 7.92-1.46 1.46Zm.3 19.65c-10.7 0-19.39-8.7-19.39-19.39S13.3 4.61 24 4.61c2.91 0 5.72.63 8.33 1.88l-.89 1.88c-2.33-1.11-4.84-1.68-7.43-1.68-9.55 0-17.33 7.77-17.33 17.32s7.78 17.33 17.33 17.33c6.82 0 13.03-4.03 15.82-10.25l1.89.84C38.6 38.9 31.65 43.41 24.01 43.41Z"/></svg>
|
||||
|
After Width: | Height: | Size: 921 B |
@@ -3,31 +3,26 @@ PODS:
|
||||
- Flutter
|
||||
- connectivity_plus (0.0.1):
|
||||
- Flutter
|
||||
- cupertino_http (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- device_info_plus (0.0.1):
|
||||
- Flutter
|
||||
- file_picker (0.0.1):
|
||||
- Flutter
|
||||
- Flutter (1.0.0)
|
||||
- in_app_review (2.0.0):
|
||||
- Flutter
|
||||
- mobile_scanner (7.0.0):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- os_media_controls (0.0.1):
|
||||
- os_media_controls (0.2.1):
|
||||
- Flutter
|
||||
- package_info_plus (0.4.5):
|
||||
- Flutter
|
||||
- Sentry/HybridSDK (8.58.0)
|
||||
- sentry_flutter (9.15.0):
|
||||
- sentry_flutter (9.16.0):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- Sentry/HybridSDK (= 8.58.0)
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqflite_darwin (0.0.4):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqlite3 (3.52.0):
|
||||
- sqlite3/common (= 3.52.0)
|
||||
- sqlite3/common (3.52.0)
|
||||
@@ -63,16 +58,14 @@ PODS:
|
||||
DEPENDENCIES:
|
||||
- background_downloader (from `.symlinks/plugins/background_downloader/ios`)
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||
- cupertino_http (from `.symlinks/plugins/cupertino_http/darwin`)
|
||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
- in_app_review (from `.symlinks/plugins/in_app_review/ios`)
|
||||
- mobile_scanner (from `.symlinks/plugins/mobile_scanner/darwin`)
|
||||
- os_media_controls (from `.symlinks/plugins/os_media_controls/ios`)
|
||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`)
|
||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
|
||||
- sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/darwin`)
|
||||
- universal_gamepad (from `.symlinks/plugins/universal_gamepad/ios`)
|
||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||
@@ -88,16 +81,14 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/background_downloader/ios"
|
||||
connectivity_plus:
|
||||
:path: ".symlinks/plugins/connectivity_plus/ios"
|
||||
cupertino_http:
|
||||
:path: ".symlinks/plugins/cupertino_http/darwin"
|
||||
device_info_plus:
|
||||
:path: ".symlinks/plugins/device_info_plus/ios"
|
||||
file_picker:
|
||||
:path: ".symlinks/plugins/file_picker/ios"
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
in_app_review:
|
||||
:path: ".symlinks/plugins/in_app_review/ios"
|
||||
mobile_scanner:
|
||||
:path: ".symlinks/plugins/mobile_scanner/darwin"
|
||||
os_media_controls:
|
||||
:path: ".symlinks/plugins/os_media_controls/ios"
|
||||
package_info_plus:
|
||||
@@ -106,8 +97,6 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/sentry_flutter/ios"
|
||||
shared_preferences_foundation:
|
||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||
sqflite_darwin:
|
||||
:path: ".symlinks/plugins/sqflite_darwin/darwin"
|
||||
sqlite3_flutter_libs:
|
||||
:path: ".symlinks/plugins/sqlite3_flutter_libs/darwin"
|
||||
universal_gamepad:
|
||||
@@ -120,22 +109,20 @@ EXTERNAL SOURCES:
|
||||
SPEC CHECKSUMS:
|
||||
background_downloader: 50e91d979067b82081aba359d7d916b3ba5fadad
|
||||
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
|
||||
cupertino_http: 94ac07f5ff090b8effa6c5e2c47871d48ab7c86c
|
||||
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
|
||||
file_picker: 8fc6fe5e42585a217d44d22f79ec046cb8d81140
|
||||
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
|
||||
in_app_review: 7dd1ea365263f834b8464673f9df72c80c17c937
|
||||
mobile_scanner: 9157936403f5a0644ca3779a38ff8404c5434a93
|
||||
os_media_controls: 86dceab6245a5325af90fc0fdebe243c42d789b4
|
||||
os_media_controls: 3b06fe2dc0977dfa94f9c1dd73df7a55022d202f
|
||||
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
||||
Sentry: d587a8fe91ca13503ecd69a1905f3e8a0fcf61be
|
||||
sentry_flutter: 8939e491bc1511868118c96cae47d945e6f69798
|
||||
sentry_flutter: 31101687061fb85211ebab09ce6eb8db4e9ba74f
|
||||
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
|
||||
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||
sqlite3: a51c07cf16e023d6c48abd5e5791a61a47354921
|
||||
sqlite3_flutter_libs: b3e120efe9a82017e5552a620f696589ed4f62ab
|
||||
universal_gamepad: e10172778a8a399cce234494968f38724974919e
|
||||
universal_gamepad: 838bbb70d37d8c7c719038aa397214f2c4c4f866
|
||||
url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b
|
||||
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
|
||||
wakelock_plus: 5aaa6a7ccaf4749a96a7d8ff0721d68061ad62cf
|
||||
|
||||
PODFILE CHECKSUM: 16bb7f67e16d8aaa2bfb97666803fbfb291b6559
|
||||
|
||||
|
||||
@@ -8,20 +8,21 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
2CA552536A23AFD33344616B /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 200265C4B9C45EDD150FB4C3 /* Pods_RunnerTests.framework */; };
|
||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
69E1B4BB161DC9D84D1DFC62 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB346A1D0705AB171F80B11B /* Pods_Runner.framework */; };
|
||||
6A48DFB02EA70C7100C1F7CD /* plezy.icon in Resources */ = {isa = PBXBuildFile; fileRef = 6A48DFAF2EA70C7100C1F7CD /* plezy.icon */; };
|
||||
6A8A46212EDB320D0057B88C /* MPVKit in Frameworks */ = {isa = PBXBuildFile; productRef = 6A8A46202EDB320D0057B88C /* MPVKit */; };
|
||||
6A8A46252EDB370C0057B88C /* MpvPlayerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A8A46232EDB370C0057B88C /* MpvPlayerPlugin.swift */; };
|
||||
6A8A46262EDB370C0057B88C /* MpvPlayerCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A8A46222EDB370C0057B88C /* MpvPlayerCore.swift */; };
|
||||
702A247AA28B055172318FF9 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61B22BEA638334DA7861BCF6 /* Pods_Runner.framework */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
748A259343D7FF8DFD2C3910 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75D2EEFFFFE26C0F3CD48133 /* Pods_RunnerTests.framework */; };
|
||||
92F969587D0E464D999910F5 /* MpvPipController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92F969587D0E464D999910F4 /* MpvPipController.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
B1D51A6A2F00110000000001 /* MpvPlayerCoreBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D51A6A2F00110000000002 /* MpvPlayerCoreBase.swift */; };
|
||||
B1D51A6A2F00110000000005 /* MpvPlayerPluginShared.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D51A6A2F00110000000006 /* MpvPlayerPluginShared.swift */; };
|
||||
B1D51A6A2F00110000000008 /* ExternalDisplayManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D51A6A2F00110000000007 /* ExternalDisplayManager.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -48,24 +49,22 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
030239DB288C484414523AFE /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
200265C4B9C45EDD150FB4C3 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
230D46AA7CEA8CB81C420035 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
28ABDA890783B15438AA8137 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3A9EF9720208222F20B1495D /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
5C4660106A040D374746C713 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
61B22BEA638334DA7861BCF6 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
6A48DFAF2EA70C7100C1F7CD /* plezy.icon */ = {isa = PBXFileReference; lastKnownFileType = folder.iconcomposer.icon; path = plezy.icon; sourceTree = "<group>"; };
|
||||
6A8A46222EDB370C0057B88C /* MpvPlayerCore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MpvPlayerCore.swift; sourceTree = "<group>"; };
|
||||
6A8A46232EDB370C0057B88C /* MpvPlayerPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MpvPlayerPlugin.swift; sourceTree = "<group>"; };
|
||||
6E3FE696F0F85B37E212CCEE /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
6FAF62B46A8A7A431F17FCD8 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
75D2EEFFFFE26C0F3CD48133 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
792502911151E64A2B752567 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
7F4B79C5218D46EDB4E433B0 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
92F969587D0E464D999910F4 /* MpvPipController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MpvPipController.swift; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
@@ -75,7 +74,10 @@
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
B1D51A6A2F00110000000002 /* MpvPlayerCoreBase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MpvPlayerCoreBase.swift; path = ../shared/apple/MpvPlayer/MpvPlayerCoreBase.swift; sourceTree = SOURCE_ROOT; };
|
||||
B1D51A6A2F00110000000006 /* MpvPlayerPluginShared.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MpvPlayerPluginShared.swift; path = ../shared/apple/MpvPlayer/MpvPlayerPluginShared.swift; sourceTree = SOURCE_ROOT; };
|
||||
C208E69E3A3B935CE009B4D5 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
B1D51A6A2F00110000000007 /* ExternalDisplayManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExternalDisplayManager.swift; sourceTree = "<group>"; };
|
||||
BB346A1D0705AB171F80B11B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DE48FF2E074644167608B23D /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
F3553CDE70191F0FC81A782E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -83,7 +85,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2CA552536A23AFD33344616B /* Pods_RunnerTests.framework in Frameworks */,
|
||||
748A259343D7FF8DFD2C3910 /* Pods_RunnerTests.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -92,22 +94,13 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6A8A46212EDB320D0057B88C /* MPVKit in Frameworks */,
|
||||
702A247AA28B055172318FF9 /* Pods_Runner.framework in Frameworks */,
|
||||
69E1B4BB161DC9D84D1DFC62 /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
19B1F8004DD75C8EEB4662AB /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
61B22BEA638334DA7861BCF6 /* Pods_Runner.framework */,
|
||||
200265C4B9C45EDD150FB4C3 /* Pods_RunnerTests.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -116,11 +109,21 @@
|
||||
path = RunnerTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3DBA2EB0C0219E797C60DE48 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BB346A1D0705AB171F80B11B /* Pods_Runner.framework */,
|
||||
75D2EEFFFFE26C0F3CD48133 /* Pods_RunnerTests.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6A8A46242EDB370C0057B88C /* MpvPlayer */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B1D51A6A2F00110000000002 /* MpvPlayerCoreBase.swift */,
|
||||
B1D51A6A2F00110000000006 /* MpvPlayerPluginShared.swift */,
|
||||
B1D51A6A2F00110000000007 /* ExternalDisplayManager.swift */,
|
||||
6A8A46222EDB370C0057B88C /* MpvPlayerCore.swift */,
|
||||
6A8A46232EDB370C0057B88C /* MpvPlayerPlugin.swift */,
|
||||
92F969587D0E464D999910F4 /* MpvPipController.swift */,
|
||||
@@ -131,12 +134,12 @@
|
||||
875C8AEFBBA3759A1849D674 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6E3FE696F0F85B37E212CCEE /* Pods-Runner.debug.xcconfig */,
|
||||
5C4660106A040D374746C713 /* Pods-Runner.release.xcconfig */,
|
||||
C208E69E3A3B935CE009B4D5 /* Pods-Runner.profile.xcconfig */,
|
||||
030239DB288C484414523AFE /* Pods-RunnerTests.debug.xcconfig */,
|
||||
230D46AA7CEA8CB81C420035 /* Pods-RunnerTests.release.xcconfig */,
|
||||
6FAF62B46A8A7A431F17FCD8 /* Pods-RunnerTests.profile.xcconfig */,
|
||||
7F4B79C5218D46EDB4E433B0 /* Pods-Runner.debug.xcconfig */,
|
||||
F3553CDE70191F0FC81A782E /* Pods-Runner.release.xcconfig */,
|
||||
DE48FF2E074644167608B23D /* Pods-Runner.profile.xcconfig */,
|
||||
28ABDA890783B15438AA8137 /* Pods-RunnerTests.debug.xcconfig */,
|
||||
3A9EF9720208222F20B1495D /* Pods-RunnerTests.release.xcconfig */,
|
||||
792502911151E64A2B752567 /* Pods-RunnerTests.profile.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
@@ -161,7 +164,7 @@
|
||||
331C8082294A63A400263BE5 /* RunnerTests */,
|
||||
875C8AEFBBA3759A1849D674 /* Pods */,
|
||||
6A48DFAF2EA70C7100C1F7CD /* plezy.icon */,
|
||||
19B1F8004DD75C8EEB4662AB /* Frameworks */,
|
||||
3DBA2EB0C0219E797C60DE48 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -196,7 +199,7 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||
buildPhases = (
|
||||
C5965E09A75FF4B9D47A6A5A /* [CP] Check Pods Manifest.lock */,
|
||||
87A3350E66D519725E5CD790 /* [CP] Check Pods Manifest.lock */,
|
||||
331C807D294A63A400263BE5 /* Sources */,
|
||||
331C807F294A63A400263BE5 /* Resources */,
|
||||
582EBCC1C90BEBEC365D972D /* Frameworks */,
|
||||
@@ -215,14 +218,14 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
A7BAF2DBCB81960BDC752F05 /* [CP] Check Pods Manifest.lock */,
|
||||
6838C6976E568CE05DBDE228 /* [CP] Check Pods Manifest.lock */,
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
87CA3559B76E3AB2BA77B235 /* [CP] Embed Pods Frameworks */,
|
||||
898098BAEC57934A6822754B /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -313,7 +316,51 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
87CA3559B76E3AB2BA77B235 /* [CP] Embed Pods Frameworks */ = {
|
||||
6838C6976E568CE05DBDE228 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
87A3350E66D519725E5CD790 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
898098BAEC57934A6822754B /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -345,50 +392,6 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
A7BAF2DBCB81960BDC752F05 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
C5965E09A75FF4B9D47A6A5A /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@@ -406,6 +409,7 @@
|
||||
files = (
|
||||
B1D51A6A2F00110000000001 /* MpvPlayerCoreBase.swift in Sources */,
|
||||
B1D51A6A2F00110000000005 /* MpvPlayerPluginShared.swift in Sources */,
|
||||
B1D51A6A2F00110000000008 /* ExternalDisplayManager.swift in Sources */,
|
||||
6A8A46252EDB370C0057B88C /* MpvPlayerPlugin.swift in Sources */,
|
||||
6A8A46262EDB370C0057B88C /* MpvPlayerCore.swift in Sources */,
|
||||
92F969587D0E464D999910F5 /* MpvPipController.swift in Sources */,
|
||||
@@ -524,7 +528,7 @@
|
||||
};
|
||||
331C8088294A63A400263BE5 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 030239DB288C484414523AFE /* Pods-RunnerTests.debug.xcconfig */;
|
||||
baseConfigurationReference = 28ABDA890783B15438AA8137 /* Pods-RunnerTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
@@ -542,7 +546,7 @@
|
||||
};
|
||||
331C8089294A63A400263BE5 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 230D46AA7CEA8CB81C420035 /* Pods-RunnerTests.release.xcconfig */;
|
||||
baseConfigurationReference = 3A9EF9720208222F20B1495D /* Pods-RunnerTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
@@ -558,7 +562,7 @@
|
||||
};
|
||||
331C808A294A63A400263BE5 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 6FAF62B46A8A7A431F17FCD8 /* Pods-RunnerTests.profile.xcconfig */;
|
||||
baseConfigurationReference = 792502911151E64A2B752567 /* Pods-RunnerTests.profile.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
@@ -777,7 +781,7 @@
|
||||
repositoryURL = "https://github.com/edde746/MPVKit";
|
||||
requirement = {
|
||||
kind = revision;
|
||||
revision = b2179eec26c6ceda339e6c6b512e457341768761;
|
||||
revision = 86dcf97f04e572abb5641e74780251a1d5634ff3;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/edde746/MPVKit",
|
||||
"state" : {
|
||||
"revision" : "b2179eec26c6ceda339e6c6b512e457341768761"
|
||||
"revision" : "86dcf97f04e572abb5641e74780251a1d5634ff3"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/edde746/MPVKit",
|
||||
"state" : {
|
||||
"revision" : "b2179eec26c6ceda339e6c6b512e457341768761"
|
||||
"revision" : "86dcf97f04e572abb5641e74780251a1d5634ff3"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -33,12 +33,8 @@
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>NSBonjourServices</key>
|
||||
<array>
|
||||
<string>_plexmediasvr._tcp</string>
|
||||
</array>
|
||||
<key>NSLocalNetworkUsageDescription</key>
|
||||
<string>This app needs to connect to your Plex Media Server on your local network.</string>
|
||||
<string>This app needs to connect to your media servers on your local network.</string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Camera is used to scan QR codes for Companion Remote pairing.</string>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
@@ -70,7 +66,7 @@
|
||||
<key>UIApplicationSceneManifest</key>
|
||||
<dict>
|
||||
<key>UIApplicationSupportsMultipleScenes</key>
|
||||
<false/>
|
||||
<true/>
|
||||
<key>UISceneConfigurations</key>
|
||||
<dict>
|
||||
<key>UIWindowSceneSessionRoleApplication</key>
|
||||
@@ -86,6 +82,28 @@
|
||||
<string>Main</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>UIWindowSceneSessionRoleExternalDisplay</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UISceneClassName</key>
|
||||
<string>UIWindowScene</string>
|
||||
<key>UISceneDelegateClassName</key>
|
||||
<string>$(PRODUCT_MODULE_NAME).ExternalDisplaySceneDelegate</string>
|
||||
<key>UISceneConfigurationName</key>
|
||||
<string>external-display</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>UIWindowSceneSessionRoleExternalDisplayNonInteractive</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UISceneClassName</key>
|
||||
<string>UIWindowScene</string>
|
||||
<key>UISceneDelegateClassName</key>
|
||||
<string>$(PRODUCT_MODULE_NAME).ExternalDisplaySceneDelegate</string>
|
||||
<key>UISceneConfigurationName</key>
|
||||
<string>external-display</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
import UIKit
|
||||
|
||||
final class ExternalDisplayManager {
|
||||
static let shared = ExternalDisplayManager()
|
||||
|
||||
private weak var activeCore: MpvPlayerCore?
|
||||
private var externalScene: UIWindowScene?
|
||||
private var externalWindow: UIWindow?
|
||||
private var externalRootViewController: UIViewController?
|
||||
|
||||
private init() {}
|
||||
|
||||
static func isExternalDisplayRole(_ role: UISceneSession.Role) -> Bool {
|
||||
role.rawValue == "UIWindowSceneSessionRoleExternalDisplay"
|
||||
|| role.rawValue == "UIWindowSceneSessionRoleExternalDisplayNonInteractive"
|
||||
}
|
||||
|
||||
static var hasActiveApplicationScene: Bool {
|
||||
applicationWindowScenes.contains { $0.activationState == .foregroundActive }
|
||||
}
|
||||
|
||||
static func mainApplicationWindow() -> UIWindow? {
|
||||
let scenes = applicationWindowScenes.sorted {
|
||||
scenePriority($0.activationState) < scenePriority($1.activationState)
|
||||
}
|
||||
|
||||
for scene in scenes {
|
||||
if let window = scene.windows.first(where: { $0.isKeyWindow }) {
|
||||
return window
|
||||
}
|
||||
}
|
||||
|
||||
for scene in scenes {
|
||||
if let window = scene.windows.first(where: { !$0.isHidden }) {
|
||||
return window
|
||||
}
|
||||
}
|
||||
|
||||
return scenes.first?.windows.first
|
||||
}
|
||||
|
||||
private static var applicationWindowScenes: [UIWindowScene] {
|
||||
UIApplication.shared.connectedScenes.compactMap { scene in
|
||||
guard let windowScene = scene as? UIWindowScene,
|
||||
!isExternalDisplayRole(windowScene.session.role)
|
||||
else { return nil }
|
||||
return windowScene
|
||||
}
|
||||
}
|
||||
|
||||
private static func scenePriority(_ state: UIScene.ActivationState) -> Int {
|
||||
switch state {
|
||||
case .foregroundActive:
|
||||
return 0
|
||||
case .foregroundInactive:
|
||||
return 1
|
||||
case .background:
|
||||
return 2
|
||||
case .unattached:
|
||||
return 3
|
||||
@unknown default:
|
||||
return 4
|
||||
}
|
||||
}
|
||||
|
||||
var videoSuperview: UIView? {
|
||||
externalRootViewController?.view
|
||||
}
|
||||
|
||||
func attach(core: MpvPlayerCore) {
|
||||
activeCore = core
|
||||
discoverExistingExternalScene()
|
||||
activeCore?.externalDisplayDidChange()
|
||||
}
|
||||
|
||||
func detach(core: MpvPlayerCore) {
|
||||
if activeCore === core {
|
||||
activeCore = nil
|
||||
}
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
func connect(scene: UIWindowScene) -> UIWindow? {
|
||||
guard Self.isExternalDisplayRole(scene.session.role) else { return nil }
|
||||
|
||||
externalScene = scene
|
||||
let window = ensureWindow(for: scene)
|
||||
activeCore?.externalDisplayDidChange()
|
||||
print("[ExternalDisplayManager] External display connected")
|
||||
return window
|
||||
}
|
||||
|
||||
func disconnect(scene: UIScene) {
|
||||
guard scene === externalScene else { return }
|
||||
|
||||
externalWindow?.isHidden = true
|
||||
externalWindow = nil
|
||||
externalRootViewController = nil
|
||||
externalScene = nil
|
||||
activeCore?.externalDisplayDidChange()
|
||||
print("[ExternalDisplayManager] External display disconnected")
|
||||
}
|
||||
|
||||
func update(scene: UIWindowScene) {
|
||||
guard scene === externalScene else { return }
|
||||
externalRootViewController?.view.frame = scene.coordinateSpace.bounds
|
||||
activeCore?.externalDisplayDidChange()
|
||||
}
|
||||
|
||||
private func discoverExistingExternalScene() {
|
||||
guard externalScene == nil else { return }
|
||||
|
||||
for scene in UIApplication.shared.connectedScenes {
|
||||
guard let windowScene = scene as? UIWindowScene,
|
||||
Self.isExternalDisplayRole(windowScene.session.role)
|
||||
else { continue }
|
||||
_ = connect(scene: windowScene)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
private func ensureWindow(for scene: UIWindowScene) -> UIWindow {
|
||||
if let existing = externalWindow, existing.windowScene === scene {
|
||||
return existing
|
||||
}
|
||||
|
||||
externalWindow?.isHidden = true
|
||||
|
||||
let rootViewController = UIViewController()
|
||||
rootViewController.view.frame = scene.coordinateSpace.bounds
|
||||
rootViewController.view.backgroundColor = .black
|
||||
|
||||
let window = UIWindow(windowScene: scene)
|
||||
window.rootViewController = rootViewController
|
||||
window.backgroundColor = .black
|
||||
window.isHidden = false
|
||||
|
||||
externalRootViewController = rootViewController
|
||||
externalWindow = window
|
||||
return window
|
||||
}
|
||||
}
|
||||
|
||||
class ExternalDisplaySceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||
var window: UIWindow?
|
||||
|
||||
func scene(
|
||||
_ scene: UIScene,
|
||||
willConnectTo session: UISceneSession,
|
||||
options connectionOptions: UIScene.ConnectionOptions
|
||||
) {
|
||||
guard let windowScene = scene as? UIWindowScene,
|
||||
ExternalDisplayManager.isExternalDisplayRole(session.role)
|
||||
else { return }
|
||||
|
||||
window = ExternalDisplayManager.shared.connect(scene: windowScene)
|
||||
}
|
||||
|
||||
func sceneDidDisconnect(_ scene: UIScene) {
|
||||
ExternalDisplayManager.shared.disconnect(scene: scene)
|
||||
window = nil
|
||||
}
|
||||
|
||||
func windowScene(
|
||||
_ windowScene: UIWindowScene,
|
||||
didUpdate previousCoordinateSpace: UICoordinateSpace,
|
||||
interfaceOrientation previousInterfaceOrientation: UIInterfaceOrientation,
|
||||
traitCollection previousTraitCollection: UITraitCollection
|
||||
) {
|
||||
ExternalDisplayManager.shared.update(scene: windowScene)
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,44 @@
|
||||
import AVFoundation
|
||||
import AVKit
|
||||
import UIKit
|
||||
|
||||
/// Delegate to notify the plugin of PiP lifecycle events
|
||||
protocol MpvPipDelegate: AnyObject {
|
||||
#if os(tvOS)
|
||||
// tvOS stub: AVPictureInPictureController has different constraints on tvOS
|
||||
// and is not supported by the Plezy flow. Provide a no-op shell so callers
|
||||
// in MpvPlayerPlugin compile unchanged; isSupported reports false so PiP is
|
||||
// never attempted at runtime.
|
||||
protocol MpvPipDelegate: AnyObject {
|
||||
func pipWillStart()
|
||||
func pipDidStart()
|
||||
func pipDidStop(restored: Bool)
|
||||
func pipDidFailToStart(error: Error?)
|
||||
func pipSetPlaying(_ playing: Bool)
|
||||
func pipSkip(byInterval seconds: Double)
|
||||
var isPipPlaying: Bool { get }
|
||||
var pipDuration: Double { get }
|
||||
}
|
||||
|
||||
class MpvPipController: NSObject {
|
||||
static var isSupported: Bool { false }
|
||||
weak var delegate: MpvPipDelegate?
|
||||
var isPipActive: Bool { false }
|
||||
var autoStartEnabled: Bool { false }
|
||||
init(sampleBufferDisplayLayer: AVSampleBufferDisplayLayer) { super.init() }
|
||||
func setup(with layer: CALayer, containerView: UIView) {}
|
||||
func setAutoStart(_ enabled: Bool) {}
|
||||
func warmLayer(currentTime: Double, isPlaying: Bool) {}
|
||||
func startPip(waitForFrame: Bool = true, completion: @escaping (Bool) -> Void) {
|
||||
completion(false)
|
||||
}
|
||||
func stopPip() {}
|
||||
func invalidatePlaybackState() {}
|
||||
func syncTimebase(currentTime: Double, isPlaying: Bool) {}
|
||||
func teardown() {}
|
||||
}
|
||||
#else
|
||||
|
||||
/// Delegate to notify the plugin of PiP lifecycle events
|
||||
protocol MpvPipDelegate: AnyObject {
|
||||
/// Called when PiP is about to start (system or app-initiated)
|
||||
func pipWillStart()
|
||||
func pipDidStart()
|
||||
@@ -17,353 +53,266 @@ protocol MpvPipDelegate: AnyObject {
|
||||
var isPipPlaying: Bool { get }
|
||||
/// Get total duration in seconds
|
||||
var pipDuration: Double { get }
|
||||
}
|
||||
}
|
||||
|
||||
/// Encapsulates all iOS Picture-in-Picture logic using AVSampleBufferDisplayLayer.
|
||||
/// Requires iOS 15+ for the ContentSource API; on older versions, `setup()` is a no-op.
|
||||
class MpvPipController: NSObject {
|
||||
/// Encapsulates all iOS Picture-in-Picture logic using AVSampleBufferDisplayLayer.
|
||||
/// Requires iOS 15+ for the ContentSource API; on older versions, `setup()` is a no-op.
|
||||
class MpvPipController: NSObject {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
private var pipController: AVPictureInPictureController?
|
||||
private let sampleBufferLayer = AVSampleBufferDisplayLayer()
|
||||
private var containerView: UIView?
|
||||
private weak var sampleBufferLayer: AVSampleBufferDisplayLayer?
|
||||
weak var delegate: MpvPipDelegate?
|
||||
|
||||
/// Pointer to the sample buffer layer for passing to mpv as `wid`
|
||||
var layerPointer: UnsafeMutableRawPointer {
|
||||
Unmanaged.passUnretained(sampleBufferLayer).toOpaque()
|
||||
}
|
||||
|
||||
// MARK: - Initialization
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
setup()
|
||||
init(sampleBufferDisplayLayer: AVSampleBufferDisplayLayer) {
|
||||
self.sampleBufferLayer = sampleBufferDisplayLayer
|
||||
super.init()
|
||||
setup()
|
||||
}
|
||||
|
||||
private func setup() {
|
||||
guard #available(iOS 15.0, *) else { return }
|
||||
guard #available(iOS 15.0, *) else { return }
|
||||
|
||||
do {
|
||||
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .moviePlayback)
|
||||
try AVAudioSession.sharedInstance().setActive(true)
|
||||
} catch {
|
||||
print("[MpvPipController] Failed to configure audio session: \(error)")
|
||||
}
|
||||
do {
|
||||
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .moviePlayback)
|
||||
try AVAudioSession.sharedInstance().setActive(true)
|
||||
} catch {
|
||||
print("[MpvPipController] Failed to configure audio session: \(error)")
|
||||
}
|
||||
|
||||
// The sample buffer layer must be in a visible view hierarchy for
|
||||
// isPictureInPicturePossible to become true.
|
||||
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
|
||||
let window = windowScene.windows.first(where: { $0.isKeyWindow }) {
|
||||
let view = UIView(frame: window.bounds)
|
||||
view.clipsToBounds = true
|
||||
view.isUserInteractionEnabled = false
|
||||
sampleBufferLayer.frame = view.bounds
|
||||
view.layer.addSublayer(sampleBufferLayer)
|
||||
window.addSubview(view)
|
||||
containerView = view
|
||||
}
|
||||
|
||||
createPipController()
|
||||
createPipController()
|
||||
}
|
||||
|
||||
/// Helper that conforms to the iOS 15+ delegate protocols
|
||||
private var delegateHelper: AnyObject?
|
||||
|
||||
private func createPipController() {
|
||||
guard #available(iOS 15.0, *) else { return }
|
||||
let helper = PipDelegateHelper(controller: self)
|
||||
let contentSource = AVPictureInPictureController.ContentSource(
|
||||
sampleBufferDisplayLayer: sampleBufferLayer,
|
||||
playbackDelegate: helper
|
||||
)
|
||||
self.delegateHelper = helper
|
||||
pipController = AVPictureInPictureController(contentSource: contentSource)
|
||||
pipController?.delegate = helper
|
||||
if #available(iOS 14.2, *) {
|
||||
pipController?.canStartPictureInPictureAutomaticallyFromInline = false
|
||||
}
|
||||
guard #available(iOS 15.0, *), let sampleBufferLayer else { return }
|
||||
let helper = PipDelegateHelper(controller: self)
|
||||
let contentSource = AVPictureInPictureController.ContentSource(
|
||||
sampleBufferDisplayLayer: sampleBufferLayer,
|
||||
playbackDelegate: helper
|
||||
)
|
||||
self.delegateHelper = helper
|
||||
pipController = AVPictureInPictureController(contentSource: contentSource)
|
||||
pipController?.delegate = helper
|
||||
if #available(iOS 14.2, *) {
|
||||
pipController?.canStartPictureInPictureAutomaticallyFromInline = false
|
||||
}
|
||||
}
|
||||
|
||||
/// Enable/disable system auto-PiP (starts PiP automatically on background transition)
|
||||
func setAutoStart(_ enabled: Bool) {
|
||||
guard #available(iOS 14.2, *) else { return }
|
||||
pipController?.canStartPictureInPictureAutomaticallyFromInline = enabled
|
||||
}
|
||||
|
||||
/// Push a black frame to the sample buffer layer so PiP has content
|
||||
/// to display immediately (before vo_pip decodes the first real frame).
|
||||
func pushBlankFrame(width: Int32 = 1920, height: Int32 = 1080) {
|
||||
var pixelBuffer: CVPixelBuffer?
|
||||
let attrs: [String: Any] = [
|
||||
kCVPixelBufferIOSurfacePropertiesKey as String: [:],
|
||||
]
|
||||
let status = CVPixelBufferCreate(
|
||||
kCFAllocatorDefault, Int(width), Int(height),
|
||||
kCVPixelFormatType_32BGRA, attrs as CFDictionary, &pixelBuffer
|
||||
)
|
||||
guard status == kCVReturnSuccess, let pb = pixelBuffer else { return }
|
||||
|
||||
// Fill with black
|
||||
CVPixelBufferLockBaseAddress(pb, [])
|
||||
if let base = CVPixelBufferGetBaseAddress(pb) {
|
||||
memset(base, 0, CVPixelBufferGetDataSize(pb))
|
||||
}
|
||||
CVPixelBufferUnlockBaseAddress(pb, [])
|
||||
|
||||
// Use current timebase time for PTS (if available) so the frame isn't stale
|
||||
let pts: CMTime
|
||||
if let tb = sampleBufferLayer.controlTimebase {
|
||||
pts = CMTimebaseGetTime(tb)
|
||||
} else {
|
||||
pts = CMTime(value: 0, timescale: 30)
|
||||
}
|
||||
|
||||
var timing = CMSampleTimingInfo(
|
||||
duration: CMTime(value: 1, timescale: 30),
|
||||
presentationTimeStamp: pts,
|
||||
decodeTimeStamp: .invalid
|
||||
)
|
||||
|
||||
// Create format description and sample buffer
|
||||
var formatDesc: CMVideoFormatDescription?
|
||||
CMVideoFormatDescriptionCreateForImageBuffer(
|
||||
allocator: kCFAllocatorDefault,
|
||||
imageBuffer: pb,
|
||||
formatDescriptionOut: &formatDesc
|
||||
)
|
||||
guard let fmt = formatDesc else { return }
|
||||
|
||||
var sampleBuffer: CMSampleBuffer?
|
||||
CMSampleBufferCreateReadyWithImageBuffer(
|
||||
allocator: kCFAllocatorDefault,
|
||||
imageBuffer: pb,
|
||||
formatDescription: fmt,
|
||||
sampleTiming: &timing,
|
||||
sampleBufferOut: &sampleBuffer
|
||||
)
|
||||
guard let sb = sampleBuffer else { return }
|
||||
|
||||
// Set DisplayImmediately so it shows regardless of timebase timing
|
||||
if let attachments = CMSampleBufferGetSampleAttachmentsArray(sb, createIfNecessary: true) as? [NSMutableDictionary],
|
||||
let dict = attachments.first {
|
||||
dict[kCMSampleAttachmentKey_DisplayImmediately] = true
|
||||
}
|
||||
|
||||
sampleBufferLayer.enqueue(sb)
|
||||
guard #available(iOS 14.2, *) else { return }
|
||||
pipController?.canStartPictureInPictureAutomaticallyFromInline = enabled
|
||||
}
|
||||
|
||||
/// Sync the layer's controlTimebase with the actual playback position.
|
||||
/// This makes the PiP progress bar show the correct time.
|
||||
func syncTimebase(currentTime: Double, isPlaying: Bool) {
|
||||
guard let timebase = sampleBufferLayer.controlTimebase else { return }
|
||||
let cmTime = CMTime(seconds: currentTime, preferredTimescale: 1000)
|
||||
CMTimebaseSetTime(timebase, time: cmTime)
|
||||
CMTimebaseSetRate(timebase, rate: isPlaying ? 1.0 : 0.0)
|
||||
guard let timebase = sampleBufferLayer?.controlTimebase else { return }
|
||||
let cmTime = CMTime(seconds: currentTime, preferredTimescale: 1000)
|
||||
CMTimebaseSetTime(timebase, time: cmTime)
|
||||
CMTimebaseSetRate(timebase, rate: isPlaying ? 1.0 : 0.0)
|
||||
}
|
||||
|
||||
/// Ensure the layer has a timebase and blank frame so the system considers
|
||||
/// PiP possible (required for canStartPictureInPictureAutomaticallyFromInline).
|
||||
/// Ensure the layer has a timebase so the PiP progress UI can follow mpv.
|
||||
func warmLayer(currentTime: Double, isPlaying: Bool) {
|
||||
if sampleBufferLayer.controlTimebase == nil {
|
||||
var timebase: CMTimebase?
|
||||
CMTimebaseCreateWithSourceClock(
|
||||
allocator: kCFAllocatorDefault,
|
||||
sourceClock: CMClockGetHostTimeClock(),
|
||||
timebaseOut: &timebase
|
||||
)
|
||||
if let tb = timebase {
|
||||
sampleBufferLayer.controlTimebase = tb
|
||||
}
|
||||
guard let sampleBufferLayer else { return }
|
||||
if sampleBufferLayer.controlTimebase == nil {
|
||||
var timebase: CMTimebase?
|
||||
CMTimebaseCreateWithSourceClock(
|
||||
allocator: kCFAllocatorDefault,
|
||||
sourceClock: CMClockGetHostTimeClock(),
|
||||
timebaseOut: &timebase
|
||||
)
|
||||
if let tb = timebase {
|
||||
sampleBufferLayer.controlTimebase = tb
|
||||
}
|
||||
syncTimebase(currentTime: currentTime, isPlaying: isPlaying)
|
||||
pushBlankFrame()
|
||||
}
|
||||
syncTimebase(currentTime: currentTime, isPlaying: isPlaying)
|
||||
}
|
||||
|
||||
// MARK: - Public API
|
||||
|
||||
static var isSupported: Bool {
|
||||
guard #available(iOS 15.0, *) else { return false }
|
||||
return AVPictureInPictureController.isPictureInPictureSupported()
|
||||
guard #available(iOS 15.0, *) else { return false }
|
||||
return AVPictureInPictureController.isPictureInPictureSupported()
|
||||
}
|
||||
|
||||
/// Start PiP. When `waitForFrame` is false (auto-PiP), skips the frame
|
||||
/// readiness check since the scene is about to deactivate.
|
||||
func startPip(waitForFrame: Bool = true, completion: @escaping (Bool) -> Void) {
|
||||
guard let pipController = pipController else {
|
||||
completion(false)
|
||||
return
|
||||
guard let pipController = pipController else {
|
||||
completion(false)
|
||||
return
|
||||
}
|
||||
|
||||
var attempts = 0
|
||||
func tryStart() {
|
||||
let possible = pipController.isPictureInPicturePossible
|
||||
let hasTimebase = self.sampleBufferLayer?.controlTimebase != nil
|
||||
|
||||
let hasFrame: Bool
|
||||
if !waitForFrame {
|
||||
hasFrame = true // Skip frame check for auto-PiP
|
||||
} else if #available(iOS 17.4, *) {
|
||||
hasFrame = self.sampleBufferLayer?.isReadyForDisplay ?? false
|
||||
} else {
|
||||
hasFrame = true
|
||||
}
|
||||
|
||||
var attempts = 0
|
||||
func tryStart() {
|
||||
let possible = pipController.isPictureInPicturePossible
|
||||
let hasTimebase = sampleBufferLayer.controlTimebase != nil
|
||||
|
||||
let hasFrame: Bool
|
||||
if !waitForFrame {
|
||||
hasFrame = true // Skip frame check for auto-PiP
|
||||
} else if #available(iOS 17.4, *) {
|
||||
hasFrame = sampleBufferLayer.isReadyForDisplay
|
||||
} else {
|
||||
hasFrame = true
|
||||
}
|
||||
|
||||
if possible && hasTimebase && hasFrame {
|
||||
print("[MpvPipController] vo_pip ready after \(attempts) retries, starting PiP")
|
||||
pipController.startPictureInPicture()
|
||||
completion(true)
|
||||
} else if attempts < 40 {
|
||||
attempts += 1
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) { tryStart() }
|
||||
} else {
|
||||
print("[MpvPipController] PiP not ready after \(attempts) retries (possible=\(possible), timebase=\(hasTimebase))")
|
||||
completion(false)
|
||||
}
|
||||
if possible && hasTimebase && hasFrame {
|
||||
print("[MpvPipController] vo_avfoundation ready after \(attempts) retries, starting PiP")
|
||||
pipController.startPictureInPicture()
|
||||
completion(true)
|
||||
} else if attempts < 40 {
|
||||
attempts += 1
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) { tryStart() }
|
||||
} else {
|
||||
print(
|
||||
"[MpvPipController] PiP not ready after \(attempts) retries (possible=\(possible), timebase=\(hasTimebase))"
|
||||
)
|
||||
completion(false)
|
||||
}
|
||||
tryStart()
|
||||
}
|
||||
tryStart()
|
||||
}
|
||||
|
||||
func stopPip() {
|
||||
pipController?.stopPictureInPicture()
|
||||
pipController?.stopPictureInPicture()
|
||||
}
|
||||
|
||||
/// Invalidate the playback state so PiP updates its UI (play/pause button)
|
||||
func invalidatePlaybackState() {
|
||||
pipController?.invalidatePlaybackState()
|
||||
pipController?.invalidatePlaybackState()
|
||||
}
|
||||
|
||||
/// Fully tear down PiP — removes the container view from the window and
|
||||
/// destroys the AVPictureInPictureController so the system can no longer
|
||||
/// trigger auto-PiP after the player is disposed.
|
||||
/// Fully tear down PiP without touching the shared inline display layer.
|
||||
func teardown() {
|
||||
pipController?.stopPictureInPicture()
|
||||
if #available(iOS 14.2, *) {
|
||||
pipController?.canStartPictureInPictureAutomaticallyFromInline = false
|
||||
}
|
||||
pipController = nil
|
||||
delegateHelper = nil
|
||||
sampleBufferLayer.flushAndRemoveImage()
|
||||
sampleBufferLayer.controlTimebase = nil
|
||||
sampleBufferLayer.removeFromSuperlayer()
|
||||
containerView?.removeFromSuperview()
|
||||
containerView = nil
|
||||
pipController?.stopPictureInPicture()
|
||||
if #available(iOS 14.2, *) {
|
||||
pipController?.canStartPictureInPictureAutomaticallyFromInline = false
|
||||
}
|
||||
pipController = nil
|
||||
delegateHelper = nil
|
||||
}
|
||||
|
||||
/// Flush enqueued sample buffers from the layer to free video frame memory
|
||||
func flushLayer() {
|
||||
sampleBufferLayer.flushAndRemoveImage()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - PiP Delegate Helper (iOS 15+)
|
||||
// MARK: - PiP Delegate Helper (iOS 15+)
|
||||
|
||||
/// Separate class conforming to AVPictureInPictureControllerDelegate and
|
||||
/// AVPictureInPictureSampleBufferPlaybackDelegate since these require iOS 15+
|
||||
/// availability for the ContentSource-based delegate methods.
|
||||
@available(iOS 15.0, *)
|
||||
private class PipDelegateHelper: NSObject, AVPictureInPictureControllerDelegate,
|
||||
/// Separate class conforming to AVPictureInPictureControllerDelegate and
|
||||
/// AVPictureInPictureSampleBufferPlaybackDelegate since these require iOS 15+
|
||||
/// availability for the ContentSource-based delegate methods.
|
||||
@available(iOS 15.0, *)
|
||||
private class PipDelegateHelper: NSObject, AVPictureInPictureControllerDelegate,
|
||||
AVPictureInPictureSampleBufferPlaybackDelegate
|
||||
{
|
||||
{
|
||||
weak var controller: MpvPipController?
|
||||
private var isRestoring = false
|
||||
|
||||
init(controller: MpvPipController) {
|
||||
self.controller = controller
|
||||
super.init()
|
||||
self.controller = controller
|
||||
super.init()
|
||||
}
|
||||
|
||||
// MARK: - AVPictureInPictureControllerDelegate
|
||||
|
||||
func pictureInPictureControllerWillStartPictureInPicture(
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
) {
|
||||
print("[MpvPipController] PiP will start")
|
||||
controller?.delegate?.pipWillStart()
|
||||
print("[MpvPipController] PiP will start")
|
||||
controller?.delegate?.pipWillStart()
|
||||
}
|
||||
|
||||
func pictureInPictureControllerDidStartPictureInPicture(
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
) {
|
||||
print("[MpvPipController] PiP did start")
|
||||
controller?.delegate?.pipDidStart()
|
||||
print("[MpvPipController] PiP did start")
|
||||
controller?.delegate?.pipDidStart()
|
||||
}
|
||||
|
||||
func pictureInPictureControllerDidStopPictureInPicture(
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
) {
|
||||
let restored = isRestoring
|
||||
isRestoring = false
|
||||
print("[MpvPipController] PiP did stop (restored: \(restored))")
|
||||
controller?.delegate?.pipDidStop(restored: restored)
|
||||
let restored = isRestoring
|
||||
isRestoring = false
|
||||
print("[MpvPipController] PiP did stop (restored: \(restored))")
|
||||
controller?.delegate?.pipDidStop(restored: restored)
|
||||
}
|
||||
|
||||
func pictureInPictureController(
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
failedToStartPictureInPictureWithError error: Error
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
failedToStartPictureInPictureWithError error: Error
|
||||
) {
|
||||
print("[MpvPipController] PiP failed to start: \(error)")
|
||||
controller?.delegate?.pipDidFailToStart(error: error)
|
||||
print("[MpvPipController] PiP failed to start: \(error)")
|
||||
controller?.delegate?.pipDidFailToStart(error: error)
|
||||
}
|
||||
|
||||
func pictureInPictureController(
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
restoreUserInterfaceForPictureInPictureStopWithCompletionHandler completionHandler: @escaping (Bool) -> Void
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
restoreUserInterfaceForPictureInPictureStopWithCompletionHandler completionHandler:
|
||||
@escaping (Bool) -> Void
|
||||
) {
|
||||
print("[MpvPipController] PiP restore user interface")
|
||||
isRestoring = true
|
||||
completionHandler(true)
|
||||
print("[MpvPipController] PiP restore user interface")
|
||||
isRestoring = true
|
||||
completionHandler(true)
|
||||
}
|
||||
|
||||
func pictureInPictureControllerWillStopPictureInPicture(
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
) {
|
||||
print("[MpvPipController] PiP will stop")
|
||||
print("[MpvPipController] PiP will stop")
|
||||
}
|
||||
|
||||
// MARK: - AVPictureInPictureSampleBufferPlaybackDelegate
|
||||
|
||||
func pictureInPictureController(
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
setPlaying playing: Bool
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
setPlaying playing: Bool
|
||||
) {
|
||||
print("[MpvPipController] PiP setPlaying: \(playing)")
|
||||
controller?.delegate?.pipSetPlaying(playing)
|
||||
print("[MpvPipController] PiP setPlaying: \(playing)")
|
||||
controller?.delegate?.pipSetPlaying(playing)
|
||||
}
|
||||
|
||||
func pictureInPictureControllerTimeRangeForPlayback(
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
) -> CMTimeRange {
|
||||
let duration = controller?.delegate?.pipDuration ?? 0
|
||||
if duration > 0 {
|
||||
return CMTimeRange(
|
||||
start: .zero,
|
||||
duration: CMTime(seconds: duration, preferredTimescale: 1000)
|
||||
)
|
||||
}
|
||||
return CMTimeRange(start: .zero, duration: CMTime(seconds: 1, preferredTimescale: 1))
|
||||
let duration = controller?.delegate?.pipDuration ?? 0
|
||||
if duration > 0 {
|
||||
return CMTimeRange(
|
||||
start: .zero,
|
||||
duration: CMTime(seconds: duration, preferredTimescale: 1000)
|
||||
)
|
||||
}
|
||||
return CMTimeRange(start: .zero, duration: CMTime(seconds: 1, preferredTimescale: 1))
|
||||
}
|
||||
|
||||
func pictureInPictureControllerIsPlaybackPaused(
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
) -> Bool {
|
||||
return !(controller?.delegate?.isPipPlaying ?? false)
|
||||
return !(controller?.delegate?.isPipPlaying ?? false)
|
||||
}
|
||||
|
||||
func pictureInPictureController(
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
didTransitionToRenderSize newRenderSize: CMVideoDimensions
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
didTransitionToRenderSize newRenderSize: CMVideoDimensions
|
||||
) {}
|
||||
|
||||
func pictureInPictureController(
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
skipByInterval skipInterval: CMTime,
|
||||
completion completionHandler: @escaping () -> Void
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
skipByInterval skipInterval: CMTime,
|
||||
completion completionHandler: @escaping () -> Void
|
||||
) {
|
||||
let seconds = CMTimeGetSeconds(skipInterval)
|
||||
print("[MpvPipController] PiP skip by \(seconds)s")
|
||||
controller?.delegate?.pipSkip(byInterval: seconds)
|
||||
completionHandler()
|
||||
let seconds = CMTimeGetSeconds(skipInterval)
|
||||
print("[MpvPipController] PiP skip by \(seconds)s")
|
||||
controller?.delegate?.pipSkip(byInterval: seconds)
|
||||
completionHandler()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !os(tvOS)
|
||||
|
||||
@@ -1,196 +1,262 @@
|
||||
import Libmpv
|
||||
import AVFoundation
|
||||
import QuartzCore
|
||||
import UIKit
|
||||
|
||||
/// Core MPV player using Metal rendering for iOS.
|
||||
/// Core MPV player using AVFoundation sample-buffer rendering for iOS/tvOS.
|
||||
class MpvPlayerCore: MpvPlayerCoreBase {
|
||||
|
||||
private var containerView: UIView?
|
||||
private weak var window: UIWindow?
|
||||
private var containerView: UIView?
|
||||
private weak var window: UIWindow?
|
||||
private var mainBlankView: UIView?
|
||||
private var isVisible = false
|
||||
|
||||
var isPipStarting = false
|
||||
var isPipStarting = false
|
||||
|
||||
func initialize(in window: UIWindow) -> Bool {
|
||||
guard !isInitialized else {
|
||||
print("[MpvPlayerCore] Already initialized")
|
||||
return true
|
||||
func initialize(in window: UIWindow) -> Bool {
|
||||
guard !isInitialized else {
|
||||
print("[MpvPlayerCore] Already initialized")
|
||||
return true
|
||||
}
|
||||
|
||||
self.window = window
|
||||
|
||||
let container = UIView(frame: window.bounds)
|
||||
container.backgroundColor = .black
|
||||
container.isUserInteractionEnabled = false
|
||||
|
||||
let layer = MpvVideoLayer()
|
||||
layer.frame = container.bounds
|
||||
layer.contentsScale = window.screen.nativeScale
|
||||
layer.isOpaque = true
|
||||
layer.backgroundColor = UIColor.black.cgColor
|
||||
layer.videoGravity = .resizeAspect
|
||||
|
||||
container.layer.addSublayer(layer)
|
||||
containerView = container
|
||||
videoLayer = layer
|
||||
|
||||
window.insertSubview(container, at: 0)
|
||||
|
||||
guard setupMpv() else {
|
||||
print("[MpvPlayerCore] Failed to setup MPV")
|
||||
layer.removeFromSuperlayer()
|
||||
container.removeFromSuperview()
|
||||
videoLayer = nil
|
||||
containerView = nil
|
||||
return false
|
||||
}
|
||||
|
||||
setupNotifications()
|
||||
#if os(iOS)
|
||||
ExternalDisplayManager.shared.attach(core: self)
|
||||
#endif
|
||||
|
||||
isInitialized = true
|
||||
print("[MpvPlayerCore] Initialized successfully with MPV")
|
||||
return true
|
||||
}
|
||||
|
||||
var sampleBufferDisplayLayer: MpvVideoLayer? { videoLayer }
|
||||
|
||||
func setVisible(_ visible: Bool) {
|
||||
guard containerView != nil else { return }
|
||||
|
||||
isVisible = visible
|
||||
if visible { refreshExternalDisplayAttachment() }
|
||||
setContainerHidden(!visible)
|
||||
if !visible { mainBlankView?.isHidden = true }
|
||||
}
|
||||
|
||||
func updateFrame(_ frame: CGRect? = nil) {
|
||||
guard let videoLayer, let containerView else { return }
|
||||
|
||||
withoutLayerAnimations {
|
||||
if let frame {
|
||||
containerView.frame = frame
|
||||
videoLayer.frame = containerView.bounds
|
||||
} else if let superview = containerView.superview {
|
||||
containerView.frame = superview.bounds
|
||||
videoLayer.frame = containerView.bounds
|
||||
} else if let window {
|
||||
containerView.frame = window.bounds
|
||||
videoLayer.frame = containerView.bounds
|
||||
}
|
||||
|
||||
mainBlankView?.frame = window?.bounds ?? .zero
|
||||
|
||||
let screen = containerView.window?.screen ?? window?.screen ?? UIScreen.main
|
||||
let scale = screen.nativeScale > 0 ? screen.nativeScale : screen.scale
|
||||
videoLayer.contentsScale = scale
|
||||
}
|
||||
}
|
||||
|
||||
func externalDisplayDidChange() {
|
||||
refreshExternalDisplayAttachment()
|
||||
}
|
||||
|
||||
private func refreshExternalDisplayAttachment() {
|
||||
guard let containerView else { return }
|
||||
|
||||
let externalSuperview = externalVideoSuperview
|
||||
|
||||
if let externalSuperview {
|
||||
moveContainerView(to: externalSuperview)
|
||||
setMainBlankViewVisible(true)
|
||||
} else if isVisible, let window {
|
||||
moveContainerView(to: window)
|
||||
setMainBlankViewVisible(false)
|
||||
} else {
|
||||
setMainBlankViewVisible(false)
|
||||
}
|
||||
|
||||
setContainerHidden(!isVisible)
|
||||
updateFrame()
|
||||
}
|
||||
|
||||
private var externalVideoSuperview: UIView? {
|
||||
#if os(iOS)
|
||||
isVisible && !isPipActive && !isPipStarting
|
||||
? ExternalDisplayManager.shared.videoSuperview
|
||||
: nil
|
||||
#else
|
||||
nil
|
||||
#endif
|
||||
}
|
||||
|
||||
private func moveContainerView(to superview: UIView) {
|
||||
guard let containerView else { return }
|
||||
|
||||
withoutLayerAnimations {
|
||||
if containerView.superview !== superview {
|
||||
containerView.removeFromSuperview()
|
||||
superview.insertSubview(containerView, at: 0)
|
||||
} else if superview.subviews.first !== containerView {
|
||||
superview.insertSubview(containerView, at: 0)
|
||||
}
|
||||
|
||||
containerView.frame = superview.bounds
|
||||
containerView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||
}
|
||||
}
|
||||
|
||||
private func setMainBlankViewVisible(_ visible: Bool) {
|
||||
guard visible, let window else {
|
||||
mainBlankView?.removeFromSuperview()
|
||||
mainBlankView = nil
|
||||
return
|
||||
}
|
||||
|
||||
let blankView = mainBlankView ?? UIView(frame: window.bounds)
|
||||
withoutLayerAnimations {
|
||||
blankView.backgroundColor = .black
|
||||
blankView.isUserInteractionEnabled = false
|
||||
blankView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||
blankView.frame = window.bounds
|
||||
|
||||
if blankView.superview !== window {
|
||||
blankView.removeFromSuperview()
|
||||
window.insertSubview(blankView, at: 0)
|
||||
} else if window.subviews.first !== blankView {
|
||||
window.insertSubview(blankView, at: 0)
|
||||
}
|
||||
|
||||
blankView.isHidden = false
|
||||
}
|
||||
mainBlankView = blankView
|
||||
}
|
||||
|
||||
private func setContainerHidden(_ hidden: Bool) {
|
||||
withoutLayerAnimations {
|
||||
containerView?.isHidden = hidden
|
||||
}
|
||||
}
|
||||
|
||||
private func withoutLayerAnimations(_ updates: () -> Void) {
|
||||
CATransaction.begin()
|
||||
CATransaction.setDisableActions(true)
|
||||
updates()
|
||||
CATransaction.commit()
|
||||
}
|
||||
|
||||
/// Nudge mpv to present the current paused frame after leaving PiP.
|
||||
func forceDraw() {
|
||||
command(["seek", "0", "relative+exact"])
|
||||
}
|
||||
|
||||
override func updateEDRMode(sigPeak: Double) {
|
||||
guard let videoLayer else { return }
|
||||
|
||||
let hdrEnabled = self.hdrEnabled
|
||||
var edrHeadroom: CGFloat = 1.0
|
||||
#if os(iOS)
|
||||
if #available(iOS 17.0, *) {
|
||||
edrHeadroom = containerView?.window?.screen.potentialEDRHeadroom ?? 1.0
|
||||
withoutLayerAnimations {
|
||||
videoLayer.wantsExtendedDynamicRangeContent =
|
||||
hdrEnabled && sigPeak > 1.0 && edrHeadroom > 1.0
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
self.window = window
|
||||
let shouldEnableEDR = hdrEnabled && sigPeak > 1.0 && edrHeadroom > 1.0
|
||||
print(
|
||||
"[MpvPlayerCore] EDR mode: \(shouldEnableEDR) (hdrEnabled: \(hdrEnabled), sigPeak: \(sigPeak), headroom: \(edrHeadroom))"
|
||||
)
|
||||
}
|
||||
|
||||
let container = UIView(frame: window.bounds)
|
||||
container.backgroundColor = .clear
|
||||
container.isUserInteractionEnabled = false
|
||||
func dispose() {
|
||||
NotificationCenter.default.removeObserver(self)
|
||||
#if os(iOS)
|
||||
ExternalDisplayManager.shared.detach(core: self)
|
||||
#endif
|
||||
disposeSharedState(destroySynchronously: false)
|
||||
|
||||
let layer = MpvMetalLayer()
|
||||
layer.frame = container.bounds
|
||||
layer.contentsScale = UIScreen.main.nativeScale
|
||||
layer.framebufferOnly = true
|
||||
layer.backgroundColor = UIColor.black.cgColor
|
||||
videoLayer?.removeFromSuperlayer()
|
||||
videoLayer = nil
|
||||
containerView?.removeFromSuperview()
|
||||
containerView = nil
|
||||
mainBlankView?.removeFromSuperview()
|
||||
mainBlankView = nil
|
||||
isInitialized = false
|
||||
print("[MpvPlayerCore] Disposed")
|
||||
}
|
||||
|
||||
container.layer.addSublayer(layer)
|
||||
containerView = container
|
||||
metalLayer = layer
|
||||
deinit {
|
||||
dispose()
|
||||
}
|
||||
|
||||
window.insertSubview(container, at: 0)
|
||||
private func setupNotifications() {
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(enterBackground),
|
||||
name: UIApplication.didEnterBackgroundNotification,
|
||||
object: nil
|
||||
)
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(enterForeground),
|
||||
name: UIApplication.willEnterForegroundNotification,
|
||||
object: nil
|
||||
)
|
||||
}
|
||||
|
||||
guard setupMpv() else {
|
||||
print("[MpvPlayerCore] Failed to setup MPV")
|
||||
layer.removeFromSuperlayer()
|
||||
container.removeFromSuperview()
|
||||
metalLayer = nil
|
||||
containerView = nil
|
||||
return false
|
||||
}
|
||||
|
||||
setupNotifications()
|
||||
|
||||
isInitialized = true
|
||||
print("[MpvPlayerCore] Initialized successfully with MPV")
|
||||
return true
|
||||
@objc private func enterBackground() {
|
||||
if isPipActive || isPipStarting {
|
||||
print("[MpvPlayerCore] Entering background - PiP active/starting, keeping video")
|
||||
return
|
||||
}
|
||||
|
||||
func switchToPipVO(layerPtr: UnsafeMutableRawPointer) -> Bool {
|
||||
guard let mpv else { return false }
|
||||
print("[MpvPlayerCore] Entering background - disabling video")
|
||||
setProperty("vid", value: "no")
|
||||
}
|
||||
|
||||
print("[MpvPlayerCore] Switching to pip VO for PiP")
|
||||
|
||||
metalLayer?.removeFromSuperlayer()
|
||||
|
||||
mpv_set_property_string(mpv, "vid", "no")
|
||||
|
||||
var pointer = Int64(Int(bitPattern: layerPtr))
|
||||
mpv_set_property(mpv, "wid", MPV_FORMAT_INT64, &pointer)
|
||||
|
||||
mpv_set_property_string(mpv, "vo", "pip")
|
||||
mpv_set_property_string(mpv, "vid", "auto")
|
||||
|
||||
print("[MpvPlayerCore] Switched to pip VO successfully")
|
||||
return true
|
||||
@objc private func enterForeground() {
|
||||
if isPipActive {
|
||||
print("[MpvPlayerCore] Entering foreground - PiP active, skipping vid restore")
|
||||
return
|
||||
}
|
||||
|
||||
func switchToGpuNextVO() -> Bool {
|
||||
guard let mpv, let metalLayer else { return false }
|
||||
|
||||
print("[MpvPlayerCore] Switching back to gpu-next VO")
|
||||
|
||||
mpv_set_property_string(mpv, "vid", "no")
|
||||
|
||||
var layer = metalLayer
|
||||
mpv_set_property(mpv, "wid", MPV_FORMAT_INT64, &layer)
|
||||
|
||||
applyGpuNextOptions()
|
||||
mpv_set_property_string(mpv, "vid", "auto")
|
||||
|
||||
if metalLayer.superlayer == nil, let containerView {
|
||||
containerView.layer.addSublayer(metalLayer)
|
||||
}
|
||||
|
||||
print("[MpvPlayerCore] Switched back to gpu-next VO successfully")
|
||||
return true
|
||||
}
|
||||
|
||||
func setVisible(_ visible: Bool) {
|
||||
guard let containerView else { return }
|
||||
|
||||
if visible {
|
||||
containerView.removeFromSuperview()
|
||||
window?.insertSubview(containerView, at: 0)
|
||||
}
|
||||
|
||||
containerView.isHidden = !visible
|
||||
}
|
||||
|
||||
func updateFrame(_ frame: CGRect? = nil) {
|
||||
guard let metalLayer, let containerView else { return }
|
||||
|
||||
if let frame {
|
||||
containerView.frame = frame
|
||||
metalLayer.frame = containerView.bounds
|
||||
} else if let window {
|
||||
containerView.frame = window.bounds
|
||||
metalLayer.frame = containerView.bounds
|
||||
}
|
||||
|
||||
let scale = UIScreen.main.nativeScale
|
||||
metalLayer.drawableSize = CGSize(
|
||||
width: metalLayer.frame.width * scale,
|
||||
height: metalLayer.frame.height * scale
|
||||
)
|
||||
}
|
||||
|
||||
/// Nudge mpv to present the current paused frame after switching back from PiP.
|
||||
func forceDraw() {
|
||||
command(["seek", "0", "relative+exact"])
|
||||
}
|
||||
|
||||
override func updateEDRMode(sigPeak: Double) {
|
||||
guard let metalLayer else { return }
|
||||
|
||||
var edrHeadroom: CGFloat = 1.0
|
||||
if #available(iOS 16.0, *) {
|
||||
edrHeadroom = containerView?.window?.screen.potentialEDRHeadroom ?? 1.0
|
||||
metalLayer.wantsExtendedDynamicRangeContent =
|
||||
hdrEnabled && sigPeak > 1.0 && edrHeadroom > 1.0
|
||||
}
|
||||
|
||||
let shouldEnableEDR = hdrEnabled && sigPeak > 1.0 && edrHeadroom > 1.0
|
||||
print(
|
||||
"[MpvPlayerCore] EDR mode: \(shouldEnableEDR) (hdrEnabled: \(hdrEnabled), sigPeak: \(sigPeak), headroom: \(edrHeadroom))"
|
||||
)
|
||||
}
|
||||
|
||||
func dispose() {
|
||||
NotificationCenter.default.removeObserver(self)
|
||||
disposeSharedState(destroySynchronously: false)
|
||||
|
||||
metalLayer?.removeFromSuperlayer()
|
||||
metalLayer = nil
|
||||
containerView?.removeFromSuperview()
|
||||
containerView = nil
|
||||
isInitialized = false
|
||||
print("[MpvPlayerCore] Disposed")
|
||||
}
|
||||
|
||||
deinit {
|
||||
dispose()
|
||||
}
|
||||
|
||||
private func setupNotifications() {
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(enterBackground),
|
||||
name: UIApplication.didEnterBackgroundNotification,
|
||||
object: nil
|
||||
)
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(enterForeground),
|
||||
name: UIApplication.willEnterForegroundNotification,
|
||||
object: nil
|
||||
)
|
||||
}
|
||||
|
||||
@objc private func enterBackground() {
|
||||
if isPipActive || isPipStarting {
|
||||
print("[MpvPlayerCore] Entering background - PiP active/starting, keeping video")
|
||||
return
|
||||
}
|
||||
|
||||
print("[MpvPlayerCore] Entering background - disabling video")
|
||||
if mpv != nil {
|
||||
mpv_set_option_string(mpv, "vid", "no")
|
||||
}
|
||||
}
|
||||
|
||||
@objc private func enterForeground() {
|
||||
if isPipActive {
|
||||
print("[MpvPlayerCore] Entering foreground - PiP active, skipping vid restore")
|
||||
return
|
||||
}
|
||||
|
||||
print("[MpvPlayerCore] Entering foreground - enabling video")
|
||||
if mpv != nil {
|
||||
mpv_set_option_string(mpv, "vid", "auto")
|
||||
}
|
||||
}
|
||||
print("[MpvPlayerCore] Entering foreground - enabling video")
|
||||
setProperty("vid", value: "auto")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,392 +5,443 @@ import AVKit
|
||||
/// Flutter plugin that bridges MPV player to Dart via method and event channels
|
||||
class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPluginShared {
|
||||
|
||||
// MARK: - Properties
|
||||
// MARK: - Properties
|
||||
|
||||
private var playerCore: MpvPlayerCore?
|
||||
var eventSink: FlutterEventSink?
|
||||
private weak var registrar: FlutterPluginRegistrar?
|
||||
var nameToId: [String: Int] = [:]
|
||||
private var playerCore: MpvPlayerCore?
|
||||
var eventSink: FlutterEventSink?
|
||||
private weak var registrar: FlutterPluginRegistrar?
|
||||
var nameToId: [String: Int] = [:]
|
||||
|
||||
// MpvPluginShared conformance
|
||||
var coreBase: MpvPlayerCoreBase? { playerCore }
|
||||
func setPlayerVisible(_ visible: Bool) { playerCore?.setVisible(visible) }
|
||||
func updatePlayerFrame() { playerCore?.updateFrame() }
|
||||
// MpvPluginShared conformance
|
||||
var coreBase: MpvPlayerCoreBase? { playerCore }
|
||||
func setPlayerVisible(_ visible: Bool) { playerCore?.setVisible(visible) }
|
||||
func updatePlayerFrame() { playerCore?.updateFrame() }
|
||||
|
||||
// PiP
|
||||
private var pipController: MpvPipController?
|
||||
private var pipChannel: FlutterMethodChannel?
|
||||
private var autoPipEnabled = false
|
||||
private var isManualPipRequest = false
|
||||
private var pipTimebaseSyncTimer: Timer?
|
||||
private var pendingInlineRestoreAfterPip = false
|
||||
private var sceneActivationObserverRegistered = false
|
||||
// PiP
|
||||
private var pipController: MpvPipController?
|
||||
private var pipChannel: FlutterMethodChannel?
|
||||
private var autoPipEnabled = false
|
||||
private var isManualPipRequest = false
|
||||
private var pipTimebaseSyncTimer: Timer?
|
||||
private var pendingInlineRestoreAfterPip = false
|
||||
private var sceneActivationObserverRegistered = false
|
||||
|
||||
// MARK: - FlutterPlugin Registration
|
||||
// MARK: - FlutterPlugin Registration
|
||||
|
||||
static func register(with registrar: FlutterPluginRegistrar) {
|
||||
let methodChannel = FlutterMethodChannel(
|
||||
name: "com.plezy/mpv_player",
|
||||
binaryMessenger: registrar.messenger()
|
||||
)
|
||||
let eventChannel = FlutterEventChannel(
|
||||
name: "com.plezy/mpv_player/events",
|
||||
binaryMessenger: registrar.messenger()
|
||||
)
|
||||
let pipChannel = FlutterMethodChannel(
|
||||
name: "com.plezy/pip",
|
||||
binaryMessenger: registrar.messenger()
|
||||
)
|
||||
static func register(with registrar: FlutterPluginRegistrar) {
|
||||
let methodChannel = FlutterMethodChannel(
|
||||
name: "com.plezy/mpv_player",
|
||||
binaryMessenger: registrar.messenger()
|
||||
)
|
||||
let eventChannel = FlutterEventChannel(
|
||||
name: "com.plezy/mpv_player/events",
|
||||
binaryMessenger: registrar.messenger()
|
||||
)
|
||||
let pipChannel = FlutterMethodChannel(
|
||||
name: "com.plezy/pip",
|
||||
binaryMessenger: registrar.messenger()
|
||||
)
|
||||
|
||||
let instance = MpvPlayerPlugin()
|
||||
instance.registrar = registrar
|
||||
instance.pipChannel = pipChannel
|
||||
let instance = MpvPlayerPlugin()
|
||||
instance.registrar = registrar
|
||||
instance.pipChannel = pipChannel
|
||||
|
||||
registrar.addMethodCallDelegate(instance, channel: methodChannel)
|
||||
eventChannel.setStreamHandler(instance)
|
||||
pipChannel.setMethodCallHandler(instance.handlePipCall)
|
||||
registrar.addMethodCallDelegate(instance, channel: methodChannel)
|
||||
eventChannel.setStreamHandler(instance)
|
||||
pipChannel.setMethodCallHandler(instance.handlePipCall)
|
||||
}
|
||||
|
||||
// MARK: - FlutterStreamHandler
|
||||
|
||||
func onListen(withArguments arguments: Any?, eventSink events: @escaping FlutterEventSink)
|
||||
-> FlutterError?
|
||||
{
|
||||
self.eventSink = events
|
||||
return nil
|
||||
}
|
||||
|
||||
func onCancel(withArguments arguments: Any?) -> FlutterError? {
|
||||
self.eventSink = nil
|
||||
return nil
|
||||
}
|
||||
|
||||
// MARK: - FlutterPlugin Method Handler
|
||||
|
||||
func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
switch call.method {
|
||||
case "initialize":
|
||||
handleInitialize(result: result)
|
||||
case "dispose":
|
||||
handleDispose(result: result)
|
||||
case "setProperty":
|
||||
handleSetProperty(call: call, result: result)
|
||||
case "getProperty":
|
||||
handleGetProperty(call: call, result: result)
|
||||
case "observeProperty":
|
||||
handleObserveProperty(call: call, result: result)
|
||||
case "command":
|
||||
handleCommand(call: call, result: result)
|
||||
case "setVisible":
|
||||
handleSetVisible(call: call, result: result)
|
||||
case "isInitialized":
|
||||
result(playerCore?.isInitialized ?? false)
|
||||
case "updateFrame":
|
||||
handleUpdateFrame(result: result)
|
||||
case "setLogLevel":
|
||||
handleSetLogLevel(call: call, result: result)
|
||||
default:
|
||||
result(FlutterMethodNotImplemented)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - FlutterStreamHandler
|
||||
// MARK: - PiP
|
||||
|
||||
func onListen(withArguments arguments: Any?, eventSink events: @escaping FlutterEventSink) -> FlutterError? {
|
||||
self.eventSink = events
|
||||
return nil
|
||||
private func ensurePipController() -> MpvPipController? {
|
||||
if let existing = pipController { return existing }
|
||||
guard let layer = playerCore?.sampleBufferDisplayLayer else { return nil }
|
||||
let controller = MpvPipController(sampleBufferDisplayLayer: layer)
|
||||
controller.delegate = self
|
||||
pipController = controller
|
||||
return controller
|
||||
}
|
||||
|
||||
private func registerSceneActivationObserver() {
|
||||
guard !sceneActivationObserverRegistered else { return }
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(sceneDidActivate),
|
||||
name: UIScene.didActivateNotification,
|
||||
object: nil
|
||||
)
|
||||
sceneActivationObserverRegistered = true
|
||||
}
|
||||
|
||||
private func unregisterSceneActivationObserver() {
|
||||
guard sceneActivationObserverRegistered else { return }
|
||||
NotificationCenter.default.removeObserver(
|
||||
self, name: UIScene.didActivateNotification, object: nil)
|
||||
sceneActivationObserverRegistered = false
|
||||
}
|
||||
|
||||
private var isSceneActive: Bool {
|
||||
#if os(iOS)
|
||||
ExternalDisplayManager.hasActiveApplicationScene
|
||||
#else
|
||||
UIApplication.shared.connectedScenes.contains { $0.activationState == .foregroundActive }
|
||||
#endif
|
||||
}
|
||||
|
||||
private func restoreInlinePlayerAfterPip() {
|
||||
guard pendingInlineRestoreAfterPip,
|
||||
let playerCore = playerCore,
|
||||
!playerCore.isPipActive,
|
||||
!playerCore.isPipStarting
|
||||
else { return }
|
||||
|
||||
print("[MpvPlayerPlugin] Restoring inline player after PiP")
|
||||
playerCore.setVisible(true)
|
||||
playerCore.updateFrame()
|
||||
if playerCore.isPaused {
|
||||
playerCore.forceDraw()
|
||||
}
|
||||
pendingInlineRestoreAfterPip = false
|
||||
}
|
||||
|
||||
func onCancel(withArguments arguments: Any?) -> FlutterError? {
|
||||
self.eventSink = nil
|
||||
return nil
|
||||
}
|
||||
|
||||
// MARK: - FlutterPlugin Method Handler
|
||||
|
||||
func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
switch call.method {
|
||||
case "initialize":
|
||||
handleInitialize(result: result)
|
||||
case "dispose":
|
||||
handleDispose(result: result)
|
||||
case "setProperty":
|
||||
handleSetProperty(call: call, result: result)
|
||||
case "getProperty":
|
||||
handleGetProperty(call: call, result: result)
|
||||
case "observeProperty":
|
||||
handleObserveProperty(call: call, result: result)
|
||||
case "command":
|
||||
handleCommand(call: call, result: result)
|
||||
case "setVisible":
|
||||
handleSetVisible(call: call, result: result)
|
||||
case "isInitialized":
|
||||
result(playerCore?.isInitialized ?? false)
|
||||
case "updateFrame":
|
||||
handleUpdateFrame(result: result)
|
||||
case "setLogLevel":
|
||||
handleSetLogLevel(call: call, result: result)
|
||||
default:
|
||||
result(FlutterMethodNotImplemented)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - PiP
|
||||
|
||||
private func ensurePipController() -> MpvPipController {
|
||||
if let existing = pipController { return existing }
|
||||
let controller = MpvPipController()
|
||||
controller.delegate = self
|
||||
pipController = controller
|
||||
return controller
|
||||
}
|
||||
|
||||
private func registerSceneActivationObserver() {
|
||||
guard !sceneActivationObserverRegistered else { return }
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(sceneDidActivate),
|
||||
name: UIScene.didActivateNotification,
|
||||
object: nil
|
||||
)
|
||||
sceneActivationObserverRegistered = true
|
||||
}
|
||||
|
||||
private func unregisterSceneActivationObserver() {
|
||||
guard sceneActivationObserverRegistered else { return }
|
||||
NotificationCenter.default.removeObserver(self, name: UIScene.didActivateNotification, object: nil)
|
||||
sceneActivationObserverRegistered = false
|
||||
}
|
||||
|
||||
private var isSceneActive: Bool {
|
||||
UIApplication.shared.connectedScenes.contains { $0.activationState == .foregroundActive }
|
||||
}
|
||||
|
||||
private func restoreInlinePlayerAfterPip() {
|
||||
guard pendingInlineRestoreAfterPip,
|
||||
let playerCore = playerCore,
|
||||
!playerCore.isPipActive,
|
||||
!playerCore.isPipStarting else { return }
|
||||
|
||||
print("[MpvPlayerPlugin] Restoring inline player after PiP")
|
||||
playerCore.setVisible(true)
|
||||
playerCore.updateFrame()
|
||||
if playerCore.isPaused {
|
||||
playerCore.forceDraw()
|
||||
}
|
||||
pendingInlineRestoreAfterPip = false
|
||||
}
|
||||
|
||||
private func handlePipCall(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self = self else { result(nil); return }
|
||||
switch call.method {
|
||||
case "isSupported":
|
||||
result(MpvPipController.isSupported)
|
||||
case "enter":
|
||||
self.enterPip(manual: true, result: result)
|
||||
case "setAutoPipReady":
|
||||
if let args = call.arguments as? [String: Any], let ready = args["ready"] as? Bool {
|
||||
self.autoPipEnabled = ready
|
||||
if ready {
|
||||
let pip = self.ensurePipController()
|
||||
pip.setAutoStart(true)
|
||||
// Warm the layer so the system considers PiP possible
|
||||
if let pc = self.playerCore {
|
||||
pip.warmLayer(currentTime: pc.timePos, isPlaying: !pc.isPaused)
|
||||
}
|
||||
} else {
|
||||
self.pipController?.setAutoStart(false)
|
||||
}
|
||||
}
|
||||
result(nil)
|
||||
default:
|
||||
result(FlutterMethodNotImplemented)
|
||||
private func handlePipCall(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self = self else { result(nil); return }
|
||||
switch call.method {
|
||||
case "isSupported":
|
||||
result(MpvPipController.isSupported)
|
||||
case "enter":
|
||||
self.enterPip(manual: true, result: result)
|
||||
case "setAutoPipReady":
|
||||
if let args = call.arguments as? [String: Any], let ready = args["ready"] as? Bool {
|
||||
self.autoPipEnabled = ready
|
||||
if ready {
|
||||
guard let pip = self.ensurePipController() else {
|
||||
result(nil)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Switch to PiP VO and prepare the sample buffer layer for PiP display.
|
||||
/// Returns the MpvPipController on success, nil on failure.
|
||||
@discardableResult
|
||||
private func switchToPipAndPrepare() -> MpvPipController? {
|
||||
guard let playerCore = playerCore else { return nil }
|
||||
let pip = ensurePipController()
|
||||
guard playerCore.switchToPipVO(layerPtr: pip.layerPointer) else { return nil }
|
||||
pendingInlineRestoreAfterPip = false
|
||||
playerCore.isPipStarting = true
|
||||
pip.pushBlankFrame()
|
||||
pip.syncTimebase(currentTime: playerCore.timePos, isPlaying: !playerCore.isPaused)
|
||||
pip.invalidatePlaybackState()
|
||||
return pip
|
||||
}
|
||||
|
||||
/// Manual PiP entry (button press). Auto-PiP is handled by the system via
|
||||
/// canStartPictureInPictureAutomaticallyFromInline + pipWillStart delegate.
|
||||
private func enterPip(manual: Bool, result: FlutterResult? = nil) {
|
||||
guard MpvPipController.isSupported else {
|
||||
result?(["success": false, "errorCode": "ios_version", "errorMessage": "Requires iOS 15.0+"])
|
||||
return
|
||||
}
|
||||
guard playerCore != nil else {
|
||||
result?(["success": false, "errorCode": "failed", "errorMessage": "Player not initialized"])
|
||||
return
|
||||
}
|
||||
guard let pip = switchToPipAndPrepare() else {
|
||||
result?(["success": false, "errorCode": "vo_switch_failed", "errorMessage": "Failed to switch VO"])
|
||||
return
|
||||
}
|
||||
|
||||
isManualPipRequest = manual
|
||||
pip.startPip(waitForFrame: manual) { [weak self] started in
|
||||
if started {
|
||||
result?(["success": true])
|
||||
} else {
|
||||
self?.cleanupPip(notify: false)
|
||||
result?(["success": false, "errorCode": "failed", "errorMessage": "PiP failed to start"])
|
||||
pip.setAutoStart(true)
|
||||
// Warm the layer so the system considers PiP possible
|
||||
if let pc = self.playerCore {
|
||||
pip.warmLayer(currentTime: pc.timePos, isPlaying: !pc.isPaused)
|
||||
}
|
||||
} else {
|
||||
self.pipController?.setAutoStart(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Unified cleanup for all PiP exit paths
|
||||
private func cleanupPip(notify: Bool, pause: Bool = false) {
|
||||
playerCore?.isPipStarting = false
|
||||
playerCore?.isPipActive = false
|
||||
isManualPipRequest = false
|
||||
stopPipTimebaseSync()
|
||||
pipController?.flushLayer()
|
||||
let restoredInlineVO = playerCore?.switchToGpuNextVO() ?? false
|
||||
if pause { playerCore?.setProperty("pause", value: "yes") }
|
||||
pendingInlineRestoreAfterPip = restoredInlineVO
|
||||
if pendingInlineRestoreAfterPip {
|
||||
if isSceneActive {
|
||||
restoreInlinePlayerAfterPip()
|
||||
} else {
|
||||
print("[MpvPlayerPlugin] Deferring inline restore until scene activation")
|
||||
}
|
||||
}
|
||||
if notify { pipChannel?.invokeMethod("onPipChanged", arguments: false) }
|
||||
}
|
||||
|
||||
/// Scene became active — restore inline playback if needed and re-warm the
|
||||
/// sample-buffer layer so future auto-PiP remains possible.
|
||||
@objc private func sceneDidActivate() {
|
||||
restoreInlinePlayerAfterPip()
|
||||
if autoPipEnabled, let pip = pipController, let pc = playerCore, !pc.isPipActive {
|
||||
pip.warmLayer(currentTime: pc.timePos, isPlaying: !pc.isPaused)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Timebase Sync
|
||||
|
||||
private func syncPipTimebase() {
|
||||
guard let playerCore = playerCore, let pipController = pipController else { return }
|
||||
pipController.syncTimebase(
|
||||
currentTime: playerCore.timePos,
|
||||
isPlaying: !playerCore.isPaused
|
||||
)
|
||||
}
|
||||
|
||||
private func startPipTimebaseSync() {
|
||||
stopPipTimebaseSync()
|
||||
pipTimebaseSyncTimer = Timer.scheduledTimer(withTimeInterval: 5.0, repeats: true) { [weak self] _ in
|
||||
self?.syncPipTimebase()
|
||||
}
|
||||
}
|
||||
|
||||
private func stopPipTimebaseSync() {
|
||||
pipTimebaseSyncTimer?.invalidate()
|
||||
pipTimebaseSyncTimer = nil
|
||||
}
|
||||
|
||||
// MARK: - Platform-Specific Method Handlers
|
||||
|
||||
private func handleInitialize(result: @escaping FlutterResult) {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self = self else {
|
||||
result(FlutterError(code: "ERROR", message: "Plugin deallocated", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
if self.playerCore?.isInitialized == true {
|
||||
self.registerSceneActivationObserver()
|
||||
result(true)
|
||||
return
|
||||
}
|
||||
|
||||
guard let window = self.findKeyWindow() else {
|
||||
result(FlutterError(code: "NO_WINDOW", message: "Could not find key window", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
let core = MpvPlayerCore()
|
||||
core.delegate = self
|
||||
|
||||
guard core.initialize(in: window) else {
|
||||
result(FlutterError(code: "MPV_INIT_FAILED", message: "Failed to initialize MPV", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
self.playerCore = core
|
||||
self.registerSceneActivationObserver()
|
||||
core.setVisible(false)
|
||||
result(true)
|
||||
}
|
||||
}
|
||||
|
||||
private func handleDispose(result: @escaping FlutterResult) {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self = self else { result(nil); return }
|
||||
self.pipController?.teardown()
|
||||
self.pipController = nil
|
||||
self.autoPipEnabled = false
|
||||
self.pendingInlineRestoreAfterPip = false
|
||||
self.unregisterSceneActivationObserver()
|
||||
self.stopPipTimebaseSync()
|
||||
self.playerCore?.dispose()
|
||||
self.playerCore = nil
|
||||
result(nil)
|
||||
}
|
||||
}
|
||||
|
||||
private func handleSetProperty(call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
guard let args = call.arguments as? [String: Any],
|
||||
let name = args["name"] as? String,
|
||||
let value = args["value"] as? String else {
|
||||
result(FlutterError(code: "INVALID_ARGS", message: "Missing 'name' or 'value' argument", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
playerCore?.setProperty(name, value: value)
|
||||
|
||||
if name == "pause" {
|
||||
pipController?.invalidatePlaybackState()
|
||||
if playerCore?.isPipActive == true { syncPipTimebase() }
|
||||
}
|
||||
|
||||
result(nil)
|
||||
default:
|
||||
result(FlutterMethodNotImplemented)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Prepare the shared AVFoundation display layer for PiP display.
|
||||
/// Returns the MpvPipController on success, nil on failure.
|
||||
@discardableResult
|
||||
private func preparePip() -> MpvPipController? {
|
||||
guard let playerCore = playerCore else { return nil }
|
||||
guard let pip = ensurePipController() else { return nil }
|
||||
pendingInlineRestoreAfterPip = false
|
||||
playerCore.isPipStarting = true
|
||||
pip.syncTimebase(currentTime: playerCore.timePos, isPlaying: !playerCore.isPaused)
|
||||
pip.invalidatePlaybackState()
|
||||
return pip
|
||||
}
|
||||
|
||||
/// Manual PiP entry (button press). Auto-PiP is handled by the system via
|
||||
/// canStartPictureInPictureAutomaticallyFromInline + pipWillStart delegate.
|
||||
private func enterPip(manual: Bool, result: FlutterResult? = nil) {
|
||||
guard MpvPipController.isSupported else {
|
||||
result?([
|
||||
"success": false, "errorCode": "ios_version", "errorMessage": "Requires iOS 15.0+",
|
||||
])
|
||||
return
|
||||
}
|
||||
guard playerCore != nil else {
|
||||
result?([
|
||||
"success": false, "errorCode": "failed", "errorMessage": "Player not initialized",
|
||||
])
|
||||
return
|
||||
}
|
||||
guard let pip = preparePip() else {
|
||||
result?([
|
||||
"success": false, "errorCode": "pip_prepare_failed",
|
||||
"errorMessage": "Failed to prepare PiP",
|
||||
])
|
||||
return
|
||||
}
|
||||
|
||||
// MARK: - Helpers
|
||||
isManualPipRequest = manual
|
||||
pip.startPip(waitForFrame: manual) { [weak self] started in
|
||||
if started {
|
||||
result?(["success": true])
|
||||
} else {
|
||||
self?.cleanupPip(notify: false)
|
||||
result?([
|
||||
"success": false, "errorCode": "failed", "errorMessage": "PiP failed to start",
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func findKeyWindow() -> UIWindow? {
|
||||
guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
|
||||
let window = windowScene.windows.first(where: { $0.isKeyWindow }) else {
|
||||
return nil
|
||||
/// Unified cleanup for all PiP exit paths
|
||||
private func cleanupPip(notify: Bool, pause: Bool = false) {
|
||||
playerCore?.isPipStarting = false
|
||||
playerCore?.isPipActive = false
|
||||
isManualPipRequest = false
|
||||
stopPipTimebaseSync()
|
||||
if pause {
|
||||
playerCore?.setPropertyAsync("pause", value: "yes") { [weak self] _ in
|
||||
self?.pipController?.invalidatePlaybackState()
|
||||
self?.syncPipTimebase()
|
||||
}
|
||||
}
|
||||
pendingInlineRestoreAfterPip = true
|
||||
if pendingInlineRestoreAfterPip {
|
||||
if isSceneActive {
|
||||
restoreInlinePlayerAfterPip()
|
||||
} else {
|
||||
print("[MpvPlayerPlugin] Deferring inline restore until scene activation")
|
||||
}
|
||||
}
|
||||
if notify { pipChannel?.invokeMethod("onPipChanged", arguments: false) }
|
||||
}
|
||||
|
||||
/// Scene became active — restore inline playback if needed and re-warm the
|
||||
/// sample-buffer layer so future auto-PiP remains possible.
|
||||
@objc private func sceneDidActivate() {
|
||||
restoreInlinePlayerAfterPip()
|
||||
if autoPipEnabled, let pip = pipController, let pc = playerCore, !pc.isPipActive {
|
||||
pip.warmLayer(currentTime: pc.timePos, isPlaying: !pc.isPaused)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Timebase Sync
|
||||
|
||||
private func syncPipTimebase() {
|
||||
guard let playerCore = playerCore, let pipController = pipController else { return }
|
||||
pipController.syncTimebase(
|
||||
currentTime: playerCore.timePos,
|
||||
isPlaying: !playerCore.isPaused
|
||||
)
|
||||
}
|
||||
|
||||
private func startPipTimebaseSync() {
|
||||
stopPipTimebaseSync()
|
||||
pipTimebaseSyncTimer = Timer.scheduledTimer(withTimeInterval: 5.0, repeats: true) {
|
||||
[weak self] _ in
|
||||
self?.syncPipTimebase()
|
||||
}
|
||||
}
|
||||
|
||||
private func stopPipTimebaseSync() {
|
||||
pipTimebaseSyncTimer?.invalidate()
|
||||
pipTimebaseSyncTimer = nil
|
||||
}
|
||||
|
||||
// MARK: - Platform-Specific Method Handlers
|
||||
|
||||
private func handleInitialize(result: @escaping FlutterResult) {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self = self else {
|
||||
result(FlutterError(code: "ERROR", message: "Plugin deallocated", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
if self.playerCore?.isInitialized == true {
|
||||
self.registerSceneActivationObserver()
|
||||
result(true)
|
||||
return
|
||||
}
|
||||
|
||||
guard let window = self.findKeyWindow() else {
|
||||
result(
|
||||
FlutterError(
|
||||
code: "NO_WINDOW", message: "Could not find key window", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
let core = MpvPlayerCore()
|
||||
core.delegate = self
|
||||
|
||||
guard core.initialize(in: window) else {
|
||||
result(
|
||||
FlutterError(
|
||||
code: "MPV_INIT_FAILED", message: "Failed to initialize MPV", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
self.playerCore = core
|
||||
self.registerSceneActivationObserver()
|
||||
core.setVisible(false)
|
||||
result(true)
|
||||
}
|
||||
}
|
||||
|
||||
private func handleDispose(result: @escaping FlutterResult) {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self = self else { result(nil); return }
|
||||
self.pipController?.teardown()
|
||||
self.pipController = nil
|
||||
self.autoPipEnabled = false
|
||||
self.pendingInlineRestoreAfterPip = false
|
||||
self.unregisterSceneActivationObserver()
|
||||
self.stopPipTimebaseSync()
|
||||
self.playerCore?.dispose()
|
||||
self.playerCore = nil
|
||||
result(nil)
|
||||
}
|
||||
}
|
||||
|
||||
private func handleSetProperty(call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
guard let args = call.arguments as? [String: Any],
|
||||
let name = args["name"] as? String,
|
||||
let value = args["value"] as? String
|
||||
else {
|
||||
result(
|
||||
FlutterError(
|
||||
code: "INVALID_ARGS", message: "Missing 'name' or 'value' argument",
|
||||
details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
guard let core = playerCore else {
|
||||
result(nil)
|
||||
return
|
||||
}
|
||||
|
||||
core.setPropertyAsync(name, value: value) { [weak self] _ in
|
||||
if name == "pause" {
|
||||
self?.pipController?.invalidatePlaybackState()
|
||||
if core.isPipActive == true { self?.syncPipTimebase() }
|
||||
}
|
||||
result(nil)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Helpers
|
||||
|
||||
private func findKeyWindow() -> UIWindow? {
|
||||
#if os(iOS)
|
||||
return ExternalDisplayManager.mainApplicationWindow()
|
||||
#else
|
||||
let scenes = UIApplication.shared.connectedScenes.compactMap { $0 as? UIWindowScene }
|
||||
|
||||
for scene in scenes {
|
||||
if let window = scene.windows.first(where: { $0.isKeyWindow }) {
|
||||
return window
|
||||
}
|
||||
return window
|
||||
}
|
||||
}
|
||||
|
||||
for scene in scenes {
|
||||
if let window = scene.windows.first(where: { !$0.isHidden }) {
|
||||
return window
|
||||
}
|
||||
}
|
||||
|
||||
return scenes.first?.windows.first
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - MpvPipDelegate
|
||||
|
||||
extension MpvPlayerPlugin: MpvPipDelegate {
|
||||
|
||||
func pipWillStart() {
|
||||
// If PiP was system-initiated (not via our enterPip), switch VO now
|
||||
guard let playerCore = playerCore, !playerCore.isPipStarting else { return }
|
||||
print("[MpvPlayerPlugin] System-initiated PiP detected, switching VO")
|
||||
if switchToPipAndPrepare() == nil {
|
||||
print("[MpvPlayerPlugin] VO switch failed for system-initiated PiP")
|
||||
pipController?.stopPip()
|
||||
}
|
||||
func pipWillStart() {
|
||||
// If PiP was system-initiated (not via our enterPip), prepare the shared layer now.
|
||||
guard let playerCore = playerCore, !playerCore.isPipStarting else { return }
|
||||
print("[MpvPlayerPlugin] System-initiated PiP detected, preparing shared layer")
|
||||
if preparePip() == nil {
|
||||
print("[MpvPlayerPlugin] PiP preparation failed for system-initiated PiP")
|
||||
pipController?.stopPip()
|
||||
}
|
||||
}
|
||||
|
||||
func pipDidStart() {
|
||||
playerCore?.isPipStarting = false
|
||||
playerCore?.isPipActive = true
|
||||
pendingInlineRestoreAfterPip = false
|
||||
pipChannel?.invokeMethod("onPipChanged", arguments: true)
|
||||
syncPipTimebase()
|
||||
startPipTimebaseSync()
|
||||
func pipDidStart() {
|
||||
playerCore?.isPipStarting = false
|
||||
playerCore?.isPipActive = true
|
||||
pendingInlineRestoreAfterPip = false
|
||||
pipChannel?.invokeMethod("onPipChanged", arguments: true)
|
||||
syncPipTimebase()
|
||||
startPipTimebaseSync()
|
||||
|
||||
if isManualPipRequest {
|
||||
isManualPipRequest = false
|
||||
UIControl().sendAction(#selector(URLSessionTask.suspend), to: UIApplication.shared, for: nil)
|
||||
}
|
||||
if isManualPipRequest {
|
||||
isManualPipRequest = false
|
||||
UIControl().sendAction(
|
||||
#selector(URLSessionTask.suspend), to: UIApplication.shared, for: nil)
|
||||
}
|
||||
}
|
||||
|
||||
func pipDidStop(restored: Bool) {
|
||||
cleanupPip(notify: true, pause: !restored)
|
||||
func pipDidStop(restored: Bool) {
|
||||
cleanupPip(notify: true, pause: !restored)
|
||||
}
|
||||
|
||||
func pipDidFailToStart(error: Error?) {
|
||||
cleanupPip(notify: true)
|
||||
}
|
||||
|
||||
func pipSetPlaying(_ playing: Bool) {
|
||||
playerCore?.setPropertyAsync("pause", value: playing ? "no" : "yes") { [weak self] _ in
|
||||
self?.pipController?.invalidatePlaybackState()
|
||||
self?.syncPipTimebase()
|
||||
}
|
||||
}
|
||||
|
||||
func pipDidFailToStart(error: Error?) {
|
||||
cleanupPip(notify: true)
|
||||
func pipSkip(byInterval seconds: Double) {
|
||||
guard let playerCore = playerCore else { return }
|
||||
let newTime = max(0, playerCore.timePos + seconds)
|
||||
playerCore.command(["seek", String(newTime), "absolute"])
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self] in
|
||||
self?.syncPipTimebase()
|
||||
self?.pipController?.invalidatePlaybackState()
|
||||
}
|
||||
}
|
||||
|
||||
func pipSetPlaying(_ playing: Bool) {
|
||||
playerCore?.setProperty("pause", value: playing ? "no" : "yes")
|
||||
pipController?.invalidatePlaybackState()
|
||||
syncPipTimebase()
|
||||
}
|
||||
|
||||
func pipSkip(byInterval seconds: Double) {
|
||||
guard let playerCore = playerCore else { return }
|
||||
let newTime = max(0, playerCore.timePos + seconds)
|
||||
playerCore.command(["seek", String(newTime), "absolute"])
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self] in
|
||||
self?.syncPipTimebase()
|
||||
self?.pipController?.invalidatePlaybackState()
|
||||
}
|
||||
}
|
||||
|
||||
var isPipPlaying: Bool { !(playerCore?.isPaused ?? true) }
|
||||
var pipDuration: Double { playerCore?.duration ?? 0 }
|
||||
var isPipPlaying: Bool { !(playerCore?.isPaused ?? true) }
|
||||
var pipDuration: Double { playerCore?.duration ?? 0 }
|
||||
}
|
||||
|
||||
@@ -9,7 +9,10 @@ platform :ios do
|
||||
git_commit = `git rev-parse --short HEAD`.strip
|
||||
|
||||
# Build the Flutter app
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build ipa --dart-define=ENABLE_IN_APP_REVIEW=true --dart-define=ENABLE_SENTRY=true --dart-define=GIT_COMMIT=#{git_commit}")
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build ipa --dart-define=ENABLE_SENTRY=true --dart-define=GIT_COMMIT=#{git_commit} --dart-define=SENTRY_ENVIRONMENT=app-store --split-debug-info=debug-info/ios")
|
||||
|
||||
# Upload debug symbols
|
||||
sh("cd #{ENV['PWD']}/.. && ./scripts/upload-symbols.sh ios")
|
||||
|
||||
# Upload to App Store
|
||||
upload_to_app_store(
|
||||
|
||||
@@ -0,0 +1,328 @@
|
||||
import '../media/media_backend.dart';
|
||||
import '../models/plex/plex_home_user.dart';
|
||||
import '../services/plex_auth_service.dart';
|
||||
|
||||
/// Identifier of a backend kind a [Connection] points at. Lighter-weight than
|
||||
/// [MediaBackend] for places that only care about persistence/auth shape
|
||||
/// (e.g. database column values).
|
||||
enum ConnectionKind {
|
||||
plex,
|
||||
jellyfin;
|
||||
|
||||
String get id => switch (this) {
|
||||
ConnectionKind.plex => 'plex',
|
||||
ConnectionKind.jellyfin => 'jellyfin',
|
||||
};
|
||||
|
||||
static ConnectionKind fromId(String id) => switch (id) {
|
||||
'plex' => ConnectionKind.plex,
|
||||
'jellyfin' => ConnectionKind.jellyfin,
|
||||
_ => throw ArgumentError('Unknown ConnectionKind id: $id'),
|
||||
};
|
||||
|
||||
MediaBackend get backend => switch (this) {
|
||||
ConnectionKind.plex => MediaBackend.plex,
|
||||
ConnectionKind.jellyfin => MediaBackend.jellyfin,
|
||||
};
|
||||
}
|
||||
|
||||
/// Health snapshot for a connection. Updated by the orchestrator each time a
|
||||
/// session is established or refreshed.
|
||||
enum ConnectionStatus { unknown, online, offline, authError, disabled }
|
||||
|
||||
/// A media server connection — a unit of authentication the user added.
|
||||
///
|
||||
/// A `PlexAccountConnection` carries one Plex account + its discovered servers + an
|
||||
/// optional active Home profile. A `JellyfinConnection` is a single server +
|
||||
/// user. Most users only ever add one connection.
|
||||
sealed class Connection {
|
||||
String get id;
|
||||
ConnectionKind get kind;
|
||||
String get displayName;
|
||||
ConnectionStatus get status;
|
||||
DateTime get createdAt;
|
||||
DateTime? get lastAuthenticatedAt;
|
||||
|
||||
/// Backend kind as a [MediaBackend] — for UI that branches on backend
|
||||
/// (badges, etc.). Just a passthrough to [kind.backend].
|
||||
MediaBackend get backend => kind.backend;
|
||||
|
||||
/// Primary label shown in connection-list UIs. Plex shows the active
|
||||
/// profile/account name; Jellyfin shows the server name.
|
||||
String get displayLabel;
|
||||
|
||||
/// Secondary line shown beneath [displayLabel] in connection-list UIs.
|
||||
/// Plex: server count; Jellyfin: `userName · baseUrl`. May be null when
|
||||
/// no useful subtitle exists.
|
||||
String? get displaySubtitle;
|
||||
|
||||
/// Backend-specific config payload, persisted as JSON. Each subclass
|
||||
/// defines the schema.
|
||||
Map<String, Object?> toConfigJson();
|
||||
}
|
||||
|
||||
/// A Plex account connection.
|
||||
///
|
||||
/// Fields here mirror what [PlexAuthService] gathers during PIN OAuth: an
|
||||
/// account token (long-lived), the per-device client identifier (so plex.tv
|
||||
/// doesn't see a "new device" each launch), and the optional Home user the
|
||||
/// user has switched into.
|
||||
class PlexAccountConnection extends Connection {
|
||||
@override
|
||||
final String id;
|
||||
|
||||
@override
|
||||
final ConnectionStatus status;
|
||||
|
||||
@override
|
||||
final DateTime createdAt;
|
||||
|
||||
@override
|
||||
final DateTime? lastAuthenticatedAt;
|
||||
|
||||
/// plex.tv account access token.
|
||||
final String accountToken;
|
||||
|
||||
/// Per-device client identifier. Stable across launches.
|
||||
final String clientIdentifier;
|
||||
|
||||
/// Display name shown for this connection (typically the Plex account email
|
||||
/// or username, fallback "Plex").
|
||||
final String accountLabel;
|
||||
|
||||
/// Active Home user, or `null` for the main account.
|
||||
final PlexHomeUser? activeProfile;
|
||||
|
||||
/// Servers discovered for this account (cached). Populated by the auth
|
||||
/// flow and refreshed periodically.
|
||||
final List<PlexServer> servers;
|
||||
|
||||
PlexAccountConnection({
|
||||
required this.id,
|
||||
required this.accountToken,
|
||||
required this.clientIdentifier,
|
||||
required this.accountLabel,
|
||||
this.activeProfile,
|
||||
this.servers = const [],
|
||||
this.status = ConnectionStatus.unknown,
|
||||
required this.createdAt,
|
||||
this.lastAuthenticatedAt,
|
||||
});
|
||||
|
||||
@override
|
||||
ConnectionKind get kind => ConnectionKind.plex;
|
||||
|
||||
@override
|
||||
String get displayName => activeProfile != null && activeProfile!.title.isNotEmpty
|
||||
? '${activeProfile!.title} · $accountLabel'
|
||||
: accountLabel;
|
||||
|
||||
@override
|
||||
String get displayLabel => displayName;
|
||||
|
||||
@override
|
||||
String? get displaySubtitle => servers.length == 1 ? '1 Plex server' : '${servers.length} Plex servers';
|
||||
|
||||
PlexAccountConnection copyWith({
|
||||
String? id,
|
||||
String? accountToken,
|
||||
String? clientIdentifier,
|
||||
String? accountLabel,
|
||||
PlexHomeUser? activeProfile,
|
||||
bool clearActiveProfile = false,
|
||||
List<PlexServer>? servers,
|
||||
ConnectionStatus? status,
|
||||
DateTime? createdAt,
|
||||
DateTime? lastAuthenticatedAt,
|
||||
}) {
|
||||
return PlexAccountConnection(
|
||||
id: id ?? this.id,
|
||||
accountToken: accountToken ?? this.accountToken,
|
||||
clientIdentifier: clientIdentifier ?? this.clientIdentifier,
|
||||
accountLabel: accountLabel ?? this.accountLabel,
|
||||
activeProfile: clearActiveProfile ? null : (activeProfile ?? this.activeProfile),
|
||||
servers: servers ?? this.servers,
|
||||
status: status ?? this.status,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
lastAuthenticatedAt: lastAuthenticatedAt ?? this.lastAuthenticatedAt,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, Object?> toConfigJson() {
|
||||
return {
|
||||
'accountToken': accountToken,
|
||||
'clientIdentifier': clientIdentifier,
|
||||
'accountLabel': accountLabel,
|
||||
'activeProfile': activeProfile?.toJson(),
|
||||
'servers': servers.map((s) => s.toJson()).toList(),
|
||||
};
|
||||
}
|
||||
|
||||
factory PlexAccountConnection.fromConfigJson({
|
||||
required String id,
|
||||
required Map<String, Object?> json,
|
||||
required ConnectionStatus status,
|
||||
required DateTime createdAt,
|
||||
DateTime? lastAuthenticatedAt,
|
||||
}) {
|
||||
final profileJson = json['activeProfile'];
|
||||
final activeProfile = profileJson is Map<String, dynamic> ? PlexHomeUser.fromJson(profileJson) : null;
|
||||
final serversJson = json['servers'];
|
||||
final servers = serversJson is List
|
||||
? serversJson.whereType<Map<String, dynamic>>().map(PlexServer.fromJson).toList()
|
||||
: <PlexServer>[];
|
||||
return PlexAccountConnection(
|
||||
id: id,
|
||||
accountToken: json['accountToken'] as String? ?? '',
|
||||
clientIdentifier: json['clientIdentifier'] as String? ?? '',
|
||||
accountLabel: json['accountLabel'] as String? ?? 'Plex',
|
||||
activeProfile: activeProfile,
|
||||
servers: servers,
|
||||
status: status,
|
||||
createdAt: createdAt,
|
||||
lastAuthenticatedAt: lastAuthenticatedAt,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// A single-server Jellyfin connection.
|
||||
class JellyfinConnection extends Connection {
|
||||
@override
|
||||
final String id;
|
||||
|
||||
@override
|
||||
final ConnectionStatus status;
|
||||
|
||||
@override
|
||||
final DateTime createdAt;
|
||||
|
||||
@override
|
||||
final DateTime? lastAuthenticatedAt;
|
||||
|
||||
/// Server base URL, no trailing slash. e.g. `https://jellyfin.home.lan`.
|
||||
final String baseUrl;
|
||||
|
||||
/// Server's reported name (System/Info).
|
||||
final String serverName;
|
||||
|
||||
/// Server's machine identifier (System/Info `Id`).
|
||||
final String serverMachineId;
|
||||
|
||||
/// Authenticated Jellyfin user id (UUID).
|
||||
final String userId;
|
||||
|
||||
/// Authenticated user's display name.
|
||||
final String userName;
|
||||
|
||||
/// Long-lived access token from `/Users/AuthenticateByName`.
|
||||
final String accessToken;
|
||||
|
||||
/// Per-device client identifier (same value sent in the
|
||||
/// `Authorization: MediaBrowser DeviceId="..."` header).
|
||||
final String deviceId;
|
||||
|
||||
/// Whether this user is a Jellyfin admin (`/Users/{id}.Policy.IsAdministrator`).
|
||||
/// Captured at auth time so the UI can gate admin-only entries (delete,
|
||||
/// match/unmatch, edit metadata) without an extra round-trip.
|
||||
final bool isAdministrator;
|
||||
|
||||
JellyfinConnection({
|
||||
required this.id,
|
||||
required this.baseUrl,
|
||||
required this.serverName,
|
||||
required this.serverMachineId,
|
||||
required this.userId,
|
||||
required this.userName,
|
||||
required this.accessToken,
|
||||
required this.deviceId,
|
||||
this.isAdministrator = false,
|
||||
this.status = ConnectionStatus.unknown,
|
||||
required this.createdAt,
|
||||
this.lastAuthenticatedAt,
|
||||
});
|
||||
|
||||
@override
|
||||
ConnectionKind get kind => ConnectionKind.jellyfin;
|
||||
|
||||
@override
|
||||
String get displayName => '$userName · $serverName';
|
||||
|
||||
@override
|
||||
String get displayLabel => serverName;
|
||||
|
||||
@override
|
||||
String? get displaySubtitle => '$userName · ${_truncateUrl(baseUrl)}';
|
||||
|
||||
static String _truncateUrl(String url) {
|
||||
if (url.length <= 40) return url;
|
||||
return '${url.substring(0, 37)}…';
|
||||
}
|
||||
|
||||
JellyfinConnection copyWith({
|
||||
String? id,
|
||||
String? baseUrl,
|
||||
String? serverName,
|
||||
String? serverMachineId,
|
||||
String? userId,
|
||||
String? userName,
|
||||
String? accessToken,
|
||||
String? deviceId,
|
||||
bool? isAdministrator,
|
||||
ConnectionStatus? status,
|
||||
DateTime? createdAt,
|
||||
DateTime? lastAuthenticatedAt,
|
||||
}) {
|
||||
return JellyfinConnection(
|
||||
id: id ?? this.id,
|
||||
baseUrl: baseUrl ?? this.baseUrl,
|
||||
serverName: serverName ?? this.serverName,
|
||||
serverMachineId: serverMachineId ?? this.serverMachineId,
|
||||
userId: userId ?? this.userId,
|
||||
userName: userName ?? this.userName,
|
||||
accessToken: accessToken ?? this.accessToken,
|
||||
deviceId: deviceId ?? this.deviceId,
|
||||
isAdministrator: isAdministrator ?? this.isAdministrator,
|
||||
status: status ?? this.status,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
lastAuthenticatedAt: lastAuthenticatedAt ?? this.lastAuthenticatedAt,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, Object?> toConfigJson() {
|
||||
return {
|
||||
'baseUrl': baseUrl,
|
||||
'serverName': serverName,
|
||||
'serverMachineId': serverMachineId,
|
||||
'userId': userId,
|
||||
'userName': userName,
|
||||
'accessToken': accessToken,
|
||||
'deviceId': deviceId,
|
||||
'isAdministrator': isAdministrator,
|
||||
};
|
||||
}
|
||||
|
||||
factory JellyfinConnection.fromConfigJson({
|
||||
required String id,
|
||||
required Map<String, Object?> json,
|
||||
required ConnectionStatus status,
|
||||
required DateTime createdAt,
|
||||
DateTime? lastAuthenticatedAt,
|
||||
}) {
|
||||
return JellyfinConnection(
|
||||
id: id,
|
||||
baseUrl: json['baseUrl'] as String? ?? '',
|
||||
serverName: json['serverName'] as String? ?? 'Jellyfin',
|
||||
serverMachineId: json['serverMachineId'] as String? ?? '',
|
||||
userId: json['userId'] as String? ?? '',
|
||||
userName: json['userName'] as String? ?? '',
|
||||
accessToken: json['accessToken'] as String? ?? '',
|
||||
deviceId: json['deviceId'] as String? ?? '',
|
||||
isAdministrator: json['isAdministrator'] as bool? ?? false,
|
||||
status: status,
|
||||
createdAt: createdAt,
|
||||
lastAuthenticatedAt: lastAuthenticatedAt,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import 'connection.dart';
|
||||
|
||||
/// Backend-neutral auth service interface. Each backend's implementation
|
||||
/// (`PlexConnectionAuthService`, `JellyfinConnectionAuthService`) drives its
|
||||
/// own UX (PIN flow vs. password) but produces the same opaque
|
||||
/// [Connection] record at the end.
|
||||
abstract class ConnectionAuthService {
|
||||
/// Best-effort check that an existing token still works. Returns false on
|
||||
/// 401/403; throws on transport failures the caller should retry.
|
||||
Future<bool> validate(Connection connection);
|
||||
|
||||
/// Refresh whatever side-channel state belongs to a connection — for Plex
|
||||
/// that's the discovered server list and Home users; for Jellyfin it's a
|
||||
/// no-op once auth has succeeded. Returns the updated connection.
|
||||
Future<Connection> refresh(Connection connection);
|
||||
|
||||
/// Revoke the token server-side and forget local credentials. The caller
|
||||
/// is responsible for removing the row from [ConnectionRegistry].
|
||||
Future<void> signOut(Connection connection);
|
||||
}
|
||||
@@ -0,0 +1,304 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import '../models/plex/plex_home.dart';
|
||||
import '../models/plex/plex_home_user.dart';
|
||||
import '../profiles/profile.dart';
|
||||
import '../profiles/profile_registry.dart';
|
||||
import '../services/plex_auth_service.dart';
|
||||
import '../services/server_registry.dart';
|
||||
import '../services/storage_service.dart';
|
||||
import '../utils/app_logger.dart';
|
||||
import 'connection.dart';
|
||||
import 'connection_registry.dart';
|
||||
|
||||
/// One-shot helpers that bridge between the legacy single-Plex-account
|
||||
/// SharedPreferences state (`StorageService.plexToken` +
|
||||
/// `currentUserUUID` + `homeUsersCache` + `ServerRegistry.getServers()`)
|
||||
/// and the new [ConnectionRegistry] world.
|
||||
///
|
||||
/// Plex Home users are NOT persisted here — the bootstrap copies the
|
||||
/// legacy `homeUsersCache` into the per-connection
|
||||
/// `plex_home_users_{connectionId}` SharedPreferences slot so
|
||||
/// [PlexHomeService] picks it up on cold start.
|
||||
class ConnectionBootstrap {
|
||||
ConnectionBootstrap({
|
||||
required this.storage,
|
||||
required this.connectionRegistry,
|
||||
required this.serverRegistry,
|
||||
required this.profileRegistry,
|
||||
Future<List<PlexHomeUser>> Function(String accountToken)? plexHomeUserFetcher,
|
||||
Future<Map<String, dynamic>> Function(String accountToken)? plexUserInfoFetcher,
|
||||
}) : _plexHomeUserFetcher = plexHomeUserFetcher ?? _fetchPlexHomeUsers,
|
||||
_plexUserInfoFetcher = plexUserInfoFetcher ?? _fetchPlexUserInfo;
|
||||
|
||||
final StorageService storage;
|
||||
final ConnectionRegistry connectionRegistry;
|
||||
final ServerRegistry serverRegistry;
|
||||
final ProfileRegistry profileRegistry;
|
||||
final Future<List<PlexHomeUser>> Function(String accountToken) _plexHomeUserFetcher;
|
||||
final Future<Map<String, dynamic>> Function(String accountToken) _plexUserInfoFetcher;
|
||||
|
||||
static const String _keyProfileMigrationV1Done = 'profile_migration_v1_done';
|
||||
|
||||
/// Run all idempotent boot-time migrations. Best-effort — errors are
|
||||
/// logged but never thrown.
|
||||
Future<void> run() async {
|
||||
await seedFromDevTokenDefine();
|
||||
final hadLegacyPlexToken = (storage.getPlexToken() ?? '').isNotEmpty;
|
||||
final hadLegacyProfileState = _hasLegacyProfileState();
|
||||
final migratedAccount = await migrateLegacyPlexAccount();
|
||||
final account = await _firstPlexAccount(migratedAccount);
|
||||
final alreadyMigrated = storage.prefs.getBool(_keyProfileMigrationV1Done) ?? false;
|
||||
if (!alreadyMigrated) {
|
||||
if (account == null && (hadLegacyPlexToken || hadLegacyProfileState)) {
|
||||
appLogger.w('Migration: legacy profile state present but Plex account was not migrated; will retry later');
|
||||
return;
|
||||
}
|
||||
// Drop any plex_home rows left over from the pre-refactor data
|
||||
// model — Plex Home users are now fetched live, never persisted.
|
||||
await profileRegistry.dropAllPlexHomeRows();
|
||||
if (account != null) {
|
||||
final prepared = await _preparePlexVirtualProfile(account);
|
||||
if (!prepared) {
|
||||
if (migratedAccount != null && hadLegacyPlexToken) {
|
||||
await connectionRegistry.remove(migratedAccount.id);
|
||||
}
|
||||
appLogger.w('Migration: could not hydrate Plex Home profiles for ${account.id}; will retry later');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (hadLegacyPlexToken) {
|
||||
await storage.clearLegacyPlexToken();
|
||||
}
|
||||
await storage.clearServersList();
|
||||
await storage.prefs.setBool(_keyProfileMigrationV1Done, true);
|
||||
} else {
|
||||
await storage.clearServersList();
|
||||
await _recoverLegacyProfilePromotionIfNeeded(account);
|
||||
await _migrateLegacyPlexHomeUsersCacheForExistingAccount(account);
|
||||
}
|
||||
}
|
||||
|
||||
bool _hasLegacyProfileState() {
|
||||
return (storage.getCurrentUserUUID() ?? '').isNotEmpty ||
|
||||
(storage.prefs.getString('home_users_cache') ?? '').isNotEmpty;
|
||||
}
|
||||
|
||||
/// Screenshot automation injects a Plex token via the `PLEX_TOKEN`
|
||||
/// dart-define so the app boots already-signed-in. Inserts a
|
||||
/// [PlexAccountConnection] directly when the env var is non-empty AND
|
||||
/// the registry doesn't already have a Plex account, fetching the user
|
||||
/// info + servers like the auth screen does. No-op in normal builds.
|
||||
Future<void> seedFromDevTokenDefine() async {
|
||||
const devToken = String.fromEnvironment('PLEX_TOKEN');
|
||||
if (devToken.isEmpty) return;
|
||||
final existing = await connectionRegistry.list();
|
||||
if (existing.whereType<PlexAccountConnection>().isNotEmpty) return;
|
||||
|
||||
try {
|
||||
final auth = await PlexAuthService.create();
|
||||
try {
|
||||
final info = await auth.getUserInfo(devToken);
|
||||
final servers = await auth.fetchServers(devToken);
|
||||
final clientId = await storage.getOrCreateClientIdentifier();
|
||||
final conn = PlexAccountConnection(
|
||||
id: 'plex.$clientId',
|
||||
accountToken: devToken,
|
||||
clientIdentifier: clientId,
|
||||
accountLabel: (info['username'] as String?) ?? (info['email'] as String?) ?? 'Plex',
|
||||
servers: servers,
|
||||
createdAt: DateTime.now(),
|
||||
lastAuthenticatedAt: DateTime.now(),
|
||||
);
|
||||
await connectionRegistry.upsert(conn);
|
||||
appLogger.i('Seeded Plex account from PLEX_TOKEN dart-define as ${conn.id}');
|
||||
} finally {
|
||||
auth.dispose();
|
||||
}
|
||||
} catch (e, st) {
|
||||
appLogger.w('PLEX_TOKEN seed failed', error: e, stackTrace: st);
|
||||
}
|
||||
}
|
||||
|
||||
/// If a legacy Plex token sits in [StorageService] without a corresponding
|
||||
/// row in [ConnectionRegistry], wrap it as a [PlexAccountConnection] and
|
||||
/// insert. Best-effort: errors are logged but never thrown.
|
||||
Future<PlexAccountConnection?> migrateLegacyPlexAccount() async {
|
||||
final token = storage.getPlexToken();
|
||||
if (token == null || token.isEmpty) return null;
|
||||
|
||||
final existing = await connectionRegistry.list();
|
||||
final alreadyMigrated = existing
|
||||
.whereType<PlexAccountConnection>()
|
||||
.where((c) => c.accountToken == token)
|
||||
.firstOrNull;
|
||||
if (alreadyMigrated != null) {
|
||||
return alreadyMigrated;
|
||||
}
|
||||
|
||||
try {
|
||||
final clientId = await storage.getOrCreateClientIdentifier();
|
||||
final servers = await serverRegistry.getServers();
|
||||
|
||||
String accountLabel = 'Plex';
|
||||
String accountUuid = '';
|
||||
try {
|
||||
final info = await _plexUserInfoFetcher(token);
|
||||
accountLabel = (info['username'] as String?) ?? (info['email'] as String?) ?? 'Plex';
|
||||
accountUuid = (info['uuid'] as String?)?.trim() ?? '';
|
||||
} catch (e) {
|
||||
appLogger.d('Plex migration: account label lookup failed (using fallback): $e');
|
||||
}
|
||||
|
||||
final conn = PlexAccountConnection(
|
||||
id: 'plex.${accountUuid.isNotEmpty ? accountUuid : clientId}',
|
||||
accountToken: token,
|
||||
clientIdentifier: clientId,
|
||||
accountLabel: accountLabel,
|
||||
servers: servers,
|
||||
createdAt: DateTime.now(),
|
||||
lastAuthenticatedAt: DateTime.now(),
|
||||
);
|
||||
await connectionRegistry.upsert(conn);
|
||||
appLogger.i('Migrated legacy Plex account into ConnectionRegistry as ${conn.id}');
|
||||
return conn;
|
||||
} catch (e, st) {
|
||||
appLogger.w('Plex account migration failed', error: e, stackTrace: st);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// Hydrate Plex Home users for [account] and select a virtual Plex Home
|
||||
/// profile. Plex users are never persisted as local Plezy profiles.
|
||||
Future<bool> _preparePlexVirtualProfile(PlexAccountConnection account) async {
|
||||
final copied = await _migrateLegacyPlexHomeUsersCache(account.id);
|
||||
var users = copied ? _readPlexHomeUsersCache(account.id) : null;
|
||||
users ??= await _fetchAndCachePlexHomeUsers(account);
|
||||
final hydratedUsers = users;
|
||||
if (hydratedUsers.isEmpty) return false;
|
||||
|
||||
final legacyActiveUuid = storage.getCurrentUserUUID();
|
||||
PlexHomeUser selected;
|
||||
if (legacyActiveUuid != null && legacyActiveUuid.isNotEmpty) {
|
||||
selected = hydratedUsers.firstWhere(
|
||||
(u) => u.uuid == legacyActiveUuid,
|
||||
orElse: () => _preferredPlexHomeUser(hydratedUsers),
|
||||
);
|
||||
if (selected.uuid != legacyActiveUuid) {
|
||||
appLogger.w('Migration: legacy Plex Home UUID $legacyActiveUuid not found; using ${selected.uuid} instead');
|
||||
}
|
||||
} else {
|
||||
selected = _preferredPlexHomeUser(hydratedUsers);
|
||||
}
|
||||
|
||||
final activeProfileId = plexHomeProfileId(accountConnectionId: account.id, homeUserUuid: selected.uuid);
|
||||
await storage.setActiveProfileId(activeProfileId);
|
||||
await storage.clearCurrentUserUUID();
|
||||
await Future.wait([storage.prefs.remove('home_users_cache'), storage.prefs.remove('home_users_cache_expiry')]);
|
||||
appLogger.i('Migration: selected Plex Home profile ${selected.displayName} → $activeProfileId');
|
||||
return true;
|
||||
}
|
||||
|
||||
PlexHomeUser _preferredPlexHomeUser(List<PlexHomeUser> users) {
|
||||
return users.firstWhere((u) => u.admin, orElse: () => users.first);
|
||||
}
|
||||
|
||||
Future<bool> _migrateLegacyPlexHomeUsersCache(String connectionId) async {
|
||||
final raw = storage.prefs.getString('home_users_cache');
|
||||
if (raw == null || raw.isEmpty) return false;
|
||||
|
||||
try {
|
||||
final decoded = jsonDecode(raw);
|
||||
if (decoded is! Map<String, dynamic>) return false;
|
||||
final home = PlexHome.fromJson(decoded);
|
||||
if (home.users.isEmpty) return false;
|
||||
await storage.savePlexHomeUsersCache(connectionId, home.users.map((u) => u.toJson()).toList());
|
||||
appLogger.i('Migration: copied ${home.users.length} Plex Home users into cache for $connectionId');
|
||||
return true;
|
||||
} catch (e, st) {
|
||||
appLogger.w('Plex Home cache migration failed', error: e, stackTrace: st);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
List<PlexHomeUser>? _readPlexHomeUsersCache(String connectionId) {
|
||||
final raw = storage.getPlexHomeUsersCacheJson(connectionId);
|
||||
if (raw == null || raw.isEmpty) return null;
|
||||
try {
|
||||
final decoded = jsonDecode(raw);
|
||||
if (decoded is! List) return null;
|
||||
return decoded.whereType<Map<String, dynamic>>().map(PlexHomeUser.fromJson).toList();
|
||||
} catch (e, st) {
|
||||
appLogger.w('Migration: failed to read Plex Home cache for $connectionId', error: e, stackTrace: st);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<PlexHomeUser>> _fetchAndCachePlexHomeUsers(PlexAccountConnection account) async {
|
||||
try {
|
||||
final users = await _plexHomeUserFetcher(account.accountToken);
|
||||
if (users.isNotEmpty) {
|
||||
await storage.savePlexHomeUsersCache(account.id, users.map((u) => u.toJson()).toList());
|
||||
appLogger.i('Migration: fetched ${users.length} Plex Home users for ${account.id}');
|
||||
}
|
||||
return users;
|
||||
} catch (e, st) {
|
||||
appLogger.w('Migration: Plex Home fetch failed for ${account.id}', error: e, stackTrace: st);
|
||||
return const [];
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _migrateLegacyPlexHomeUsersCacheForExistingAccount(PlexAccountConnection? account) async {
|
||||
if (storage.prefs.getString('home_users_cache') == null) return;
|
||||
var target = account;
|
||||
if (target == null) {
|
||||
final connections = await connectionRegistry.list();
|
||||
for (final conn in connections) {
|
||||
if (conn is PlexAccountConnection) {
|
||||
target = conn;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (target == null) return;
|
||||
final copied = await _migrateLegacyPlexHomeUsersCache(target.id);
|
||||
if (copied) {
|
||||
await Future.wait([storage.prefs.remove('home_users_cache'), storage.prefs.remove('home_users_cache_expiry')]);
|
||||
}
|
||||
}
|
||||
|
||||
Future<PlexAccountConnection?> _firstPlexAccount(PlexAccountConnection? preferred) async {
|
||||
if (preferred != null) return preferred;
|
||||
final connections = await connectionRegistry.list();
|
||||
for (final conn in connections) {
|
||||
if (conn is PlexAccountConnection) return conn;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Future<void> _recoverLegacyProfilePromotionIfNeeded(PlexAccountConnection? account) async {
|
||||
if (!_hasLegacyProfileState()) return;
|
||||
final target = await _firstPlexAccount(account);
|
||||
if (target == null) return;
|
||||
await _preparePlexVirtualProfile(target);
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<PlexHomeUser>> _fetchPlexHomeUsers(String accountToken) async {
|
||||
final auth = await PlexAuthService.create();
|
||||
try {
|
||||
final home = await auth.getHomeUsers(accountToken);
|
||||
return home.users;
|
||||
} finally {
|
||||
auth.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
Future<Map<String, dynamic>> _fetchPlexUserInfo(String accountToken) async {
|
||||
final auth = await PlexAuthService.create();
|
||||
try {
|
||||
return await auth.getUserInfo(accountToken);
|
||||
} finally {
|
||||
auth.dispose();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
import '../database/app_database.dart';
|
||||
import '../services/credential_vault.dart';
|
||||
import '../utils/app_logger.dart';
|
||||
import 'connection.dart';
|
||||
|
||||
/// CRUD over the persisted [Connections] table. The registry is the source
|
||||
/// of truth for which connections the user has added; the runtime
|
||||
/// `MultiServerManager` populates per-server clients from these records.
|
||||
///
|
||||
/// Single-connection users get a default automatically — power users with
|
||||
/// multiple connections can override it via [setDefault].
|
||||
class ConnectionRegistry {
|
||||
ConnectionRegistry(this._db);
|
||||
|
||||
final AppDatabase _db;
|
||||
|
||||
/// Emits the current set of connections after every mutation. Drift's
|
||||
/// `watch()` provides this for free.
|
||||
Stream<List<Connection>> watchConnections() {
|
||||
return (_db.select(_db.connections)..orderBy([(t) => OrderingTerm.asc(t.createdAt)])).watch().asyncMap(
|
||||
(rows) async => (await Future.wait(rows.map(_rowToConnection))).whereType<Connection>().toList(),
|
||||
);
|
||||
}
|
||||
|
||||
/// One-shot fetch of all stored connections.
|
||||
Future<List<Connection>> list() async {
|
||||
final rows = await (_db.select(_db.connections)..orderBy([(t) => OrderingTerm.asc(t.createdAt)])).get();
|
||||
return (await Future.wait(rows.map(_rowToConnection))).whereType<Connection>().toList();
|
||||
}
|
||||
|
||||
/// Lookup a connection by id.
|
||||
Future<Connection?> get(String id) async {
|
||||
final row = await (_db.select(_db.connections)..where((t) => t.id.equals(id))).getSingleOrNull();
|
||||
if (row == null) return null;
|
||||
return _rowToConnection(row);
|
||||
}
|
||||
|
||||
/// Returns the user's preferred connection — either the row marked
|
||||
/// [Connections.isDefault], or the only row if exactly one exists, or
|
||||
/// null when no connections are stored.
|
||||
Future<Connection?> getDefault() async {
|
||||
final rows = await _db.select(_db.connections).get();
|
||||
if (rows.isEmpty) return null;
|
||||
final flagged = rows.firstWhereOrNull((r) => r.isDefault);
|
||||
final picked = flagged ?? (rows.length == 1 ? rows.single : null);
|
||||
return picked == null ? null : _rowToConnection(picked);
|
||||
}
|
||||
|
||||
/// Insert or replace [connection]. If this is the first stored connection
|
||||
/// it is automatically marked default; re-upserting an existing row keeps
|
||||
/// the row's current `isDefault` (so token/metadata refreshes don't clear
|
||||
/// the default flag).
|
||||
Future<void> upsert(Connection connection) async {
|
||||
final existing = await (_db.select(_db.connections)..where((t) => t.id.equals(connection.id))).getSingleOrNull();
|
||||
final bool isDefault;
|
||||
if (existing != null) {
|
||||
isDefault = existing.isDefault;
|
||||
} else {
|
||||
final any =
|
||||
await (_db.selectOnly(_db.connections)
|
||||
..addColumns([_db.connections.id])
|
||||
..limit(1))
|
||||
.getSingleOrNull();
|
||||
isDefault = any == null;
|
||||
}
|
||||
final protectedConfig = await CredentialVault.protectConnectionConfig(
|
||||
connection.kind.id,
|
||||
connection.toConfigJson(),
|
||||
);
|
||||
final row = ConnectionsCompanion(
|
||||
id: Value(connection.id),
|
||||
kind: Value(connection.kind.id),
|
||||
displayName: Value(connection.displayName),
|
||||
configJson: Value(jsonEncode(protectedConfig)),
|
||||
isDefault: Value(isDefault),
|
||||
createdAt: Value(connection.createdAt.millisecondsSinceEpoch),
|
||||
lastAuthenticatedAt: Value(connection.lastAuthenticatedAt?.millisecondsSinceEpoch),
|
||||
);
|
||||
await _db.into(_db.connections).insertOnConflictUpdate(row);
|
||||
appLogger.d('ConnectionRegistry: upserted ${connection.kind.id}/${connection.id}');
|
||||
}
|
||||
|
||||
/// Remove a stored connection. If the removed row was the default, the
|
||||
/// oldest remaining connection (if any) becomes default.
|
||||
Future<void> remove(String id) async {
|
||||
await (_db.delete(_db.connections)..where((t) => t.id.equals(id))).go();
|
||||
final remaining = await (_db.select(_db.connections)..orderBy([(t) => OrderingTerm.asc(t.createdAt)])).get();
|
||||
if (remaining.isNotEmpty && !remaining.any((r) => r.isDefault)) {
|
||||
await (_db.update(
|
||||
_db.connections,
|
||||
)..where((t) => t.id.equals(remaining.first.id))).write(const ConnectionsCompanion(isDefault: Value(true)));
|
||||
}
|
||||
appLogger.d('ConnectionRegistry: removed $id');
|
||||
}
|
||||
|
||||
/// Set [id] as the default connection. Clears the flag on all others.
|
||||
Future<void> setDefault(String id) async {
|
||||
await _db.transaction(() async {
|
||||
await _db.update(_db.connections).write(const ConnectionsCompanion(isDefault: Value(false)));
|
||||
await (_db.update(
|
||||
_db.connections,
|
||||
)..where((t) => t.id.equals(id))).write(const ConnectionsCompanion(isDefault: Value(true)));
|
||||
});
|
||||
}
|
||||
|
||||
/// Update only the auth-related metadata on an existing row (token,
|
||||
/// `lastAuthenticatedAt`). Used by the auth flow after a successful
|
||||
/// silent refresh without touching the rest of the config.
|
||||
Future<void> recordAuthSuccess(String id, DateTime at) async {
|
||||
await (_db.update(_db.connections)..where((t) => t.id.equals(id))).write(
|
||||
ConnectionsCompanion(lastAuthenticatedAt: Value(at.millisecondsSinceEpoch)),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> clear() async {
|
||||
await _db.delete(_db.connections).go();
|
||||
}
|
||||
|
||||
/// All Plex accounts in insertion order. Convenience over
|
||||
/// `(await list()).whereType<PlexAccountConnection>()` — cuts ~3 lines from
|
||||
/// every caller that needs to filter by backend.
|
||||
Future<List<PlexAccountConnection>> listPlexAccounts() async {
|
||||
final all = await list();
|
||||
return all.whereType<PlexAccountConnection>().toList();
|
||||
}
|
||||
|
||||
/// All Jellyfin connections in insertion order. Symmetric helper to
|
||||
/// [listPlexAccounts].
|
||||
Future<List<JellyfinConnection>> listJellyfin() async {
|
||||
final all = await list();
|
||||
return all.whereType<JellyfinConnection>().toList();
|
||||
}
|
||||
|
||||
/// Lookup a [PlexAccountConnection] by id. Returns `null` if no row
|
||||
/// matches OR the row exists but isn't a Plex account.
|
||||
Future<PlexAccountConnection?> getPlexAccount(String id) async {
|
||||
final c = await get(id);
|
||||
return c is PlexAccountConnection ? c : null;
|
||||
}
|
||||
|
||||
/// Lookup a [JellyfinConnection] by id. Returns `null` if no row matches
|
||||
/// OR the row exists but isn't a Jellyfin connection.
|
||||
Future<JellyfinConnection?> getJellyfin(String id) async {
|
||||
final c = await get(id);
|
||||
return c is JellyfinConnection ? c : null;
|
||||
}
|
||||
|
||||
Future<Connection?> _rowToConnection(ConnectionRow row) async {
|
||||
try {
|
||||
final json = jsonDecode(row.configJson) as Map<String, dynamic>;
|
||||
final kind = ConnectionKind.fromId(row.kind);
|
||||
final revealed = await CredentialVault.revealConnectionConfig(kind.id, json);
|
||||
final createdAt = DateTime.fromMillisecondsSinceEpoch(row.createdAt);
|
||||
final lastAuth = row.lastAuthenticatedAt == null
|
||||
? null
|
||||
: DateTime.fromMillisecondsSinceEpoch(row.lastAuthenticatedAt!);
|
||||
final connection = switch (kind) {
|
||||
ConnectionKind.plex => PlexAccountConnection.fromConfigJson(
|
||||
id: row.id,
|
||||
json: revealed.config,
|
||||
status: ConnectionStatus.unknown,
|
||||
createdAt: createdAt,
|
||||
lastAuthenticatedAt: lastAuth,
|
||||
),
|
||||
ConnectionKind.jellyfin => JellyfinConnection.fromConfigJson(
|
||||
id: row.id,
|
||||
json: revealed.config,
|
||||
status: ConnectionStatus.unknown,
|
||||
createdAt: createdAt,
|
||||
lastAuthenticatedAt: lastAuth,
|
||||
),
|
||||
};
|
||||
if (revealed.migrated) {
|
||||
await upsert(connection);
|
||||
}
|
||||
return connection;
|
||||
} catch (e, st) {
|
||||
appLogger.e('ConnectionRegistry: failed to decode connection ${row.id}', error: e, stackTrace: st);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,335 @@
|
||||
// Generated from USB HID Usage Tables — do not edit by hand.
|
||||
|
||||
/// Human-readable labels for physical keyboard keys, keyed by USB HID usage code.
|
||||
const hidKeyLabels = <int, String>{
|
||||
// Special
|
||||
0x00000010: 'Hyper',
|
||||
0x00000011: 'Super',
|
||||
0x00000012: 'Fn',
|
||||
0x00000013: 'Fn Lock',
|
||||
0x00000014: 'Suspend',
|
||||
0x00000015: 'Resume',
|
||||
0x00000016: 'Turbo',
|
||||
0x00000017: 'Privacy Screen Toggle',
|
||||
0x00000018: 'Microphone Mute',
|
||||
// Generic Desktop
|
||||
0x00010082: 'Sleep',
|
||||
0x00010083: 'Wake Up',
|
||||
0x000100b5: 'Display Toggle',
|
||||
// Game Buttons
|
||||
0x0005ff01: 'Game Button 1',
|
||||
0x0005ff02: 'Game Button 2',
|
||||
0x0005ff03: 'Game Button 3',
|
||||
0x0005ff04: 'Game Button 4',
|
||||
0x0005ff05: 'Game Button 5',
|
||||
0x0005ff06: 'Game Button 6',
|
||||
0x0005ff07: 'Game Button 7',
|
||||
0x0005ff08: 'Game Button 8',
|
||||
0x0005ff09: 'Game Button 9',
|
||||
0x0005ff0a: 'Game Button 10',
|
||||
0x0005ff0b: 'Game Button 11',
|
||||
0x0005ff0c: 'Game Button 12',
|
||||
0x0005ff0d: 'Game Button 13',
|
||||
0x0005ff0e: 'Game Button 14',
|
||||
0x0005ff0f: 'Game Button 15',
|
||||
0x0005ff10: 'Game Button 16',
|
||||
0x0005ff11: 'Game Button A',
|
||||
0x0005ff12: 'Game Button B',
|
||||
0x0005ff13: 'Game Button C',
|
||||
0x0005ff14: 'Game Button Left 1',
|
||||
0x0005ff15: 'Game Button Left 2',
|
||||
0x0005ff16: 'Game Button Mode',
|
||||
0x0005ff17: 'Game Button Right 1',
|
||||
0x0005ff18: 'Game Button Right 2',
|
||||
0x0005ff19: 'Game Button Select',
|
||||
0x0005ff1a: 'Game Button Start',
|
||||
0x0005ff1b: 'Game Button Thumb Left',
|
||||
0x0005ff1c: 'Game Button Thumb Right',
|
||||
0x0005ff1d: 'Game Button X',
|
||||
0x0005ff1e: 'Game Button Y',
|
||||
0x0005ff1f: 'Game Button Z',
|
||||
// Keyboard/Keypad
|
||||
0x00070004: 'A',
|
||||
0x00070005: 'B',
|
||||
0x00070006: 'C',
|
||||
0x00070007: 'D',
|
||||
0x00070008: 'E',
|
||||
0x00070009: 'F',
|
||||
0x0007000a: 'G',
|
||||
0x0007000b: 'H',
|
||||
0x0007000c: 'I',
|
||||
0x0007000d: 'J',
|
||||
0x0007000e: 'K',
|
||||
0x0007000f: 'L',
|
||||
0x00070010: 'M',
|
||||
0x00070011: 'N',
|
||||
0x00070012: 'O',
|
||||
0x00070013: 'P',
|
||||
0x00070014: 'Q',
|
||||
0x00070015: 'R',
|
||||
0x00070016: 'S',
|
||||
0x00070017: 'T',
|
||||
0x00070018: 'U',
|
||||
0x00070019: 'V',
|
||||
0x0007001a: 'W',
|
||||
0x0007001b: 'X',
|
||||
0x0007001c: 'Y',
|
||||
0x0007001d: 'Z',
|
||||
0x0007001e: '1',
|
||||
0x0007001f: '2',
|
||||
0x00070020: '3',
|
||||
0x00070021: '4',
|
||||
0x00070022: '5',
|
||||
0x00070023: '6',
|
||||
0x00070024: '7',
|
||||
0x00070025: '8',
|
||||
0x00070026: '9',
|
||||
0x00070027: '0',
|
||||
0x00070028: 'Enter',
|
||||
0x00070029: 'Escape',
|
||||
0x0007002a: 'Backspace',
|
||||
0x0007002b: 'Tab',
|
||||
0x0007002c: 'Space',
|
||||
0x0007002d: '-',
|
||||
0x0007002e: '=',
|
||||
0x0007002f: '[',
|
||||
0x00070030: ']',
|
||||
0x00070031: r'\',
|
||||
0x00070033: ';',
|
||||
0x00070034: "'",
|
||||
0x00070035: '`',
|
||||
0x00070036: ',',
|
||||
0x00070037: '.',
|
||||
0x00070038: '/',
|
||||
0x00070039: 'Caps Lock',
|
||||
0x0007003a: 'F1',
|
||||
0x0007003b: 'F2',
|
||||
0x0007003c: 'F3',
|
||||
0x0007003d: 'F4',
|
||||
0x0007003e: 'F5',
|
||||
0x0007003f: 'F6',
|
||||
0x00070040: 'F7',
|
||||
0x00070041: 'F8',
|
||||
0x00070042: 'F9',
|
||||
0x00070043: 'F10',
|
||||
0x00070044: 'F11',
|
||||
0x00070045: 'F12',
|
||||
0x00070046: 'Print Screen',
|
||||
0x00070047: 'Scroll Lock',
|
||||
0x00070048: 'Pause',
|
||||
0x00070049: 'Insert',
|
||||
0x0007004a: 'Home',
|
||||
0x0007004b: 'Page Up',
|
||||
0x0007004c: 'Delete',
|
||||
0x0007004d: 'End',
|
||||
0x0007004e: 'Page Down',
|
||||
0x0007004f: 'Arrow Right',
|
||||
0x00070050: 'Arrow Left',
|
||||
0x00070051: 'Arrow Down',
|
||||
0x00070052: 'Arrow Up',
|
||||
0x00070053: 'Num Lock',
|
||||
0x00070054: 'Numpad /',
|
||||
0x00070055: 'Numpad *',
|
||||
0x00070056: 'Numpad -',
|
||||
0x00070057: 'Numpad +',
|
||||
0x00070058: 'Numpad Enter',
|
||||
0x00070059: 'Numpad 1',
|
||||
0x0007005a: 'Numpad 2',
|
||||
0x0007005b: 'Numpad 3',
|
||||
0x0007005c: 'Numpad 4',
|
||||
0x0007005d: 'Numpad 5',
|
||||
0x0007005e: 'Numpad 6',
|
||||
0x0007005f: 'Numpad 7',
|
||||
0x00070060: 'Numpad 8',
|
||||
0x00070061: 'Numpad 9',
|
||||
0x00070062: 'Numpad 0',
|
||||
0x00070063: 'Numpad .',
|
||||
0x00070064: 'Intl Backslash',
|
||||
0x00070065: 'Context Menu',
|
||||
0x00070066: 'Power',
|
||||
0x00070067: 'Numpad =',
|
||||
0x00070068: 'F13',
|
||||
0x00070069: 'F14',
|
||||
0x0007006a: 'F15',
|
||||
0x0007006b: 'F16',
|
||||
0x0007006c: 'F17',
|
||||
0x0007006d: 'F18',
|
||||
0x0007006e: 'F19',
|
||||
0x0007006f: 'F20',
|
||||
0x00070070: 'F21',
|
||||
0x00070071: 'F22',
|
||||
0x00070072: 'F23',
|
||||
0x00070073: 'F24',
|
||||
0x00070074: 'Open',
|
||||
0x00070075: 'Help',
|
||||
0x00070077: 'Select',
|
||||
0x00070079: 'Again',
|
||||
0x0007007a: 'Undo',
|
||||
0x0007007b: 'Cut',
|
||||
0x0007007c: 'Copy',
|
||||
0x0007007d: 'Paste',
|
||||
0x0007007e: 'Find',
|
||||
0x0007007f: 'Volume Mute',
|
||||
0x00070080: 'Volume Up',
|
||||
0x00070081: 'Volume Down',
|
||||
0x00070085: 'Numpad ,',
|
||||
0x00070087: 'Intl Ro',
|
||||
0x00070088: 'Kana Mode',
|
||||
0x00070089: 'Intl Yen',
|
||||
0x0007008a: 'Convert',
|
||||
0x0007008b: 'Non Convert',
|
||||
0x00070090: 'Lang 1',
|
||||
0x00070091: 'Lang 2',
|
||||
0x00070092: 'Lang 3',
|
||||
0x00070093: 'Lang 4',
|
||||
0x00070094: 'Lang 5',
|
||||
0x0007009b: 'Abort',
|
||||
0x000700a3: 'Props',
|
||||
0x000700b6: 'Numpad (',
|
||||
0x000700b7: 'Numpad )',
|
||||
0x000700bb: 'Numpad Backspace',
|
||||
0x000700d0: 'Numpad Memory Store',
|
||||
0x000700d1: 'Numpad Memory Recall',
|
||||
0x000700d2: 'Numpad Memory Clear',
|
||||
0x000700d3: 'Numpad Memory Add',
|
||||
0x000700d4: 'Numpad Memory Subtract',
|
||||
0x000700d7: 'Numpad Sign Change',
|
||||
0x000700d8: 'Numpad Clear',
|
||||
0x000700d9: 'Numpad Clear Entry',
|
||||
0x000700e0: 'Ctrl',
|
||||
0x000700e1: 'Shift',
|
||||
0x000700e2: 'Alt',
|
||||
0x000700e3: 'Meta',
|
||||
0x000700e4: 'Ctrl',
|
||||
0x000700e5: 'Shift',
|
||||
0x000700e6: 'Alt',
|
||||
0x000700e7: 'Meta',
|
||||
// Consumer
|
||||
0x000c0030: 'Power',
|
||||
0x000c0032: 'Sleep',
|
||||
0x000c0040: 'Menu',
|
||||
0x000c0041: 'Menu Pick',
|
||||
0x000c0042: 'Menu Up',
|
||||
0x000c0043: 'Menu Down',
|
||||
0x000c0044: 'Menu Left',
|
||||
0x000c0045: 'Menu Right',
|
||||
0x000c0046: 'Menu Escape',
|
||||
0x000c0047: 'Menu Value Increase',
|
||||
0x000c0048: 'Menu Value Decrease',
|
||||
0x000c0060: 'Info',
|
||||
0x000c0061: 'Closed Caption',
|
||||
0x000c0062: 'Closed Caption Select',
|
||||
0x000c0063: 'VCR/TV',
|
||||
0x000c0064: 'Broadcast Mode',
|
||||
0x000c0065: 'Snapshot',
|
||||
0x000c0066: 'Still',
|
||||
0x000c0067: 'PiP Toggle',
|
||||
0x000c0068: 'PiP Swap',
|
||||
0x000c0069: 'Red Button',
|
||||
0x000c006a: 'Green Button',
|
||||
0x000c006b: 'Blue Button',
|
||||
0x000c006c: 'Yellow Button',
|
||||
0x000c006d: 'Aspect',
|
||||
0x000c006e: '3D Mode Select',
|
||||
0x000c006f: 'Brightness Up',
|
||||
0x000c0070: 'Brightness Down',
|
||||
0x000c0072: 'Brightness Toggle',
|
||||
0x000c0073: 'Brightness Min',
|
||||
0x000c0074: 'Brightness Max',
|
||||
0x000c0075: 'Brightness Auto',
|
||||
0x000c0079: 'Kbd Illum Up',
|
||||
0x000c007a: 'Kbd Illum Down',
|
||||
0x000c0082: 'Mode Step',
|
||||
0x000c0083: 'Recall Last',
|
||||
0x000c0084: 'Enter Channel',
|
||||
0x000c0085: 'Order Movie',
|
||||
0x000c0086: 'Channel',
|
||||
0x000c0088: 'Media Computer',
|
||||
0x000c0089: 'Media TV',
|
||||
0x000c008a: 'Media WWW',
|
||||
0x000c008b: 'Media DVD',
|
||||
0x000c008c: 'Media Telephone',
|
||||
0x000c008d: 'Program Guide',
|
||||
0x000c008e: 'Media Video Phone',
|
||||
0x000c008f: 'Media Games',
|
||||
0x000c0090: 'Media Messages',
|
||||
0x000c0091: 'Media CD',
|
||||
0x000c0092: 'Media VCR',
|
||||
0x000c0093: 'Media Tuner',
|
||||
0x000c0094: 'Quit',
|
||||
0x000c0095: 'Help',
|
||||
0x000c0096: 'Media Tape',
|
||||
0x000c0097: 'Media Cable',
|
||||
0x000c0098: 'Media Satellite',
|
||||
0x000c0099: 'Media Security',
|
||||
0x000c009a: 'Media Home',
|
||||
0x000c009b: 'Media Call',
|
||||
0x000c009c: 'Channel Up',
|
||||
0x000c009d: 'Channel Down',
|
||||
0x000c009e: 'Media SAP',
|
||||
0x000c00b0: 'Play',
|
||||
0x000c00b1: 'Pause',
|
||||
0x000c00b2: 'Record',
|
||||
0x000c00b3: 'Fast Forward',
|
||||
0x000c00b4: 'Rewind',
|
||||
0x000c00b5: 'Next Track',
|
||||
0x000c00b6: 'Previous Track',
|
||||
0x000c00b7: 'Stop',
|
||||
0x000c00b8: 'Eject',
|
||||
0x000c00b9: 'Random Play',
|
||||
0x000c00ba: 'Select Disc',
|
||||
0x000c00bb: 'Enter Disc',
|
||||
0x000c00bc: 'Repeat',
|
||||
0x000c00c0: 'Frame Forward',
|
||||
0x000c00c1: 'Frame Back',
|
||||
0x000c00cc: 'Stop/Eject',
|
||||
0x000c00cd: 'Play/Pause',
|
||||
0x000c00ce: 'Play/Skip',
|
||||
0x000c00cf: 'Voice Command',
|
||||
0x000c00e0: 'Volume',
|
||||
0x000c00e2: 'Mute',
|
||||
0x000c00e5: 'Bass Boost',
|
||||
0x000c00e6: 'Surround Mode',
|
||||
0x000c00e7: 'Loudness',
|
||||
0x000c00e9: 'Volume Up',
|
||||
0x000c00ea: 'Volume Down',
|
||||
0x000c0183: 'Media Select',
|
||||
0x000c0184: 'Launch Word Processor',
|
||||
0x000c0186: 'Launch Spreadsheet',
|
||||
0x000c018a: 'Launch Mail',
|
||||
0x000c018d: 'Launch Contacts',
|
||||
0x000c018e: 'Launch Calendar',
|
||||
0x000c0192: 'Launch Calculator',
|
||||
0x000c0194: 'Launch File Browser',
|
||||
0x000c0196: 'Launch Browser',
|
||||
0x000c019c: 'Log Off',
|
||||
0x000c019e: 'Lock Screen',
|
||||
0x000c019f: 'Launch Control Panel',
|
||||
0x000c01a2: 'Select Task',
|
||||
0x000c01a7: 'Launch Documents',
|
||||
0x000c01ab: 'Spell Check',
|
||||
0x000c01ae: 'Launch Keyboard Layout',
|
||||
0x000c01b1: 'Launch Screen Saver',
|
||||
0x000c01b7: 'Launch Audio Browser',
|
||||
0x000c01cb: 'Launch Assistant',
|
||||
0x000c0201: 'New',
|
||||
0x000c0203: 'Close',
|
||||
0x000c0207: 'Save',
|
||||
0x000c0208: 'Print',
|
||||
0x000c0221: 'Browser Search',
|
||||
0x000c0223: 'Browser Home',
|
||||
0x000c0224: 'Browser Back',
|
||||
0x000c0225: 'Browser Forward',
|
||||
0x000c0226: 'Browser Stop',
|
||||
0x000c0227: 'Browser Refresh',
|
||||
0x000c022a: 'Browser Favorites',
|
||||
0x000c022d: 'Zoom In',
|
||||
0x000c022e: 'Zoom Out',
|
||||
0x000c0232: 'Zoom Toggle',
|
||||
0x000c0279: 'Redo',
|
||||
0x000c0289: 'Mail Reply',
|
||||
0x000c028b: 'Mail Forward',
|
||||
0x000c028c: 'Mail Send',
|
||||
0x000c029d: 'Keyboard Layout Select',
|
||||
0x000c029f: 'Show All Windows',
|
||||
};
|
||||
@@ -0,0 +1,406 @@
|
||||
// Generated from iso_639_codes.json — do not edit by hand.
|
||||
|
||||
class LanguageEntry {
|
||||
final String code1;
|
||||
final String code2;
|
||||
final String? code2B;
|
||||
final String name;
|
||||
const LanguageEntry(this.code1, this.code2, this.code2B, this.name);
|
||||
}
|
||||
|
||||
const languageEntries = <String, LanguageEntry>{
|
||||
'aa': LanguageEntry('aa', 'aar', null, 'Afar'),
|
||||
'ab': LanguageEntry('ab', 'abk', null, 'Abkhaz'),
|
||||
'ae': LanguageEntry('ae', 'ave', null, 'Avestan'),
|
||||
'af': LanguageEntry('af', 'afr', null, 'Afrikaans'),
|
||||
'ak': LanguageEntry('ak', 'aka', null, 'Akan'),
|
||||
'am': LanguageEntry('am', 'amh', null, 'Amharic'),
|
||||
'an': LanguageEntry('an', 'arg', null, 'Aragonese'),
|
||||
'ar': LanguageEntry('ar', 'ara', null, 'Arabic'),
|
||||
'as': LanguageEntry('as', 'asm', null, 'Assamese'),
|
||||
'av': LanguageEntry('av', 'ava', null, 'Avaric'),
|
||||
'ay': LanguageEntry('ay', 'aym', null, 'Aymara'),
|
||||
'az': LanguageEntry('az', 'aze', null, 'Azerbaijani'),
|
||||
'ba': LanguageEntry('ba', 'bak', null, 'Bashkir'),
|
||||
'be': LanguageEntry('be', 'bel', null, 'Belarusian'),
|
||||
'bg': LanguageEntry('bg', 'bul', null, 'Bulgarian'),
|
||||
'bh': LanguageEntry('bh', 'bih', null, 'Bihari'),
|
||||
'bi': LanguageEntry('bi', 'bis', null, 'Bislama'),
|
||||
'bm': LanguageEntry('bm', 'bam', null, 'Bambara'),
|
||||
'bn': LanguageEntry('bn', 'ben', null, 'Bengali, Bangla'),
|
||||
'bo': LanguageEntry('bo', 'bod', 'tib', 'Tibetan Standard, Tibetan, Central'),
|
||||
'br': LanguageEntry('br', 'bre', null, 'Breton'),
|
||||
'bs': LanguageEntry('bs', 'bos', null, 'Bosnian'),
|
||||
'ca': LanguageEntry('ca', 'cat', null, 'Catalan'),
|
||||
'ce': LanguageEntry('ce', 'che', null, 'Chechen'),
|
||||
'ch': LanguageEntry('ch', 'cha', null, 'Chamorro'),
|
||||
'co': LanguageEntry('co', 'cos', null, 'Corsican'),
|
||||
'cr': LanguageEntry('cr', 'cre', null, 'Cree'),
|
||||
'cs': LanguageEntry('cs', 'ces', 'cze', 'Czech'),
|
||||
'cu': LanguageEntry('cu', 'chu', null, 'Old Church Slavonic, Church Slavonic, Old Bulgarian'),
|
||||
'cv': LanguageEntry('cv', 'chv', null, 'Chuvash'),
|
||||
'cy': LanguageEntry('cy', 'cym', 'wel', 'Welsh'),
|
||||
'da': LanguageEntry('da', 'dan', null, 'Danish'),
|
||||
'de': LanguageEntry('de', 'deu', 'ger', 'German'),
|
||||
'dv': LanguageEntry('dv', 'div', null, 'Divehi, Dhivehi, Maldivian'),
|
||||
'dz': LanguageEntry('dz', 'dzo', null, 'Dzongkha'),
|
||||
'ee': LanguageEntry('ee', 'ewe', null, 'Ewe'),
|
||||
'el': LanguageEntry('el', 'ell', 'gre', 'Greek (modern)'),
|
||||
'en': LanguageEntry('en', 'eng', null, 'English'),
|
||||
'eo': LanguageEntry('eo', 'epo', null, 'Esperanto'),
|
||||
'es': LanguageEntry('es', 'spa', null, 'Spanish'),
|
||||
'et': LanguageEntry('et', 'est', null, 'Estonian'),
|
||||
'eu': LanguageEntry('eu', 'eus', 'baq', 'Basque'),
|
||||
'fa': LanguageEntry('fa', 'fas', 'per', 'Persian (Farsi)'),
|
||||
'ff': LanguageEntry('ff', 'ful', null, 'Fula, Fulah, Pulaar, Pular'),
|
||||
'fi': LanguageEntry('fi', 'fin', null, 'Finnish'),
|
||||
'fj': LanguageEntry('fj', 'fij', null, 'Fijian'),
|
||||
'fo': LanguageEntry('fo', 'fao', null, 'Faroese'),
|
||||
'fr': LanguageEntry('fr', 'fra', 'fre', 'French'),
|
||||
'fy': LanguageEntry('fy', 'fry', null, 'Western Frisian'),
|
||||
'ga': LanguageEntry('ga', 'gle', null, 'Irish'),
|
||||
'gd': LanguageEntry('gd', 'gla', null, 'Scottish Gaelic, Gaelic'),
|
||||
'gl': LanguageEntry('gl', 'glg', null, 'Galician'),
|
||||
'gn': LanguageEntry('gn', 'grn', null, 'Guaraní'),
|
||||
'gu': LanguageEntry('gu', 'guj', null, 'Gujarati'),
|
||||
'gv': LanguageEntry('gv', 'glv', null, 'Manx'),
|
||||
'ha': LanguageEntry('ha', 'hau', null, 'Hausa'),
|
||||
'he': LanguageEntry('he', 'heb', null, 'Hebrew (modern)'),
|
||||
'hi': LanguageEntry('hi', 'hin', null, 'Hindi'),
|
||||
'ho': LanguageEntry('ho', 'hmo', null, 'Hiri Motu'),
|
||||
'hr': LanguageEntry('hr', 'hrv', null, 'Croatian'),
|
||||
'ht': LanguageEntry('ht', 'hat', null, 'Haitian, Haitian Creole'),
|
||||
'hu': LanguageEntry('hu', 'hun', null, 'Hungarian'),
|
||||
'hy': LanguageEntry('hy', 'hye', 'arm', 'Armenian'),
|
||||
'hz': LanguageEntry('hz', 'her', null, 'Herero'),
|
||||
'ia': LanguageEntry('ia', 'ina', null, 'Interlingua'),
|
||||
'id': LanguageEntry('id', 'ind', null, 'Indonesian'),
|
||||
'ie': LanguageEntry('ie', 'ile', null, 'Interlingue'),
|
||||
'ig': LanguageEntry('ig', 'ibo', null, 'Igbo'),
|
||||
'ii': LanguageEntry('ii', 'iii', null, 'Nuosu'),
|
||||
'ik': LanguageEntry('ik', 'ipk', null, 'Inupiaq'),
|
||||
'io': LanguageEntry('io', 'ido', null, 'Ido'),
|
||||
'is': LanguageEntry('is', 'isl', 'ice', 'Icelandic'),
|
||||
'it': LanguageEntry('it', 'ita', null, 'Italian'),
|
||||
'iu': LanguageEntry('iu', 'iku', null, 'Inuktitut'),
|
||||
'ja': LanguageEntry('ja', 'jpn', null, 'Japanese'),
|
||||
'jv': LanguageEntry('jv', 'jav', null, 'Javanese'),
|
||||
'ka': LanguageEntry('ka', 'kat', 'geo', 'Georgian'),
|
||||
'kg': LanguageEntry('kg', 'kon', null, 'Kongo'),
|
||||
'ki': LanguageEntry('ki', 'kik', null, 'Kikuyu, Gikuyu'),
|
||||
'kj': LanguageEntry('kj', 'kua', null, 'Kwanyama, Kuanyama'),
|
||||
'kk': LanguageEntry('kk', 'kaz', null, 'Kazakh'),
|
||||
'kl': LanguageEntry('kl', 'kal', null, 'Kalaallisut, Greenlandic'),
|
||||
'km': LanguageEntry('km', 'khm', null, 'Khmer'),
|
||||
'kn': LanguageEntry('kn', 'kan', null, 'Kannada'),
|
||||
'ko': LanguageEntry('ko', 'kor', null, 'Korean'),
|
||||
'kr': LanguageEntry('kr', 'kau', null, 'Kanuri'),
|
||||
'ks': LanguageEntry('ks', 'kas', null, 'Kashmiri'),
|
||||
'ku': LanguageEntry('ku', 'kur', null, 'Kurdish'),
|
||||
'kv': LanguageEntry('kv', 'kom', null, 'Komi'),
|
||||
'kw': LanguageEntry('kw', 'cor', null, 'Cornish'),
|
||||
'ky': LanguageEntry('ky', 'kir', null, 'Kyrgyz'),
|
||||
'la': LanguageEntry('la', 'lat', null, 'Latin'),
|
||||
'lb': LanguageEntry('lb', 'ltz', null, 'Luxembourgish, Letzeburgesch'),
|
||||
'lg': LanguageEntry('lg', 'lug', null, 'Ganda'),
|
||||
'li': LanguageEntry('li', 'lim', null, 'Limburgish, Limburgan, Limburger'),
|
||||
'ln': LanguageEntry('ln', 'lin', null, 'Lingala'),
|
||||
'lo': LanguageEntry('lo', 'lao', null, 'Lao'),
|
||||
'lt': LanguageEntry('lt', 'lit', null, 'Lithuanian'),
|
||||
'lu': LanguageEntry('lu', 'lub', null, 'Luba-Katanga'),
|
||||
'lv': LanguageEntry('lv', 'lav', null, 'Latvian'),
|
||||
'mg': LanguageEntry('mg', 'mlg', null, 'Malagasy'),
|
||||
'mh': LanguageEntry('mh', 'mah', null, 'Marshallese'),
|
||||
'mi': LanguageEntry('mi', 'mri', 'mao', 'Māori'),
|
||||
'mk': LanguageEntry('mk', 'mkd', 'mac', 'Macedonian'),
|
||||
'ml': LanguageEntry('ml', 'mal', null, 'Malayalam'),
|
||||
'mn': LanguageEntry('mn', 'mon', null, 'Mongolian'),
|
||||
'mr': LanguageEntry('mr', 'mar', null, 'Marathi (Marāṭhī)'),
|
||||
'ms': LanguageEntry('ms', 'msa', 'may', 'Malay'),
|
||||
'mt': LanguageEntry('mt', 'mlt', null, 'Maltese'),
|
||||
'my': LanguageEntry('my', 'mya', 'bur', 'Burmese'),
|
||||
'na': LanguageEntry('na', 'nau', null, 'Nauruan'),
|
||||
'nb': LanguageEntry('nb', 'nob', null, 'Norwegian Bokmål'),
|
||||
'nd': LanguageEntry('nd', 'nde', null, 'Northern Ndebele'),
|
||||
'ne': LanguageEntry('ne', 'nep', null, 'Nepali'),
|
||||
'ng': LanguageEntry('ng', 'ndo', null, 'Ndonga'),
|
||||
'nl': LanguageEntry('nl', 'nld', 'dut', 'Dutch'),
|
||||
'nn': LanguageEntry('nn', 'nno', null, 'Norwegian Nynorsk'),
|
||||
'no': LanguageEntry('no', 'nor', null, 'Norwegian'),
|
||||
'nr': LanguageEntry('nr', 'nbl', null, 'Southern Ndebele'),
|
||||
'nv': LanguageEntry('nv', 'nav', null, 'Navajo, Navaho'),
|
||||
'ny': LanguageEntry('ny', 'nya', null, 'Chichewa, Chewa, Nyanja'),
|
||||
'oc': LanguageEntry('oc', 'oci', null, 'Occitan'),
|
||||
'oj': LanguageEntry('oj', 'oji', null, 'Ojibwe, Ojibwa'),
|
||||
'om': LanguageEntry('om', 'orm', null, 'Oromo'),
|
||||
'or': LanguageEntry('or', 'ori', null, 'Oriya'),
|
||||
'os': LanguageEntry('os', 'oss', null, 'Ossetian, Ossetic'),
|
||||
'pa': LanguageEntry('pa', 'pan', null, '(Eastern) Punjabi'),
|
||||
'pi': LanguageEntry('pi', 'pli', null, 'Pāli'),
|
||||
'pl': LanguageEntry('pl', 'pol', null, 'Polish'),
|
||||
'ps': LanguageEntry('ps', 'pus', null, 'Pashto, Pushto'),
|
||||
'pt': LanguageEntry('pt', 'por', null, 'Portuguese'),
|
||||
'qu': LanguageEntry('qu', 'que', null, 'Quechua'),
|
||||
'rm': LanguageEntry('rm', 'roh', null, 'Romansh'),
|
||||
'rn': LanguageEntry('rn', 'run', null, 'Kirundi'),
|
||||
'ro': LanguageEntry('ro', 'ron', 'rum', 'Romanian'),
|
||||
'ru': LanguageEntry('ru', 'rus', null, 'Russian'),
|
||||
'rw': LanguageEntry('rw', 'kin', null, 'Kinyarwanda'),
|
||||
'sa': LanguageEntry('sa', 'san', null, 'Sanskrit (Saṁskṛta)'),
|
||||
'sc': LanguageEntry('sc', 'srd', null, 'Sardinian'),
|
||||
'sd': LanguageEntry('sd', 'snd', null, 'Sindhi'),
|
||||
'se': LanguageEntry('se', 'sme', null, 'Northern Sami'),
|
||||
'sg': LanguageEntry('sg', 'sag', null, 'Sango'),
|
||||
'si': LanguageEntry('si', 'sin', null, 'Sinhalese, Sinhala'),
|
||||
'sk': LanguageEntry('sk', 'slk', 'slo', 'Slovak'),
|
||||
'sl': LanguageEntry('sl', 'slv', null, 'Slovene'),
|
||||
'sm': LanguageEntry('sm', 'smo', null, 'Samoan'),
|
||||
'sn': LanguageEntry('sn', 'sna', null, 'Shona'),
|
||||
'so': LanguageEntry('so', 'som', null, 'Somali'),
|
||||
'sq': LanguageEntry('sq', 'sqi', 'alb', 'Albanian'),
|
||||
'sr': LanguageEntry('sr', 'srp', null, 'Serbian'),
|
||||
'ss': LanguageEntry('ss', 'ssw', null, 'Swati'),
|
||||
'st': LanguageEntry('st', 'sot', null, 'Southern Sotho'),
|
||||
'su': LanguageEntry('su', 'sun', null, 'Sundanese'),
|
||||
'sv': LanguageEntry('sv', 'swe', null, 'Swedish'),
|
||||
'sw': LanguageEntry('sw', 'swa', null, 'Swahili'),
|
||||
'ta': LanguageEntry('ta', 'tam', null, 'Tamil'),
|
||||
'te': LanguageEntry('te', 'tel', null, 'Telugu'),
|
||||
'tg': LanguageEntry('tg', 'tgk', null, 'Tajik'),
|
||||
'th': LanguageEntry('th', 'tha', null, 'Thai'),
|
||||
'ti': LanguageEntry('ti', 'tir', null, 'Tigrinya'),
|
||||
'tk': LanguageEntry('tk', 'tuk', null, 'Turkmen'),
|
||||
'tl': LanguageEntry('tl', 'tgl', null, 'Tagalog'),
|
||||
'tn': LanguageEntry('tn', 'tsn', null, 'Tswana'),
|
||||
'to': LanguageEntry('to', 'ton', null, 'Tonga (Tonga Islands)'),
|
||||
'tr': LanguageEntry('tr', 'tur', null, 'Turkish'),
|
||||
'ts': LanguageEntry('ts', 'tso', null, 'Tsonga'),
|
||||
'tt': LanguageEntry('tt', 'tat', null, 'Tatar'),
|
||||
'tw': LanguageEntry('tw', 'twi', null, 'Twi'),
|
||||
'ty': LanguageEntry('ty', 'tah', null, 'Tahitian'),
|
||||
'ug': LanguageEntry('ug', 'uig', null, 'Uyghur'),
|
||||
'uk': LanguageEntry('uk', 'ukr', null, 'Ukrainian'),
|
||||
'ur': LanguageEntry('ur', 'urd', null, 'Urdu'),
|
||||
'uz': LanguageEntry('uz', 'uzb', null, 'Uzbek'),
|
||||
've': LanguageEntry('ve', 'ven', null, 'Venda'),
|
||||
'vi': LanguageEntry('vi', 'vie', null, 'Vietnamese'),
|
||||
'vo': LanguageEntry('vo', 'vol', null, 'Volapük'),
|
||||
'wa': LanguageEntry('wa', 'wln', null, 'Walloon'),
|
||||
'wo': LanguageEntry('wo', 'wol', null, 'Wolof'),
|
||||
'xh': LanguageEntry('xh', 'xho', null, 'Xhosa'),
|
||||
'yi': LanguageEntry('yi', 'yid', null, 'Yiddish'),
|
||||
'yo': LanguageEntry('yo', 'yor', null, 'Yoruba'),
|
||||
'za': LanguageEntry('za', 'zha', null, 'Zhuang, Chuang'),
|
||||
'zh': LanguageEntry('zh', 'zho', 'chi', 'Chinese'),
|
||||
'zu': LanguageEntry('zu', 'zul', null, 'Zulu'),
|
||||
};
|
||||
|
||||
const code2ToCode1 = <String, String>{
|
||||
'aar': 'aa',
|
||||
'abk': 'ab',
|
||||
'ave': 'ae',
|
||||
'afr': 'af',
|
||||
'aka': 'ak',
|
||||
'amh': 'am',
|
||||
'arg': 'an',
|
||||
'ara': 'ar',
|
||||
'asm': 'as',
|
||||
'ava': 'av',
|
||||
'aym': 'ay',
|
||||
'aze': 'az',
|
||||
'bak': 'ba',
|
||||
'bel': 'be',
|
||||
'bul': 'bg',
|
||||
'bih': 'bh',
|
||||
'bis': 'bi',
|
||||
'bam': 'bm',
|
||||
'ben': 'bn',
|
||||
'bod': 'bo',
|
||||
'bre': 'br',
|
||||
'bos': 'bs',
|
||||
'cat': 'ca',
|
||||
'che': 'ce',
|
||||
'cha': 'ch',
|
||||
'cos': 'co',
|
||||
'cre': 'cr',
|
||||
'ces': 'cs',
|
||||
'chu': 'cu',
|
||||
'chv': 'cv',
|
||||
'cym': 'cy',
|
||||
'dan': 'da',
|
||||
'deu': 'de',
|
||||
'div': 'dv',
|
||||
'dzo': 'dz',
|
||||
'ewe': 'ee',
|
||||
'ell': 'el',
|
||||
'eng': 'en',
|
||||
'epo': 'eo',
|
||||
'spa': 'es',
|
||||
'est': 'et',
|
||||
'eus': 'eu',
|
||||
'fas': 'fa',
|
||||
'ful': 'ff',
|
||||
'fin': 'fi',
|
||||
'fij': 'fj',
|
||||
'fao': 'fo',
|
||||
'fra': 'fr',
|
||||
'fry': 'fy',
|
||||
'gle': 'ga',
|
||||
'gla': 'gd',
|
||||
'glg': 'gl',
|
||||
'grn': 'gn',
|
||||
'guj': 'gu',
|
||||
'glv': 'gv',
|
||||
'hau': 'ha',
|
||||
'heb': 'he',
|
||||
'hin': 'hi',
|
||||
'hmo': 'ho',
|
||||
'hrv': 'hr',
|
||||
'hat': 'ht',
|
||||
'hun': 'hu',
|
||||
'hye': 'hy',
|
||||
'her': 'hz',
|
||||
'ina': 'ia',
|
||||
'ind': 'id',
|
||||
'ile': 'ie',
|
||||
'ibo': 'ig',
|
||||
'iii': 'ii',
|
||||
'ipk': 'ik',
|
||||
'ido': 'io',
|
||||
'isl': 'is',
|
||||
'ita': 'it',
|
||||
'iku': 'iu',
|
||||
'jpn': 'ja',
|
||||
'jav': 'jv',
|
||||
'kat': 'ka',
|
||||
'kon': 'kg',
|
||||
'kik': 'ki',
|
||||
'kua': 'kj',
|
||||
'kaz': 'kk',
|
||||
'kal': 'kl',
|
||||
'khm': 'km',
|
||||
'kan': 'kn',
|
||||
'kor': 'ko',
|
||||
'kau': 'kr',
|
||||
'kas': 'ks',
|
||||
'kur': 'ku',
|
||||
'kom': 'kv',
|
||||
'cor': 'kw',
|
||||
'kir': 'ky',
|
||||
'lat': 'la',
|
||||
'ltz': 'lb',
|
||||
'lug': 'lg',
|
||||
'lim': 'li',
|
||||
'lin': 'ln',
|
||||
'lao': 'lo',
|
||||
'lit': 'lt',
|
||||
'lub': 'lu',
|
||||
'lav': 'lv',
|
||||
'mlg': 'mg',
|
||||
'mah': 'mh',
|
||||
'mri': 'mi',
|
||||
'mkd': 'mk',
|
||||
'mal': 'ml',
|
||||
'mon': 'mn',
|
||||
'mar': 'mr',
|
||||
'msa': 'ms',
|
||||
'mlt': 'mt',
|
||||
'mya': 'my',
|
||||
'nau': 'na',
|
||||
'nob': 'nb',
|
||||
'nde': 'nd',
|
||||
'nep': 'ne',
|
||||
'ndo': 'ng',
|
||||
'nld': 'nl',
|
||||
'nno': 'nn',
|
||||
'nor': 'no',
|
||||
'nbl': 'nr',
|
||||
'nav': 'nv',
|
||||
'nya': 'ny',
|
||||
'oci': 'oc',
|
||||
'oji': 'oj',
|
||||
'orm': 'om',
|
||||
'ori': 'or',
|
||||
'oss': 'os',
|
||||
'pan': 'pa',
|
||||
'pli': 'pi',
|
||||
'pol': 'pl',
|
||||
'pus': 'ps',
|
||||
'por': 'pt',
|
||||
'que': 'qu',
|
||||
'roh': 'rm',
|
||||
'run': 'rn',
|
||||
'ron': 'ro',
|
||||
'rus': 'ru',
|
||||
'kin': 'rw',
|
||||
'san': 'sa',
|
||||
'srd': 'sc',
|
||||
'snd': 'sd',
|
||||
'sme': 'se',
|
||||
'sag': 'sg',
|
||||
'sin': 'si',
|
||||
'slk': 'sk',
|
||||
'slv': 'sl',
|
||||
'smo': 'sm',
|
||||
'sna': 'sn',
|
||||
'som': 'so',
|
||||
'sqi': 'sq',
|
||||
'srp': 'sr',
|
||||
'ssw': 'ss',
|
||||
'sot': 'st',
|
||||
'sun': 'su',
|
||||
'swe': 'sv',
|
||||
'swa': 'sw',
|
||||
'tam': 'ta',
|
||||
'tel': 'te',
|
||||
'tgk': 'tg',
|
||||
'tha': 'th',
|
||||
'tir': 'ti',
|
||||
'tuk': 'tk',
|
||||
'tgl': 'tl',
|
||||
'tsn': 'tn',
|
||||
'ton': 'to',
|
||||
'tur': 'tr',
|
||||
'tso': 'ts',
|
||||
'tat': 'tt',
|
||||
'twi': 'tw',
|
||||
'tah': 'ty',
|
||||
'uig': 'ug',
|
||||
'ukr': 'uk',
|
||||
'urd': 'ur',
|
||||
'uzb': 'uz',
|
||||
'ven': 've',
|
||||
'vie': 'vi',
|
||||
'vol': 'vo',
|
||||
'wln': 'wa',
|
||||
'wol': 'wo',
|
||||
'xho': 'xh',
|
||||
'yid': 'yi',
|
||||
'yor': 'yo',
|
||||
'zha': 'za',
|
||||
'zho': 'zh',
|
||||
'zul': 'zu',
|
||||
};
|
||||
|
||||
const code2BToCode1 = <String, String>{
|
||||
'tib': 'bo',
|
||||
'cze': 'cs',
|
||||
'wel': 'cy',
|
||||
'ger': 'de',
|
||||
'gre': 'el',
|
||||
'baq': 'eu',
|
||||
'per': 'fa',
|
||||
'fre': 'fr',
|
||||
'arm': 'hy',
|
||||
'ice': 'is',
|
||||
'geo': 'ka',
|
||||
'mao': 'mi',
|
||||
'mac': 'mk',
|
||||
'may': 'ms',
|
||||
'bur': 'my',
|
||||
'dut': 'nl',
|
||||
'rum': 'ro',
|
||||
'slo': 'sk',
|
||||
'alb': 'sq',
|
||||
'chi': 'zh',
|
||||
};
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:io';
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:drift/native.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
@@ -11,17 +12,68 @@ import '../utils/global_key_utils.dart';
|
||||
|
||||
part 'app_database.g.dart';
|
||||
|
||||
// Simplified database with API cache for offline support
|
||||
@DriftDatabase(tables: [DownloadedMedia, DownloadQueue, ApiCache, OfflineWatchProgress])
|
||||
/// Action queued in the offline watch-progress sync table. The serialized
|
||||
/// form ([id]) is what gets persisted in [OfflineWatchProgress.actionType];
|
||||
/// keep these strings stable across renames so existing rows resolve.
|
||||
enum OfflineActionType {
|
||||
progress,
|
||||
watched,
|
||||
unwatched;
|
||||
|
||||
/// Stable string id used for persistence. Survives an enum-name rename
|
||||
/// (e.g. `progress` → `inProgress`) — `.name` would corrupt every row.
|
||||
String get id => switch (this) {
|
||||
OfflineActionType.progress => 'progress',
|
||||
OfflineActionType.watched => 'watched',
|
||||
OfflineActionType.unwatched => 'unwatched',
|
||||
};
|
||||
|
||||
/// Inverse of [id]. Throws on unknown so a typo in production doesn't
|
||||
/// silently fall back to the wrong action.
|
||||
static OfflineActionType fromId(String id) => switch (id) {
|
||||
'progress' => OfflineActionType.progress,
|
||||
'watched' => OfflineActionType.watched,
|
||||
'unwatched' => OfflineActionType.unwatched,
|
||||
_ => throw ArgumentError('Unknown OfflineActionType id: $id'),
|
||||
};
|
||||
}
|
||||
|
||||
@DriftDatabase(
|
||||
tables: [
|
||||
DownloadedMedia,
|
||||
DownloadOwners,
|
||||
DownloadQueue,
|
||||
ApiCache,
|
||||
OfflineWatchProgress,
|
||||
SyncRules,
|
||||
Connections,
|
||||
Profiles,
|
||||
ProfileConnections,
|
||||
],
|
||||
)
|
||||
class AppDatabase extends _$AppDatabase {
|
||||
AppDatabase() : super(_openConnection());
|
||||
|
||||
/// Test-only constructor — inject an in-memory [QueryExecutor]
|
||||
/// (e.g. `NativeDatabase.memory()`) so tests don't touch real disk.
|
||||
@visibleForTesting
|
||||
AppDatabase.forTesting(super.e);
|
||||
|
||||
@override
|
||||
int get schemaVersion => 8; // Added bgTaskId column to DownloadedMedia
|
||||
int get schemaVersion => 14;
|
||||
|
||||
@override
|
||||
MigrationStrategy get migration {
|
||||
return MigrationStrategy(
|
||||
// Enforce ProfileConnections → Profiles/Connections cascades.
|
||||
// Drift turns FKs *off* during migrations, so the per-connection
|
||||
// pragma we set in `_openConnection` is wiped on first open. This
|
||||
// hook runs after migrations and re-enables it for subsequent
|
||||
// queries — also applies to in-memory test databases that don't go
|
||||
// through `_openConnection`.
|
||||
beforeOpen: (details) async {
|
||||
await customStatement('PRAGMA foreign_keys = ON');
|
||||
},
|
||||
onCreate: (Migrator m) async {
|
||||
await m.createAll();
|
||||
},
|
||||
@@ -32,37 +84,199 @@ class AppDatabase extends _$AppDatabase {
|
||||
}
|
||||
if (from < 8) {
|
||||
appLogger.i('Adding bgTaskId column to DownloadedMedia (v8 migration)');
|
||||
try {
|
||||
await m.addColumn(downloadedMedia, downloadedMedia.bgTaskId);
|
||||
} catch (e) {
|
||||
appLogger.w('bgTaskId column may already exist: $e');
|
||||
await _ignoreAlreadyExists(
|
||||
'DownloadedMedia.bgTaskId column',
|
||||
() => m.addColumn(downloadedMedia, downloadedMedia.bgTaskId),
|
||||
);
|
||||
}
|
||||
if (from < 9) {
|
||||
appLogger.i('Adding mediaIndex column to DownloadedMedia (v9 migration)');
|
||||
await _ignoreAlreadyExists(
|
||||
'DownloadedMedia.mediaIndex column',
|
||||
() => m.addColumn(downloadedMedia, downloadedMedia.mediaIndex),
|
||||
);
|
||||
}
|
||||
if (from < 10) {
|
||||
appLogger.i('Adding SyncRules table (v10 migration)');
|
||||
await m.createTable(syncRules);
|
||||
}
|
||||
if (from < 11) {
|
||||
appLogger.i('Adding enabled column to SyncRules (v11 migration)');
|
||||
await _ignoreAlreadyExists('SyncRules.enabled column', () => m.addColumn(syncRules, syncRules.enabled));
|
||||
}
|
||||
if (from < 12) {
|
||||
appLogger.i('Adding downloadFilter column to SyncRules (v12 migration)');
|
||||
await _ignoreAlreadyExists(
|
||||
'SyncRules.downloadFilter column',
|
||||
() => m.addColumn(syncRules, syncRules.downloadFilter),
|
||||
);
|
||||
}
|
||||
if (from < 13) {
|
||||
appLogger.i('Adding indexes on DownloadedMedia hot-queried columns (v13 migration)');
|
||||
final indexes = {
|
||||
'idx_downloaded_media_status': idxDownloadedMediaStatus,
|
||||
'idx_downloaded_media_server': idxDownloadedMediaServer,
|
||||
'idx_downloaded_media_parent': idxDownloadedMediaParent,
|
||||
'idx_downloaded_media_grandparent': idxDownloadedMediaGrandparent,
|
||||
};
|
||||
for (final entry in indexes.entries) {
|
||||
await _ignoreAlreadyExists('Index ${entry.key}', () => m.create(entry.value));
|
||||
}
|
||||
}
|
||||
if (from < 14) {
|
||||
appLogger.i(
|
||||
'Adding Connections, Profiles, ProfileConnections, DownloadOwners + scope/profile columns (v14 migration)',
|
||||
);
|
||||
|
||||
await m.createTable(connections);
|
||||
await _ignoreAlreadyExists('Index idx_connections_kind', () => m.create(idxConnectionsKind));
|
||||
|
||||
await m.createTable(profiles);
|
||||
await _ignoreAlreadyExists('Index idx_profiles_kind', () => m.create(idxProfilesKind));
|
||||
|
||||
await m.createTable(profileConnections);
|
||||
await _ignoreAlreadyExists(
|
||||
'Index idx_profile_connections_connection_id',
|
||||
() => m.create(idxProfileConnectionsConnectionId),
|
||||
);
|
||||
await _ignoreAlreadyExists(
|
||||
'Index idx_profile_connections_profile_id',
|
||||
() => m.create(idxProfileConnectionsProfileId),
|
||||
);
|
||||
|
||||
await _ignoreAlreadyExists('DownloadOwners table', () => m.createTable(downloadOwners));
|
||||
await _ignoreAlreadyExists('Index idx_download_owners_profile', () => m.create(idxDownloadOwnersProfile));
|
||||
await _ignoreAlreadyExists(
|
||||
'Index idx_download_owners_global_key',
|
||||
() => m.create(idxDownloadOwnersGlobalKey),
|
||||
);
|
||||
|
||||
await _ignoreAlreadyExists(
|
||||
'DownloadedMedia.clientScopeId column',
|
||||
() => m.addColumn(downloadedMedia, downloadedMedia.clientScopeId),
|
||||
);
|
||||
await _ignoreAlreadyExists(
|
||||
'OfflineWatchProgress.clientScopeId column',
|
||||
() => m.addColumn(offlineWatchProgress, offlineWatchProgress.clientScopeId),
|
||||
);
|
||||
await _ignoreAlreadyExists('SyncRules.profileId column', () => m.addColumn(syncRules, syncRules.profileId));
|
||||
await _ignoreAlreadyExists(
|
||||
'OfflineWatchProgress.profileId column',
|
||||
() => m.addColumn(offlineWatchProgress, offlineWatchProgress.profileId),
|
||||
);
|
||||
|
||||
await customStatement('''
|
||||
UPDATE downloaded_media
|
||||
SET client_scope_id = (
|
||||
SELECT id FROM connections
|
||||
WHERE kind = 'jellyfin'
|
||||
AND substr(id, 1, length(downloaded_media.server_id) + 1) = downloaded_media.server_id || '/'
|
||||
LIMIT 1
|
||||
)
|
||||
WHERE client_scope_id IS NULL
|
||||
AND EXISTS (
|
||||
SELECT 1 FROM connections
|
||||
WHERE kind = 'jellyfin'
|
||||
AND substr(id, 1, length(downloaded_media.server_id) + 1) = downloaded_media.server_id || '/'
|
||||
)
|
||||
''');
|
||||
await customStatement('''
|
||||
UPDATE offline_watch_progress
|
||||
SET client_scope_id = (
|
||||
SELECT id FROM connections
|
||||
WHERE kind = 'jellyfin'
|
||||
AND substr(id, 1, length(offline_watch_progress.server_id) + 1) = offline_watch_progress.server_id || '/'
|
||||
LIMIT 1
|
||||
)
|
||||
WHERE client_scope_id IS NULL
|
||||
AND EXISTS (
|
||||
SELECT 1 FROM connections
|
||||
WHERE kind = 'jellyfin'
|
||||
AND substr(id, 1, length(offline_watch_progress.server_id) + 1) = offline_watch_progress.server_id || '/'
|
||||
)
|
||||
''');
|
||||
|
||||
await _ignoreAlreadyExists(
|
||||
'Index idx_offline_watch_progress_server',
|
||||
() => m.create(idxOfflineWatchProgressServer),
|
||||
);
|
||||
await _ignoreAlreadyExists('Index idx_sync_rules_profile', () => m.create(idxSyncRulesProfile));
|
||||
await _ignoreAlreadyExists(
|
||||
'Index idx_offline_watch_progress_profile',
|
||||
() => m.create(idxOfflineWatchProgressProfile),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Offline Watch Progress Operations
|
||||
// ============================================================
|
||||
Future<void> _ignoreAlreadyExists(String label, Future<void> Function() operation) async {
|
||||
try {
|
||||
await operation();
|
||||
} catch (e) {
|
||||
final message = e.toString().toLowerCase();
|
||||
if (message.contains('already exists') || message.contains('duplicate column name')) {
|
||||
appLogger.w('$label already exists during migration: $e');
|
||||
return;
|
||||
}
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Expression<bool> _clientScopePredicate(GeneratedColumn<String> column, String? clientScopeId) {
|
||||
return clientScopeId == null ? column.isNull() : column.equals(clientScopeId);
|
||||
}
|
||||
|
||||
Expression<bool> _nullableTextPredicate(GeneratedColumn<String> column, String? value) {
|
||||
return value == null ? column.isNull() : column.equals(value);
|
||||
}
|
||||
|
||||
/// Get all pending offline watch actions for sync
|
||||
Future<List<OfflineWatchProgressItem>> getPendingWatchActions() {
|
||||
return (select(offlineWatchProgress)..orderBy([(t) => OrderingTerm.asc(t.createdAt)])).get();
|
||||
Future<List<OfflineWatchProgressItem>> getPendingWatchActions({String? profileId}) {
|
||||
final query = select(offlineWatchProgress)..orderBy([(t) => OrderingTerm.asc(t.createdAt)]);
|
||||
if (profileId != null) {
|
||||
query.where((t) => t.profileId.equals(profileId));
|
||||
}
|
||||
return query.get();
|
||||
}
|
||||
|
||||
/// Claim pre-v18 offline watch actions for [profileId]. Those rows predate
|
||||
/// profile ownership and have `NULL profile_id`; the first active profile
|
||||
/// inherits them so already-watched offline progress is not stranded.
|
||||
Future<void> adoptLegacyOfflineWatchActionsForProfile(String profileId) async {
|
||||
if (profileId.isEmpty) return;
|
||||
await (update(
|
||||
offlineWatchProgress,
|
||||
)..where((t) => t.profileId.isNull())).write(OfflineWatchProgressCompanion(profileId: Value(profileId)));
|
||||
}
|
||||
|
||||
/// Get pending watch actions for a specific server
|
||||
Future<List<OfflineWatchProgressItem>> getPendingWatchActionsForServer(String serverId) {
|
||||
Future<List<OfflineWatchProgressItem>> getPendingWatchActionsForServer(String serverId, {String? profileId}) {
|
||||
return (select(offlineWatchProgress)
|
||||
..where((t) => t.serverId.equals(serverId))
|
||||
..where(
|
||||
(t) =>
|
||||
t.serverId.equals(serverId) &
|
||||
(profileId == null ? const Constant(true) : t.profileId.equals(profileId)),
|
||||
)
|
||||
..orderBy([(t) => OrderingTerm.asc(t.createdAt)]))
|
||||
.get();
|
||||
}
|
||||
|
||||
/// Get the latest action for a specific item
|
||||
Future<OfflineWatchProgressItem?> getLatestWatchAction(String globalKey) {
|
||||
Future<OfflineWatchProgressItem?> getLatestWatchAction(
|
||||
String globalKey, {
|
||||
String? profileId,
|
||||
bool filterProfile = false,
|
||||
String? clientScopeId,
|
||||
bool filterClientScope = false,
|
||||
}) {
|
||||
return (select(offlineWatchProgress)
|
||||
..where((t) => t.globalKey.equals(globalKey))
|
||||
..where(
|
||||
(t) =>
|
||||
t.globalKey.equals(globalKey) &
|
||||
(filterProfile ? _nullableTextPredicate(t.profileId, profileId) : const Constant(true)) &
|
||||
(filterClientScope ? _clientScopePredicate(t.clientScopeId, clientScopeId) : const Constant(true)),
|
||||
)
|
||||
..orderBy([(t) => OrderingTerm.desc(t.updatedAt)])
|
||||
..limit(1))
|
||||
.getSingleOrNull();
|
||||
@@ -72,19 +286,32 @@ class AppDatabase extends _$AppDatabase {
|
||||
///
|
||||
/// Returns a map of globalKey -> latest action for each key.
|
||||
/// Keys with no actions will not be present in the returned map.
|
||||
Future<Map<String, OfflineWatchProgressItem>> getLatestWatchActionsForKeys(Set<String> globalKeys) async {
|
||||
Future<Map<String, OfflineWatchProgressItem>> getLatestWatchActionsForKeys(
|
||||
Set<String> globalKeys, {
|
||||
String? profileId,
|
||||
bool filterProfile = false,
|
||||
Map<String, String?>? clientScopeIdsByGlobalKey,
|
||||
}) async {
|
||||
if (globalKeys.isEmpty) return {};
|
||||
|
||||
// Query all actions for the given keys
|
||||
final allActions =
|
||||
await (select(offlineWatchProgress)
|
||||
..where((t) => t.globalKey.isIn(globalKeys))
|
||||
..where(
|
||||
(t) =>
|
||||
t.globalKey.isIn(globalKeys) &
|
||||
(filterProfile ? _nullableTextPredicate(t.profileId, profileId) : const Constant(true)),
|
||||
)
|
||||
..orderBy([(t) => OrderingTerm.desc(t.updatedAt)]))
|
||||
.get();
|
||||
|
||||
// Group by globalKey and take the latest (first due to ordering)
|
||||
final result = <String, OfflineWatchProgressItem>{};
|
||||
for (final action in allActions) {
|
||||
if (clientScopeIdsByGlobalKey != null && clientScopeIdsByGlobalKey.containsKey(action.globalKey)) {
|
||||
final expectedScope = clientScopeIdsByGlobalKey[action.globalKey];
|
||||
if (!_clientScopeValuesMatch(action.clientScopeId, expectedScope)) continue;
|
||||
}
|
||||
// Only keep the first (latest) action for each key
|
||||
result.putIfAbsent(action.globalKey, () => action);
|
||||
}
|
||||
@@ -92,9 +319,17 @@ class AppDatabase extends _$AppDatabase {
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Insert or update a progress action (merges with existing)
|
||||
bool _clientScopeValuesMatch(String? actual, String? expected) {
|
||||
final normalizedActual = actual == null || actual.isEmpty ? null : actual;
|
||||
final normalizedExpected = expected == null || expected.isEmpty ? null : expected;
|
||||
return normalizedActual == normalizedExpected;
|
||||
}
|
||||
|
||||
/// Insert or update a progress action (merges with existing).
|
||||
Future<void> upsertProgressAction({
|
||||
String? profileId,
|
||||
required String serverId,
|
||||
String? clientScopeId,
|
||||
required String ratingKey,
|
||||
required int viewOffset,
|
||||
required int duration,
|
||||
@@ -106,7 +341,13 @@ class AppDatabase extends _$AppDatabase {
|
||||
// Check for existing progress entry
|
||||
final existing =
|
||||
await (select(offlineWatchProgress)
|
||||
..where((t) => t.globalKey.equals(globalKey) & t.actionType.equals('progress'))
|
||||
..where(
|
||||
(t) =>
|
||||
t.globalKey.equals(globalKey) &
|
||||
_nullableTextPredicate(t.profileId, profileId) &
|
||||
_clientScopePredicate(t.clientScopeId, clientScopeId) &
|
||||
t.actionType.equals(OfflineActionType.progress.id),
|
||||
)
|
||||
..limit(1))
|
||||
.getSingleOrNull();
|
||||
|
||||
@@ -117,6 +358,8 @@ class AppDatabase extends _$AppDatabase {
|
||||
viewOffset: Value(viewOffset),
|
||||
duration: Value(duration),
|
||||
shouldMarkWatched: Value(shouldMarkWatched),
|
||||
profileId: Value(profileId),
|
||||
clientScopeId: Value(clientScopeId),
|
||||
updatedAt: Value(now),
|
||||
),
|
||||
);
|
||||
@@ -125,9 +368,11 @@ class AppDatabase extends _$AppDatabase {
|
||||
await into(offlineWatchProgress).insert(
|
||||
OfflineWatchProgressCompanion.insert(
|
||||
serverId: serverId,
|
||||
profileId: Value(profileId),
|
||||
clientScopeId: Value(clientScopeId),
|
||||
ratingKey: ratingKey,
|
||||
globalKey: globalKey,
|
||||
actionType: 'progress',
|
||||
actionType: OfflineActionType.progress.id,
|
||||
viewOffset: Value(viewOffset),
|
||||
duration: Value(duration),
|
||||
shouldMarkWatched: Value(shouldMarkWatched),
|
||||
@@ -138,10 +383,12 @@ class AppDatabase extends _$AppDatabase {
|
||||
}
|
||||
}
|
||||
|
||||
/// Insert a manual watch action (watched or unwatched)
|
||||
/// Removes conflicting actions for the same item
|
||||
/// Insert a manual watch action (watched or unwatched).
|
||||
/// Removes conflicting actions for the same item.
|
||||
Future<void> insertWatchAction({
|
||||
String? profileId,
|
||||
required String serverId,
|
||||
String? clientScopeId,
|
||||
required String ratingKey,
|
||||
required String actionType, // 'watched' or 'unwatched'
|
||||
}) async {
|
||||
@@ -149,12 +396,20 @@ class AppDatabase extends _$AppDatabase {
|
||||
final now = DateTime.now().millisecondsSinceEpoch;
|
||||
|
||||
// Remove conflicting actions (opposite action type and progress)
|
||||
await (delete(offlineWatchProgress)..where((t) => t.globalKey.equals(globalKey))).go();
|
||||
await (delete(offlineWatchProgress)..where(
|
||||
(t) =>
|
||||
t.globalKey.equals(globalKey) &
|
||||
_nullableTextPredicate(t.profileId, profileId) &
|
||||
_clientScopePredicate(t.clientScopeId, clientScopeId),
|
||||
))
|
||||
.go();
|
||||
|
||||
// Insert the new action
|
||||
await into(offlineWatchProgress).insert(
|
||||
OfflineWatchProgressCompanion.insert(
|
||||
serverId: serverId,
|
||||
profileId: Value(profileId),
|
||||
clientScopeId: Value(clientScopeId),
|
||||
ratingKey: ratingKey,
|
||||
globalKey: globalKey,
|
||||
actionType: actionType,
|
||||
@@ -181,10 +436,12 @@ class AppDatabase extends _$AppDatabase {
|
||||
}
|
||||
|
||||
/// Get count of pending sync items
|
||||
Future<int> getPendingSyncCount() async {
|
||||
final count = await (selectOnly(offlineWatchProgress)..addColumns([offlineWatchProgress.id.count()]))
|
||||
.map((row) => row.read(offlineWatchProgress.id.count()))
|
||||
.getSingle();
|
||||
Future<int> getPendingSyncCount({String? profileId}) async {
|
||||
final query = selectOnly(offlineWatchProgress)..addColumns([offlineWatchProgress.id.count()]);
|
||||
if (profileId != null) {
|
||||
query.where(offlineWatchProgress.profileId.equals(profileId));
|
||||
}
|
||||
final count = await query.map((row) => row.read(offlineWatchProgress.id.count())).getSingle();
|
||||
return count ?? 0;
|
||||
}
|
||||
|
||||
@@ -193,9 +450,105 @@ class AppDatabase extends _$AppDatabase {
|
||||
return delete(offlineWatchProgress).go();
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Downloaded Media Queries for Watch State Sync
|
||||
// ============================================================
|
||||
Future<List<SyncRuleItem>> getSyncRules({String? profileId}) {
|
||||
final query = select(syncRules);
|
||||
if (profileId != null) {
|
||||
query.where((t) => t.profileId.equals(profileId));
|
||||
}
|
||||
return query.get();
|
||||
}
|
||||
|
||||
Future<SyncRuleItem?> getSyncRule(String globalKey) {
|
||||
return (select(syncRules)..where((t) => t.globalKey.equals(globalKey))).getSingleOrNull();
|
||||
}
|
||||
|
||||
Future<void> insertSyncRule({
|
||||
String profileId = '',
|
||||
required String serverId,
|
||||
required String ratingKey,
|
||||
required String globalKey,
|
||||
required String targetType,
|
||||
required int episodeCount,
|
||||
int mediaIndex = 0,
|
||||
String downloadFilter = 'unwatched',
|
||||
}) async {
|
||||
// [insertOnConflictUpdate] defaults the conflict target to the primary
|
||||
// key (`id`), which is auto-incremented — the conflict never triggers
|
||||
// and the row's UNIQUE [globalKey] constraint blows up instead. Drive
|
||||
// the upsert off the public [globalKey] so re-creating a rule for the same
|
||||
// shared target updates the existing row.
|
||||
await into(syncRules).insert(
|
||||
SyncRulesCompanion.insert(
|
||||
serverId: serverId,
|
||||
profileId: Value(profileId),
|
||||
ratingKey: ratingKey,
|
||||
globalKey: globalKey,
|
||||
targetType: targetType,
|
||||
episodeCount: episodeCount,
|
||||
createdAt: DateTime.now().millisecondsSinceEpoch,
|
||||
mediaIndex: Value(mediaIndex),
|
||||
downloadFilter: Value(downloadFilter),
|
||||
),
|
||||
onConflict: DoUpdate(
|
||||
(_) => SyncRulesCompanion(
|
||||
serverId: Value(serverId),
|
||||
profileId: Value(profileId),
|
||||
ratingKey: Value(ratingKey),
|
||||
targetType: Value(targetType),
|
||||
episodeCount: Value(episodeCount),
|
||||
mediaIndex: Value(mediaIndex),
|
||||
downloadFilter: Value(downloadFilter),
|
||||
),
|
||||
target: [syncRules.globalKey],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Claim pre-v16 public sync rules for [profileId]. Rules created before
|
||||
/// profile ownership have an empty profile id and a public global key.
|
||||
Future<void> adoptLegacySyncRulesForProfile(String profileId) async {
|
||||
if (profileId.isEmpty) return;
|
||||
final legacyRules = await (select(syncRules)..where((t) => t.profileId.equals(''))).get();
|
||||
for (final rule in legacyRules) {
|
||||
final scopedKey = buildProfileScopedGlobalKey(profileId, rule.serverId, rule.ratingKey);
|
||||
final duplicate = await getSyncRule(scopedKey);
|
||||
if (duplicate != null) {
|
||||
await (delete(syncRules)..where((t) => t.id.equals(rule.id))).go();
|
||||
continue;
|
||||
}
|
||||
await (update(syncRules)..where((t) => t.id.equals(rule.id))).write(
|
||||
SyncRulesCompanion(profileId: Value(profileId), globalKey: Value(scopedKey)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> updateSyncRuleCount(String globalKey, int episodeCount) async {
|
||||
await (update(
|
||||
syncRules,
|
||||
)..where((t) => t.globalKey.equals(globalKey))).write(SyncRulesCompanion(episodeCount: Value(episodeCount)));
|
||||
}
|
||||
|
||||
Future<void> updateSyncRuleFilter(String globalKey, String downloadFilter) async {
|
||||
await (update(
|
||||
syncRules,
|
||||
)..where((t) => t.globalKey.equals(globalKey))).write(SyncRulesCompanion(downloadFilter: Value(downloadFilter)));
|
||||
}
|
||||
|
||||
Future<void> updateSyncRuleEnabled(String globalKey, bool enabled) async {
|
||||
await (update(
|
||||
syncRules,
|
||||
)..where((t) => t.globalKey.equals(globalKey))).write(SyncRulesCompanion(enabled: Value(enabled)));
|
||||
}
|
||||
|
||||
Future<void> updateSyncRuleLastExecuted(String globalKey) async {
|
||||
await (update(syncRules)..where((t) => t.globalKey.equals(globalKey))).write(
|
||||
SyncRulesCompanion(lastExecutedAt: Value(DateTime.now().millisecondsSinceEpoch)),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> deleteSyncRule(String globalKey) async {
|
||||
await (delete(syncRules)..where((t) => t.globalKey.equals(globalKey))).go();
|
||||
}
|
||||
|
||||
/// Get all downloaded media items (for syncing watch states)
|
||||
Future<List<DownloadedMediaItem>> getAllDownloadedMetadata() {
|
||||
@@ -211,7 +564,6 @@ LazyDatabase _openConnection() {
|
||||
|
||||
final file = File(p.join(dbFolder.path, 'plezy_downloads.db'));
|
||||
|
||||
// Ensure directory exists
|
||||
if (!await file.parent.exists()) {
|
||||
await file.parent.create(recursive: true);
|
||||
}
|
||||
@@ -225,9 +577,15 @@ LazyDatabase _openConnection() {
|
||||
}
|
||||
}
|
||||
|
||||
return NativeDatabase.createInBackground(file, setup: (db) {
|
||||
db.execute('PRAGMA journal_mode=WAL');
|
||||
db.execute('PRAGMA synchronous=NORMAL');
|
||||
});
|
||||
return NativeDatabase.createInBackground(
|
||||
file,
|
||||
setup: (db) {
|
||||
db.execute('PRAGMA journal_mode=WAL');
|
||||
db.execute('PRAGMA synchronous=NORMAL');
|
||||
// Enforce ProfileConnections → Profiles/Connections cascades.
|
||||
// SQLite requires this on every connection — it's not persisted.
|
||||
db.execute('PRAGMA foreign_keys = ON');
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,34 +2,106 @@ import 'package:drift/drift.dart';
|
||||
|
||||
import 'app_database.dart';
|
||||
import '../models/download_models.dart';
|
||||
import '../profiles/profile.dart';
|
||||
|
||||
/// Extension methods on AppDatabase for download operations
|
||||
extension DownloadDatabaseOperations on AppDatabase {
|
||||
/// Insert a new download into the database
|
||||
Future<void> addDownloadOwner({required String profileId, required String globalKey}) async {
|
||||
if (profileId.isEmpty) return;
|
||||
await into(downloadOwners).insert(
|
||||
DownloadOwnersCompanion.insert(
|
||||
profileId: profileId,
|
||||
globalKey: globalKey,
|
||||
createdAt: DateTime.now().millisecondsSinceEpoch,
|
||||
),
|
||||
mode: InsertMode.insertOrIgnore,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> removeDownloadOwner({required String profileId, required String globalKey}) async {
|
||||
await (delete(downloadOwners)..where((t) => t.profileId.equals(profileId) & t.globalKey.equals(globalKey))).go();
|
||||
}
|
||||
|
||||
Future<void> removeDownloadOwnersForProfile(String profileId) async {
|
||||
if (profileId.isEmpty) return;
|
||||
await (delete(downloadOwners)..where((t) => t.profileId.equals(profileId))).go();
|
||||
}
|
||||
|
||||
Future<Set<String>> getDownloadOwnerKeysForProfile(String profileId) async {
|
||||
if (profileId.isEmpty) return const {};
|
||||
final rows = await (select(downloadOwners)..where((t) => t.profileId.equals(profileId))).get();
|
||||
return rows.map((row) => row.globalKey).toSet();
|
||||
}
|
||||
|
||||
Future<int> getDownloadOwnerCount(String globalKey) async {
|
||||
return (await _validDownloadOwnerRows(globalKey)).length;
|
||||
}
|
||||
|
||||
Future<bool> hasDownloadOwner(String globalKey, {String? excludingProfileId}) async {
|
||||
final rows = await _validDownloadOwnerRows(globalKey, excludingProfileId: excludingProfileId);
|
||||
return rows.isNotEmpty;
|
||||
}
|
||||
|
||||
Future<List<DownloadOwnerItem>> _validDownloadOwnerRows(String globalKey, {String? excludingProfileId}) async {
|
||||
final rows = await (select(downloadOwners)..where((t) => t.globalKey.equals(globalKey))).get();
|
||||
if (rows.isEmpty) return const [];
|
||||
final candidates = rows
|
||||
.where((row) => excludingProfileId == null || excludingProfileId.isEmpty || row.profileId != excludingProfileId)
|
||||
.toList(growable: false);
|
||||
if (candidates.isEmpty) return const [];
|
||||
|
||||
final localProfileRows = await select(profiles).get();
|
||||
final localProfileIds = localProfileRows.map((row) => row.id).toSet();
|
||||
final connectionRows = await select(connections).get();
|
||||
final connectionIds = connectionRows.map((row) => row.id).toSet();
|
||||
return candidates
|
||||
.where((row) {
|
||||
if (localProfileIds.contains(row.profileId)) return true;
|
||||
final plexHome = parsePlexHomeProfileId(row.profileId);
|
||||
if (plexHome != null) return connectionIds.contains(plexHome.accountConnectionId);
|
||||
return localProfileIds.isEmpty;
|
||||
})
|
||||
.toList(growable: false);
|
||||
}
|
||||
|
||||
/// Claim pre-v17 shared download rows for [profileId]. Rows that already
|
||||
/// have any owner are left untouched so later profiles do not inherit them.
|
||||
Future<void> adoptLegacyDownloadsForProfile(String profileId) async {
|
||||
if (profileId.isEmpty) return;
|
||||
final rows = await select(downloadedMedia).get();
|
||||
for (final row in rows) {
|
||||
if (await getDownloadOwnerCount(row.globalKey) == 0) {
|
||||
await addDownloadOwner(profileId: profileId, globalKey: row.globalKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> insertDownload({
|
||||
required String serverId,
|
||||
String? clientScopeId,
|
||||
required String ratingKey,
|
||||
required String globalKey,
|
||||
required String type,
|
||||
String? parentRatingKey,
|
||||
String? grandparentRatingKey,
|
||||
required int status,
|
||||
int mediaIndex = 0,
|
||||
}) async {
|
||||
await into(downloadedMedia).insert(
|
||||
DownloadedMediaCompanion.insert(
|
||||
serverId: serverId,
|
||||
clientScopeId: Value(clientScopeId),
|
||||
ratingKey: ratingKey,
|
||||
globalKey: globalKey,
|
||||
type: type,
|
||||
parentRatingKey: Value(parentRatingKey),
|
||||
grandparentRatingKey: Value(grandparentRatingKey),
|
||||
status: status,
|
||||
mediaIndex: Value(mediaIndex),
|
||||
),
|
||||
mode: InsertMode.insertOrReplace,
|
||||
);
|
||||
}
|
||||
|
||||
/// Add item to download queue
|
||||
Future<void> addToQueue({
|
||||
required String mediaGlobalKey,
|
||||
int priority = 0,
|
||||
@@ -51,7 +123,6 @@ extension DownloadDatabaseOperations on AppDatabase {
|
||||
/// Get next item from queue (highest priority, oldest first)
|
||||
/// Only returns items that are not paused
|
||||
Future<DownloadQueueItem?> getNextQueueItem() async {
|
||||
// Join with downloadedMedia to check status and filter out paused items
|
||||
final query = select(
|
||||
downloadQueue,
|
||||
).join([innerJoin(downloadedMedia, downloadedMedia.globalKey.equalsExp(downloadQueue.mediaGlobalKey))]);
|
||||
@@ -68,14 +139,12 @@ extension DownloadDatabaseOperations on AppDatabase {
|
||||
return result?.readTable(downloadQueue);
|
||||
}
|
||||
|
||||
/// Update download status
|
||||
Future<void> updateDownloadStatus(String globalKey, int status) async {
|
||||
await (update(
|
||||
downloadedMedia,
|
||||
)..where((t) => t.globalKey.equals(globalKey))).write(DownloadedMediaCompanion(status: Value(status)));
|
||||
}
|
||||
|
||||
/// Update download progress
|
||||
Future<void> updateDownloadProgress(String globalKey, int progress, int downloadedBytes, int totalBytes) async {
|
||||
await (update(downloadedMedia)..where((t) => t.globalKey.equals(globalKey))).write(
|
||||
DownloadedMediaCompanion(
|
||||
@@ -86,7 +155,6 @@ extension DownloadDatabaseOperations on AppDatabase {
|
||||
);
|
||||
}
|
||||
|
||||
/// Update video file path
|
||||
Future<void> updateVideoFilePath(String globalKey, String filePath) async {
|
||||
await (update(downloadedMedia)..where((t) => t.globalKey.equals(globalKey))).write(
|
||||
DownloadedMediaCompanion(
|
||||
@@ -96,16 +164,13 @@ extension DownloadDatabaseOperations on AppDatabase {
|
||||
);
|
||||
}
|
||||
|
||||
/// Update artwork paths
|
||||
Future<void> updateArtworkPaths({required String globalKey, String? thumbPath}) async {
|
||||
await (update(
|
||||
downloadedMedia,
|
||||
)..where((t) => t.globalKey.equals(globalKey))).write(DownloadedMediaCompanion(thumbPath: Value(thumbPath)));
|
||||
}
|
||||
|
||||
/// Update download error and increment retry count
|
||||
Future<void> updateDownloadError(String globalKey, String errorMessage) async {
|
||||
// Get current retry count to increment it
|
||||
final existing = await getDownloadedMedia(globalKey);
|
||||
final currentCount = existing?.retryCount ?? 0;
|
||||
|
||||
@@ -114,52 +179,84 @@ extension DownloadDatabaseOperations on AppDatabase {
|
||||
);
|
||||
}
|
||||
|
||||
/// Clear download error and reset retry count (for retry)
|
||||
Future<void> clearDownloadError(String globalKey) async {
|
||||
await (update(downloadedMedia)..where((t) => t.globalKey.equals(globalKey))).write(
|
||||
const DownloadedMediaCompanion(errorMessage: Value(null), retryCount: Value(0)),
|
||||
);
|
||||
}
|
||||
|
||||
/// Remove item from queue
|
||||
Future<void> removeFromQueue(String mediaGlobalKey) async {
|
||||
await (delete(downloadQueue)..where((t) => t.mediaGlobalKey.equals(mediaGlobalKey))).go();
|
||||
}
|
||||
|
||||
/// Get downloaded media item
|
||||
Future<DownloadedMediaItem?> getDownloadedMedia(String globalKey) {
|
||||
return (select(downloadedMedia)..where((t) => t.globalKey.equals(globalKey))).getSingleOrNull();
|
||||
}
|
||||
|
||||
/// Delete a download
|
||||
Future<void> deleteDownload(String globalKey) async {
|
||||
await (delete(downloadOwners)..where((t) => t.globalKey.equals(globalKey))).go();
|
||||
await (delete(downloadedMedia)..where((t) => t.globalKey.equals(globalKey))).go();
|
||||
await (delete(downloadQueue)..where((t) => t.mediaGlobalKey.equals(globalKey))).go();
|
||||
}
|
||||
|
||||
/// Get all downloaded episodes for a season
|
||||
Future<List<DownloadedMediaItem>> getEpisodesBySeason(String seasonKey) {
|
||||
return (select(downloadedMedia)..where((t) => t.parentRatingKey.equals(seasonKey))).get();
|
||||
Future<List<DownloadedMediaItem>> getEpisodesBySeason(
|
||||
String seasonKey, {
|
||||
String? serverId,
|
||||
String? clientScopeId,
|
||||
bool filterClientScope = false,
|
||||
}) {
|
||||
return (select(downloadedMedia)..where(
|
||||
(t) =>
|
||||
t.parentRatingKey.equals(seasonKey) &
|
||||
_optionalServerPredicate(t.serverId, serverId) &
|
||||
_optionalClientScopePredicate(t.clientScopeId, clientScopeId, filterClientScope: filterClientScope),
|
||||
))
|
||||
.get();
|
||||
}
|
||||
|
||||
/// Get all downloaded episodes for a show
|
||||
Future<List<DownloadedMediaItem>> getEpisodesByShow(String showKey) {
|
||||
return (select(downloadedMedia)..where((t) => t.grandparentRatingKey.equals(showKey))).get();
|
||||
Future<List<DownloadedMediaItem>> getEpisodesByShow(
|
||||
String showKey, {
|
||||
String? serverId,
|
||||
String? clientScopeId,
|
||||
bool filterClientScope = false,
|
||||
}) {
|
||||
return (select(downloadedMedia)..where(
|
||||
(t) =>
|
||||
t.grandparentRatingKey.equals(showKey) &
|
||||
_optionalServerPredicate(t.serverId, serverId) &
|
||||
_optionalClientScopePredicate(t.clientScopeId, clientScopeId, filterClientScope: filterClientScope),
|
||||
))
|
||||
.get();
|
||||
}
|
||||
|
||||
/// Get all downloaded items for a specific server
|
||||
Future<List<DownloadedMediaItem>> getDownloadsByServerId(String serverId) {
|
||||
return (select(downloadedMedia)..where((t) => t.serverId.equals(serverId))).get();
|
||||
}
|
||||
|
||||
/// Update the background_downloader task ID for a download
|
||||
Expression<bool> _optionalServerPredicate(GeneratedColumn<String> column, String? serverId) {
|
||||
return serverId == null ? const Constant(true) : column.equals(serverId);
|
||||
}
|
||||
|
||||
Expression<bool> _optionalClientScopePredicate(
|
||||
GeneratedColumn<String> column,
|
||||
String? clientScopeId, {
|
||||
required bool filterClientScope,
|
||||
}) {
|
||||
if (!filterClientScope && (clientScopeId == null || clientScopeId.isEmpty)) {
|
||||
return const Constant(true);
|
||||
}
|
||||
if (clientScopeId == null || clientScopeId.isEmpty) {
|
||||
return column.isNull() | column.equals('');
|
||||
}
|
||||
return column.equals(clientScopeId);
|
||||
}
|
||||
|
||||
Future<void> updateBgTaskId(String globalKey, String? taskId) async {
|
||||
await (update(
|
||||
downloadedMedia,
|
||||
)..where((t) => t.globalKey.equals(globalKey))).write(DownloadedMediaCompanion(bgTaskId: Value(taskId)));
|
||||
}
|
||||
|
||||
/// Get the background_downloader task ID for a download
|
||||
Future<String?> getBgTaskId(String globalKey) async {
|
||||
final item = await getDownloadedMedia(globalKey);
|
||||
return item?.bgTaskId;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
/// Key-value cache table for Plex API responses.
|
||||
/// Key-value cache table for media-server API responses (Plex, Jellyfin).
|
||||
/// Used for offline support - stores raw JSON responses.
|
||||
class ApiCache extends Table {
|
||||
/// Composite key: serverId:endpoint (e.g., "abc123:/library/metadata/12345")
|
||||
/// Composite key: serverId:endpoint (e.g., "abc123:/library/metadata/12345"
|
||||
/// for Plex, "abc123:/Users/.../Items/..." for Jellyfin)
|
||||
TextColumn get cacheKey => text()();
|
||||
|
||||
/// JSON response data
|
||||
TextColumn get data => text()();
|
||||
|
||||
/// Whether this item is pinned for offline access
|
||||
@@ -30,9 +30,19 @@ class DownloadQueue extends Table {
|
||||
}
|
||||
|
||||
@DataClassName('DownloadedMediaItem')
|
||||
@TableIndex(name: 'idx_downloaded_media_status', columns: {#status})
|
||||
@TableIndex(name: 'idx_downloaded_media_server', columns: {#serverId})
|
||||
@TableIndex(name: 'idx_downloaded_media_parent', columns: {#parentRatingKey})
|
||||
@TableIndex(name: 'idx_downloaded_media_grandparent', columns: {#grandparentRatingKey})
|
||||
class DownloadedMedia extends Table {
|
||||
IntColumn get id => integer().autoIncrement()();
|
||||
TextColumn get serverId => text()();
|
||||
// Downloads are intentionally app-wide/shared, keyed by the public
|
||||
// serverId:ratingKey globalKey below. For Jellyfin, clientScopeId records
|
||||
// which scoped client produced the cached metadata/download request; it is
|
||||
// not part of download ownership and must not be used to hide or duplicate
|
||||
// the physical downloaded item per user/profile.
|
||||
TextColumn get clientScopeId => text().nullable()();
|
||||
TextColumn get ratingKey => text()();
|
||||
TextColumn get globalKey => text().unique()();
|
||||
TextColumn get type => text()();
|
||||
@@ -48,20 +58,175 @@ class DownloadedMedia extends Table {
|
||||
TextColumn get errorMessage => text().nullable()();
|
||||
IntColumn get retryCount => integer().withDefault(const Constant(0))();
|
||||
TextColumn get bgTaskId => text().nullable()();
|
||||
IntColumn get mediaIndex => integer().withDefault(const Constant(0))();
|
||||
}
|
||||
|
||||
/// Profile ownership for shared physical downloads.
|
||||
///
|
||||
/// [DownloadedMedia] stores one physical row per public serverId:ratingKey so
|
||||
/// files are deduped across profiles. This table controls which active profile
|
||||
/// can see/use that shared row.
|
||||
@DataClassName('DownloadOwnerItem')
|
||||
@TableIndex(name: 'idx_download_owners_profile', columns: {#profileId})
|
||||
@TableIndex(name: 'idx_download_owners_global_key', columns: {#globalKey})
|
||||
class DownloadOwners extends Table {
|
||||
TextColumn get profileId => text()();
|
||||
TextColumn get globalKey => text()();
|
||||
IntColumn get createdAt => integer()();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {profileId, globalKey};
|
||||
}
|
||||
|
||||
/// Persistent sync rules for auto-downloading unwatched episodes.
|
||||
///
|
||||
/// Each rule keeps a rolling window of N unwatched episodes for a show/season,
|
||||
/// or mirrors the current contents of a collection/playlist.
|
||||
/// Rules are owned by the active top-level profile. Downloads remain app-wide
|
||||
/// and shared by public serverId:ratingKey identity, but rule ownership must not
|
||||
/// cross users because Jellyfin permissions and watch state are user-scoped.
|
||||
@DataClassName('SyncRuleItem')
|
||||
@TableIndex(name: 'idx_sync_rules_profile', columns: {#profileId})
|
||||
class SyncRules extends Table {
|
||||
IntColumn get id => integer().autoIncrement()();
|
||||
TextColumn get profileId => text().withDefault(const Constant(''))();
|
||||
TextColumn get serverId => text()();
|
||||
TextColumn get ratingKey => text()();
|
||||
TextColumn get globalKey => text().unique()();
|
||||
TextColumn get targetType => text()(); // 'show', 'season', 'collection', 'playlist'
|
||||
IntColumn get episodeCount => integer()();
|
||||
BoolColumn get enabled => boolean().withDefault(const Constant(true))();
|
||||
IntColumn get createdAt => integer()();
|
||||
IntColumn get lastExecutedAt => integer().nullable()();
|
||||
IntColumn get mediaIndex => integer().withDefault(const Constant(0))();
|
||||
TextColumn get downloadFilter => text().withDefault(const Constant('unwatched'))();
|
||||
}
|
||||
|
||||
/// Persisted media-server connections.
|
||||
///
|
||||
/// One row per "connection" the user has added — a Plex account (with its
|
||||
/// discovered servers and active Home profile) or a single Jellyfin server.
|
||||
/// The [configJson] payload is backend-specific and parsed by the
|
||||
/// [Connection] sealed class.
|
||||
@DataClassName('ConnectionRow')
|
||||
@TableIndex(name: 'idx_connections_kind', columns: {#kind})
|
||||
class Connections extends Table {
|
||||
/// Stable identifier for the connection. For Plex it's a generated UUID
|
||||
/// (one per account); for Jellyfin it's the server's machineId.
|
||||
TextColumn get id => text()();
|
||||
|
||||
/// Backend kind: `'plex'` or `'jellyfin'`.
|
||||
TextColumn get kind => text()();
|
||||
|
||||
/// User-visible label (account email, server name).
|
||||
TextColumn get displayName => text()();
|
||||
|
||||
/// Backend-specific config payload (token, baseUrl, profile id, …).
|
||||
TextColumn get configJson => text()();
|
||||
|
||||
/// Whether this is the default connection used at app launch when only
|
||||
/// one connection is present.
|
||||
BoolColumn get isDefault => boolean().withDefault(const Constant(false))();
|
||||
|
||||
/// Timestamp this connection was added (milliseconds since epoch).
|
||||
IntColumn get createdAt => integer()();
|
||||
|
||||
/// Timestamp of the most-recent successful auth refresh (milliseconds
|
||||
/// since epoch). Null until the first successful auth.
|
||||
IntColumn get lastAuthenticatedAt => integer().nullable()();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {id};
|
||||
}
|
||||
|
||||
/// Top-level profiles — see [Profile].
|
||||
///
|
||||
/// A profile is the user-facing identity. Plex Home users auto-surface as
|
||||
/// `kind='plex_home'` rows when their parent Plex account is added; users
|
||||
/// can also create `kind='local'` rows manually. Each profile owns one or
|
||||
/// more connections via [ProfileConnections].
|
||||
@DataClassName('ProfileRow')
|
||||
@TableIndex(name: 'idx_profiles_kind', columns: {#kind})
|
||||
class Profiles extends Table {
|
||||
/// Stable identifier. For Plex Home profiles: `plex-home-{accountId}-{homeUserUuid}`
|
||||
/// (deterministic so re-discovery is idempotent). For locals: `local-{uuid}`.
|
||||
TextColumn get id => text()();
|
||||
|
||||
/// `'local'` | `'plex_home'`.
|
||||
TextColumn get kind => text()();
|
||||
|
||||
TextColumn get displayName => text()();
|
||||
|
||||
/// Plex Home users have a thumb URL; locals fall back to initials/colour.
|
||||
TextColumn get avatarThumbUrl => text().nullable()();
|
||||
|
||||
/// Per-kind config:
|
||||
/// - `local`: `{ "pinHash": "..." }`
|
||||
/// - `plex_home`: `{ "restricted": bool, "admin": bool, "hasPassword": bool, "parentConnectionId": "..." }`
|
||||
TextColumn get configJson => text()();
|
||||
|
||||
IntColumn get sortOrder => integer().withDefault(const Constant(0))();
|
||||
IntColumn get createdAt => integer()();
|
||||
IntColumn get lastUsedAt => integer().nullable()();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {id};
|
||||
}
|
||||
|
||||
/// Many-to-many join between [Profiles] and [Connections], carrying the
|
||||
/// per-profile user-level token used when the profile is active.
|
||||
///
|
||||
/// For Plex: `userToken` is a Home-user token from `/home/users/{uuid}/switch`,
|
||||
/// `userIdentifier` is the Plex Home user UUID. An empty `userToken` is a
|
||||
/// lazy-fetch sentinel — the binder calls `/switch` on first activation.
|
||||
/// The Dart-side [ProfileConnection] model surfaces empty as `null`; the
|
||||
/// column stays non-nullable here to avoid a schema migration.
|
||||
///
|
||||
/// For Jellyfin: `userToken` mirrors the Connection's accessToken (one user
|
||||
/// per Jellyfin connection) and `userIdentifier` is the Jellyfin user id.
|
||||
@DataClassName('ProfileConnectionRow')
|
||||
@TableIndex(name: 'idx_profile_connections_connection_id', columns: {#connectionId})
|
||||
@TableIndex(name: 'idx_profile_connections_profile_id', columns: {#profileId})
|
||||
class ProfileConnections extends Table {
|
||||
// No FK on profile_id: Plex Home profiles are virtual (built by
|
||||
// Profile.virtualPlexHome from PlexHomeService's live cache, never
|
||||
// persisted in `profiles`), so an FK here would reject every join row
|
||||
// they need. The two profile-delete sites clean up join rows manually
|
||||
// via ProfileConnectionRegistry.removeAllForProfile before calling
|
||||
// ProfileRegistry.remove.
|
||||
TextColumn get profileId => text()();
|
||||
TextColumn get connectionId => text().references(Connections, #id, onDelete: KeyAction.cascade)();
|
||||
TextColumn get userToken => text().withDefault(const Constant(''))();
|
||||
TextColumn get userIdentifier => text()();
|
||||
BoolColumn get isDefault => boolean().withDefault(const Constant(false))();
|
||||
IntColumn get tokenAcquiredAt => integer().nullable()();
|
||||
IntColumn get lastUsedAt => integer().nullable()();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {profileId, connectionId};
|
||||
}
|
||||
|
||||
/// Queue for offline watch progress and manual watch actions.
|
||||
///
|
||||
/// Stores watch progress updates and manual watch/unwatch actions
|
||||
/// that need to be synced to the Plex server when back online.
|
||||
/// that need to be synced to the originating media server when back online.
|
||||
@DataClassName('OfflineWatchProgressItem')
|
||||
@TableIndex(name: 'idx_offline_watch_progress_server', columns: {#serverId})
|
||||
@TableIndex(name: 'idx_offline_watch_progress_profile', columns: {#profileId})
|
||||
class OfflineWatchProgress extends Table {
|
||||
/// Auto-incrementing primary key
|
||||
IntColumn get id => integer().autoIncrement()();
|
||||
|
||||
/// Active Plezy profile that owns this queued action.
|
||||
TextColumn get profileId => text().nullable()();
|
||||
|
||||
/// Server ID this media belongs to
|
||||
TextColumn get serverId => text()();
|
||||
|
||||
/// Optional user-scoped client/cache id for backends where [serverId] is
|
||||
/// shared by multiple users on the same server.
|
||||
TextColumn get clientScopeId => text().nullable()();
|
||||
|
||||
/// Rating key of the media item
|
||||
TextColumn get ratingKey => text()();
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:http/http.dart';
|
||||
|
||||
/// Sealed base for backend-agnostic media-server exceptions. Both Plex and
|
||||
/// Jellyfin auth/HTTP layers throw subtypes from this hierarchy so consumers
|
||||
/// can catch with one filter and match exhaustively when they care which
|
||||
/// failure mode it is.
|
||||
sealed class MediaServerException implements Exception {
|
||||
final String message;
|
||||
const MediaServerException(this.message);
|
||||
|
||||
@override
|
||||
String toString() => '$runtimeType: $message';
|
||||
}
|
||||
|
||||
/// The supplied base URL is unreachable, returns the wrong shape, or doesn't
|
||||
/// look like the expected backend at all. Surfaces in onboarding probes
|
||||
/// (Jellyfin `/System/Info/Public`, Plex resource discovery).
|
||||
class MediaServerUrlException extends MediaServerException {
|
||||
const MediaServerUrlException(super.message);
|
||||
}
|
||||
|
||||
/// Authentication failed — bad password, expired token, disabled user,
|
||||
/// rate-limit. [statusCode] is the HTTP status when the failure was a 4xx
|
||||
/// response; null for transport-layer auth signals (e.g. token rejected
|
||||
/// during refresh).
|
||||
class MediaServerAuthException extends MediaServerException {
|
||||
final int? statusCode;
|
||||
const MediaServerAuthException(super.message, {this.statusCode});
|
||||
}
|
||||
|
||||
/// Auth polling reached a terminal server-side expiry/rejection state before
|
||||
/// the user completed the external sign-in flow.
|
||||
class MediaServerPinExpiredException extends MediaServerAuthException {
|
||||
const MediaServerPinExpiredException() : super('PIN expired before sign-in');
|
||||
}
|
||||
|
||||
/// HTTP transport / non-2xx errors. Carries the status code (when known),
|
||||
/// the parsed response body, and the originating URI so callers can log
|
||||
/// useful diagnostics. Both Plex and Jellyfin route their HTTP failures
|
||||
/// through this type — it's the canonical backend-agnostic transport
|
||||
/// exception.
|
||||
enum MediaServerHttpErrorType { connectionTimeout, receiveTimeout, connectionError, cancelled, unknown }
|
||||
|
||||
class MediaServerHttpException extends MediaServerException {
|
||||
final MediaServerHttpErrorType type;
|
||||
final int? statusCode;
|
||||
final dynamic responseData;
|
||||
final Uri? requestUri;
|
||||
|
||||
MediaServerHttpException({required this.type, String? message, this.statusCode, this.responseData, this.requestUri})
|
||||
: super(message ?? '');
|
||||
|
||||
/// Map a caught exception to a [MediaServerHttpException].
|
||||
factory MediaServerHttpException.from(Object error, {Uri? uri}) {
|
||||
return switch (error) {
|
||||
MediaServerHttpException() => error,
|
||||
RequestAbortedException(:final message, uri: final errorUri) => MediaServerHttpException(
|
||||
type: MediaServerHttpErrorType.cancelled,
|
||||
message: message,
|
||||
requestUri: errorUri ?? uri,
|
||||
),
|
||||
TimeoutException(:final message) => MediaServerHttpException(
|
||||
type: MediaServerHttpErrorType.connectionTimeout,
|
||||
message: message,
|
||||
requestUri: uri,
|
||||
),
|
||||
SocketException(:final message) => MediaServerHttpException(
|
||||
type: MediaServerHttpErrorType.connectionError,
|
||||
message: message,
|
||||
requestUri: uri,
|
||||
),
|
||||
HttpException(:final message) => MediaServerHttpException(
|
||||
type: MediaServerHttpErrorType.connectionError,
|
||||
message: message,
|
||||
requestUri: uri,
|
||||
),
|
||||
ClientException(:final message, uri: final errorUri) => MediaServerHttpException(
|
||||
type: MediaServerHttpErrorType.connectionError,
|
||||
message: message,
|
||||
requestUri: errorUri ?? uri,
|
||||
),
|
||||
_ => MediaServerHttpException(type: MediaServerHttpErrorType.unknown, message: error.toString(), requestUri: uri),
|
||||
};
|
||||
}
|
||||
|
||||
/// Whether the error looks transient (network/timeout) and worth retrying.
|
||||
bool get isTransient =>
|
||||
type == MediaServerHttpErrorType.connectionTimeout ||
|
||||
type == MediaServerHttpErrorType.connectionError ||
|
||||
type == MediaServerHttpErrorType.receiveTimeout;
|
||||
|
||||
@override
|
||||
String toString() => 'MediaServerHttpException(${type.name}: $message)';
|
||||
}
|
||||
@@ -1,13 +1,26 @@
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
/// Extension on KeyEvent for common event type checks.
|
||||
extension KeyEventActionable on KeyEvent {
|
||||
/// Whether this event should trigger an action (KeyDownEvent or KeyRepeatEvent).
|
||||
/// Use this to filter out KeyUpEvents early in key handlers.
|
||||
bool get isActionable => this is KeyDownEvent || this is KeyRepeatEvent;
|
||||
bool get isPhysicalKeyboardEvent => deviceType == ui.KeyEventDeviceType.keyboard;
|
||||
bool get isPhysicalKeyboardEnter =>
|
||||
deviceType == ui.KeyEventDeviceType.keyboard &&
|
||||
(logicalKey == LogicalKeyboardKey.enter ||
|
||||
logicalKey == LogicalKeyboardKey.numpadEnter ||
|
||||
logicalKey == LogicalKeyboardKey.select);
|
||||
|
||||
bool get isTvSelectEvent {
|
||||
if (isPhysicalKeyboardEvent) return false;
|
||||
if (logicalKey == LogicalKeyboardKey.select || logicalKey == LogicalKeyboardKey.gameButtonA) return true;
|
||||
if (logicalKey == LogicalKeyboardKey.enter || logicalKey == LogicalKeyboardKey.numpadEnter) {
|
||||
return deviceType != ui.KeyEventDeviceType.keyboard;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// Shared sets for keyboard key categories.
|
||||
final _dpadDirectionKeys = {
|
||||
LogicalKeyboardKey.arrowUp,
|
||||
LogicalKeyboardKey.arrowDown,
|
||||
@@ -31,35 +44,18 @@ final _backKeys = {
|
||||
|
||||
final _contextMenuKeys = {LogicalKeyboardKey.contextMenu, LogicalKeyboardKey.gameButtonX};
|
||||
|
||||
/// Extension methods for checking D-pad related keys.
|
||||
extension DpadKeyExtension on LogicalKeyboardKey {
|
||||
/// Whether this key is a D-pad directional key.
|
||||
bool get isDpadDirection => _dpadDirectionKeys.contains(this);
|
||||
|
||||
/// Whether this key is a select/activate key.
|
||||
bool get isSelectKey => _selectKeys.contains(this);
|
||||
|
||||
/// Whether this key is a back/cancel key.
|
||||
bool get isBackKey => _backKeys.contains(this);
|
||||
|
||||
/// Whether this key is a context menu key.
|
||||
bool get isContextMenuKey => _contextMenuKeys.contains(this);
|
||||
|
||||
/// Whether this key is a navigation key (dpad, select, back, context menu, tab).
|
||||
/// Use this to distinguish navigation keys from typing/volume/media keys.
|
||||
bool get isNavigationKey =>
|
||||
isDpadDirection || isSelectKey || isBackKey || isContextMenuKey || this == LogicalKeyboardKey.tab;
|
||||
|
||||
/// Whether this key moves focus left.
|
||||
bool get isLeftKey => this == LogicalKeyboardKey.arrowLeft;
|
||||
|
||||
/// Whether this key moves focus right.
|
||||
bool get isRightKey => this == LogicalKeyboardKey.arrowRight;
|
||||
|
||||
/// Whether this key moves focus up.
|
||||
bool get isUpKey => this == LogicalKeyboardKey.arrowUp;
|
||||
|
||||
/// Whether this key moves focus down.
|
||||
bool get isDownKey => this == LogicalKeyboardKey.arrowDown;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,30 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../theme/mono_tokens.dart';
|
||||
|
||||
/// Focus styling constants for D-pad navigation.
|
||||
class FocusTheme {
|
||||
FocusTheme._();
|
||||
|
||||
/// Scale factor when an item is focused.
|
||||
static const double focusScale = 1.02;
|
||||
|
||||
/// Border width for the focus indicator.
|
||||
static const double focusBorderWidth = 2.5;
|
||||
|
||||
/// Default border radius (matches MonoTokens.radiusSm).
|
||||
static const double defaultBorderRadius = 8.0;
|
||||
|
||||
/// Get the focus border color from the theme.
|
||||
static Color getFocusBorderColor(BuildContext context) {
|
||||
return Theme.of(context).colorScheme.primary;
|
||||
}
|
||||
|
||||
/// Get the animation duration from MonoTokens.
|
||||
static Duration getAnimationDuration(BuildContext context) {
|
||||
return Theme.of(context).extension<MonoTokens>()?.fast ?? const Duration(milliseconds: 150);
|
||||
}
|
||||
|
||||
/// Build the focus border decoration.
|
||||
static BoxDecoration focusDecoration(
|
||||
BuildContext context, {
|
||||
required bool isFocused,
|
||||
|
||||
@@ -5,22 +5,13 @@ import 'focus_theme.dart';
|
||||
import 'input_mode_tracker.dart';
|
||||
import 'key_event_utils.dart';
|
||||
|
||||
/// Describes a single action button for use in [FocusableActionBar].
|
||||
class FocusableAction {
|
||||
/// Icon to display. Ignored when [child] is provided.
|
||||
final IconData icon;
|
||||
|
||||
/// Icon color. Ignored when [child] is provided.
|
||||
final Color? iconColor;
|
||||
|
||||
/// Icon fill weight (0.0–1.0). Defaults to 1.0. Ignored when [child] is provided.
|
||||
final double iconFill;
|
||||
|
||||
final String? tooltip;
|
||||
final VoidCallback? onPressed;
|
||||
|
||||
/// Optional custom child widget placed inside the focus container.
|
||||
/// Overrides the default [IconButton] built from [icon]/[tooltip]/[onPressed].
|
||||
final Widget? child;
|
||||
|
||||
const FocusableAction({
|
||||
@@ -33,25 +24,6 @@ class FocusableAction {
|
||||
});
|
||||
}
|
||||
|
||||
/// A row of focusable action buttons for app bar [actions:].
|
||||
///
|
||||
/// Manages focus nodes, left/right D-pad navigation between buttons,
|
||||
/// and the standard white-alpha background focus indicator internally.
|
||||
///
|
||||
/// Returns a single [Row] widget — place it inside the `actions:` list:
|
||||
/// ```dart
|
||||
/// CustomAppBar(
|
||||
/// title: Text('Title'),
|
||||
/// actions: [
|
||||
/// FocusableActionBar(
|
||||
/// actions: [
|
||||
/// FocusableAction(icon: Symbols.refresh_rounded, onPressed: _refresh),
|
||||
/// FocusableAction(icon: Symbols.upload_rounded, onPressed: _upload),
|
||||
/// ],
|
||||
/// ),
|
||||
/// ],
|
||||
/// )
|
||||
/// ```
|
||||
class FocusableActionBar extends StatefulWidget {
|
||||
final List<FocusableAction> actions;
|
||||
|
||||
@@ -88,8 +60,11 @@ class FocusableActionBarState extends State<FocusableActionBar> {
|
||||
late List<FocusNode> _focusNodes;
|
||||
late List<bool> _focusStates;
|
||||
|
||||
/// Access a focus node by index (e.g. for external `requestFocus()` calls).
|
||||
FocusNode getFocusNode(int index) => _focusNodes[index];
|
||||
FocusNode? getFocusNode(int index) => index >= 0 && index < _focusNodes.length ? _focusNodes[index] : null;
|
||||
|
||||
void requestFocusOnFirst() {
|
||||
if (_focusNodes.isNotEmpty) _focusNodes.first.requestFocus();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -139,9 +114,7 @@ class FocusableActionBarState extends State<FocusableActionBar> {
|
||||
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
for (var i = 0; i < widget.actions.length; i++) _buildButton(i, isKeyboard, duration),
|
||||
],
|
||||
children: [for (var i = 0; i < widget.actions.length; i++) _buildButton(i, isKeyboard, duration)],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -160,9 +133,7 @@ class FocusableActionBarState extends State<FocusableActionBar> {
|
||||
}
|
||||
return dpadKeyHandler(
|
||||
onSelect: action.onPressed,
|
||||
onLeft: index > 0
|
||||
? () => _focusNodes[index - 1].requestFocus()
|
||||
: widget.onNavigateLeft,
|
||||
onLeft: index > 0 ? () => _focusNodes[index - 1].requestFocus() : widget.onNavigateLeft,
|
||||
onRight: index < _focusNodes.length - 1
|
||||
? () => _focusNodes[index + 1].requestFocus()
|
||||
: widget.onNavigateRight,
|
||||
@@ -175,7 +146,8 @@ class FocusableActionBarState extends State<FocusableActionBar> {
|
||||
duration: duration,
|
||||
child: Container(
|
||||
decoration: FocusTheme.focusBackgroundDecoration(isFocused: showFocus, borderRadius: 20),
|
||||
child: action.child ??
|
||||
child:
|
||||
action.child ??
|
||||
IconButton(
|
||||
icon: AppIcon(action.icon, fill: action.iconFill, color: action.iconColor),
|
||||
tooltip: action.tooltip,
|
||||
|
||||
@@ -4,23 +4,6 @@ import 'focus_theme.dart';
|
||||
import 'focusable_wrapper.dart';
|
||||
import 'input_mode_tracker.dart';
|
||||
|
||||
/// A focusable button wrapper for D-pad navigation on TV.
|
||||
///
|
||||
/// Wraps any button widget with [FocusableWrapper] and adds a white overlay
|
||||
/// + contrasting border when focused. Tracks focus state internally so callers
|
||||
/// don't need manual state management.
|
||||
///
|
||||
/// ```dart
|
||||
/// FocusableButton(
|
||||
/// autofocus: true,
|
||||
/// onPressed: _doSomething,
|
||||
/// child: FilledButton.icon(
|
||||
/// onPressed: _doSomething,
|
||||
/// icon: Icon(Symbols.add_rounded),
|
||||
/// label: Text('Create'),
|
||||
/// ),
|
||||
/// )
|
||||
/// ```
|
||||
class FocusableButton extends StatefulWidget {
|
||||
final Widget child;
|
||||
final VoidCallback? onPressed;
|
||||
@@ -85,11 +68,7 @@ class _FocusableButtonState extends State<FocusableButton> {
|
||||
onNavigateLeft: widget.onNavigateLeft,
|
||||
onNavigateRight: widget.onNavigateRight,
|
||||
onBack: widget.onBack,
|
||||
child: AnimatedOpacity(
|
||||
opacity: showFocus ? 1.0 : opacity,
|
||||
duration: duration,
|
||||
child: widget.child,
|
||||
),
|
||||
child: AnimatedOpacity(opacity: showFocus ? 1.0 : opacity, duration: duration, child: widget.child),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,27 +6,13 @@ import 'package:flutter/services.dart';
|
||||
import 'dpad_navigator.dart';
|
||||
import 'key_event_utils.dart';
|
||||
|
||||
/// Callbacks for chip key event handling.
|
||||
class ChipKeyCallbacks {
|
||||
/// Called when SELECT key is pressed (short press when [onLongPress] is set).
|
||||
final VoidCallback? onSelect;
|
||||
|
||||
/// Called when SELECT key is held for 500ms.
|
||||
final VoidCallback? onLongPress;
|
||||
|
||||
/// Called when DOWN arrow is pressed.
|
||||
final VoidCallback? onNavigateDown;
|
||||
|
||||
/// Called when UP arrow is pressed.
|
||||
final VoidCallback? onNavigateUp;
|
||||
|
||||
/// Called when LEFT arrow is pressed.
|
||||
final VoidCallback? onNavigateLeft;
|
||||
|
||||
/// Called when RIGHT arrow is pressed.
|
||||
final VoidCallback? onNavigateRight;
|
||||
|
||||
/// Called when BACK key is pressed.
|
||||
final VoidCallback? onBack;
|
||||
|
||||
const ChipKeyCallbacks({
|
||||
@@ -152,9 +138,8 @@ mixin FocusableChipStateMixin<T extends StatefulWidget> on State<T> {
|
||||
_isSelectKeyDown = false;
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
} else if (event.isActionable && callbacks.onSelect != null) {
|
||||
callbacks.onSelect!();
|
||||
return KeyEventResult.handled;
|
||||
} else if (callbacks.onSelect != null) {
|
||||
return handleOneShotSelect(event, callbacks.onSelect!);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +154,6 @@ mixin FocusableChipStateMixin<T extends StatefulWidget> on State<T> {
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
|
||||
// LEFT arrow - call callback if provided, otherwise propagate to parent
|
||||
if (key.isLeftKey) {
|
||||
if (callbacks.onNavigateLeft != null) {
|
||||
callbacks.onNavigateLeft!();
|
||||
@@ -179,7 +163,6 @@ mixin FocusableChipStateMixin<T extends StatefulWidget> on State<T> {
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
|
||||
// RIGHT arrow - call callback if provided, otherwise consume to prevent escape
|
||||
if (key.isRightKey) {
|
||||
if (callbacks.onNavigateRight != null) {
|
||||
callbacks.onNavigateRight!();
|
||||
@@ -188,13 +171,11 @@ mixin FocusableChipStateMixin<T extends StatefulWidget> on State<T> {
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
// DOWN arrow
|
||||
if (key.isDownKey) {
|
||||
callbacks.onNavigateDown?.call();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
// UP arrow
|
||||
if (key.isUpKey && callbacks.onNavigateUp != null) {
|
||||
callbacks.onNavigateUp!();
|
||||
return KeyEventResult.handled;
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'dpad_navigator.dart';
|
||||
import 'focusable_wrapper.dart';
|
||||
import 'input_mode_tracker.dart';
|
||||
|
||||
class FocusableSlider extends StatefulWidget {
|
||||
final double value;
|
||||
final double min;
|
||||
final double max;
|
||||
final int? divisions;
|
||||
final ValueChanged<double>? onChanged;
|
||||
final FocusNode? focusNode;
|
||||
final bool autofocus;
|
||||
|
||||
const FocusableSlider({
|
||||
super.key,
|
||||
required this.value,
|
||||
this.min = 0.0,
|
||||
this.max = 1.0,
|
||||
this.divisions,
|
||||
this.onChanged,
|
||||
this.focusNode,
|
||||
this.autofocus = false,
|
||||
});
|
||||
|
||||
@override
|
||||
State<FocusableSlider> createState() => _FocusableSliderState();
|
||||
}
|
||||
|
||||
class _FocusableSliderState extends State<FocusableSlider> {
|
||||
bool _isFocused = false;
|
||||
|
||||
double get _step {
|
||||
if (widget.divisions != null && widget.divisions! > 0) {
|
||||
return (widget.max - widget.min) / widget.divisions!;
|
||||
}
|
||||
return (widget.max - widget.min) * 0.05;
|
||||
}
|
||||
|
||||
KeyEventResult _handleKeyEvent(FocusNode _, KeyEvent event) {
|
||||
final key = event.logicalKey;
|
||||
if (key.isLeftKey || key.isRightKey) {
|
||||
if (event.isActionable && widget.onChanged != null) {
|
||||
final delta = key.isRightKey ? _step : -_step;
|
||||
final newValue = (widget.value + delta).clamp(widget.min, widget.max);
|
||||
widget.onChanged!(newValue);
|
||||
}
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FocusableWrapper(
|
||||
focusNode: widget.focusNode,
|
||||
autofocus: widget.autofocus,
|
||||
descendantsAreFocusable: false,
|
||||
disableScale: true,
|
||||
focusColor: Colors.transparent,
|
||||
onFocusChange: (focused) => setState(() => _isFocused = focused),
|
||||
onKeyEvent: _handleKeyEvent,
|
||||
child: SliderTheme(
|
||||
data: SliderTheme.of(context).copyWith(
|
||||
overlayShape: const RoundSliderOverlayShape(overlayRadius: 0),
|
||||
thumbSize: WidgetStatePropertyAll(
|
||||
(!InputModeTracker.isKeyboardMode(context) || _isFocused) ? const Size(4, 20) : Size.zero,
|
||||
),
|
||||
),
|
||||
child: Slider(
|
||||
value: widget.value,
|
||||
min: widget.min,
|
||||
max: widget.max,
|
||||
divisions: widget.divisions,
|
||||
onChanged: widget.onChanged,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,639 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../utils/platform_detector.dart';
|
||||
import '../widgets/tv_virtual_keyboard.dart';
|
||||
import 'dpad_navigator.dart';
|
||||
|
||||
bool _usesTvKeyboard(bool enableTvKeyboard) => enableTvKeyboard && PlatformDetector.isAppleTV();
|
||||
|
||||
String? _keyboardHint(InputDecoration? decoration) => decoration?.hintText ?? decoration?.labelText;
|
||||
|
||||
KeyEventResult _handleInputKey({
|
||||
required TextEditingController controller,
|
||||
required bool usesTvKeyboard,
|
||||
required bool enabled,
|
||||
required VoidCallback openKeyboard,
|
||||
required KeyEvent event,
|
||||
TextInputType? keyboardType,
|
||||
TextInputAction? textInputAction,
|
||||
List<TextInputFormatter>? inputFormatters,
|
||||
ValueChanged<String>? onChanged,
|
||||
ValueChanged<String>? onSubmitted,
|
||||
VoidCallback? onEditingComplete,
|
||||
int? maxLength,
|
||||
int? maxLines,
|
||||
VoidCallback? onSelect,
|
||||
VoidCallback? onBack,
|
||||
VoidCallback? onNavigateLeft,
|
||||
VoidCallback? onNavigateRight,
|
||||
VoidCallback? onNavigateUp,
|
||||
VoidCallback? onNavigateDown,
|
||||
}) {
|
||||
final key = event.logicalKey;
|
||||
|
||||
if (usesTvKeyboard && enabled && event.isTvSelectEvent) {
|
||||
if (event is KeyDownEvent) openKeyboard();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
if (usesTvKeyboard && enabled && event.isPhysicalKeyboardEvent) {
|
||||
final result = _handleTvHardwareKeyboardKey(
|
||||
controller: controller,
|
||||
keyboardType: keyboardType,
|
||||
textInputAction: textInputAction,
|
||||
inputFormatters: inputFormatters,
|
||||
onChanged: onChanged,
|
||||
onSubmitted: onSubmitted,
|
||||
onEditingComplete: onEditingComplete,
|
||||
maxLength: maxLength,
|
||||
maxLines: maxLines,
|
||||
event: event,
|
||||
);
|
||||
if (result != KeyEventResult.ignored) return result;
|
||||
}
|
||||
|
||||
if (onBack != null && key.isBackKey) {
|
||||
if (event is KeyDownEvent) onBack();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
// Enter/numpad enter are left to TextField.onSubmitted. Handle only
|
||||
// non-text submit keys that TV remotes/gamepads may send while editing.
|
||||
if (!usesTvKeyboard &&
|
||||
onSelect != null &&
|
||||
(key == LogicalKeyboardKey.select || key == LogicalKeyboardKey.gameButtonA)) {
|
||||
if (event is KeyDownEvent) onSelect();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
if (!event.isActionable) return KeyEventResult.ignored;
|
||||
|
||||
if (key.isUpKey && onNavigateUp != null) {
|
||||
onNavigateUp();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
if (key.isDownKey && onNavigateDown != null) {
|
||||
onNavigateDown();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
final sel = controller.selection;
|
||||
if (sel.isCollapsed) {
|
||||
if (key.isLeftKey && sel.baseOffset == 0 && onNavigateLeft != null) {
|
||||
onNavigateLeft();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
if (key.isRightKey && sel.baseOffset == controller.text.length && onNavigateRight != null) {
|
||||
onNavigateRight();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
}
|
||||
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
|
||||
KeyEventResult _handleTvHardwareKeyboardKey({
|
||||
required TextEditingController controller,
|
||||
required KeyEvent event,
|
||||
TextInputType? keyboardType,
|
||||
TextInputAction? textInputAction,
|
||||
List<TextInputFormatter>? inputFormatters,
|
||||
ValueChanged<String>? onChanged,
|
||||
ValueChanged<String>? onSubmitted,
|
||||
VoidCallback? onEditingComplete,
|
||||
int? maxLength,
|
||||
int? maxLines,
|
||||
}) {
|
||||
final key = event.logicalKey;
|
||||
|
||||
if (event.isPhysicalKeyboardEnter) {
|
||||
if (event is KeyDownEvent) {
|
||||
if (_isMultilineTextInput(keyboardType: keyboardType, maxLines: maxLines)) {
|
||||
_insertText(
|
||||
controller: controller,
|
||||
text: '\n',
|
||||
inputFormatters: inputFormatters,
|
||||
maxLength: maxLength,
|
||||
onChanged: onChanged,
|
||||
);
|
||||
} else {
|
||||
_submitTextInput(
|
||||
controller: controller,
|
||||
textInputAction: textInputAction,
|
||||
onSubmitted: onSubmitted,
|
||||
onEditingComplete: onEditingComplete,
|
||||
);
|
||||
}
|
||||
}
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
if (!event.isActionable) return KeyEventResult.ignored;
|
||||
|
||||
if (key == LogicalKeyboardKey.backspace) {
|
||||
_backspace(controller: controller, inputFormatters: inputFormatters, maxLength: maxLength, onChanged: onChanged);
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
if (key == LogicalKeyboardKey.delete) {
|
||||
_deleteForward(
|
||||
controller: controller,
|
||||
inputFormatters: inputFormatters,
|
||||
maxLength: maxLength,
|
||||
onChanged: onChanged,
|
||||
);
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
if (key.isLeftKey || key.isRightKey) {
|
||||
return _moveCaretHorizontally(controller, key.isLeftKey ? -1 : 1);
|
||||
}
|
||||
|
||||
final character = event.character;
|
||||
if (character != null && character.isNotEmpty && !key.isNavigationKey && !_isControlCharacter(character)) {
|
||||
_insertText(
|
||||
controller: controller,
|
||||
text: character,
|
||||
inputFormatters: inputFormatters,
|
||||
maxLength: maxLength,
|
||||
onChanged: onChanged,
|
||||
);
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
|
||||
bool _isMultilineTextInput({TextInputType? keyboardType, int? maxLines}) {
|
||||
return keyboardType?.index == TextInputType.multiline.index || (maxLines != null && maxLines != 1);
|
||||
}
|
||||
|
||||
bool _isControlCharacter(String text) {
|
||||
return text.runes.every((codeUnit) => codeUnit < 0x20 || codeUnit == 0x7f);
|
||||
}
|
||||
|
||||
KeyEventResult _moveCaretHorizontally(TextEditingController controller, int delta) {
|
||||
final value = controller.value;
|
||||
final selection = value.selection;
|
||||
if (!selection.isValid) {
|
||||
controller.selection = TextSelection.collapsed(offset: value.text.length);
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
if (!selection.isCollapsed) {
|
||||
final offset = delta < 0
|
||||
? (selection.start < selection.end ? selection.start : selection.end)
|
||||
: (selection.start > selection.end ? selection.start : selection.end);
|
||||
controller.selection = TextSelection.collapsed(offset: offset);
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
final nextOffset = selection.extentOffset + delta;
|
||||
if (nextOffset < 0 || nextOffset > value.text.length) return KeyEventResult.ignored;
|
||||
controller.selection = TextSelection.collapsed(offset: nextOffset);
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
void _submitTextInput({
|
||||
required TextEditingController controller,
|
||||
required TextInputAction? textInputAction,
|
||||
ValueChanged<String>? onSubmitted,
|
||||
VoidCallback? onEditingComplete,
|
||||
}) {
|
||||
if (onEditingComplete != null) {
|
||||
onEditingComplete();
|
||||
} else {
|
||||
_defaultEditingComplete(textInputAction);
|
||||
}
|
||||
onSubmitted?.call(controller.text);
|
||||
}
|
||||
|
||||
void _defaultEditingComplete(TextInputAction? textInputAction) {
|
||||
final focus = FocusManager.instance.primaryFocus;
|
||||
switch (textInputAction) {
|
||||
case TextInputAction.next:
|
||||
focus?.nextFocus();
|
||||
case TextInputAction.previous:
|
||||
focus?.previousFocus();
|
||||
default:
|
||||
focus?.unfocus();
|
||||
}
|
||||
}
|
||||
|
||||
void _insertText({
|
||||
required TextEditingController controller,
|
||||
required String text,
|
||||
List<TextInputFormatter>? inputFormatters,
|
||||
int? maxLength,
|
||||
ValueChanged<String>? onChanged,
|
||||
}) {
|
||||
final value = controller.value;
|
||||
final selection = value.selection;
|
||||
final start = selection.isValid
|
||||
? (selection.start < selection.end ? selection.start : selection.end)
|
||||
: value.text.length;
|
||||
final end = selection.isValid
|
||||
? (selection.start > selection.end ? selection.start : selection.end)
|
||||
: value.text.length;
|
||||
final newText = value.text.replaceRange(start, end, text);
|
||||
_replaceTextValue(
|
||||
controller: controller,
|
||||
nextValue: value.copyWith(
|
||||
text: newText,
|
||||
selection: TextSelection.collapsed(offset: start + text.length),
|
||||
composing: TextRange.empty,
|
||||
),
|
||||
inputFormatters: inputFormatters,
|
||||
maxLength: maxLength,
|
||||
onChanged: onChanged,
|
||||
);
|
||||
}
|
||||
|
||||
void _backspace({
|
||||
required TextEditingController controller,
|
||||
List<TextInputFormatter>? inputFormatters,
|
||||
int? maxLength,
|
||||
ValueChanged<String>? onChanged,
|
||||
}) {
|
||||
final value = controller.value;
|
||||
final selection = value.selection;
|
||||
final start = selection.isValid
|
||||
? (selection.start < selection.end ? selection.start : selection.end)
|
||||
: value.text.length;
|
||||
final end = selection.isValid
|
||||
? (selection.start > selection.end ? selection.start : selection.end)
|
||||
: value.text.length;
|
||||
if (start != end) {
|
||||
_replaceTextRange(
|
||||
controller,
|
||||
start,
|
||||
end,
|
||||
inputFormatters: inputFormatters,
|
||||
maxLength: maxLength,
|
||||
onChanged: onChanged,
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (start == 0) return;
|
||||
_replaceTextRange(
|
||||
controller,
|
||||
start - 1,
|
||||
start,
|
||||
inputFormatters: inputFormatters,
|
||||
maxLength: maxLength,
|
||||
onChanged: onChanged,
|
||||
);
|
||||
}
|
||||
|
||||
void _deleteForward({
|
||||
required TextEditingController controller,
|
||||
List<TextInputFormatter>? inputFormatters,
|
||||
int? maxLength,
|
||||
ValueChanged<String>? onChanged,
|
||||
}) {
|
||||
final value = controller.value;
|
||||
final selection = value.selection;
|
||||
final start = selection.isValid
|
||||
? (selection.start < selection.end ? selection.start : selection.end)
|
||||
: value.text.length;
|
||||
final end = selection.isValid
|
||||
? (selection.start > selection.end ? selection.start : selection.end)
|
||||
: value.text.length;
|
||||
if (start != end) {
|
||||
_replaceTextRange(
|
||||
controller,
|
||||
start,
|
||||
end,
|
||||
inputFormatters: inputFormatters,
|
||||
maxLength: maxLength,
|
||||
onChanged: onChanged,
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (start >= value.text.length) return;
|
||||
_replaceTextRange(
|
||||
controller,
|
||||
start,
|
||||
start + 1,
|
||||
inputFormatters: inputFormatters,
|
||||
maxLength: maxLength,
|
||||
onChanged: onChanged,
|
||||
);
|
||||
}
|
||||
|
||||
void _replaceTextRange(
|
||||
TextEditingController controller,
|
||||
int start,
|
||||
int end, {
|
||||
List<TextInputFormatter>? inputFormatters,
|
||||
int? maxLength,
|
||||
ValueChanged<String>? onChanged,
|
||||
}) {
|
||||
final value = controller.value;
|
||||
_replaceTextValue(
|
||||
controller: controller,
|
||||
nextValue: value.copyWith(
|
||||
text: value.text.replaceRange(start, end, ''),
|
||||
selection: TextSelection.collapsed(offset: start),
|
||||
composing: TextRange.empty,
|
||||
),
|
||||
inputFormatters: inputFormatters,
|
||||
maxLength: maxLength,
|
||||
onChanged: onChanged,
|
||||
);
|
||||
}
|
||||
|
||||
void _replaceTextValue({
|
||||
required TextEditingController controller,
|
||||
required TextEditingValue nextValue,
|
||||
List<TextInputFormatter>? inputFormatters,
|
||||
int? maxLength,
|
||||
ValueChanged<String>? onChanged,
|
||||
}) {
|
||||
final previousValue = controller.value;
|
||||
var formattedValue = nextValue;
|
||||
final formatters = [
|
||||
...?inputFormatters,
|
||||
if (maxLength != null && maxLength > 0) LengthLimitingTextInputFormatter(maxLength),
|
||||
];
|
||||
for (final formatter in formatters) {
|
||||
formattedValue = formatter.formatEditUpdate(previousValue, formattedValue);
|
||||
}
|
||||
|
||||
controller.value = formattedValue;
|
||||
if (formattedValue.text != previousValue.text) {
|
||||
onChanged?.call(formattedValue.text);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _FocusableTextInputBase extends StatelessWidget {
|
||||
final TextEditingController controller;
|
||||
final FocusNode? focusNode;
|
||||
final InputDecoration? decoration;
|
||||
final TextInputType? keyboardType;
|
||||
final TextInputAction? textInputAction;
|
||||
final List<TextInputFormatter>? inputFormatters;
|
||||
final ValueChanged<String>? onChanged;
|
||||
final ValueChanged<String>? onSubmitted;
|
||||
final VoidCallback? onEditingComplete;
|
||||
final VoidCallback? onSelect;
|
||||
final VoidCallback? onBack;
|
||||
final bool autofocus;
|
||||
final bool enabled;
|
||||
final bool enableTvKeyboard;
|
||||
final bool obscureText;
|
||||
final bool autocorrect;
|
||||
final bool enableSuggestions;
|
||||
final bool? enableInteractiveSelection;
|
||||
final int? maxLength;
|
||||
final int? maxLines;
|
||||
final int? minLines;
|
||||
final TextAlign textAlign;
|
||||
final TextCapitalization textCapitalization;
|
||||
final TextStyle? style;
|
||||
|
||||
final VoidCallback? onNavigateLeft;
|
||||
final VoidCallback? onNavigateRight;
|
||||
final VoidCallback? onNavigateUp;
|
||||
final VoidCallback? onNavigateDown;
|
||||
|
||||
const _FocusableTextInputBase({
|
||||
super.key,
|
||||
required this.controller,
|
||||
this.focusNode,
|
||||
this.decoration,
|
||||
this.keyboardType,
|
||||
this.textInputAction,
|
||||
this.inputFormatters,
|
||||
this.onChanged,
|
||||
this.onSubmitted,
|
||||
this.onEditingComplete,
|
||||
this.onSelect,
|
||||
this.onBack,
|
||||
this.autofocus = false,
|
||||
this.enabled = true,
|
||||
this.enableTvKeyboard = true,
|
||||
this.obscureText = false,
|
||||
this.autocorrect = true,
|
||||
this.enableSuggestions = true,
|
||||
this.enableInteractiveSelection,
|
||||
this.maxLength,
|
||||
this.maxLines = 1,
|
||||
this.minLines,
|
||||
this.textAlign = TextAlign.start,
|
||||
this.textCapitalization = TextCapitalization.none,
|
||||
this.style,
|
||||
this.onNavigateLeft,
|
||||
this.onNavigateRight,
|
||||
this.onNavigateUp,
|
||||
this.onNavigateDown,
|
||||
});
|
||||
|
||||
bool get _hasTvKeyboard => _usesTvKeyboard(enableTvKeyboard);
|
||||
|
||||
void _showTvKeyboard(BuildContext context) {
|
||||
if (!enabled) return;
|
||||
showTvVirtualKeyboard(
|
||||
context: context,
|
||||
controller: controller,
|
||||
hintText: _keyboardHint(decoration),
|
||||
keyboardType: keyboardType,
|
||||
textInputAction: textInputAction,
|
||||
inputFormatters: inputFormatters,
|
||||
obscureText: obscureText,
|
||||
maxLength: maxLength,
|
||||
maxLines: maxLines,
|
||||
onChanged: onChanged,
|
||||
onSubmitted: onSubmitted,
|
||||
onAction: onEditingComplete ?? onSelect,
|
||||
);
|
||||
}
|
||||
|
||||
KeyEventResult _handleKey(BuildContext context, FocusNode _, KeyEvent event) {
|
||||
return _handleInputKey(
|
||||
controller: controller,
|
||||
usesTvKeyboard: _hasTvKeyboard,
|
||||
enabled: enabled,
|
||||
openKeyboard: () => _showTvKeyboard(context),
|
||||
event: event,
|
||||
keyboardType: keyboardType,
|
||||
textInputAction: textInputAction,
|
||||
inputFormatters: inputFormatters,
|
||||
onChanged: onChanged,
|
||||
onSubmitted: onSubmitted,
|
||||
onEditingComplete: onEditingComplete,
|
||||
maxLength: maxLength,
|
||||
maxLines: maxLines,
|
||||
onSelect: onSelect,
|
||||
onBack: onBack,
|
||||
onNavigateLeft: onNavigateLeft,
|
||||
onNavigateRight: onNavigateRight,
|
||||
onNavigateUp: onNavigateUp,
|
||||
onNavigateDown: onNavigateDown,
|
||||
);
|
||||
}
|
||||
|
||||
Widget buildFocusableInput(BuildContext context, Widget Function(bool usesTvKeyboard) builder) {
|
||||
final usesTvKeyboard = _hasTvKeyboard;
|
||||
return Focus(
|
||||
// This wrapper only intercepts key events bubbling from the input; the
|
||||
// real TextField/TextFormField must remain the traversable focus target.
|
||||
canRequestFocus: false,
|
||||
skipTraversal: true,
|
||||
onKeyEvent: (node, event) => _handleKey(context, node, event),
|
||||
child: builder(usesTvKeyboard),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// A [TextField] wrapper that exposes D-pad navigation callbacks with
|
||||
/// caret-aware edge escapes — so LEFT at the start of the field and RIGHT
|
||||
/// at the end escape to neighbouring focus targets instead of bouncing
|
||||
/// against the caret boundary, while UP/DOWN always escape.
|
||||
///
|
||||
/// Collapsed selection only: if text is selected, LEFT/RIGHT fall through
|
||||
/// to the TextField's default caret movement.
|
||||
class FocusableTextField extends _FocusableTextInputBase {
|
||||
const FocusableTextField({
|
||||
super.key,
|
||||
required super.controller,
|
||||
super.focusNode,
|
||||
super.decoration,
|
||||
super.keyboardType,
|
||||
super.textInputAction,
|
||||
super.inputFormatters,
|
||||
super.onChanged,
|
||||
super.onSubmitted,
|
||||
super.onEditingComplete,
|
||||
super.onSelect,
|
||||
super.onBack,
|
||||
super.autofocus,
|
||||
super.enabled,
|
||||
super.enableTvKeyboard,
|
||||
super.obscureText,
|
||||
super.autocorrect,
|
||||
super.enableSuggestions,
|
||||
super.enableInteractiveSelection,
|
||||
super.maxLength,
|
||||
super.maxLines,
|
||||
super.minLines,
|
||||
super.textAlign,
|
||||
super.textCapitalization,
|
||||
super.style,
|
||||
super.onNavigateLeft,
|
||||
super.onNavigateRight,
|
||||
super.onNavigateUp,
|
||||
super.onNavigateDown,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return buildFocusableInput(
|
||||
context,
|
||||
(usesTvKeyboard) => TextField(
|
||||
controller: controller,
|
||||
focusNode: focusNode,
|
||||
enabled: enabled,
|
||||
decoration: decoration,
|
||||
keyboardType: usesTvKeyboard ? TextInputType.none : keyboardType,
|
||||
textInputAction: textInputAction,
|
||||
inputFormatters: inputFormatters,
|
||||
onChanged: onChanged,
|
||||
onSubmitted: onSubmitted,
|
||||
onEditingComplete: onEditingComplete,
|
||||
autofocus: autofocus,
|
||||
autocorrect: autocorrect,
|
||||
enableSuggestions: enableSuggestions,
|
||||
obscureText: obscureText,
|
||||
maxLength: maxLength,
|
||||
maxLines: maxLines,
|
||||
minLines: minLines,
|
||||
textAlign: textAlign,
|
||||
textCapitalization: textCapitalization,
|
||||
style: style,
|
||||
readOnly: usesTvKeyboard,
|
||||
showCursor: usesTvKeyboard ? true : null,
|
||||
enableInteractiveSelection: usesTvKeyboard ? false : enableInteractiveSelection,
|
||||
onTap: usesTvKeyboard ? () => _showTvKeyboard(context) : null,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class FocusableTextFormField extends _FocusableTextInputBase {
|
||||
final ValueChanged<String>? onFieldSubmitted;
|
||||
final FormFieldValidator<String>? validator;
|
||||
final AutovalidateMode? autovalidateMode;
|
||||
final FormFieldSetter<String>? onSaved;
|
||||
|
||||
const FocusableTextFormField({
|
||||
super.key,
|
||||
required super.controller,
|
||||
super.focusNode,
|
||||
super.decoration,
|
||||
super.keyboardType,
|
||||
super.textInputAction,
|
||||
super.inputFormatters,
|
||||
super.onChanged,
|
||||
this.onFieldSubmitted,
|
||||
super.onEditingComplete,
|
||||
super.onSelect,
|
||||
super.onBack,
|
||||
this.validator,
|
||||
this.autovalidateMode,
|
||||
this.onSaved,
|
||||
super.autofocus,
|
||||
super.enabled,
|
||||
super.enableTvKeyboard,
|
||||
super.obscureText,
|
||||
super.autocorrect,
|
||||
super.enableSuggestions,
|
||||
super.enableInteractiveSelection,
|
||||
super.maxLength,
|
||||
super.maxLines,
|
||||
super.minLines,
|
||||
super.textAlign,
|
||||
super.textCapitalization,
|
||||
super.style,
|
||||
super.onNavigateLeft,
|
||||
super.onNavigateRight,
|
||||
super.onNavigateUp,
|
||||
super.onNavigateDown,
|
||||
}) : super(onSubmitted: onFieldSubmitted);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return buildFocusableInput(
|
||||
context,
|
||||
(usesTvKeyboard) => TextFormField(
|
||||
controller: controller,
|
||||
focusNode: focusNode,
|
||||
enabled: enabled,
|
||||
decoration: decoration,
|
||||
keyboardType: usesTvKeyboard ? TextInputType.none : keyboardType,
|
||||
textInputAction: textInputAction,
|
||||
inputFormatters: inputFormatters,
|
||||
onChanged: onChanged,
|
||||
onFieldSubmitted: onFieldSubmitted,
|
||||
onEditingComplete: onEditingComplete,
|
||||
validator: validator,
|
||||
autovalidateMode: autovalidateMode,
|
||||
onSaved: onSaved,
|
||||
autofocus: autofocus,
|
||||
autocorrect: autocorrect,
|
||||
enableSuggestions: enableSuggestions,
|
||||
obscureText: obscureText,
|
||||
maxLength: maxLength,
|
||||
maxLines: maxLines,
|
||||
minLines: minLines,
|
||||
textAlign: textAlign,
|
||||
textCapitalization: textCapitalization,
|
||||
style: style,
|
||||
readOnly: usesTvKeyboard,
|
||||
showCursor: usesTvKeyboard ? true : null,
|
||||
enableInteractiveSelection: usesTvKeyboard ? false : enableInteractiveSelection,
|
||||
onTap: usesTvKeyboard ? () => _showTvKeyboard(context) : null,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../utils/scroll_utils.dart';
|
||||
|
||||
/// Manages the internal/external FocusNode lifecycle for list-tile widgets and
|
||||
/// auto-scrolls the tile into view when it gains focus.
|
||||
mixin FocusableTileStateMixin<T extends StatefulWidget> on State<T> {
|
||||
late FocusNode _effectiveFocusNode;
|
||||
bool _ownsNode = false;
|
||||
|
||||
FocusNode? get widgetFocusNode;
|
||||
|
||||
FocusNode get effectiveFocusNode => _effectiveFocusNode;
|
||||
|
||||
void initFocusNode() {
|
||||
if (widgetFocusNode != null) {
|
||||
_effectiveFocusNode = widgetFocusNode!;
|
||||
_ownsNode = false;
|
||||
} else {
|
||||
_effectiveFocusNode = FocusNode();
|
||||
_ownsNode = true;
|
||||
}
|
||||
_effectiveFocusNode.addListener(_onFocusChange);
|
||||
}
|
||||
|
||||
void updateFocusNode(FocusNode? oldFocusNode) {
|
||||
if (oldFocusNode != widgetFocusNode) {
|
||||
disposeFocusNode();
|
||||
initFocusNode();
|
||||
}
|
||||
}
|
||||
|
||||
void disposeFocusNode() {
|
||||
_effectiveFocusNode.removeListener(_onFocusChange);
|
||||
if (_ownsNode) _effectiveFocusNode.dispose();
|
||||
}
|
||||
|
||||
void _onFocusChange() {
|
||||
if (_effectiveFocusNode.hasFocus) {
|
||||
scrollContextToCenter(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,8 +136,8 @@ class _FocusableWrapperState extends State<FocusableWrapper> with SingleTickerPr
|
||||
bool _ownsNode = false;
|
||||
bool _isFocused = false;
|
||||
|
||||
late AnimationController _animationController;
|
||||
late Animation<double> _scaleAnimation;
|
||||
late final AnimationController _animationController;
|
||||
late final Animation<double> _scaleAnimation;
|
||||
|
||||
// Long-press detection for SELECT key
|
||||
Timer? _longPressTimer;
|
||||
@@ -306,6 +306,7 @@ class _FocusableWrapperState extends State<FocusableWrapper> with SingleTickerPr
|
||||
scrollDelta -= (_focusDecorationPadding - projectedItemTop);
|
||||
}
|
||||
|
||||
if (!position.maxScrollExtent.isFinite) return;
|
||||
final targetOffset = (currentOffset + scrollDelta).clamp(position.minScrollExtent, position.maxScrollExtent);
|
||||
|
||||
position.animateTo(targetOffset, duration: const Duration(milliseconds: 200), curve: Curves.easeInOut);
|
||||
@@ -365,12 +366,8 @@ class _FocusableWrapperState extends State<FocusableWrapper> with SingleTickerPr
|
||||
_isSelectKeyDown = false;
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
} else {
|
||||
// Simple select handling without long-press
|
||||
if (event is KeyDownEvent) {
|
||||
widget.onSelect?.call();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
} else if (widget.onSelect != null) {
|
||||
return handleOneShotSelect(event, widget.onSelect!);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,7 +426,12 @@ class _FocusableWrapperState extends State<FocusableWrapper> with SingleTickerPr
|
||||
// Choose decoration based on useBackgroundFocus
|
||||
final decoration = widget.useBackgroundFocus
|
||||
? FocusTheme.focusBackgroundDecoration(isFocused: showFocus, borderRadius: widget.borderRadius)
|
||||
: FocusTheme.focusDecoration(context, isFocused: showFocus, borderRadius: widget.borderRadius, color: widget.focusColor);
|
||||
: FocusTheme.focusDecoration(
|
||||
context,
|
||||
isFocused: showFocus,
|
||||
borderRadius: widget.borderRadius,
|
||||
color: widget.focusColor,
|
||||
);
|
||||
|
||||
Widget result = Focus(
|
||||
focusNode: _focusNode,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../utils/platform_detector.dart';
|
||||
import 'dpad_navigator.dart';
|
||||
|
||||
/// Handles back key events by popping the current route.
|
||||
@@ -52,10 +53,7 @@ class BackKeyCoordinator {
|
||||
}
|
||||
}
|
||||
|
||||
/// Handle a BACK key press by running [onBack] on key up.
|
||||
///
|
||||
/// This consumes KeyDown/KeyRepeat to avoid duplicate actions from key repeat.
|
||||
/// Optionally suppresses stray KeyUp events delivered to the next route after a pop.
|
||||
/// Consumes KeyDown/KeyRepeat to avoid duplicate actions, runs [onBack] on KeyUp.
|
||||
KeyEventResult handleBackKeyAction(KeyEvent event, VoidCallback onBack) {
|
||||
if (!event.logicalKey.isBackKey) return KeyEventResult.ignored;
|
||||
|
||||
@@ -64,6 +62,13 @@ KeyEventResult handleBackKeyAction(KeyEvent event, VoidCallback onBack) {
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
if (PlatformDetector.isAppleTV() && event.isPhysicalKeyboardEvent && event is KeyDownEvent) {
|
||||
BackKeyCoordinator.markHandled();
|
||||
BackKeyUpSuppressor.suppressBackUntilKeyUp();
|
||||
onBack();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
if (event is KeyUpEvent) {
|
||||
BackKeyCoordinator.markHandled();
|
||||
// Mark that we're closing via back key so suppressBackUntilKeyUp() knows to skip
|
||||
@@ -78,11 +83,28 @@ KeyEventResult handleBackKeyAction(KeyEvent event, VoidCallback onBack) {
|
||||
}
|
||||
|
||||
KeyEventResult handleBackKeyNavigation<T>(BuildContext context, KeyEvent event, {T? result}) {
|
||||
// Let system handle back if there's nothing to pop (e.g. root screen)
|
||||
if (!Navigator.canPop(context)) {
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
// Don't handle back when a dialog/overlay is on top of our route —
|
||||
// the overlay handles its own dismissal via DismissAction.
|
||||
if (ModalRoute.of(context)?.isCurrent != true) {
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
// Handle on KeyUpEvent to prevent double-pop when returning from child screens
|
||||
// (KeyDownEvent can be received by both the popping screen and the returned-to screen)
|
||||
return handleBackKeyAction(event, () => Navigator.pop(context, result));
|
||||
}
|
||||
|
||||
/// Consumes all select-key events (down, repeat, up) so they don't reach
|
||||
/// platform-level handlers; fires [onActivate] on the initial KeyDown only.
|
||||
KeyEventResult handleOneShotSelect(KeyEvent event, VoidCallback onActivate) {
|
||||
if (!event.logicalKey.isSelectKey) return KeyEventResult.ignored;
|
||||
if (event is KeyDownEvent) onActivate();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
/// Creates a [FocusOnKeyEventCallback] that dispatches d-pad / arrow keys to
|
||||
/// the provided directional callbacks.
|
||||
///
|
||||
@@ -90,7 +112,8 @@ KeyEventResult handleBackKeyNavigation<T>(BuildContext context, KeyEvent event,
|
||||
/// (passed through to the framework). Directions mapped to a callback
|
||||
/// automatically return [KeyEventResult.handled].
|
||||
///
|
||||
/// Only [KeyDownEvent] and [KeyRepeatEvent] are handled (via [isActionable]).
|
||||
/// Directional keys repeat on [KeyRepeatEvent] (via [isActionable]).
|
||||
/// Select is one-shot: fires on [KeyDownEvent] only, consumes repeat and up.
|
||||
///
|
||||
/// ```dart
|
||||
/// Focus(
|
||||
@@ -111,6 +134,13 @@ FocusOnKeyEventCallback dpadKeyHandler({
|
||||
VoidCallback? onSelect,
|
||||
}) {
|
||||
return (FocusNode _, KeyEvent event) {
|
||||
// Select: one-shot activation (no repeat), must run before isActionable
|
||||
// filter so KeyUpEvent is also consumed.
|
||||
if (onSelect != null) {
|
||||
final result = handleOneShotSelect(event, onSelect);
|
||||
if (result != KeyEventResult.ignored) return result;
|
||||
}
|
||||
|
||||
if (!event.isActionable) return KeyEventResult.ignored;
|
||||
final key = event.logicalKey;
|
||||
|
||||
@@ -130,10 +160,6 @@ FocusOnKeyEventCallback dpadKeyHandler({
|
||||
onRight();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
if (key.isSelectKey && onSelect != null) {
|
||||
onSelect();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
return KeyEventResult.ignored;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
mixin KeyRepeatHelper<T extends StatefulWidget> on State<T> {
|
||||
static const _initialDelay = Duration(milliseconds: 400);
|
||||
static const _repeatInterval = Duration(milliseconds: 100);
|
||||
|
||||
Timer? _repeatTimer;
|
||||
|
||||
void startRepeat(VoidCallback action) {
|
||||
action();
|
||||
_repeatTimer?.cancel();
|
||||
_repeatTimer = Timer(_initialDelay, () {
|
||||
_repeatTimer = Timer.periodic(_repeatInterval, (_) => action());
|
||||
});
|
||||
}
|
||||
|
||||
void stopRepeat() {
|
||||
_repeatTimer?.cancel();
|
||||
_repeatTimer = null;
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,6 @@ class HubFocusMemory {
|
||||
static final Map<String, int> _perHubMemory = {};
|
||||
static int _lastColumnHint = 0;
|
||||
|
||||
/// Remember the focused index for a specific hub
|
||||
static void setForHub(String hubKey, int index) {
|
||||
_perHubMemory[hubKey] = index;
|
||||
_lastColumnHint = index;
|
||||
|
||||
@@ -3,13 +3,22 @@
|
||||
"title": "Plezy"
|
||||
},
|
||||
"auth": {
|
||||
"signIn": "Log ind",
|
||||
"signInWithPlex": "Log ind med Plex",
|
||||
"showQRCode": "Vis QR-kode",
|
||||
"authenticate": "Godkend",
|
||||
"authenticationTimeout": "Godkendelse fik timeout. Prøv igen.",
|
||||
"scanQRToSignIn": "Scan denne QR-kode for at logge ind",
|
||||
"waitingForAuth": "Venter på godkendelse...\nFærdiggør login i din browser.",
|
||||
"useBrowser": "Brug browser"
|
||||
"waitingForAuth": "Venter på godkendelse...\nLog ind fra din browser.",
|
||||
"useBrowser": "Brug browser",
|
||||
"or": "eller",
|
||||
"connectToJellyfin": "Forbind til Jellyfin",
|
||||
"useQuickConnect": "Brug Quick Connect",
|
||||
"quickConnectCode": "Quick Connect-kode",
|
||||
"quickConnectInstructions": "Åbn Quick Connect i Jellyfin, og indtast denne kode.",
|
||||
"quickConnectWaiting": "Venter på godkendelse…",
|
||||
"quickConnectCancel": "Annullér",
|
||||
"quickConnectExpired": "Quick Connect er udløbet. Prøv igen."
|
||||
},
|
||||
"common": {
|
||||
"cancel": "Annuller",
|
||||
@@ -30,7 +39,6 @@
|
||||
"shuffle": "Bland",
|
||||
"addTo": "Tilføj til...",
|
||||
"createNew": "Opret ny",
|
||||
"paste": "Indsæt",
|
||||
"connect": "Forbind",
|
||||
"disconnect": "Afbryd",
|
||||
"play": "Afspil",
|
||||
@@ -44,16 +52,17 @@
|
||||
"mute": "Lydløs",
|
||||
"ok": "OK",
|
||||
"reconnect": "Genopret forbindelse",
|
||||
"exitConfirmTitle": "Luk app?",
|
||||
"exitConfirmMessage": "Er du sikker på, at du vil afslutte?",
|
||||
"dontAskAgain": "Spørg ikke igen",
|
||||
"exit": "Afslut",
|
||||
"viewAll": "Vis alle",
|
||||
"checkingNetwork": "Tjekker netværk...",
|
||||
"refreshingServers": "Opdaterer servere...",
|
||||
"loadingServers": "Indlæser servere...",
|
||||
"connectingToServers": "Forbinder til servere...",
|
||||
"startingOfflineMode": "Starter offlinetilstand..."
|
||||
"startingOfflineMode": "Starter offlinetilstand...",
|
||||
"loading": "Indlæser...",
|
||||
"fullscreen": "Fuldskærm",
|
||||
"exitFullscreen": "Forlad fuldskærm",
|
||||
"pressBackAgainToExit": "Tryk tilbage igen for at afslutte"
|
||||
},
|
||||
"screens": {
|
||||
"licenses": "Licenser",
|
||||
@@ -73,18 +82,18 @@
|
||||
},
|
||||
"settings": {
|
||||
"title": "Indstillinger",
|
||||
"supportDeveloper": "Støt Plezy",
|
||||
"supportDeveloperDescription": "Doner via Liberapay for at finansiere udviklingen",
|
||||
"language": "Sprog",
|
||||
"theme": "Tema",
|
||||
"appearance": "Udseende",
|
||||
"videoPlayback": "Videoafspilning",
|
||||
"videoPlaybackDescription": "Konfigurer afspilningsadfærd",
|
||||
"advanced": "Avanceret",
|
||||
"episodePosterMode": "Episodeplakatstil",
|
||||
"seriesPoster": "Serieplakat",
|
||||
"seriesPosterDescription": "Vis seriens plakat for alle episoder",
|
||||
"seasonPoster": "Sæsonplakat",
|
||||
"seasonPosterDescription": "Vis sæsonspecifik plakat for episoder",
|
||||
"episodeThumbnail": "Episodeminiature",
|
||||
"episodeThumbnailDescription": "Vis 16:9 episodeskærmbilledeminiaturer",
|
||||
"episodeThumbnail": "Miniature",
|
||||
"showHeroSectionDescription": "Vis karrusel med udvalgt indhold på startskærmen",
|
||||
"secondsLabel": "Sekunder",
|
||||
"minutesLabel": "Minutter",
|
||||
@@ -92,63 +101,65 @@
|
||||
"minutesShort": "m",
|
||||
"durationHint": "Indtast varighed (${min}-${max})",
|
||||
"systemTheme": "System",
|
||||
"systemThemeDescription": "Følg systemindstillinger",
|
||||
"lightTheme": "Lys",
|
||||
"darkTheme": "Mørk",
|
||||
"oledTheme": "OLED",
|
||||
"oledThemeDescription": "Ren sort for OLED-skærme",
|
||||
"libraryDensity": "Bibliotekstæthed",
|
||||
"compact": "Kompakt",
|
||||
"compactDescription": "Mindre kort, flere synlige elementer",
|
||||
"normal": "Normal",
|
||||
"normalDescription": "Standardstørrelse",
|
||||
"comfortable": "Komfortabel",
|
||||
"comfortableDescription": "Større kort, færre synlige elementer",
|
||||
"viewMode": "Visningstilstand",
|
||||
"gridView": "Gitter",
|
||||
"gridViewDescription": "Vis elementer i gitterlayout",
|
||||
"listView": "Liste",
|
||||
"listViewDescription": "Vis elementer i listelayout",
|
||||
"showHeroSection": "Vis hero-sektion",
|
||||
"useGlobalHubs": "Brug Plex Home-layout",
|
||||
"useGlobalHubsDescription": "Vis startsidehubbe som den officielle Plex-klient. Når slået fra, vises anbefalinger per bibliotek.",
|
||||
"useGlobalHubs": "Brug startlayout",
|
||||
"useGlobalHubsDescription": "Vis samlet startsideindhold. Brug ellers biblioteksanbefalinger.",
|
||||
"showServerNameOnHubs": "Vis servernavn på hubbe",
|
||||
"showServerNameOnHubsDescription": "Vis altid servernavnet i hubtitler. Når slået fra, vises kun ved duplikerede navne.",
|
||||
"showServerNameOnHubsDescription": "Vis altid servernavne i hubtitler.",
|
||||
"groupLibrariesByServer": "Grupper biblioteker efter server",
|
||||
"groupLibrariesByServerDescription": "Gruppér sidebar-biblioteker under hver medieserver.",
|
||||
"alwaysKeepSidebarOpen": "Hold altid sidepanelet åbent",
|
||||
"alwaysKeepSidebarOpenDescription": "Sidepanelet forbliver udvidet, og indholdsområdet tilpasser sig",
|
||||
"showUnwatchedCount": "Vis antal usete",
|
||||
"showUnwatchedCountDescription": "Vis antal usete episoder på serier og sæsoner",
|
||||
"showEpisodeNumberOnCards": "Vis episodenummer på kort",
|
||||
"showEpisodeNumberOnCardsDescription": "Vis sæson- og episodenummer på episodekort",
|
||||
"showSeasonPostersOnTabs": "Vis sæsonplakater på faner",
|
||||
"showSeasonPostersOnTabsDescription": "Vis hver sæsons plakat over dens fane",
|
||||
"hideSpoilers": "Skjul spoilere for usete episoder",
|
||||
"hideSpoilersDescription": "Slør miniaturebilleder og skjul beskrivelser for episoder, du ikke har set endnu",
|
||||
"hideSpoilersDescription": "Slør miniaturebilleder og beskrivelser for usete episoder",
|
||||
"playerBackend": "Afspillerbackend",
|
||||
"exoPlayer": "ExoPlayer (Anbefalet)",
|
||||
"exoPlayerDescription": "Android-native afspiller med bedre hardwareunderstøttelse",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "Avanceret afspiller med flere funktioner og ASS-undertekstunderstøttelse",
|
||||
"hardwareDecoding": "Hardwaredekodning",
|
||||
"hardwareDecodingDescription": "Brug hardwareacceleration når tilgængelig",
|
||||
"bufferSize": "Bufferstørrelse",
|
||||
"bufferSizeMB": "${size}MB",
|
||||
"bufferSizeAuto": "Auto (Anbefalet)",
|
||||
"bufferSizeWarning": "Din enhed har ${heap}MB hukommelse. En buffer på ${size}MB kan forårsage afspilningsproblemer.",
|
||||
"bufferSizeWarning": "${heap}MB hukommelse tilgængelig. En buffer på ${size}MB kan påvirke afspilning.",
|
||||
"defaultQualityTitle": "Standardkvalitet",
|
||||
"defaultQualityDescription": "Bruges ved start af afspilning. Lavere værdier reducerer båndbredden.",
|
||||
"subtitleStyling": "Undertekststil",
|
||||
"subtitleStylingDescription": "Tilpas underteksters udseende",
|
||||
"smallSkipDuration": "Kort spring-varighed",
|
||||
"largeSkipDuration": "Lang spring-varighed",
|
||||
"rewindOnResume": "Spol tilbage ved genoptagelse",
|
||||
"rewindOnResumeDescription": "Spol tilbage med denne mængde ved genoptagelse af afspilning",
|
||||
"secondsUnit": "${seconds} sekunder",
|
||||
"defaultSleepTimer": "Standard sove-timer",
|
||||
"minutesUnit": "${minutes} minutter",
|
||||
"rememberTrackSelections": "Husk sporvalg per serie/film",
|
||||
"rememberTrackSelectionsDescription": "Gem automatisk lyd- og undertekstsprogpræferencer når du skifter spor under afspilning",
|
||||
"rememberTrackSelectionsDescription": "Husk lyd- og undertekstvalg pr. titel",
|
||||
"showChapterMarkersOnTimeline": "Vis kapitelmarkører på tidslinjen",
|
||||
"showChapterMarkersOnTimelineDescription": "Opdel tidslinjen ved kapitelgrænser",
|
||||
"clickVideoTogglesPlayback": "Klik på video skifter afspil/pause",
|
||||
"clickVideoTogglesPlaybackDescription": "Når aktiveret, afspiller/pauser klik på videoen. Ellers vises/skjules betjeningselementer.",
|
||||
"clickVideoTogglesPlaybackDescription": "Klik på video for at afspille/pause i stedet for at vise kontroller.",
|
||||
"videoPlayerControls": "Videoafspillerkontroller",
|
||||
"keyboardShortcuts": "Tastaturgenveje",
|
||||
"keyboardShortcutsDescription": "Tilpas tastaturgenveje",
|
||||
"videoPlayerNavigation": "Videoafspillernavigation",
|
||||
"videoPlayerNavigationDescription": "Brug piletaster til at navigere videoafspillerkontroller",
|
||||
"watchTogetherRelay": "Watch Together-relay",
|
||||
"watchTogetherRelayDescription": "Angiv en brugerdefineret relay. Alle skal bruge samme server.",
|
||||
"watchTogetherRelayHint": "https://min-relay.eksempel.dk",
|
||||
"crashReporting": "Fejlrapportering",
|
||||
"crashReportingDescription": "Send fejlrapporter for at hjælpe med at forbedre appen",
|
||||
"debugLogging": "Fejlfindingslogning",
|
||||
@@ -156,17 +167,31 @@
|
||||
"viewLogs": "Vis logs",
|
||||
"viewLogsDescription": "Vis applikationslogs",
|
||||
"clearCache": "Ryd cache",
|
||||
"clearCacheDescription": "Dette rydder alle cachelagrede billeder og data. Appen kan tage længere tid om at indlæse indhold efter rydning.",
|
||||
"clearCacheDescription": "Ryd cachelagrede billeder og data. Indhold kan indlæses langsommere.",
|
||||
"clearCacheSuccess": "Cache ryddet",
|
||||
"resetSettings": "Nulstil indstillinger",
|
||||
"resetSettingsDescription": "Alle indstillinger nulstilles til standardværdier. Denne handling kan ikke fortrydes.",
|
||||
"resetSettingsDescription": "Gendan standardindstillinger. Dette kan ikke fortrydes.",
|
||||
"resetSettingsSuccess": "Indstillinger nulstillet",
|
||||
"backup": "Sikkerhedskopi",
|
||||
"exportSettings": "Eksportér indstillinger",
|
||||
"exportSettingsDescription": "Gem dine præferencer i en fil",
|
||||
"exportSettingsSuccess": "Indstillinger eksporteret",
|
||||
"exportSettingsFailed": "Kunne ikke eksportere indstillinger",
|
||||
"importSettings": "Importér indstillinger",
|
||||
"importSettingsDescription": "Gendan præferencer fra en fil",
|
||||
"importSettingsConfirm": "Dette vil erstatte dine nuværende indstillinger. Fortsæt?",
|
||||
"importSettingsSuccess": "Indstillinger importeret",
|
||||
"importSettingsFailed": "Kunne ikke importere indstillinger",
|
||||
"importSettingsInvalidFile": "Denne fil er ikke en gyldig Plezy-indstillingseksport",
|
||||
"importSettingsNoUser": "Log ind før import af indstillinger",
|
||||
"shortcutsReset": "Genveje nulstillet til standard",
|
||||
"about": "Om",
|
||||
"aboutDescription": "App-information og licenser",
|
||||
"updates": "Opdateringer",
|
||||
"updateAvailable": "Opdatering tilgængelig",
|
||||
"checkForUpdates": "Søg efter opdateringer",
|
||||
"autoCheckUpdatesOnStartup": "Søg automatisk efter opdateringer ved opstart",
|
||||
"autoCheckUpdatesOnStartupDescription": "Giv besked, når en opdatering er tilgængelig ved start",
|
||||
"validationErrorEnterNumber": "Indtast et gyldigt tal",
|
||||
"validationErrorDuration": "Varighed skal være mellem ${min} og ${max} ${unit}",
|
||||
"shortcutAlreadyAssigned": "Genvej allerede tildelt til ${action}",
|
||||
@@ -176,6 +201,8 @@
|
||||
"autoSkipIntroDescription": "Spring automatisk intromarkører over efter få sekunder",
|
||||
"autoSkipCredits": "Auto-spring rulletekster",
|
||||
"autoSkipCreditsDescription": "Spring automatisk rulletekster over og afspil næste episode",
|
||||
"forceSkipMarkerFallback": "Tving reservemarkører",
|
||||
"forceSkipMarkerFallbackDescription": "Brug mønstre i kapiteltitler, selv når Plex har markører",
|
||||
"autoSkipDelay": "Auto-spring forsinkelse",
|
||||
"autoSkipDelayDescription": "Vent ${seconds} sekunder før automatisk spring",
|
||||
"introPattern": "Intromarkørmønster",
|
||||
@@ -196,26 +223,52 @@
|
||||
"downloadLocationSelectError": "Kunne ikke vælge mappe",
|
||||
"downloadOnWifiOnly": "Download kun på WiFi",
|
||||
"downloadOnWifiOnlyDescription": "Forhindre downloads på mobildata",
|
||||
"cellularDownloadBlocked": "Downloads er deaktiveret på mobildata. Opret forbindelse til WiFi eller ændr indstillingen.",
|
||||
"autoRemoveWatchedDownloads": "Fjern sete downloads automatisk",
|
||||
"autoRemoveWatchedDownloadsDescription": "Slet sete downloads automatisk",
|
||||
"cellularDownloadBlocked": "Downloads er blokeret på mobilnetværk. Brug WiFi eller skift indstilling.",
|
||||
"maxVolume": "Maksimal lydstyrke",
|
||||
"maxVolumeDescription": "Tillad lydstyrkeforstærkning over 100% for stille medier",
|
||||
"maxVolumePercent": "${percent}%",
|
||||
"discordRichPresence": "Discord Rich Presence",
|
||||
"discordRichPresenceDescription": "Vis hvad du ser på Discord",
|
||||
"trakt": "Trakt",
|
||||
"traktDescription": "Synkroniser visningshistorik med Trakt",
|
||||
"trackers": "Trackere",
|
||||
"trackersDescription": "Synkroniser fremgang til Trakt, MyAnimeList, AniList og Simkl",
|
||||
"companionRemoteServer": "Companion Remote Server",
|
||||
"companionRemoteServerDescription": "Tillad mobilenheder på dit netværk at styre denne app",
|
||||
"autoPip": "Auto billede-i-billede",
|
||||
"autoPipDescription": "Gå automatisk til billede-i-billede når du forlader appen under afspilning",
|
||||
"autoPipDescription": "Gå i billede-i-billede, når du forlader under afspilning",
|
||||
"matchContentFrameRate": "Match indholdets billedhastighed",
|
||||
"matchContentFrameRateDescription": "Juster skærmens opdateringshastighed til videoindhold for at reducere hakken og spare batteri",
|
||||
"matchContentFrameRateDescription": "Tilpas skærmens opdateringsfrekvens til videoindhold",
|
||||
"matchRefreshRate": "Match opdateringshastighed",
|
||||
"matchRefreshRateDescription": "Tilpas skærmens opdateringsfrekvens i fuld skærm",
|
||||
"matchDynamicRange": "Match dynamisk område",
|
||||
"matchDynamicRangeDescription": "Slå HDR til for HDR-indhold og derefter tilbage til SDR",
|
||||
"displaySwitchDelay": "Forsinkelse ved skærmskift",
|
||||
"tunneledPlayback": "Tunneleret afspilning",
|
||||
"tunneledPlaybackDescription": "Brug hardwareaccelereret videotunneling. Deaktiver hvis du ser sort skærm med lyd på HDR-indhold",
|
||||
"tunneledPlaybackDescription": "Brug videotunneling. Slå fra, hvis HDR-afspilning viser sort video.",
|
||||
"requireProfileSelectionOnOpen": "Spørg om profil ved åbning",
|
||||
"requireProfileSelectionOnOpenDescription": "Vis profilvalg hver gang appen åbnes",
|
||||
"confirmExitOnBack": "Bekræft før lukning",
|
||||
"confirmExitOnBackDescription": "Vis bekræftelsesdialog ved tryk på tilbage for at lukke appen",
|
||||
"forceTvMode": "Gennemtving TV-tilstand",
|
||||
"forceTvModeDescription": "Tving TV-layout. Til enheder, der ikke registreres automatisk. Kræver genstart.",
|
||||
"startInFullscreen": "Start i fuldskærm",
|
||||
"startInFullscreenDescription": "Åbn Plezy i fuldskærmstilstand ved opstart",
|
||||
"autoHidePerformanceOverlay": "Skjul ydelses-overlay automatisk",
|
||||
"autoHidePerformanceOverlayDescription": "Fade ydelses-overlayet med afspilningskontrollerne",
|
||||
"showNavBarLabels": "Vis navigationsbarlabels",
|
||||
"showNavBarLabelsDescription": "Vis tekstlabels under navigationsbarikoner",
|
||||
"liveTvDefaultFavorites": "Standard til favoritkanaler",
|
||||
"liveTvDefaultFavoritesDescription": "Vis kun favoritkanaler ved åbning af Live TV"
|
||||
"liveTvDefaultFavoritesDescription": "Vis kun favoritkanaler ved åbning af Live TV",
|
||||
"display": "Skærm",
|
||||
"homeScreen": "Startskærm",
|
||||
"navigation": "Navigation",
|
||||
"window": "Vindue",
|
||||
"content": "Indhold",
|
||||
"player": "Afspiller",
|
||||
"subtitlesAndConfig": "Undertekster og konfiguration",
|
||||
"seekAndTiming": "Søgning og timing",
|
||||
"behavior": "Adfærd"
|
||||
},
|
||||
"search": {
|
||||
"hint": "Søg film, serier, musik...",
|
||||
@@ -239,6 +292,8 @@
|
||||
"subtitleTrackNext": "Næste undertekstspor",
|
||||
"chapterNext": "Næste kapitel",
|
||||
"chapterPrevious": "Forrige kapitel",
|
||||
"episodeNext": "Næste afsnit",
|
||||
"episodePrevious": "Forrige afsnit",
|
||||
"speedIncrease": "Øg hastighed",
|
||||
"speedDecrease": "Sænk hastighed",
|
||||
"speedReset": "Nulstil hastighed",
|
||||
@@ -266,6 +321,8 @@
|
||||
"colorPrimaries": "Farveprimærer",
|
||||
"chromaSubsampling": "Chroma-subsampling",
|
||||
"channels": "Kanaler",
|
||||
"subtitles": "Undertekster",
|
||||
"overallBitrate": "Samlet bitrate",
|
||||
"path": "Sti",
|
||||
"size": "Størrelse",
|
||||
"container": "Container",
|
||||
@@ -282,11 +339,13 @@
|
||||
"shufflePlay": "Afspil tilfældigt",
|
||||
"fileInfo": "Filinfo",
|
||||
"deleteFromServer": "Slet fra server",
|
||||
"confirmDelete": "Dette sletter permanent disse medier og filer fra din server. Dette kan ikke fortrydes.",
|
||||
"confirmDelete": "Slet dette medie og dets filer fra din server?",
|
||||
"deleteMultipleWarning": "Dette inkluderer alle episoder og deres filer.",
|
||||
"mediaDeletedSuccessfully": "Medieelement slettet",
|
||||
"mediaFailedToDelete": "Kunne ikke slette medieelement",
|
||||
"rate": "Bedøm"
|
||||
"rate": "Bedøm",
|
||||
"playFromBeginning": "Afspil fra begyndelsen",
|
||||
"playVersion": "Afspil version..."
|
||||
},
|
||||
"accessibility": {
|
||||
"mediaCardMovie": "${title}, film",
|
||||
@@ -339,6 +398,13 @@
|
||||
"tracksButton": "Lyd og undertekster",
|
||||
"chaptersButton": "Kapitler",
|
||||
"versionsButton": "Videoversioner",
|
||||
"versionQualityButton": "Version og kvalitet",
|
||||
"versionColumnHeader": "Version",
|
||||
"qualityColumnHeader": "Kvalitet",
|
||||
"qualityOriginal": "Original",
|
||||
"qualityPresetLabel": "${resolution}p ${bitrate} Mbps",
|
||||
"qualityBandwidthEstimate": "~${bitrate} Mbps",
|
||||
"transcodeUnavailableFallback": "Transkodning utilgængelig — afspiller original kvalitet",
|
||||
"pipButton": "Billede-i-billede-tilstand",
|
||||
"aspectRatioButton": "Billedformat",
|
||||
"ambientLighting": "Omgivelsesbelysning",
|
||||
@@ -347,7 +413,6 @@
|
||||
"alwaysOnTopButton": "Altid øverst",
|
||||
"rotationLockButton": "Rotationslås",
|
||||
"lockScreen": "Lås skærm",
|
||||
"unlockScreen": "Lås skærm op",
|
||||
"screenLockButton": "Skærmlås",
|
||||
"longPressToUnlock": "Langt tryk for at låse op",
|
||||
"timelineSlider": "Videotidslinje",
|
||||
@@ -358,7 +423,7 @@
|
||||
"pipErrors": {
|
||||
"androidVersion": "Kræver Android 8.0 eller nyere",
|
||||
"iosVersion": "Kræver iOS 15.0 eller nyere",
|
||||
"permissionDisabled": "Billede-i-billede-tilladelse er deaktiveret. Aktivér i Indstillinger > Apps > Plezy > Billede-i-billede",
|
||||
"permissionDisabled": "Billede-i-billede er deaktiveret. Slå det til i systemindstillinger.",
|
||||
"notSupported": "Enheden understøtter ikke billede-i-billede",
|
||||
"voSwitchFailed": "Kunne ikke skifte videooutput til billede-i-billede",
|
||||
"failed": "Billede-i-billede kunne ikke starte",
|
||||
@@ -367,7 +432,13 @@
|
||||
"chapters": "Kapitler",
|
||||
"noChaptersAvailable": "Ingen kapitler tilgængelige",
|
||||
"queue": "Kø",
|
||||
"noQueueItems": "Ingen elementer i køen"
|
||||
"noQueueItems": "Ingen elementer i køen",
|
||||
"searchSubtitles": "Søg undertekster",
|
||||
"language": "Sprog",
|
||||
"noSubtitlesFound": "Ingen undertekster fundet",
|
||||
"subtitleDownloaded": "Undertekst downloadet",
|
||||
"subtitleDownloadFailed": "Kunne ikke downloade undertekst",
|
||||
"searchLanguages": "Søg sprog..."
|
||||
},
|
||||
"userStatus": {
|
||||
"admin": "Administrator",
|
||||
@@ -380,6 +451,7 @@
|
||||
"markedAsUnwatched": "Markeret som uset",
|
||||
"markedAsWatchedOffline": "Markeret som set (synkroniseres online)",
|
||||
"markedAsUnwatchedOffline": "Markeret som uset (synkroniseres online)",
|
||||
"autoRemovedWatchedDownload": "Automatisk fjernet: ${title}",
|
||||
"removedFromContinueWatching": "Fjernet fra Fortsæt med at se",
|
||||
"errorLoading": "Fejl: ${error}",
|
||||
"fileInfoNotAvailable": "Filinfo ikke tilgængelig",
|
||||
@@ -387,6 +459,10 @@
|
||||
"errorLoadingSeries": "Fejl ved indlæsning af serie",
|
||||
"errorLoadingSeason": "Fejl ved indlæsning af sæson",
|
||||
"musicNotSupported": "Musikafspilning understøttes endnu ikke",
|
||||
"noDescriptionAvailable": "Ingen beskrivelse tilgængelig",
|
||||
"noProfilesAvailable": "Ingen profiler tilgængelige",
|
||||
"contactAdminForProfiles": "Kontakt din serveradministrator for at tilføje profiler",
|
||||
"unableToDetermineLibrarySection": "Kan ikke bestemme biblioteksafdeling for dette element",
|
||||
"logsCleared": "Logs ryddet",
|
||||
"logsCopied": "Logs kopieret til udklipsholder",
|
||||
"noLogsAvailable": "Ingen logs tilgængelige",
|
||||
@@ -406,19 +482,26 @@
|
||||
"failedToCreatePlayQueueNoItems": "Kunne ikke oprette afspilningskø — ingen elementer",
|
||||
"failedPlayback": "Kunne ikke ${action}: ${error}",
|
||||
"switchingToCompatiblePlayer": "Skifter til kompatibel afspiller...",
|
||||
"serverLimitTitle": "Afspilning mislykkedes",
|
||||
"serverLimitBody": "Serverfejl (HTTP 500). En båndbredde-/transkodningsgrænse afviste nok sessionen. Bed ejeren om at justere den.",
|
||||
"logsUploaded": "Logs uploadet",
|
||||
"logsUploadFailed": "Kunne ikke uploade logs",
|
||||
"logId": "Log-ID"
|
||||
},
|
||||
"subtitlingStyling": {
|
||||
"stylingOptions": "Stilindstillinger",
|
||||
"text": "Tekst",
|
||||
"border": "Kant",
|
||||
"background": "Baggrund",
|
||||
"fontSize": "Skriftstørrelse",
|
||||
"textColor": "Tekstfarve",
|
||||
"borderSize": "Kantstørrelse",
|
||||
"borderColor": "Kantfarve",
|
||||
"backgroundOpacity": "Baggrundsgennemsigtighed",
|
||||
"backgroundColor": "Baggrundsfarve",
|
||||
"position": "Position"
|
||||
"position": "Position",
|
||||
"assOverride": "ASS-tilsidesættelse",
|
||||
"bold": "Fed",
|
||||
"italic": "Kursiv"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv.conf",
|
||||
@@ -439,12 +522,85 @@
|
||||
"dialog": {
|
||||
"confirmAction": "Bekræft handling"
|
||||
},
|
||||
"profiles": {
|
||||
"addPlezyProfile": "Tilføj Plezy-profil",
|
||||
"switchingProfile": "Skifter profil…",
|
||||
"deleteThisProfileTitle": "Slet denne profil?",
|
||||
"deleteThisProfileMessage": "Fjern ${displayName}. Forbindelser påvirkes ikke.",
|
||||
"active": "Aktiv",
|
||||
"manage": "Administrer",
|
||||
"delete": "Slet",
|
||||
"signOut": "Log ud",
|
||||
"signOutPlexTitle": "Log ud af Plex?",
|
||||
"signOutPlexMessage": "Fjern ${displayName} og alle Plex Home-brugere? Log ind igen når som helst.",
|
||||
"signedOutPlex": "Logget ud af Plex.",
|
||||
"signOutFailed": "Log ud mislykkedes.",
|
||||
"sectionTitle": "Profiler",
|
||||
"summarySingle": "Tilføj profiler for at blande administrerede brugere og lokale identiteter",
|
||||
"summaryMultipleWithActive": "${count} profiler · aktiv: ${activeName}",
|
||||
"summaryMultiple": "${count} profiler",
|
||||
"removeConnectionTitle": "Fjern forbindelse?",
|
||||
"removeConnectionMessage": "Fjern ${displayName}s adgang til ${connectionLabel}. Andre profiler beholder den.",
|
||||
"deleteProfileTitle": "Slet profil?",
|
||||
"deleteProfileMessage": "Fjern ${displayName} og forbindelserne. Servere forbliver tilgængelige.",
|
||||
"profileNameLabel": "Profilnavn",
|
||||
"pinProtectionLabel": "PIN-beskyttelse",
|
||||
"pinManagedByPlex": "PIN administreres af Plex. Rediger på plex.tv.",
|
||||
"noPinSetEditOnPlex": "Ingen PIN-kode angivet. For at kræve en, redigér Home-brugeren på plex.tv.",
|
||||
"setPin": "Angiv PIN",
|
||||
"setPinTitle": "Angiv PIN",
|
||||
"confirmPinTitle": "Bekræft PIN",
|
||||
"pinSet": "PIN angivet",
|
||||
"changePin": "Skift",
|
||||
"removePin": "Fjern",
|
||||
"connectionsLabel": "Forbindelser",
|
||||
"add": "Tilføj",
|
||||
"deleteProfileButton": "Slet profil",
|
||||
"noConnectionsHint": "Ingen forbindelser — tilføj en for at bruge denne profil.",
|
||||
"noConnections": "Ingen forbindelser",
|
||||
"plexHomeAccount": "Plex Home-konto",
|
||||
"connectionDefault": "Standard",
|
||||
"connectionAs": "som ${displayName}",
|
||||
"makeDefault": "Gør til standard",
|
||||
"removeConnection": "Fjern",
|
||||
"profileRenamed": "Profil omdøbt.",
|
||||
"borrowAddTo": "Tilføj til ${displayName}",
|
||||
"borrowExplain": "Lån en anden profils forbindelse. PIN-beskyttede profiler kræver en PIN.",
|
||||
"borrowEmpty": "Intet at låne endnu.",
|
||||
"borrowEmptySubtitle": "Forbind Plex eller Jellyfin til en anden profil først.",
|
||||
"borrowFromProfile": "Fra ${displayName}",
|
||||
"borrowConnectionBorrowed": "Forbindelse lånt.",
|
||||
"borrowFailed": "Kunne ikke låne forbindelse.",
|
||||
"incorrectPin": "Forkert PIN.",
|
||||
"sourceProfileMissingParentAccount": "Kildeprofilen mangler sin overordnede konto.",
|
||||
"failedToVerifyPin": "Kunne ikke bekræfte PIN.",
|
||||
"newProfile": "Ny profil",
|
||||
"profileNameHint": "fx. Gæster, Børn, Familiens stue",
|
||||
"pinProtectionOptional": "PIN-beskyttelse (valgfri)",
|
||||
"pinExplain": "4-cifret PIN kræves for at skifte profiler.",
|
||||
"continueButton": "Fortsæt",
|
||||
"pinsDontMatch": "PIN-koder matcher ikke"
|
||||
},
|
||||
"connections": {
|
||||
"sectionTitle": "Forbindelser",
|
||||
"addConnection": "Tilføj forbindelse",
|
||||
"addConnectionSubtitleNoProfile": "Log ind med Plex eller forbind til en Jellyfin-server",
|
||||
"addConnectionSubtitleScoped": "Føj til ${displayName}: Plex, Jellyfin eller en anden profilforbindelse",
|
||||
"sessionExpiredOne": "Sessionen er udløbet for ${name}",
|
||||
"sessionExpiredMany": "Sessionen er udløbet for ${count} servere",
|
||||
"signInAgain": "Log ind igen"
|
||||
},
|
||||
"discover": {
|
||||
"title": "Opdag",
|
||||
"switchProfile": "Skift profil",
|
||||
"noContentAvailable": "Intet indhold tilgængeligt",
|
||||
"addMediaToLibraries": "Tilføj medier til dine biblioteker",
|
||||
"continueWatching": "Fortsæt med at se",
|
||||
"continueWatchingIn": "Fortsæt med at se i ${library}",
|
||||
"nextUp": "Næste op",
|
||||
"nextUpIn": "Næste op i ${library}",
|
||||
"recentlyAdded": "Nyligt tilføjet",
|
||||
"recentlyAddedIn": "Nyligt tilføjet i ${library}",
|
||||
"playEpisode": "S${season}E${episode}",
|
||||
"overview": "Oversigt",
|
||||
"cast": "Rollebesætning",
|
||||
@@ -458,7 +614,7 @@
|
||||
"errors": {
|
||||
"searchFailed": "Søgning mislykkedes: ${error}",
|
||||
"connectionTimeout": "Forbindelsestimeout ved indlæsning af ${context}",
|
||||
"connectionFailed": "Kunne ikke forbinde til Plex-server",
|
||||
"connectionFailed": "Kan ikke oprette forbindelse til medieserver",
|
||||
"failedToLoad": "Kunne ikke indlæse ${context}: ${error}",
|
||||
"noClientAvailable": "Ingen klient tilgængelig",
|
||||
"authenticationFailed": "Godkendelse mislykkedes: ${error}",
|
||||
@@ -466,7 +622,9 @@
|
||||
"pleaseEnterToken": "Indtast et token",
|
||||
"invalidToken": "Ugyldigt token",
|
||||
"failedToVerifyToken": "Kunne ikke verificere token: ${error}",
|
||||
"failedToSwitchProfile": "Kunne ikke skifte til ${displayName}"
|
||||
"failedToSwitchProfile": "Kunne ikke skifte til ${displayName}",
|
||||
"failedToDeleteProfile": "Kunne ikke slette ${displayName}",
|
||||
"failedToRate": "Kunne ikke opdatere bedømmelsen"
|
||||
},
|
||||
"libraries": {
|
||||
"title": "Biblioteker",
|
||||
@@ -483,6 +641,8 @@
|
||||
"analysisStarted": "Analyse startet for \"${title}\"",
|
||||
"failedToAnalyze": "Kunne ikke analysere bibliotek: ${error}",
|
||||
"noLibrariesFound": "Ingen biblioteker fundet",
|
||||
"allLibrariesHidden": "Alle biblioteker er skjult",
|
||||
"hiddenLibrariesCount": "Skjulte biblioteker (${count})",
|
||||
"thisLibraryIsEmpty": "Dette bibliotek er tomt",
|
||||
"all": "Alle",
|
||||
"clearAll": "Ryd alle",
|
||||
@@ -519,17 +679,34 @@
|
||||
"seasons": "Sæsoner",
|
||||
"episodes": "Episoder",
|
||||
"folders": "Mapper"
|
||||
},
|
||||
"filterCategories": {
|
||||
"genre": "Genre",
|
||||
"year": "År",
|
||||
"contentRating": "Aldersvurdering",
|
||||
"tag": "Tag"
|
||||
},
|
||||
"sortLabels": {
|
||||
"title": "Titel",
|
||||
"dateAdded": "Tilføjet dato",
|
||||
"releaseDate": "Udgivelsesdato",
|
||||
"rating": "Vurdering",
|
||||
"lastPlayed": "Sidst afspillet",
|
||||
"playCount": "Antal afspilninger",
|
||||
"random": "Tilfældig",
|
||||
"dateShared": "Delt dato",
|
||||
"latestEpisodeAirDate": "Seneste episodes premieredato"
|
||||
}
|
||||
},
|
||||
"about": {
|
||||
"title": "Om",
|
||||
"openSourceLicenses": "Open source-licenser",
|
||||
"versionLabel": "Version ${version}",
|
||||
"appDescription": "En smuk Plex-klient til Flutter",
|
||||
"appDescription": "En smuk Plex- og Jellyfin-klient til Flutter",
|
||||
"viewLicensesDescription": "Se licenser for tredjepartsbiblioteker"
|
||||
},
|
||||
"serverSelection": {
|
||||
"allServerConnectionsFailed": "Kunne ikke forbinde til nogen servere. Tjek dit netværk og prøv igen.",
|
||||
"allServerConnectionsFailed": "Kunne ikke oprette forbindelse til nogen servere. Tjek dit netværk.",
|
||||
"noServersFoundForAccount": "Ingen servere fundet for ${username} (${email})",
|
||||
"failedToLoadServers": "Kunne ikke indlæse servere: ${error}"
|
||||
},
|
||||
@@ -566,6 +743,7 @@
|
||||
"reloadGuide": "Genindlæs guide",
|
||||
"now": "Nu",
|
||||
"today": "I dag",
|
||||
"tomorrow": "I morgen",
|
||||
"midnight": "Midnat",
|
||||
"overnight": "Nat",
|
||||
"morning": "Morgen",
|
||||
@@ -574,7 +752,46 @@
|
||||
"lateNight": "Sen aften",
|
||||
"whatsOn": "Hvad der kører",
|
||||
"watchChannel": "Se kanal",
|
||||
"favorites": "Favoritter"
|
||||
"favorites": "Favoritter",
|
||||
"reorderFavorites": "Omarranger favoritter",
|
||||
"joinSession": "Deltag i igangværende session",
|
||||
"watchFromStart": "Se fra start (${minutes} min siden)",
|
||||
"watchLive": "Se live",
|
||||
"goToLive": "Gå til live",
|
||||
"record": "Optag",
|
||||
"recordEpisode": "Optag episode",
|
||||
"recordSeries": "Optag serie",
|
||||
"recordOptions": "Optageindstillinger",
|
||||
"recordings": "Optagelser",
|
||||
"scheduledRecordings": "Planlagt",
|
||||
"recordingRules": "Optagelsesregler",
|
||||
"noScheduledRecordings": "Ingen optagelser planlagt",
|
||||
"noRecordingRules": "Ingen optagelsesregler endnu",
|
||||
"manageRecording": "Administrer optagelse",
|
||||
"cancelRecording": "Annullér optagelse",
|
||||
"cancelRecordingTitle": "Annullér denne optagelse?",
|
||||
"cancelRecordingMessage": "${title} bliver ikke længere optaget.",
|
||||
"deleteRule": "Slet regel",
|
||||
"deleteRuleTitle": "Slet optagelsesregel?",
|
||||
"deleteRuleMessage": "Fremtidige episoder af ${title} bliver ikke optaget.",
|
||||
"recordingScheduled": "Optagelse planlagt",
|
||||
"alreadyScheduled": "Dette program er allerede planlagt",
|
||||
"dvrAdminRequired": "DVR-indstillinger kræver en administratorkonto",
|
||||
"recordingFailed": "Kunne ikke planlægge optagelse",
|
||||
"recordingTargetMissing": "Kunne ikke bestemme optagelsesbibliotek",
|
||||
"recordNotAvailable": "Optagelse er ikke tilgængelig for dette program",
|
||||
"recordingCancelled": "Optagelse annulleret",
|
||||
"recordingRuleDeleted": "Optagelsesregel slettet",
|
||||
"processRecordingRules": "Genberegn regler",
|
||||
"loadingRecordings": "Indlæser optagelser ...",
|
||||
"recordingInProgress": "Optager nu",
|
||||
"recordingsCount": "${count} planlagt",
|
||||
"editRule": "Rediger regel",
|
||||
"editRuleAction": "Rediger",
|
||||
"recordingRuleUpdated": "Optagelsesregel opdateret",
|
||||
"guideReloadRequested": "Guide-opdatering anmodet",
|
||||
"rulesProcessRequested": "Regelevaluering anmodet",
|
||||
"recordShow": "Optag program"
|
||||
},
|
||||
"collections": {
|
||||
"title": "Samlinger",
|
||||
@@ -582,7 +799,7 @@
|
||||
"empty": "Samlingen er tom",
|
||||
"unknownLibrarySection": "Kan ikke slette: Ukendt bibliotekssektion",
|
||||
"deleteCollection": "Slet samling",
|
||||
"deleteConfirm": "Er du sikker på, at du vil slette \"${title}\"? Denne handling kan ikke fortrydes.",
|
||||
"deleteConfirm": "Slet \"${title}\"? Dette kan ikke fortrydes.",
|
||||
"deleted": "Samling slettet",
|
||||
"deleteFailed": "Kunne ikke slette samling",
|
||||
"deleteFailedWithError": "Kunne ikke slette samling: ${error}",
|
||||
@@ -597,7 +814,8 @@
|
||||
"removeFromCollectionConfirm": "Fjern \"${title}\" fra denne samling?",
|
||||
"removedFromCollection": "Fjernet fra samling",
|
||||
"removeFromCollectionFailed": "Kunne ikke fjerne fra samling",
|
||||
"removeFromCollectionError": "Fejl ved fjernelse fra samling: ${error}"
|
||||
"removeFromCollectionError": "Fejl ved fjernelse fra samling: ${error}",
|
||||
"searchCollections": "Søg i samlinger..."
|
||||
},
|
||||
"playlists": {
|
||||
"title": "Playlister",
|
||||
@@ -661,22 +879,32 @@
|
||||
"leave": "Forlad",
|
||||
"syncing": "Synkroniserer...",
|
||||
"joinWatchSession": "Deltag i se-session",
|
||||
"enterCodeHint": "Indtast 8-tegns kode",
|
||||
"enterCodeHint": "Indtast 5-tegns kode",
|
||||
"pasteFromClipboard": "Indsæt fra udklipsholder",
|
||||
"pleaseEnterCode": "Indtast en sessionskode",
|
||||
"codeMustBe8Chars": "Sessionskode skal være 8 tegn",
|
||||
"joinInstructions": "Indtast sessionskoden delt af værten for at deltage i se-sessionen.",
|
||||
"codeMustBe5Chars": "Sessionskode skal være 5 tegn",
|
||||
"joinInstructions": "Indtast værtens sessionskode for at deltage.",
|
||||
"failedToCreate": "Kunne ikke oprette session",
|
||||
"failedToJoin": "Kunne ikke deltage i session",
|
||||
"sessionCodeCopied": "Sessionskode kopieret til udklipsholder",
|
||||
"relayUnreachable": "Relay-serveren kan ikke nås. Dette kan skyldes, at din udbyder blokerer forbindelsen. Du kan stadig prøve, men Se sammen virker muligvis ikke.",
|
||||
"relayUnreachable": "Relay-serveren kan ikke nås. ISP-blokering kan forhindre Watch Together.",
|
||||
"reconnectingToHost": "Genopretter forbindelse til vært...",
|
||||
"currentPlayback": "Nuværende afspilning",
|
||||
"joinCurrentPlayback": "Deltag i nuværende afspilning",
|
||||
"joinCurrentPlaybackDescription": "Hop tilbage til det værten ser nu",
|
||||
"failedToOpenCurrentPlayback": "Kunne ikke åbne nuværende afspilning",
|
||||
"participantJoined": "${name} deltog",
|
||||
"participantLeft": "${name} forlod"
|
||||
"participantLeft": "${name} forlod",
|
||||
"participantPaused": "${name} satte på pause",
|
||||
"participantResumed": "${name} genoptog",
|
||||
"participantSeeked": "${name} spoled",
|
||||
"participantBuffering": "${name} bufferer",
|
||||
"waitingForParticipants": "Venter på at andre indlæser...",
|
||||
"recentRooms": "Seneste rum",
|
||||
"renameRoom": "Omdøb rum",
|
||||
"removeRoom": "Fjern",
|
||||
"guestSwitchUnavailable": "Kunne ikke skifte — server ikke tilgængelig for synkronisering",
|
||||
"guestSwitchFailed": "Kunne ikke skifte — indhold blev ikke fundet på denne server"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "Downloads",
|
||||
@@ -689,19 +917,59 @@
|
||||
"deleteDownload": "Slet download",
|
||||
"retryDownload": "Prøv download igen",
|
||||
"downloadQueued": "Download i kø",
|
||||
"serverErrorBitrate": "Serverfejl: filen overskrider muligvis grænsen for ekstern bitrate",
|
||||
"episodesQueued": "${count} episoder i downloadkø",
|
||||
"downloadDeleted": "Download slettet",
|
||||
"deleteConfirm": "Er du sikker på, at du vil slette \"${title}\"? Den downloadede fil fjernes fra din enhed.",
|
||||
"deleteConfirm": "Slet \"${title}\" fra denne enhed?",
|
||||
"deletingWithProgress": "Sletter ${title}... (${current} af ${total})",
|
||||
"deleting": "Sletter...",
|
||||
"queuedTooltip": "I kø",
|
||||
"queuedFilesTooltip": "I kø: ${files}",
|
||||
"downloadingTooltip": "Downloader...",
|
||||
"downloadingFilesTooltip": "Downloader ${files}",
|
||||
"noDownloadsTree": "Ingen downloads",
|
||||
"pauseAll": "Pause alle",
|
||||
"resumeAll": "Genoptag alle",
|
||||
"deleteAll": "Slet alle"
|
||||
"deleteAll": "Slet alle",
|
||||
"selectVersion": "Vælg version",
|
||||
"allEpisodes": "Alle episoder",
|
||||
"unwatchedOnly": "Kun usete",
|
||||
"nextNUnwatched": "Næste ${count} usete",
|
||||
"customAmount": "Angiv antal...",
|
||||
"howManyEpisodes": "Hvor mange episoder?",
|
||||
"itemsQueued": "${count} elementer sat i kø til download",
|
||||
"keepSynced": "Hold synkroniseret",
|
||||
"downloadOnce": "Download én gang",
|
||||
"keepNUnwatched": "Behold ${count} usete",
|
||||
"editSyncRule": "Rediger synkroniseringsregel",
|
||||
"removeSyncRule": "Fjern synkroniseringsregel",
|
||||
"removeSyncRuleConfirm": "Stop synkronisering af \"${title}\"? Downloadede episoder beholdes.",
|
||||
"syncRuleCreated": "Synkroniseringsregel oprettet — beholder ${count} usete episoder",
|
||||
"syncRuleUpdated": "Synkroniseringsregel opdateret",
|
||||
"syncRuleRemoved": "Synkroniseringsregel fjernet",
|
||||
"syncedNewEpisodes": "Synkroniserede ${count} nye episoder for ${title}",
|
||||
"activeSyncRules": "Synkroniseringsregler",
|
||||
"noSyncRules": "Ingen synkroniseringsregler",
|
||||
"manageSyncRule": "Administrer synkronisering",
|
||||
"editEpisodeCount": "Antal episoder",
|
||||
"editSyncFilter": "Synkroniseringsfilter",
|
||||
"syncAllItems": "Synkroniserer alle elementer",
|
||||
"syncUnwatchedItems": "Synkroniserer usete elementer",
|
||||
"syncRuleServerContext": "Server: ${server} • ${status}",
|
||||
"syncRuleAvailable": "Tilgængelig",
|
||||
"syncRuleOffline": "Offline",
|
||||
"syncRuleSignInRequired": "Log ind påkrævet",
|
||||
"syncRuleNotAvailableForProfile": "Ikke tilgængelig for nuværende profil",
|
||||
"syncRuleUnknownServer": "Ukendt server",
|
||||
"syncRuleListCreated": "Synkroniseringsregel oprettet"
|
||||
},
|
||||
"shaders": {
|
||||
"title": "Shadere",
|
||||
"noShaderDescription": "Ingen videoforbedring",
|
||||
"nvscalerDescription": "NVIDIA-billedskalering for skarpere video",
|
||||
"artcnnVariantNeutral": "Neutral",
|
||||
"artcnnVariantDenoise": "Støjreduktion",
|
||||
"artcnnVariantDenoiseSharpen": "Støjreduktion + skarphed",
|
||||
"qualityFast": "Hurtig",
|
||||
"qualityHQ": "Høj kvalitet",
|
||||
"mode": "Tilstand",
|
||||
@@ -714,63 +982,43 @@
|
||||
},
|
||||
"companionRemote": {
|
||||
"title": "Fjernbetjening",
|
||||
"connectToDevice": "Forbind til enhed",
|
||||
"hostRemoteSession": "Vært for fjernsession",
|
||||
"controlThisDevice": "Styr denne enhed med din telefon",
|
||||
"remoteControl": "Fjernbetjening",
|
||||
"controlDesktop": "Styr en desktopenhed",
|
||||
"connectedTo": "Forbundet til ${name}",
|
||||
"session": {
|
||||
"creatingSession": "Opretter fjernsession...",
|
||||
"failedToCreate": "Kunne ikke oprette fjernsession:",
|
||||
"noSession": "Ingen session tilgængelig",
|
||||
"scanQrCode": "Scan QR-kode",
|
||||
"orEnterManually": "Eller indtast manuelt",
|
||||
"hostAddress": "Værtadresse",
|
||||
"sessionId": "Sessions-ID",
|
||||
"pin": "PIN",
|
||||
"startingServer": "Starter fjernserver...",
|
||||
"failedToCreate": "Kunne ikke starte fjernserver:",
|
||||
"hostAddress": "Værtsadresse",
|
||||
"connected": "Forbundet",
|
||||
"waitingForConnection": "Venter på forbindelse...",
|
||||
"serverRunning": "Fjernserver aktiv",
|
||||
"serverStopped": "Fjernserver stoppet",
|
||||
"serverRunningDescription": "Mobile enheder på dit netværk kan oprette forbindelse til denne app",
|
||||
"serverStoppedDescription": "Start serveren for at tillade mobilenheder at oprette forbindelse",
|
||||
"usePhoneToControl": "Brug din mobilenhed til at styre denne app",
|
||||
"copiedToClipboard": "${label} kopieret til udklipsholder",
|
||||
"copyToClipboard": "Kopiér til udklipsholder",
|
||||
"newSession": "Ny session",
|
||||
"startServer": "Start server",
|
||||
"stopServer": "Stop server",
|
||||
"minimize": "Minimér"
|
||||
},
|
||||
"pairing": {
|
||||
"scan": "Scan",
|
||||
"manual": "Manuel",
|
||||
"pairWithDesktop": "Par med desktop",
|
||||
"enterSessionDetails": "Indtast sessionsdetaljerne vist på din desktopenhed",
|
||||
"discoveryDescription": "Plezy-enheder med samme Plex-konto vises her",
|
||||
"hostAddressHint": "192.168.1.100:48632",
|
||||
"sessionIdHint": "Indtast 8-tegns sessions-ID",
|
||||
"pinHint": "Indtast 6-cifret PIN",
|
||||
"connecting": "Forbinder...",
|
||||
"tips": "Tips",
|
||||
"tipDesktop": "Åbn Plezy på din desktop og aktivér fjernbetjening fra indstillinger eller menu",
|
||||
"tipScan": "Brug fanen Scan til hurtigt at parre ved at scanne QR-koden på din desktop",
|
||||
"tipWifi": "Sørg for, at begge enheder er på det samme WiFi-netværk",
|
||||
"cameraPermissionRequired": "Kameratilladelse er påkrævet for at scanne QR-koder.\nGiv kameraadgang i enhedsindstillinger.",
|
||||
"cameraError": "Kunne ikke starte kamera: ${error}",
|
||||
"scanInstruction": "Ret kameraet mod QR-koden vist på din desktop",
|
||||
"invalidQrCode": "Ugyldigt QR-kodeformat",
|
||||
"validationHostRequired": "Indtast værtadresse",
|
||||
"connecting": "Opretter forbindelse...",
|
||||
"searchingForDevices": "Søger efter enheder...",
|
||||
"noDevicesFound": "Ingen enheder fundet på dit netværk",
|
||||
"noDevicesHint": "Åbn Plezy på desktop, og brug samme WiFi",
|
||||
"availableDevices": "Tilgængelige enheder",
|
||||
"manualConnection": "Manuel forbindelse",
|
||||
"cryptoInitFailed": "Kunne ikke starte sikker forbindelse. Log ind på Plex først.",
|
||||
"validationHostRequired": "Angiv venligst værtsadresse",
|
||||
"validationHostFormat": "Format skal være IP:port (f.eks. 192.168.1.100:48632)",
|
||||
"validationSessionIdRequired": "Indtast et sessions-ID",
|
||||
"validationSessionIdLength": "Sessions-ID skal være 8 tegn",
|
||||
"validationPinRequired": "Indtast en PIN",
|
||||
"validationPinLength": "PIN skal være 6 cifre",
|
||||
"connectionTimedOut": "Forbindelsen fik timeout. Tjek sessions-ID og PIN.",
|
||||
"sessionNotFound": "Kunne ikke finde sessionen. Tjek dine oplysninger.",
|
||||
"failedToConnect": "Kunne ikke forbinde: ${error}"
|
||||
"connectionTimedOut": "Forbindelsen fik timeout. Brug samme netværk på begge enheder.",
|
||||
"sessionNotFound": "Enhed ikke fundet. Sørg for, at Plezy kører på værten.",
|
||||
"authFailed": "Godkendelse mislykkedes. Begge enheder skal bruge samme Plex-konto.",
|
||||
"failedToConnect": "Kunne ikke oprette forbindelse: ${error}"
|
||||
},
|
||||
"remote": {
|
||||
"disconnectConfirm": "Vil du afbryde fra fjernsessionen?",
|
||||
"reconnecting": "Genopretter forbindelse...",
|
||||
"attemptOf": "Forsøg ${current} af 5",
|
||||
"retryNow": "Prøv igen nu",
|
||||
"connectionError": "Forbindelsesfejl",
|
||||
"notConnected": "Ikke forbundet",
|
||||
"tabRemote": "Fjernbetjening",
|
||||
"tabPlay": "Afspil",
|
||||
"tabMore": "Mere",
|
||||
@@ -806,13 +1054,14 @@
|
||||
"audioOutput": "Lydoutput",
|
||||
"performanceOverlay": "Ydelsesoverlay",
|
||||
"audioPassthrough": "Lyd-passthrough",
|
||||
"audioNormalization": "Lydnormalisering"
|
||||
"audioNormalization": "Normalisér lydstyrke"
|
||||
},
|
||||
"externalPlayer": {
|
||||
"title": "Ekstern afspiller",
|
||||
"useExternalPlayer": "Brug ekstern afspiller",
|
||||
"useExternalPlayerDescription": "Åbn videoer i en ekstern app i stedet for den indbyggede afspiller",
|
||||
"useExternalPlayerDescription": "Åbn videoer i en anden app",
|
||||
"selectPlayer": "Vælg afspiller",
|
||||
"customPlayers": "Brugerdefinerede afspillere",
|
||||
"systemDefault": "Systemstandard",
|
||||
"addCustomPlayer": "Tilføj brugerdefineret afspiller",
|
||||
"playerName": "Afspillernavn",
|
||||
@@ -840,8 +1089,12 @@
|
||||
"summary": "Resumé",
|
||||
"poster": "Plakat",
|
||||
"background": "Baggrund",
|
||||
"logo": "Logo",
|
||||
"squareArt": "Kvadratisk billede",
|
||||
"selectPoster": "Vælg plakat",
|
||||
"selectBackground": "Vælg baggrund",
|
||||
"selectLogo": "Vælg logo",
|
||||
"selectSquareArt": "Vælg kvadratisk billede",
|
||||
"fromUrl": "Fra URL",
|
||||
"uploadFile": "Upload fil",
|
||||
"enterImageUrl": "Indtast billed-URL",
|
||||
@@ -883,6 +1136,124 @@
|
||||
"subtitleMode": "Auto-vælg underteksttilstand",
|
||||
"manuallySelected": "Manuelt valgt",
|
||||
"shownWithForeignAudio": "Vist med fremmedsproget lyd",
|
||||
"alwaysEnabled": "Altid aktiveret"
|
||||
"alwaysEnabled": "Altid aktiveret",
|
||||
"tags": "Tags",
|
||||
"addTag": "Tilføj tag",
|
||||
"genre": "Genre",
|
||||
"director": "Instruktør",
|
||||
"writer": "Forfatter",
|
||||
"producer": "Producer",
|
||||
"country": "Land",
|
||||
"collection": "Samling",
|
||||
"label": "Etiket",
|
||||
"style": "Stil",
|
||||
"mood": "Stemning"
|
||||
},
|
||||
"matchScreen": {
|
||||
"match": "Match...",
|
||||
"fixMatch": "Ret match...",
|
||||
"unmatch": "Fjern match",
|
||||
"unmatchConfirm": "Ryd dette match? Plex behandler det som umatchet, indtil det matches igen.",
|
||||
"unmatchSuccess": "Match fjernet",
|
||||
"unmatchFailed": "Kunne ikke fjerne match",
|
||||
"matchApplied": "Match anvendt",
|
||||
"matchFailed": "Kunne ikke anvende match",
|
||||
"titleHint": "Titel",
|
||||
"yearHint": "År",
|
||||
"search": "Søg",
|
||||
"noMatchesFound": "Ingen match fundet"
|
||||
},
|
||||
"serverTasks": {
|
||||
"title": "Serveropgaver",
|
||||
"failedToLoad": "Kunne ikke indlæse opgaver",
|
||||
"noTasks": "Ingen opgaver kører"
|
||||
},
|
||||
"trakt": {
|
||||
"title": "Trakt",
|
||||
"connected": "Forbundet",
|
||||
"connectedAs": "Forbundet som @${username}",
|
||||
"disconnectConfirm": "Frakobl Trakt-konto?",
|
||||
"disconnectConfirmBody": "Plezy stopper med at sende hændelser til Trakt. Du kan tilslutte igen når som helst.",
|
||||
"scrobble": "Realtids-scrobbling",
|
||||
"scrobbleDescription": "Send afspil-, pause- og stop-begivenheder til Trakt under afspilning.",
|
||||
"watchedSync": "Synkroniser sét-status",
|
||||
"watchedSyncDescription": "Når du markerer ting som sét i Plezy, markeres de også på Trakt."
|
||||
},
|
||||
"trackers": {
|
||||
"title": "Trackere",
|
||||
"hubSubtitle": "Synkroniser afspilningsfremskridt med Trakt og andre tjenester.",
|
||||
"notConnected": "Ikke forbundet",
|
||||
"connectedAs": "Forbundet som @${username}",
|
||||
"scrobble": "Registrer fremgang automatisk",
|
||||
"scrobbleDescription": "Opdater din liste når du er færdig med et afsnit eller en film.",
|
||||
"disconnectConfirm": "Afbryd ${service}?",
|
||||
"disconnectConfirmBody": "Plezy stopper med at opdatere ${service}. Tilslut igen når som helst.",
|
||||
"connectFailed": "Kunne ikke forbinde til ${service}. Prøv igen.",
|
||||
"services": {
|
||||
"mal": "MyAnimeList",
|
||||
"anilist": "AniList",
|
||||
"simkl": "Simkl"
|
||||
},
|
||||
"deviceCode": {
|
||||
"title": "Aktiver Plezy på ${service}",
|
||||
"body": "Besøg ${url} og indtast denne kode:",
|
||||
"openToActivate": "Åbn ${service} for at aktivere",
|
||||
"waitingForAuthorization": "Venter på godkendelse…",
|
||||
"codeCopied": "Kode kopieret"
|
||||
},
|
||||
"oauthProxy": {
|
||||
"title": "Log ind på ${service}",
|
||||
"body": "Scan denne QR-kode, eller åbn URL'en på en enhed.",
|
||||
"openToSignIn": "Åbn ${service} for at logge ind",
|
||||
"urlCopied": "URL kopieret"
|
||||
},
|
||||
"libraryFilter": {
|
||||
"title": "Bibliotekfilter",
|
||||
"subtitleAllSyncing": "Synkroniserer alle biblioteker",
|
||||
"subtitleNoneSyncing": "Intet synkroniseres",
|
||||
"subtitleBlocked": "${count} blokeret",
|
||||
"subtitleAllowed": "${count} tilladt",
|
||||
"mode": "Filtertilstand",
|
||||
"modeBlacklist": "Sortliste",
|
||||
"modeWhitelist": "Hvidliste",
|
||||
"modeHintBlacklist": "Synkroniser alle biblioteker undtagen dem du markerer nedenfor.",
|
||||
"modeHintWhitelist": "Synkroniser kun de biblioteker du markerer nedenfor.",
|
||||
"libraries": "Biblioteker",
|
||||
"noLibraries": "Ingen biblioteker tilgængelige"
|
||||
}
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Tilføj Jellyfin-server",
|
||||
"jellyfinUrlIntro": "Indtast server-URL'en, f.eks. `https://jellyfin.example.com`.",
|
||||
"serverUrl": "Server-URL",
|
||||
"findServer": "Find server",
|
||||
"username": "Brugernavn",
|
||||
"password": "Adgangskode",
|
||||
"signIn": "Log ind",
|
||||
"change": "Ændr",
|
||||
"required": "Påkrævet",
|
||||
"couldNotReachServer": "Kunne ikke nå serveren: ${error}",
|
||||
"signInFailed": "Login mislykkedes: ${error}",
|
||||
"quickConnectFailed": "Quick Connect mislykkedes: ${error}",
|
||||
"addPlexTitle": "Log ind med Plex",
|
||||
"plexAuthIntro": "Log ind med en browser eller QR-kode.",
|
||||
"plexQRPrompt": "Scan denne QR-kode for at logge ind.",
|
||||
"waitingForPlexConfirmation": "Venter på at plex.tv bekræfter login…",
|
||||
"pinExpired": "PIN udløb før login. Prøv igen.",
|
||||
"duplicatePlexAccount": "Allerede logget ind på Plex. Log ud for at skifte konto.",
|
||||
"failedToRegisterAccount": "Kunne ikke registrere kontoen: ${error}",
|
||||
"enterJellyfinUrlError": "Angiv URL'en til din Jellyfin-server",
|
||||
"addConnectionTitle": "Tilføj forbindelse",
|
||||
"addConnectionTitleScoped": "Tilføj til ${name}",
|
||||
"addConnectionIntroGlobal": "Tilføj en anden medieserver. Plex og Jellyfin vises sammen på Hjem.",
|
||||
"addConnectionIntroScoped": "Tilføj en ny server, eller lån en fra en anden profil.",
|
||||
"signInWithPlexCard": "Log ind med Plex",
|
||||
"signInWithPlexCardSubtitle": "Godkend denne enhed. Delte servere tilføjes.",
|
||||
"signInWithPlexCardSubtitleScoped": "Godkend en Plex-konto. Home-brugere bliver profiler.",
|
||||
"connectToJellyfinCard": "Forbind til Jellyfin",
|
||||
"connectToJellyfinCardSubtitle": "Indtast din server-URL, dit brugernavn og din adgangskode.",
|
||||
"connectToJellyfinCardSubtitleScoped": "Log ind på en Jellyfin-server. Tilknyttes ${name}.",
|
||||
"borrowFromAnotherProfile": "Lån fra en anden profil",
|
||||
"borrowFromAnotherProfileSubtitle": "Genbrug en anden profils forbindelse. PIN-beskyttede profiler kræver en PIN."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,13 +3,22 @@
|
||||
"title": "Plezy"
|
||||
},
|
||||
"auth": {
|
||||
"signIn": "Anmelden",
|
||||
"signInWithPlex": "Mit Plex anmelden",
|
||||
"showQRCode": "QR-Code anzeigen",
|
||||
"authenticate": "Authentifizieren",
|
||||
"authenticationTimeout": "Authentifizierung abgelaufen. Bitte erneut versuchen.",
|
||||
"scanQRToSignIn": "QR-Code scannen zum Anmelden",
|
||||
"waitingForAuth": "Warte auf Authentifizierung...\nBitte Anmeldung im Browser abschließen.",
|
||||
"useBrowser": "Browser verwenden"
|
||||
"waitingForAuth": "Warte auf Authentifizierung...\nMelde dich im Browser an.",
|
||||
"useBrowser": "Browser verwenden",
|
||||
"or": "oder",
|
||||
"connectToJellyfin": "Mit Jellyfin verbinden",
|
||||
"useQuickConnect": "Quick Connect verwenden",
|
||||
"quickConnectCode": "Quick Connect-Code",
|
||||
"quickConnectInstructions": "Öffne Quick Connect in Jellyfin und gib diesen Code ein.",
|
||||
"quickConnectWaiting": "Warte auf Bestätigung…",
|
||||
"quickConnectCancel": "Abbrechen",
|
||||
"quickConnectExpired": "Quick Connect ist abgelaufen. Versuche es erneut."
|
||||
},
|
||||
"common": {
|
||||
"cancel": "Abbrechen",
|
||||
@@ -30,7 +39,6 @@
|
||||
"shuffle": "Zufall",
|
||||
"addTo": "Hinzufügen zu...",
|
||||
"createNew": "Neu erstellen",
|
||||
"paste": "Einfügen",
|
||||
"connect": "Verbinden",
|
||||
"disconnect": "Trennen",
|
||||
"play": "Abspielen",
|
||||
@@ -44,16 +52,17 @@
|
||||
"mute": "Stumm",
|
||||
"ok": "OK",
|
||||
"reconnect": "Erneut verbinden",
|
||||
"exitConfirmTitle": "App beenden?",
|
||||
"exitConfirmMessage": "Möchtest du die App wirklich beenden?",
|
||||
"dontAskAgain": "Nicht erneut fragen",
|
||||
"exit": "Beenden",
|
||||
"viewAll": "Alle anzeigen",
|
||||
"checkingNetwork": "Netzwerk wird geprüft...",
|
||||
"refreshingServers": "Server werden aktualisiert...",
|
||||
"loadingServers": "Server werden geladen...",
|
||||
"connectingToServers": "Verbindung zu Servern...",
|
||||
"startingOfflineMode": "Offlinemodus wird gestartet..."
|
||||
"startingOfflineMode": "Offlinemodus wird gestartet...",
|
||||
"loading": "Laden...",
|
||||
"fullscreen": "Vollbild",
|
||||
"exitFullscreen": "Vollbild verlassen",
|
||||
"pressBackAgainToExit": "Erneut Zurück drücken zum Beenden"
|
||||
},
|
||||
"screens": {
|
||||
"licenses": "Lizenzen",
|
||||
@@ -73,18 +82,18 @@
|
||||
},
|
||||
"settings": {
|
||||
"title": "Einstellungen",
|
||||
"supportDeveloper": "Plezy unterstützen",
|
||||
"supportDeveloperDescription": "Per Liberapay spenden, um die Entwicklung zu fördern",
|
||||
"language": "Sprache",
|
||||
"theme": "Design",
|
||||
"appearance": "Darstellung",
|
||||
"videoPlayback": "Videowiedergabe",
|
||||
"videoPlaybackDescription": "Wiedergabeverhalten konfigurieren",
|
||||
"advanced": "Erweitert",
|
||||
"episodePosterMode": "Episoden-Poster-Stil",
|
||||
"seriesPoster": "Serienposter",
|
||||
"seriesPosterDescription": "Zeige das Serienposter für alle Episoden",
|
||||
"seasonPoster": "Staffelposter",
|
||||
"seasonPosterDescription": "Zeige das staffelspezifische Poster für Episoden",
|
||||
"episodeThumbnail": "Episoden-Miniatur",
|
||||
"episodeThumbnailDescription": "Zeige 16:9 Episoden-Vorschaubilder",
|
||||
"episodeThumbnail": "Miniatur",
|
||||
"showHeroSectionDescription": "Bereich mit empfohlenen Inhalten auf der Startseite anzeigen",
|
||||
"secondsLabel": "Sekunden",
|
||||
"minutesLabel": "Minuten",
|
||||
@@ -92,63 +101,65 @@
|
||||
"minutesShort": "m",
|
||||
"durationHint": "Dauer eingeben (${min}-${max})",
|
||||
"systemTheme": "System",
|
||||
"systemThemeDescription": "Systemeinstellungen folgen",
|
||||
"lightTheme": "Hell",
|
||||
"darkTheme": "Dunkel",
|
||||
"oledTheme": "OLED",
|
||||
"oledThemeDescription": "Reines Schwarz für OLED-Bildschirme",
|
||||
"libraryDensity": "Mediathekdichte",
|
||||
"compact": "Kompakt",
|
||||
"compactDescription": "Kleinere Karten, mehr Elemente sichtbar",
|
||||
"normal": "Normal",
|
||||
"normalDescription": "Standardgröße",
|
||||
"comfortable": "Großzügig",
|
||||
"comfortableDescription": "Größere Karten, weniger Elemente sichtbar",
|
||||
"viewMode": "Ansichtsmodus",
|
||||
"gridView": "Raster",
|
||||
"gridViewDescription": "Elemente im Raster anzeigen",
|
||||
"listView": "Liste",
|
||||
"listViewDescription": "Elemente in Listenansicht anzeigen",
|
||||
"showHeroSection": "Hero-Bereich anzeigen",
|
||||
"useGlobalHubs": "Plex-Startseiten-Layout verwenden",
|
||||
"useGlobalHubsDescription": "Zeigt Startseiten-Hubs wie der offizielle Plex-Client. Wenn deaktiviert, werden stattdessen Empfehlungen pro Bibliothek angezeigt.",
|
||||
"useGlobalHubs": "Startlayout verwenden",
|
||||
"useGlobalHubsDescription": "Einheitliche Start-Hubs anzeigen. Sonst Bibliotheksempfehlungen verwenden.",
|
||||
"showServerNameOnHubs": "Servername bei Hubs anzeigen",
|
||||
"showServerNameOnHubsDescription": "Zeigt immer den Servernamen in Hub-Titeln an. Wenn deaktiviert, nur bei doppelten Hub-Namen.",
|
||||
"showServerNameOnHubsDescription": "Servernamen immer in Hub-Titeln anzeigen.",
|
||||
"groupLibrariesByServer": "Mediatheken nach Server gruppieren",
|
||||
"groupLibrariesByServerDescription": "Sidebar-Bibliotheken nach Medienserver gruppieren.",
|
||||
"alwaysKeepSidebarOpen": "Seitenleiste immer geöffnet halten",
|
||||
"alwaysKeepSidebarOpenDescription": "Seitenleiste bleibt erweitert und Inhaltsbereich passt sich an",
|
||||
"showUnwatchedCount": "Anzahl nicht gesehener Folgen anzeigen",
|
||||
"showUnwatchedCountDescription": "Zeigt die Anzahl nicht gesehener Episoden bei Serien und Staffeln an",
|
||||
"showEpisodeNumberOnCards": "Episodennummer auf Karten anzeigen",
|
||||
"showEpisodeNumberOnCardsDescription": "Staffel- und Episodennummer auf Episodenkarten anzeigen",
|
||||
"showSeasonPostersOnTabs": "Staffelposter auf Tabs anzeigen",
|
||||
"showSeasonPostersOnTabsDescription": "Poster jeder Staffel über ihrem Tab anzeigen",
|
||||
"hideSpoilers": "Spoiler für nicht gesehene Episoden verbergen",
|
||||
"hideSpoilersDescription": "Vorschaubilder unscharf machen und Beschreibungen für noch nicht gesehene Episoden ausblenden",
|
||||
"hideSpoilersDescription": "Vorschaubilder und Beschreibungen ungesehener Episoden verwischen",
|
||||
"playerBackend": "Player-Backend",
|
||||
"exoPlayer": "ExoPlayer (Empfohlen)",
|
||||
"exoPlayerDescription": "Android-nativer Player mit besserer Hardware-Unterstützung",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "Erweiterter Player mit mehr Funktionen und ASS-Untertitel-Unterstützung",
|
||||
"hardwareDecoding": "Hardware-Decodierung",
|
||||
"hardwareDecodingDescription": "Hardwarebeschleunigung verwenden, sofern verfügbar",
|
||||
"bufferSize": "Puffergröße",
|
||||
"bufferSizeMB": "${size}MB",
|
||||
"bufferSizeAuto": "Auto (Empfohlen)",
|
||||
"bufferSizeWarning": "Ihr Gerät hat ${heap}MB Speicher. Ein ${size}MB-Puffer kann Wiedergabeprobleme verursachen.",
|
||||
"bufferSizeWarning": "${heap}MB Speicher verfügbar. Ein ${size}MB-Puffer kann die Wiedergabe beeinträchtigen.",
|
||||
"defaultQualityTitle": "Standardqualität",
|
||||
"defaultQualityDescription": "Wird beim Starten der Wiedergabe verwendet. Niedrigere Werte reduzieren die Bandbreite.",
|
||||
"subtitleStyling": "Untertitel-Stil",
|
||||
"subtitleStylingDescription": "Aussehen von Untertiteln anpassen",
|
||||
"smallSkipDuration": "Kleine Sprungdauer",
|
||||
"largeSkipDuration": "Große Sprungdauer",
|
||||
"rewindOnResume": "Zurückspulen bei Fortsetzung",
|
||||
"rewindOnResumeDescription": "Um diesen Betrag zurückspulen, wenn die Wiedergabe fortgesetzt wird",
|
||||
"secondsUnit": "${seconds} Sekunden",
|
||||
"defaultSleepTimer": "Standard-Sleep-Timer",
|
||||
"minutesUnit": "${minutes} Minuten",
|
||||
"rememberTrackSelections": "Spurauswahl pro Serie/Film merken",
|
||||
"rememberTrackSelectionsDescription": "Audio- und Untertitelsprache automatisch speichern, wenn während der Wiedergabe geändert",
|
||||
"rememberTrackSelectionsDescription": "Audio- und Untertitelauswahl je Titel merken",
|
||||
"showChapterMarkersOnTimeline": "Kapitelmarkierungen auf der Zeitleiste anzeigen",
|
||||
"showChapterMarkersOnTimelineDescription": "Die Zeitleiste an Kapitelgrenzen unterteilen",
|
||||
"clickVideoTogglesPlayback": "Klicken Sie auf das Video, um die Wiedergabe zu starten oder zu pausieren.",
|
||||
"clickVideoTogglesPlaybackDescription": "Wenn diese Option aktiviert ist, wird durch Klicken auf den Videoplayer die Wiedergabe gestartet oder pausiert. Andernfalls werden durch Klicken die Wiedergabesteuerungen ein- oder ausgeblendet.",
|
||||
"clickVideoTogglesPlaybackDescription": "Video anklicken, um abzuspielen/zu pausieren, statt Steuerungen zu zeigen.",
|
||||
"videoPlayerControls": "Videoplayer-Steuerung",
|
||||
"keyboardShortcuts": "Tastenkürzel",
|
||||
"keyboardShortcutsDescription": "Tastenkürzel anpassen",
|
||||
"videoPlayerNavigation": "Videoplayer-Navigation",
|
||||
"videoPlayerNavigationDescription": "Pfeiltasten zur Navigation der Videoplayer-Steuerung verwenden",
|
||||
"watchTogetherRelay": "Gemeinsam Schauen Relay",
|
||||
"watchTogetherRelayDescription": "Eigenes Relay festlegen. Alle müssen denselben Server verwenden.",
|
||||
"watchTogetherRelayHint": "https://mein-relay.beispiel.de",
|
||||
"crashReporting": "Absturzberichte",
|
||||
"crashReportingDescription": "Absturzberichte senden, um die App zu verbessern",
|
||||
"debugLogging": "Debug-Protokollierung",
|
||||
@@ -156,17 +167,31 @@
|
||||
"viewLogs": "Protokolle anzeigen",
|
||||
"viewLogsDescription": "App-Protokolle anzeigen",
|
||||
"clearCache": "Cache löschen",
|
||||
"clearCacheDescription": "Löscht alle zwischengespeicherten Bilder und Daten. Die App kann danach langsamer laden.",
|
||||
"clearCacheDescription": "Zwischengespeicherte Bilder und Daten löschen. Inhalte laden eventuell langsamer.",
|
||||
"clearCacheSuccess": "Cache erfolgreich gelöscht",
|
||||
"resetSettings": "Einstellungen zurücksetzen",
|
||||
"resetSettingsDescription": "Alle Einstellungen auf Standard zurücksetzen. Dies kann nicht rückgängig gemacht werden.",
|
||||
"resetSettingsDescription": "Standardeinstellungen wiederherstellen. Dies kann nicht rückgängig gemacht werden.",
|
||||
"resetSettingsSuccess": "Einstellungen erfolgreich zurückgesetzt",
|
||||
"backup": "Sicherung",
|
||||
"exportSettings": "Einstellungen exportieren",
|
||||
"exportSettingsDescription": "Speichere deine Einstellungen in einer Datei",
|
||||
"exportSettingsSuccess": "Einstellungen exportiert",
|
||||
"exportSettingsFailed": "Einstellungen konnten nicht exportiert werden",
|
||||
"importSettings": "Einstellungen importieren",
|
||||
"importSettingsDescription": "Einstellungen aus einer Datei wiederherstellen",
|
||||
"importSettingsConfirm": "Dies ersetzt deine aktuellen Einstellungen. Fortfahren?",
|
||||
"importSettingsSuccess": "Einstellungen importiert",
|
||||
"importSettingsFailed": "Einstellungen konnten nicht importiert werden",
|
||||
"importSettingsInvalidFile": "Diese Datei ist kein gültiger Plezy-Einstellungsexport",
|
||||
"importSettingsNoUser": "Vor dem Import bitte anmelden",
|
||||
"shortcutsReset": "Tastenkürzel auf Standard zurückgesetzt",
|
||||
"about": "Über",
|
||||
"aboutDescription": "App-Informationen und Lizenzen",
|
||||
"updates": "Updates",
|
||||
"updateAvailable": "Update verfügbar",
|
||||
"checkForUpdates": "Nach Updates suchen",
|
||||
"autoCheckUpdatesOnStartup": "Beim Start automatisch nach Updates suchen",
|
||||
"autoCheckUpdatesOnStartupDescription": "Beim Start benachrichtigen, wenn ein Update verfügbar ist",
|
||||
"validationErrorEnterNumber": "Bitte eine gültige Zahl eingeben",
|
||||
"validationErrorDuration": "Dauer muss zwischen ${min} und ${max} ${unit} liegen",
|
||||
"shortcutAlreadyAssigned": "Tastenkürzel bereits zugewiesen an ${action}",
|
||||
@@ -176,6 +201,8 @@
|
||||
"autoSkipIntroDescription": "Intro-Marker nach wenigen Sekunden automatisch überspringen",
|
||||
"autoSkipCredits": "Abspann automatisch überspringen",
|
||||
"autoSkipCreditsDescription": "Abspann automatisch überspringen und nächste Episode abspielen",
|
||||
"forceSkipMarkerFallback": "Fallback-Markierungen erzwingen",
|
||||
"forceSkipMarkerFallbackDescription": "Kapitel-Titelmuster verwenden, auch wenn Plex Marker hat",
|
||||
"autoSkipDelay": "Verzögerung für automatisches Überspringen",
|
||||
"autoSkipDelayDescription": "${seconds} Sekunden vor dem automatischen Überspringen warten",
|
||||
"introPattern": "Intro-Markierungsmuster",
|
||||
@@ -196,26 +223,52 @@
|
||||
"downloadLocationSelectError": "Ordnerauswahl fehlgeschlagen",
|
||||
"downloadOnWifiOnly": "Nur über WLAN herunterladen",
|
||||
"downloadOnWifiOnlyDescription": "Downloads über mobile Daten verhindern",
|
||||
"cellularDownloadBlocked": "Downloads sind über mobile Daten deaktiviert. Verbinde dich mit einem WLAN oder ändere die Einstellung.",
|
||||
"autoRemoveWatchedDownloads": "Gesehene Downloads automatisch entfernen",
|
||||
"autoRemoveWatchedDownloadsDescription": "Angesehene Downloads automatisch löschen",
|
||||
"cellularDownloadBlocked": "Downloads sind über Mobilfunk blockiert. Nutze WiFi oder ändere die Einstellung.",
|
||||
"maxVolume": "Maximale Lautstärke",
|
||||
"maxVolumeDescription": "Lautstärke über 100% für leise Medien erlauben",
|
||||
"maxVolumePercent": "${percent}%",
|
||||
"discordRichPresence": "Discord Rich Presence",
|
||||
"discordRichPresenceDescription": "Zeige auf Discord, was du gerade schaust",
|
||||
"trakt": "Trakt",
|
||||
"traktDescription": "Wiedergabeverlauf mit Trakt synchronisieren",
|
||||
"trackers": "Tracker",
|
||||
"trackersDescription": "Fortschritt mit Trakt, MyAnimeList, AniList und Simkl synchronisieren",
|
||||
"companionRemoteServer": "Companion Remote Server",
|
||||
"companionRemoteServerDescription": "Mobilgeräten in deinem Netzwerk erlauben, diese App zu steuern",
|
||||
"autoPip": "Automatisches Bild-in-Bild",
|
||||
"autoPipDescription": "Automatisch Bild-in-Bild aktivieren, wenn die App während der Wiedergabe verlassen wird",
|
||||
"autoPipDescription": "Beim Verlassen während der Wiedergabe Bild-in-Bild starten",
|
||||
"matchContentFrameRate": "Inhalts-Bildrate anpassen",
|
||||
"matchContentFrameRateDescription": "Bildwiederholfrequenz des Displays an den Videoinhalt anpassen, reduziert Ruckeln und spart Akku",
|
||||
"matchContentFrameRateDescription": "Bildwiederholrate des Displays an Videoinhalt anpassen",
|
||||
"matchRefreshRate": "Bildwiederholrate anpassen",
|
||||
"matchRefreshRateDescription": "Bildwiederholrate im Vollbild anpassen",
|
||||
"matchDynamicRange": "Dynamikumfang anpassen",
|
||||
"matchDynamicRangeDescription": "HDR für HDR-Inhalte einschalten, danach zurück zu SDR",
|
||||
"displaySwitchDelay": "Verzögerung beim Displaywechsel",
|
||||
"tunneledPlayback": "Tunnelwiedergabe",
|
||||
"tunneledPlaybackDescription": "Hardware-beschleunigte Video-Tunnelierung verwenden. Deaktivieren, wenn bei HDR-Inhalten ein schwarzer Bildschirm mit Ton erscheint",
|
||||
"tunneledPlaybackDescription": "Video-Tunneling verwenden. Deaktivieren, wenn HDR-Wiedergabe schwarzes Video zeigt.",
|
||||
"requireProfileSelectionOnOpen": "Profil beim Öffnen abfragen",
|
||||
"requireProfileSelectionOnOpenDescription": "Profilauswahl bei jedem Öffnen der App anzeigen",
|
||||
"confirmExitOnBack": "Vor dem Beenden bestätigen",
|
||||
"confirmExitOnBackDescription": "Bestätigungsdialog anzeigen, wenn Zurück zum Beenden der App gedrückt wird",
|
||||
"forceTvMode": "TV-Modus erzwingen",
|
||||
"forceTvModeDescription": "TV-Layout erzwingen. Für Geräte ohne automatische Erkennung. Neustart erforderlich.",
|
||||
"startInFullscreen": "Im Vollbildmodus starten",
|
||||
"startInFullscreenDescription": "Plezy beim Start im Vollbildmodus öffnen",
|
||||
"autoHidePerformanceOverlay": "Leistungsoverlay automatisch ausblenden",
|
||||
"autoHidePerformanceOverlayDescription": "Leistungsoverlay mit den Wiedergabesteuerungen ein-/ausblenden",
|
||||
"showNavBarLabels": "Navigationsleisten-Beschriftungen anzeigen",
|
||||
"showNavBarLabelsDescription": "Textbeschriftungen unter den Symbolen der Navigationsleiste anzeigen",
|
||||
"liveTvDefaultFavorites": "Standardmäßig Favoritenkanäle",
|
||||
"liveTvDefaultFavoritesDescription": "Beim Öffnen von Live TV nur Favoritenkanäle anzeigen"
|
||||
"liveTvDefaultFavoritesDescription": "Beim Öffnen von Live TV nur Favoritenkanäle anzeigen",
|
||||
"display": "Anzeige",
|
||||
"homeScreen": "Startseite",
|
||||
"navigation": "Navigation",
|
||||
"window": "Fenster",
|
||||
"content": "Inhalt",
|
||||
"player": "Wiedergabe",
|
||||
"subtitlesAndConfig": "Untertitel & Konfiguration",
|
||||
"seekAndTiming": "Spulen & Timing",
|
||||
"behavior": "Verhalten"
|
||||
},
|
||||
"search": {
|
||||
"hint": "Filme, Serien, Musik suchen...",
|
||||
@@ -239,6 +292,8 @@
|
||||
"subtitleTrackNext": "Nächste Untertitelspur",
|
||||
"chapterNext": "Nächstes Kapitel",
|
||||
"chapterPrevious": "Vorheriges Kapitel",
|
||||
"episodeNext": "Nächste Episode",
|
||||
"episodePrevious": "Vorherige Episode",
|
||||
"speedIncrease": "Geschwindigkeit erhöhen",
|
||||
"speedDecrease": "Geschwindigkeit verringern",
|
||||
"speedReset": "Geschwindigkeit zurücksetzen",
|
||||
@@ -266,6 +321,8 @@
|
||||
"colorPrimaries": "Primärfarben",
|
||||
"chromaSubsampling": "Chroma-Subsampling",
|
||||
"channels": "Kanäle",
|
||||
"subtitles": "Untertitel",
|
||||
"overallBitrate": "Gesamt-Bitrate",
|
||||
"path": "Pfad",
|
||||
"size": "Größe",
|
||||
"container": "Container",
|
||||
@@ -282,11 +339,13 @@
|
||||
"shufflePlay": "Zufallswiedergabe",
|
||||
"fileInfo": "Dateiinfo",
|
||||
"deleteFromServer": "Vom Server löschen",
|
||||
"confirmDelete": "Dieses Medium und seine Dateien werden dauerhaft von Ihrem Server gelöscht. Dies kann nicht rückgängig gemacht werden.",
|
||||
"confirmDelete": "Dieses Medium und seine Dateien von deinem Server löschen?",
|
||||
"deleteMultipleWarning": "Dies umfasst alle Episoden und deren Dateien.",
|
||||
"mediaDeletedSuccessfully": "Medienelement erfolgreich gelöscht",
|
||||
"mediaFailedToDelete": "Löschen des Medienelements fehlgeschlagen",
|
||||
"rate": "Bewerten"
|
||||
"rate": "Bewerten",
|
||||
"playFromBeginning": "Von Anfang an abspielen",
|
||||
"playVersion": "Version abspielen..."
|
||||
},
|
||||
"accessibility": {
|
||||
"mediaCardMovie": "${title}, Film",
|
||||
@@ -339,6 +398,13 @@
|
||||
"tracksButton": "Audio und Untertitel",
|
||||
"chaptersButton": "Kapitel",
|
||||
"versionsButton": "Videoversionen",
|
||||
"versionQualityButton": "Version & Qualität",
|
||||
"versionColumnHeader": "Version",
|
||||
"qualityColumnHeader": "Qualität",
|
||||
"qualityOriginal": "Original",
|
||||
"qualityPresetLabel": "${resolution}p ${bitrate} Mbps",
|
||||
"qualityBandwidthEstimate": "~${bitrate} Mbps",
|
||||
"transcodeUnavailableFallback": "Transkodierung nicht verfügbar — Wiedergabe in Originalqualität",
|
||||
"pipButton": "Bild-in-Bild Modus",
|
||||
"aspectRatioButton": "Seitenverhältnis",
|
||||
"ambientLighting": "Umgebungsbeleuchtung",
|
||||
@@ -347,7 +413,6 @@
|
||||
"alwaysOnTopButton": "Immer im Vordergrund",
|
||||
"rotationLockButton": "Drehsperre",
|
||||
"lockScreen": "Bildschirm sperren",
|
||||
"unlockScreen": "Bildschirm entsperren",
|
||||
"screenLockButton": "Bildschirmsperre",
|
||||
"longPressToUnlock": "Lange drücken zum Entsperren",
|
||||
"timelineSlider": "Video-Zeitleiste",
|
||||
@@ -358,7 +423,7 @@
|
||||
"pipErrors": {
|
||||
"androidVersion": "Erfordert Android 8.0 oder neuer",
|
||||
"iosVersion": "Erfordert iOS 15.0 oder neuer",
|
||||
"permissionDisabled": "Bild-in-Bild-Berechtigung ist deaktiviert. Aktiviere sie unter Einstellungen > Apps > Plezy > Bild-in-Bild",
|
||||
"permissionDisabled": "Bild-in-Bild ist deaktiviert. Aktiviere es in den Systemeinstellungen.",
|
||||
"notSupported": "Dieses Gerät unterstützt den Bild-in-Bild-Modus nicht",
|
||||
"voSwitchFailed": "Videoausgabe für Bild-in-Bild konnte nicht umgeschaltet werden",
|
||||
"failed": "Bild-in-Bild konnte nicht gestartet werden",
|
||||
@@ -367,7 +432,13 @@
|
||||
"chapters": "Kapitel",
|
||||
"noChaptersAvailable": "Keine Kapitel verfügbar",
|
||||
"queue": "Warteschlange",
|
||||
"noQueueItems": "Keine Elemente in der Warteschlange"
|
||||
"noQueueItems": "Keine Elemente in der Warteschlange",
|
||||
"searchSubtitles": "Untertitel suchen",
|
||||
"language": "Sprache",
|
||||
"noSubtitlesFound": "Keine Untertitel gefunden",
|
||||
"subtitleDownloaded": "Untertitel heruntergeladen",
|
||||
"subtitleDownloadFailed": "Untertitel konnte nicht heruntergeladen werden",
|
||||
"searchLanguages": "Sprachen suchen..."
|
||||
},
|
||||
"userStatus": {
|
||||
"admin": "Eigentümer",
|
||||
@@ -380,6 +451,7 @@
|
||||
"markedAsUnwatched": "Als ungesehen markiert",
|
||||
"markedAsWatchedOffline": "Als gesehen markiert (wird synchronisiert, wenn online)",
|
||||
"markedAsUnwatchedOffline": "Als ungesehen markiert (wird synchronisiert, wenn online)",
|
||||
"autoRemovedWatchedDownload": "Automatisch entfernt: ${title}",
|
||||
"removedFromContinueWatching": "Aus ‚Weiterschauen' entfernt",
|
||||
"errorLoading": "Fehler: ${error}",
|
||||
"fileInfoNotAvailable": "Dateiinfo nicht verfügbar",
|
||||
@@ -387,6 +459,10 @@
|
||||
"errorLoadingSeries": "Fehler beim Laden der Serie",
|
||||
"errorLoadingSeason": "Fehler beim Laden der Staffel",
|
||||
"musicNotSupported": "Musikwiedergabe wird noch nicht unterstützt",
|
||||
"noDescriptionAvailable": "Keine Beschreibung verfügbar",
|
||||
"noProfilesAvailable": "Keine Profile verfügbar",
|
||||
"contactAdminForProfiles": "Kontaktiere deinen Serveradministrator, um Profile hinzuzufügen",
|
||||
"unableToDetermineLibrarySection": "Bibliotheksbereich für dieses Element kann nicht ermittelt werden",
|
||||
"logsCleared": "Protokolle gelöscht",
|
||||
"logsCopied": "Protokolle in Zwischenablage kopiert",
|
||||
"noLogsAvailable": "Keine Protokolle verfügbar",
|
||||
@@ -406,19 +482,26 @@
|
||||
"failedToCreatePlayQueueNoItems": "Wiedergabewarteschlange konnte nicht erstellt werden – keine Elemente",
|
||||
"failedPlayback": "Wiedergabe für ${action} fehlgeschlagen: ${error}",
|
||||
"switchingToCompatiblePlayer": "Wechsle zu kompatiblem Player...",
|
||||
"serverLimitTitle": "Wiedergabe fehlgeschlagen",
|
||||
"serverLimitBody": "Serverfehler (HTTP 500). Ein Bandbreiten-/Transcoding-Limit lehnte diese Sitzung wohl ab. Bitte den Besitzer um Anpassung.",
|
||||
"logsUploaded": "Protokolle hochgeladen",
|
||||
"logsUploadFailed": "Protokolle konnten nicht hochgeladen werden",
|
||||
"logId": "Protokoll-ID"
|
||||
},
|
||||
"subtitlingStyling": {
|
||||
"stylingOptions": "Stiloptionen",
|
||||
"text": "Text",
|
||||
"border": "Rahmen",
|
||||
"background": "Hintergrund",
|
||||
"fontSize": "Schriftgröße",
|
||||
"textColor": "Textfarbe",
|
||||
"borderSize": "Rahmengröße",
|
||||
"borderColor": "Rahmenfarbe",
|
||||
"backgroundOpacity": "Hintergrunddeckkraft",
|
||||
"backgroundColor": "Hintergrundfarbe",
|
||||
"position": "Position"
|
||||
"position": "Position",
|
||||
"assOverride": "ASS-Überschreibung",
|
||||
"bold": "Fett",
|
||||
"italic": "Kursiv"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv-Konfiguration",
|
||||
@@ -439,12 +522,85 @@
|
||||
"dialog": {
|
||||
"confirmAction": "Aktion bestätigen"
|
||||
},
|
||||
"profiles": {
|
||||
"addPlezyProfile": "Plezy-Profil hinzufügen",
|
||||
"switchingProfile": "Profil wird gewechselt…",
|
||||
"deleteThisProfileTitle": "Dieses Profil löschen?",
|
||||
"deleteThisProfileMessage": "${displayName} entfernen. Verbindungen bleiben unberührt.",
|
||||
"active": "Aktiv",
|
||||
"manage": "Verwalten",
|
||||
"delete": "Löschen",
|
||||
"signOut": "Abmelden",
|
||||
"signOutPlexTitle": "Von Plex abmelden?",
|
||||
"signOutPlexMessage": "${displayName} und alle Plex Home-Benutzer entfernen? Du kannst dich jederzeit wieder anmelden.",
|
||||
"signedOutPlex": "Von Plex abgemeldet.",
|
||||
"signOutFailed": "Abmeldung fehlgeschlagen.",
|
||||
"sectionTitle": "Profile",
|
||||
"summarySingle": "Profile hinzufügen, um verwaltete Benutzer und lokale Identitäten zu mischen",
|
||||
"summaryMultipleWithActive": "${count} Profile · aktiv: ${activeName}",
|
||||
"summaryMultiple": "${count} Profile",
|
||||
"removeConnectionTitle": "Verbindung entfernen?",
|
||||
"removeConnectionMessage": "Zugriff von ${displayName} auf ${connectionLabel} entfernen. Andere Profile behalten ihn.",
|
||||
"deleteProfileTitle": "Profil löschen?",
|
||||
"deleteProfileMessage": "${displayName} und Verbindungen entfernen. Server bleiben verfügbar.",
|
||||
"profileNameLabel": "Profilname",
|
||||
"pinProtectionLabel": "PIN-Schutz",
|
||||
"pinManagedByPlex": "PIN wird von Plex verwaltet. Auf plex.tv bearbeiten.",
|
||||
"noPinSetEditOnPlex": "Keine PIN festgelegt. Um eine zu verlangen, bearbeite den Home-Benutzer auf plex.tv.",
|
||||
"setPin": "PIN festlegen",
|
||||
"setPinTitle": "PIN festlegen",
|
||||
"confirmPinTitle": "PIN bestätigen",
|
||||
"pinSet": "PIN festgelegt",
|
||||
"changePin": "Ändern",
|
||||
"removePin": "Entfernen",
|
||||
"connectionsLabel": "Verbindungen",
|
||||
"add": "Hinzufügen",
|
||||
"deleteProfileButton": "Profil löschen",
|
||||
"noConnectionsHint": "Keine Verbindungen — füge eine hinzu, um dieses Profil zu nutzen.",
|
||||
"noConnections": "Keine Verbindungen",
|
||||
"plexHomeAccount": "Plex Home-Konto",
|
||||
"connectionDefault": "Standard",
|
||||
"connectionAs": "als ${displayName}",
|
||||
"makeDefault": "Als Standard",
|
||||
"removeConnection": "Entfernen",
|
||||
"profileRenamed": "Profil umbenannt.",
|
||||
"borrowAddTo": "Zu ${displayName} hinzufügen",
|
||||
"borrowExplain": "Verbindung eines anderen Profils leihen. PIN-geschützte Profile erfordern eine PIN.",
|
||||
"borrowEmpty": "Noch nichts zum Ausleihen.",
|
||||
"borrowEmptySubtitle": "Verbinde zuerst Plex oder Jellyfin mit einem anderen Profil.",
|
||||
"borrowFromProfile": "Von ${displayName}",
|
||||
"borrowConnectionBorrowed": "Verbindung ausgeliehen.",
|
||||
"borrowFailed": "Verbindung konnte nicht ausgeliehen werden.",
|
||||
"incorrectPin": "Falsche PIN.",
|
||||
"sourceProfileMissingParentAccount": "Dem Quellprofil fehlt das übergeordnete Konto.",
|
||||
"failedToVerifyPin": "PIN konnte nicht verifiziert werden.",
|
||||
"newProfile": "Neues Profil",
|
||||
"profileNameHint": "z. B. Gäste, Kinder, Wohnzimmer",
|
||||
"pinProtectionOptional": "PIN-Schutz (optional)",
|
||||
"pinExplain": "4-stellige PIN zum Profilwechsel erforderlich.",
|
||||
"continueButton": "Weiter",
|
||||
"pinsDontMatch": "PINs stimmen nicht überein"
|
||||
},
|
||||
"connections": {
|
||||
"sectionTitle": "Verbindungen",
|
||||
"addConnection": "Verbindung hinzufügen",
|
||||
"addConnectionSubtitleNoProfile": "Mit Plex anmelden oder Jellyfin-Server verbinden",
|
||||
"addConnectionSubtitleScoped": "Zu ${displayName} hinzufügen: Plex, Jellyfin oder eine andere Profilverbindung",
|
||||
"sessionExpiredOne": "Sitzung für ${name} abgelaufen",
|
||||
"sessionExpiredMany": "Sitzungen für ${count} Server abgelaufen",
|
||||
"signInAgain": "Erneut anmelden"
|
||||
},
|
||||
"discover": {
|
||||
"title": "Entdecken",
|
||||
"switchProfile": "Profil wechseln",
|
||||
"noContentAvailable": "Kein Inhalt verfügbar",
|
||||
"addMediaToLibraries": "Medien zur Mediathek hinzufügen",
|
||||
"continueWatching": "Weiterschauen",
|
||||
"continueWatchingIn": "Weiterschauen in ${library}",
|
||||
"nextUp": "Als Nächstes",
|
||||
"nextUpIn": "Als Nächstes in ${library}",
|
||||
"recentlyAdded": "Kürzlich hinzugefügt",
|
||||
"recentlyAddedIn": "Kürzlich hinzugefügt in ${library}",
|
||||
"playEpisode": "S${season}E${episode}",
|
||||
"overview": "Übersicht",
|
||||
"cast": "Besetzung",
|
||||
@@ -458,7 +614,7 @@
|
||||
"errors": {
|
||||
"searchFailed": "Suche fehlgeschlagen: ${error}",
|
||||
"connectionTimeout": "Zeitüberschreitung beim Laden von ${context}",
|
||||
"connectionFailed": "Verbindung zum Plex-Server fehlgeschlagen",
|
||||
"connectionFailed": "Keine Verbindung zum Medienserver möglich",
|
||||
"failedToLoad": "Fehler beim Laden von ${context}: ${error}",
|
||||
"noClientAvailable": "Kein Client verfügbar",
|
||||
"authenticationFailed": "Authentifizierung fehlgeschlagen: ${error}",
|
||||
@@ -466,7 +622,9 @@
|
||||
"pleaseEnterToken": "Bitte Token eingeben",
|
||||
"invalidToken": "Ungültiges Token",
|
||||
"failedToVerifyToken": "Token-Verifizierung fehlgeschlagen: ${error}",
|
||||
"failedToSwitchProfile": "Profilwechsel zu ${displayName} fehlgeschlagen"
|
||||
"failedToSwitchProfile": "Profilwechsel zu ${displayName} fehlgeschlagen",
|
||||
"failedToDeleteProfile": "Löschen von ${displayName} fehlgeschlagen",
|
||||
"failedToRate": "Bewertung konnte nicht aktualisiert werden"
|
||||
},
|
||||
"libraries": {
|
||||
"title": "Mediatheken",
|
||||
@@ -483,6 +641,8 @@
|
||||
"analysisStarted": "Analyse gestartet für „${title}“",
|
||||
"failedToAnalyze": "Analyse der Mediathek fehlgeschlagen: ${error}",
|
||||
"noLibrariesFound": "Keine Mediatheken gefunden",
|
||||
"allLibrariesHidden": "Alle Mediatheken sind ausgeblendet",
|
||||
"hiddenLibrariesCount": "Ausgeblendete Mediatheken (${count})",
|
||||
"thisLibraryIsEmpty": "Diese Mediathek ist leer",
|
||||
"all": "Alle",
|
||||
"clearAll": "Alle löschen",
|
||||
@@ -519,17 +679,34 @@
|
||||
"seasons": "Staffeln",
|
||||
"episodes": "Episoden",
|
||||
"folders": "Ordner"
|
||||
},
|
||||
"filterCategories": {
|
||||
"genre": "Genre",
|
||||
"year": "Jahr",
|
||||
"contentRating": "Altersfreigabe",
|
||||
"tag": "Tag"
|
||||
},
|
||||
"sortLabels": {
|
||||
"title": "Titel",
|
||||
"dateAdded": "Hinzugefügt am",
|
||||
"releaseDate": "Erscheinungsdatum",
|
||||
"rating": "Bewertung",
|
||||
"lastPlayed": "Zuletzt abgespielt",
|
||||
"playCount": "Wiedergaben",
|
||||
"random": "Zufällig",
|
||||
"dateShared": "Datum geteilt",
|
||||
"latestEpisodeAirDate": "Letztes Folgenausstrahlungsdatum"
|
||||
}
|
||||
},
|
||||
"about": {
|
||||
"title": "Über",
|
||||
"openSourceLicenses": "Open-Source-Lizenzen",
|
||||
"versionLabel": "Version ${version}",
|
||||
"appDescription": "Ein schöner Plex-Client für Flutter",
|
||||
"appDescription": "Ein schöner Plex- und Jellyfin-Client für Flutter",
|
||||
"viewLicensesDescription": "Lizenzen von Drittanbieter-Bibliotheken anzeigen"
|
||||
},
|
||||
"serverSelection": {
|
||||
"allServerConnectionsFailed": "Verbindung zu allen Servern fehlgeschlagen. Bitte Netzwerk prüfen und erneut versuchen.",
|
||||
"allServerConnectionsFailed": "Keine Verbindung zu Servern möglich. Prüfe dein Netzwerk.",
|
||||
"noServersFoundForAccount": "Keine Server gefunden für ${username} (${email})",
|
||||
"failedToLoadServers": "Server konnten nicht geladen werden: ${error}"
|
||||
},
|
||||
@@ -566,6 +743,7 @@
|
||||
"reloadGuide": "Programmführer neu laden",
|
||||
"now": "Jetzt",
|
||||
"today": "Heute",
|
||||
"tomorrow": "Morgen",
|
||||
"midnight": "Mitternacht",
|
||||
"overnight": "Nacht",
|
||||
"morning": "Morgen",
|
||||
@@ -574,30 +752,74 @@
|
||||
"lateNight": "Spätnacht",
|
||||
"whatsOn": "Jetzt im TV",
|
||||
"watchChannel": "Kanal ansehen",
|
||||
"favorites": "Favoriten"
|
||||
"favorites": "Favoriten",
|
||||
"reorderFavorites": "Favoriten sortieren",
|
||||
"joinSession": "Laufender Sitzung beitreten",
|
||||
"watchFromStart": "Von Anfang an ansehen (vor ${minutes} Min.)",
|
||||
"watchLive": "Live ansehen",
|
||||
"goToLive": "Zum Live-Bild",
|
||||
"record": "Aufnehmen",
|
||||
"recordEpisode": "Episode aufnehmen",
|
||||
"recordSeries": "Serie aufnehmen",
|
||||
"recordOptions": "Aufnahmeoptionen",
|
||||
"recordings": "Aufnahmen",
|
||||
"scheduledRecordings": "Geplant",
|
||||
"recordingRules": "Aufnahmeregeln",
|
||||
"noScheduledRecordings": "Keine geplanten Aufnahmen",
|
||||
"noRecordingRules": "Noch keine Aufnahmeregeln",
|
||||
"manageRecording": "Aufnahme verwalten",
|
||||
"cancelRecording": "Aufnahme abbrechen",
|
||||
"cancelRecordingTitle": "Diese Aufnahme abbrechen?",
|
||||
"cancelRecordingMessage": "${title} wird nicht mehr aufgenommen.",
|
||||
"deleteRule": "Regel löschen",
|
||||
"deleteRuleTitle": "Aufnahmeregel löschen?",
|
||||
"deleteRuleMessage": "Zukünftige Episoden von ${title} werden nicht aufgenommen.",
|
||||
"recordingScheduled": "Aufnahme geplant",
|
||||
"alreadyScheduled": "Dieses Programm ist bereits geplant",
|
||||
"dvrAdminRequired": "DVR-Einstellungen erfordern ein Administratorkonto",
|
||||
"recordingFailed": "Aufnahme konnte nicht geplant werden",
|
||||
"recordingTargetMissing": "Aufnahmebibliothek konnte nicht ermittelt werden",
|
||||
"recordNotAvailable": "Aufnahme für dieses Programm nicht verfügbar",
|
||||
"recordingCancelled": "Aufnahme abgebrochen",
|
||||
"recordingRuleDeleted": "Aufnahmeregel gelöscht",
|
||||
"processRecordingRules": "Regeln neu bewerten",
|
||||
"loadingRecordings": "Aufnahmen werden geladen ...",
|
||||
"recordingInProgress": "Wird jetzt aufgenommen",
|
||||
"recordingsCount": "${count} geplant",
|
||||
"editRule": "Regel bearbeiten",
|
||||
"editRuleAction": "Bearbeiten",
|
||||
"recordingRuleUpdated": "Aufnahmeregel aktualisiert",
|
||||
"guideReloadRequested": "Guide-Aktualisierung angefordert",
|
||||
"rulesProcessRequested": "Regelauswertung angefordert",
|
||||
"recordShow": "Sendung aufnehmen"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "Downloads",
|
||||
"manage": "Verwalten",
|
||||
"tvShows": "Serien",
|
||||
"movies": "Filme",
|
||||
"noDownloads": "Noch keine Downloads",
|
||||
"noDownloadsDescription": "Heruntergeladene Inhalte werden hier für die Offline-Wiedergabe angezeigt",
|
||||
"downloadNow": "Herunterladen",
|
||||
"deleteDownload": "Download löschen",
|
||||
"retryDownload": "Download wiederholen",
|
||||
"downloadQueued": "Download in Warteschlange",
|
||||
"episodesQueued": "${count} Episoden zum Download hinzugefügt",
|
||||
"downloadDeleted": "Download gelöscht",
|
||||
"deleteConfirm": "Möchtest du \"${title}\" wirklich löschen? Die heruntergeladene Datei wird von deinem Gerät entfernt.",
|
||||
"deletingWithProgress": "Lösche ${title}... (${current} von ${total})",
|
||||
"noDownloadsTree": "Keine Downloads",
|
||||
"pauseAll": "Alle pausieren",
|
||||
"resumeAll": "Alle fortsetzen",
|
||||
"deleteAll": "Alle löschen"
|
||||
"collections": {
|
||||
"title": "Sammlungen",
|
||||
"collection": "Sammlung",
|
||||
"empty": "Sammlung ist leer",
|
||||
"unknownLibrarySection": "Löschen nicht möglich: Unbekannte Bibliothekssektion",
|
||||
"deleteCollection": "Sammlung löschen",
|
||||
"deleteConfirm": "\"${title}\" löschen? Dies kann nicht rückgängig gemacht werden.",
|
||||
"deleted": "Sammlung gelöscht",
|
||||
"deleteFailed": "Sammlung konnte nicht gelöscht werden",
|
||||
"deleteFailedWithError": "Sammlung konnte nicht gelöscht werden: ${error}",
|
||||
"failedToLoadItems": "Sammlungselemente konnten nicht geladen werden: ${error}",
|
||||
"selectCollection": "Sammlung auswählen",
|
||||
"collectionName": "Sammlungsname",
|
||||
"enterCollectionName": "Sammlungsnamen eingeben",
|
||||
"addedToCollection": "Zur Sammlung hinzugefügt",
|
||||
"errorAddingToCollection": "Fehler beim Hinzufügen zur Sammlung",
|
||||
"created": "Sammlung erstellt",
|
||||
"removeFromCollection": "Aus Sammlung entfernen",
|
||||
"removeFromCollectionConfirm": "\"${title}\" aus dieser Sammlung entfernen?",
|
||||
"removedFromCollection": "Aus Sammlung entfernt",
|
||||
"removeFromCollectionFailed": "Entfernen aus Sammlung fehlgeschlagen",
|
||||
"removeFromCollectionError": "Fehler beim Entfernen aus der Sammlung: ${error}",
|
||||
"searchCollections": "Sammlungen durchsuchen..."
|
||||
},
|
||||
"playlists": {
|
||||
"title": "Wiedergabelisten",
|
||||
"playlist": "Wiedergabeliste",
|
||||
"noPlaylists": "Keine Wiedergabelisten gefunden",
|
||||
"create": "Wiedergabeliste erstellen",
|
||||
"playlistName": "Name der Wiedergabeliste",
|
||||
@@ -620,31 +842,7 @@
|
||||
"errorLoading": "Wiedergabelisten konnten nicht geladen werden",
|
||||
"errorAdding": "Konnte nicht zur Wiedergabeliste hinzugefügt werden",
|
||||
"errorReordering": "Element der Wiedergabeliste konnte nicht neu geordnet werden",
|
||||
"errorRemoving": "Konnte nicht aus der Wiedergabeliste entfernt werden",
|
||||
"playlist": "Wiedergabeliste"
|
||||
},
|
||||
"collections": {
|
||||
"title": "Sammlungen",
|
||||
"collection": "Sammlung",
|
||||
"empty": "Sammlung ist leer",
|
||||
"unknownLibrarySection": "Löschen nicht möglich: Unbekannte Bibliothekssektion",
|
||||
"deleteCollection": "Sammlung löschen",
|
||||
"deleteConfirm": "Sind Sie sicher, dass Sie \"${title}\" löschen möchten? Dies kann nicht rückgängig gemacht werden.",
|
||||
"deleted": "Sammlung gelöscht",
|
||||
"deleteFailed": "Sammlung konnte nicht gelöscht werden",
|
||||
"deleteFailedWithError": "Sammlung konnte nicht gelöscht werden: ${error}",
|
||||
"failedToLoadItems": "Sammlungselemente konnten nicht geladen werden: ${error}",
|
||||
"selectCollection": "Sammlung auswählen",
|
||||
"collectionName": "Sammlungsname",
|
||||
"enterCollectionName": "Sammlungsnamen eingeben",
|
||||
"addedToCollection": "Zur Sammlung hinzugefügt",
|
||||
"errorAddingToCollection": "Fehler beim Hinzufügen zur Sammlung",
|
||||
"created": "Sammlung erstellt",
|
||||
"removeFromCollection": "Aus Sammlung entfernen",
|
||||
"removeFromCollectionConfirm": "\"${title}\" aus dieser Sammlung entfernen?",
|
||||
"removedFromCollection": "Aus Sammlung entfernt",
|
||||
"removeFromCollectionFailed": "Entfernen aus Sammlung fehlgeschlagen",
|
||||
"removeFromCollectionError": "Fehler beim Entfernen aus der Sammlung: ${error}"
|
||||
"errorRemoving": "Konnte nicht aus der Wiedergabeliste entfernt werden"
|
||||
},
|
||||
"watchTogether": {
|
||||
"title": "Gemeinsam Schauen",
|
||||
@@ -681,27 +879,97 @@
|
||||
"leave": "Verlassen",
|
||||
"syncing": "Synchronisieren...",
|
||||
"joinWatchSession": "Schausitzung Beitreten",
|
||||
"enterCodeHint": "8-stelligen Code eingeben",
|
||||
"enterCodeHint": "5-stelligen Code eingeben",
|
||||
"pasteFromClipboard": "Aus Zwischenablage einfügen",
|
||||
"pleaseEnterCode": "Bitte gib einen Sitzungscode ein",
|
||||
"codeMustBe8Chars": "Sitzungscode muss 8 Zeichen haben",
|
||||
"joinInstructions": "Gib den vom Host geteilten Sitzungscode ein, um seiner Schausitzung beizutreten.",
|
||||
"codeMustBe5Chars": "Sitzungscode muss 5 Zeichen haben",
|
||||
"joinInstructions": "Gib den Sitzungscode des Hosts ein, um beizutreten.",
|
||||
"failedToCreate": "Sitzung konnte nicht erstellt werden",
|
||||
"failedToJoin": "Sitzung konnte nicht beigetreten werden",
|
||||
"sessionCodeCopied": "Sitzungscode in Zwischenablage kopiert",
|
||||
"relayUnreachable": "Der Relay-Server ist nicht erreichbar. Möglicherweise blockiert dein Internetanbieter die Verbindung. Du kannst es trotzdem versuchen, aber Watch Together funktioniert eventuell nicht.",
|
||||
"relayUnreachable": "Relay-Server nicht erreichbar. ISP-Blockierung kann Watch Together verhindern.",
|
||||
"reconnectingToHost": "Verbindung zum Host wird wiederhergestellt...",
|
||||
"currentPlayback": "Aktuelle Wiedergabe",
|
||||
"joinCurrentPlayback": "Aktuelle Wiedergabe beitreten",
|
||||
"joinCurrentPlaybackDescription": "Springe zurück zu dem, was der Host gerade ansieht",
|
||||
"failedToOpenCurrentPlayback": "Aktuelle Wiedergabe konnte nicht geöffnet werden",
|
||||
"participantJoined": "${name} ist beigetreten",
|
||||
"participantLeft": "${name} hat die Sitzung verlassen"
|
||||
"participantLeft": "${name} hat die Sitzung verlassen",
|
||||
"participantPaused": "${name} hat pausiert",
|
||||
"participantResumed": "${name} hat fortgesetzt",
|
||||
"participantSeeked": "${name} hat gespult",
|
||||
"participantBuffering": "${name} puffert",
|
||||
"waitingForParticipants": "Warte auf andere zum Laden...",
|
||||
"recentRooms": "Letzte Räume",
|
||||
"renameRoom": "Raum umbenennen",
|
||||
"removeRoom": "Entfernen",
|
||||
"guestSwitchUnavailable": "Wechsel fehlgeschlagen — Server nicht für Synchronisierung verfügbar",
|
||||
"guestSwitchFailed": "Wechsel fehlgeschlagen — Inhalt auf diesem Server nicht gefunden"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "Downloads",
|
||||
"manage": "Verwalten",
|
||||
"tvShows": "Serien",
|
||||
"movies": "Filme",
|
||||
"noDownloads": "Noch keine Downloads",
|
||||
"noDownloadsDescription": "Heruntergeladene Inhalte werden hier für die Offline-Wiedergabe angezeigt",
|
||||
"downloadNow": "Herunterladen",
|
||||
"deleteDownload": "Download löschen",
|
||||
"retryDownload": "Download wiederholen",
|
||||
"downloadQueued": "Download in Warteschlange",
|
||||
"serverErrorBitrate": "Serverfehler: Datei überschreitet möglicherweise das Remote-Bitrate-Limit",
|
||||
"episodesQueued": "${count} Episoden zum Download hinzugefügt",
|
||||
"downloadDeleted": "Download gelöscht",
|
||||
"deleteConfirm": "\"${title}\" von diesem Gerät löschen?",
|
||||
"deletingWithProgress": "Lösche ${title}... (${current} von ${total})",
|
||||
"deleting": "Lösche...",
|
||||
"queuedTooltip": "In Warteschlange",
|
||||
"queuedFilesTooltip": "In Warteschlange: ${files}",
|
||||
"downloadingTooltip": "Lädt herunter...",
|
||||
"downloadingFilesTooltip": "Lädt ${files} herunter",
|
||||
"noDownloadsTree": "Keine Downloads",
|
||||
"pauseAll": "Alle pausieren",
|
||||
"resumeAll": "Alle fortsetzen",
|
||||
"deleteAll": "Alle löschen",
|
||||
"selectVersion": "Version auswählen",
|
||||
"allEpisodes": "Alle Episoden",
|
||||
"unwatchedOnly": "Nur ungesehene",
|
||||
"nextNUnwatched": "Nächste ${count} ungesehene",
|
||||
"customAmount": "Eigene Anzahl...",
|
||||
"howManyEpisodes": "Wie viele Episoden?",
|
||||
"itemsQueued": "${count} Elemente zum Download eingereiht",
|
||||
"keepSynced": "Synchronisiert halten",
|
||||
"downloadOnce": "Einmal herunterladen",
|
||||
"keepNUnwatched": "${count} ungesehene behalten",
|
||||
"editSyncRule": "Sync-Regel bearbeiten",
|
||||
"removeSyncRule": "Sync-Regel entfernen",
|
||||
"removeSyncRuleConfirm": "Synchronisierung von \"${title}\" beenden? Heruntergeladene Episoden werden behalten.",
|
||||
"syncRuleCreated": "Sync-Regel erstellt — ${count} ungesehene Episoden werden behalten",
|
||||
"syncRuleUpdated": "Sync-Regel aktualisiert",
|
||||
"syncRuleRemoved": "Sync-Regel entfernt",
|
||||
"syncedNewEpisodes": "${count} neue Episoden für ${title} synchronisiert",
|
||||
"activeSyncRules": "Sync-Regeln",
|
||||
"noSyncRules": "Keine Sync-Regeln",
|
||||
"manageSyncRule": "Synchronisierung verwalten",
|
||||
"editEpisodeCount": "Episodenanzahl",
|
||||
"editSyncFilter": "Synchronisierungsfilter",
|
||||
"syncAllItems": "Alle Einträge synchronisieren",
|
||||
"syncUnwatchedItems": "Ungesehene Einträge synchronisieren",
|
||||
"syncRuleServerContext": "Server: ${server} • ${status}",
|
||||
"syncRuleAvailable": "Verfügbar",
|
||||
"syncRuleOffline": "Offline",
|
||||
"syncRuleSignInRequired": "Anmeldung erforderlich",
|
||||
"syncRuleNotAvailableForProfile": "Für aktuelles Profil nicht verfügbar",
|
||||
"syncRuleUnknownServer": "Unbekannter Server",
|
||||
"syncRuleListCreated": "Sync-Regel erstellt"
|
||||
},
|
||||
"shaders": {
|
||||
"title": "Shader",
|
||||
"noShaderDescription": "Keine Videoverbesserung",
|
||||
"nvscalerDescription": "NVIDIA-Bildskalierung für schärferes Video",
|
||||
"artcnnVariantNeutral": "Neutral",
|
||||
"artcnnVariantDenoise": "Rauschreduzierung",
|
||||
"artcnnVariantDenoiseSharpen": "Rauschreduzierung + Schärfen",
|
||||
"qualityFast": "Schnell",
|
||||
"qualityHQ": "Hohe Qualität",
|
||||
"mode": "Modus",
|
||||
@@ -714,54 +982,36 @@
|
||||
},
|
||||
"companionRemote": {
|
||||
"title": "Companion-Fernbedienung",
|
||||
"connectToDevice": "Mit Gerät verbinden",
|
||||
"hostRemoteSession": "Fernsteuerungssitzung starten",
|
||||
"controlThisDevice": "Dieses Gerät mit dem Handy steuern",
|
||||
"remoteControl": "Fernsteuerung",
|
||||
"controlDesktop": "Ein Desktop-Gerät steuern",
|
||||
"connectedTo": "Verbunden mit ${name}",
|
||||
"session": {
|
||||
"creatingSession": "Fernsteuerungssitzung wird erstellt...",
|
||||
"failedToCreate": "Fernsteuerungssitzung konnte nicht erstellt werden:",
|
||||
"noSession": "Keine Sitzung verfügbar",
|
||||
"scanQrCode": "QR-Code scannen",
|
||||
"orEnterManually": "Oder manuell eingeben",
|
||||
"startingServer": "Remote-Server wird gestartet...",
|
||||
"failedToCreate": "Remote-Server konnte nicht gestartet werden:",
|
||||
"hostAddress": "Host-Adresse",
|
||||
"sessionId": "Sitzungs-ID",
|
||||
"pin": "PIN",
|
||||
"connected": "Verbunden",
|
||||
"waitingForConnection": "Warte auf Verbindung...",
|
||||
"serverRunning": "Remote-Server aktiv",
|
||||
"serverStopped": "Remote-Server gestoppt",
|
||||
"serverRunningDescription": "Mobilgeräte in deinem Netzwerk können sich mit dieser App verbinden",
|
||||
"serverStoppedDescription": "Starte den Server, um Mobilgeräten die Verbindung zu ermöglichen",
|
||||
"usePhoneToControl": "Verwende dein Mobilgerät, um diese App zu steuern",
|
||||
"copiedToClipboard": "${label} in Zwischenablage kopiert",
|
||||
"copyToClipboard": "In Zwischenablage kopieren",
|
||||
"newSession": "Neue Sitzung",
|
||||
"startServer": "Server starten",
|
||||
"stopServer": "Server stoppen",
|
||||
"minimize": "Minimieren"
|
||||
},
|
||||
"pairing": {
|
||||
"scan": "Scannen",
|
||||
"manual": "Manuell",
|
||||
"pairWithDesktop": "Mit Desktop koppeln",
|
||||
"enterSessionDetails": "Gib die Sitzungsdetails ein, die auf deinem Desktop-Gerät angezeigt werden",
|
||||
"discoveryDescription": "Plezy-Geräte mit demselben Plex-Konto erscheinen hier",
|
||||
"hostAddressHint": "192.168.1.100:48632",
|
||||
"sessionIdHint": "8-stellige Sitzungs-ID eingeben",
|
||||
"pinHint": "6-stellige PIN eingeben",
|
||||
"connecting": "Verbinde...",
|
||||
"tips": "Tipps",
|
||||
"tipDesktop": "Öffne Plezy auf deinem Desktop und aktiviere Companion Remote in den Einstellungen oder im Menü",
|
||||
"tipScan": "Verwende den Scannen-Tab, um dich schnell per QR-Code auf deinem Desktop zu koppeln",
|
||||
"tipWifi": "Stelle sicher, dass beide Geräte im selben WiFi-Netzwerk sind",
|
||||
"cameraPermissionRequired": "Kameraberechtigung wird zum Scannen von QR-Codes benötigt.\nBitte erteile den Kamerazugriff in den Geräteeinstellungen.",
|
||||
"cameraError": "Kamera konnte nicht gestartet werden: ${error}",
|
||||
"scanInstruction": "Richte deine Kamera auf den QR-Code auf deinem Desktop",
|
||||
"invalidQrCode": "Ungültiges QR-Code-Format",
|
||||
"connecting": "Verbinden...",
|
||||
"searchingForDevices": "Suche nach Geräten...",
|
||||
"noDevicesFound": "Keine Geräte in deinem Netzwerk gefunden",
|
||||
"noDevicesHint": "Öffne Plezy auf dem Desktop und nutze dasselbe WiFi",
|
||||
"availableDevices": "Verfügbare Geräte",
|
||||
"manualConnection": "Manuelle Verbindung",
|
||||
"cryptoInitFailed": "Sichere Verbindung konnte nicht gestartet werden. Melde dich zuerst bei Plex an.",
|
||||
"validationHostRequired": "Bitte Host-Adresse eingeben",
|
||||
"validationHostFormat": "Format muss IP:Port sein (z.B. 192.168.1.100:48632)",
|
||||
"validationSessionIdRequired": "Bitte Sitzungs-ID eingeben",
|
||||
"validationSessionIdLength": "Sitzungs-ID muss 8 Zeichen lang sein",
|
||||
"validationPinRequired": "Bitte PIN eingeben",
|
||||
"validationPinLength": "PIN muss 6 Ziffern haben",
|
||||
"connectionTimedOut": "Zeitüberschreitung. Bitte Sitzungs-ID und PIN überprüfen.",
|
||||
"sessionNotFound": "Sitzung nicht gefunden. Bitte Zugangsdaten überprüfen.",
|
||||
"connectionTimedOut": "Verbindung hat Zeitlimit überschritten. Nutze auf beiden Geräten dasselbe Netzwerk.",
|
||||
"sessionNotFound": "Gerät nicht gefunden. Stelle sicher, dass Plezy auf dem Host läuft.",
|
||||
"authFailed": "Authentifizierung fehlgeschlagen. Beide Geräte benötigen dasselbe Plex-Konto.",
|
||||
"failedToConnect": "Verbindung fehlgeschlagen: ${error}"
|
||||
},
|
||||
"remote": {
|
||||
@@ -769,8 +1019,6 @@
|
||||
"reconnecting": "Verbindung wird wiederhergestellt...",
|
||||
"attemptOf": "Versuch ${current} von 5",
|
||||
"retryNow": "Jetzt wiederholen",
|
||||
"connectionError": "Verbindungsfehler",
|
||||
"notConnected": "Nicht verbunden",
|
||||
"tabRemote": "Fernbedienung",
|
||||
"tabPlay": "Wiedergabe",
|
||||
"tabMore": "Mehr",
|
||||
@@ -806,13 +1054,14 @@
|
||||
"audioOutput": "Audioausgabe",
|
||||
"performanceOverlay": "Leistungsanzeige",
|
||||
"audioPassthrough": "Audio-Durchleitung",
|
||||
"audioNormalization": "Audio-Normalisierung"
|
||||
"audioNormalization": "Lautstärke normalisieren"
|
||||
},
|
||||
"externalPlayer": {
|
||||
"title": "Externer Player",
|
||||
"useExternalPlayer": "Externen Player verwenden",
|
||||
"useExternalPlayerDescription": "Videos in einer externen App statt im integrierten Player öffnen",
|
||||
"useExternalPlayerDescription": "Videos in einer anderen App öffnen",
|
||||
"selectPlayer": "Player auswählen",
|
||||
"customPlayers": "Benutzerdefinierte Player",
|
||||
"systemDefault": "Systemstandard",
|
||||
"addCustomPlayer": "Benutzerdefinierten Player hinzufügen",
|
||||
"playerName": "Playername",
|
||||
@@ -840,8 +1089,12 @@
|
||||
"summary": "Zusammenfassung",
|
||||
"poster": "Poster",
|
||||
"background": "Hintergrund",
|
||||
"logo": "Logo",
|
||||
"squareArt": "Quadratisches Bild",
|
||||
"selectPoster": "Poster auswählen",
|
||||
"selectBackground": "Hintergrund auswählen",
|
||||
"selectLogo": "Logo auswählen",
|
||||
"selectSquareArt": "Quadratisches Bild auswählen",
|
||||
"fromUrl": "Von URL",
|
||||
"uploadFile": "Datei hochladen",
|
||||
"enterImageUrl": "Bild-URL eingeben",
|
||||
@@ -883,6 +1136,124 @@
|
||||
"subtitleMode": "Automatische Untertitelauswahl",
|
||||
"manuallySelected": "Manuell ausgewählt",
|
||||
"shownWithForeignAudio": "Bei fremdsprachigem Audio anzeigen",
|
||||
"alwaysEnabled": "Immer aktiviert"
|
||||
"alwaysEnabled": "Immer aktiviert",
|
||||
"tags": "Tags",
|
||||
"addTag": "Tag hinzufügen",
|
||||
"genre": "Genre",
|
||||
"director": "Regisseur",
|
||||
"writer": "Autor",
|
||||
"producer": "Produzent",
|
||||
"country": "Land",
|
||||
"collection": "Sammlung",
|
||||
"label": "Label",
|
||||
"style": "Stil",
|
||||
"mood": "Stimmung"
|
||||
},
|
||||
"matchScreen": {
|
||||
"match": "Zuordnen...",
|
||||
"fixMatch": "Zuordnung korrigieren...",
|
||||
"unmatch": "Zuordnung aufheben",
|
||||
"unmatchConfirm": "Diese Zuordnung löschen? Plex behandelt sie als nicht zugeordnet, bis sie neu zugeordnet wird.",
|
||||
"unmatchSuccess": "Zuordnung aufgehoben",
|
||||
"unmatchFailed": "Zuordnung konnte nicht aufgehoben werden",
|
||||
"matchApplied": "Zuordnung angewendet",
|
||||
"matchFailed": "Zuordnung konnte nicht angewendet werden",
|
||||
"titleHint": "Titel",
|
||||
"yearHint": "Jahr",
|
||||
"search": "Suchen",
|
||||
"noMatchesFound": "Keine Treffer gefunden"
|
||||
},
|
||||
"serverTasks": {
|
||||
"title": "Serveraufgaben",
|
||||
"failedToLoad": "Aufgaben konnten nicht geladen werden",
|
||||
"noTasks": "Keine laufenden Aufgaben"
|
||||
},
|
||||
"trakt": {
|
||||
"title": "Trakt",
|
||||
"connected": "Verbunden",
|
||||
"connectedAs": "Verbunden als @${username}",
|
||||
"disconnectConfirm": "Trakt-Konto trennen?",
|
||||
"disconnectConfirmBody": "Plezy sendet keine Ereignisse mehr an Trakt. Du kannst jederzeit erneut verbinden.",
|
||||
"scrobble": "Echtzeit-Scrobbling",
|
||||
"scrobbleDescription": "Sende Play-, Pause- und Stopp-Ereignisse während der Wiedergabe an Trakt.",
|
||||
"watchedSync": "Gesehen-Status synchronisieren",
|
||||
"watchedSyncDescription": "Wenn du Inhalte in Plezy als gesehen markierst, werden sie auch auf Trakt markiert."
|
||||
},
|
||||
"trackers": {
|
||||
"title": "Tracker",
|
||||
"hubSubtitle": "Wiedergabefortschritt mit Trakt und anderen Diensten synchronisieren.",
|
||||
"notConnected": "Nicht verbunden",
|
||||
"connectedAs": "Verbunden als @${username}",
|
||||
"scrobble": "Fortschritt automatisch verfolgen",
|
||||
"scrobbleDescription": "Aktualisiere deine Liste, wenn du eine Folge oder einen Film beendest.",
|
||||
"disconnectConfirm": "${service} trennen?",
|
||||
"disconnectConfirmBody": "Plezy aktualisiert ${service} nicht mehr. Jederzeit erneut verbinden.",
|
||||
"connectFailed": "Verbindung zu ${service} fehlgeschlagen. Versuche es erneut.",
|
||||
"services": {
|
||||
"mal": "MyAnimeList",
|
||||
"anilist": "AniList",
|
||||
"simkl": "Simkl"
|
||||
},
|
||||
"deviceCode": {
|
||||
"title": "Plezy auf ${service} aktivieren",
|
||||
"body": "Gehe zu ${url} und gib diesen Code ein:",
|
||||
"openToActivate": "${service} zum Aktivieren öffnen",
|
||||
"waitingForAuthorization": "Warte auf Autorisierung…",
|
||||
"codeCopied": "Code kopiert"
|
||||
},
|
||||
"oauthProxy": {
|
||||
"title": "Bei ${service} anmelden",
|
||||
"body": "Scanne diesen QR-Code oder öffne die URL auf einem beliebigen Gerät.",
|
||||
"openToSignIn": "${service} zum Anmelden öffnen",
|
||||
"urlCopied": "URL kopiert"
|
||||
},
|
||||
"libraryFilter": {
|
||||
"title": "Bibliothekfilter",
|
||||
"subtitleAllSyncing": "Alle Bibliotheken werden synchronisiert",
|
||||
"subtitleNoneSyncing": "Nichts wird synchronisiert",
|
||||
"subtitleBlocked": "${count} blockiert",
|
||||
"subtitleAllowed": "${count} erlaubt",
|
||||
"mode": "Filtermodus",
|
||||
"modeBlacklist": "Blacklist",
|
||||
"modeWhitelist": "Whitelist",
|
||||
"modeHintBlacklist": "Alle Bibliotheken außer den unten markierten synchronisieren.",
|
||||
"modeHintWhitelist": "Nur die unten markierten Bibliotheken synchronisieren.",
|
||||
"libraries": "Bibliotheken",
|
||||
"noLibraries": "Keine Bibliotheken verfügbar"
|
||||
}
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Jellyfin-Server hinzufügen",
|
||||
"jellyfinUrlIntro": "Gib die Server-URL ein, z. B. `https://jellyfin.example.com`.",
|
||||
"serverUrl": "Server-URL",
|
||||
"findServer": "Server finden",
|
||||
"username": "Benutzername",
|
||||
"password": "Passwort",
|
||||
"signIn": "Anmelden",
|
||||
"change": "Ändern",
|
||||
"required": "Erforderlich",
|
||||
"couldNotReachServer": "Server nicht erreichbar: ${error}",
|
||||
"signInFailed": "Anmeldung fehlgeschlagen: ${error}",
|
||||
"quickConnectFailed": "Quick Connect fehlgeschlagen: ${error}",
|
||||
"addPlexTitle": "Mit Plex anmelden",
|
||||
"plexAuthIntro": "Melde dich mit Browser oder QR-Code an.",
|
||||
"plexQRPrompt": "Scanne diesen QR-Code zum Anmelden.",
|
||||
"waitingForPlexConfirmation": "Warte auf Bestätigung durch plex.tv…",
|
||||
"pinExpired": "PIN ist vor der Anmeldung abgelaufen. Bitte erneut versuchen.",
|
||||
"duplicatePlexAccount": "Bereits bei Plex angemeldet. Melde dich ab, um Konten zu wechseln.",
|
||||
"failedToRegisterAccount": "Konto konnte nicht registriert werden: ${error}",
|
||||
"enterJellyfinUrlError": "Gib die URL deines Jellyfin-Servers ein",
|
||||
"addConnectionTitle": "Verbindung hinzufügen",
|
||||
"addConnectionTitleScoped": "Zu ${name} hinzufügen",
|
||||
"addConnectionIntroGlobal": "Füge einen weiteren Medienserver hinzu. Plex und Jellyfin erscheinen zusammen auf der Startseite.",
|
||||
"addConnectionIntroScoped": "Füge einen neuen Server hinzu oder leihe einen von einem anderen Profil aus.",
|
||||
"signInWithPlexCard": "Mit Plex anmelden",
|
||||
"signInWithPlexCardSubtitle": "Dieses Gerät autorisieren. Geteilte Server werden hinzugefügt.",
|
||||
"signInWithPlexCardSubtitleScoped": "Ein Plex-Konto autorisieren. Home-Benutzer werden zu Profilen.",
|
||||
"connectToJellyfinCard": "Mit Jellyfin verbinden",
|
||||
"connectToJellyfinCardSubtitle": "Gib Server-URL, Benutzername und Passwort ein.",
|
||||
"connectToJellyfinCardSubtitleScoped": "Bei einem Jellyfin-Server anmelden. Wird mit ${name} verknüpft.",
|
||||
"borrowFromAnotherProfile": "Von einem anderen Profil ausleihen",
|
||||
"borrowFromAnotherProfileSubtitle": "Verbindung eines anderen Profils wiederverwenden. PIN-geschützte Profile erfordern eine PIN."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,13 +3,22 @@
|
||||
"title": "Plezy"
|
||||
},
|
||||
"auth": {
|
||||
"signIn": "Sign in",
|
||||
"signInWithPlex": "Sign in with Plex",
|
||||
"showQRCode": "Show QR Code",
|
||||
"authenticate": "Authenticate",
|
||||
"authenticationTimeout": "Authentication timed out. Please try again.",
|
||||
"scanQRToSignIn": "Scan this QR code to sign in",
|
||||
"waitingForAuth": "Waiting for authentication...\nPlease complete sign-in in your browser.",
|
||||
"useBrowser": "Use browser"
|
||||
"waitingForAuth": "Waiting for authentication...\nSign in from your browser.",
|
||||
"useBrowser": "Use browser",
|
||||
"or": "or",
|
||||
"connectToJellyfin": "Connect to Jellyfin",
|
||||
"useQuickConnect": "Use Quick Connect",
|
||||
"quickConnectCode": "Quick Connect code",
|
||||
"quickConnectInstructions": "Open Quick Connect in Jellyfin and enter this code.",
|
||||
"quickConnectWaiting": "Waiting for approval…",
|
||||
"quickConnectCancel": "Cancel",
|
||||
"quickConnectExpired": "Quick Connect expired. Try again."
|
||||
},
|
||||
"common": {
|
||||
"cancel": "Cancel",
|
||||
@@ -30,7 +39,6 @@
|
||||
"shuffle": "Shuffle",
|
||||
"addTo": "Add to...",
|
||||
"createNew": "Create new",
|
||||
"paste": "Paste",
|
||||
"connect": "Connect",
|
||||
"disconnect": "Disconnect",
|
||||
"play": "Play",
|
||||
@@ -44,16 +52,17 @@
|
||||
"mute": "Mute",
|
||||
"ok": "OK",
|
||||
"reconnect": "Reconnect",
|
||||
"exitConfirmTitle": "Exit app?",
|
||||
"exitConfirmMessage": "Are you sure you want to exit?",
|
||||
"dontAskAgain": "Don't ask again",
|
||||
"exit": "Exit",
|
||||
"viewAll": "View All",
|
||||
"checkingNetwork": "Checking network...",
|
||||
"refreshingServers": "Refreshing servers...",
|
||||
"loadingServers": "Loading servers...",
|
||||
"connectingToServers": "Connecting to servers...",
|
||||
"startingOfflineMode": "Starting offline mode..."
|
||||
"startingOfflineMode": "Starting offline mode...",
|
||||
"loading": "Loading...",
|
||||
"fullscreen": "Fullscreen",
|
||||
"exitFullscreen": "Exit fullscreen",
|
||||
"pressBackAgainToExit": "Press back again to exit"
|
||||
},
|
||||
"screens": {
|
||||
"licenses": "Licenses",
|
||||
@@ -73,18 +82,18 @@
|
||||
},
|
||||
"settings": {
|
||||
"title": "Settings",
|
||||
"supportDeveloper": "Support Plezy",
|
||||
"supportDeveloperDescription": "Donate via Liberapay to fund development",
|
||||
"language": "Language",
|
||||
"theme": "Theme",
|
||||
"appearance": "Appearance",
|
||||
"videoPlayback": "Video Playback",
|
||||
"videoPlaybackDescription": "Configure playback behavior",
|
||||
"advanced": "Advanced",
|
||||
"episodePosterMode": "Episode Poster Style",
|
||||
"seriesPoster": "Series Poster",
|
||||
"seriesPosterDescription": "Show the series poster for all episodes",
|
||||
"seasonPoster": "Season Poster",
|
||||
"seasonPosterDescription": "Show the season-specific poster for episodes",
|
||||
"episodeThumbnail": "Episode Thumbnail",
|
||||
"episodeThumbnailDescription": "Show 16:9 episode screenshot thumbnails",
|
||||
"episodeThumbnail": "Thumbnail",
|
||||
"showHeroSectionDescription": "Display featured content carousel on home screen",
|
||||
"secondsLabel": "Seconds",
|
||||
"minutesLabel": "Minutes",
|
||||
@@ -92,63 +101,65 @@
|
||||
"minutesShort": "m",
|
||||
"durationHint": "Enter duration (${min}-${max})",
|
||||
"systemTheme": "System",
|
||||
"systemThemeDescription": "Follow system settings",
|
||||
"lightTheme": "Light",
|
||||
"darkTheme": "Dark",
|
||||
"oledTheme": "OLED",
|
||||
"oledThemeDescription": "Pure black for OLED screens",
|
||||
"libraryDensity": "Library Density",
|
||||
"compact": "Compact",
|
||||
"compactDescription": "Smaller cards, more items visible",
|
||||
"normal": "Normal",
|
||||
"normalDescription": "Default size",
|
||||
"comfortable": "Comfortable",
|
||||
"comfortableDescription": "Larger cards, fewer items visible",
|
||||
"viewMode": "View Mode",
|
||||
"gridView": "Grid",
|
||||
"gridViewDescription": "Display items in a grid layout",
|
||||
"listView": "List",
|
||||
"listViewDescription": "Display items in a list layout",
|
||||
"showHeroSection": "Show Hero Section",
|
||||
"useGlobalHubs": "Use Plex Home Layout",
|
||||
"useGlobalHubsDescription": "Show home page hubs like the official Plex client. When off, shows per-library recommendations instead.",
|
||||
"useGlobalHubs": "Use Home Layout",
|
||||
"useGlobalHubsDescription": "Show unified home hubs. Otherwise use library recommendations.",
|
||||
"showServerNameOnHubs": "Show Server Name on Hubs",
|
||||
"showServerNameOnHubsDescription": "Always display the server name in hub titles. When off, only shows for duplicate hub names.",
|
||||
"showServerNameOnHubsDescription": "Always show server names in hub titles.",
|
||||
"groupLibrariesByServer": "Group Libraries by Server",
|
||||
"groupLibrariesByServerDescription": "Group sidebar libraries under each media server.",
|
||||
"alwaysKeepSidebarOpen": "Always Keep Sidebar Open",
|
||||
"alwaysKeepSidebarOpenDescription": "Sidebar stays expanded and content area adjusts to fit",
|
||||
"showUnwatchedCount": "Show Unwatched Count",
|
||||
"showUnwatchedCountDescription": "Display unwatched episode count on shows and seasons",
|
||||
"showEpisodeNumberOnCards": "Show Episode Number on Cards",
|
||||
"showEpisodeNumberOnCardsDescription": "Show season and episode number on episode cards",
|
||||
"showSeasonPostersOnTabs": "Show Season Posters on Tabs",
|
||||
"showSeasonPostersOnTabsDescription": "Show each season's poster above its tab",
|
||||
"hideSpoilers": "Hide Spoilers for Unwatched Episodes",
|
||||
"hideSpoilersDescription": "Blur thumbnails and hide descriptions for episodes you haven't watched yet",
|
||||
"hideSpoilersDescription": "Blur thumbnails and descriptions for unwatched episodes",
|
||||
"playerBackend": "Player Backend",
|
||||
"exoPlayer": "ExoPlayer (Recommended)",
|
||||
"exoPlayerDescription": "Android native player with better hardware support",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "Advanced player with more features and ASS subtitle support",
|
||||
"hardwareDecoding": "Hardware Decoding",
|
||||
"hardwareDecodingDescription": "Use hardware acceleration when available",
|
||||
"bufferSize": "Buffer Size",
|
||||
"bufferSizeMB": "${size}MB",
|
||||
"bufferSizeAuto": "Auto (Recommended)",
|
||||
"bufferSizeWarning": "Your device has ${heap}MB of memory. A ${size}MB buffer may cause playback issues.",
|
||||
"bufferSizeWarning": "${heap}MB memory available. A ${size}MB buffer may affect playback.",
|
||||
"defaultQualityTitle": "Default Quality",
|
||||
"defaultQualityDescription": "Used when starting playback. Lower values reduce bandwidth.",
|
||||
"subtitleStyling": "Subtitle Styling",
|
||||
"subtitleStylingDescription": "Customize subtitle appearance",
|
||||
"smallSkipDuration": "Small Skip Duration",
|
||||
"largeSkipDuration": "Large Skip Duration",
|
||||
"rewindOnResume": "Rewind on Resume",
|
||||
"rewindOnResumeDescription": "Rewind by this amount when resuming playback",
|
||||
"secondsUnit": "${seconds} seconds",
|
||||
"defaultSleepTimer": "Default Sleep Timer",
|
||||
"minutesUnit": "${minutes} minutes",
|
||||
"rememberTrackSelections": "Remember track selections per show/movie",
|
||||
"rememberTrackSelectionsDescription": "Automatically save audio and subtitle language preferences when you change tracks during playback",
|
||||
"rememberTrackSelectionsDescription": "Remember audio and subtitle choices per title",
|
||||
"showChapterMarkersOnTimeline": "Show chapter markers on seek bar",
|
||||
"showChapterMarkersOnTimelineDescription": "Segment the seek bar at chapter boundaries",
|
||||
"clickVideoTogglesPlayback": "Click on video to toggle play/pause",
|
||||
"clickVideoTogglesPlaybackDescription": "If enabled, clicking on the video player will play/pause the video. Otherwise, clicking will show/hide the playback controls.",
|
||||
"clickVideoTogglesPlaybackDescription": "Click video to play/pause instead of showing controls.",
|
||||
"videoPlayerControls": "Video Player Controls",
|
||||
"keyboardShortcuts": "Keyboard Shortcuts",
|
||||
"keyboardShortcutsDescription": "Customize keyboard shortcuts",
|
||||
"videoPlayerNavigation": "Video Player Navigation",
|
||||
"videoPlayerNavigationDescription": "Use arrow keys to navigate video player controls",
|
||||
"watchTogetherRelay": "Watch Together Relay",
|
||||
"watchTogetherRelayDescription": "Set a custom relay. Everyone must use the same server.",
|
||||
"watchTogetherRelayHint": "https://my-relay.example.com",
|
||||
"crashReporting": "Crash Reporting",
|
||||
"crashReportingDescription": "Send crash reports to help improve the app",
|
||||
"debugLogging": "Debug Logging",
|
||||
@@ -156,17 +167,31 @@
|
||||
"viewLogs": "View Logs",
|
||||
"viewLogsDescription": "View application logs",
|
||||
"clearCache": "Clear Cache",
|
||||
"clearCacheDescription": "This will clear all cached images and data. The app may take longer to load content after clearing the cache.",
|
||||
"clearCacheDescription": "Clear cached images and data. Content may load slower.",
|
||||
"clearCacheSuccess": "Cache cleared successfully",
|
||||
"resetSettings": "Reset Settings",
|
||||
"resetSettingsDescription": "This will reset all settings to their default values. This action cannot be undone.",
|
||||
"resetSettingsDescription": "Restore default settings. This can't be undone.",
|
||||
"resetSettingsSuccess": "Settings reset successfully",
|
||||
"backup": "Backup",
|
||||
"exportSettings": "Export Settings",
|
||||
"exportSettingsDescription": "Save your preferences to a file",
|
||||
"exportSettingsSuccess": "Settings exported",
|
||||
"exportSettingsFailed": "Could not export settings",
|
||||
"importSettings": "Import Settings",
|
||||
"importSettingsDescription": "Restore preferences from a file",
|
||||
"importSettingsConfirm": "This will replace your current settings. Continue?",
|
||||
"importSettingsSuccess": "Settings imported",
|
||||
"importSettingsFailed": "Could not import settings",
|
||||
"importSettingsInvalidFile": "This file isn't a valid Plezy settings export",
|
||||
"importSettingsNoUser": "Sign in before importing settings",
|
||||
"shortcutsReset": "Shortcuts reset to defaults",
|
||||
"about": "About",
|
||||
"aboutDescription": "App information and licenses",
|
||||
"updates": "Updates",
|
||||
"updateAvailable": "Update Available",
|
||||
"checkForUpdates": "Check for Updates",
|
||||
"autoCheckUpdatesOnStartup": "Automatically check for updates on startup",
|
||||
"autoCheckUpdatesOnStartupDescription": "Notify when an update is available at launch",
|
||||
"validationErrorEnterNumber": "Please enter a valid number",
|
||||
"validationErrorDuration": "Duration must be between ${min} and ${max} ${unit}",
|
||||
"shortcutAlreadyAssigned": "Shortcut already assigned to ${action}",
|
||||
@@ -176,6 +201,8 @@
|
||||
"autoSkipIntroDescription": "Automatically skip intro markers after a few seconds",
|
||||
"autoSkipCredits": "Auto Skip Credits",
|
||||
"autoSkipCreditsDescription": "Automatically skip credits and play next episode",
|
||||
"forceSkipMarkerFallback": "Force Fallback Markers",
|
||||
"forceSkipMarkerFallbackDescription": "Use chapter title patterns even when Plex has markers",
|
||||
"autoSkipDelay": "Auto Skip Delay",
|
||||
"autoSkipDelayDescription": "Wait ${seconds} seconds before auto-skipping",
|
||||
"introPattern": "Intro Marker Pattern",
|
||||
@@ -196,26 +223,52 @@
|
||||
"downloadLocationSelectError": "Failed to select folder",
|
||||
"downloadOnWifiOnly": "Download on WiFi only",
|
||||
"downloadOnWifiOnlyDescription": "Prevent downloads when on cellular data",
|
||||
"cellularDownloadBlocked": "Downloads are disabled on cellular data. Connect to WiFi or change the setting.",
|
||||
"autoRemoveWatchedDownloads": "Auto-remove watched downloads",
|
||||
"autoRemoveWatchedDownloadsDescription": "Delete watched downloads automatically",
|
||||
"cellularDownloadBlocked": "Downloads are blocked on cellular. Use WiFi or change the setting.",
|
||||
"maxVolume": "Maximum Volume",
|
||||
"maxVolumeDescription": "Allow volume boost above 100% for quiet media",
|
||||
"maxVolumePercent": "${percent}%",
|
||||
"discordRichPresence": "Discord Rich Presence",
|
||||
"discordRichPresenceDescription": "Show what you're watching on Discord",
|
||||
"trakt": "Trakt",
|
||||
"traktDescription": "Sync watch history with Trakt",
|
||||
"trackers": "Trackers",
|
||||
"trackersDescription": "Sync progress to Trakt, MyAnimeList, AniList, and Simkl",
|
||||
"companionRemoteServer": "Companion Remote Server",
|
||||
"companionRemoteServerDescription": "Allow mobile devices on your network to control this app",
|
||||
"autoPip": "Auto Picture-in-Picture",
|
||||
"autoPipDescription": "Automatically enter picture-in-picture when leaving the app during playback",
|
||||
"autoPipDescription": "Enter picture-in-picture when leaving during playback",
|
||||
"matchContentFrameRate": "Match Content Frame Rate",
|
||||
"matchContentFrameRateDescription": "Adjust display refresh rate to match video content, reducing judder and saving battery",
|
||||
"matchContentFrameRateDescription": "Match display refresh rate to video content",
|
||||
"matchRefreshRate": "Match Refresh Rate",
|
||||
"matchRefreshRateDescription": "Match display refresh rate in fullscreen",
|
||||
"matchDynamicRange": "Match Dynamic Range",
|
||||
"matchDynamicRangeDescription": "Switch HDR on for HDR content, then back to SDR",
|
||||
"displaySwitchDelay": "Display Switch Delay",
|
||||
"tunneledPlayback": "Tunneled Playback",
|
||||
"tunneledPlaybackDescription": "Use hardware-accelerated video tunneling. Disable if you see a black screen with audio on HDR content",
|
||||
"tunneledPlaybackDescription": "Use video tunneling. Disable if HDR playback shows black video.",
|
||||
"requireProfileSelectionOnOpen": "Ask for profile on app open",
|
||||
"requireProfileSelectionOnOpenDescription": "Show profile selection every time the app is opened",
|
||||
"confirmExitOnBack": "Confirm before exiting",
|
||||
"confirmExitOnBackDescription": "Show a confirmation dialog when pressing back to exit the app",
|
||||
"forceTvMode": "Force TV mode",
|
||||
"forceTvModeDescription": "Force TV layout. For devices that don't auto-detect. Requires restart.",
|
||||
"startInFullscreen": "Start in fullscreen",
|
||||
"startInFullscreenDescription": "Open Plezy in fullscreen mode at launch",
|
||||
"autoHidePerformanceOverlay": "Auto-Hide Performance Overlay",
|
||||
"autoHidePerformanceOverlayDescription": "Fade the performance overlay with the playback controls",
|
||||
"showNavBarLabels": "Show Navigation Bar Labels",
|
||||
"showNavBarLabelsDescription": "Display text labels under navigation bar icons",
|
||||
"liveTvDefaultFavorites": "Default to Favorite Channels",
|
||||
"liveTvDefaultFavoritesDescription": "Show only favorite channels when opening Live TV"
|
||||
"liveTvDefaultFavoritesDescription": "Show only favorite channels when opening Live TV",
|
||||
"display": "Display",
|
||||
"homeScreen": "Home Screen",
|
||||
"navigation": "Navigation",
|
||||
"window": "Window",
|
||||
"content": "Content",
|
||||
"player": "Player",
|
||||
"subtitlesAndConfig": "Subtitles & Configuration",
|
||||
"seekAndTiming": "Seek & Timing",
|
||||
"behavior": "Behavior"
|
||||
},
|
||||
"search": {
|
||||
"hint": "Search movies, shows, music...",
|
||||
@@ -239,6 +292,8 @@
|
||||
"subtitleTrackNext": "Next Subtitle Track",
|
||||
"chapterNext": "Next Chapter",
|
||||
"chapterPrevious": "Previous Chapter",
|
||||
"episodeNext": "Next Episode",
|
||||
"episodePrevious": "Previous Episode",
|
||||
"speedIncrease": "Increase Speed",
|
||||
"speedDecrease": "Decrease Speed",
|
||||
"speedReset": "Reset Speed",
|
||||
@@ -266,6 +321,8 @@
|
||||
"colorPrimaries": "Color Primaries",
|
||||
"chromaSubsampling": "Chroma Subsampling",
|
||||
"channels": "Channels",
|
||||
"subtitles": "Subtitles",
|
||||
"overallBitrate": "Overall Bitrate",
|
||||
"path": "Path",
|
||||
"size": "Size",
|
||||
"container": "Container",
|
||||
@@ -282,11 +339,13 @@
|
||||
"shufflePlay": "Shuffle Play",
|
||||
"fileInfo": "File Info",
|
||||
"deleteFromServer": "Delete from server",
|
||||
"confirmDelete": "This will permanently delete this media and its files from your server. This cannot be undone.",
|
||||
"confirmDelete": "Delete this media and its files from your server?",
|
||||
"deleteMultipleWarning": "This includes all episodes and their files.",
|
||||
"mediaDeletedSuccessfully": "Media item deleted successfully",
|
||||
"mediaFailedToDelete": "Failed to delete media item",
|
||||
"rate": "Rate"
|
||||
"rate": "Rate",
|
||||
"playFromBeginning": "Play from Beginning",
|
||||
"playVersion": "Play Version..."
|
||||
},
|
||||
"accessibility": {
|
||||
"mediaCardMovie": "${title}, movie",
|
||||
@@ -339,6 +398,13 @@
|
||||
"tracksButton": "Audio & Subtitles",
|
||||
"chaptersButton": "Chapters",
|
||||
"versionsButton": "Video versions",
|
||||
"versionQualityButton": "Version & Quality",
|
||||
"versionColumnHeader": "Version",
|
||||
"qualityColumnHeader": "Quality",
|
||||
"qualityOriginal": "Original",
|
||||
"qualityPresetLabel": "${resolution}p ${bitrate} Mbps",
|
||||
"qualityBandwidthEstimate": "~${bitrate} Mbps",
|
||||
"transcodeUnavailableFallback": "Transcoding unavailable — playing original quality",
|
||||
"pipButton": "Picture-in-Picture mode",
|
||||
"aspectRatioButton": "Aspect ratio",
|
||||
"ambientLighting": "Ambient lighting",
|
||||
@@ -347,7 +413,6 @@
|
||||
"alwaysOnTopButton": "Always on top",
|
||||
"rotationLockButton": "Rotation lock",
|
||||
"lockScreen": "Lock screen",
|
||||
"unlockScreen": "Unlock screen",
|
||||
"screenLockButton": "Screen lock",
|
||||
"longPressToUnlock": "Long press to unlock",
|
||||
"timelineSlider": "Video timeline",
|
||||
@@ -358,7 +423,7 @@
|
||||
"pipErrors": {
|
||||
"androidVersion": "Requires Android 8.0 or newer",
|
||||
"iosVersion": "Requires iOS 15.0 or newer",
|
||||
"permissionDisabled": "Picture-in-picture permission is disabled. Enable it in Settings > Apps > Plezy > Picture-in-picture",
|
||||
"permissionDisabled": "Picture-in-picture is disabled. Enable it in system settings.",
|
||||
"notSupported": "Device doesn't support picture-in-picture mode",
|
||||
"voSwitchFailed": "Failed to switch video output for picture-in-picture",
|
||||
"failed": "Picture-in-picture failed to start",
|
||||
@@ -367,7 +432,13 @@
|
||||
"chapters": "Chapters",
|
||||
"noChaptersAvailable": "No chapters available",
|
||||
"queue": "Queue",
|
||||
"noQueueItems": "No items in queue"
|
||||
"noQueueItems": "No items in queue",
|
||||
"searchSubtitles": "Search Subtitles",
|
||||
"language": "Language",
|
||||
"noSubtitlesFound": "No subtitles found",
|
||||
"subtitleDownloaded": "Subtitle downloaded",
|
||||
"subtitleDownloadFailed": "Failed to download subtitle",
|
||||
"searchLanguages": "Search languages..."
|
||||
},
|
||||
"userStatus": {
|
||||
"admin": "Admin",
|
||||
@@ -380,6 +451,7 @@
|
||||
"markedAsUnwatched": "Marked as unwatched",
|
||||
"markedAsWatchedOffline": "Marked as watched (will sync when online)",
|
||||
"markedAsUnwatchedOffline": "Marked as unwatched (will sync when online)",
|
||||
"autoRemovedWatchedDownload": "Auto-removed: ${title}",
|
||||
"removedFromContinueWatching": "Removed from Continue Watching",
|
||||
"errorLoading": "Error: ${error}",
|
||||
"fileInfoNotAvailable": "File information not available",
|
||||
@@ -387,6 +459,10 @@
|
||||
"errorLoadingSeries": "Error loading series",
|
||||
"errorLoadingSeason": "Error loading season",
|
||||
"musicNotSupported": "Music playback is not yet supported",
|
||||
"noDescriptionAvailable": "No description available",
|
||||
"noProfilesAvailable": "No profiles available",
|
||||
"contactAdminForProfiles": "Contact your server administrator to add profiles",
|
||||
"unableToDetermineLibrarySection": "Unable to determine library section for this item",
|
||||
"logsCleared": "Logs cleared",
|
||||
"logsCopied": "Logs copied to clipboard",
|
||||
"noLogsAvailable": "No logs available",
|
||||
@@ -406,19 +482,26 @@
|
||||
"failedToCreatePlayQueueNoItems": "Failed to create play queue - no items",
|
||||
"failedPlayback": "Failed to ${action}: ${error}",
|
||||
"switchingToCompatiblePlayer": "Switching to compatible player...",
|
||||
"serverLimitTitle": "Playback failed",
|
||||
"serverLimitBody": "Server error (HTTP 500). A bandwidth/transcoding limit likely rejected this session. Ask the owner to adjust it.",
|
||||
"logsUploaded": "Logs uploaded",
|
||||
"logsUploadFailed": "Failed to upload logs",
|
||||
"logId": "Log ID"
|
||||
},
|
||||
"subtitlingStyling": {
|
||||
"stylingOptions": "Styling Options",
|
||||
"text": "Text",
|
||||
"border": "Border",
|
||||
"background": "Background",
|
||||
"fontSize": "Font Size",
|
||||
"textColor": "Text Color",
|
||||
"borderSize": "Border Size",
|
||||
"borderColor": "Border Color",
|
||||
"backgroundOpacity": "Background Opacity",
|
||||
"backgroundColor": "Background Color",
|
||||
"position": "Position"
|
||||
"position": "Position",
|
||||
"assOverride": "ASS Override",
|
||||
"bold": "Bold",
|
||||
"italic": "Italic"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv.conf",
|
||||
@@ -439,12 +522,85 @@
|
||||
"dialog": {
|
||||
"confirmAction": "Confirm Action"
|
||||
},
|
||||
"profiles": {
|
||||
"addPlezyProfile": "Add Plezy profile",
|
||||
"switchingProfile": "Switching profile…",
|
||||
"deleteThisProfileTitle": "Delete this profile?",
|
||||
"deleteThisProfileMessage": "Remove ${displayName}. Connections aren't affected.",
|
||||
"active": "Active",
|
||||
"manage": "Manage",
|
||||
"delete": "Delete",
|
||||
"signOut": "Sign out",
|
||||
"signOutPlexTitle": "Sign out of Plex?",
|
||||
"signOutPlexMessage": "Remove ${displayName} and all Plex Home users? Sign back in anytime.",
|
||||
"signedOutPlex": "Signed out of Plex.",
|
||||
"signOutFailed": "Sign out failed.",
|
||||
"sectionTitle": "Profiles",
|
||||
"summarySingle": "Add profiles to mix managed users and local identities",
|
||||
"summaryMultipleWithActive": "${count} profiles · active: ${activeName}",
|
||||
"summaryMultiple": "${count} profiles",
|
||||
"removeConnectionTitle": "Remove connection?",
|
||||
"removeConnectionMessage": "Remove ${displayName}'s access to ${connectionLabel}. Other profiles keep it.",
|
||||
"deleteProfileTitle": "Delete profile?",
|
||||
"deleteProfileMessage": "Remove ${displayName} and its connections. Servers stay available.",
|
||||
"profileNameLabel": "Profile name",
|
||||
"pinProtectionLabel": "PIN protection",
|
||||
"pinManagedByPlex": "PIN managed by Plex. Edit on plex.tv.",
|
||||
"noPinSetEditOnPlex": "No PIN set. To require one, edit the home user on plex.tv.",
|
||||
"setPin": "Set PIN",
|
||||
"setPinTitle": "Set PIN",
|
||||
"confirmPinTitle": "Confirm PIN",
|
||||
"pinSet": "PIN set",
|
||||
"changePin": "Change",
|
||||
"removePin": "Remove",
|
||||
"connectionsLabel": "Connections",
|
||||
"add": "Add",
|
||||
"deleteProfileButton": "Delete profile",
|
||||
"noConnectionsHint": "No connections — add one to use this profile.",
|
||||
"noConnections": "No connections",
|
||||
"plexHomeAccount": "Plex Home account",
|
||||
"connectionDefault": "Default",
|
||||
"connectionAs": "as ${displayName}",
|
||||
"makeDefault": "Make default",
|
||||
"removeConnection": "Remove",
|
||||
"profileRenamed": "Profile renamed.",
|
||||
"borrowAddTo": "Add to ${displayName}",
|
||||
"borrowExplain": "Borrow another profile's connection. PIN-protected profiles require a PIN.",
|
||||
"borrowEmpty": "Nothing to borrow yet.",
|
||||
"borrowEmptySubtitle": "Connect Plex or Jellyfin to another profile first.",
|
||||
"borrowFromProfile": "From ${displayName}",
|
||||
"borrowConnectionBorrowed": "Connection borrowed.",
|
||||
"borrowFailed": "Failed to borrow connection.",
|
||||
"incorrectPin": "Incorrect PIN.",
|
||||
"sourceProfileMissingParentAccount": "Source profile is missing its parent account.",
|
||||
"failedToVerifyPin": "Failed to verify PIN.",
|
||||
"newProfile": "New profile",
|
||||
"profileNameHint": "e.g. Guests, Kids, Family Room",
|
||||
"pinProtectionOptional": "PIN protection (optional)",
|
||||
"pinExplain": "4-digit PIN required to switch profiles.",
|
||||
"continueButton": "Continue",
|
||||
"pinsDontMatch": "PINs don't match"
|
||||
},
|
||||
"connections": {
|
||||
"sectionTitle": "Connections",
|
||||
"addConnection": "Add connection",
|
||||
"addConnectionSubtitleNoProfile": "Sign in with Plex or connect a Jellyfin server",
|
||||
"addConnectionSubtitleScoped": "Add to ${displayName}: Plex, Jellyfin, or another profile connection",
|
||||
"sessionExpiredOne": "Session expired for ${name}",
|
||||
"sessionExpiredMany": "Session expired for ${count} servers",
|
||||
"signInAgain": "Sign in again"
|
||||
},
|
||||
"discover": {
|
||||
"title": "Discover",
|
||||
"switchProfile": "Switch Profile",
|
||||
"noContentAvailable": "No content available",
|
||||
"addMediaToLibraries": "Add some media to your libraries",
|
||||
"continueWatching": "Continue Watching",
|
||||
"continueWatchingIn": "Continue Watching in ${library}",
|
||||
"nextUp": "Next Up",
|
||||
"nextUpIn": "Next Up in ${library}",
|
||||
"recentlyAdded": "Recently Added",
|
||||
"recentlyAddedIn": "Recently Added in ${library}",
|
||||
"playEpisode": "S${season}E${episode}",
|
||||
"overview": "Overview",
|
||||
"cast": "Cast",
|
||||
@@ -458,7 +614,7 @@
|
||||
"errors": {
|
||||
"searchFailed": "Search failed: ${error}",
|
||||
"connectionTimeout": "Connection timeout while loading ${context}",
|
||||
"connectionFailed": "Unable to connect to Plex server",
|
||||
"connectionFailed": "Unable to connect to media server",
|
||||
"failedToLoad": "Failed to load ${context}: ${error}",
|
||||
"noClientAvailable": "No client available",
|
||||
"authenticationFailed": "Authentication failed: ${error}",
|
||||
@@ -466,7 +622,9 @@
|
||||
"pleaseEnterToken": "Please enter a token",
|
||||
"invalidToken": "Invalid token",
|
||||
"failedToVerifyToken": "Failed to verify token: ${error}",
|
||||
"failedToSwitchProfile": "Failed to switch to ${displayName}"
|
||||
"failedToSwitchProfile": "Failed to switch to ${displayName}",
|
||||
"failedToDeleteProfile": "Failed to delete ${displayName}",
|
||||
"failedToRate": "Couldn't update rating"
|
||||
},
|
||||
"libraries": {
|
||||
"title": "Libraries",
|
||||
@@ -483,6 +641,8 @@
|
||||
"analysisStarted": "Analysis started for \"${title}\"",
|
||||
"failedToAnalyze": "Failed to analyze library: ${error}",
|
||||
"noLibrariesFound": "No libraries found",
|
||||
"allLibrariesHidden": "All libraries are hidden",
|
||||
"hiddenLibrariesCount": "Hidden libraries (${count})",
|
||||
"thisLibraryIsEmpty": "This library is empty",
|
||||
"all": "All",
|
||||
"clearAll": "Clear All",
|
||||
@@ -519,17 +679,34 @@
|
||||
"seasons": "Seasons",
|
||||
"episodes": "Episodes",
|
||||
"folders": "Folders"
|
||||
},
|
||||
"filterCategories": {
|
||||
"genre": "Genre",
|
||||
"year": "Year",
|
||||
"contentRating": "Content Rating",
|
||||
"tag": "Tag"
|
||||
},
|
||||
"sortLabels": {
|
||||
"title": "Title",
|
||||
"dateAdded": "Date Added",
|
||||
"releaseDate": "Release Date",
|
||||
"rating": "Rating",
|
||||
"lastPlayed": "Last Played",
|
||||
"playCount": "Play Count",
|
||||
"random": "Random",
|
||||
"dateShared": "Date Shared",
|
||||
"latestEpisodeAirDate": "Latest Episode Air Date"
|
||||
}
|
||||
},
|
||||
"about": {
|
||||
"title": "About",
|
||||
"openSourceLicenses": "Open Source Licenses",
|
||||
"versionLabel": "Version ${version}",
|
||||
"appDescription": "A beautiful Plex client for Flutter",
|
||||
"appDescription": "A beautiful Plex and Jellyfin client for Flutter",
|
||||
"viewLicensesDescription": "View licenses of third-party libraries"
|
||||
},
|
||||
"serverSelection": {
|
||||
"allServerConnectionsFailed": "Failed to connect to any servers. Please check your network and try again.",
|
||||
"allServerConnectionsFailed": "Couldn't connect to any servers. Check your network.",
|
||||
"noServersFoundForAccount": "No servers found for ${username} (${email})",
|
||||
"failedToLoadServers": "Failed to load servers: ${error}"
|
||||
},
|
||||
@@ -566,6 +743,7 @@
|
||||
"reloadGuide": "Reload Guide",
|
||||
"now": "Now",
|
||||
"today": "Today",
|
||||
"tomorrow": "Tomorrow",
|
||||
"midnight": "Midnight",
|
||||
"overnight": "Overnight",
|
||||
"morning": "Morning",
|
||||
@@ -574,7 +752,46 @@
|
||||
"lateNight": "Late Night",
|
||||
"whatsOn": "What's On",
|
||||
"watchChannel": "Watch Channel",
|
||||
"favorites": "Favorites"
|
||||
"favorites": "Favorites",
|
||||
"reorderFavorites": "Reorder Favorites",
|
||||
"joinSession": "Join Session in Progress",
|
||||
"watchFromStart": "Watch from start (${minutes} min ago)",
|
||||
"watchLive": "Watch Live",
|
||||
"goToLive": "Go to Live",
|
||||
"record": "Record",
|
||||
"recordEpisode": "Record Episode",
|
||||
"recordSeries": "Record Series",
|
||||
"recordOptions": "Record Options",
|
||||
"recordings": "Recordings",
|
||||
"scheduledRecordings": "Scheduled",
|
||||
"recordingRules": "Recording Rules",
|
||||
"noScheduledRecordings": "Nothing scheduled to record",
|
||||
"noRecordingRules": "No recording rules yet",
|
||||
"manageRecording": "Manage recording",
|
||||
"cancelRecording": "Cancel recording",
|
||||
"cancelRecordingTitle": "Cancel this recording?",
|
||||
"cancelRecordingMessage": "${title} will no longer be recorded.",
|
||||
"deleteRule": "Delete rule",
|
||||
"deleteRuleTitle": "Delete recording rule?",
|
||||
"deleteRuleMessage": "Future episodes of ${title} will not be recorded.",
|
||||
"recordingScheduled": "Recording scheduled",
|
||||
"alreadyScheduled": "This program is already scheduled",
|
||||
"dvrAdminRequired": "DVR settings require an admin account",
|
||||
"recordingFailed": "Couldn't schedule recording",
|
||||
"recordingTargetMissing": "Couldn't determine recording library",
|
||||
"recordNotAvailable": "Recording not available for this program",
|
||||
"recordingCancelled": "Recording cancelled",
|
||||
"recordingRuleDeleted": "Recording rule deleted",
|
||||
"processRecordingRules": "Re-evaluate rules",
|
||||
"loadingRecordings": "Loading recordings...",
|
||||
"recordingInProgress": "Recording now",
|
||||
"recordingsCount": "${count} scheduled",
|
||||
"editRule": "Edit rule",
|
||||
"editRuleAction": "Edit",
|
||||
"recordingRuleUpdated": "Recording rule updated",
|
||||
"guideReloadRequested": "Guide refresh requested",
|
||||
"rulesProcessRequested": "Rule re-evaluation requested",
|
||||
"recordShow": "Record show"
|
||||
},
|
||||
"collections": {
|
||||
"title": "Collections",
|
||||
@@ -582,7 +799,7 @@
|
||||
"empty": "Collection is empty",
|
||||
"unknownLibrarySection": "Cannot delete: Unknown library section",
|
||||
"deleteCollection": "Delete Collection",
|
||||
"deleteConfirm": "Are you sure you want to delete \"${title}\"? This action cannot be undone.",
|
||||
"deleteConfirm": "Delete \"${title}\"? This can't be undone.",
|
||||
"deleted": "Collection deleted",
|
||||
"deleteFailed": "Failed to delete collection",
|
||||
"deleteFailedWithError": "Failed to delete collection: ${error}",
|
||||
@@ -597,7 +814,8 @@
|
||||
"removeFromCollectionConfirm": "Remove \"${title}\" from this collection?",
|
||||
"removedFromCollection": "Removed from collection",
|
||||
"removeFromCollectionFailed": "Failed to remove from collection",
|
||||
"removeFromCollectionError": "Error removing from collection: ${error}"
|
||||
"removeFromCollectionError": "Error removing from collection: ${error}",
|
||||
"searchCollections": "Search collections..."
|
||||
},
|
||||
"playlists": {
|
||||
"title": "Playlists",
|
||||
@@ -661,22 +879,32 @@
|
||||
"leave": "Leave",
|
||||
"syncing": "Syncing...",
|
||||
"joinWatchSession": "Join Watch Session",
|
||||
"enterCodeHint": "Enter 8-character code",
|
||||
"enterCodeHint": "Enter 5-character code",
|
||||
"pasteFromClipboard": "Paste from clipboard",
|
||||
"pleaseEnterCode": "Please enter a session code",
|
||||
"codeMustBe8Chars": "Session code must be 8 characters",
|
||||
"joinInstructions": "Enter the session code shared by the host to join their watch session.",
|
||||
"codeMustBe5Chars": "Session code must be 5 characters",
|
||||
"joinInstructions": "Enter the host's session code to join.",
|
||||
"failedToCreate": "Failed to create session",
|
||||
"failedToJoin": "Failed to join session",
|
||||
"sessionCodeCopied": "Session code copied to clipboard",
|
||||
"relayUnreachable": "The relay server is unreachable. This may be caused by your ISP blocking the connection. You can still try, but Watch Together may not work.",
|
||||
"relayUnreachable": "Relay server unreachable. ISP blocking may prevent Watch Together.",
|
||||
"reconnectingToHost": "Reconnecting to host...",
|
||||
"currentPlayback": "Current Playback",
|
||||
"joinCurrentPlayback": "Join Current Playback",
|
||||
"joinCurrentPlaybackDescription": "Jump back into what the host is currently watching",
|
||||
"failedToOpenCurrentPlayback": "Failed to open current playback",
|
||||
"participantJoined": "${name} joined",
|
||||
"participantLeft": "${name} left"
|
||||
"participantLeft": "${name} left",
|
||||
"participantPaused": "${name} paused",
|
||||
"participantResumed": "${name} resumed",
|
||||
"participantSeeked": "${name} seeked",
|
||||
"participantBuffering": "${name} is buffering",
|
||||
"waitingForParticipants": "Waiting for others to load...",
|
||||
"recentRooms": "Recent Rooms",
|
||||
"renameRoom": "Rename Room",
|
||||
"removeRoom": "Remove",
|
||||
"guestSwitchUnavailable": "Couldn't switch — server unavailable for sync",
|
||||
"guestSwitchFailed": "Couldn't switch — content not found on this server"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "Downloads",
|
||||
@@ -689,19 +917,59 @@
|
||||
"deleteDownload": "Delete download",
|
||||
"retryDownload": "Retry download",
|
||||
"downloadQueued": "Download queued",
|
||||
"serverErrorBitrate": "Server error: file may exceed the remote bitrate limit",
|
||||
"episodesQueued": "${count} episodes queued for download",
|
||||
"downloadDeleted": "Download deleted",
|
||||
"deleteConfirm": "Are you sure you want to delete \"${title}\"? This will remove the downloaded file from your device.",
|
||||
"deleteConfirm": "Delete \"${title}\" from this device?",
|
||||
"deleting": "Deleting...",
|
||||
"deletingWithProgress": "Deleting ${title}... (${current} of ${total})",
|
||||
"queuedTooltip": "Queued",
|
||||
"queuedFilesTooltip": "Queued ${files}",
|
||||
"downloadingTooltip": "Downloading...",
|
||||
"downloadingFilesTooltip": "Downloading ${files}",
|
||||
"noDownloadsTree": "No downloads",
|
||||
"pauseAll": "Pause all",
|
||||
"resumeAll": "Resume all",
|
||||
"deleteAll": "Delete all"
|
||||
"deleteAll": "Delete all",
|
||||
"selectVersion": "Select Version",
|
||||
"allEpisodes": "All episodes",
|
||||
"unwatchedOnly": "Unwatched only",
|
||||
"nextNUnwatched": "Next ${count} unwatched",
|
||||
"customAmount": "Custom amount...",
|
||||
"howManyEpisodes": "How many episodes?",
|
||||
"itemsQueued": "${count} items queued for download",
|
||||
"keepSynced": "Keep synced",
|
||||
"downloadOnce": "Download once",
|
||||
"keepNUnwatched": "Keep ${count} unwatched",
|
||||
"editSyncRule": "Edit sync rule",
|
||||
"removeSyncRule": "Remove sync rule",
|
||||
"removeSyncRuleConfirm": "Stop syncing \"${title}\"? Downloaded episodes will be kept.",
|
||||
"syncRuleCreated": "Sync rule created — keeping ${count} unwatched episodes",
|
||||
"syncRuleUpdated": "Sync rule updated",
|
||||
"syncRuleRemoved": "Sync rule removed",
|
||||
"syncedNewEpisodes": "Synced ${count} new episodes for ${title}",
|
||||
"activeSyncRules": "Sync rules",
|
||||
"noSyncRules": "No sync rules",
|
||||
"manageSyncRule": "Manage sync",
|
||||
"editEpisodeCount": "Episode count",
|
||||
"editSyncFilter": "Sync filter",
|
||||
"syncAllItems": "Syncing all items",
|
||||
"syncUnwatchedItems": "Syncing unwatched items",
|
||||
"syncRuleServerContext": "Server: ${server} • ${status}",
|
||||
"syncRuleAvailable": "Available",
|
||||
"syncRuleOffline": "Offline",
|
||||
"syncRuleSignInRequired": "Sign in required",
|
||||
"syncRuleNotAvailableForProfile": "Not available for current profile",
|
||||
"syncRuleUnknownServer": "Unknown server",
|
||||
"syncRuleListCreated": "Sync rule created"
|
||||
},
|
||||
"shaders": {
|
||||
"title": "Shaders",
|
||||
"noShaderDescription": "No video enhancement",
|
||||
"nvscalerDescription": "NVIDIA image scaling for sharper video",
|
||||
"artcnnVariantNeutral": "Neutral",
|
||||
"artcnnVariantDenoise": "Denoise",
|
||||
"artcnnVariantDenoiseSharpen": "Denoise + Sharpen",
|
||||
"qualityFast": "Fast",
|
||||
"qualityHQ": "High Quality",
|
||||
"mode": "Mode",
|
||||
@@ -714,54 +982,36 @@
|
||||
},
|
||||
"companionRemote": {
|
||||
"title": "Companion Remote",
|
||||
"connectToDevice": "Connect to Device",
|
||||
"hostRemoteSession": "Host Remote Session",
|
||||
"controlThisDevice": "Control this device with your phone",
|
||||
"remoteControl": "Remote Control",
|
||||
"controlDesktop": "Control a desktop device",
|
||||
"connectedTo": "Connected to ${name}",
|
||||
"session": {
|
||||
"creatingSession": "Creating remote session...",
|
||||
"failedToCreate": "Failed to create remote session:",
|
||||
"noSession": "No session available",
|
||||
"scanQrCode": "Scan QR Code",
|
||||
"orEnterManually": "Or enter manually",
|
||||
"startingServer": "Starting remote server...",
|
||||
"failedToCreate": "Failed to start remote server:",
|
||||
"hostAddress": "Host Address",
|
||||
"sessionId": "Session ID",
|
||||
"pin": "PIN",
|
||||
"connected": "Connected",
|
||||
"waitingForConnection": "Waiting for connection...",
|
||||
"serverRunning": "Remote server active",
|
||||
"serverStopped": "Remote server stopped",
|
||||
"serverRunningDescription": "Mobile devices on your network can connect to this app",
|
||||
"serverStoppedDescription": "Start the server to allow mobile devices to connect",
|
||||
"usePhoneToControl": "Use your mobile device to control this app",
|
||||
"copiedToClipboard": "${label} copied to clipboard",
|
||||
"copyToClipboard": "Copy to clipboard",
|
||||
"newSession": "New Session",
|
||||
"startServer": "Start Server",
|
||||
"stopServer": "Stop Server",
|
||||
"minimize": "Minimize"
|
||||
},
|
||||
"pairing": {
|
||||
"scan": "Scan",
|
||||
"manual": "Manual",
|
||||
"pairWithDesktop": "Pair with Desktop",
|
||||
"enterSessionDetails": "Enter the session details shown on your desktop device",
|
||||
"discoveryDescription": "Plezy devices with the same Plex account appear here",
|
||||
"hostAddressHint": "192.168.1.100:48632",
|
||||
"sessionIdHint": "Enter 8-character session ID",
|
||||
"pinHint": "Enter 6-digit PIN",
|
||||
"connecting": "Connecting...",
|
||||
"tips": "Tips",
|
||||
"tipDesktop": "Open Plezy on your desktop and enable Companion Remote from settings or menu",
|
||||
"tipScan": "Use the Scan tab to quickly pair by scanning the QR code on your desktop",
|
||||
"tipWifi": "Make sure both devices are on the same WiFi network",
|
||||
"cameraPermissionRequired": "Camera permission is required to scan QR codes.\nPlease grant camera access in your device settings.",
|
||||
"cameraError": "Could not start camera: ${error}",
|
||||
"scanInstruction": "Point your camera at the QR code shown on your desktop",
|
||||
"invalidQrCode": "Invalid QR code format",
|
||||
"searchingForDevices": "Looking for devices...",
|
||||
"noDevicesFound": "No devices found on your network",
|
||||
"noDevicesHint": "Open Plezy on desktop and use the same WiFi",
|
||||
"availableDevices": "Available Devices",
|
||||
"manualConnection": "Manual Connection",
|
||||
"cryptoInitFailed": "Couldn't start secure connection. Sign in to Plex first.",
|
||||
"validationHostRequired": "Please enter host address",
|
||||
"validationHostFormat": "Format must be IP:port (e.g., 192.168.1.100:48632)",
|
||||
"validationSessionIdRequired": "Please enter a session ID",
|
||||
"validationSessionIdLength": "Session ID must be 8 characters",
|
||||
"validationPinRequired": "Please enter a PIN",
|
||||
"validationPinLength": "PIN must be 6 digits",
|
||||
"connectionTimedOut": "Connection timed out. Please check the session ID and PIN.",
|
||||
"sessionNotFound": "Could not find the session. Please check your credentials.",
|
||||
"connectionTimedOut": "Connection timed out. Use the same network on both devices.",
|
||||
"sessionNotFound": "Device not found. Make sure Plezy is running on the host.",
|
||||
"authFailed": "Authentication failed. Both devices need the same Plex account.",
|
||||
"failedToConnect": "Failed to connect: ${error}"
|
||||
},
|
||||
"remote": {
|
||||
@@ -769,8 +1019,6 @@
|
||||
"reconnecting": "Reconnecting...",
|
||||
"attemptOf": "Attempt ${current} of 5",
|
||||
"retryNow": "Retry Now",
|
||||
"connectionError": "Connection error",
|
||||
"notConnected": "Not connected",
|
||||
"tabRemote": "Remote",
|
||||
"tabPlay": "Play",
|
||||
"tabMore": "More",
|
||||
@@ -806,13 +1054,14 @@
|
||||
"audioOutput": "Audio Output",
|
||||
"performanceOverlay": "Performance Overlay",
|
||||
"audioPassthrough": "Audio Passthrough",
|
||||
"audioNormalization": "Audio Normalization"
|
||||
"audioNormalization": "Normalize Loudness"
|
||||
},
|
||||
"externalPlayer": {
|
||||
"title": "External Player",
|
||||
"useExternalPlayer": "Use External Player",
|
||||
"useExternalPlayerDescription": "Open videos in an external app instead of the built-in player",
|
||||
"useExternalPlayerDescription": "Open videos in another app",
|
||||
"selectPlayer": "Select Player",
|
||||
"customPlayers": "Custom Players",
|
||||
"systemDefault": "System Default",
|
||||
"addCustomPlayer": "Add Custom Player",
|
||||
"playerName": "Player Name",
|
||||
@@ -840,8 +1089,12 @@
|
||||
"summary": "Summary",
|
||||
"poster": "Poster",
|
||||
"background": "Background",
|
||||
"logo": "Logo",
|
||||
"squareArt": "Square Art",
|
||||
"selectPoster": "Select Poster",
|
||||
"selectBackground": "Select Background",
|
||||
"selectLogo": "Select Logo",
|
||||
"selectSquareArt": "Select Square Art",
|
||||
"fromUrl": "From URL",
|
||||
"uploadFile": "Upload File",
|
||||
"enterImageUrl": "Enter image URL",
|
||||
@@ -883,6 +1136,124 @@
|
||||
"subtitleMode": "Auto-Select Subtitle Mode",
|
||||
"manuallySelected": "Manually selected",
|
||||
"shownWithForeignAudio": "Shown with foreign audio",
|
||||
"alwaysEnabled": "Always enabled"
|
||||
"alwaysEnabled": "Always enabled",
|
||||
"tags": "Tags",
|
||||
"addTag": "Add tag",
|
||||
"genre": "Genre",
|
||||
"director": "Director",
|
||||
"writer": "Writer",
|
||||
"producer": "Producer",
|
||||
"country": "Country",
|
||||
"collection": "Collection",
|
||||
"label": "Label",
|
||||
"style": "Style",
|
||||
"mood": "Mood"
|
||||
},
|
||||
"matchScreen": {
|
||||
"match": "Match...",
|
||||
"fixMatch": "Fix Match...",
|
||||
"unmatch": "Unmatch",
|
||||
"unmatchConfirm": "Clear this match? Plex treats it as unmatched until rematched.",
|
||||
"unmatchSuccess": "Item unmatched",
|
||||
"unmatchFailed": "Failed to unmatch item",
|
||||
"matchApplied": "Match applied",
|
||||
"matchFailed": "Failed to apply match",
|
||||
"titleHint": "Title",
|
||||
"yearHint": "Year",
|
||||
"search": "Search",
|
||||
"noMatchesFound": "No matches found"
|
||||
},
|
||||
"serverTasks": {
|
||||
"title": "Server Tasks",
|
||||
"failedToLoad": "Failed to load tasks",
|
||||
"noTasks": "No tasks running"
|
||||
},
|
||||
"trakt": {
|
||||
"title": "Trakt",
|
||||
"connected": "Connected",
|
||||
"connectedAs": "Connected as @${username}",
|
||||
"disconnectConfirm": "Disconnect Trakt account?",
|
||||
"disconnectConfirmBody": "Plezy will stop sending events to Trakt. You can reconnect any time.",
|
||||
"scrobble": "Real-time scrobbling",
|
||||
"scrobbleDescription": "Send play, pause, and stop events to Trakt during playback.",
|
||||
"watchedSync": "Sync watched status",
|
||||
"watchedSyncDescription": "When you mark items watched in Plezy, mark them on Trakt."
|
||||
},
|
||||
"trackers": {
|
||||
"title": "Trackers",
|
||||
"hubSubtitle": "Sync watch progress with Trakt and other services.",
|
||||
"notConnected": "Not connected",
|
||||
"connectedAs": "Connected as @${username}",
|
||||
"scrobble": "Track progress automatically",
|
||||
"scrobbleDescription": "Update your list when you finish an episode or movie.",
|
||||
"disconnectConfirm": "Disconnect ${service}?",
|
||||
"disconnectConfirmBody": "Plezy will stop updating ${service}. Reconnect any time.",
|
||||
"connectFailed": "Couldn't connect to ${service}. Try again.",
|
||||
"services": {
|
||||
"mal": "MyAnimeList",
|
||||
"anilist": "AniList",
|
||||
"simkl": "Simkl"
|
||||
},
|
||||
"deviceCode": {
|
||||
"title": "Activate Plezy on ${service}",
|
||||
"body": "Visit ${url} and enter this code:",
|
||||
"openToActivate": "Open ${service} to activate",
|
||||
"waitingForAuthorization": "Waiting for authorization…",
|
||||
"codeCopied": "Code copied"
|
||||
},
|
||||
"oauthProxy": {
|
||||
"title": "Sign in to ${service}",
|
||||
"body": "Scan this QR code or open the URL on any device.",
|
||||
"openToSignIn": "Open ${service} to sign in",
|
||||
"urlCopied": "URL copied"
|
||||
},
|
||||
"libraryFilter": {
|
||||
"title": "Library filter",
|
||||
"subtitleAllSyncing": "Syncing all libraries",
|
||||
"subtitleNoneSyncing": "Nothing syncing",
|
||||
"subtitleBlocked": "${count} blocked",
|
||||
"subtitleAllowed": "${count} allowed",
|
||||
"mode": "Filter mode",
|
||||
"modeBlacklist": "Blacklist",
|
||||
"modeWhitelist": "Whitelist",
|
||||
"modeHintBlacklist": "Sync every library except the ones checked below.",
|
||||
"modeHintWhitelist": "Sync only the libraries checked below.",
|
||||
"libraries": "Libraries",
|
||||
"noLibraries": "No libraries available"
|
||||
}
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Add Jellyfin server",
|
||||
"jellyfinUrlIntro": "Enter the server URL, e.g. `https://jellyfin.example.com`.",
|
||||
"serverUrl": "Server URL",
|
||||
"findServer": "Find server",
|
||||
"username": "Username",
|
||||
"password": "Password",
|
||||
"signIn": "Sign in",
|
||||
"change": "Change",
|
||||
"required": "Required",
|
||||
"couldNotReachServer": "Could not reach the server: ${error}",
|
||||
"signInFailed": "Sign-in failed: ${error}",
|
||||
"quickConnectFailed": "Quick Connect failed: ${error}",
|
||||
"addPlexTitle": "Sign in with Plex",
|
||||
"plexAuthIntro": "Sign in with a browser or QR code.",
|
||||
"plexQRPrompt": "Scan this QR code to sign in.",
|
||||
"waitingForPlexConfirmation": "Waiting for plex.tv to confirm your sign-in…",
|
||||
"pinExpired": "PIN expired before sign-in. Please try again.",
|
||||
"duplicatePlexAccount": "Already signed in to Plex. Sign out to switch accounts.",
|
||||
"failedToRegisterAccount": "Failed to register account: ${error}",
|
||||
"enterJellyfinUrlError": "Enter your Jellyfin server URL",
|
||||
"addConnectionTitle": "Add connection",
|
||||
"addConnectionTitleScoped": "Add to ${name}",
|
||||
"addConnectionIntroGlobal": "Add another media server. Plex and Jellyfin appear together on Home.",
|
||||
"addConnectionIntroScoped": "Add a new server, or borrow one from another profile.",
|
||||
"signInWithPlexCard": "Sign in with Plex",
|
||||
"signInWithPlexCardSubtitle": "Authorize this device. Shared servers are added.",
|
||||
"signInWithPlexCardSubtitleScoped": "Authorize a Plex account. Home users become profiles.",
|
||||
"connectToJellyfinCard": "Connect to Jellyfin",
|
||||
"connectToJellyfinCardSubtitle": "Enter your server URL, username, and password.",
|
||||
"connectToJellyfinCardSubtitleScoped": "Sign in to a Jellyfin server. Binds to ${name}.",
|
||||
"borrowFromAnotherProfile": "Borrow from another profile",
|
||||
"borrowFromAnotherProfileSubtitle": "Reuse another profile's connection. PIN-protected profiles require a PIN."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,13 +3,22 @@
|
||||
"title": "Plezy"
|
||||
},
|
||||
"auth": {
|
||||
"signIn": "Iniciar sesión",
|
||||
"signInWithPlex": "Inicia sesión con Plex",
|
||||
"showQRCode": "Mostrar código QR",
|
||||
"authenticate": "Autenticar",
|
||||
"authenticationTimeout": "Tiempo de autenticación agotado. Por favor, intenta de nuevo.",
|
||||
"scanQRToSignIn": "Escanea este código QR para iniciar sesión",
|
||||
"waitingForAuth": "Esperando autenticación...\nPor favor completa el inicio de sesión en tu navegador.",
|
||||
"useBrowser": "Usar navegador"
|
||||
"waitingForAuth": "Esperando autenticación...\nInicia sesión desde tu navegador.",
|
||||
"useBrowser": "Usar navegador",
|
||||
"or": "o",
|
||||
"connectToJellyfin": "Conectar a Jellyfin",
|
||||
"useQuickConnect": "Usar Quick Connect",
|
||||
"quickConnectCode": "Código de Quick Connect",
|
||||
"quickConnectInstructions": "Abre Quick Connect en Jellyfin e introduce este código.",
|
||||
"quickConnectWaiting": "Esperando aprobación…",
|
||||
"quickConnectCancel": "Cancelar",
|
||||
"quickConnectExpired": "Quick Connect caducó. Inténtalo de nuevo."
|
||||
},
|
||||
"common": {
|
||||
"cancel": "Cancelar",
|
||||
@@ -30,7 +39,6 @@
|
||||
"shuffle": "Aleatorio",
|
||||
"addTo": "Añadir a...",
|
||||
"createNew": "Crear",
|
||||
"paste": "Pegar",
|
||||
"connect": "Conectar",
|
||||
"disconnect": "Desconectar",
|
||||
"play": "Reproducir",
|
||||
@@ -44,16 +52,17 @@
|
||||
"mute": "Silencio",
|
||||
"ok": "OK",
|
||||
"reconnect": "Reconectar",
|
||||
"exitConfirmTitle": "¿Salir de la app?",
|
||||
"exitConfirmMessage": "¿Estás seguro de que quieres salir?",
|
||||
"dontAskAgain": "No volver a preguntar",
|
||||
"exit": "Salir",
|
||||
"viewAll": "Ver todo",
|
||||
"checkingNetwork": "Comprobando red...",
|
||||
"refreshingServers": "Actualizando servidores...",
|
||||
"loadingServers": "Cargando servidores...",
|
||||
"connectingToServers": "Conectando a servidores...",
|
||||
"startingOfflineMode": "Iniciando modo sin conexión..."
|
||||
"startingOfflineMode": "Iniciando modo sin conexión...",
|
||||
"loading": "Cargando...",
|
||||
"fullscreen": "Pantalla completa",
|
||||
"exitFullscreen": "Salir de pantalla completa",
|
||||
"pressBackAgainToExit": "Presiona atrás otra vez para salir"
|
||||
},
|
||||
"screens": {
|
||||
"licenses": "Licencias",
|
||||
@@ -73,18 +82,18 @@
|
||||
},
|
||||
"settings": {
|
||||
"title": "Configuración",
|
||||
"supportDeveloper": "Apoya Plezy",
|
||||
"supportDeveloperDescription": "Dona vía Liberapay para financiar el desarrollo",
|
||||
"language": "Idioma",
|
||||
"theme": "Tema",
|
||||
"appearance": "Apariencia",
|
||||
"videoPlayback": "Reproducción de Video",
|
||||
"videoPlaybackDescription": "Configurar el comportamiento de reproducción",
|
||||
"advanced": "Avanzado",
|
||||
"episodePosterMode": "Estilo de Póster de Episodio",
|
||||
"seriesPoster": "Póster de Serie",
|
||||
"seriesPosterDescription": "Mostrar el póster de la serie para todos los episodios",
|
||||
"seasonPoster": "Póster de Temporada",
|
||||
"seasonPosterDescription": "Mostrar el póster de la temporada para los episodios",
|
||||
"episodeThumbnail": "Miniatura de Episodio",
|
||||
"episodeThumbnailDescription": "Mostrar miniaturas de capturas de pantalla de episodios en 16:9",
|
||||
"episodeThumbnail": "Miniatura",
|
||||
"showHeroSectionDescription": "Mostrar carrusel de contenido destacado en la pantalla de inicio",
|
||||
"secondsLabel": "Segundos",
|
||||
"minutesLabel": "Minutos",
|
||||
@@ -92,63 +101,65 @@
|
||||
"minutesShort": "m",
|
||||
"durationHint": "Ingresa la duración (${min}-${max})",
|
||||
"systemTheme": "Sistema",
|
||||
"systemThemeDescription": "Sigue la configuración del sistema",
|
||||
"lightTheme": "Claro",
|
||||
"darkTheme": "Oscuro",
|
||||
"oledTheme": "OLED",
|
||||
"oledThemeDescription": "Negro puro para pantallas OLED",
|
||||
"libraryDensity": "Densidad de Biblioteca",
|
||||
"compact": "Compacto",
|
||||
"compactDescription": "Tarjetas más pequeñas, más elementos visibles",
|
||||
"normal": "Normal",
|
||||
"normalDescription": "Tamaño predeterminado",
|
||||
"comfortable": "Cómodo",
|
||||
"comfortableDescription": "Tarjetas más grandes, menos elementos visibles",
|
||||
"viewMode": "Modo de Vista",
|
||||
"gridView": "Cuadrícula",
|
||||
"gridViewDescription": "Mostrar elementos en un diseño de cuadrícula",
|
||||
"listView": "Lista",
|
||||
"listViewDescription": "Mostrar elementos en un diseño de lista",
|
||||
"showHeroSection": "Mostrar Sección Destacada",
|
||||
"useGlobalHubs": "Usar Diseño de Inicio de Plex",
|
||||
"useGlobalHubsDescription": "Mostrar los hubs de la página de inicio como el cliente oficial de Plex. Cuando está desactivado, muestra recomendaciones por biblioteca en su lugar.",
|
||||
"useGlobalHubs": "Usar diseño de inicio",
|
||||
"useGlobalHubsDescription": "Mostrar hubs de inicio unificados. Si no, usar recomendaciones de biblioteca.",
|
||||
"showServerNameOnHubs": "Mostrar Nombre del Servidor en los Hubs",
|
||||
"showServerNameOnHubsDescription": "Mostrar siempre el nombre del servidor en los títulos de los hubs. Cuando está desactivado, solo se muestra para nombres de hubs duplicados.",
|
||||
"showServerNameOnHubsDescription": "Mostrar siempre nombres de servidor en títulos de hub.",
|
||||
"groupLibrariesByServer": "Agrupar bibliotecas por servidor",
|
||||
"groupLibrariesByServerDescription": "Agrupar bibliotecas de la barra lateral por servidor multimedia.",
|
||||
"alwaysKeepSidebarOpen": "Mantener siempre la barra lateral abierta",
|
||||
"alwaysKeepSidebarOpenDescription": "La barra lateral permanece expandida y el área de contenido se ajusta para adaptarse",
|
||||
"showUnwatchedCount": "Mostrar conteo de no vistos",
|
||||
"showUnwatchedCountDescription": "Mostrar el conteo de episodios no vistos en series y temporadas",
|
||||
"showEpisodeNumberOnCards": "Mostrar número de episodio en las tarjetas",
|
||||
"showEpisodeNumberOnCardsDescription": "Mostrar temporada y episodio en tarjetas de episodio",
|
||||
"showSeasonPostersOnTabs": "Mostrar pósters de temporada en las pestañas",
|
||||
"showSeasonPostersOnTabsDescription": "Mostrar el póster de cada temporada sobre su pestaña",
|
||||
"hideSpoilers": "Ocultar spoilers de episodios no vistos",
|
||||
"hideSpoilersDescription": "Difuminar miniaturas y ocultar descripciones de episodios que aún no has visto",
|
||||
"hideSpoilersDescription": "Desenfocar miniaturas y descripciones de episodios no vistos",
|
||||
"playerBackend": "Reproductor",
|
||||
"exoPlayer": "ExoPlayer (Recomendado)",
|
||||
"exoPlayerDescription": "Reproductor nativo de Android con mejor soporte de hardware",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "Reproductor avanzado con más funciones y soporte de subtítulos ASS",
|
||||
"hardwareDecoding": "Decodificación por Hardware",
|
||||
"hardwareDecodingDescription": "Usar aceleración por hardware cuando esté disponible",
|
||||
"bufferSize": "Tamaño del Buffer",
|
||||
"bufferSizeMB": "${size}MB",
|
||||
"bufferSizeAuto": "Auto (Recomendado)",
|
||||
"bufferSizeWarning": "Tu dispositivo tiene ${heap}MB de memoria. Un búfer de ${size}MB puede causar problemas de reproducción.",
|
||||
"bufferSizeWarning": "${heap}MB de memoria disponible. Un búfer de ${size}MB puede afectar la reproducción.",
|
||||
"defaultQualityTitle": "Calidad predeterminada",
|
||||
"defaultQualityDescription": "Se utiliza al iniciar la reproducción. Los valores más bajos reducen el ancho de banda.",
|
||||
"subtitleStyling": "Estilo de Subtítulos",
|
||||
"subtitleStylingDescription": "Personalizar la apariencia de los subtítulos",
|
||||
"smallSkipDuration": "Salto pequeño",
|
||||
"largeSkipDuration": "Salto grande",
|
||||
"rewindOnResume": "Rebobinar al reanudar",
|
||||
"rewindOnResumeDescription": "Rebobinar esta cantidad al reanudar la reproducción",
|
||||
"secondsUnit": "${seconds} segundos",
|
||||
"defaultSleepTimer": "Temporizador de apagado",
|
||||
"minutesUnit": "${minutes} minutos",
|
||||
"rememberTrackSelections": "Recordar selección de pistas por serie/película",
|
||||
"rememberTrackSelectionsDescription": "Guardar automáticamente las preferencias de idioma de audio y subtítulos al cambiarlas durante la reproducción",
|
||||
"rememberTrackSelectionsDescription": "Recordar opciones de audio y subtítulos por título",
|
||||
"showChapterMarkersOnTimeline": "Mostrar marcadores de capítulos en la barra de progreso",
|
||||
"showChapterMarkersOnTimelineDescription": "Dividir la barra de progreso en los límites de capítulos",
|
||||
"clickVideoTogglesPlayback": "Clic en el video para reproducir/pausar",
|
||||
"clickVideoTogglesPlaybackDescription": "Si está habilitado, hacer clic en el reproductor de video reproducirá/pausará el video. De lo contrario, mostrará/ocultará los controles.",
|
||||
"clickVideoTogglesPlaybackDescription": "Haz clic en el video para reproducir/pausar en vez de mostrar controles.",
|
||||
"videoPlayerControls": "Controles del Reproductor de Video",
|
||||
"keyboardShortcuts": "Atajos de Teclado",
|
||||
"keyboardShortcutsDescription": "Personalizar los atajos de teclado",
|
||||
"videoPlayerNavigation": "Navegación del Reproductor de Video",
|
||||
"videoPlayerNavigationDescription": "Usar las teclas de flecha para navegar por los controles del reproductor",
|
||||
"watchTogetherRelay": "Relay de Ver Juntos",
|
||||
"watchTogetherRelayDescription": "Define un relay personalizado. Todos deben usar el mismo servidor.",
|
||||
"watchTogetherRelayHint": "https://mi-relay.ejemplo.com",
|
||||
"crashReporting": "Informes de Errores",
|
||||
"crashReportingDescription": "Enviar informes de errores para mejorar la aplicación",
|
||||
"debugLogging": "Registro de Depuración",
|
||||
@@ -156,17 +167,31 @@
|
||||
"viewLogs": "Ver Logs",
|
||||
"viewLogsDescription": "Ver los registros de la aplicación",
|
||||
"clearCache": "Borrar Caché",
|
||||
"clearCacheDescription": "Esto borrará todas las imágenes y datos en caché. La aplicación puede tardar más en cargar contenido después de borrar la caché.",
|
||||
"clearCacheDescription": "Borrar imágenes y datos en caché. El contenido puede cargar más lento.",
|
||||
"clearCacheSuccess": "Caché borrada con éxito",
|
||||
"resetSettings": "Restablecer Configuración",
|
||||
"resetSettingsDescription": "Esto restablecerá todos los ajustes a sus valores predeterminados. Esta acción no se puede deshacer.",
|
||||
"resetSettingsDescription": "Restaurar ajustes predeterminados. No se puede deshacer.",
|
||||
"resetSettingsSuccess": "Configuración restablecida con éxito",
|
||||
"backup": "Copia de seguridad",
|
||||
"exportSettings": "Exportar Configuración",
|
||||
"exportSettingsDescription": "Guardar tus preferencias en un archivo",
|
||||
"exportSettingsSuccess": "Configuración exportada",
|
||||
"exportSettingsFailed": "No se pudo exportar la configuración",
|
||||
"importSettings": "Importar Configuración",
|
||||
"importSettingsDescription": "Restaurar preferencias desde un archivo",
|
||||
"importSettingsConfirm": "Esto reemplazará tu configuración actual. ¿Continuar?",
|
||||
"importSettingsSuccess": "Configuración importada",
|
||||
"importSettingsFailed": "No se pudo importar la configuración",
|
||||
"importSettingsInvalidFile": "Este archivo no es una exportación válida de Plezy",
|
||||
"importSettingsNoUser": "Inicia sesión antes de importar la configuración",
|
||||
"shortcutsReset": "Atajos restablecidos a los valores predeterminados",
|
||||
"about": "Acerca de",
|
||||
"aboutDescription": "Información de la aplicación y licencias",
|
||||
"updates": "Actualizaciones",
|
||||
"updateAvailable": "Actualización disponible",
|
||||
"checkForUpdates": "Buscar actualizaciones",
|
||||
"autoCheckUpdatesOnStartup": "Buscar actualizaciones automáticamente al iniciar",
|
||||
"autoCheckUpdatesOnStartupDescription": "Avisar al iniciar si hay una actualización disponible",
|
||||
"validationErrorEnterNumber": "Por favor, introduce un número válido",
|
||||
"validationErrorDuration": "La duración debe estar entre ${min} y ${max} ${unit}",
|
||||
"shortcutAlreadyAssigned": "El atajo ya está asignado a ${action}",
|
||||
@@ -176,6 +201,8 @@
|
||||
"autoSkipIntroDescription": "Saltar automáticamente los marcadores de intro después de unos segundos",
|
||||
"autoSkipCredits": "Saltar Créditos automáticamente",
|
||||
"autoSkipCreditsDescription": "Saltar automáticamente los créditos y reproducir el siguiente episodio",
|
||||
"forceSkipMarkerFallback": "Forzar marcadores alternativos",
|
||||
"forceSkipMarkerFallbackDescription": "Usar patrones de títulos de capítulos aunque Plex tenga marcadores",
|
||||
"autoSkipDelay": "Retraso de Salto automático",
|
||||
"autoSkipDelayDescription": "Esperar ${seconds} segundos antes de saltar automáticamente",
|
||||
"introPattern": "Patrón de marcador de intro",
|
||||
@@ -196,26 +223,52 @@
|
||||
"downloadLocationSelectError": "Error al seleccionar la carpeta",
|
||||
"downloadOnWifiOnly": "Descargar solo con WiFi",
|
||||
"downloadOnWifiOnlyDescription": "Evitar descargas cuando se usan datos móviles",
|
||||
"cellularDownloadBlocked": "Las descargas están desactivadas en datos móviles. Conéctate a una red WiFi o cambia la configuración.",
|
||||
"autoRemoveWatchedDownloads": "Eliminar descargas vistas automáticamente",
|
||||
"autoRemoveWatchedDownloadsDescription": "Eliminar automáticamente descargas vistas",
|
||||
"cellularDownloadBlocked": "Las descargas están bloqueadas en red móvil. Usa WiFi o cambia el ajuste.",
|
||||
"maxVolume": "Volumen Máximo",
|
||||
"maxVolumeDescription": "Permitir aumento de volumen por encima del 100% para medios con sonido bajo",
|
||||
"maxVolumePercent": "${percent}%",
|
||||
"discordRichPresence": "Presencia de Discord",
|
||||
"discordRichPresenceDescription": "Mostrar lo que estás viendo en Discord",
|
||||
"trakt": "Trakt",
|
||||
"traktDescription": "Sincronizar historial de visualización con Trakt",
|
||||
"trackers": "Rastreadores",
|
||||
"trackersDescription": "Sincronizar progreso con Trakt, MyAnimeList, AniList y Simkl",
|
||||
"companionRemoteServer": "Servidor de control remoto",
|
||||
"companionRemoteServerDescription": "Permitir que dispositivos móviles en tu red controlen esta aplicación",
|
||||
"autoPip": "Imagen en imagen automática",
|
||||
"autoPipDescription": "Activar automáticamente imagen en imagen al salir de la app durante la reproducción",
|
||||
"autoPipDescription": "Entrar en picture-in-picture al salir durante la reproducción",
|
||||
"matchContentFrameRate": "Ajustar frecuencia de actualización",
|
||||
"matchContentFrameRateDescription": "Ajustar la frecuencia de actualización de la pantalla para que coincida con el video, reduciendo tirones y ahorrando batería",
|
||||
"matchContentFrameRateDescription": "Ajustar la frecuencia de pantalla al contenido de video",
|
||||
"matchRefreshRate": "Ajustar frecuencia de refresco",
|
||||
"matchRefreshRateDescription": "Ajustar la frecuencia de pantalla en pantalla completa",
|
||||
"matchDynamicRange": "Ajustar rango dinámico",
|
||||
"matchDynamicRangeDescription": "Activar HDR para contenido HDR y luego volver a SDR",
|
||||
"displaySwitchDelay": "Retraso de cambio de pantalla",
|
||||
"tunneledPlayback": "Reproducción tunelizada",
|
||||
"tunneledPlaybackDescription": "Usar tunelización de video acelerada por hardware. Desactivar si ves una pantalla negra con audio en contenido HDR",
|
||||
"tunneledPlaybackDescription": "Usar tunelización de video. Desactívala si HDR muestra video negro.",
|
||||
"requireProfileSelectionOnOpen": "Pedir perfil al abrir la app",
|
||||
"requireProfileSelectionOnOpenDescription": "Mostrar selección de perfil cada vez que se abre la aplicación",
|
||||
"confirmExitOnBack": "Confirmar antes de salir",
|
||||
"confirmExitOnBackDescription": "Mostrar un diálogo de confirmación al presionar atrás para salir de la app",
|
||||
"forceTvMode": "Forzar modo TV",
|
||||
"forceTvModeDescription": "Forzar diseño TV. Para dispositivos que no lo detectan. Requiere reinicio.",
|
||||
"startInFullscreen": "Iniciar en pantalla completa",
|
||||
"startInFullscreenDescription": "Abrir Plezy en modo pantalla completa al iniciar",
|
||||
"autoHidePerformanceOverlay": "Ocultar superposición de rendimiento automáticamente",
|
||||
"autoHidePerformanceOverlayDescription": "Desvanecer la superposición de rendimiento con los controles de reproducción",
|
||||
"showNavBarLabels": "Mostrar etiquetas de la barra de navegación",
|
||||
"showNavBarLabelsDescription": "Mostrar etiquetas de texto bajo los iconos de la barra de navegación",
|
||||
"liveTvDefaultFavorites": "Canales favoritos por defecto",
|
||||
"liveTvDefaultFavoritesDescription": "Mostrar solo canales favoritos al abrir TV en vivo"
|
||||
"liveTvDefaultFavoritesDescription": "Mostrar solo canales favoritos al abrir TV en vivo",
|
||||
"display": "Pantalla",
|
||||
"homeScreen": "Pantalla de inicio",
|
||||
"navigation": "Navegación",
|
||||
"window": "Ventana",
|
||||
"content": "Contenido",
|
||||
"player": "Reproductor",
|
||||
"subtitlesAndConfig": "Subtítulos y configuración",
|
||||
"seekAndTiming": "Búsqueda y tiempo",
|
||||
"behavior": "Comportamiento"
|
||||
},
|
||||
"search": {
|
||||
"hint": "Buscar películas, series, música...",
|
||||
@@ -239,6 +292,8 @@
|
||||
"subtitleTrackNext": "Siguiente Pista de Subtítulos",
|
||||
"chapterNext": "Siguiente Capítulo",
|
||||
"chapterPrevious": "Anterior Capítulo",
|
||||
"episodeNext": "Siguiente Episodio",
|
||||
"episodePrevious": "Anterior Episodio",
|
||||
"speedIncrease": "Aumentar Velocidad",
|
||||
"speedDecrease": "Disminuir Velocidad",
|
||||
"speedReset": "Restablecer Velocidad",
|
||||
@@ -266,6 +321,8 @@
|
||||
"colorPrimaries": "Primarias de color",
|
||||
"chromaSubsampling": "Submuestreo de croma",
|
||||
"channels": "Canales",
|
||||
"subtitles": "Subtítulos",
|
||||
"overallBitrate": "Bitrate total",
|
||||
"path": "Ruta",
|
||||
"size": "Tamaño",
|
||||
"container": "Contenedor",
|
||||
@@ -282,11 +339,13 @@
|
||||
"shufflePlay": "Reproducción Aleatoria",
|
||||
"fileInfo": "Información del Archivo",
|
||||
"deleteFromServer": "Eliminar del servidor",
|
||||
"confirmDelete": "Esto eliminará permanentemente este contenido y sus archivos de tu servidor. Esta acción no se puede deshacer.",
|
||||
"confirmDelete": "¿Eliminar este medio y sus archivos de tu servidor?",
|
||||
"deleteMultipleWarning": "Esto incluye todos los episodios y sus archivos.",
|
||||
"mediaDeletedSuccessfully": "Elemento multimedia eliminado con éxito",
|
||||
"mediaFailedToDelete": "Error al eliminar el elemento multimedia",
|
||||
"rate": "Calificar"
|
||||
"rate": "Calificar",
|
||||
"playFromBeginning": "Reproducir desde el inicio",
|
||||
"playVersion": "Reproducir versión..."
|
||||
},
|
||||
"accessibility": {
|
||||
"mediaCardMovie": "${title}, película",
|
||||
@@ -339,6 +398,13 @@
|
||||
"tracksButton": "Audio y subtítulos",
|
||||
"chaptersButton": "Capítulos",
|
||||
"versionsButton": "Versiones de video",
|
||||
"versionQualityButton": "Versión y calidad",
|
||||
"versionColumnHeader": "Versión",
|
||||
"qualityColumnHeader": "Calidad",
|
||||
"qualityOriginal": "Original",
|
||||
"qualityPresetLabel": "${resolution}p ${bitrate} Mbps",
|
||||
"qualityBandwidthEstimate": "~${bitrate} Mbps",
|
||||
"transcodeUnavailableFallback": "Transcodificación no disponible — reproduciendo calidad original",
|
||||
"pipButton": "Modo PiP (Imagen en Imagen)",
|
||||
"aspectRatioButton": "Relación de aspecto",
|
||||
"ambientLighting": "Iluminación ambiental",
|
||||
@@ -347,7 +413,6 @@
|
||||
"alwaysOnTopButton": "Siempre visible",
|
||||
"rotationLockButton": "Bloqueo de rotación",
|
||||
"lockScreen": "Bloquear pantalla",
|
||||
"unlockScreen": "Desbloquear pantalla",
|
||||
"screenLockButton": "Bloqueo de pantalla",
|
||||
"longPressToUnlock": "Mantén pulsado para desbloquear",
|
||||
"timelineSlider": "Línea de tiempo del video",
|
||||
@@ -358,7 +423,7 @@
|
||||
"pipErrors": {
|
||||
"androidVersion": "Requiere Android 8.0 o más reciente",
|
||||
"iosVersion": "Requiere iOS 15.0 o más reciente",
|
||||
"permissionDisabled": "El permiso de Imagen en Imagen está desactivado. Actívalo en Ajustes > Aplicaciones > Plezy > Imagen en Imagen",
|
||||
"permissionDisabled": "Picture-in-picture está desactivado. Actívalo en los ajustes del sistema.",
|
||||
"notSupported": "El dispositivo no soporta el modo Imagen en Imagen",
|
||||
"voSwitchFailed": "Error al cambiar la salida de video para Imagen en Imagen",
|
||||
"failed": "Error al iniciar Imagen en Imagen",
|
||||
@@ -367,7 +432,13 @@
|
||||
"chapters": "Capítulos",
|
||||
"noChaptersAvailable": "No hay capítulos disponibles",
|
||||
"queue": "Cola",
|
||||
"noQueueItems": "No hay elementos en la cola"
|
||||
"noQueueItems": "No hay elementos en la cola",
|
||||
"searchSubtitles": "Buscar subtítulos",
|
||||
"language": "Idioma",
|
||||
"noSubtitlesFound": "No se encontraron subtítulos",
|
||||
"subtitleDownloaded": "Subtítulo descargado",
|
||||
"subtitleDownloadFailed": "Error al descargar subtítulo",
|
||||
"searchLanguages": "Buscar idiomas..."
|
||||
},
|
||||
"userStatus": {
|
||||
"admin": "Administrador",
|
||||
@@ -380,6 +451,7 @@
|
||||
"markedAsUnwatched": "Marcado como no visto",
|
||||
"markedAsWatchedOffline": "Marcado como visto (se sincronizará al estar en línea)",
|
||||
"markedAsUnwatchedOffline": "Marcado como no visto (se sincronizará al estar en línea)",
|
||||
"autoRemovedWatchedDownload": "Eliminado automáticamente: ${title}",
|
||||
"removedFromContinueWatching": "Eliminado de Seguir Viendo",
|
||||
"errorLoading": "Error: ${error}",
|
||||
"fileInfoNotAvailable": "Información de archivo no disponible",
|
||||
@@ -387,6 +459,10 @@
|
||||
"errorLoadingSeries": "Error al cargar la serie",
|
||||
"errorLoadingSeason": "Error al cargar la temporada",
|
||||
"musicNotSupported": "La reproducción de música aún no está soportada",
|
||||
"noDescriptionAvailable": "No hay descripción disponible",
|
||||
"noProfilesAvailable": "No hay perfiles disponibles",
|
||||
"contactAdminForProfiles": "Contacta a tu administrador del servidor para añadir perfiles",
|
||||
"unableToDetermineLibrarySection": "No se puede determinar la sección de biblioteca para este elemento",
|
||||
"logsCleared": "Logs borrados",
|
||||
"logsCopied": "Logs copiados al portapapeles",
|
||||
"noLogsAvailable": "No hay logs disponibles",
|
||||
@@ -406,19 +482,26 @@
|
||||
"failedToCreatePlayQueueNoItems": "Error al crear la cola de reproducción - no hay elementos",
|
||||
"failedPlayback": "Error al ${action}: ${error}",
|
||||
"switchingToCompatiblePlayer": "Cambiando a reproductor compatible...",
|
||||
"serverLimitTitle": "Error de reproducción",
|
||||
"serverLimitBody": "Error del servidor (HTTP 500). Un límite de ancho de banda/transcodificación probablemente rechazó esta sesión. Pide al propietario que lo ajuste.",
|
||||
"logsUploaded": "Registros subidos",
|
||||
"logsUploadFailed": "Error al subir registros",
|
||||
"logId": "ID de registro"
|
||||
},
|
||||
"subtitlingStyling": {
|
||||
"stylingOptions": "Opciones de Estilo",
|
||||
"text": "Texto",
|
||||
"border": "Borde",
|
||||
"background": "Fondo",
|
||||
"fontSize": "Tamaño de Fuente",
|
||||
"textColor": "Color de Texto",
|
||||
"borderSize": "Tamaño de Borde",
|
||||
"borderColor": "Color de Borde",
|
||||
"backgroundOpacity": "Opacidad de Fondo",
|
||||
"backgroundColor": "Color de Fondo",
|
||||
"position": "Posición"
|
||||
"position": "Posición",
|
||||
"assOverride": "Sobreescritura ASS",
|
||||
"bold": "Negrita",
|
||||
"italic": "Cursiva"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "Configuración de mpv",
|
||||
@@ -439,12 +522,85 @@
|
||||
"dialog": {
|
||||
"confirmAction": "Confirmar Acción"
|
||||
},
|
||||
"profiles": {
|
||||
"addPlezyProfile": "Añadir perfil de Plezy",
|
||||
"switchingProfile": "Cambiando de perfil…",
|
||||
"deleteThisProfileTitle": "¿Eliminar este perfil?",
|
||||
"deleteThisProfileMessage": "Eliminar ${displayName}. Las conexiones no se verán afectadas.",
|
||||
"active": "Activo",
|
||||
"manage": "Administrar",
|
||||
"delete": "Eliminar",
|
||||
"signOut": "Cerrar sesión",
|
||||
"signOutPlexTitle": "¿Cerrar sesión de Plex?",
|
||||
"signOutPlexMessage": "¿Eliminar ${displayName} y todos los usuarios de Plex Home? Puedes iniciar sesión de nuevo cuando quieras.",
|
||||
"signedOutPlex": "Sesión de Plex cerrada.",
|
||||
"signOutFailed": "Error al cerrar sesión.",
|
||||
"sectionTitle": "Perfiles",
|
||||
"summarySingle": "Añade perfiles para mezclar usuarios gestionados e identidades locales",
|
||||
"summaryMultipleWithActive": "${count} perfiles · activo: ${activeName}",
|
||||
"summaryMultiple": "${count} perfiles",
|
||||
"removeConnectionTitle": "¿Eliminar conexión?",
|
||||
"removeConnectionMessage": "Eliminar el acceso de ${displayName} a ${connectionLabel}. Los demás perfiles lo conservan.",
|
||||
"deleteProfileTitle": "¿Eliminar perfil?",
|
||||
"deleteProfileMessage": "Eliminar ${displayName} y sus conexiones. Los servidores seguirán disponibles.",
|
||||
"profileNameLabel": "Nombre del perfil",
|
||||
"pinProtectionLabel": "Protección con PIN",
|
||||
"pinManagedByPlex": "PIN gestionado por Plex. Edita en plex.tv.",
|
||||
"noPinSetEditOnPlex": "Sin PIN establecido. Para requerir uno, edita el usuario Home en plex.tv.",
|
||||
"setPin": "Establecer PIN",
|
||||
"setPinTitle": "Establecer PIN",
|
||||
"confirmPinTitle": "Confirmar PIN",
|
||||
"pinSet": "PIN establecido",
|
||||
"changePin": "Cambiar",
|
||||
"removePin": "Eliminar",
|
||||
"connectionsLabel": "Conexiones",
|
||||
"add": "Añadir",
|
||||
"deleteProfileButton": "Eliminar perfil",
|
||||
"noConnectionsHint": "Sin conexiones — añade una para usar este perfil.",
|
||||
"noConnections": "Sin conexiones",
|
||||
"plexHomeAccount": "Cuenta Plex Home",
|
||||
"connectionDefault": "Predeterminada",
|
||||
"connectionAs": "como ${displayName}",
|
||||
"makeDefault": "Establecer como predeterminada",
|
||||
"removeConnection": "Eliminar",
|
||||
"profileRenamed": "Perfil renombrado.",
|
||||
"borrowAddTo": "Añadir a ${displayName}",
|
||||
"borrowExplain": "Toma prestada la conexión de otro perfil. Los perfiles protegidos con PIN requieren un PIN.",
|
||||
"borrowEmpty": "Nada para tomar prestado todavía.",
|
||||
"borrowEmptySubtitle": "Conecta Plex o Jellyfin primero a otro perfil.",
|
||||
"borrowFromProfile": "De ${displayName}",
|
||||
"borrowConnectionBorrowed": "Conexión tomada prestada.",
|
||||
"borrowFailed": "No se pudo tomar prestada la conexión.",
|
||||
"incorrectPin": "PIN incorrecto.",
|
||||
"sourceProfileMissingParentAccount": "Al perfil de origen le falta su cuenta principal.",
|
||||
"failedToVerifyPin": "No se pudo verificar el PIN.",
|
||||
"newProfile": "Nuevo perfil",
|
||||
"profileNameHint": "p. ej. Invitados, Niños, Sala familiar",
|
||||
"pinProtectionOptional": "Protección con PIN (opcional)",
|
||||
"pinExplain": "Se requiere PIN de 4 dígitos para cambiar de perfil.",
|
||||
"continueButton": "Continuar",
|
||||
"pinsDontMatch": "Los PIN no coinciden"
|
||||
},
|
||||
"connections": {
|
||||
"sectionTitle": "Conexiones",
|
||||
"addConnection": "Añadir conexión",
|
||||
"addConnectionSubtitleNoProfile": "Inicia sesión con Plex o conecta un servidor de Jellyfin",
|
||||
"addConnectionSubtitleScoped": "Añadir a ${displayName}: Plex, Jellyfin u otra conexión de perfil",
|
||||
"sessionExpiredOne": "Sesión caducada para ${name}",
|
||||
"sessionExpiredMany": "Sesión caducada para ${count} servidores",
|
||||
"signInAgain": "Iniciar sesión de nuevo"
|
||||
},
|
||||
"discover": {
|
||||
"title": "Descubrir",
|
||||
"switchProfile": "Cambiar Perfil",
|
||||
"noContentAvailable": "No hay contenido disponible",
|
||||
"addMediaToLibraries": "Añade contenido a tus bibliotecas",
|
||||
"continueWatching": "Seguir Viendo",
|
||||
"continueWatchingIn": "Seguir viendo en ${library}",
|
||||
"nextUp": "A continuación",
|
||||
"nextUpIn": "A continuación en ${library}",
|
||||
"recentlyAdded": "Añadido recientemente",
|
||||
"recentlyAddedIn": "Añadido recientemente en ${library}",
|
||||
"playEpisode": "T${season}E${episode}",
|
||||
"overview": "Resumen",
|
||||
"cast": "Reparto",
|
||||
@@ -458,7 +614,7 @@
|
||||
"errors": {
|
||||
"searchFailed": "Error en la búsqueda: ${error}",
|
||||
"connectionTimeout": "Tiempo de conexión agotado al cargar ${context}",
|
||||
"connectionFailed": "No se pudo conectar con el servidor Plex",
|
||||
"connectionFailed": "No se puede conectar al servidor multimedia",
|
||||
"failedToLoad": "Error al cargar ${context}: ${error}",
|
||||
"noClientAvailable": "No hay cliente disponible",
|
||||
"authenticationFailed": "Error de autenticación: ${error}",
|
||||
@@ -466,7 +622,9 @@
|
||||
"pleaseEnterToken": "Por favor, introduce un token",
|
||||
"invalidToken": "Token no válido",
|
||||
"failedToVerifyToken": "Error al verificar el token: ${error}",
|
||||
"failedToSwitchProfile": "Error al cambiar al perfil ${displayName}"
|
||||
"failedToSwitchProfile": "Error al cambiar al perfil ${displayName}",
|
||||
"failedToDeleteProfile": "Error al eliminar ${displayName}",
|
||||
"failedToRate": "No se pudo actualizar la calificación"
|
||||
},
|
||||
"libraries": {
|
||||
"title": "Bibliotecas",
|
||||
@@ -483,6 +641,8 @@
|
||||
"analysisStarted": "Análisis iniciado para \"${title}\"",
|
||||
"failedToAnalyze": "Error al analizar la biblioteca: ${error}",
|
||||
"noLibrariesFound": "No se encontraron bibliotecas",
|
||||
"allLibrariesHidden": "Todas las bibliotecas están ocultas",
|
||||
"hiddenLibrariesCount": "Bibliotecas ocultas (${count})",
|
||||
"thisLibraryIsEmpty": "Esta biblioteca está vacía",
|
||||
"all": "Todos",
|
||||
"clearAll": "Borrar Todo",
|
||||
@@ -519,17 +679,34 @@
|
||||
"seasons": "Temporadas",
|
||||
"episodes": "Episodios",
|
||||
"folders": "Carpetas"
|
||||
},
|
||||
"filterCategories": {
|
||||
"genre": "Género",
|
||||
"year": "Año",
|
||||
"contentRating": "Clasificación",
|
||||
"tag": "Etiqueta"
|
||||
},
|
||||
"sortLabels": {
|
||||
"title": "Título",
|
||||
"dateAdded": "Fecha de adición",
|
||||
"releaseDate": "Fecha de estreno",
|
||||
"rating": "Valoración",
|
||||
"lastPlayed": "Última reproducción",
|
||||
"playCount": "Reproducciones",
|
||||
"random": "Aleatorio",
|
||||
"dateShared": "Fecha de compartición",
|
||||
"latestEpisodeAirDate": "Última fecha de emisión del episodio"
|
||||
}
|
||||
},
|
||||
"about": {
|
||||
"title": "Acerca de",
|
||||
"openSourceLicenses": "Licencias de Código Abierto",
|
||||
"versionLabel": "Versión ${version}",
|
||||
"appDescription": "Un cliente de Plex para Flutter",
|
||||
"appDescription": "Un cliente de Plex y Jellyfin para Flutter",
|
||||
"viewLicensesDescription": "Ver licencias de librerías de terceros"
|
||||
},
|
||||
"serverSelection": {
|
||||
"allServerConnectionsFailed": "No se pudo conectar con ningún servidor. Por favor, comprueba tu conexión e inténtalo de nuevo.",
|
||||
"allServerConnectionsFailed": "No se pudo conectar a ningún servidor. Revisa tu red.",
|
||||
"noServersFoundForAccount": "No se encontraron servidores para ${username} (${email})",
|
||||
"failedToLoadServers": "Error al cargar servidores: ${error}"
|
||||
},
|
||||
@@ -566,6 +743,7 @@
|
||||
"reloadGuide": "Recargar guía",
|
||||
"now": "Ahora",
|
||||
"today": "Hoy",
|
||||
"tomorrow": "Mañana",
|
||||
"midnight": "Medianoche",
|
||||
"overnight": "Madrugada",
|
||||
"morning": "Mañana",
|
||||
@@ -574,7 +752,46 @@
|
||||
"lateNight": "Trasnoche",
|
||||
"whatsOn": "En emisión",
|
||||
"watchChannel": "Ver canal",
|
||||
"favorites": "Favoritos"
|
||||
"favorites": "Favoritos",
|
||||
"reorderFavorites": "Reordenar favoritos",
|
||||
"joinSession": "Unirse a sesión en curso",
|
||||
"watchFromStart": "Ver desde el inicio (hace ${minutes} min)",
|
||||
"watchLive": "Ver en vivo",
|
||||
"goToLive": "Ir a en vivo",
|
||||
"record": "Grabar",
|
||||
"recordEpisode": "Grabar episodio",
|
||||
"recordSeries": "Grabar serie",
|
||||
"recordOptions": "Opciones de grabación",
|
||||
"recordings": "Grabaciones",
|
||||
"scheduledRecordings": "Programadas",
|
||||
"recordingRules": "Reglas de grabación",
|
||||
"noScheduledRecordings": "No hay grabaciones programadas",
|
||||
"noRecordingRules": "Aún no hay reglas de grabación",
|
||||
"manageRecording": "Gestionar grabación",
|
||||
"cancelRecording": "Cancelar grabación",
|
||||
"cancelRecordingTitle": "¿Cancelar esta grabación?",
|
||||
"cancelRecordingMessage": "${title} ya no se grabará.",
|
||||
"deleteRule": "Eliminar regla",
|
||||
"deleteRuleTitle": "¿Eliminar regla de grabación?",
|
||||
"deleteRuleMessage": "Los próximos episodios de ${title} no se grabarán.",
|
||||
"recordingScheduled": "Grabación programada",
|
||||
"alreadyScheduled": "Este programa ya está programado",
|
||||
"dvrAdminRequired": "La configuración DVR requiere una cuenta de administrador",
|
||||
"recordingFailed": "No se pudo programar la grabación",
|
||||
"recordingTargetMissing": "No se pudo determinar la biblioteca de grabación",
|
||||
"recordNotAvailable": "Grabación no disponible para este programa",
|
||||
"recordingCancelled": "Grabación cancelada",
|
||||
"recordingRuleDeleted": "Regla de grabación eliminada",
|
||||
"processRecordingRules": "Reevaluar reglas",
|
||||
"loadingRecordings": "Cargando grabaciones...",
|
||||
"recordingInProgress": "Grabando ahora",
|
||||
"recordingsCount": "${count} programadas",
|
||||
"editRule": "Editar regla",
|
||||
"editRuleAction": "Editar",
|
||||
"recordingRuleUpdated": "Regla de grabación actualizada",
|
||||
"guideReloadRequested": "Solicitada actualización de la guía",
|
||||
"rulesProcessRequested": "Solicitada reevaluación de reglas",
|
||||
"recordShow": "Grabar programa"
|
||||
},
|
||||
"collections": {
|
||||
"title": "Colecciones",
|
||||
@@ -582,7 +799,7 @@
|
||||
"empty": "La colección está vacía",
|
||||
"unknownLibrarySection": "No se puede eliminar: Sección de biblioteca desconocida",
|
||||
"deleteCollection": "Eliminar Colección",
|
||||
"deleteConfirm": "¿Estás seguro de que quieres eliminar \"${title}\"? Esta acción no se puede deshacer.",
|
||||
"deleteConfirm": "¿Eliminar \"${title}\"? No se puede deshacer.",
|
||||
"deleted": "Colección eliminada",
|
||||
"deleteFailed": "Error al eliminar la colección",
|
||||
"deleteFailedWithError": "Error al eliminar la colección: ${error}",
|
||||
@@ -597,7 +814,8 @@
|
||||
"removeFromCollectionConfirm": "¿Eliminar \"${title}\" de esta colección?",
|
||||
"removedFromCollection": "Eliminado de la colección",
|
||||
"removeFromCollectionFailed": "Error al eliminar de la colección",
|
||||
"removeFromCollectionError": "Error al eliminar de la colección: ${error}"
|
||||
"removeFromCollectionError": "Error al eliminar de la colección: ${error}",
|
||||
"searchCollections": "Buscar colecciones..."
|
||||
},
|
||||
"playlists": {
|
||||
"title": "Listas de reproducción",
|
||||
@@ -661,22 +879,32 @@
|
||||
"leave": "Salir",
|
||||
"syncing": "Sincronizando...",
|
||||
"joinWatchSession": "Unirse a Sesión de Visualización",
|
||||
"enterCodeHint": "Introduce el código de 8 caracteres",
|
||||
"enterCodeHint": "Introduce el código de 5 caracteres",
|
||||
"pasteFromClipboard": "Pegar desde el portapapeles",
|
||||
"pleaseEnterCode": "Por favor, introduce un código de sesión",
|
||||
"codeMustBe8Chars": "El código de sesión debe tener 8 caracteres",
|
||||
"joinInstructions": "Introduce el código de sesión compartido por el anfitrión para unirte a su sesión.",
|
||||
"codeMustBe5Chars": "El código de sesión debe tener 5 caracteres",
|
||||
"joinInstructions": "Introduce el código de sesión del anfitrión para unirte.",
|
||||
"failedToCreate": "Error al crear la sesión",
|
||||
"failedToJoin": "Error al unirse a la sesión",
|
||||
"sessionCodeCopied": "Código de sesión copiado al portapapeles",
|
||||
"relayUnreachable": "El servidor de retransmisión no está disponible. Esto puede deberse a que tu proveedor de internet bloquea la conexión. Puedes intentarlo de todos modos, pero Watch Together podría no funcionar.",
|
||||
"relayUnreachable": "Servidor relay inaccesible. El bloqueo del ISP puede impedir Watch Together.",
|
||||
"reconnectingToHost": "Reconectando con el anfitrión...",
|
||||
"currentPlayback": "Reproducción actual",
|
||||
"joinCurrentPlayback": "Unirse a la reproducción actual",
|
||||
"joinCurrentPlaybackDescription": "Vuelve a lo que el anfitrión está viendo ahora mismo",
|
||||
"failedToOpenCurrentPlayback": "No se pudo abrir la reproducción actual",
|
||||
"participantJoined": "${name} se unió",
|
||||
"participantLeft": "${name} se fue"
|
||||
"participantLeft": "${name} se fue",
|
||||
"participantPaused": "${name} pausó",
|
||||
"participantResumed": "${name} reanudó",
|
||||
"participantSeeked": "${name} avanzó",
|
||||
"participantBuffering": "${name} está cargando",
|
||||
"waitingForParticipants": "Esperando a que otros carguen...",
|
||||
"recentRooms": "Salas recientes",
|
||||
"renameRoom": "Renombrar sala",
|
||||
"removeRoom": "Eliminar",
|
||||
"guestSwitchUnavailable": "No se pudo cambiar — servidor no disponible para sincronización",
|
||||
"guestSwitchFailed": "No se pudo cambiar — contenido no encontrado en este servidor"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "Descargas",
|
||||
@@ -689,19 +917,59 @@
|
||||
"deleteDownload": "Eliminar descarga",
|
||||
"retryDownload": "Reintentar descarga",
|
||||
"downloadQueued": "Descarga en cola",
|
||||
"serverErrorBitrate": "Error del servidor: el archivo puede superar el límite de bitrate remoto",
|
||||
"episodesQueued": "${count} episodios en cola para descargar",
|
||||
"downloadDeleted": "Descarga eliminada",
|
||||
"deleteConfirm": "¿Estás seguro de que quieres eliminar \"${title}\"? Esto borrará el archivo descargado de tu dispositivo.",
|
||||
"deleteConfirm": "¿Eliminar \"${title}\" de este dispositivo?",
|
||||
"deletingWithProgress": "Eliminando ${title}... (${current} de ${total})",
|
||||
"deleting": "Eliminando...",
|
||||
"queuedTooltip": "En cola",
|
||||
"queuedFilesTooltip": "En cola: ${files}",
|
||||
"downloadingTooltip": "Descargando...",
|
||||
"downloadingFilesTooltip": "Descargando ${files}",
|
||||
"noDownloadsTree": "Sin descargas",
|
||||
"pauseAll": "Pausar todo",
|
||||
"resumeAll": "Reanudar todo",
|
||||
"deleteAll": "Eliminar todo"
|
||||
"deleteAll": "Eliminar todo",
|
||||
"selectVersion": "Seleccionar versión",
|
||||
"allEpisodes": "Todos los episodios",
|
||||
"unwatchedOnly": "Solo no vistos",
|
||||
"nextNUnwatched": "Próximos ${count} no vistos",
|
||||
"customAmount": "Cantidad personalizada...",
|
||||
"howManyEpisodes": "¿Cuántos episodios?",
|
||||
"itemsQueued": "${count} elementos en cola de descarga",
|
||||
"keepSynced": "Mantener sincronizado",
|
||||
"downloadOnce": "Descargar una vez",
|
||||
"keepNUnwatched": "Mantener ${count} sin ver",
|
||||
"editSyncRule": "Editar regla de sincronización",
|
||||
"removeSyncRule": "Eliminar regla de sincronización",
|
||||
"removeSyncRuleConfirm": "¿Dejar de sincronizar \"${title}\"? Los episodios descargados se conservarán.",
|
||||
"syncRuleCreated": "Regla de sincronización creada — conservando ${count} episodios sin ver",
|
||||
"syncRuleUpdated": "Regla de sincronización actualizada",
|
||||
"syncRuleRemoved": "Regla de sincronización eliminada",
|
||||
"syncedNewEpisodes": "${count} nuevos episodios sincronizados para ${title}",
|
||||
"activeSyncRules": "Reglas de sincronización",
|
||||
"noSyncRules": "Sin reglas de sincronización",
|
||||
"manageSyncRule": "Gestionar sincronización",
|
||||
"editEpisodeCount": "Número de episodios",
|
||||
"editSyncFilter": "Filtro de sincronización",
|
||||
"syncAllItems": "Sincronizando todos los elementos",
|
||||
"syncUnwatchedItems": "Sincronizando elementos no vistos",
|
||||
"syncRuleServerContext": "Servidor: ${server} • ${status}",
|
||||
"syncRuleAvailable": "Disponible",
|
||||
"syncRuleOffline": "Sin conexión",
|
||||
"syncRuleSignInRequired": "Se requiere iniciar sesión",
|
||||
"syncRuleNotAvailableForProfile": "No disponible para el perfil actual",
|
||||
"syncRuleUnknownServer": "Servidor desconocido",
|
||||
"syncRuleListCreated": "Regla de sincronización creada"
|
||||
},
|
||||
"shaders": {
|
||||
"title": "Shaders",
|
||||
"noShaderDescription": "Sin mejora de video",
|
||||
"nvscalerDescription": "Escalado de imagen NVIDIA para un video más nítido",
|
||||
"artcnnVariantNeutral": "Neutral",
|
||||
"artcnnVariantDenoise": "Reducción de ruido",
|
||||
"artcnnVariantDenoiseSharpen": "Reducción de ruido + enfoque",
|
||||
"qualityFast": "Rápido",
|
||||
"qualityHQ": "Alta Calidad",
|
||||
"mode": "Modo",
|
||||
@@ -714,54 +982,36 @@
|
||||
},
|
||||
"companionRemote": {
|
||||
"title": "Control remoto",
|
||||
"connectToDevice": "Conectar a dispositivo",
|
||||
"hostRemoteSession": "Iniciar sesión remota",
|
||||
"controlThisDevice": "Controla este dispositivo con tu teléfono",
|
||||
"remoteControl": "Control remoto",
|
||||
"controlDesktop": "Controlar un dispositivo de escritorio",
|
||||
"connectedTo": "Conectado a ${name}",
|
||||
"session": {
|
||||
"creatingSession": "Creando sesión remota...",
|
||||
"failedToCreate": "Error al crear la sesión remota:",
|
||||
"noSession": "No hay sesión disponible",
|
||||
"scanQrCode": "Escanear código QR",
|
||||
"orEnterManually": "O introducir manualmente",
|
||||
"startingServer": "Iniciando servidor remoto...",
|
||||
"failedToCreate": "Error al iniciar el servidor remoto:",
|
||||
"hostAddress": "Dirección del host",
|
||||
"sessionId": "ID de sesión",
|
||||
"pin": "PIN",
|
||||
"connected": "Conectado",
|
||||
"waitingForConnection": "Esperando conexión...",
|
||||
"usePhoneToControl": "Usa tu dispositivo móvil para controlar esta app",
|
||||
"copiedToClipboard": "${label} copiado al portapapeles",
|
||||
"copyToClipboard": "Copiar al portapapeles",
|
||||
"newSession": "Nueva sesión",
|
||||
"serverRunning": "Servidor remoto activo",
|
||||
"serverStopped": "Servidor remoto detenido",
|
||||
"serverRunningDescription": "Los dispositivos móviles de tu red pueden conectarse a esta app",
|
||||
"serverStoppedDescription": "Inicia el servidor para permitir que los dispositivos móviles se conecten",
|
||||
"usePhoneToControl": "Usa tu dispositivo móvil para controlar esta aplicación",
|
||||
"startServer": "Iniciar servidor",
|
||||
"stopServer": "Detener servidor",
|
||||
"minimize": "Minimizar"
|
||||
},
|
||||
"pairing": {
|
||||
"scan": "Escanear",
|
||||
"manual": "Manual",
|
||||
"pairWithDesktop": "Emparejar con escritorio",
|
||||
"enterSessionDetails": "Introduce los datos de la sesión que aparecen en tu dispositivo de escritorio",
|
||||
"discoveryDescription": "Los dispositivos Plezy con la misma cuenta Plex aparecen aquí",
|
||||
"hostAddressHint": "192.168.1.100:48632",
|
||||
"sessionIdHint": "Introduce ID de sesión de 8 caracteres",
|
||||
"pinHint": "Introduce PIN de 6 dígitos",
|
||||
"connecting": "Conectando...",
|
||||
"tips": "Consejos",
|
||||
"tipDesktop": "Abre Plezy en tu escritorio y activa Companion Remote desde los ajustes o el menú",
|
||||
"tipScan": "Usa la pestaña Escanear para emparejar rápidamente escaneando el código QR de tu escritorio",
|
||||
"tipWifi": "Asegúrate de que ambos dispositivos estén en la misma red WiFi",
|
||||
"cameraPermissionRequired": "Se necesita permiso de cámara para escanear códigos QR.\nPor favor, concede acceso a la cámara en los ajustes de tu dispositivo.",
|
||||
"cameraError": "No se pudo iniciar la cámara: ${error}",
|
||||
"scanInstruction": "Apunta tu cámara al código QR que aparece en tu escritorio",
|
||||
"invalidQrCode": "Formato de código QR no válido",
|
||||
"validationHostRequired": "Por favor, introduce la dirección del host",
|
||||
"validationHostFormat": "El formato debe ser IP:puerto (ej., 192.168.1.100:48632)",
|
||||
"validationSessionIdRequired": "Por favor, introduce un ID de sesión",
|
||||
"validationSessionIdLength": "El ID de sesión debe tener 8 caracteres",
|
||||
"validationPinRequired": "Por favor, introduce un PIN",
|
||||
"validationPinLength": "El PIN debe tener 6 dígitos",
|
||||
"connectionTimedOut": "Tiempo de conexión agotado. Verifica el ID de sesión y el PIN.",
|
||||
"sessionNotFound": "No se encontró la sesión. Verifica tus credenciales.",
|
||||
"searchingForDevices": "Buscando dispositivos...",
|
||||
"noDevicesFound": "No se encontraron dispositivos en tu red",
|
||||
"noDevicesHint": "Abre Plezy en escritorio y usa el mismo WiFi",
|
||||
"availableDevices": "Dispositivos disponibles",
|
||||
"manualConnection": "Conexión manual",
|
||||
"cryptoInitFailed": "No se pudo iniciar la conexión segura. Inicia sesión en Plex primero.",
|
||||
"validationHostRequired": "Ingresa la dirección del host",
|
||||
"validationHostFormat": "El formato debe ser IP:puerto (ej. 192.168.1.100:48632)",
|
||||
"connectionTimedOut": "Tiempo de conexión agotado. Usa la misma red en ambos dispositivos.",
|
||||
"sessionNotFound": "Dispositivo no encontrado. Asegúrate de que Plezy esté en ejecución en el host.",
|
||||
"authFailed": "Autenticación fallida. Ambos dispositivos necesitan la misma cuenta Plex.",
|
||||
"failedToConnect": "Error al conectar: ${error}"
|
||||
},
|
||||
"remote": {
|
||||
@@ -769,8 +1019,6 @@
|
||||
"reconnecting": "Reconectando...",
|
||||
"attemptOf": "Intento ${current} de 5",
|
||||
"retryNow": "Reintentar ahora",
|
||||
"connectionError": "Error de conexión",
|
||||
"notConnected": "No conectado",
|
||||
"tabRemote": "Remoto",
|
||||
"tabPlay": "Reproducir",
|
||||
"tabMore": "Más",
|
||||
@@ -806,13 +1054,14 @@
|
||||
"audioOutput": "Salida de audio",
|
||||
"performanceOverlay": "Indicador de rendimiento",
|
||||
"audioPassthrough": "Audio Passthrough",
|
||||
"audioNormalization": "Normalización de audio"
|
||||
"audioNormalization": "Normalizar volumen"
|
||||
},
|
||||
"externalPlayer": {
|
||||
"title": "Reproductor externo",
|
||||
"useExternalPlayer": "Usar reproductor externo",
|
||||
"useExternalPlayerDescription": "Abrir vídeos en una app externa en lugar del reproductor integrado",
|
||||
"useExternalPlayerDescription": "Abrir videos en otra app",
|
||||
"selectPlayer": "Seleccionar reproductor",
|
||||
"customPlayers": "Reproductores personalizados",
|
||||
"systemDefault": "Predeterminado del sistema",
|
||||
"addCustomPlayer": "Añadir reproductor personalizado",
|
||||
"playerName": "Nombre del reproductor",
|
||||
@@ -840,8 +1089,12 @@
|
||||
"summary": "Resumen",
|
||||
"poster": "Póster",
|
||||
"background": "Fondo",
|
||||
"logo": "Logo",
|
||||
"squareArt": "Imagen cuadrada",
|
||||
"selectPoster": "Seleccionar póster",
|
||||
"selectBackground": "Seleccionar fondo",
|
||||
"selectLogo": "Seleccionar logo",
|
||||
"selectSquareArt": "Seleccionar imagen cuadrada",
|
||||
"fromUrl": "Desde URL",
|
||||
"uploadFile": "Subir archivo",
|
||||
"enterImageUrl": "Introducir URL de imagen",
|
||||
@@ -883,6 +1136,124 @@
|
||||
"subtitleMode": "Selección automática de subtítulos",
|
||||
"manuallySelected": "Seleccionado manualmente",
|
||||
"shownWithForeignAudio": "Mostrar con audio extranjero",
|
||||
"alwaysEnabled": "Siempre activado"
|
||||
"alwaysEnabled": "Siempre activado",
|
||||
"tags": "Etiquetas",
|
||||
"addTag": "Añadir etiqueta",
|
||||
"genre": "Género",
|
||||
"director": "Director",
|
||||
"writer": "Guionista",
|
||||
"producer": "Productor",
|
||||
"country": "País",
|
||||
"collection": "Colección",
|
||||
"label": "Etiqueta",
|
||||
"style": "Estilo",
|
||||
"mood": "Estado de ánimo"
|
||||
},
|
||||
"matchScreen": {
|
||||
"match": "Emparejar...",
|
||||
"fixMatch": "Corregir coincidencia...",
|
||||
"unmatch": "Desvincular",
|
||||
"unmatchConfirm": "¿Borrar esta coincidencia? Plex lo tratará como no coincidente hasta reasignarlo.",
|
||||
"unmatchSuccess": "Elemento desvinculado",
|
||||
"unmatchFailed": "No se pudo desvincular el elemento",
|
||||
"matchApplied": "Coincidencia aplicada",
|
||||
"matchFailed": "No se pudo aplicar la coincidencia",
|
||||
"titleHint": "Título",
|
||||
"yearHint": "Año",
|
||||
"search": "Buscar",
|
||||
"noMatchesFound": "No se encontraron coincidencias"
|
||||
},
|
||||
"serverTasks": {
|
||||
"title": "Tareas del servidor",
|
||||
"failedToLoad": "Error al cargar tareas",
|
||||
"noTasks": "No hay tareas en ejecución"
|
||||
},
|
||||
"trakt": {
|
||||
"title": "Trakt",
|
||||
"connected": "Conectado",
|
||||
"connectedAs": "Conectado como @${username}",
|
||||
"disconnectConfirm": "¿Desconectar cuenta de Trakt?",
|
||||
"disconnectConfirmBody": "Plezy dejará de enviar eventos a Trakt. Puedes reconectar cuando quieras.",
|
||||
"scrobble": "Scrobbling en tiempo real",
|
||||
"scrobbleDescription": "Enviar eventos de reproducción, pausa y parada a Trakt durante la reproducción.",
|
||||
"watchedSync": "Sincronizar estado de visto",
|
||||
"watchedSyncDescription": "Cuando marques elementos como vistos en Plezy, también se marcarán en Trakt."
|
||||
},
|
||||
"trackers": {
|
||||
"title": "Rastreadores",
|
||||
"hubSubtitle": "Sincroniza el progreso de visualización con Trakt y otros servicios.",
|
||||
"notConnected": "No conectado",
|
||||
"connectedAs": "Conectado como @${username}",
|
||||
"scrobble": "Registrar progreso automáticamente",
|
||||
"scrobbleDescription": "Actualiza tu lista cuando termines un episodio o película.",
|
||||
"disconnectConfirm": "¿Desconectar ${service}?",
|
||||
"disconnectConfirmBody": "Plezy dejará de actualizar ${service}. Reconecta cuando quieras.",
|
||||
"connectFailed": "No se pudo conectar a ${service}. Inténtalo de nuevo.",
|
||||
"services": {
|
||||
"mal": "MyAnimeList",
|
||||
"anilist": "AniList",
|
||||
"simkl": "Simkl"
|
||||
},
|
||||
"deviceCode": {
|
||||
"title": "Activar Plezy en ${service}",
|
||||
"body": "Visita ${url} e introduce este código:",
|
||||
"openToActivate": "Abrir ${service} para activar",
|
||||
"waitingForAuthorization": "Esperando autorización…",
|
||||
"codeCopied": "Código copiado"
|
||||
},
|
||||
"oauthProxy": {
|
||||
"title": "Inicia sesión en ${service}",
|
||||
"body": "Escanea este código QR o abre la URL en cualquier dispositivo.",
|
||||
"openToSignIn": "Abrir ${service} para iniciar sesión",
|
||||
"urlCopied": "URL copiada"
|
||||
},
|
||||
"libraryFilter": {
|
||||
"title": "Filtro de bibliotecas",
|
||||
"subtitleAllSyncing": "Sincronizando todas las bibliotecas",
|
||||
"subtitleNoneSyncing": "Nada se sincroniza",
|
||||
"subtitleBlocked": "${count} bloqueadas",
|
||||
"subtitleAllowed": "${count} permitidas",
|
||||
"mode": "Modo de filtro",
|
||||
"modeBlacklist": "Lista negra",
|
||||
"modeWhitelist": "Lista blanca",
|
||||
"modeHintBlacklist": "Sincronizar todas las bibliotecas excepto las marcadas abajo.",
|
||||
"modeHintWhitelist": "Sincronizar solo las bibliotecas marcadas abajo.",
|
||||
"libraries": "Bibliotecas",
|
||||
"noLibraries": "No hay bibliotecas disponibles"
|
||||
}
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Añadir servidor Jellyfin",
|
||||
"jellyfinUrlIntro": "Introduce la URL del servidor, p. ej. `https://jellyfin.example.com`.",
|
||||
"serverUrl": "URL del servidor",
|
||||
"findServer": "Buscar servidor",
|
||||
"username": "Usuario",
|
||||
"password": "Contraseña",
|
||||
"signIn": "Iniciar sesión",
|
||||
"change": "Cambiar",
|
||||
"required": "Obligatorio",
|
||||
"couldNotReachServer": "No se pudo conectar con el servidor: ${error}",
|
||||
"signInFailed": "Error al iniciar sesión: ${error}",
|
||||
"quickConnectFailed": "Quick Connect ha fallado: ${error}",
|
||||
"addPlexTitle": "Iniciar sesión con Plex",
|
||||
"plexAuthIntro": "Inicia sesión con un navegador o código QR.",
|
||||
"plexQRPrompt": "Escanea este código QR para iniciar sesión.",
|
||||
"waitingForPlexConfirmation": "Esperando que plex.tv confirme tu inicio de sesión…",
|
||||
"pinExpired": "El PIN caducó antes de iniciar sesión. Inténtalo de nuevo.",
|
||||
"duplicatePlexAccount": "Ya iniciaste sesión en Plex. Cierra sesión para cambiar de cuenta.",
|
||||
"failedToRegisterAccount": "No se pudo registrar la cuenta: ${error}",
|
||||
"enterJellyfinUrlError": "Introduce la URL de tu servidor Jellyfin",
|
||||
"addConnectionTitle": "Añadir conexión",
|
||||
"addConnectionTitleScoped": "Añadir a ${name}",
|
||||
"addConnectionIntroGlobal": "Añade otro servidor multimedia. Plex y Jellyfin aparecen juntos en Inicio.",
|
||||
"addConnectionIntroScoped": "Añade un servidor nuevo o toma prestado uno de otro perfil.",
|
||||
"signInWithPlexCard": "Iniciar sesión con Plex",
|
||||
"signInWithPlexCardSubtitle": "Autoriza este dispositivo. Se añaden servidores compartidos.",
|
||||
"signInWithPlexCardSubtitleScoped": "Autoriza una cuenta Plex. Los usuarios de Home se convierten en perfiles.",
|
||||
"connectToJellyfinCard": "Conectar a Jellyfin",
|
||||
"connectToJellyfinCardSubtitle": "Introduce la URL del servidor, usuario y contraseña.",
|
||||
"connectToJellyfinCardSubtitleScoped": "Inicia sesión en un servidor Jellyfin. Se vincula a ${name}.",
|
||||
"borrowFromAnotherProfile": "Tomar prestado de otro perfil",
|
||||
"borrowFromAnotherProfileSubtitle": "Reutiliza la conexión de otro perfil. Los perfiles protegidos con PIN requieren un PIN."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,13 +3,22 @@
|
||||
"title": "Plezy"
|
||||
},
|
||||
"auth": {
|
||||
"signIn": "Se connecter",
|
||||
"signInWithPlex": "S'inscrire avec Plex",
|
||||
"showQRCode": "Afficher le QR Code",
|
||||
"authenticate": "S'authentifier",
|
||||
"authenticationTimeout": "Délai d'authentification expiré. Veuillez réessayer.",
|
||||
"scanQRToSignIn": "Scannez ce QR code pour vous connecter",
|
||||
"waitingForAuth": "En attente d'authentification...\nVeuillez vous connecter dans votre navigateur.",
|
||||
"useBrowser": "Utiliser le navigateur"
|
||||
"waitingForAuth": "En attente d'authentification...\nConnectez-vous depuis votre navigateur.",
|
||||
"useBrowser": "Utiliser le navigateur",
|
||||
"or": "ou",
|
||||
"connectToJellyfin": "Se connecter à Jellyfin",
|
||||
"useQuickConnect": "Utiliser Quick Connect",
|
||||
"quickConnectCode": "Code Quick Connect",
|
||||
"quickConnectInstructions": "Ouvrez Quick Connect dans Jellyfin et saisissez ce code.",
|
||||
"quickConnectWaiting": "En attente d'approbation…",
|
||||
"quickConnectCancel": "Annuler",
|
||||
"quickConnectExpired": "Quick Connect a expiré. Réessayez."
|
||||
},
|
||||
"common": {
|
||||
"cancel": "Annuler",
|
||||
@@ -30,7 +39,6 @@
|
||||
"shuffle": "Mélanger",
|
||||
"addTo": "Ajouter à...",
|
||||
"createNew": "Créer",
|
||||
"paste": "Coller",
|
||||
"connect": "Connecter",
|
||||
"disconnect": "Déconnecter",
|
||||
"play": "Lire",
|
||||
@@ -44,19 +52,20 @@
|
||||
"mute": "Muet",
|
||||
"ok": "OK",
|
||||
"reconnect": "Reconnecter",
|
||||
"exitConfirmTitle": "Quitter l'application ?",
|
||||
"exitConfirmMessage": "Êtes-vous sûr de vouloir quitter ?",
|
||||
"dontAskAgain": "Ne plus demander",
|
||||
"exit": "Quitter",
|
||||
"viewAll": "Tout afficher",
|
||||
"checkingNetwork": "Vérification du réseau...",
|
||||
"refreshingServers": "Actualisation des serveurs...",
|
||||
"loadingServers": "Chargement des serveurs...",
|
||||
"connectingToServers": "Connexion aux serveurs...",
|
||||
"startingOfflineMode": "Démarrage en mode hors-ligne..."
|
||||
"startingOfflineMode": "Démarrage en mode hors-ligne...",
|
||||
"loading": "Chargement...",
|
||||
"fullscreen": "Plein écran",
|
||||
"exitFullscreen": "Quitter le plein écran",
|
||||
"pressBackAgainToExit": "Appuyez à nouveau sur retour pour quitter"
|
||||
},
|
||||
"screens": {
|
||||
"licenses": "Licenses",
|
||||
"licenses": "Licences",
|
||||
"switchProfile": "Changer de profil",
|
||||
"subtitleStyling": "Configuration des sous-titres",
|
||||
"mpvConfig": "mpv.conf",
|
||||
@@ -73,18 +82,18 @@
|
||||
},
|
||||
"settings": {
|
||||
"title": "Paramètres",
|
||||
"supportDeveloper": "Soutenir Plezy",
|
||||
"supportDeveloperDescription": "Faites un don via Liberapay pour financer le développement",
|
||||
"language": "Langue",
|
||||
"theme": "Thème",
|
||||
"appearance": "Apparence",
|
||||
"videoPlayback": "Lecture vidéo",
|
||||
"videoPlaybackDescription": "Configurer le comportement de lecture",
|
||||
"advanced": "Avancé",
|
||||
"episodePosterMode": "Style du Poster d'épisode",
|
||||
"seriesPoster": "Poster de série",
|
||||
"seriesPosterDescription": "Afficher le poster de série pour tous les épisodes",
|
||||
"seasonPoster": "Poster de saison",
|
||||
"seasonPosterDescription": "Afficher le poster spécifique à la saison pour les épisodes",
|
||||
"episodeThumbnail": "Mignature d'épisode",
|
||||
"episodeThumbnailDescription": "Afficher les vignettes des captures d'écran des épisodes au format 16:9",
|
||||
"episodeThumbnail": "Miniature",
|
||||
"showHeroSectionDescription": "Afficher le carrousel de contenu en vedette sur l'écran d'accueil",
|
||||
"secondsLabel": "Secondes",
|
||||
"minutesLabel": "Minutes",
|
||||
@@ -92,63 +101,65 @@
|
||||
"minutesShort": "m",
|
||||
"durationHint": "Entrez la durée (${min}-${max})",
|
||||
"systemTheme": "Système",
|
||||
"systemThemeDescription": "Suivre les paramètres système",
|
||||
"lightTheme": "Clair",
|
||||
"darkTheme": "Sombre",
|
||||
"oledTheme": "OLED",
|
||||
"oledThemeDescription": "Noir pur pour les écrans OLED",
|
||||
"libraryDensity": "Densité des bibliothèques",
|
||||
"compact": "Compact",
|
||||
"compactDescription": "Cartes plus petites, plus d'éléments visibles",
|
||||
"normal": "Normal",
|
||||
"normalDescription": "Taille par défaut",
|
||||
"comfortable": "Confortable",
|
||||
"comfortableDescription": "Cartes plus grandes, moins d'éléments visibles",
|
||||
"viewMode": "Mode d'affichage",
|
||||
"gridView": "Grille",
|
||||
"gridViewDescription": "Afficher les éléments dans une disposition en grille",
|
||||
"listView": "Liste",
|
||||
"listViewDescription": "Afficher les éléments dans une liste",
|
||||
"showHeroSection": "Afficher la section Hero",
|
||||
"useGlobalHubs": "Utiliser la disposition Plex Home",
|
||||
"useGlobalHubsDescription": "Afficher les hubs de la page d'accueil comme le client Plex officiel. Lorsque cette option est désactivée, affiche à la place les recommandations par bibliothèque.",
|
||||
"useGlobalHubs": "Utiliser la mise en page d'accueil",
|
||||
"useGlobalHubsDescription": "Afficher des hubs d'accueil unifiés. Sinon, utiliser les recommandations de bibliothèque.",
|
||||
"showServerNameOnHubs": "Afficher le nom du serveur sur les hubs",
|
||||
"showServerNameOnHubsDescription": "Toujours afficher le nom du serveur dans les titres des hubs. Lorsque cette option est désactivée, seuls les noms de hubs en double s'affichent.",
|
||||
"showServerNameOnHubsDescription": "Toujours afficher les noms des serveurs dans les titres des hubs.",
|
||||
"groupLibrariesByServer": "Grouper les bibliothèques par serveur",
|
||||
"groupLibrariesByServerDescription": "Regrouper les bibliothèques de la barre latérale par serveur multimédia.",
|
||||
"alwaysKeepSidebarOpen": "Toujours garder la barre latérale ouverte",
|
||||
"alwaysKeepSidebarOpenDescription": "La barre latérale reste étendue et la zone de contenu s'adapte",
|
||||
"showUnwatchedCount": "Afficher le nombre non visionné",
|
||||
"showUnwatchedCountDescription": "Afficher le nombre d'épisodes non visionnés pour les séries et saisons",
|
||||
"showEpisodeNumberOnCards": "Afficher le numéro d'épisode sur les cartes",
|
||||
"showEpisodeNumberOnCardsDescription": "Afficher la saison et l'épisode sur les cartes d'épisode",
|
||||
"showSeasonPostersOnTabs": "Afficher les posters de saison sur les onglets",
|
||||
"showSeasonPostersOnTabsDescription": "Afficher l'affiche de chaque saison au-dessus de son onglet",
|
||||
"hideSpoilers": "Masquer les spoilers des épisodes non vus",
|
||||
"hideSpoilersDescription": "Flouter les miniatures et masquer les descriptions des épisodes que vous n'avez pas encore regardés",
|
||||
"hideSpoilersDescription": "Flouter les miniatures et descriptions des épisodes non vus",
|
||||
"playerBackend": "Moteur de lecture",
|
||||
"exoPlayer": "ExoPlayer (Recommandé)",
|
||||
"exoPlayerDescription": "Lecteur natif Android avec meilleur support matériel",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "Lecteur avancé avec plus de fonctionnalités et support des sous-titres ASS",
|
||||
"hardwareDecoding": "Décodage matériel",
|
||||
"hardwareDecodingDescription": "Utilisez l'accélération matérielle lorsqu'elle est disponible.",
|
||||
"bufferSize": "Taille du Buffer",
|
||||
"bufferSizeMB": "${size}MB",
|
||||
"bufferSizeAuto": "Auto (Recommandé)",
|
||||
"bufferSizeWarning": "Votre appareil dispose de ${heap}MB de mémoire. Un tampon de ${size}MB peut causer des problèmes de lecture.",
|
||||
"bufferSizeWarning": "${heap}MB de mémoire disponible. Un tampon de ${size}MB peut affecter la lecture.",
|
||||
"defaultQualityTitle": "Qualité par défaut",
|
||||
"defaultQualityDescription": "Utilisé au démarrage de la lecture. Les valeurs plus basses réduisent la bande passante.",
|
||||
"subtitleStyling": "Stylisation des sous-titres",
|
||||
"subtitleStylingDescription": "Personnaliser l'apparence des sous-titres",
|
||||
"smallSkipDuration": "Durée du petit saut",
|
||||
"largeSkipDuration": "Durée du grand saut",
|
||||
"rewindOnResume": "Rembobiner à la reprise",
|
||||
"rewindOnResumeDescription": "Rembobiner de cette durée lors de la reprise de la lecture",
|
||||
"secondsUnit": "${seconds} secondes",
|
||||
"defaultSleepTimer": "Minuterie de mise en veille par défaut",
|
||||
"minutesUnit": "${minutes} minutes",
|
||||
"rememberTrackSelections": "Mémoriser les sélections de pistes par émission/film",
|
||||
"rememberTrackSelectionsDescription": "Enregistrer automatiquement les préférences linguistiques pour l'audio et les sous-titres lorsque vous changez de piste pendant la lecture",
|
||||
"rememberTrackSelectionsDescription": "Mémoriser les choix audio et sous-titres par titre",
|
||||
"showChapterMarkersOnTimeline": "Afficher les marqueurs de chapitres sur la barre de lecture",
|
||||
"showChapterMarkersOnTimelineDescription": "Segmenter la barre de lecture aux limites des chapitres",
|
||||
"clickVideoTogglesPlayback": "Cliquez sur la vidéo pour basculer entre lecture et pause.",
|
||||
"clickVideoTogglesPlaybackDescription": "Si cette option est activée, cliquer sur le lecteur vidéo lancera ou mettra en pause la vidéo. Sinon, le clic affichera ou masquera les commandes de lecture.",
|
||||
"clickVideoTogglesPlaybackDescription": "Cliquer sur la vidéo pour lire/mettre en pause au lieu d'afficher les contrôles.",
|
||||
"videoPlayerControls": "Commandes du lecteur vidéo",
|
||||
"keyboardShortcuts": "Raccourcis clavier",
|
||||
"keyboardShortcutsDescription": "Personnaliser les raccourcis clavier",
|
||||
"videoPlayerNavigation": "Navigation dans le lecteur vidéo",
|
||||
"videoPlayerNavigationDescription": "Utilisez les touches fléchées pour naviguer dans les commandes du lecteur vidéo.",
|
||||
"watchTogetherRelay": "Relais Regarder Ensemble",
|
||||
"watchTogetherRelayDescription": "Définir un relay personnalisé. Tout le monde doit utiliser le même serveur.",
|
||||
"watchTogetherRelayHint": "https://mon-relais.exemple.fr",
|
||||
"crashReporting": "Rapports de plantage",
|
||||
"crashReportingDescription": "Envoyer des rapports de plantage pour améliorer l'application",
|
||||
"debugLogging": "Journalisation de débogage",
|
||||
@@ -156,17 +167,31 @@
|
||||
"viewLogs": "Voir les logs",
|
||||
"viewLogsDescription": "Voir les logs d'application",
|
||||
"clearCache": "Vider le cache",
|
||||
"clearCacheDescription": "Cela effacera toutes les images et données mises en cache. Le chargement du contenu de l'application peut prendre plus de temps après avoir effacé le cache.",
|
||||
"clearCacheDescription": "Effacer les images et données en cache. Le contenu peut charger plus lentement.",
|
||||
"clearCacheSuccess": "Cache effacé avec succès",
|
||||
"resetSettings": "Réinitialiser les paramètres",
|
||||
"resetSettingsDescription": "Cela réinitialisera tous les paramètres à leurs valeurs par défaut. Cette action ne peut pas être annulée.",
|
||||
"resetSettingsDescription": "Restaurer les paramètres par défaut. Action irréversible.",
|
||||
"resetSettingsSuccess": "Réinitialisation des paramètres réussie",
|
||||
"backup": "Sauvegarde",
|
||||
"exportSettings": "Exporter les paramètres",
|
||||
"exportSettingsDescription": "Enregistrer vos préférences dans un fichier",
|
||||
"exportSettingsSuccess": "Paramètres exportés",
|
||||
"exportSettingsFailed": "Impossible d'exporter les paramètres",
|
||||
"importSettings": "Importer les paramètres",
|
||||
"importSettingsDescription": "Restaurer les préférences depuis un fichier",
|
||||
"importSettingsConfirm": "Cela remplacera vos paramètres actuels. Continuer ?",
|
||||
"importSettingsSuccess": "Paramètres importés",
|
||||
"importSettingsFailed": "Impossible d'importer les paramètres",
|
||||
"importSettingsInvalidFile": "Ce fichier n'est pas un export Plezy valide",
|
||||
"importSettingsNoUser": "Connectez-vous avant d'importer les paramètres",
|
||||
"shortcutsReset": "Raccourcis réinitialisés aux valeurs par défaut",
|
||||
"about": "À propos",
|
||||
"aboutDescription": "Informations sur l'application et licences",
|
||||
"updates": "Mises à jour",
|
||||
"updateAvailable": "Mise à jour disponible",
|
||||
"checkForUpdates": "Vérifier les mises à jour",
|
||||
"autoCheckUpdatesOnStartup": "Vérifier automatiquement les mises à jour au démarrage",
|
||||
"autoCheckUpdatesOnStartupDescription": "Notifier au lancement quand une mise à jour est disponible",
|
||||
"validationErrorEnterNumber": "Veuillez saisir un numéro valide",
|
||||
"validationErrorDuration": "La durée doit être comprise entre ${min} et ${max} ${unit}",
|
||||
"shortcutAlreadyAssigned": "Raccourci déjà attribué à ${action}",
|
||||
@@ -176,6 +201,8 @@
|
||||
"autoSkipIntroDescription": "Skipper automatiquement l'introduction après quelques secondes",
|
||||
"autoSkipCredits": "Skip automatique des crédits",
|
||||
"autoSkipCreditsDescription": "Passer les crédits et passer à l'épisode suivant automatiquement",
|
||||
"forceSkipMarkerFallback": "Forcer les marqueurs de repli",
|
||||
"forceSkipMarkerFallbackDescription": "Utiliser les motifs de titres de chapitres même si Plex a des marqueurs",
|
||||
"autoSkipDelay": "Délai avant skip automatique",
|
||||
"autoSkipDelayDescription": "Attendre ${seconds} secondes avant l'auto-skip",
|
||||
"introPattern": "Modèle de marqueur d'intro",
|
||||
@@ -196,26 +223,52 @@
|
||||
"downloadLocationSelectError": "Échec de la sélection du dossier",
|
||||
"downloadOnWifiOnly": "Télécharger uniquement via WiFi",
|
||||
"downloadOnWifiOnlyDescription": "Empêcher les téléchargements lorsque vous utilisez les données cellulaires",
|
||||
"cellularDownloadBlocked": "Les téléchargements sont désactivés sur les données cellulaires. Connectez-vous au Wi-Fi ou modifiez le paramètre.",
|
||||
"autoRemoveWatchedDownloads": "Supprimer automatiquement les téléchargements vus",
|
||||
"autoRemoveWatchedDownloadsDescription": "Supprimer automatiquement les téléchargements vus",
|
||||
"cellularDownloadBlocked": "Les téléchargements sont bloqués sur réseau mobile. Utilisez le WiFi ou modifiez le réglage.",
|
||||
"maxVolume": "Volume maximal",
|
||||
"maxVolumeDescription": "Autoriser l'augmentation du volume au-delà de 100 % pour les médias silencieux",
|
||||
"maxVolumePercent": "${percent}%",
|
||||
"discordRichPresence": "Discord Rich Presence",
|
||||
"discordRichPresenceDescription": "Montrez ce que vous regardez sur Discord",
|
||||
"trakt": "Trakt",
|
||||
"traktDescription": "Synchroniser l'historique de visionnage avec Trakt",
|
||||
"trackers": "Trackers",
|
||||
"trackersDescription": "Synchroniser la progression avec Trakt, MyAnimeList, AniList et Simkl",
|
||||
"companionRemoteServer": "Serveur de télécommande",
|
||||
"companionRemoteServerDescription": "Autoriser les appareils mobiles de votre réseau à contrôler cette application",
|
||||
"autoPip": "Image dans l'image automatique",
|
||||
"autoPipDescription": "Activer automatiquement l'image dans l'image en quittant l'application pendant la lecture",
|
||||
"autoPipDescription": "Passer en picture-in-picture en quittant pendant la lecture",
|
||||
"matchContentFrameRate": "Fréquence d'images du contenu correspondant",
|
||||
"matchContentFrameRateDescription": "Ajustez la fréquence de rafraîchissement de l'écran en fonction du contenu vidéo, ce qui réduit les saccades et économise la batterie",
|
||||
"matchContentFrameRateDescription": "Adapter la fréquence d'affichage au contenu vidéo",
|
||||
"matchRefreshRate": "Adapter la fréquence de rafraîchissement",
|
||||
"matchRefreshRateDescription": "Adapter la fréquence d'affichage en plein écran",
|
||||
"matchDynamicRange": "Adapter la plage dynamique",
|
||||
"matchDynamicRangeDescription": "Activer HDR pour le contenu HDR, puis revenir en SDR",
|
||||
"displaySwitchDelay": "Délai de changement d'affichage",
|
||||
"tunneledPlayback": "Lecture tunnelée",
|
||||
"tunneledPlaybackDescription": "Utiliser le tunnelage vidéo accéléré par matériel. Désactiver si vous voyez un écran noir avec du son sur du contenu HDR",
|
||||
"tunneledPlaybackDescription": "Utiliser le tunneling vidéo. Désactivez si la lecture HDR affiche un écran noir.",
|
||||
"requireProfileSelectionOnOpen": "Demander le profil à l'ouverture",
|
||||
"requireProfileSelectionOnOpenDescription": "Afficher la sélection de profil à chaque ouverture de l'application",
|
||||
"confirmExitOnBack": "Confirmer avant de quitter",
|
||||
"confirmExitOnBackDescription": "Afficher une boîte de dialogue de confirmation en appuyant sur retour pour quitter",
|
||||
"forceTvMode": "Forcer le mode TV",
|
||||
"forceTvModeDescription": "Forcer l'interface TV. Pour appareils non détectés automatiquement. Redémarrage requis.",
|
||||
"startInFullscreen": "Démarrer en plein écran",
|
||||
"startInFullscreenDescription": "Ouvrir Plezy en mode plein écran au lancement",
|
||||
"autoHidePerformanceOverlay": "Masquer auto. superposition performances",
|
||||
"autoHidePerformanceOverlayDescription": "Faire apparaître/disparaître la superposition avec les contrôles de lecture",
|
||||
"showNavBarLabels": "Afficher les libellés de la barre de navigation",
|
||||
"showNavBarLabelsDescription": "Afficher les libellés sous les icônes de la barre de navigation",
|
||||
"liveTvDefaultFavorites": "Chaînes favorites par défaut",
|
||||
"liveTvDefaultFavoritesDescription": "Afficher uniquement les chaînes favorites à l'ouverture de la TV en direct"
|
||||
"liveTvDefaultFavoritesDescription": "Afficher uniquement les chaînes favorites à l'ouverture de la TV en direct",
|
||||
"display": "Affichage",
|
||||
"homeScreen": "Écran d'accueil",
|
||||
"navigation": "Navigation",
|
||||
"window": "Fenêtre",
|
||||
"content": "Contenu",
|
||||
"player": "Lecteur",
|
||||
"subtitlesAndConfig": "Sous-titres et configuration",
|
||||
"seekAndTiming": "Recherche et minutage",
|
||||
"behavior": "Comportement"
|
||||
},
|
||||
"search": {
|
||||
"hint": "Rechercher des films, des séries, de la musique...",
|
||||
@@ -239,6 +292,8 @@
|
||||
"subtitleTrackNext": "Piste de sous-titres suivante",
|
||||
"chapterNext": "Chapitre suivant",
|
||||
"chapterPrevious": "Chapitre précédent",
|
||||
"episodeNext": "Épisode suivant",
|
||||
"episodePrevious": "Épisode précédent",
|
||||
"speedIncrease": "Augmenter la vitesse",
|
||||
"speedDecrease": "Réduire la vitesse",
|
||||
"speedReset": "Réinitialiser la vitesse",
|
||||
@@ -266,6 +321,8 @@
|
||||
"colorPrimaries": "Couleurs primaires",
|
||||
"chromaSubsampling": "Sous-échantillonnage chromatique",
|
||||
"channels": "Canaux",
|
||||
"subtitles": "Sous-titres",
|
||||
"overallBitrate": "Débit global",
|
||||
"path": "Chemin",
|
||||
"size": "Taille",
|
||||
"container": "Conteneur",
|
||||
@@ -282,11 +339,13 @@
|
||||
"shufflePlay": "Lecture aléatoire",
|
||||
"fileInfo": "Informations sur le fichier",
|
||||
"deleteFromServer": "Supprimer du serveur",
|
||||
"confirmDelete": "Cela supprimera définitivement ce média et ses fichiers de votre serveur. Cette action est irréversible.",
|
||||
"confirmDelete": "Supprimer ce média et ses fichiers de votre serveur ?",
|
||||
"deleteMultipleWarning": "Cela inclut tous les épisodes et leurs fichiers.",
|
||||
"mediaDeletedSuccessfully": "Élément média supprimé avec succès",
|
||||
"mediaFailedToDelete": "Échec de la suppression de l'élément média",
|
||||
"rate": "Noter"
|
||||
"rate": "Noter",
|
||||
"playFromBeginning": "Lire depuis le début",
|
||||
"playVersion": "Lire la version..."
|
||||
},
|
||||
"accessibility": {
|
||||
"mediaCardMovie": "${title}, film",
|
||||
@@ -339,6 +398,13 @@
|
||||
"tracksButton": "Audio et sous-titres",
|
||||
"chaptersButton": "Chapitres",
|
||||
"versionsButton": "Versions vidéo",
|
||||
"versionQualityButton": "Version et qualité",
|
||||
"versionColumnHeader": "Version",
|
||||
"qualityColumnHeader": "Qualité",
|
||||
"qualityOriginal": "Originale",
|
||||
"qualityPresetLabel": "${resolution}p ${bitrate} Mbps",
|
||||
"qualityBandwidthEstimate": "~${bitrate} Mbps",
|
||||
"transcodeUnavailableFallback": "Transcodage indisponible — lecture en qualité originale",
|
||||
"pipButton": "Mode PiP (Picture-in-Picture)",
|
||||
"aspectRatioButton": "Format d'image",
|
||||
"ambientLighting": "Éclairage ambiant",
|
||||
@@ -347,7 +413,6 @@
|
||||
"alwaysOnTopButton": "Toujours au premier plan",
|
||||
"rotationLockButton": "Verrouillage de rotation",
|
||||
"lockScreen": "Verrouiller l'écran",
|
||||
"unlockScreen": "Déverrouiller l'écran",
|
||||
"screenLockButton": "Verrouillage de l'écran",
|
||||
"longPressToUnlock": "Appui long pour déverrouiller",
|
||||
"timelineSlider": "Timeline vidéo",
|
||||
@@ -358,7 +423,7 @@
|
||||
"pipErrors": {
|
||||
"androidVersion": "Nécessite Android 8.0 ou plus récent",
|
||||
"iosVersion": "Nécessite iOS 15.0 ou plus récent",
|
||||
"permissionDisabled": "L'autorisation Image dans l'image est désactivée. Activez-la dans Paramètres > Applications > Plezy > Image dans l'image",
|
||||
"permissionDisabled": "Picture-in-picture est désactivé. Activez-le dans les paramètres système.",
|
||||
"notSupported": "Cet appareil ne prend pas en charge le mode image dans l'image",
|
||||
"voSwitchFailed": "Échec du changement de sortie vidéo pour l'image dans l'image",
|
||||
"failed": "Échec du démarrage du mode image dans l'image",
|
||||
@@ -367,7 +432,13 @@
|
||||
"chapters": "Chapitres",
|
||||
"noChaptersAvailable": "Aucun chapitre disponible",
|
||||
"queue": "File d'attente",
|
||||
"noQueueItems": "Aucun élément dans la file d'attente"
|
||||
"noQueueItems": "Aucun élément dans la file d'attente",
|
||||
"searchSubtitles": "Rechercher des sous-titres",
|
||||
"language": "Langue",
|
||||
"noSubtitlesFound": "Aucun sous-titre trouvé",
|
||||
"subtitleDownloaded": "Sous-titre téléchargé",
|
||||
"subtitleDownloadFailed": "Échec du téléchargement du sous-titre",
|
||||
"searchLanguages": "Rechercher des langues..."
|
||||
},
|
||||
"userStatus": {
|
||||
"admin": "Admin",
|
||||
@@ -380,6 +451,7 @@
|
||||
"markedAsUnwatched": "Marqué comme non vu",
|
||||
"markedAsWatchedOffline": "Marqué comme vu (se synchronisera lorsque vous serez en ligne)",
|
||||
"markedAsUnwatchedOffline": "Marqué comme non vu (sera synchronisé lorsque vous serez en ligne)",
|
||||
"autoRemovedWatchedDownload": "Supprimé automatiquement : ${title}",
|
||||
"removedFromContinueWatching": "Supprimer de \"Continuer à regarder\"",
|
||||
"errorLoading": "Erreur: ${error}",
|
||||
"fileInfoNotAvailable": "Informations sur le fichier non disponibles",
|
||||
@@ -387,6 +459,10 @@
|
||||
"errorLoadingSeries": "Erreur lors du chargement de la série",
|
||||
"errorLoadingSeason": "Erreur lors du chargement de la saison",
|
||||
"musicNotSupported": "La lecture de musique n'est pas encore prise en charge",
|
||||
"noDescriptionAvailable": "Aucune description disponible",
|
||||
"noProfilesAvailable": "Aucun profil disponible",
|
||||
"contactAdminForProfiles": "Contactez votre administrateur serveur pour ajouter des profils",
|
||||
"unableToDetermineLibrarySection": "Impossible de déterminer la section de la bibliothèque pour cet élément",
|
||||
"logsCleared": "Logs effacés",
|
||||
"logsCopied": "Logs copiés dans le presse-papier",
|
||||
"noLogsAvailable": "Aucun log disponible",
|
||||
@@ -406,19 +482,26 @@
|
||||
"failedToCreatePlayQueueNoItems": "Échec de la création de la file d'attente de lecture - aucun élément",
|
||||
"failedPlayback": "Echec de ${action}: ${error}",
|
||||
"switchingToCompatiblePlayer": "Passage au lecteur compatible...",
|
||||
"serverLimitTitle": "Échec de la lecture",
|
||||
"serverLimitBody": "Erreur serveur (HTTP 500). Une limite de bande passante/transcodage a probablement rejeté cette session. Demandez au propriétaire de l'ajuster.",
|
||||
"logsUploaded": "Logs envoyés",
|
||||
"logsUploadFailed": "Échec de l'envoi des logs",
|
||||
"logId": "ID du log"
|
||||
},
|
||||
"subtitlingStyling": {
|
||||
"stylingOptions": "Options de style",
|
||||
"text": "Texte",
|
||||
"border": "Bordure",
|
||||
"background": "Arrière-plan",
|
||||
"fontSize": "Taille de la police",
|
||||
"textColor": "Couleur du texte",
|
||||
"borderSize": "Taille de la bordure",
|
||||
"borderColor": "Couleur de la bordure",
|
||||
"backgroundOpacity": "Opacité d'arrière-plan",
|
||||
"backgroundColor": "Couleur d'arrière-plan",
|
||||
"position": "Position"
|
||||
"position": "Position",
|
||||
"assOverride": "Remplacement ASS",
|
||||
"bold": "Gras",
|
||||
"italic": "Italique"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "Configuration mpv",
|
||||
@@ -439,12 +522,85 @@
|
||||
"dialog": {
|
||||
"confirmAction": "Confirmer l'action"
|
||||
},
|
||||
"profiles": {
|
||||
"addPlezyProfile": "Ajouter un profil Plezy",
|
||||
"switchingProfile": "Changement de profil…",
|
||||
"deleteThisProfileTitle": "Supprimer ce profil ?",
|
||||
"deleteThisProfileMessage": "Supprimer ${displayName}. Les connexions ne sont pas affectées.",
|
||||
"active": "Actif",
|
||||
"manage": "Gérer",
|
||||
"delete": "Supprimer",
|
||||
"signOut": "Se déconnecter",
|
||||
"signOutPlexTitle": "Se déconnecter de Plex ?",
|
||||
"signOutPlexMessage": "Supprimer ${displayName} et tous les utilisateurs Plex Home ? Reconnexion possible à tout moment.",
|
||||
"signedOutPlex": "Déconnecté de Plex.",
|
||||
"signOutFailed": "Échec de la déconnexion.",
|
||||
"sectionTitle": "Profils",
|
||||
"summarySingle": "Ajoutez des profils pour mélanger utilisateurs gérés et identités locales",
|
||||
"summaryMultipleWithActive": "${count} profils · actif : ${activeName}",
|
||||
"summaryMultiple": "${count} profils",
|
||||
"removeConnectionTitle": "Retirer la connexion ?",
|
||||
"removeConnectionMessage": "Supprimer l'accès de ${displayName} à ${connectionLabel}. Les autres profils le conservent.",
|
||||
"deleteProfileTitle": "Supprimer le profil ?",
|
||||
"deleteProfileMessage": "Supprimer ${displayName} et ses connexions. Les serveurs restent disponibles.",
|
||||
"profileNameLabel": "Nom du profil",
|
||||
"pinProtectionLabel": "Protection par code PIN",
|
||||
"pinManagedByPlex": "PIN géré par Plex. Modifier sur plex.tv.",
|
||||
"noPinSetEditOnPlex": "Aucun PIN défini. Pour en exiger un, modifiez l'utilisateur Home sur plex.tv.",
|
||||
"setPin": "Définir un PIN",
|
||||
"setPinTitle": "Définir un PIN",
|
||||
"confirmPinTitle": "Confirmer le PIN",
|
||||
"pinSet": "PIN défini",
|
||||
"changePin": "Modifier",
|
||||
"removePin": "Retirer",
|
||||
"connectionsLabel": "Connexions",
|
||||
"add": "Ajouter",
|
||||
"deleteProfileButton": "Supprimer le profil",
|
||||
"noConnectionsHint": "Aucune connexion — ajoutez-en une pour utiliser ce profil.",
|
||||
"noConnections": "Aucune connexion",
|
||||
"plexHomeAccount": "Compte Plex Home",
|
||||
"connectionDefault": "Par défaut",
|
||||
"connectionAs": "en tant que ${displayName}",
|
||||
"makeDefault": "Définir par défaut",
|
||||
"removeConnection": "Retirer",
|
||||
"profileRenamed": "Profil renommé.",
|
||||
"borrowAddTo": "Ajouter à ${displayName}",
|
||||
"borrowExplain": "Emprunter la connexion d'un autre profil. Les profils protégés par PIN exigent un PIN.",
|
||||
"borrowEmpty": "Rien à emprunter pour le moment.",
|
||||
"borrowEmptySubtitle": "Connectez d'abord Plex ou Jellyfin à un autre profil.",
|
||||
"borrowFromProfile": "De ${displayName}",
|
||||
"borrowConnectionBorrowed": "Connexion empruntée.",
|
||||
"borrowFailed": "Impossible d'emprunter la connexion.",
|
||||
"incorrectPin": "PIN incorrect.",
|
||||
"sourceProfileMissingParentAccount": "Le profil source n'a pas son compte parent.",
|
||||
"failedToVerifyPin": "Impossible de vérifier le PIN.",
|
||||
"newProfile": "Nouveau profil",
|
||||
"profileNameHint": "ex. Invités, Enfants, Salon familial",
|
||||
"pinProtectionOptional": "Protection par PIN (optionnelle)",
|
||||
"pinExplain": "PIN à 4 chiffres requis pour changer de profil.",
|
||||
"continueButton": "Continuer",
|
||||
"pinsDontMatch": "Les PIN ne correspondent pas"
|
||||
},
|
||||
"connections": {
|
||||
"sectionTitle": "Connexions",
|
||||
"addConnection": "Ajouter une connexion",
|
||||
"addConnectionSubtitleNoProfile": "Connectez-vous avec Plex ou connectez un serveur Jellyfin",
|
||||
"addConnectionSubtitleScoped": "Ajouter à ${displayName} : Plex, Jellyfin ou une autre connexion de profil",
|
||||
"sessionExpiredOne": "Session expirée pour ${name}",
|
||||
"sessionExpiredMany": "Session expirée pour ${count} serveurs",
|
||||
"signInAgain": "Se reconnecter"
|
||||
},
|
||||
"discover": {
|
||||
"title": "Découvrez",
|
||||
"switchProfile": "Changer de profil",
|
||||
"noContentAvailable": "Aucun contenu disponible",
|
||||
"addMediaToLibraries": "Ajoutez des médias à votre bibliothèque",
|
||||
"continueWatching": "Continuer à regarder",
|
||||
"continueWatchingIn": "Continuer à regarder dans ${library}",
|
||||
"nextUp": "À suivre",
|
||||
"nextUpIn": "À suivre dans ${library}",
|
||||
"recentlyAdded": "Récemment ajouté",
|
||||
"recentlyAddedIn": "Récemment ajouté dans ${library}",
|
||||
"playEpisode": "S${season}E${episode}",
|
||||
"overview": "Aperçu",
|
||||
"cast": "Cast",
|
||||
@@ -458,7 +614,7 @@
|
||||
"errors": {
|
||||
"searchFailed": "Recherche échouée: ${error}",
|
||||
"connectionTimeout": "Délai d'attente de connexion dépassé pendant le chargement ${context}",
|
||||
"connectionFailed": "Impossible de se connecter au serveur Plex",
|
||||
"connectionFailed": "Impossible de se connecter au serveur multimédia",
|
||||
"failedToLoad": "Échec du chargement ${context}: ${error}",
|
||||
"noClientAvailable": "Aucun client disponible",
|
||||
"authenticationFailed": "Échec de l'authentification: ${error}",
|
||||
@@ -466,7 +622,9 @@
|
||||
"pleaseEnterToken": "Veuillez saisir un token",
|
||||
"invalidToken": "Token invalide",
|
||||
"failedToVerifyToken": "Échec de la vérification du token: ${error}",
|
||||
"failedToSwitchProfile": "Impossible de changer de profil vers ${displayName}"
|
||||
"failedToSwitchProfile": "Impossible de changer de profil vers ${displayName}",
|
||||
"failedToDeleteProfile": "Impossible de supprimer ${displayName}",
|
||||
"failedToRate": "Impossible de mettre à jour la note"
|
||||
},
|
||||
"libraries": {
|
||||
"title": "Bibliothèques",
|
||||
@@ -483,6 +641,8 @@
|
||||
"analysisStarted": "L'analyse a commencé pour \"${title}\"",
|
||||
"failedToAnalyze": "Échec de l'analyse de la bibliothèque: ${error}",
|
||||
"noLibrariesFound": "Aucune bibliothèque trouvée",
|
||||
"allLibrariesHidden": "Toutes les bibliothèques sont masquées",
|
||||
"hiddenLibrariesCount": "Bibliothèques masquées (${count})",
|
||||
"thisLibraryIsEmpty": "Cette bibliothèque est vide",
|
||||
"all": "Tout",
|
||||
"clearAll": "Tout effacer",
|
||||
@@ -519,17 +679,34 @@
|
||||
"seasons": "Saisons",
|
||||
"episodes": "Épisodes",
|
||||
"folders": "Dossiers"
|
||||
},
|
||||
"filterCategories": {
|
||||
"genre": "Genre",
|
||||
"year": "Année",
|
||||
"contentRating": "Classification",
|
||||
"tag": "Tag"
|
||||
},
|
||||
"sortLabels": {
|
||||
"title": "Titre",
|
||||
"dateAdded": "Date d'ajout",
|
||||
"releaseDate": "Date de sortie",
|
||||
"rating": "Note",
|
||||
"lastPlayed": "Dernière lecture",
|
||||
"playCount": "Lectures",
|
||||
"random": "Aléatoire",
|
||||
"dateShared": "Date de partage",
|
||||
"latestEpisodeAirDate": "Dernière date de diffusion"
|
||||
}
|
||||
},
|
||||
"about": {
|
||||
"title": "À propos",
|
||||
"openSourceLicenses": "Licences Open Source",
|
||||
"versionLabel": "Version ${version}",
|
||||
"appDescription": "Un magnifique client Plex pour Flutter",
|
||||
"appDescription": "Un magnifique client Plex et Jellyfin pour Flutter",
|
||||
"viewLicensesDescription": "Afficher les licences des bibliothèques tierces"
|
||||
},
|
||||
"serverSelection": {
|
||||
"allServerConnectionsFailed": "Impossible de se connecter à un serveur. Veuillez vérifier votre connexion réseau et réessayer.",
|
||||
"allServerConnectionsFailed": "Connexion impossible à tous les serveurs. Vérifiez votre réseau.",
|
||||
"noServersFoundForAccount": "Aucun serveur trouvé pour ${username} (${email})",
|
||||
"failedToLoadServers": "Échec du chargement des serveurs: ${error}"
|
||||
},
|
||||
@@ -566,6 +743,7 @@
|
||||
"reloadGuide": "Recharger le guide",
|
||||
"now": "Maintenant",
|
||||
"today": "Aujourd'hui",
|
||||
"tomorrow": "Demain",
|
||||
"midnight": "Minuit",
|
||||
"overnight": "Nuit",
|
||||
"morning": "Matin",
|
||||
@@ -574,7 +752,46 @@
|
||||
"lateNight": "Nuit tardive",
|
||||
"whatsOn": "En ce moment",
|
||||
"watchChannel": "Regarder la chaîne",
|
||||
"favorites": "Favoris"
|
||||
"favorites": "Favoris",
|
||||
"reorderFavorites": "Réorganiser les favoris",
|
||||
"joinSession": "Rejoindre la session en cours",
|
||||
"watchFromStart": "Regarder depuis le début (il y a ${minutes} min)",
|
||||
"watchLive": "Regarder en direct",
|
||||
"goToLive": "Aller au direct",
|
||||
"record": "Enregistrer",
|
||||
"recordEpisode": "Enregistrer l'épisode",
|
||||
"recordSeries": "Enregistrer la série",
|
||||
"recordOptions": "Options d'enregistrement",
|
||||
"recordings": "Enregistrements",
|
||||
"scheduledRecordings": "Programmés",
|
||||
"recordingRules": "Règles d'enregistrement",
|
||||
"noScheduledRecordings": "Aucun enregistrement programmé",
|
||||
"noRecordingRules": "Aucune règle d'enregistrement",
|
||||
"manageRecording": "Gérer l'enregistrement",
|
||||
"cancelRecording": "Annuler l'enregistrement",
|
||||
"cancelRecordingTitle": "Annuler cet enregistrement ?",
|
||||
"cancelRecordingMessage": "${title} ne sera plus enregistré.",
|
||||
"deleteRule": "Supprimer la règle",
|
||||
"deleteRuleTitle": "Supprimer la règle d'enregistrement ?",
|
||||
"deleteRuleMessage": "Les prochains épisodes de ${title} ne seront pas enregistrés.",
|
||||
"recordingScheduled": "Enregistrement programmé",
|
||||
"alreadyScheduled": "Ce programme est déjà programmé",
|
||||
"dvrAdminRequired": "Les paramètres DVR nécessitent un compte administrateur",
|
||||
"recordingFailed": "Impossible de programmer l'enregistrement",
|
||||
"recordingTargetMissing": "Impossible de déterminer la bibliothèque d'enregistrement",
|
||||
"recordNotAvailable": "Enregistrement non disponible pour ce programme",
|
||||
"recordingCancelled": "Enregistrement annulé",
|
||||
"recordingRuleDeleted": "Règle d'enregistrement supprimée",
|
||||
"processRecordingRules": "Réévaluer les règles",
|
||||
"loadingRecordings": "Chargement des enregistrements...",
|
||||
"recordingInProgress": "Enregistrement en cours",
|
||||
"recordingsCount": "${count} programmés",
|
||||
"editRule": "Modifier la règle",
|
||||
"editRuleAction": "Modifier",
|
||||
"recordingRuleUpdated": "Règle d'enregistrement mise à jour",
|
||||
"guideReloadRequested": "Mise à jour du guide demandée",
|
||||
"rulesProcessRequested": "Réévaluation des règles demandée",
|
||||
"recordShow": "Enregistrer l'émission"
|
||||
},
|
||||
"collections": {
|
||||
"title": "Collections",
|
||||
@@ -582,7 +799,7 @@
|
||||
"empty": "La collection est vide",
|
||||
"unknownLibrarySection": "Impossible de supprimer : section de bibliothèque inconnue",
|
||||
"deleteCollection": "Supprimer la collection",
|
||||
"deleteConfirm": "Êtes-vous sûr de vouloir supprimer \"${title}\" ? Cette action ne peut pas être annulée.",
|
||||
"deleteConfirm": "Supprimer \"${title}\" ? Action irréversible.",
|
||||
"deleted": "Collection supprimée",
|
||||
"deleteFailed": "Échec de la suppression de la collection",
|
||||
"deleteFailedWithError": "Échec de la suppression de la collection: ${error}",
|
||||
@@ -597,7 +814,8 @@
|
||||
"removeFromCollectionConfirm": "Retirer \"${title}\" de cette collection ?",
|
||||
"removedFromCollection": "Retiré de la collection",
|
||||
"removeFromCollectionFailed": "Impossible de supprimer de la collection",
|
||||
"removeFromCollectionError": "Erreur lors de la suppression de la collection: ${error}"
|
||||
"removeFromCollectionError": "Erreur lors de la suppression de la collection: ${error}",
|
||||
"searchCollections": "Rechercher des collections..."
|
||||
},
|
||||
"playlists": {
|
||||
"title": "Playlists",
|
||||
@@ -661,22 +879,32 @@
|
||||
"leave": "Fin",
|
||||
"syncing": "Synchronisation...",
|
||||
"joinWatchSession": "Rejoindre la session de visionnage",
|
||||
"enterCodeHint": "Entrez le code à 8 caractères",
|
||||
"enterCodeHint": "Entrez le code à 5 caractères",
|
||||
"pasteFromClipboard": "Coller depuis le presse-papiers",
|
||||
"pleaseEnterCode": "Veuillez saisir un code de session",
|
||||
"codeMustBe8Chars": "Le code de session doit comporter 8 caractères",
|
||||
"joinInstructions": "Entrez le code de session partagé par l'hôte pour rejoindre sa session de visionnage.",
|
||||
"codeMustBe5Chars": "Le code de session doit comporter 5 caractères",
|
||||
"joinInstructions": "Saisissez le code de session de l'hôte pour rejoindre.",
|
||||
"failedToCreate": "Échec de la création de la session",
|
||||
"failedToJoin": "Échec de la connexion à la session",
|
||||
"sessionCodeCopied": "Code de session copié dans le presse-papiers",
|
||||
"relayUnreachable": "Le serveur relais est inaccessible. Cela peut être dû au blocage de la connexion par votre fournisseur d'accès. Vous pouvez quand même essayer, mais Watch Together pourrait ne pas fonctionner.",
|
||||
"relayUnreachable": "Serveur relay inaccessible. Un blocage ISP peut empêcher Watch Together.",
|
||||
"reconnectingToHost": "Reconnexion à l'hôte...",
|
||||
"currentPlayback": "Lecture en cours",
|
||||
"joinCurrentPlayback": "Rejoindre la lecture en cours",
|
||||
"joinCurrentPlaybackDescription": "Revenez à ce que l'hôte regarde actuellement",
|
||||
"failedToOpenCurrentPlayback": "Impossible d'ouvrir la lecture en cours",
|
||||
"participantJoined": "${name} a rejoint",
|
||||
"participantLeft": "${name} est parti"
|
||||
"participantLeft": "${name} est parti",
|
||||
"participantPaused": "${name} a mis en pause",
|
||||
"participantResumed": "${name} a repris",
|
||||
"participantSeeked": "${name} a avancé",
|
||||
"participantBuffering": "${name} met en mémoire tampon",
|
||||
"waitingForParticipants": "En attente du chargement des autres...",
|
||||
"recentRooms": "Salons récents",
|
||||
"renameRoom": "Renommer le salon",
|
||||
"removeRoom": "Supprimer",
|
||||
"guestSwitchUnavailable": "Impossible de changer — serveur indisponible pour la synchronisation",
|
||||
"guestSwitchFailed": "Impossible de changer — contenu introuvable sur ce serveur"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "Téléchargements",
|
||||
@@ -689,19 +917,59 @@
|
||||
"deleteDownload": "Supprimer le téléchargement",
|
||||
"retryDownload": "Réessayer le téléchargement",
|
||||
"downloadQueued": "Téléchargement en attente",
|
||||
"serverErrorBitrate": "Erreur serveur : le fichier peut dépasser la limite de bitrate distant",
|
||||
"episodesQueued": "${count} épisodes en attente de téléchargement",
|
||||
"downloadDeleted": "Télécharger supprimé",
|
||||
"deleteConfirm": "Êtes-vous sûr de vouloir supprimer \"${title}\" ? Cela supprimera le fichier téléchargé de votre appareil.",
|
||||
"deleteConfirm": "Supprimer \"${title}\" de cet appareil ?",
|
||||
"deletingWithProgress": "Suppression de ${title}... (${current} sur ${total})",
|
||||
"deleting": "Suppression...",
|
||||
"queuedTooltip": "En attente",
|
||||
"queuedFilesTooltip": "En attente : ${files}",
|
||||
"downloadingTooltip": "Téléchargement...",
|
||||
"downloadingFilesTooltip": "Téléchargement de ${files}",
|
||||
"noDownloadsTree": "Aucun téléchargement",
|
||||
"pauseAll": "Tout mettre en pause",
|
||||
"resumeAll": "Tout reprendre",
|
||||
"deleteAll": "Tout supprimer"
|
||||
"deleteAll": "Tout supprimer",
|
||||
"selectVersion": "Sélectionner la version",
|
||||
"allEpisodes": "Tous les épisodes",
|
||||
"unwatchedOnly": "Non vus uniquement",
|
||||
"nextNUnwatched": "${count} prochains non vus",
|
||||
"customAmount": "Quantité personnalisée...",
|
||||
"howManyEpisodes": "Combien d'épisodes ?",
|
||||
"itemsQueued": "${count} éléments mis en file d'attente",
|
||||
"keepSynced": "Garder synchronisé",
|
||||
"downloadOnce": "Télécharger une fois",
|
||||
"keepNUnwatched": "Garder ${count} non vus",
|
||||
"editSyncRule": "Modifier la règle de synchronisation",
|
||||
"removeSyncRule": "Supprimer la règle de synchronisation",
|
||||
"removeSyncRuleConfirm": "Arrêter la synchronisation de « ${title} » ? Les épisodes téléchargés seront conservés.",
|
||||
"syncRuleCreated": "Règle de synchronisation créée — ${count} épisodes non vus conservés",
|
||||
"syncRuleUpdated": "Règle de synchronisation mise à jour",
|
||||
"syncRuleRemoved": "Règle de synchronisation supprimée",
|
||||
"syncedNewEpisodes": "${count} nouveaux épisodes synchronisés pour ${title}",
|
||||
"activeSyncRules": "Règles de synchronisation",
|
||||
"noSyncRules": "Aucune règle de synchronisation",
|
||||
"manageSyncRule": "Gérer la synchronisation",
|
||||
"editEpisodeCount": "Nombre d’épisodes",
|
||||
"editSyncFilter": "Filtre de synchronisation",
|
||||
"syncAllItems": "Synchronisation de tous les éléments",
|
||||
"syncUnwatchedItems": "Synchronisation des éléments non vus",
|
||||
"syncRuleServerContext": "Serveur : ${server} • ${status}",
|
||||
"syncRuleAvailable": "Disponible",
|
||||
"syncRuleOffline": "Hors ligne",
|
||||
"syncRuleSignInRequired": "Connexion requise",
|
||||
"syncRuleNotAvailableForProfile": "Non disponible pour le profil actuel",
|
||||
"syncRuleUnknownServer": "Serveur inconnu",
|
||||
"syncRuleListCreated": "Règle de synchronisation créée"
|
||||
},
|
||||
"shaders": {
|
||||
"title": "Shaders",
|
||||
"noShaderDescription": "Aucune amélioration vidéo",
|
||||
"nvscalerDescription": "Mise à l'échelle NVIDIA pour une vidéo plus nette",
|
||||
"artcnnVariantNeutral": "Neutre",
|
||||
"artcnnVariantDenoise": "Réduction du bruit",
|
||||
"artcnnVariantDenoiseSharpen": "Réduction du bruit + netteté",
|
||||
"qualityFast": "Rapide",
|
||||
"qualityHQ": "Haute qualité",
|
||||
"mode": "Mode",
|
||||
@@ -714,54 +982,36 @@
|
||||
},
|
||||
"companionRemote": {
|
||||
"title": "Télécommande compagnon",
|
||||
"connectToDevice": "Se connecter à un appareil",
|
||||
"hostRemoteSession": "Héberger une session distante",
|
||||
"controlThisDevice": "Contrôlez cet appareil avec votre téléphone",
|
||||
"remoteControl": "Télécommande",
|
||||
"controlDesktop": "Contrôler un appareil de bureau",
|
||||
"connectedTo": "Connecté à ${name}",
|
||||
"session": {
|
||||
"creatingSession": "Création de la session distante...",
|
||||
"failedToCreate": "Échec de la création de la session distante :",
|
||||
"noSession": "Aucune session disponible",
|
||||
"scanQrCode": "Scanner le QR Code",
|
||||
"orEnterManually": "Ou saisir manuellement",
|
||||
"startingServer": "Démarrage du serveur distant...",
|
||||
"failedToCreate": "Échec du démarrage du serveur distant :",
|
||||
"hostAddress": "Adresse de l'hôte",
|
||||
"sessionId": "ID de session",
|
||||
"pin": "PIN",
|
||||
"connected": "Connecté",
|
||||
"waitingForConnection": "En attente de connexion...",
|
||||
"serverRunning": "Serveur distant actif",
|
||||
"serverStopped": "Serveur distant arrêté",
|
||||
"serverRunningDescription": "Les appareils mobiles de votre réseau peuvent se connecter à cette app",
|
||||
"serverStoppedDescription": "Démarrez le serveur pour permettre aux appareils mobiles de se connecter",
|
||||
"usePhoneToControl": "Utilisez votre appareil mobile pour contrôler cette application",
|
||||
"copiedToClipboard": "${label} copié dans le presse-papiers",
|
||||
"copyToClipboard": "Copier dans le presse-papiers",
|
||||
"newSession": "Nouvelle session",
|
||||
"startServer": "Démarrer le serveur",
|
||||
"stopServer": "Arrêter le serveur",
|
||||
"minimize": "Réduire"
|
||||
},
|
||||
"pairing": {
|
||||
"scan": "Scanner",
|
||||
"manual": "Manuel",
|
||||
"pairWithDesktop": "Jumeler avec un bureau",
|
||||
"enterSessionDetails": "Saisissez les détails de la session affichés sur votre appareil de bureau",
|
||||
"discoveryDescription": "Les appareils Plezy avec le même compte Plex apparaissent ici",
|
||||
"hostAddressHint": "192.168.1.100:48632",
|
||||
"sessionIdHint": "Saisissez l'ID de session à 8 caractères",
|
||||
"pinHint": "Saisissez le PIN à 6 chiffres",
|
||||
"connecting": "Connexion...",
|
||||
"tips": "Conseils",
|
||||
"tipDesktop": "Ouvrez Plezy sur votre bureau et activez Companion Remote depuis les paramètres ou le menu",
|
||||
"tipScan": "Utilisez l'onglet Scanner pour jumeler rapidement en scannant le QR code sur votre bureau",
|
||||
"tipWifi": "Assurez-vous que les deux appareils sont sur le même réseau WiFi",
|
||||
"cameraPermissionRequired": "L'autorisation de la caméra est requise pour scanner les QR codes.\nVeuillez accorder l'accès à la caméra dans les paramètres de votre appareil.",
|
||||
"cameraError": "Impossible de démarrer la caméra : ${error}",
|
||||
"scanInstruction": "Pointez votre caméra vers le QR code affiché sur votre bureau",
|
||||
"invalidQrCode": "Format de QR code invalide",
|
||||
"validationHostRequired": "Veuillez saisir l'adresse de l'hôte",
|
||||
"validationHostFormat": "Le format doit être IP:port (ex : 192.168.1.100:48632)",
|
||||
"validationSessionIdRequired": "Veuillez saisir un ID de session",
|
||||
"validationSessionIdLength": "L'ID de session doit contenir 8 caractères",
|
||||
"validationPinRequired": "Veuillez saisir un PIN",
|
||||
"validationPinLength": "Le PIN doit contenir 6 chiffres",
|
||||
"connectionTimedOut": "Délai de connexion expiré. Veuillez vérifier l'ID de session et le PIN.",
|
||||
"sessionNotFound": "Session introuvable. Veuillez vérifier vos identifiants.",
|
||||
"searchingForDevices": "Recherche d'appareils...",
|
||||
"noDevicesFound": "Aucun appareil trouvé sur votre réseau",
|
||||
"noDevicesHint": "Ouvrez Plezy sur ordinateur et utilisez le même WiFi",
|
||||
"availableDevices": "Appareils disponibles",
|
||||
"manualConnection": "Connexion manuelle",
|
||||
"cryptoInitFailed": "Impossible de démarrer la connexion sécurisée. Connectez-vous d'abord à Plex.",
|
||||
"validationHostRequired": "Veuillez entrer l'adresse de l'hôte",
|
||||
"validationHostFormat": "Le format doit être IP:port (ex. 192.168.1.100:48632)",
|
||||
"connectionTimedOut": "Connexion expirée. Utilisez le même réseau sur les deux appareils.",
|
||||
"sessionNotFound": "Appareil introuvable. Assurez-vous que Plezy fonctionne sur l'hôte.",
|
||||
"authFailed": "Échec de l'authentification. Les deux appareils doivent utiliser le même compte Plex.",
|
||||
"failedToConnect": "Échec de la connexion : ${error}"
|
||||
},
|
||||
"remote": {
|
||||
@@ -769,8 +1019,6 @@
|
||||
"reconnecting": "Reconnexion...",
|
||||
"attemptOf": "Tentative ${current} sur 5",
|
||||
"retryNow": "Réessayer maintenant",
|
||||
"connectionError": "Erreur de connexion",
|
||||
"notConnected": "Non connecté",
|
||||
"tabRemote": "Télécommande",
|
||||
"tabPlay": "Lecture",
|
||||
"tabMore": "Plus",
|
||||
@@ -806,13 +1054,14 @@
|
||||
"audioOutput": "Sortie audio",
|
||||
"performanceOverlay": "Superposition de performance",
|
||||
"audioPassthrough": "Audio Pass-Through",
|
||||
"audioNormalization": "Normalisation audio"
|
||||
"audioNormalization": "Normaliser le volume"
|
||||
},
|
||||
"externalPlayer": {
|
||||
"title": "Lecteur externe",
|
||||
"useExternalPlayer": "Utiliser un lecteur externe",
|
||||
"useExternalPlayerDescription": "Ouvrir les vidéos dans une application externe au lieu du lecteur intégré",
|
||||
"useExternalPlayerDescription": "Ouvrir les vidéos dans une autre app",
|
||||
"selectPlayer": "Sélectionner le lecteur",
|
||||
"customPlayers": "Lecteurs personnalisés",
|
||||
"systemDefault": "Par défaut du système",
|
||||
"addCustomPlayer": "Ajouter un lecteur personnalisé",
|
||||
"playerName": "Nom du lecteur",
|
||||
@@ -840,8 +1089,12 @@
|
||||
"summary": "Résumé",
|
||||
"poster": "Affiche",
|
||||
"background": "Arrière-plan",
|
||||
"logo": "Logo",
|
||||
"squareArt": "Image carrée",
|
||||
"selectPoster": "Sélectionner l'affiche",
|
||||
"selectBackground": "Sélectionner l'arrière-plan",
|
||||
"selectLogo": "Sélectionner le logo",
|
||||
"selectSquareArt": "Sélectionner l'image carrée",
|
||||
"fromUrl": "Depuis une URL",
|
||||
"uploadFile": "Importer un fichier",
|
||||
"enterImageUrl": "Entrer l'URL de l'image",
|
||||
@@ -883,6 +1136,124 @@
|
||||
"subtitleMode": "Sélection automatique des sous-titres",
|
||||
"manuallySelected": "Sélectionné manuellement",
|
||||
"shownWithForeignAudio": "Affichés avec audio étranger",
|
||||
"alwaysEnabled": "Toujours activé"
|
||||
"alwaysEnabled": "Toujours activé",
|
||||
"tags": "Tags",
|
||||
"addTag": "Ajouter un tag",
|
||||
"genre": "Genre",
|
||||
"director": "Réalisateur",
|
||||
"writer": "Scénariste",
|
||||
"producer": "Producteur",
|
||||
"country": "Pays",
|
||||
"collection": "Collection",
|
||||
"label": "Label",
|
||||
"style": "Style",
|
||||
"mood": "Ambiance"
|
||||
},
|
||||
"matchScreen": {
|
||||
"match": "Associer...",
|
||||
"fixMatch": "Corriger l'association...",
|
||||
"unmatch": "Dissocier",
|
||||
"unmatchConfirm": "Effacer cette correspondance ? Plex la traitera comme non associée jusqu'à réassociation.",
|
||||
"unmatchSuccess": "Association supprimée",
|
||||
"unmatchFailed": "Échec de la dissociation",
|
||||
"matchApplied": "Association appliquée",
|
||||
"matchFailed": "Échec de l'application",
|
||||
"titleHint": "Titre",
|
||||
"yearHint": "Année",
|
||||
"search": "Rechercher",
|
||||
"noMatchesFound": "Aucune correspondance"
|
||||
},
|
||||
"serverTasks": {
|
||||
"title": "Tâches du serveur",
|
||||
"failedToLoad": "Échec du chargement des tâches",
|
||||
"noTasks": "Aucune tâche en cours"
|
||||
},
|
||||
"trakt": {
|
||||
"title": "Trakt",
|
||||
"connected": "Connecté",
|
||||
"connectedAs": "Connecté en tant que @${username}",
|
||||
"disconnectConfirm": "Déconnecter le compte Trakt ?",
|
||||
"disconnectConfirmBody": "Plezy cessera d'envoyer des événements à Trakt. Vous pouvez reconnecter à tout moment.",
|
||||
"scrobble": "Scrobbling en temps réel",
|
||||
"scrobbleDescription": "Envoyer les événements de lecture, pause et arrêt à Trakt pendant la lecture.",
|
||||
"watchedSync": "Synchroniser le statut « vu »",
|
||||
"watchedSyncDescription": "Lorsque vous marquez un élément comme vu dans Plezy, il l'est aussi sur Trakt."
|
||||
},
|
||||
"trackers": {
|
||||
"title": "Trackers",
|
||||
"hubSubtitle": "Synchronisez la progression de visionnage avec Trakt et d'autres services.",
|
||||
"notConnected": "Non connecté",
|
||||
"connectedAs": "Connecté en tant que @${username}",
|
||||
"scrobble": "Suivre la progression automatiquement",
|
||||
"scrobbleDescription": "Mettre à jour votre liste lorsque vous terminez un épisode ou un film.",
|
||||
"disconnectConfirm": "Déconnecter ${service} ?",
|
||||
"disconnectConfirmBody": "Plezy cessera de mettre à jour ${service}. Reconnectez à tout moment.",
|
||||
"connectFailed": "Échec de la connexion à ${service}. Réessayez.",
|
||||
"services": {
|
||||
"mal": "MyAnimeList",
|
||||
"anilist": "AniList",
|
||||
"simkl": "Simkl"
|
||||
},
|
||||
"deviceCode": {
|
||||
"title": "Activer Plezy sur ${service}",
|
||||
"body": "Rendez-vous sur ${url} et entrez ce code :",
|
||||
"openToActivate": "Ouvrir ${service} pour activer",
|
||||
"waitingForAuthorization": "En attente d'autorisation…",
|
||||
"codeCopied": "Code copié"
|
||||
},
|
||||
"oauthProxy": {
|
||||
"title": "Se connecter à ${service}",
|
||||
"body": "Scannez ce code QR ou ouvrez l'URL sur n'importe quel appareil.",
|
||||
"openToSignIn": "Ouvrir ${service} pour se connecter",
|
||||
"urlCopied": "URL copiée"
|
||||
},
|
||||
"libraryFilter": {
|
||||
"title": "Filtre de bibliothèques",
|
||||
"subtitleAllSyncing": "Synchronisation de toutes les bibliothèques",
|
||||
"subtitleNoneSyncing": "Aucune synchronisation",
|
||||
"subtitleBlocked": "${count} bloquées",
|
||||
"subtitleAllowed": "${count} autorisées",
|
||||
"mode": "Mode de filtrage",
|
||||
"modeBlacklist": "Liste noire",
|
||||
"modeWhitelist": "Liste blanche",
|
||||
"modeHintBlacklist": "Synchroniser toutes les bibliothèques sauf celles cochées ci-dessous.",
|
||||
"modeHintWhitelist": "Synchroniser uniquement les bibliothèques cochées ci-dessous.",
|
||||
"libraries": "Bibliothèques",
|
||||
"noLibraries": "Aucune bibliothèque disponible"
|
||||
}
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Ajouter un serveur Jellyfin",
|
||||
"jellyfinUrlIntro": "Saisissez l'URL du serveur, par ex. `https://jellyfin.example.com`.",
|
||||
"serverUrl": "URL du serveur",
|
||||
"findServer": "Rechercher un serveur",
|
||||
"username": "Nom d'utilisateur",
|
||||
"password": "Mot de passe",
|
||||
"signIn": "Se connecter",
|
||||
"change": "Modifier",
|
||||
"required": "Requis",
|
||||
"couldNotReachServer": "Impossible de joindre le serveur : ${error}",
|
||||
"signInFailed": "Échec de la connexion : ${error}",
|
||||
"quickConnectFailed": "Échec de Quick Connect : ${error}",
|
||||
"addPlexTitle": "Se connecter avec Plex",
|
||||
"plexAuthIntro": "Connectez-vous avec un navigateur ou un code QR.",
|
||||
"plexQRPrompt": "Scannez ce QR code pour vous connecter.",
|
||||
"waitingForPlexConfirmation": "En attente de la confirmation de plex.tv…",
|
||||
"pinExpired": "Le PIN a expiré avant la connexion. Veuillez réessayer.",
|
||||
"duplicatePlexAccount": "Déjà connecté à Plex. Déconnectez-vous pour changer de compte.",
|
||||
"failedToRegisterAccount": "Échec de l'enregistrement du compte : ${error}",
|
||||
"enterJellyfinUrlError": "Saisissez l'URL de votre serveur Jellyfin",
|
||||
"addConnectionTitle": "Ajouter une connexion",
|
||||
"addConnectionTitleScoped": "Ajouter à ${name}",
|
||||
"addConnectionIntroGlobal": "Ajoutez un autre serveur multimédia. Plex et Jellyfin apparaissent ensemble sur Accueil.",
|
||||
"addConnectionIntroScoped": "Ajoutez un nouveau serveur, ou empruntez-en un à un autre profil.",
|
||||
"signInWithPlexCard": "Se connecter avec Plex",
|
||||
"signInWithPlexCardSubtitle": "Autorisez cet appareil. Les serveurs partagés sont ajoutés.",
|
||||
"signInWithPlexCardSubtitleScoped": "Autorisez un compte Plex. Les utilisateurs Home deviennent des profils.",
|
||||
"connectToJellyfinCard": "Se connecter à Jellyfin",
|
||||
"connectToJellyfinCardSubtitle": "Saisissez l'URL du serveur, le nom d'utilisateur et le mot de passe.",
|
||||
"connectToJellyfinCardSubtitleScoped": "Connectez-vous à un serveur Jellyfin. Lié à ${name}.",
|
||||
"borrowFromAnotherProfile": "Emprunter à un autre profil",
|
||||
"borrowFromAnotherProfileSubtitle": "Réutiliser la connexion d'un autre profil. Les profils protégés par PIN exigent un PIN."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,13 +3,22 @@
|
||||
"title": "Plezy"
|
||||
},
|
||||
"auth": {
|
||||
"signIn": "Accedi",
|
||||
"signInWithPlex": "Accedi con Plex",
|
||||
"showQRCode": "Mostra QR Code",
|
||||
"authenticate": "Autenticazione",
|
||||
"authenticationTimeout": "Autenticazione scaduta. Riprova.",
|
||||
"scanQRToSignIn": "Scansiona il QR code per accedere",
|
||||
"waitingForAuth": "In attesa di autenticazione...\nCompleta l'accesso dal tuo browser.",
|
||||
"useBrowser": "Usa browser"
|
||||
"waitingForAuth": "In attesa di autenticazione...\nAccedi dal browser.",
|
||||
"useBrowser": "Usa browser",
|
||||
"or": "o",
|
||||
"connectToJellyfin": "Connetti a Jellyfin",
|
||||
"useQuickConnect": "Usa Quick Connect",
|
||||
"quickConnectCode": "Codice Quick Connect",
|
||||
"quickConnectInstructions": "Apri Quick Connect in Jellyfin e inserisci questo codice.",
|
||||
"quickConnectWaiting": "In attesa di approvazione…",
|
||||
"quickConnectCancel": "Annulla",
|
||||
"quickConnectExpired": "Quick Connect scaduto. Riprova."
|
||||
},
|
||||
"common": {
|
||||
"cancel": "Cancella",
|
||||
@@ -30,7 +39,6 @@
|
||||
"shuffle": "Casuale",
|
||||
"addTo": "Aggiungi a...",
|
||||
"createNew": "Crea",
|
||||
"paste": "Incolla",
|
||||
"connect": "Connetti",
|
||||
"disconnect": "Disconnetti",
|
||||
"play": "Riproduci",
|
||||
@@ -44,16 +52,17 @@
|
||||
"mute": "Muto",
|
||||
"ok": "OK",
|
||||
"reconnect": "Riconnetti",
|
||||
"exitConfirmTitle": "Uscire dall'app?",
|
||||
"exitConfirmMessage": "Sei sicuro di voler uscire?",
|
||||
"dontAskAgain": "Non chiedere più",
|
||||
"exit": "Esci",
|
||||
"viewAll": "Mostra tutto",
|
||||
"checkingNetwork": "Verifica rete...",
|
||||
"refreshingServers": "Aggiornamento server...",
|
||||
"loadingServers": "Caricamento server...",
|
||||
"connectingToServers": "Connessione ai server...",
|
||||
"startingOfflineMode": "Avvio modalità offline..."
|
||||
"startingOfflineMode": "Avvio modalità offline...",
|
||||
"loading": "Caricamento...",
|
||||
"fullscreen": "Schermo intero",
|
||||
"exitFullscreen": "Esci da schermo intero",
|
||||
"pressBackAgainToExit": "Premi di nuovo indietro per uscire"
|
||||
},
|
||||
"screens": {
|
||||
"licenses": "Licenze",
|
||||
@@ -73,18 +82,18 @@
|
||||
},
|
||||
"settings": {
|
||||
"title": "Impostazioni",
|
||||
"supportDeveloper": "Supporta Plezy",
|
||||
"supportDeveloperDescription": "Dona tramite Liberapay per finanziare lo sviluppo",
|
||||
"language": "Lingua",
|
||||
"theme": "Tema",
|
||||
"appearance": "Aspetto",
|
||||
"videoPlayback": "Riproduzione video",
|
||||
"videoPlaybackDescription": "Configura il comportamento di riproduzione",
|
||||
"advanced": "Avanzate",
|
||||
"episodePosterMode": "Stile poster episodio",
|
||||
"seriesPoster": "Poster della serie",
|
||||
"seriesPosterDescription": "Mostra il poster della serie per tutti gli episodi",
|
||||
"seasonPoster": "Poster della stagione",
|
||||
"seasonPosterDescription": "Mostra il poster specifico della stagione per gli episodi",
|
||||
"episodeThumbnail": "Miniatura episodio",
|
||||
"episodeThumbnailDescription": "Mostra miniature 16:9 degli episodi",
|
||||
"episodeThumbnail": "Miniatura",
|
||||
"showHeroSectionDescription": "Visualizza il carosello dei contenuti in primo piano sulla schermata iniziale",
|
||||
"secondsLabel": "Secondi",
|
||||
"minutesLabel": "Minuti",
|
||||
@@ -92,63 +101,65 @@
|
||||
"minutesShort": "m",
|
||||
"durationHint": "Inserisci durata (${min}-${max})",
|
||||
"systemTheme": "Sistema",
|
||||
"systemThemeDescription": "Segui le impostazioni di sistema",
|
||||
"lightTheme": "Chiaro",
|
||||
"darkTheme": "Scuro",
|
||||
"oledTheme": "OLED",
|
||||
"oledThemeDescription": "Nero puro per schermi OLED",
|
||||
"libraryDensity": "Densità libreria",
|
||||
"compact": "Compatta",
|
||||
"compactDescription": "Schede più piccole, più elementi visibili",
|
||||
"normal": "Normale",
|
||||
"normalDescription": "Dimensione predefinita",
|
||||
"comfortable": "Comoda",
|
||||
"comfortableDescription": "Schede più grandi, meno elementi visibili",
|
||||
"viewMode": "Modalità di visualizzazione",
|
||||
"gridView": "Griglia",
|
||||
"gridViewDescription": "Visualizza gli elementi in un layout a griglia",
|
||||
"listView": "Elenco",
|
||||
"listViewDescription": "Visualizza gli elementi in un layout a elenco",
|
||||
"showHeroSection": "Mostra sezione principale",
|
||||
"useGlobalHubs": "Usa layout Home di Plex",
|
||||
"useGlobalHubsDescription": "Mostra gli hub della home page come il client Plex ufficiale. Se disattivato, mostra invece i suggerimenti per libreria.",
|
||||
"useGlobalHubs": "Usa layout home",
|
||||
"useGlobalHubsDescription": "Mostra hub Home unificati. Altrimenti usa i consigli della libreria.",
|
||||
"showServerNameOnHubs": "Mostra nome server sugli hub",
|
||||
"showServerNameOnHubsDescription": "Mostra sempre il nome del server nei titoli degli hub. Se disattivato, solo per nomi hub duplicati.",
|
||||
"showServerNameOnHubsDescription": "Mostra sempre i nomi dei server nei titoli degli hub.",
|
||||
"groupLibrariesByServer": "Raggruppa librerie per server",
|
||||
"groupLibrariesByServerDescription": "Raggruppa le librerie laterali per server multimediale.",
|
||||
"alwaysKeepSidebarOpen": "Mantieni sempre aperta la barra laterale",
|
||||
"alwaysKeepSidebarOpenDescription": "La barra laterale rimane espansa e l'area del contenuto si adatta",
|
||||
"showUnwatchedCount": "Mostra conteggio non visti",
|
||||
"showUnwatchedCountDescription": "Mostra il numero di episodi non visti per serie e stagioni",
|
||||
"showEpisodeNumberOnCards": "Mostra numero episodio sulle schede",
|
||||
"showEpisodeNumberOnCardsDescription": "Mostra stagione ed episodio sulle schede episodio",
|
||||
"showSeasonPostersOnTabs": "Mostra poster delle stagioni sulle schede",
|
||||
"showSeasonPostersOnTabsDescription": "Mostra il poster di ogni stagione sopra la sua scheda",
|
||||
"hideSpoilers": "Nascondi spoiler per episodi non visti",
|
||||
"hideSpoilersDescription": "Sfoca le miniature e nascondi le descrizioni degli episodi che non hai ancora guardato",
|
||||
"hideSpoilersDescription": "Sfoca miniature e descrizioni degli episodi non visti",
|
||||
"playerBackend": "Motore di riproduzione",
|
||||
"exoPlayer": "ExoPlayer (Consigliato)",
|
||||
"exoPlayerDescription": "Lettore nativo Android con migliore supporto hardware",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "Lettore avanzato con più funzionalità e supporto sottotitoli ASS",
|
||||
"hardwareDecoding": "Decodifica Hardware",
|
||||
"hardwareDecodingDescription": "Utilizza l'accelerazione hardware quando disponibile",
|
||||
"bufferSize": "Dimensione buffer",
|
||||
"bufferSizeMB": "${size}MB",
|
||||
"bufferSizeAuto": "Auto (Consigliato)",
|
||||
"bufferSizeWarning": "Il tuo dispositivo ha ${heap}MB di memoria. Un buffer di ${size}MB potrebbe causare problemi di riproduzione.",
|
||||
"bufferSizeWarning": "${heap}MB di memoria disponibile. Un buffer di ${size}MB può influire sulla riproduzione.",
|
||||
"defaultQualityTitle": "Qualità predefinita",
|
||||
"defaultQualityDescription": "Utilizzato all'avvio della riproduzione. Valori più bassi riducono la larghezza di banda.",
|
||||
"subtitleStyling": "Stile sottotitoli",
|
||||
"subtitleStylingDescription": "Personalizza l'aspetto dei sottotitoli",
|
||||
"smallSkipDuration": "Durata skip breve",
|
||||
"largeSkipDuration": "Durata skip lungo",
|
||||
"rewindOnResume": "Riavvolgi alla ripresa",
|
||||
"rewindOnResumeDescription": "Riavvolgi di questa quantità alla ripresa della riproduzione",
|
||||
"secondsUnit": "${seconds} secondi",
|
||||
"defaultSleepTimer": "Timer spegnimento predefinito",
|
||||
"minutesUnit": "${minutes} minuti",
|
||||
"rememberTrackSelections": "Ricorda selezioni tracce per serie/film",
|
||||
"rememberTrackSelectionsDescription": "Salva automaticamente le preferenze delle lingue audio e sottotitoli quando cambi tracce durante la riproduzione",
|
||||
"rememberTrackSelectionsDescription": "Ricorda scelte audio e sottotitoli per titolo",
|
||||
"showChapterMarkersOnTimeline": "Mostra i marcatori dei capitoli sulla barra di avanzamento",
|
||||
"showChapterMarkersOnTimelineDescription": "Segmenta la barra di avanzamento ai confini dei capitoli",
|
||||
"clickVideoTogglesPlayback": "Fai clic sul video per avviare o mettere in pausa la riproduzione.",
|
||||
"clickVideoTogglesPlaybackDescription": "Se questa opzione è abilitata, facendo clic sul lettore video la riproduzione verrà avviata o messa in pausa. In caso contrario, facendo clic verranno mostrati o nascosti i controlli di riproduzione.",
|
||||
"clickVideoTogglesPlaybackDescription": "Clicca sul video per riprodurre/mettere in pausa invece di mostrare i controlli.",
|
||||
"videoPlayerControls": "Controlli del lettore video",
|
||||
"keyboardShortcuts": "Scorciatoie da tastiera",
|
||||
"keyboardShortcutsDescription": "Personalizza le scorciatoie da tastiera",
|
||||
"videoPlayerNavigation": "Navigazione del lettore video",
|
||||
"videoPlayerNavigationDescription": "Usa i tasti freccia per navigare nei controlli del lettore video",
|
||||
"watchTogetherRelay": "Relay Guarda Insieme",
|
||||
"watchTogetherRelayDescription": "Imposta un relay personalizzato. Tutti devono usare lo stesso server.",
|
||||
"watchTogetherRelayHint": "https://mio-relay.esempio.it",
|
||||
"crashReporting": "Segnalazione errori",
|
||||
"crashReportingDescription": "Invia segnalazioni di errori per migliorare l'app",
|
||||
"debugLogging": "Log di debug",
|
||||
@@ -156,17 +167,31 @@
|
||||
"viewLogs": "Visualizza log",
|
||||
"viewLogsDescription": "Visualizza i log dell'applicazione",
|
||||
"clearCache": "Svuota cache",
|
||||
"clearCacheDescription": "Questa opzione cancellerà tutte le immagini e i dati memorizzati nella cache. Dopo aver cancellato la cache, l'app potrebbe impiegare più tempo per caricare i contenuti.",
|
||||
"clearCacheDescription": "Cancella immagini e dati in cache. Il contenuto può caricarsi più lentamente.",
|
||||
"clearCacheSuccess": "Cache cancellata correttamente",
|
||||
"resetSettings": "Ripristina impostazioni",
|
||||
"resetSettingsDescription": "Questa opzione ripristinerà tutte le impostazioni ai valori predefiniti. Non può essere annullata.",
|
||||
"resetSettingsDescription": "Ripristina impostazioni predefinite. Non si può annullare.",
|
||||
"resetSettingsSuccess": "Impostazioni ripristinate correttamente",
|
||||
"backup": "Backup",
|
||||
"exportSettings": "Esporta impostazioni",
|
||||
"exportSettingsDescription": "Salva le tue preferenze in un file",
|
||||
"exportSettingsSuccess": "Impostazioni esportate",
|
||||
"exportSettingsFailed": "Impossibile esportare le impostazioni",
|
||||
"importSettings": "Importa impostazioni",
|
||||
"importSettingsDescription": "Ripristina le preferenze da un file",
|
||||
"importSettingsConfirm": "Questa azione sostituirà le impostazioni attuali. Continuare?",
|
||||
"importSettingsSuccess": "Impostazioni importate",
|
||||
"importSettingsFailed": "Impossibile importare le impostazioni",
|
||||
"importSettingsInvalidFile": "Questo file non è un'esportazione Plezy valida",
|
||||
"importSettingsNoUser": "Accedi prima di importare le impostazioni",
|
||||
"shortcutsReset": "Scorciatoie ripristinate alle impostazioni predefinite",
|
||||
"about": "Informazioni",
|
||||
"aboutDescription": "Informazioni sull'app e le licenze",
|
||||
"updates": "Aggiornamenti",
|
||||
"updateAvailable": "Aggiornamento disponibile",
|
||||
"checkForUpdates": "Controlla aggiornamenti",
|
||||
"autoCheckUpdatesOnStartup": "Controlla automaticamente gli aggiornamenti all'avvio",
|
||||
"autoCheckUpdatesOnStartupDescription": "Avvisa all'avvio quando è disponibile un aggiornamento",
|
||||
"validationErrorEnterNumber": "Inserisci un numero valido",
|
||||
"validationErrorDuration": "la durata deve essere compresa tra ${min} e ${max} ${unit}",
|
||||
"shortcutAlreadyAssigned": "Scorciatoia già assegnata a ${action}",
|
||||
@@ -176,6 +201,8 @@
|
||||
"autoSkipIntroDescription": "Salta automaticamente i marcatori dell'intro dopo alcuni secondi",
|
||||
"autoSkipCredits": "Salta Crediti Automaticamente",
|
||||
"autoSkipCreditsDescription": "Salta automaticamente i crediti e riproduci l'episodio successivo",
|
||||
"forceSkipMarkerFallback": "Forza marcatori fallback",
|
||||
"forceSkipMarkerFallbackDescription": "Usa pattern dei titoli dei capitoli anche se Plex ha marcatori",
|
||||
"autoSkipDelay": "Ritardo Salto Automatico",
|
||||
"autoSkipDelayDescription": "Aspetta ${seconds} secondi prima del salto automatico",
|
||||
"introPattern": "Pattern marcatore intro",
|
||||
@@ -196,26 +223,52 @@
|
||||
"downloadLocationSelectError": "Impossibile selezionare la cartella",
|
||||
"downloadOnWifiOnly": "Scarica solo con WiFi",
|
||||
"downloadOnWifiOnlyDescription": "Impedisci i download quando si utilizza la rete dati cellulare",
|
||||
"cellularDownloadBlocked": "I download sono disabilitati sulla rete dati cellulare. Connettiti al WiFi o modifica l'impostazione.",
|
||||
"autoRemoveWatchedDownloads": "Rimuovi automaticamente i download visti",
|
||||
"autoRemoveWatchedDownloadsDescription": "Elimina automaticamente i download già visti",
|
||||
"cellularDownloadBlocked": "I download sono bloccati su rete mobile. Usa WiFi o cambia impostazione.",
|
||||
"maxVolume": "Volume massimo",
|
||||
"maxVolumeDescription": "Consenti volume superiore al 100% per contenuti audio bassi",
|
||||
"maxVolumePercent": "${percent}%",
|
||||
"discordRichPresence": "Discord Rich Presence",
|
||||
"discordRichPresenceDescription": "Mostra su Discord cosa stai guardando",
|
||||
"trakt": "Trakt",
|
||||
"traktDescription": "Sincronizza la cronologia di visione con Trakt",
|
||||
"trackers": "Tracker",
|
||||
"trackersDescription": "Sincronizza i progressi con Trakt, MyAnimeList, AniList e Simkl",
|
||||
"companionRemoteServer": "Server telecomando",
|
||||
"companionRemoteServerDescription": "Consenti ai dispositivi mobili nella tua rete di controllare questa app",
|
||||
"autoPip": "Picture-in-Picture automatico",
|
||||
"autoPipDescription": "Attiva automaticamente il picture-in-picture quando si esce dall'app durante la riproduzione",
|
||||
"autoPipDescription": "Entra in picture-in-picture uscendo durante la riproduzione",
|
||||
"matchContentFrameRate": "Adatta frequenza fotogrammi",
|
||||
"matchContentFrameRateDescription": "Regola la frequenza di aggiornamento del display in base al contenuto video, riducendo i tremolii e risparmiando batteria",
|
||||
"matchContentFrameRateDescription": "Adatta la frequenza del display al contenuto video",
|
||||
"matchRefreshRate": "Adatta frequenza di aggiornamento",
|
||||
"matchRefreshRateDescription": "Adatta la frequenza del display a schermo intero",
|
||||
"matchDynamicRange": "Adatta gamma dinamica",
|
||||
"matchDynamicRangeDescription": "Attiva HDR per contenuti HDR, poi torna a SDR",
|
||||
"displaySwitchDelay": "Ritardo cambio display",
|
||||
"tunneledPlayback": "Riproduzione tunnelizzata",
|
||||
"tunneledPlaybackDescription": "Usa il tunneling video accelerato dall'hardware. Disattiva se vedi uno schermo nero con audio su contenuti HDR",
|
||||
"tunneledPlaybackDescription": "Usa tunneling video. Disattiva se la riproduzione HDR mostra video nero.",
|
||||
"requireProfileSelectionOnOpen": "Chiedi profilo all'apertura",
|
||||
"requireProfileSelectionOnOpenDescription": "Mostra la selezione del profilo ogni volta che l'app viene aperta",
|
||||
"confirmExitOnBack": "Conferma prima di uscire",
|
||||
"confirmExitOnBackDescription": "Mostra una finestra di conferma quando si preme indietro per uscire dall'app",
|
||||
"forceTvMode": "Forza modalità TV",
|
||||
"forceTvModeDescription": "Forza layout TV. Per dispositivi non rilevati automaticamente. Richiede riavvio.",
|
||||
"startInFullscreen": "Avvia a schermo intero",
|
||||
"startInFullscreenDescription": "Apri Plezy a schermo intero all'avvio",
|
||||
"autoHidePerformanceOverlay": "Nascondi automaticamente overlay prestazioni",
|
||||
"autoHidePerformanceOverlayDescription": "Dissolvi l'overlay prestazioni con i controlli di riproduzione",
|
||||
"showNavBarLabels": "Mostra etichette barra di navigazione",
|
||||
"showNavBarLabelsDescription": "Mostra le etichette sotto le icone della barra di navigazione",
|
||||
"liveTvDefaultFavorites": "Canali preferiti predefiniti",
|
||||
"liveTvDefaultFavoritesDescription": "Mostra solo i canali preferiti all'apertura della TV dal vivo"
|
||||
"liveTvDefaultFavoritesDescription": "Mostra solo i canali preferiti all'apertura della TV dal vivo",
|
||||
"display": "Schermo",
|
||||
"homeScreen": "Schermata Home",
|
||||
"navigation": "Navigazione",
|
||||
"window": "Finestra",
|
||||
"content": "Contenuti",
|
||||
"player": "Lettore",
|
||||
"subtitlesAndConfig": "Sottotitoli e configurazione",
|
||||
"seekAndTiming": "Ricerca e tempistica",
|
||||
"behavior": "Comportamento"
|
||||
},
|
||||
"search": {
|
||||
"hint": "Cerca film. spettacoli, musica...",
|
||||
@@ -239,6 +292,8 @@
|
||||
"subtitleTrackNext": "Sottotitoli successivi",
|
||||
"chapterNext": "Capitolo successivo",
|
||||
"chapterPrevious": "Capitolo precedente",
|
||||
"episodeNext": "Episodio successivo",
|
||||
"episodePrevious": "Episodio precedente",
|
||||
"speedIncrease": "Aumenta velocità",
|
||||
"speedDecrease": "Diminuisci velocità",
|
||||
"speedReset": "Ripristina velocità",
|
||||
@@ -266,6 +321,8 @@
|
||||
"colorPrimaries": "Colori primari",
|
||||
"chromaSubsampling": "Sottocampionamento cromatico",
|
||||
"channels": "Canali",
|
||||
"subtitles": "Sottotitoli",
|
||||
"overallBitrate": "Bitrate complessivo",
|
||||
"path": "Percorso",
|
||||
"size": "Dimensione",
|
||||
"container": "Contenitore",
|
||||
@@ -282,11 +339,13 @@
|
||||
"shufflePlay": "Riproduzione casuale",
|
||||
"fileInfo": "Info sul file",
|
||||
"deleteFromServer": "Elimina dal server",
|
||||
"confirmDelete": "Questo eliminerà permanentemente questo contenuto e i suoi file dal tuo server. Questa azione non può essere annullata.",
|
||||
"confirmDelete": "Eliminare questo media e i suoi file dal server?",
|
||||
"deleteMultipleWarning": "Questo include tutti gli episodi e i loro file.",
|
||||
"mediaDeletedSuccessfully": "Elemento multimediale eliminato con successo",
|
||||
"mediaFailedToDelete": "Impossibile eliminare l'elemento multimediale",
|
||||
"rate": "Valuta"
|
||||
"rate": "Valuta",
|
||||
"playFromBeginning": "Riproduci dall'inizio",
|
||||
"playVersion": "Riproduci versione..."
|
||||
},
|
||||
"accessibility": {
|
||||
"mediaCardMovie": "${title}, film",
|
||||
@@ -339,6 +398,13 @@
|
||||
"tracksButton": "Audio e sottotitoli",
|
||||
"chaptersButton": "Capitoli",
|
||||
"versionsButton": "Versioni video",
|
||||
"versionQualityButton": "Versione e qualità",
|
||||
"versionColumnHeader": "Versione",
|
||||
"qualityColumnHeader": "Qualità",
|
||||
"qualityOriginal": "Originale",
|
||||
"qualityPresetLabel": "${resolution}p ${bitrate} Mbps",
|
||||
"qualityBandwidthEstimate": "~${bitrate} Mbps",
|
||||
"transcodeUnavailableFallback": "Transcodifica non disponibile — riproduzione in qualità originale",
|
||||
"pipButton": "Modalità Picture-in-Picture",
|
||||
"aspectRatioButton": "Proporzioni",
|
||||
"ambientLighting": "Illuminazione ambientale",
|
||||
@@ -347,7 +413,6 @@
|
||||
"alwaysOnTopButton": "Sempre in primo piano",
|
||||
"rotationLockButton": "Blocco rotazione",
|
||||
"lockScreen": "Blocca schermo",
|
||||
"unlockScreen": "Sblocca schermo",
|
||||
"screenLockButton": "Blocco schermo",
|
||||
"longPressToUnlock": "Premi a lungo per sbloccare",
|
||||
"timelineSlider": "Timeline video",
|
||||
@@ -358,7 +423,7 @@
|
||||
"pipErrors": {
|
||||
"androidVersion": "Richiede Android 8.0 o versioni successive",
|
||||
"iosVersion": "Richiede iOS 15.0 o versioni successive",
|
||||
"permissionDisabled": "L'autorizzazione Picture-in-Picture è disabilitata. Abilitala in Impostazioni > App > Plezy > Picture-in-Picture",
|
||||
"permissionDisabled": "Picture-in-picture è disattivato. Attivalo nelle impostazioni di sistema.",
|
||||
"notSupported": "Questo dispositivo non supporta la modalità Picture-in-Picture",
|
||||
"voSwitchFailed": "Impossibile cambiare l'uscita video per Picture-in-Picture",
|
||||
"failed": "Impossibile avviare la modalità Picture-in-Picture",
|
||||
@@ -367,7 +432,13 @@
|
||||
"chapters": "Capitoli",
|
||||
"noChaptersAvailable": "Nessun capitolo disponibile",
|
||||
"queue": "Coda",
|
||||
"noQueueItems": "Nessun elemento in coda"
|
||||
"noQueueItems": "Nessun elemento in coda",
|
||||
"searchSubtitles": "Cerca sottotitoli",
|
||||
"language": "Lingua",
|
||||
"noSubtitlesFound": "Nessun sottotitolo trovato",
|
||||
"subtitleDownloaded": "Sottotitolo scaricato",
|
||||
"subtitleDownloadFailed": "Impossibile scaricare il sottotitolo",
|
||||
"searchLanguages": "Cerca lingue..."
|
||||
},
|
||||
"userStatus": {
|
||||
"admin": "Admin",
|
||||
@@ -380,6 +451,7 @@
|
||||
"markedAsUnwatched": "Segna come non visto",
|
||||
"markedAsWatchedOffline": "Segnato come visto (sincronizzato online)",
|
||||
"markedAsUnwatchedOffline": "Segnato come non visto (sincronizzato online)",
|
||||
"autoRemovedWatchedDownload": "Rimosso automaticamente: ${title}",
|
||||
"removedFromContinueWatching": "Rimosso da Continua a guardare",
|
||||
"errorLoading": "Errore: ${error}",
|
||||
"fileInfoNotAvailable": "Informazioni sul file non disponibili",
|
||||
@@ -387,6 +459,10 @@
|
||||
"errorLoadingSeries": "Errore caricamento serie",
|
||||
"errorLoadingSeason": "Errore caricamento stagione",
|
||||
"musicNotSupported": "La riproduzione musicale non è ancora supportata",
|
||||
"noDescriptionAvailable": "Nessuna descrizione disponibile",
|
||||
"noProfilesAvailable": "Nessun profilo disponibile",
|
||||
"contactAdminForProfiles": "Contatta l'amministratore del server per aggiungere profili",
|
||||
"unableToDetermineLibrarySection": "Impossibile determinare la sezione della libreria per questo elemento",
|
||||
"logsCleared": "Log eliminati",
|
||||
"logsCopied": "Log copiati negli appunti",
|
||||
"noLogsAvailable": "Nessun log disponibile",
|
||||
@@ -406,19 +482,26 @@
|
||||
"failedToCreatePlayQueueNoItems": "Impossibile creare la coda di riproduzione - nessun elemento",
|
||||
"failedPlayback": "Impossibile ${action}: ${error}",
|
||||
"switchingToCompatiblePlayer": "Passaggio al lettore compatibile...",
|
||||
"serverLimitTitle": "Riproduzione non riuscita",
|
||||
"serverLimitBody": "Errore server (HTTP 500). Un limite di banda/transcodifica probabilmente ha rifiutato questa sessione. Chiedi al proprietario di modificarlo.",
|
||||
"logsUploaded": "Log caricati",
|
||||
"logsUploadFailed": "Caricamento log fallito",
|
||||
"logId": "ID log"
|
||||
},
|
||||
"subtitlingStyling": {
|
||||
"stylingOptions": "Opzioni stile",
|
||||
"text": "Testo",
|
||||
"border": "Bordo",
|
||||
"background": "Sfondo",
|
||||
"fontSize": "Dimensione",
|
||||
"textColor": "Colore testo",
|
||||
"borderSize": "Dimensione bordo",
|
||||
"borderColor": "Colore bordo",
|
||||
"backgroundOpacity": "Opacità sfondo",
|
||||
"backgroundColor": "Colore sfondo",
|
||||
"position": "Posizione"
|
||||
"position": "Posizione",
|
||||
"assOverride": "Sovrascrittura ASS",
|
||||
"bold": "Grassetto",
|
||||
"italic": "Corsivo"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "Configurazione mpv",
|
||||
@@ -439,12 +522,85 @@
|
||||
"dialog": {
|
||||
"confirmAction": "Conferma azione"
|
||||
},
|
||||
"profiles": {
|
||||
"addPlezyProfile": "Aggiungi profilo Plezy",
|
||||
"switchingProfile": "Cambio profilo…",
|
||||
"deleteThisProfileTitle": "Eliminare questo profilo?",
|
||||
"deleteThisProfileMessage": "Rimuovi ${displayName}. Le connessioni non sono interessate.",
|
||||
"active": "Attivo",
|
||||
"manage": "Gestisci",
|
||||
"delete": "Elimina",
|
||||
"signOut": "Esci",
|
||||
"signOutPlexTitle": "Uscire da Plex?",
|
||||
"signOutPlexMessage": "Rimuovere ${displayName} e tutti gli utenti Plex Home? Puoi accedere di nuovo quando vuoi.",
|
||||
"signedOutPlex": "Uscito da Plex.",
|
||||
"signOutFailed": "Uscita non riuscita.",
|
||||
"sectionTitle": "Profili",
|
||||
"summarySingle": "Aggiungi profili per combinare utenti gestiti e identità locali",
|
||||
"summaryMultipleWithActive": "${count} profili · attivo: ${activeName}",
|
||||
"summaryMultiple": "${count} profili",
|
||||
"removeConnectionTitle": "Rimuovere la connessione?",
|
||||
"removeConnectionMessage": "Rimuovi l'accesso di ${displayName} a ${connectionLabel}. Gli altri profili lo mantengono.",
|
||||
"deleteProfileTitle": "Eliminare il profilo?",
|
||||
"deleteProfileMessage": "Rimuovi ${displayName} e le sue connessioni. I server restano disponibili.",
|
||||
"profileNameLabel": "Nome profilo",
|
||||
"pinProtectionLabel": "Protezione PIN",
|
||||
"pinManagedByPlex": "PIN gestito da Plex. Modifica su plex.tv.",
|
||||
"noPinSetEditOnPlex": "Nessun PIN impostato. Per richiederne uno, modifica l'utente Home su plex.tv.",
|
||||
"setPin": "Imposta PIN",
|
||||
"setPinTitle": "Imposta PIN",
|
||||
"confirmPinTitle": "Conferma PIN",
|
||||
"pinSet": "PIN impostato",
|
||||
"changePin": "Cambia",
|
||||
"removePin": "Rimuovi",
|
||||
"connectionsLabel": "Connessioni",
|
||||
"add": "Aggiungi",
|
||||
"deleteProfileButton": "Elimina profilo",
|
||||
"noConnectionsHint": "Nessuna connessione — aggiungine una per usare questo profilo.",
|
||||
"noConnections": "Nessuna connessione",
|
||||
"plexHomeAccount": "Account Plex Home",
|
||||
"connectionDefault": "Predefinita",
|
||||
"connectionAs": "come ${displayName}",
|
||||
"makeDefault": "Imposta come predefinita",
|
||||
"removeConnection": "Rimuovi",
|
||||
"profileRenamed": "Profilo rinominato.",
|
||||
"borrowAddTo": "Aggiungi a ${displayName}",
|
||||
"borrowExplain": "Prendi in prestito la connessione di un altro profilo. I profili protetti da PIN richiedono un PIN.",
|
||||
"borrowEmpty": "Nulla da prendere in prestito al momento.",
|
||||
"borrowEmptySubtitle": "Collega prima Plex o Jellyfin a un altro profilo.",
|
||||
"borrowFromProfile": "Da ${displayName}",
|
||||
"borrowConnectionBorrowed": "Connessione presa in prestito.",
|
||||
"borrowFailed": "Impossibile prendere in prestito la connessione.",
|
||||
"incorrectPin": "PIN errato.",
|
||||
"sourceProfileMissingParentAccount": "Al profilo di origine manca l'account principale.",
|
||||
"failedToVerifyPin": "Impossibile verificare il PIN.",
|
||||
"newProfile": "Nuovo profilo",
|
||||
"profileNameHint": "es. Ospiti, Bambini, Soggiorno",
|
||||
"pinProtectionOptional": "Protezione PIN (opzionale)",
|
||||
"pinExplain": "PIN a 4 cifre richiesto per cambiare profilo.",
|
||||
"continueButton": "Continua",
|
||||
"pinsDontMatch": "I PIN non corrispondono"
|
||||
},
|
||||
"connections": {
|
||||
"sectionTitle": "Connessioni",
|
||||
"addConnection": "Aggiungi connessione",
|
||||
"addConnectionSubtitleNoProfile": "Accedi con Plex o collega un server Jellyfin",
|
||||
"addConnectionSubtitleScoped": "Aggiungi a ${displayName}: Plex, Jellyfin o un'altra connessione profilo",
|
||||
"sessionExpiredOne": "Sessione scaduta per ${name}",
|
||||
"sessionExpiredMany": "Sessione scaduta per ${count} server",
|
||||
"signInAgain": "Accedi di nuovo"
|
||||
},
|
||||
"discover": {
|
||||
"title": "Esplora",
|
||||
"switchProfile": "Cambia profilo",
|
||||
"noContentAvailable": "Nessun contenuto disponibile",
|
||||
"addMediaToLibraries": "Aggiungi alcuni file multimediali alle tue librerie",
|
||||
"continueWatching": "Continua a guardare",
|
||||
"continueWatchingIn": "Continua a guardare in ${library}",
|
||||
"nextUp": "Prossimi",
|
||||
"nextUpIn": "Prossimi in ${library}",
|
||||
"recentlyAdded": "Aggiunti di recente",
|
||||
"recentlyAddedIn": "Aggiunti di recente in ${library}",
|
||||
"playEpisode": "S${season}E${episode}",
|
||||
"overview": "Panoramica",
|
||||
"cast": "Attori",
|
||||
@@ -458,7 +614,7 @@
|
||||
"errors": {
|
||||
"searchFailed": "Ricerca fallita: ${error}",
|
||||
"connectionTimeout": "Timeout connessione durante caricamento di ${context}",
|
||||
"connectionFailed": "Impossibile connettersi al server Plex.",
|
||||
"connectionFailed": "Impossibile connettersi al server multimediale",
|
||||
"failedToLoad": "Impossibile caricare ${context}: ${error}",
|
||||
"noClientAvailable": "Nessun client disponibile",
|
||||
"authenticationFailed": "Autenticazione fallita: ${error}",
|
||||
@@ -466,7 +622,9 @@
|
||||
"pleaseEnterToken": "Inserisci token",
|
||||
"invalidToken": "Token non valido",
|
||||
"failedToVerifyToken": "Verifica token fallita: ${error}",
|
||||
"failedToSwitchProfile": "Impossibile passare a ${displayName}"
|
||||
"failedToSwitchProfile": "Impossibile passare a ${displayName}",
|
||||
"failedToDeleteProfile": "Impossibile eliminare ${displayName}",
|
||||
"failedToRate": "Impossibile aggiornare la valutazione"
|
||||
},
|
||||
"libraries": {
|
||||
"title": "Librerie",
|
||||
@@ -483,6 +641,8 @@
|
||||
"analysisStarted": "Analisi iniziata per \"${title}\"",
|
||||
"failedToAnalyze": "Impossibile analizzare libreria: ${error}",
|
||||
"noLibrariesFound": "Nessuna libreria trovata",
|
||||
"allLibrariesHidden": "Tutte le librerie sono nascoste",
|
||||
"hiddenLibrariesCount": "Librerie nascoste (${count})",
|
||||
"thisLibraryIsEmpty": "Questa libreria è vuota",
|
||||
"all": "Tutto",
|
||||
"clearAll": "Cancella tutto",
|
||||
@@ -519,17 +679,34 @@
|
||||
"seasons": "Stagioni",
|
||||
"episodes": "Episodi",
|
||||
"folders": "Cartelle"
|
||||
},
|
||||
"filterCategories": {
|
||||
"genre": "Genere",
|
||||
"year": "Anno",
|
||||
"contentRating": "Classificazione",
|
||||
"tag": "Tag"
|
||||
},
|
||||
"sortLabels": {
|
||||
"title": "Titolo",
|
||||
"dateAdded": "Data di aggiunta",
|
||||
"releaseDate": "Data di uscita",
|
||||
"rating": "Valutazione",
|
||||
"lastPlayed": "Ultima riproduzione",
|
||||
"playCount": "Riproduzioni",
|
||||
"random": "Casuale",
|
||||
"dateShared": "Data di condivisione",
|
||||
"latestEpisodeAirDate": "Data ultima messa in onda"
|
||||
}
|
||||
},
|
||||
"about": {
|
||||
"title": "Informazioni",
|
||||
"openSourceLicenses": "Licenze Open Source",
|
||||
"versionLabel": "Versione ${version}",
|
||||
"appDescription": "Un bellissimo client Plex per Flutter",
|
||||
"appDescription": "Un bellissimo client Plex e Jellyfin per Flutter",
|
||||
"viewLicensesDescription": "Visualizza le licenze delle librerie di terze parti"
|
||||
},
|
||||
"serverSelection": {
|
||||
"allServerConnectionsFailed": "Impossibile connettersi a nessun server. Controlla la tua rete e riprova.",
|
||||
"allServerConnectionsFailed": "Impossibile connettersi ai server. Controlla la rete.",
|
||||
"noServersFoundForAccount": "Nessun server trovato per ${username} (${email})",
|
||||
"failedToLoadServers": "Impossibile caricare i server: ${error}"
|
||||
},
|
||||
@@ -566,6 +743,7 @@
|
||||
"reloadGuide": "Ricarica guida",
|
||||
"now": "Ora",
|
||||
"today": "Oggi",
|
||||
"tomorrow": "Domani",
|
||||
"midnight": "Mezzanotte",
|
||||
"overnight": "Notte",
|
||||
"morning": "Mattina",
|
||||
@@ -574,30 +752,74 @@
|
||||
"lateNight": "Notte tarda",
|
||||
"whatsOn": "In onda ora",
|
||||
"watchChannel": "Guarda canale",
|
||||
"favorites": "Preferiti"
|
||||
"favorites": "Preferiti",
|
||||
"reorderFavorites": "Riordina preferiti",
|
||||
"joinSession": "Partecipa alla sessione in corso",
|
||||
"watchFromStart": "Guarda dall'inizio (${minutes} min fa)",
|
||||
"watchLive": "Guarda in diretta",
|
||||
"goToLive": "Vai al live",
|
||||
"record": "Registra",
|
||||
"recordEpisode": "Registra episodio",
|
||||
"recordSeries": "Registra serie",
|
||||
"recordOptions": "Opzioni di registrazione",
|
||||
"recordings": "Registrazioni",
|
||||
"scheduledRecordings": "Programmate",
|
||||
"recordingRules": "Regole di registrazione",
|
||||
"noScheduledRecordings": "Nessuna registrazione programmata",
|
||||
"noRecordingRules": "Nessuna regola di registrazione",
|
||||
"manageRecording": "Gestisci registrazione",
|
||||
"cancelRecording": "Annulla registrazione",
|
||||
"cancelRecordingTitle": "Annullare questa registrazione?",
|
||||
"cancelRecordingMessage": "${title} non sarà più registrato.",
|
||||
"deleteRule": "Elimina regola",
|
||||
"deleteRuleTitle": "Eliminare la regola di registrazione?",
|
||||
"deleteRuleMessage": "I prossimi episodi di ${title} non saranno registrati.",
|
||||
"recordingScheduled": "Registrazione programmata",
|
||||
"alreadyScheduled": "Questo programma è già programmato",
|
||||
"dvrAdminRequired": "Le impostazioni DVR richiedono un account amministratore",
|
||||
"recordingFailed": "Impossibile programmare la registrazione",
|
||||
"recordingTargetMissing": "Impossibile determinare la libreria di registrazione",
|
||||
"recordNotAvailable": "Registrazione non disponibile per questo programma",
|
||||
"recordingCancelled": "Registrazione annullata",
|
||||
"recordingRuleDeleted": "Regola di registrazione eliminata",
|
||||
"processRecordingRules": "Rivaluta regole",
|
||||
"loadingRecordings": "Caricamento registrazioni...",
|
||||
"recordingInProgress": "Registrazione in corso",
|
||||
"recordingsCount": "${count} programmate",
|
||||
"editRule": "Modifica regola",
|
||||
"editRuleAction": "Modifica",
|
||||
"recordingRuleUpdated": "Regola di registrazione aggiornata",
|
||||
"guideReloadRequested": "Aggiornamento guida richiesto",
|
||||
"rulesProcessRequested": "Rivalutazione regole richiesta",
|
||||
"recordShow": "Registra programma"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "Download",
|
||||
"manage": "Gestisci",
|
||||
"tvShows": "Serie TV",
|
||||
"movies": "Film",
|
||||
"noDownloads": "Nessun download",
|
||||
"noDownloadsDescription": "I contenuti scaricati appariranno qui per la visualizzazione offline",
|
||||
"downloadNow": "Scarica",
|
||||
"deleteDownload": "Elimina download",
|
||||
"retryDownload": "Riprova download",
|
||||
"downloadQueued": "Download in coda",
|
||||
"episodesQueued": "${count} episodi in coda per il download",
|
||||
"downloadDeleted": "Download eliminato",
|
||||
"deleteConfirm": "Sei sicuro di voler eliminare \"${title}\"? Il file scaricato verrà rimosso dal tuo dispositivo.",
|
||||
"deletingWithProgress": "Eliminazione di ${title}... (${current} di ${total})",
|
||||
"noDownloadsTree": "Nessun download",
|
||||
"pauseAll": "Metti tutto in pausa",
|
||||
"resumeAll": "Riprendi tutto",
|
||||
"deleteAll": "Elimina tutto"
|
||||
"collections": {
|
||||
"title": "Raccolte",
|
||||
"collection": "Raccolta",
|
||||
"empty": "La raccolta è vuota",
|
||||
"unknownLibrarySection": "Impossibile eliminare: sezione libreria sconosciuta",
|
||||
"deleteCollection": "Elimina raccolta",
|
||||
"deleteConfirm": "Eliminare \"${title}\"? Non si può annullare.",
|
||||
"deleted": "Raccolta eliminata",
|
||||
"deleteFailed": "Impossibile eliminare la raccolta",
|
||||
"deleteFailedWithError": "Impossibile eliminare la raccolta: ${error}",
|
||||
"failedToLoadItems": "Impossibile caricare gli elementi della raccolta: ${error}",
|
||||
"selectCollection": "Seleziona raccolta",
|
||||
"collectionName": "Nome raccolta",
|
||||
"enterCollectionName": "Inserisci nome raccolta",
|
||||
"addedToCollection": "Aggiunto alla raccolta",
|
||||
"errorAddingToCollection": "Errore nell'aggiunta alla raccolta",
|
||||
"created": "Raccolta creata",
|
||||
"removeFromCollection": "Rimuovi dalla raccolta",
|
||||
"removeFromCollectionConfirm": "Rimuovere \"${title}\" da questa raccolta?",
|
||||
"removedFromCollection": "Rimosso dalla raccolta",
|
||||
"removeFromCollectionFailed": "Impossibile rimuovere dalla raccolta",
|
||||
"removeFromCollectionError": "Errore durante la rimozione dalla raccolta: ${error}",
|
||||
"searchCollections": "Cerca raccolte..."
|
||||
},
|
||||
"playlists": {
|
||||
"title": "Playlist",
|
||||
"playlist": "Playlist",
|
||||
"noPlaylists": "Nessuna playlist trovata",
|
||||
"create": "Crea playlist",
|
||||
"playlistName": "Nome playlist",
|
||||
@@ -620,31 +842,7 @@
|
||||
"errorLoading": "Errore durante il caricamento delle playlist",
|
||||
"errorAdding": "Errore durante l'aggiunta alla playlist",
|
||||
"errorReordering": "Errore durante il riordino dell'elemento della playlist",
|
||||
"errorRemoving": "Errore durante la rimozione dalla playlist",
|
||||
"playlist": "Playlist"
|
||||
},
|
||||
"collections": {
|
||||
"title": "Raccolte",
|
||||
"collection": "Raccolta",
|
||||
"empty": "La raccolta è vuota",
|
||||
"unknownLibrarySection": "Impossibile eliminare: sezione libreria sconosciuta",
|
||||
"deleteCollection": "Elimina raccolta",
|
||||
"deleteConfirm": "Sei sicuro di voler eliminare \"${title}\"? Questa azione non può essere annullata.",
|
||||
"deleted": "Raccolta eliminata",
|
||||
"deleteFailed": "Impossibile eliminare la raccolta",
|
||||
"deleteFailedWithError": "Impossibile eliminare la raccolta: ${error}",
|
||||
"failedToLoadItems": "Impossibile caricare gli elementi della raccolta: ${error}",
|
||||
"selectCollection": "Seleziona raccolta",
|
||||
"collectionName": "Nome raccolta",
|
||||
"enterCollectionName": "Inserisci nome raccolta",
|
||||
"addedToCollection": "Aggiunto alla raccolta",
|
||||
"errorAddingToCollection": "Errore nell'aggiunta alla raccolta",
|
||||
"created": "Raccolta creata",
|
||||
"removeFromCollection": "Rimuovi dalla raccolta",
|
||||
"removeFromCollectionConfirm": "Rimuovere \"${title}\" da questa raccolta?",
|
||||
"removedFromCollection": "Rimosso dalla raccolta",
|
||||
"removeFromCollectionFailed": "Impossibile rimuovere dalla raccolta",
|
||||
"removeFromCollectionError": "Errore durante la rimozione dalla raccolta: ${error}"
|
||||
"errorRemoving": "Errore durante la rimozione dalla playlist"
|
||||
},
|
||||
"watchTogether": {
|
||||
"title": "Guarda Insieme",
|
||||
@@ -681,27 +879,97 @@
|
||||
"leave": "Lascia",
|
||||
"syncing": "Sincronizzazione...",
|
||||
"joinWatchSession": "Unisciti alla Sessione di Visione",
|
||||
"enterCodeHint": "Inserisci codice di 8 caratteri",
|
||||
"enterCodeHint": "Inserisci codice di 5 caratteri",
|
||||
"pasteFromClipboard": "Incolla dagli appunti",
|
||||
"pleaseEnterCode": "Inserisci un codice sessione",
|
||||
"codeMustBe8Chars": "Il codice sessione deve essere di 8 caratteri",
|
||||
"joinInstructions": "Inserisci il codice sessione condiviso dall'host per unirti alla loro sessione di visione.",
|
||||
"codeMustBe5Chars": "Il codice sessione deve essere di 5 caratteri",
|
||||
"joinInstructions": "Inserisci il codice sessione dell'host per partecipare.",
|
||||
"failedToCreate": "Impossibile creare la sessione",
|
||||
"failedToJoin": "Impossibile unirsi alla sessione",
|
||||
"sessionCodeCopied": "Codice sessione copiato negli appunti",
|
||||
"relayUnreachable": "Il server di inoltro non è raggiungibile. Questo potrebbe essere causato dal blocco della connessione da parte del tuo provider. Puoi comunque provare, ma Watch Together potrebbe non funzionare.",
|
||||
"relayUnreachable": "Server relay non raggiungibile. Il blocco ISP può impedire Watch Together.",
|
||||
"reconnectingToHost": "Riconnessione all'host...",
|
||||
"currentPlayback": "Riproduzione corrente",
|
||||
"joinCurrentPlayback": "Unisciti alla riproduzione corrente",
|
||||
"joinCurrentPlaybackDescription": "Torna a ciò che l'host sta guardando in questo momento",
|
||||
"failedToOpenCurrentPlayback": "Impossibile aprire la riproduzione corrente",
|
||||
"participantJoined": "${name} si è unito",
|
||||
"participantLeft": "${name} se ne è andato"
|
||||
"participantLeft": "${name} se ne è andato",
|
||||
"participantPaused": "${name} ha messo in pausa",
|
||||
"participantResumed": "${name} ha ripreso",
|
||||
"participantSeeked": "${name} ha cercato",
|
||||
"participantBuffering": "${name} sta caricando",
|
||||
"waitingForParticipants": "In attesa che gli altri carichino...",
|
||||
"recentRooms": "Stanze recenti",
|
||||
"renameRoom": "Rinomina stanza",
|
||||
"removeRoom": "Rimuovi",
|
||||
"guestSwitchUnavailable": "Impossibile cambiare — server non disponibile per la sincronizzazione",
|
||||
"guestSwitchFailed": "Impossibile cambiare — contenuto non trovato su questo server"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "Download",
|
||||
"manage": "Gestisci",
|
||||
"tvShows": "Serie TV",
|
||||
"movies": "Film",
|
||||
"noDownloads": "Nessun download",
|
||||
"noDownloadsDescription": "I contenuti scaricati appariranno qui per la visualizzazione offline",
|
||||
"downloadNow": "Scarica",
|
||||
"deleteDownload": "Elimina download",
|
||||
"retryDownload": "Riprova download",
|
||||
"downloadQueued": "Download in coda",
|
||||
"serverErrorBitrate": "Errore server: il file può superare il limite di bitrate remoto",
|
||||
"episodesQueued": "${count} episodi in coda per il download",
|
||||
"downloadDeleted": "Download eliminato",
|
||||
"deleteConfirm": "Eliminare \"${title}\" da questo dispositivo?",
|
||||
"deletingWithProgress": "Eliminazione di ${title}... (${current} di ${total})",
|
||||
"deleting": "Eliminazione...",
|
||||
"queuedTooltip": "In coda",
|
||||
"queuedFilesTooltip": "In coda: ${files}",
|
||||
"downloadingTooltip": "Download in corso...",
|
||||
"downloadingFilesTooltip": "Download di ${files}",
|
||||
"noDownloadsTree": "Nessun download",
|
||||
"pauseAll": "Metti tutto in pausa",
|
||||
"resumeAll": "Riprendi tutto",
|
||||
"deleteAll": "Elimina tutto",
|
||||
"selectVersion": "Seleziona versione",
|
||||
"allEpisodes": "Tutti gli episodi",
|
||||
"unwatchedOnly": "Solo non visti",
|
||||
"nextNUnwatched": "Prossimi ${count} non visti",
|
||||
"customAmount": "Quantità personalizzata...",
|
||||
"howManyEpisodes": "Quanti episodi?",
|
||||
"itemsQueued": "${count} elementi in coda per il download",
|
||||
"keepSynced": "Mantieni sincronizzato",
|
||||
"downloadOnce": "Scarica una volta",
|
||||
"keepNUnwatched": "Mantieni ${count} non visti",
|
||||
"editSyncRule": "Modifica regola di sincronizzazione",
|
||||
"removeSyncRule": "Rimuovi regola di sincronizzazione",
|
||||
"removeSyncRuleConfirm": "Interrompere la sincronizzazione di \"${title}\"? Gli episodi scaricati verranno mantenuti.",
|
||||
"syncRuleCreated": "Regola di sincronizzazione creata — ${count} episodi non visti mantenuti",
|
||||
"syncRuleUpdated": "Regola di sincronizzazione aggiornata",
|
||||
"syncRuleRemoved": "Regola di sincronizzazione rimossa",
|
||||
"syncedNewEpisodes": "${count} nuovi episodi sincronizzati per ${title}",
|
||||
"activeSyncRules": "Regole di sincronizzazione",
|
||||
"noSyncRules": "Nessuna regola di sincronizzazione",
|
||||
"manageSyncRule": "Gestisci sincronizzazione",
|
||||
"editEpisodeCount": "Numero di episodi",
|
||||
"editSyncFilter": "Filtro di sincronizzazione",
|
||||
"syncAllItems": "Sincronizzazione di tutti gli elementi",
|
||||
"syncUnwatchedItems": "Sincronizzazione degli elementi non visti",
|
||||
"syncRuleServerContext": "Server: ${server} • ${status}",
|
||||
"syncRuleAvailable": "Disponibile",
|
||||
"syncRuleOffline": "Offline",
|
||||
"syncRuleSignInRequired": "Accesso richiesto",
|
||||
"syncRuleNotAvailableForProfile": "Non disponibile per il profilo attuale",
|
||||
"syncRuleUnknownServer": "Server sconosciuto",
|
||||
"syncRuleListCreated": "Regola di sincronizzazione creata"
|
||||
},
|
||||
"shaders": {
|
||||
"title": "Shader",
|
||||
"noShaderDescription": "Nessun miglioramento video",
|
||||
"nvscalerDescription": "Ridimensionamento NVIDIA per video più nitido",
|
||||
"artcnnVariantNeutral": "Neutro",
|
||||
"artcnnVariantDenoise": "Riduzione rumore",
|
||||
"artcnnVariantDenoiseSharpen": "Riduzione rumore + nitidezza",
|
||||
"qualityFast": "Veloce",
|
||||
"qualityHQ": "Alta qualità",
|
||||
"mode": "Modalità",
|
||||
@@ -714,54 +982,36 @@
|
||||
},
|
||||
"companionRemote": {
|
||||
"title": "Telecomando",
|
||||
"connectToDevice": "Connetti a un dispositivo",
|
||||
"hostRemoteSession": "Ospita sessione remota",
|
||||
"controlThisDevice": "Controlla questo dispositivo con il tuo telefono",
|
||||
"remoteControl": "Telecomando",
|
||||
"controlDesktop": "Controlla un dispositivo desktop",
|
||||
"connectedTo": "Connesso a ${name}",
|
||||
"session": {
|
||||
"creatingSession": "Creazione sessione remota...",
|
||||
"failedToCreate": "Impossibile creare la sessione remota:",
|
||||
"noSession": "Nessuna sessione disponibile",
|
||||
"scanQrCode": "Scansiona QR Code",
|
||||
"orEnterManually": "Oppure inserisci manualmente",
|
||||
"startingServer": "Avvio del server remoto...",
|
||||
"failedToCreate": "Impossibile avviare il server remoto:",
|
||||
"hostAddress": "Indirizzo host",
|
||||
"sessionId": "ID sessione",
|
||||
"pin": "PIN",
|
||||
"connected": "Connesso",
|
||||
"waitingForConnection": "In attesa di connessione...",
|
||||
"serverRunning": "Server remoto attivo",
|
||||
"serverStopped": "Server remoto arrestato",
|
||||
"serverRunningDescription": "I dispositivi mobili sulla tua rete possono connettersi a questa app",
|
||||
"serverStoppedDescription": "Avvia il server per consentire ai dispositivi mobili di connettersi",
|
||||
"usePhoneToControl": "Usa il tuo dispositivo mobile per controllare questa app",
|
||||
"copiedToClipboard": "${label} copiato negli appunti",
|
||||
"copyToClipboard": "Copia negli appunti",
|
||||
"newSession": "Nuova sessione",
|
||||
"startServer": "Avvia server",
|
||||
"stopServer": "Arresta server",
|
||||
"minimize": "Riduci"
|
||||
},
|
||||
"pairing": {
|
||||
"scan": "Scansiona",
|
||||
"manual": "Manuale",
|
||||
"pairWithDesktop": "Associa con desktop",
|
||||
"enterSessionDetails": "Inserisci i dettagli della sessione mostrati sul tuo dispositivo desktop",
|
||||
"discoveryDescription": "I dispositivi Plezy con lo stesso account Plex appaiono qui",
|
||||
"hostAddressHint": "192.168.1.100:48632",
|
||||
"sessionIdHint": "Inserisci ID sessione di 8 caratteri",
|
||||
"pinHint": "Inserisci PIN di 6 cifre",
|
||||
"connecting": "Connessione...",
|
||||
"tips": "Suggerimenti",
|
||||
"tipDesktop": "Apri Plezy sul tuo desktop e abilita Companion Remote dalle impostazioni o dal menu",
|
||||
"tipScan": "Usa la scheda Scansiona per associare rapidamente scansionando il QR code sul tuo desktop",
|
||||
"tipWifi": "Assicurati che entrambi i dispositivi siano sulla stessa rete WiFi",
|
||||
"cameraPermissionRequired": "L'autorizzazione della fotocamera è necessaria per scansionare i QR code.\nConcedi l'accesso alla fotocamera nelle impostazioni del dispositivo.",
|
||||
"cameraError": "Impossibile avviare la fotocamera: ${error}",
|
||||
"scanInstruction": "Punta la fotocamera verso il QR code mostrato sul tuo desktop",
|
||||
"invalidQrCode": "Formato QR code non valido",
|
||||
"searchingForDevices": "Ricerca dispositivi...",
|
||||
"noDevicesFound": "Nessun dispositivo trovato nella tua rete",
|
||||
"noDevicesHint": "Apri Plezy su desktop e usa lo stesso WiFi",
|
||||
"availableDevices": "Dispositivi disponibili",
|
||||
"manualConnection": "Connessione manuale",
|
||||
"cryptoInitFailed": "Impossibile avviare la connessione sicura. Accedi prima a Plex.",
|
||||
"validationHostRequired": "Inserisci l'indirizzo host",
|
||||
"validationHostFormat": "Il formato deve essere IP:porta (es. 192.168.1.100:48632)",
|
||||
"validationSessionIdRequired": "Inserisci un ID sessione",
|
||||
"validationSessionIdLength": "L'ID sessione deve essere di 8 caratteri",
|
||||
"validationPinRequired": "Inserisci un PIN",
|
||||
"validationPinLength": "Il PIN deve essere di 6 cifre",
|
||||
"connectionTimedOut": "Connessione scaduta. Verifica l'ID sessione e il PIN.",
|
||||
"sessionNotFound": "Sessione non trovata. Verifica le tue credenziali.",
|
||||
"connectionTimedOut": "Connessione scaduta. Usa la stessa rete su entrambi i dispositivi.",
|
||||
"sessionNotFound": "Dispositivo non trovato. Assicurati che Plezy sia in esecuzione sull'host.",
|
||||
"authFailed": "Autenticazione non riuscita. Entrambi i dispositivi devono usare lo stesso account Plex.",
|
||||
"failedToConnect": "Connessione fallita: ${error}"
|
||||
},
|
||||
"remote": {
|
||||
@@ -769,8 +1019,6 @@
|
||||
"reconnecting": "Riconnessione...",
|
||||
"attemptOf": "Tentativo ${current} di 5",
|
||||
"retryNow": "Riprova ora",
|
||||
"connectionError": "Errore di connessione",
|
||||
"notConnected": "Non connesso",
|
||||
"tabRemote": "Telecomando",
|
||||
"tabPlay": "Riproduci",
|
||||
"tabMore": "Altro",
|
||||
@@ -806,13 +1054,14 @@
|
||||
"audioOutput": "Uscita audio",
|
||||
"performanceOverlay": "Overlay prestazioni",
|
||||
"audioPassthrough": "Audio Passthrough",
|
||||
"audioNormalization": "Normalizzazione audio"
|
||||
"audioNormalization": "Normalizza volume"
|
||||
},
|
||||
"externalPlayer": {
|
||||
"title": "Lettore esterno",
|
||||
"useExternalPlayer": "Usa lettore esterno",
|
||||
"useExternalPlayerDescription": "Apri i video in un'app esterna invece del lettore integrato",
|
||||
"useExternalPlayerDescription": "Apri video in un'altra app",
|
||||
"selectPlayer": "Seleziona lettore",
|
||||
"customPlayers": "Lettori personalizzati",
|
||||
"systemDefault": "Predefinito di sistema",
|
||||
"addCustomPlayer": "Aggiungi lettore personalizzato",
|
||||
"playerName": "Nome lettore",
|
||||
@@ -840,8 +1089,12 @@
|
||||
"summary": "Trama",
|
||||
"poster": "Poster",
|
||||
"background": "Sfondo",
|
||||
"logo": "Logo",
|
||||
"squareArt": "Immagine quadrata",
|
||||
"selectPoster": "Seleziona poster",
|
||||
"selectBackground": "Seleziona sfondo",
|
||||
"selectLogo": "Seleziona logo",
|
||||
"selectSquareArt": "Seleziona immagine quadrata",
|
||||
"fromUrl": "Da URL",
|
||||
"uploadFile": "Carica file",
|
||||
"enterImageUrl": "Inserisci URL immagine",
|
||||
@@ -883,6 +1136,124 @@
|
||||
"subtitleMode": "Selezione automatica sottotitoli",
|
||||
"manuallySelected": "Selezionato manualmente",
|
||||
"shownWithForeignAudio": "Mostrati con audio straniero",
|
||||
"alwaysEnabled": "Sempre attivo"
|
||||
"alwaysEnabled": "Sempre attivo",
|
||||
"tags": "Tag",
|
||||
"addTag": "Aggiungi tag",
|
||||
"genre": "Genere",
|
||||
"director": "Regista",
|
||||
"writer": "Sceneggiatore",
|
||||
"producer": "Produttore",
|
||||
"country": "Paese",
|
||||
"collection": "Collezione",
|
||||
"label": "Etichetta",
|
||||
"style": "Stile",
|
||||
"mood": "Atmosfera"
|
||||
},
|
||||
"matchScreen": {
|
||||
"match": "Abbina...",
|
||||
"fixMatch": "Correggi abbinamento...",
|
||||
"unmatch": "Rimuovi abbinamento",
|
||||
"unmatchConfirm": "Cancellare questa corrispondenza? Plex la tratterà come non abbinata finché non verrà riabbinata.",
|
||||
"unmatchSuccess": "Abbinamento rimosso",
|
||||
"unmatchFailed": "Rimozione dell'abbinamento non riuscita",
|
||||
"matchApplied": "Abbinamento applicato",
|
||||
"matchFailed": "Applicazione dell'abbinamento non riuscita",
|
||||
"titleHint": "Titolo",
|
||||
"yearHint": "Anno",
|
||||
"search": "Cerca",
|
||||
"noMatchesFound": "Nessun risultato"
|
||||
},
|
||||
"serverTasks": {
|
||||
"title": "Attività del server",
|
||||
"failedToLoad": "Impossibile caricare le attività",
|
||||
"noTasks": "Nessuna attività in corso"
|
||||
},
|
||||
"trakt": {
|
||||
"title": "Trakt",
|
||||
"connected": "Connesso",
|
||||
"connectedAs": "Connesso come @${username}",
|
||||
"disconnectConfirm": "Disconnettere l'account Trakt?",
|
||||
"disconnectConfirmBody": "Plezy smetterà di inviare eventi a Trakt. Puoi riconnetterti quando vuoi.",
|
||||
"scrobble": "Scrobbling in tempo reale",
|
||||
"scrobbleDescription": "Invia eventi di riproduzione, pausa e arresto a Trakt durante la riproduzione.",
|
||||
"watchedSync": "Sincronizza stato visualizzato",
|
||||
"watchedSyncDescription": "Quando segni elementi come visti in Plezy, vengono segnati anche su Trakt."
|
||||
},
|
||||
"trackers": {
|
||||
"title": "Tracker",
|
||||
"hubSubtitle": "Sincronizza l'avanzamento di visione con Trakt e altri servizi.",
|
||||
"notConnected": "Non connesso",
|
||||
"connectedAs": "Connesso come @${username}",
|
||||
"scrobble": "Traccia i progressi automaticamente",
|
||||
"scrobbleDescription": "Aggiorna la tua lista quando finisci un episodio o un film.",
|
||||
"disconnectConfirm": "Disconnettere ${service}?",
|
||||
"disconnectConfirmBody": "Plezy smetterà di aggiornare ${service}. Riconnetti quando vuoi.",
|
||||
"connectFailed": "Impossibile connettersi a ${service}. Riprova.",
|
||||
"services": {
|
||||
"mal": "MyAnimeList",
|
||||
"anilist": "AniList",
|
||||
"simkl": "Simkl"
|
||||
},
|
||||
"deviceCode": {
|
||||
"title": "Attiva Plezy su ${service}",
|
||||
"body": "Visita ${url} e inserisci questo codice:",
|
||||
"openToActivate": "Apri ${service} per attivare",
|
||||
"waitingForAuthorization": "In attesa di autorizzazione…",
|
||||
"codeCopied": "Codice copiato"
|
||||
},
|
||||
"oauthProxy": {
|
||||
"title": "Accedi a ${service}",
|
||||
"body": "Scansiona questo codice QR o apri l'URL su qualsiasi dispositivo.",
|
||||
"openToSignIn": "Apri ${service} per accedere",
|
||||
"urlCopied": "URL copiato"
|
||||
},
|
||||
"libraryFilter": {
|
||||
"title": "Filtro librerie",
|
||||
"subtitleAllSyncing": "Sincronizzazione di tutte le librerie",
|
||||
"subtitleNoneSyncing": "Nulla da sincronizzare",
|
||||
"subtitleBlocked": "${count} bloccate",
|
||||
"subtitleAllowed": "${count} consentite",
|
||||
"mode": "Modalità filtro",
|
||||
"modeBlacklist": "Lista nera",
|
||||
"modeWhitelist": "Lista bianca",
|
||||
"modeHintBlacklist": "Sincronizza tutte le librerie tranne quelle selezionate sotto.",
|
||||
"modeHintWhitelist": "Sincronizza solo le librerie selezionate sotto.",
|
||||
"libraries": "Librerie",
|
||||
"noLibraries": "Nessuna libreria disponibile"
|
||||
}
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Aggiungi server Jellyfin",
|
||||
"jellyfinUrlIntro": "Inserisci l'URL del server, es. `https://jellyfin.example.com`.",
|
||||
"serverUrl": "URL del server",
|
||||
"findServer": "Trova server",
|
||||
"username": "Nome utente",
|
||||
"password": "Password",
|
||||
"signIn": "Accedi",
|
||||
"change": "Modifica",
|
||||
"required": "Obbligatorio",
|
||||
"couldNotReachServer": "Impossibile raggiungere il server: ${error}",
|
||||
"signInFailed": "Accesso non riuscito: ${error}",
|
||||
"quickConnectFailed": "Quick Connect non riuscito: ${error}",
|
||||
"addPlexTitle": "Accedi con Plex",
|
||||
"plexAuthIntro": "Accedi con un browser o un codice QR.",
|
||||
"plexQRPrompt": "Scansiona questo QR code per accedere.",
|
||||
"waitingForPlexConfirmation": "In attesa della conferma da plex.tv…",
|
||||
"pinExpired": "PIN scaduto prima dell'accesso. Riprova.",
|
||||
"duplicatePlexAccount": "Accesso a Plex già effettuato. Esci per cambiare account.",
|
||||
"failedToRegisterAccount": "Registrazione account non riuscita: ${error}",
|
||||
"enterJellyfinUrlError": "Inserisci l'URL del tuo server Jellyfin",
|
||||
"addConnectionTitle": "Aggiungi connessione",
|
||||
"addConnectionTitleScoped": "Aggiungi a ${name}",
|
||||
"addConnectionIntroGlobal": "Aggiungi un altro server multimediale. Plex e Jellyfin appaiono insieme in Home.",
|
||||
"addConnectionIntroScoped": "Aggiungi un nuovo server, o prendine in prestito uno da un altro profilo.",
|
||||
"signInWithPlexCard": "Accedi con Plex",
|
||||
"signInWithPlexCardSubtitle": "Autorizza questo dispositivo. I server condivisi vengono aggiunti.",
|
||||
"signInWithPlexCardSubtitleScoped": "Autorizza un account Plex. Gli utenti Home diventano profili.",
|
||||
"connectToJellyfinCard": "Connetti a Jellyfin",
|
||||
"connectToJellyfinCardSubtitle": "Inserisci URL del server, nome utente e password.",
|
||||
"connectToJellyfinCardSubtitleScoped": "Accedi a un server Jellyfin. Collegato a ${name}.",
|
||||
"borrowFromAnotherProfile": "Prendi in prestito da un altro profilo",
|
||||
"borrowFromAnotherProfileSubtitle": "Riutilizza la connessione di un altro profilo. I profili protetti da PIN richiedono un PIN."
|
||||
}
|
||||
}
|
||||
|
||||