Compare commits

..
79 Commits
Author SHA1 Message Date
github-actions[bot] 93f0da7a27 chore: bump version to 2.1.1 2026-05-17 22:30:27 +00:00
edde746 8b3f8856f7 fix(scroll): avoid pending scroll timers 2026-05-18 00:23:17 +02:00
edde746 39fb828580 fix(ios): update MPVKit subtitle geometry
close #1071
2026-05-18 00:10:14 +02:00
edde746 3e0f7b4f86 fix(libraries): stabilize alpha and sort controls 2026-05-17 22:36:15 +02:00
edde746 c855dba3be fix(media): paginate large server lists 2026-05-17 20:25:39 +02:00
edde746 e726f9f528 fix(media): align detail hero spacing 2026-05-17 16:17:38 +02:00
edde746 2c54baca34 docs: clarify feature availability 2026-05-17 15:40:49 +02:00
github-actions[bot] 232d98c4ce chore: update cask to 2.1.0 2026-05-17 12:15:25 +00:00
github-actions[bot] d93c81a7cb chore: bump version to 2.1.0 2026-05-17 11:44:29 +00:00
edde746 326d53415b chore: bump build 2026-05-17 13:43:57 +02:00
edde746 87db591792 feat(livetv): group guide by source 2026-05-17 06:41:47 +02:00
edde746 6bad454830 feat(player): add screenshot shortcut
close #1055
2026-05-16 23:50:08 +02:00
edde746 cfd4aa307d fix(plex): tolerate transient resource failures 2026-05-16 22:54:53 +02:00
edde746 3798a0c332 fix(ci): update generated tracker mapping 2026-05-16 21:55:18 +02:00
edde746 be0e9686b5 fix(search): rank media search results
close #1056
2026-05-16 21:40:22 +02:00
edde746 7ec45274bd fix(media): prevent detail action layout churn 2026-05-16 21:09:41 +02:00
edde746 3e74937386 feat(trackers): sync anime watch state by episode 2026-05-16 20:54:39 +02:00
edde746 310c4280fc feat(ratings): add tracker rating sheet
close #1031
2026-05-16 18:03:30 +02:00
edde746 ee6e327b12 fix(media): hide poster loading icons 2026-05-16 14:12:28 +02:00
edde746 e71dcdaa6c fix(libraries): tighten browse chip spacing 2026-05-16 13:23:07 +02:00
edde746 1b969953b5 fix(libraries): refresh all tabs 2026-05-16 12:24:26 +02:00
edde746 7690a16efe feat(tv): add spotlight browse layouts 2026-05-16 11:56:12 +02:00
edde746 91298294b0 fix(tvos): stabilize remote select handling 2026-05-15 22:16:24 +02:00
edde746 5df3ec0c12 fix(playback): use display criteria for matching 2026-05-15 19:46:04 +02:00
edde746 ef4980db09 fix(tv): preserve native keyboard navigation
close #1051
2026-05-15 19:05:38 +02:00
edde746 e37602421b fix(discover): expose full continue watching
close #1045
2026-05-15 18:49:23 +02:00
edde746 562d19c207 fix(watch-together): restore host resume
close #1052
2026-05-15 18:33:02 +02:00
edde746 e54bbb2214 fix(ios): restore video presentation 2026-05-15 18:16:07 +02:00
edde746 db2a2c34d2 fix(apple): update MPVKit release 2026-05-15 18:14:13 +02:00
edde746 12b006ee0c fix(tvos): prime display criteria from metadata 2026-05-14 19:51:33 +02:00
edde746 be3efa8335 fix(ios): update MPVKit subtitle cropping 2026-05-14 15:44:00 +02:00
edde746 d1d549d602 fix(android): restore flutter textureview 2026-05-14 11:03:54 +02:00
edde746 7de2a62c55 fix(tvos): update MPVKit teardown 2026-05-14 10:33:57 +02:00
edde746 7b4a37e576 fix(downloads): clean orphaned temp files
close #1040
2026-05-14 09:05:06 +02:00
edde746 5a46857035 fix(companion): respect remote server setting
close #1038
2026-05-14 02:23:43 +02:00
edde746 7ffb20b501 fix(libraries): respect grouping type 2026-05-14 02:01:41 +02:00
edde746 856ac83e6a fix(tv): use textureview 2026-05-13 19:34:20 +02:00
edde746 fb8fc1db1c fix(tvos): support 2nd gen Siri Remote 2026-05-13 18:44:53 +02:00
Micah Morrison 76e8ea6901 Respect episode/season grouping type when browsing library 2026-05-13 11:56:37 -04:00
edde746 e8c27f00a7 fix(tvos): avoid unsupported native clients 2026-05-13 17:12:50 +02:00
edde746 9f19f550c3 fix(tvos): bump MPVKit pacing build 2026-05-13 15:46:29 +02:00
edde746 fce794cd6c fix(discover): preserve library order on home
close #1034
2026-05-13 15:26:23 +02:00
edde746 8f9947a874 fix(trackers): use catalog totals for anime completion
close #1025
2026-05-13 15:07:19 +02:00
edde746 126e6b9349 fix(trackers): sync scoped anime progress 2026-05-13 14:10:01 +02:00
edde746 fcbe459177 feat(cache): cleanup orphaned plexImageCache directory on startup 2026-05-13 11:06:52 +02:00
edde746 0e296f8659 fix(livetv): show guide without favorites 2026-05-13 09:22:17 +02:00
edde746 12073ea134 fix(player): clear stale tracks before opening media
close #1028
2026-05-13 09:22:17 +02:00
edde746 8aea796dbd feat(jellyfin): expand library sort options
close #1032
2026-05-13 08:00:45 +02:00
edde746 9af6f32157 fix(player): harden initialization lifecycle 2026-05-13 06:28:09 +02:00
edde746 b0f1a5d4f1 fix(tv): back button Menu on Siri Remote 2026-05-12 22:46:38 +02:00
edde746 de62c8530f fix(tvos): subtitle HDR path and player dispose hardening 2026-05-12 22:46:38 +02:00
edde746 0f4629f52b fix(tvos): explicitly link AVKit for avDisplayManager category 2026-05-12 22:46:38 +02:00
edde746 de129fbb0a fix(trackers): preserve Plex library context 2026-05-12 22:46:38 +02:00
edde746 3a01fa25a7 fix(tv): pin engine to 3.41.6+7 for Up/Down dpad fix 2026-05-12 22:46:38 +02:00
edde746 86c19fc1fc fix(downloads): pin downloader cleanup
close #1026
close #921
2026-05-12 19:10:35 +02:00
edde746 ae1f6d7822 fix(tvOS): trigger native Dolby Vision via preferredDisplayCriteria 2026-05-12 16:21:00 +02:00
edde746 4577f26aa8 fix(lifecycle): abort HTTP before close 2026-05-12 15:11:16 +02:00
edde746 bae127e459 fix(database): handle cross-drive desktop DB migration
close #1022
2026-05-12 10:41:32 +02:00
edde746 606627cd0c fix(search): use backend icons for server indicator 2026-05-12 08:25:52 +02:00
edde746 3ddd89113c fix(livetv): show recording indicators in guide
close #1015
2026-05-12 06:53:52 +02:00
edde746 5139e39ed4 fix(sentry): upload symbols with dart plugin 2026-05-12 06:40:54 +02:00
edde746 3a6012cc21 fix(lifecycle): guard async state updates 2026-05-12 06:11:14 +02:00
edde746 37b1a26cde fix(profile): prevent duplicate PIN dialog pops 2026-05-12 05:49:38 +02:00
edde746 e5922f4870 fix(plex): restore library filters and sorts
close #1020
2026-05-12 05:36:48 +02:00
edde746 ae7f4a7871 fix(jellyfin): unblock large library loading
close #1018
2026-05-12 05:28:20 +02:00
edde746 9e85aa7be6 fix(tv): handle native text input completion 2026-05-12 01:00:03 +02:00
edde746 fd69fe668a test(tvOS): align virtual keyboard select expectation 2026-05-11 18:31:09 +02:00
edde746 9085d4d94b fix(tvOS): route dpad clicks through engine 2026-05-11 18:08:56 +02:00
edde746 0775ea0d26 fix(tv): restore profile pin keypad input
close #1011
2026-05-11 15:13:37 +02:00
edde746 d901f5efc2 fix(jellyfin): direct stream live tv
close #1010
2026-05-11 13:50:46 +02:00
edde746 fcd8198fcb fix(plex): use promoted home hubs
close #1004
2026-05-11 13:18:43 +02:00
edde746 fd1eaf9d96 fix(plex): respect per-show season display
close #1008
2026-05-11 12:55:59 +02:00
edde746 d0bd919ff4 refactor: migrate models to freezed + json_serializable 2026-05-11 12:54:26 +02:00
edde746 2bbd31d927 feat(jellyfin): add actor media browsing
close #1005
2026-05-11 11:54:37 +02:00
edde746 617f200cb5 fix(android): avoid pixel eac3 decoder fallback
close #1007
2026-05-11 11:14:32 +02:00
edde746 b96d734e8c fix(jellyfin): load collections from boxsets root
close #1006
2026-05-11 11:11:22 +02:00
edde746 89f256138d fix(player): flush mpv buffers on frame-rate startup 2026-05-11 10:50:11 +02:00
edde746 9b248a7a5b fix(macos): restore video layer on focus 2026-05-11 10:13:05 +02:00
github-actions[bot] 8d76dff353 chore: update cask to 2.0.0 2026-05-11 05:30:32 +00:00
317 changed files with 30066 additions and 4696 deletions
+42 -276
View File
@@ -63,39 +63,14 @@ 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 }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --obfuscate --split-debug-info=debug-info/android-apk
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 }} --dart-define=SENTRY_DIST=github-android-apk ${{ env.DONATIONS_DART_DEFINE }} --obfuscate --split-debug-info=debug-info/android-apk --extra-gen-snapshot-options=--save-obfuscation-map=debug-info/android-apk/obfuscation.map.json
- name: Stage symbols for upload
- name: Upload symbols to bugs.plezy.app
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
env:
BUGS_ADMIN_TOKEN: ${{ secrets.BUGS_ADMIN_TOKEN }}
SENTRY_DIST: github-android-apk
run: ./scripts/upload-symbols.sh android-apk
- name: Clean up keystore
if: always()
@@ -162,39 +137,14 @@ jobs:
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 }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/ios
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 }} --dart-define=SENTRY_DIST=github-ios ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/ios
- name: Stage symbols for upload
- name: Upload symbols to bugs.plezy.app
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
env:
BUGS_ADMIN_TOKEN: ${{ secrets.BUGS_ADMIN_TOKEN }}
SENTRY_DIST: github-ios
run: ./scripts/upload-symbols.sh ios
- name: Create IPA
run: |
@@ -251,39 +201,14 @@ jobs:
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 }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/macos
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 }} --dart-define=SENTRY_DIST=github-macos ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/macos
- name: Stage symbols for upload
- name: Upload symbols to bugs.plezy.app
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
env:
BUGS_ADMIN_TOKEN: ${{ secrets.BUGS_ADMIN_TOKEN }}
SENTRY_DIST: github-macos
run: ./scripts/upload-symbols.sh macos
- name: Import Code Signing Certificate
env:
@@ -439,47 +364,15 @@ jobs:
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 }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/windows-x64
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 }} --dart-define=SENTRY_DIST=github-windows-x64 ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/windows-x64
- name: Stage symbols for upload
- name: Upload symbols to bugs.plezy.app
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
env:
BUGS_ADMIN_TOKEN: ${{ secrets.BUGS_ADMIN_TOKEN }}
SENTRY_DIST: github-windows-x64
run: .\scripts\upload-symbols.ps1 windows-x64
- name: Upload x64 build
uses: actions/upload-artifact@v4
@@ -525,47 +418,15 @@ jobs:
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 }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/windows-arm64
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 }} --dart-define=SENTRY_DIST=github-windows-arm64 ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/windows-arm64
- name: Stage symbols for upload
- name: Upload symbols to bugs.plezy.app
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
env:
BUGS_ADMIN_TOKEN: ${{ secrets.BUGS_ADMIN_TOKEN }}
SENTRY_DIST: github-windows-arm64
run: .\scripts\upload-symbols.ps1 windows-arm64
- name: Upload arm64 build
uses: actions/upload-artifact@v4
@@ -708,41 +569,16 @@ jobs:
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 }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/linux-x64
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 }} --dart-define=SENTRY_DIST=github-linux-x64 ${{ 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
- name: Upload symbols to bugs.plezy.app
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
env:
BUGS_ADMIN_TOKEN: ${{ secrets.BUGS_ADMIN_TOKEN }}
SENTRY_DIST: github-linux-x64
run: ./scripts/upload-symbols.sh linux-x64
- name: Build Linux Packages
run: ARCH_SUFFIX=x64 OUTPUT_DIR=$GITHUB_WORKSPACE python3 linux/packaging/build-packages.py
@@ -847,41 +683,16 @@ jobs:
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 }} ${{ env.SENTRY_ENV_DART_DEFINE }} ${{ env.DONATIONS_DART_DEFINE }} --split-debug-info=debug-info/linux-arm64
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 }} --dart-define=SENTRY_DIST=github-linux-arm64 ${{ 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
- name: Upload symbols to bugs.plezy.app
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
env:
BUGS_ADMIN_TOKEN: ${{ secrets.BUGS_ADMIN_TOKEN }}
SENTRY_DIST: github-linux-arm64
run: ./scripts/upload-symbols.sh linux-arm64
- name: Find bundle directory
id: find-bundle
@@ -944,51 +755,6 @@ 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
+9
View File
@@ -38,6 +38,15 @@ jobs:
flutter pub get
- name: Verify generated files committed
run: |
dart run build_runner build --delete-conflicting-outputs
if ! git diff --exit-code lib/; then
echo "::error::Generated files (.g.dart / .freezed.dart) are out of date."
echo "Run 'scripts/codegen.sh' and commit the result."
exit 1
fi
- name: Verify formatting
run: |
# Find all Dart files excluding generated files
+2 -2
View File
@@ -1,6 +1,6 @@
cask "plezy" do
version "1.35.2"
sha256 "e3a65f5688bd8ac010b0dad2238a24f6f3b4b5a6f5ca2b5127a9e1a817dd73d9"
version "2.1.0"
sha256 "9219831cab16f33b3b7a1223f3a120aa8aed44a28352839f3ec5fb569be77cd6"
url "https://github.com/edde746/plezy/releases/download/#{version}/plezy-macos.dmg"
name "Plezy"
+24 -15
View File
@@ -3,7 +3,7 @@
Plezy
</h1>
A modern client for Plex and Jellyfin on desktop and mobile. Built with Flutter for native performance and a clean interface.
A modern client for Plex and Jellyfin on desktop, mobile, and TV. 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" />
@@ -46,22 +46,22 @@ A modern client for Plex and Jellyfin on desktop and mobile. Built with Flutter
### <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)
- HDR and Dolby Vision[^1]
- Full ASS/SSA subtitles with customizable styling
- Online subtitle search & download
- Audio & subtitle preferences synced with your server profile
- Online subtitle search & download[^2]
- Audio & subtitle choices remembered per title
- Progress sync and resume
- 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
- Ambient lighting and GLSL shader presets[^3]
- Picture-in-Picture[^4]
- Refresh-rate matching[^5]
- External player launch (VLC, MX Player, etc.)
### <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
- DVR support with EPG guide, recording rules, and scheduled recordings[^2]
- Multi-server Live TV support where available
### <img src="assets/readme_icons/downloads.svg" height="20" alt="" align="center" /> Downloads & Offline
@@ -75,21 +75,30 @@ A modern client for Plex and Jellyfin on desktop and mobile. Built with Flutter
- 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
- Discord Rich Presence[^7]
- Trakt, MyAnimeList, AniList, and Simkl tracking & rating
- Plezy Remote — control desktop and TV from mobile
- Android TV Watch Next row
- Watch Next row[^6]
### <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
- Customizable keyboard shortcuts[^7]
- Metadata and artwork editing[^2]
- Settings import/export
- Localized in English plus 14 translations
[^1]: Not available on Linux.
[^2]: Plex only.
[^3]: Not available on iOS or tvOS.
[^4]: Android, iOS, and macOS.
[^5]: Windows, Android, and tvOS.
[^6]: Android TV only.
[^7]: Desktop only.
## Building from Source
### Prerequisites
- Flutter SDK 3.8.1+
- Flutter SDK 3.38.4+
- A Plex account or Jellyfin server with user credentials
### Setup
@@ -7,21 +7,27 @@ import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.content.res.Configuration
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.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 com.edde746.plezy.exoplayer.ExoPlayerPlugin
import com.edde746.plezy.mpv.MpvPlayerPlugin
import com.edde746.plezy.shared.DeviceQuirks
import com.edde746.plezy.shared.ThemeHelper
import com.edde746.plezy.watchnext.WatchNextPlugin
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.android.FlutterTextureView
import io.flutter.embedding.android.RenderMode
import io.flutter.embedding.android.TransparencyMode
import io.flutter.embedding.engine.FlutterEngine
@@ -169,16 +175,7 @@ class MainActivity : FlutterActivity() {
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
}
}
if (DeviceQuirks.isEWaste) return true
// NVIDIA Tegra (Shield TV)
if (Build.MANUFACTURER.equals("NVIDIA", ignoreCase = true)) return true
// Huawei/HONOR Kirin SoCs use Mali GPUs
@@ -190,13 +187,57 @@ class MainActivity : FlutterActivity() {
return false
}
override fun getRenderMode(): RenderMode = RenderMode.surface
override fun getRenderMode(): RenderMode {
// Keep Flutter in the normal View hierarchy so video/subtitle SurfaceViews
// remain the only native composition layers. This restores the pre-1.35.0
// behavior and avoids compositor regressions with Dolby Vision playback.
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, width: Int, height: Int) {
original.onSurfaceTextureAvailable(surface, width, height)
}
override fun onSurfaceTextureSizeChanged(surface: SurfaceTexture, width: Int, height: Int) {
if (width == lastWidth && height == lastHeight) return
lastWidth = width
lastHeight = height
pendingResize?.let { handler.removeCallbacks(it) }
pendingResize = Runnable {
if (flutterTextureView.isAvailable) {
original.onSurfaceTextureSizeChanged(surface, width, height)
}
}
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)
}
}
}
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
flutterEngine.plugins.add(MpvPlayerPlugin())
@@ -50,6 +50,7 @@ import androidx.media3.ui.AspectRatioFrameLayout
import androidx.media3.ui.CaptionStyleCompat
import androidx.media3.ui.SubtitleView
import com.edde746.plezy.shared.AudioFocusManager
import com.edde746.plezy.shared.DeviceQuirks
import com.edde746.plezy.shared.FlutterOverlayHelper
import com.edde746.plezy.shared.FrameRateManager
import io.github.peerless2012.ass.media.AssHandler
@@ -136,6 +137,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
private var decoderHangRunnable: Runnable? = null
private var decoderInitName: String? = null
private var audioDecoderInitName: String? = null
private var loggedEwasteEac3Workaround: Boolean = false
private var firstFrameRendered: Boolean = false
var delegate: ExoPlayerDelegate? = null
var debugLoggingEnabled: Boolean = false
@@ -388,14 +390,12 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
.setUsage(C.USAGE_MEDIA)
.build()
// Use DefaultRenderersFactory with FFmpeg fallback for unsupported audio codecs
// Use DefaultRenderersFactory with FFmpeg fallback for unsupported or blocked audio codecs.
val renderersFactory = PlezyRenderersFactory(activity).apply {
setEnableDecoderFallback(true)
setExtensionRendererMode(DefaultRenderersFactory.EXTENSION_RENDERER_MODE_ON)
// Force FFmpeg for FLAC — hardware FLAC decoders (e.g. Samsung c2.sec.flac.decoder)
// have buggy 32KB input buffer limits causing InsufficientCapacityException.
setMediaCodecSelector { mimeType, requiresSecureDecoder, requiresTunnelingDecoder ->
if (mimeType == MimeTypes.AUDIO_FLAC) {
if (shouldForceAppAudioDecoder(mimeType)) {
emptyList()
} else {
MediaCodecSelector.DEFAULT.getDecoderInfos(
@@ -1084,10 +1084,23 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
// Tunneling control — disabled when audio codec has no hardware decoder (requires FFmpeg)
private fun shouldForceAppAudioDecoder(mimeType: String): Boolean {
if (mimeType == MimeTypes.AUDIO_FLAC) return true
if (DeviceQuirks.isEWaste && isEac3MimeType(mimeType)) {
if (!loggedEwasteEac3Workaround) {
loggedEwasteEac3Workaround = true
emitLog("info", "decoder", "Using app decoder for E-AC3 on this device")
}
return true
}
return false
}
private fun isEac3MimeType(mimeType: String): Boolean = mimeType == MimeTypes.AUDIO_E_AC3 || mimeType == MimeTypes.AUDIO_E_AC3_JOC
private fun hasHardwareAudioDecoder(mimeType: String): Boolean {
// FLAC hardware decoders are excluded via MediaCodecSelector (Samsung c2.sec.flac.decoder
// has buggy 32KB input buffer limits), so report no hardware decoder for tunneling purposes.
if (mimeType == MimeTypes.AUDIO_FLAC) return false
// Keep tunneling decisions aligned with the MediaCodecSelector exclusions.
if (shouldForceAppAudioDecoder(mimeType)) return false
hwAudioDecoderCache[mimeType]?.let { return it }
val result = try {
val codecList = android.media.MediaCodecList(android.media.MediaCodecList.REGULAR_CODECS)
@@ -0,0 +1,23 @@
package com.edde746.plezy.shared
import android.os.Build
object DeviceQuirks {
val isEWaste: Boolean
get() = isGooglePixelDevice || isGoogleTensorDevice
private val isGooglePixelDevice: Boolean
get() = (
Build.MANUFACTURER.equals("Google", ignoreCase = true) ||
Build.BRAND.equals("google", ignoreCase = true)
) &&
Build.MODEL.contains("Pixel", ignoreCase = true)
private val isGoogleTensorDevice: Boolean
get() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) return false
val soc = Build.SOC_MODEL
return soc.startsWith("Tensor", ignoreCase = true) ||
soc.startsWith("GS", ignoreCase = true)
}
}
+12 -7
View File
@@ -1,5 +1,10 @@
require 'dotenv/load'
Dotenv.load("../../.env")
require 'shellwords'
PROJECT_ROOT = File.expand_path("../..", __dir__)
PROJECT_ROOT_ARG = Shellwords.escape(PROJECT_ROOT)
Dotenv.load(File.join(PROJECT_ROOT, ".env"))
default_platform(:android)
@@ -7,7 +12,7 @@ platform :android do
desc "Build and deploy to Google Play Store"
lane :release do
# Get version from pubspec.yaml
pubspec_path = "#{ENV['PWD']}/../pubspec.yaml"
pubspec_path = File.join(PROJECT_ROOT, "pubspec.yaml")
pubspec_content = File.read(pubspec_path)
version_match = pubspec_content.match(/version:\s*(.+)\+(\d+)/)
@@ -19,11 +24,11 @@ platform :android do
UI.user_error!("Could not extract version from pubspec.yaml")
end
git_commit = `git rev-parse --short HEAD`.strip
git_commit = `git -C #{PROJECT_ROOT_ARG} rev-parse --short HEAD`.strip
# Build the Flutter app
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")
sh("cd #{PROJECT_ROOT_ARG} && flutter build appbundle --dart-define=ENABLE_SENTRY=true --dart-define=GIT_COMMIT=#{git_commit} --dart-define=SENTRY_ENVIRONMENT=play-store --dart-define=SENTRY_DIST=play-store --obfuscate --split-debug-info=debug-info/android-aab --extra-gen-snapshot-options=--save-obfuscation-map=debug-info/android-aab/obfuscation.map.json")
sh("cd #{PROJECT_ROOT_ARG} && SENTRY_DIST=play-store ./scripts/upload-symbols.sh android-aab")
upload_to_play_store(
track: "production",
@@ -33,8 +38,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} --dart-define=SENTRY_ENVIRONMENT=amazon --obfuscate --split-debug-info=debug-info/android-apk")
sh("cd #{ENV['PWD']}/.. && ./scripts/upload-symbols.sh android-apk")
sh("cd #{PROJECT_ROOT_ARG} && AMAZON=1 flutter build apk --release --dart-define=ENABLE_SENTRY=true --dart-define=GIT_COMMIT=#{git_commit} --dart-define=SENTRY_ENVIRONMENT=amazon --dart-define=SENTRY_DIST=amazon --obfuscate --split-debug-info=debug-info/android-apk --extra-gen-snapshot-options=--save-obfuscation-map=debug-info/android-apk/obfuscation.map.json")
sh("cd #{PROJECT_ROOT_ARG} && SENTRY_DIST=amazon ./scripts/upload-symbols.sh android-apk")
upload_to_amazon_appstore(
apk_paths: [
+15
View File
@@ -0,0 +1,15 @@
targets:
$default:
builders:
json_serializable:
options:
create_to_json: true
explicit_to_json: true
field_rename: none
include_if_null: true
checked: false
freezed:
options:
copy_with: true
equal: true
to_string: true
+1 -1
View File
@@ -781,7 +781,7 @@
repositoryURL = "https://github.com/edde746/MPVKit";
requirement = {
kind = revision;
revision = 86dcf97f04e572abb5641e74780251a1d5634ff3;
revision = 45ff446b369d388457781e09371a356111a4faee;
};
};
/* End XCRemoteSwiftPackageReference section */
@@ -6,7 +6,7 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/edde746/MPVKit",
"state" : {
"revision" : "86dcf97f04e572abb5641e74780251a1d5634ff3"
"revision" : "45ff446b369d388457781e09371a356111a4faee"
}
}
],
@@ -6,7 +6,7 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/edde746/MPVKit",
"state" : {
"revision" : "86dcf97f04e572abb5641e74780251a1d5634ff3"
"revision" : "45ff446b369d388457781e09371a356111a4faee"
}
}
],
+392 -25
View File
@@ -1,4 +1,7 @@
import AVFoundation
#if os(tvOS)
import AVKit
#endif
import QuartzCore
import UIKit
@@ -9,6 +12,8 @@ class MpvPlayerCore: MpvPlayerCoreBase {
private weak var window: UIWindow?
private var mainBlankView: UIView?
private var isVisible = false
private var isDisposed = false
private var activeDisplayCriteriaKey: String?
var isPipStarting = false
@@ -88,6 +93,10 @@ class MpvPlayerCore: MpvPlayerCoreBase {
let scale = screen.nativeScale > 0 ? screen.nativeScale : screen.scale
videoLayer.contentsScale = scale
}
#if os(iOS)
updateEDRMode(sigPeak: lastSigPeak)
#endif
}
func externalDisplayDidChange() {
@@ -95,7 +104,7 @@ class MpvPlayerCore: MpvPlayerCoreBase {
}
private func refreshExternalDisplayAttachment() {
guard let containerView else { return }
guard containerView != nil else { return }
let externalSuperview = externalVideoSuperview
@@ -183,28 +192,350 @@ class MpvPlayerCore: MpvPlayerCoreBase {
command(["seek", "0", "relative+exact"])
}
override func updateEDRMode(sigPeak: Double) {
private func restoreVideoPresentation() {
guard !isPipActive else { return }
refreshExternalDisplayAttachment()
recoverDisplayLayerIfNeeded()
updateEDRMode(sigPeak: lastSigPeak)
if isPaused { forceDraw() }
}
private func recoverDisplayLayerIfNeeded() {
guard let videoLayer else { return }
let hdrEnabled = self.hdrEnabled
var edrHeadroom: CGFloat = 1.0
var requiresFlush = false
if #available(iOS 14.0, tvOS 14.0, *) {
requiresFlush = videoLayer.requiresFlushToResumeDecoding
}
let status = videoLayer.status
guard requiresFlush || status == .failed else { return }
videoLayer.flush()
}
override func updateEDRMode(sigPeak: Double) {
#if os(iOS)
if #available(iOS 17.0, *) {
edrHeadroom = containerView?.window?.screen.potentialEDRHeadroom ?? 1.0
guard let videoLayer else { return }
let shouldEnableEDR = hdrEnabled && sigPeak > 1.0
if #available(iOS 26.0, *) {
withoutLayerAnimations {
videoLayer.wantsExtendedDynamicRangeContent =
hdrEnabled && sigPeak > 1.0 && edrHeadroom > 1.0
videoLayer.preferredDynamicRange = shouldEnableEDR ? .high : .standard
}
} else if #available(iOS 17.0, *) {
withoutLayerAnimations {
videoLayer.wantsExtendedDynamicRangeContent = shouldEnableEDR
}
}
#endif
let shouldEnableEDR = hdrEnabled && sigPeak > 1.0 && edrHeadroom > 1.0
print(
"[MpvPlayerCore] EDR mode: \(shouldEnableEDR) (hdrEnabled: \(hdrEnabled), sigPeak: \(sigPeak), headroom: \(edrHeadroom))"
)
}
@discardableResult
override func updateDisplayCriteria(
doviProfile: Int64,
doviLevel: Int64,
doviCompatibilityId: Int64?,
fps: Double,
width: Int32,
height: Int32,
sigPeak: Double,
gamma: String?,
primaries: String?,
colorMatrix: String?
) -> Bool {
#if os(tvOS)
guard let window = containerView?.window ?? self.window else { return false }
let displayManager = window.avDisplayManager
if width <= 0 || height <= 0 {
clearDisplayCriteria(displayManager, reason: "no video dimensions")
return false
}
let refreshRate = Float(fps > 0 ? fps : 0)
let sourceHasDolbyVision = doviProfile > 0
guard sourceHasDolbyVision || sigPeak > 0 || gamma != nil || primaries != nil || colorMatrix != nil else {
clearDisplayCriteria(displayManager, reason: "no display metadata")
return false
}
let sourceBaseRange = Self.resolveBaseDisplayDynamicRange(
sigPeak: sigPeak,
gamma: gamma,
primaries: primaries,
colorMatrix: colorMatrix,
doviCompatibilityId: doviCompatibilityId
)
let sourceRange: DisplayDynamicRange = sourceHasDolbyVision ? .dolbyVision : sourceBaseRange
var displayRange: DisplayDynamicRange =
sourceHasDolbyVision
? .dolbyVision
: Self.supportedDisplayDynamicRange(for: sourceBaseRange)
guard displayManager.isDisplayCriteriaMatchingEnabled else {
clearDisplayCriteria(displayManager, reason: "matching disabled")
return false
}
guard #available(tvOS 17.0, *) else {
clearDisplayCriteria(displayManager, reason: "display criteria unavailable")
return false
}
var formatDescription = Self.makeDisplayFormatDescription(
dynamicRange: displayRange,
width: width,
height: height,
doviProfile: doviProfile,
doviLevel: doviLevel,
doviCompatibilityId: doviCompatibilityId)
if formatDescription == nil, sourceHasDolbyVision {
displayRange = sourceBaseRange
formatDescription = Self.makeDisplayFormatDescription(
dynamicRange: displayRange,
width: width,
height: height,
doviProfile: doviProfile,
doviLevel: doviLevel,
doviCompatibilityId: doviCompatibilityId)
}
guard let formatDescription else {
clearDisplayCriteria(displayManager, reason: "format description failed")
return false
}
let criteriaKey =
"\(displayRange.rawValue)|\(refreshRate)|\(width)x\(height)|\(doviProfile)|\(doviLevel)|\(doviCompatibilityId ?? -1)"
if activeDisplayCriteriaKey == criteriaKey { return true }
displayManager.preferredDisplayCriteria = AVDisplayCriteria(
refreshRate: refreshRate,
formatDescription: formatDescription
)
activeDisplayCriteriaKey = criteriaKey
print(
"[MpvPlayerCore] preferredDisplayCriteria set to \(displayRange.rawValue) (source: \(sourceRange.rawValue), fps: \(refreshRate), \(width)x\(height), DV profile: \(doviProfile), level: \(doviLevel), compat: \(doviCompatibilityId ?? -1))"
)
return true
#else
return false
#endif
}
#if os(tvOS)
private enum DisplayDynamicRange: String {
case sdr = "SDR"
case hdr10 = "HDR10"
case hlg = "HLG"
case dolbyVision = "Dolby Vision"
}
private func clearDisplayCriteria(_ displayManager: AVDisplayManager, reason: String) {
if activeDisplayCriteriaKey != nil || displayManager.preferredDisplayCriteria != nil {
displayManager.preferredDisplayCriteria = nil
activeDisplayCriteriaKey = nil
print("[MpvPlayerCore] preferredDisplayCriteria cleared (\(reason))")
}
}
private static func resolveBaseDisplayDynamicRange(
sigPeak: Double,
gamma: String?,
primaries: String?,
colorMatrix: String?,
doviCompatibilityId: Int64?
) -> DisplayDynamicRange {
let normalizedGamma = normalizeColorTag(gamma)
let normalizedPrimaries = normalizeColorTag(primaries)
let normalizedColorMatrix = normalizeColorTag(colorMatrix)
if normalizedGamma.contains("hlg") || normalizedGamma.contains("arib") {
return .hlg
}
if normalizedGamma.contains("pq") || normalizedGamma.contains("smpte2084")
|| normalizedGamma.contains("st2084") || sigPeak > 1.0
|| normalizedPrimaries.contains("bt2020") || normalizedColorMatrix.contains("bt2020")
{
return .hdr10
}
switch doviCompatibilityId {
case 1, 6:
return .hdr10
case 4:
return .hlg
case 2:
return .sdr
default:
break
}
return .sdr
}
private static func normalizeColorTag(_ value: String?) -> String {
value?.lowercased().filter { $0.isLetter || $0.isNumber } ?? ""
}
private static func supportedDisplayDynamicRange(for range: DisplayDynamicRange) -> DisplayDynamicRange {
let availableModes = AVPlayer.availableHDRModes
switch range {
case .dolbyVision:
if availableModes.contains(.dolbyVision) { return .dolbyVision }
if availableModes.contains(.hdr10) { return .hdr10 }
if availableModes.contains(.hlg) { return .hlg }
return .sdr
case .hdr10:
return availableModes.contains(.hdr10) ? .hdr10 : .sdr
case .hlg:
return availableModes.contains(.hlg) ? .hlg : .sdr
case .sdr:
return .sdr
}
}
private static func makeDisplayFormatDescription(
dynamicRange: DisplayDynamicRange,
width: Int32,
height: Int32,
doviProfile: Int64,
doviLevel: Int64,
doviCompatibilityId: Int64?
) -> CMVideoFormatDescription? {
if dynamicRange == .dolbyVision {
// Profile 8.x always carries a compatibility id; profile 5 has none.
// We assume bl_signal_compatibility_id = 1 (HDR10 base) for profile 8
// because mpv does not expose the compat id and that's by far the
// most common case.
let fallbackCompat: Int64 = doviProfile == 8 ? 1 : 0
let compat = UInt8(truncatingIfNeeded: doviCompatibilityId ?? fallbackCompat)
return makeDolbyVisionFormatDescription(
width: width,
height: height,
profile: UInt8(truncatingIfNeeded: doviProfile),
level: UInt8(truncatingIfNeeded: doviLevel),
compatibility: compat
)
}
let extensions: [CFString: Any]
switch dynamicRange {
case .hdr10:
extensions = [
kCMFormatDescriptionExtension_ColorPrimaries:
kCMFormatDescriptionColorPrimaries_ITU_R_2020,
kCMFormatDescriptionExtension_TransferFunction:
kCMFormatDescriptionTransferFunction_SMPTE_ST_2084_PQ,
kCMFormatDescriptionExtension_YCbCrMatrix:
kCMFormatDescriptionYCbCrMatrix_ITU_R_2020,
]
case .hlg:
extensions = [
kCMFormatDescriptionExtension_ColorPrimaries:
kCMFormatDescriptionColorPrimaries_ITU_R_2020,
kCMFormatDescriptionExtension_TransferFunction:
kCMFormatDescriptionTransferFunction_ITU_R_2100_HLG,
kCMFormatDescriptionExtension_YCbCrMatrix:
kCMFormatDescriptionYCbCrMatrix_ITU_R_2020,
]
case .sdr:
extensions = [
kCMFormatDescriptionExtension_ColorPrimaries:
kCMFormatDescriptionColorPrimaries_ITU_R_709_2,
kCMFormatDescriptionExtension_TransferFunction:
kCMFormatDescriptionTransferFunction_ITU_R_709_2,
kCMFormatDescriptionExtension_YCbCrMatrix:
kCMFormatDescriptionYCbCrMatrix_ITU_R_709_2,
]
case .dolbyVision:
return nil
}
var fd: CMVideoFormatDescription?
let status = CMVideoFormatDescriptionCreate(
allocator: kCFAllocatorDefault,
codecType: kCMVideoCodecType_HEVC,
width: width,
height: height,
extensions: extensions as CFDictionary,
formatDescriptionOut: &fd
)
return status == noErr ? fd : nil
}
/// Build a synthetic 'dvh1' `CMVideoFormatDescription` from the Dolby Vision
/// metadata mpv exposes. Used solely as a hint object for
/// `AVDisplayCriteria(refreshRate:formatDescription:)` — it is never
/// enqueued onto the sample-buffer layer.
private static func makeDolbyVisionFormatDescription(
width: Int32,
height: Int32,
profile: UInt8,
level: UInt8,
compatibility: UInt8
) -> CMVideoFormatDescription? {
// 24-byte Dolby Vision configuration record (dvcC ≤ profile 7, dvvC ≥ 8).
// Layout from ETSI TS 103 572 §7.1.1 — same packing as FFmpeg's
// videotoolbox_dovi_extradata_create (in 0002 patch):
// [0] dv_version_major (= 1)
// [1] dv_version_minor (= 0)
// [2..3] big-endian uint16: profile<<9 | level<<3 | rpu<<2 | el<<1 | bl
// [4] compatibility<<4 | md_compression<<2
// [5..23] reserved zero
var dovi = [UInt8](repeating: 0, count: 24)
dovi[0] = 1
dovi[1] = 0
let flags: UInt16 =
(UInt16(profile) & 0x7f) << 9
| (UInt16(level) & 0x3f) << 3
| (1 << 2) // rpu_present_flag
| (1 << 0) // bl_present_flag
dovi[2] = UInt8((flags >> 8) & 0xff)
dovi[3] = UInt8(flags & 0xff)
dovi[4] = (compatibility & 0x0f) << 4
// CoreMedia carries codec-specific boxes under
// kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms.
let recordKey: CFString = (profile > 7 ? "dvvC" : "dvcC") as CFString
let atoms: [CFString: Any] = [recordKey: Data(dovi) as CFData]
let extensions: [CFString: Any] = [
kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms: atoms as CFDictionary,
kCMFormatDescriptionExtension_ColorPrimaries:
kCMFormatDescriptionColorPrimaries_ITU_R_2020,
kCMFormatDescriptionExtension_TransferFunction:
kCMFormatDescriptionTransferFunction_SMPTE_ST_2084_PQ,
kCMFormatDescriptionExtension_YCbCrMatrix:
kCMFormatDescriptionYCbCrMatrix_ITU_R_2020,
]
var fd: CMVideoFormatDescription?
let status = CMVideoFormatDescriptionCreate(
allocator: kCFAllocatorDefault,
codecType: kCMVideoCodecType_DolbyVisionHEVC, // 'dvh1'
width: width,
height: height,
extensions: extensions as CFDictionary,
formatDescriptionOut: &fd
)
return status == noErr ? fd : nil
}
#endif
func dispose() {
// Guard double-dispose: the plugin calls dispose() then drops the
// strong ref, which fires deinit → dispose() again. The second call
// would re-enter and crash on weak-ref formation during dealloc.
guard !isDisposed else { return }
isDisposed = true
// Reset the HDMI mode hint synchronously while self is still alive
// and on main. An async-to-main dispatch here would be drained after
// dealloc (the plugin sets playerCore = nil right after this call
// returns), leaving the link stuck at the last clip's refresh rate.
updateDisplayCriteria(
doviProfile: 0, doviLevel: 0, doviCompatibilityId: nil,
fps: 0, width: 0, height: 0, sigPeak: 0,
gamma: nil, primaries: nil, colorMatrix: nil)
NotificationCenter.default.removeObserver(self)
#if os(iOS)
ExternalDisplayManager.shared.detach(core: self)
@@ -226,21 +557,44 @@ class MpvPlayerCore: MpvPlayerCoreBase {
}
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
)
#if os(iOS)
let scene = window?.windowScene
NotificationCenter.default.addObserver(
self,
selector: #selector(enterBackground),
name: UIScene.didEnterBackgroundNotification,
object: scene
)
NotificationCenter.default.addObserver(
self,
selector: #selector(enterForeground),
name: UIScene.willEnterForegroundNotification,
object: scene
)
NotificationCenter.default.addObserver(
self,
selector: #selector(sceneDidActivate),
name: UIScene.didActivateNotification,
object: scene
)
#else
NotificationCenter.default.addObserver(
self,
selector: #selector(enterBackground),
name: UIApplication.didEnterBackgroundNotification,
object: nil
)
NotificationCenter.default.addObserver(
self,
selector: #selector(enterForeground),
name: UIApplication.willEnterForegroundNotification,
object: nil
)
#endif
}
@objc private func enterBackground() {
isBackgrounded = true
if isPipActive || isPipStarting {
print("[MpvPlayerCore] Entering background - PiP active/starting, keeping video")
return
@@ -251,6 +605,7 @@ class MpvPlayerCore: MpvPlayerCoreBase {
}
@objc private func enterForeground() {
isBackgrounded = false
if isPipActive {
print("[MpvPlayerCore] Entering foreground - PiP active, skipping vid restore")
return
@@ -259,4 +614,16 @@ class MpvPlayerCore: MpvPlayerCoreBase {
print("[MpvPlayerCore] Entering foreground - enabling video")
setProperty("vid", value: "auto")
}
#if os(iOS)
@objc private func sceneDidActivate() {
isBackgrounded = false
if isPipActive {
return
}
setProperty("vid", value: "auto")
restoreVideoPresentation()
}
#endif
}
+73 -1
View File
@@ -14,7 +14,7 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPluginS
// MpvPluginShared conformance
var coreBase: MpvPlayerCoreBase? { playerCore }
func setPlayerVisible(_ visible: Bool) { playerCore?.setVisible(visible) }
func setPlayerVisible(_ visible: Bool, restoreOnWindowVisible _: Bool) { playerCore?.setVisible(visible) }
func updatePlayerFrame() { playerCore?.updateFrame() }
// PiP
@@ -81,6 +81,8 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPluginS
handleObserveProperty(call: call, result: result)
case "command":
handleCommand(call: call, result: result)
case "setDisplayCriteria":
handleSetDisplayCriteria(call: call, result: result)
case "setVisible":
handleSetVisible(call: call, result: result)
case "isInitialized":
@@ -363,6 +365,76 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPluginS
}
}
private func handleSetDisplayCriteria(call: FlutterMethodCall, result: @escaping FlutterResult) {
guard let args = call.arguments as? [String: Any] else {
result(FlutterError(code: "INVALID_ARGS", message: "Missing arguments", details: nil))
return
}
guard let core = playerCore else {
result(nil)
return
}
guard let raw = args["criteria"] as? [String: Any] else {
DispatchQueue.main.async {
core.setServerDisplayCriteria(nil)
result(nil)
}
return
}
let criteria = ServerDisplayCriteria(
doviProfile: int64Value(raw["doviProfile"]) ?? 0,
doviLevel: int64Value(raw["doviLevel"]) ?? 0,
doviCompatibilityId: int64Value(raw["doviCompatibilityId"]),
fps: doubleValue(raw["fps"]) ?? 0,
width: Int32(truncatingIfNeeded: int64Value(raw["width"]) ?? 0),
height: Int32(truncatingIfNeeded: int64Value(raw["height"]) ?? 0),
gamma: stringValue(raw["transfer"]),
primaries: stringValue(raw["primaries"]),
colorMatrix: stringValue(raw["matrix"])
)
DispatchQueue.main.async {
core.setServerDisplayCriteria(criteria)
result(nil)
}
}
private func int64Value(_ value: Any?) -> Int64? {
switch value {
case let value as Int64:
return value
case let value as Int:
return Int64(value)
case let value as NSNumber:
return value.int64Value
case let value as String:
return Int64(value)
default:
return nil
}
}
private func doubleValue(_ value: Any?) -> Double? {
switch value {
case let value as Double:
return value
case let value as NSNumber:
return value.doubleValue
case let value as String:
return Double(value)
default:
return nil
}
}
private func stringValue(_ value: Any?) -> String? {
guard let value else { return nil }
let string = String(describing: value).trimmingCharacters(in: .whitespacesAndNewlines)
return string.isEmpty ? nil : string
}
// MARK: - Helpers
private func findKeyWindow() -> UIWindow? {
+9 -4
View File
@@ -1,18 +1,23 @@
require 'dotenv/load'
Dotenv.load("../../.env")
require 'shellwords'
PROJECT_ROOT = File.expand_path("../..", __dir__)
PROJECT_ROOT_ARG = Shellwords.escape(PROJECT_ROOT)
Dotenv.load(File.join(PROJECT_ROOT, ".env"))
default_platform(:ios)
platform :ios do
desc "Build and deploy to App Store"
lane :deploy_appstore do
git_commit = `git rev-parse --short HEAD`.strip
git_commit = `git -C #{PROJECT_ROOT_ARG} rev-parse --short HEAD`.strip
# Build the Flutter app
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")
sh("cd #{PROJECT_ROOT_ARG} && flutter build ipa --dart-define=ENABLE_SENTRY=true --dart-define=GIT_COMMIT=#{git_commit} --dart-define=SENTRY_ENVIRONMENT=app-store --dart-define=SENTRY_DIST=app-store --split-debug-info=debug-info/ios")
# Upload debug symbols
sh("cd #{ENV['PWD']}/.. && ./scripts/upload-symbols.sh ios")
sh("cd #{PROJECT_ROOT_ARG} && SENTRY_DIST=app-store ./scripts/upload-symbols.sh ios")
# Upload to App Store
upload_to_app_store(
+54 -5
View File
@@ -570,11 +570,7 @@ LazyDatabase _openConnection() {
// Migrate from old location on desktop (was in Documents subfolder)
if (!Platform.isAndroid && !Platform.isIOS && !await file.exists()) {
final oldFolder = await getApplicationDocumentsDirectory();
final oldFile = File(p.join(oldFolder.path, 'plezy_downloads.db'));
if (await oldFile.exists()) {
await oldFile.rename(file.path);
}
await migrateLegacyDesktopDatabase(target: file);
}
return NativeDatabase.createInBackground(
@@ -589,3 +585,56 @@ LazyDatabase _openConnection() {
);
});
}
/// Move the legacy desktop DB from `Documents/` to `ApplicationSupport/`.
/// `File.rename` only works within a single volume — Windows users with
/// OneDrive-redirected Documents (or any cross-drive setup) hit
/// `ERROR_NOT_SAME_DEVICE` (errno 17), and the uncaught throw used to
/// strand the splash on "Loading servers..." forever (#1022). Falls back
/// to copy + delete on any [FileSystemException] and swallows all errors
/// so a failed migration never propagates fatally.
///
/// [sourceOverride] and [renameOverride] are test seams — production
/// callers leave them null.
Future<void> migrateLegacyDesktopDatabase({
required File target,
File? sourceOverride,
Future<void> Function(File source, String targetPath)? renameOverride,
}) async {
final File oldFile;
if (sourceOverride != null) {
oldFile = sourceOverride;
} else {
final oldFolder = await getApplicationDocumentsDirectory();
oldFile = File(p.join(oldFolder.path, 'plezy_downloads.db'));
}
if (!await oldFile.exists()) return;
try {
if (renameOverride != null) {
await renameOverride(oldFile, target.path);
} else {
await oldFile.rename(target.path);
}
appLogger.i('Moved legacy DB from ${oldFile.path} → ${target.path}');
return;
} on FileSystemException catch (e) {
appLogger.w('Legacy DB rename failed (osError=${e.osError?.errorCode}); falling back to copy', error: e);
}
try {
await oldFile.copy(target.path);
try {
await oldFile.delete();
} catch (e) {
// Leaving the source behind is non-fatal — the new file is canonical.
appLogger.w('Legacy DB copied but old file delete failed: $e');
}
appLogger.i('Copied legacy DB from ${oldFile.path} → ${target.path}');
} catch (e, st) {
// Copy itself failed (disk full, source locked by OneDrive sync,
// permissions). Leave both files alone — drift will create a fresh
// empty DB at the new location, and a future relaunch can retry.
appLogger.e('Legacy DB migration failed entirely', error: e, stackTrace: st);
}
}
+8 -1
View File
@@ -93,5 +93,12 @@ class MediaServerHttpException extends MediaServerException {
type == MediaServerHttpErrorType.receiveTimeout;
@override
String toString() => 'MediaServerHttpException(${type.name}: $message)';
String toString() {
final parts = <String>[type.name];
if (statusCode != null) parts.add('HTTP $statusCode');
if (message.isNotEmpty) parts.add(message);
final uri = requestUri;
if (uri != null) parts.add('${uri.host}${uri.path}');
return 'MediaServerHttpException(${parts.join(': ')})';
}
}
+11 -8
View File
@@ -5,19 +5,22 @@ import 'package:flutter/services.dart';
extension KeyEventActionable on KeyEvent {
bool get isActionable => this is KeyDownEvent || this is KeyRepeatEvent;
bool get isPhysicalKeyboardEvent => deviceType == ui.KeyEventDeviceType.keyboard;
// Only true keyboard submit keys belong here. LogicalKeyboardKey.select is
// a TV-remote / dpad-center key (Android DPAD_CENTER, tvOS UIPressTypeSelect)
// — USB keyboards never emit it. The custom Flutter tvOS engine reports its
// synthesized Siri Remote presses with deviceType=keyboard, so classifying
// select-with-keyboard-deviceType as a "keyboard enter" would route center
// dpad through TextField submit and skip the TV virtual keyboard.
bool get isPhysicalKeyboardEnter =>
deviceType == ui.KeyEventDeviceType.keyboard &&
(logicalKey == LogicalKeyboardKey.enter ||
logicalKey == LogicalKeyboardKey.numpadEnter ||
logicalKey == LogicalKeyboardKey.select);
(logicalKey == LogicalKeyboardKey.enter || logicalKey == LogicalKeyboardKey.numpadEnter);
bool get isTvSelectEvent {
if (isPhysicalKeyboardEvent) return false;
// Dpad-center / gamepad-A are TV-remote-only — always treat as TV select,
// regardless of the deviceType claim from the engine.
if (logicalKey == LogicalKeyboardKey.select || logicalKey == LogicalKeyboardKey.gameButtonA) return true;
if (logicalKey == LogicalKeyboardKey.enter || logicalKey == LogicalKeyboardKey.numpadEnter) {
return deviceType != ui.KeyEventDeviceType.keyboard;
}
return false;
if (isPhysicalKeyboardEvent) return false;
return logicalKey == LogicalKeyboardKey.enter || logicalKey == LogicalKeyboardKey.numpadEnter;
}
}
+120 -17
View File
@@ -32,6 +32,10 @@ KeyEventResult _handleInputKey({
}) {
final key = event.logicalKey;
if (_shouldPassNativeTvKeyToPlatform(usesTvKeyboard: usesTvKeyboard, enabled: enabled, event: event)) {
return KeyEventResult.skipRemainingHandlers;
}
if (usesTvKeyboard && enabled && event.isTvSelectEvent) {
if (event is KeyDownEvent) openKeyboard();
return KeyEventResult.handled;
@@ -93,6 +97,18 @@ KeyEventResult _handleInputKey({
return KeyEventResult.ignored;
}
bool _shouldPassNativeTvKeyToPlatform({required bool usesTvKeyboard, required bool enabled, required KeyEvent event}) {
if (!enabled || usesTvKeyboard || !PlatformDetector.isTV()) return false;
// Android TV provides its own IME. Remote keys must reach the platform so
// users can move around that keyboard instead of escaping the app field.
final key = event.logicalKey;
final isEngineSynthesizedTvSelect = key == LogicalKeyboardKey.select || key == LogicalKeyboardKey.gameButtonA;
if (event.isPhysicalKeyboardEvent && !isEngineSynthesizedTvSelect) return false;
return key.isDpadDirection || key.isBackKey || event.isTvSelectEvent;
}
KeyEventResult _handleTvHardwareKeyboardKey({
required TextEditingController controller,
required KeyEvent event,
@@ -430,6 +446,13 @@ abstract class _FocusableTextInputBase extends StatelessWidget {
});
bool get _hasTvKeyboard => _usesTvKeyboard(enableTvKeyboard);
bool get _usesNativeTvKeyboard => PlatformDetector.isTV() && !_hasTvKeyboard;
VoidCallback? get _effectiveOnEditingComplete {
if (onEditingComplete != null) return onEditingComplete;
if (_usesNativeTvKeyboard && onSubmitted == null) return _handleTvKeyboardAction;
return null;
}
void _showTvKeyboard(BuildContext context) {
if (!enabled) return;
@@ -445,10 +468,22 @@ abstract class _FocusableTextInputBase extends StatelessWidget {
maxLines: maxLines,
onChanged: onChanged,
onSubmitted: onSubmitted,
onAction: onEditingComplete ?? onSelect,
onAction: _handleTvKeyboardAction,
);
}
void _handleTvKeyboardAction() {
if (onEditingComplete != null) {
onEditingComplete!();
} else if (onSelect != null) {
onSelect!();
} else if (onNavigateDown != null) {
onNavigateDown!();
} else {
_defaultEditingComplete(textInputAction);
}
}
KeyEventResult _handleKey(BuildContext context, FocusNode _, KeyEvent event) {
return _handleInputKey(
controller: controller,
@@ -473,16 +508,84 @@ abstract class _FocusableTextInputBase extends StatelessWidget {
);
}
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),
);
Widget buildFocusableInput(BuildContext context, Widget Function(bool usesTvKeyboard, FocusNode focusNode) builder) {
return _FocusableTextInputHost(input: this, builder: builder);
}
}
class _FocusableTextInputHost extends StatefulWidget {
final _FocusableTextInputBase input;
final Widget Function(bool usesTvKeyboard, FocusNode focusNode) builder;
const _FocusableTextInputHost({required this.input, required this.builder});
@override
State<_FocusableTextInputHost> createState() => _FocusableTextInputHostState();
}
class _FocusableTextInputHostState extends State<_FocusableTextInputHost> {
FocusNode? _ownedFocusNode;
FocusNode? _installedFocusNode;
FocusOnKeyEventCallback? _previousOnKeyEvent;
late final FocusOnKeyEventCallback _keyHandler = _handleKey;
FocusNode get _effectiveFocusNode =>
widget.input.focusNode ?? (_ownedFocusNode ??= FocusNode(debugLabel: 'FocusableTextInput'));
@override
void didUpdateWidget(_FocusableTextInputHost oldWidget) {
super.didUpdateWidget(oldWidget);
if (oldWidget.input.focusNode != widget.input.focusNode) {
_restoreInstalledHandler();
}
}
@override
void dispose() {
_restoreInstalledHandler();
_ownedFocusNode?.dispose();
super.dispose();
}
KeyEventResult _handleKey(FocusNode node, KeyEvent event) {
final previous = _previousOnKeyEvent;
if (previous != null && !identical(previous, _keyHandler)) {
final result = previous(node, event);
if (result != KeyEventResult.ignored) return result;
}
return widget.input._handleKey(context, node, event);
}
void _installKeyHandler(FocusNode node) {
// Handle D-pad escapes on the field's own node so EditableText shortcuts
// can't consume directions before our reusable navigation callbacks run.
if (_installedFocusNode == node) {
if (identical(node.onKeyEvent, _keyHandler)) return;
_previousOnKeyEvent = node.onKeyEvent;
node.onKeyEvent = _keyHandler;
return;
}
_restoreInstalledHandler();
_installedFocusNode = node;
_previousOnKeyEvent = node.onKeyEvent;
node.onKeyEvent = _keyHandler;
}
void _restoreInstalledHandler() {
final node = _installedFocusNode;
if (node != null && identical(node.onKeyEvent, _keyHandler)) {
node.onKeyEvent = _previousOnKeyEvent;
}
_installedFocusNode = null;
_previousOnKeyEvent = null;
}
@override
Widget build(BuildContext context) {
final focusNode = _effectiveFocusNode;
_installKeyHandler(focusNode);
return widget.builder(widget.input._hasTvKeyboard, focusNode);
}
}
@@ -530,9 +633,9 @@ class FocusableTextField extends _FocusableTextInputBase {
Widget build(BuildContext context) {
return buildFocusableInput(
context,
(usesTvKeyboard) => TextField(
(usesTvKeyboard, effectiveFocusNode) => TextField(
controller: controller,
focusNode: focusNode,
focusNode: effectiveFocusNode,
enabled: enabled,
decoration: decoration,
keyboardType: usesTvKeyboard ? TextInputType.none : keyboardType,
@@ -540,7 +643,7 @@ class FocusableTextField extends _FocusableTextInputBase {
inputFormatters: inputFormatters,
onChanged: onChanged,
onSubmitted: onSubmitted,
onEditingComplete: onEditingComplete,
onEditingComplete: _effectiveOnEditingComplete,
autofocus: autofocus,
autocorrect: autocorrect,
enableSuggestions: enableSuggestions,
@@ -605,9 +708,9 @@ class FocusableTextFormField extends _FocusableTextInputBase {
Widget build(BuildContext context) {
return buildFocusableInput(
context,
(usesTvKeyboard) => TextFormField(
(usesTvKeyboard, effectiveFocusNode) => TextFormField(
controller: controller,
focusNode: focusNode,
focusNode: effectiveFocusNode,
enabled: enabled,
decoration: decoration,
keyboardType: usesTvKeyboard ? TextInputType.none : keyboardType,
@@ -615,7 +718,7 @@ class FocusableTextFormField extends _FocusableTextInputBase {
inputFormatters: inputFormatters,
onChanged: onChanged,
onFieldSubmitted: onFieldSubmitted,
onEditingComplete: onEditingComplete,
onEditingComplete: _effectiveOnEditingComplete,
validator: validator,
autovalidateMode: autovalidateMode,
onSaved: onSaved,
+18 -4
View File
@@ -62,10 +62,18 @@ KeyEventResult handleBackKeyAction(KeyEvent event, VoidCallback onBack) {
return KeyEventResult.handled;
}
if (PlatformDetector.isAppleTV() && event.isPhysicalKeyboardEvent && event is KeyDownEvent) {
BackKeyCoordinator.markHandled();
BackKeyUpSuppressor.suppressBackUntilKeyUp();
onBack();
// AppleTV physical-keyboard back (Siri Remote Menu via engine-synthesized
// escape): run onBack on KeyDown only; consume KeyUp silently. The
// suppressor-based "arm-on-KeyDown, clear-on-KeyUp" pattern leaks here
// because onBack typically calls Navigator.pop, swapping the focus tree
// before the matching KeyUp is dispatched — the orphaned KeyUp then never
// reaches a consumeIfSuppressed call, pinning the suppressor armed and
// silently swallowing the next press's KeyDown.
if (PlatformDetector.isAppleTV() && event.isPhysicalKeyboardEvent) {
if (event is KeyDownEvent) {
BackKeyCoordinator.markHandled();
onBack();
}
return KeyEventResult.handled;
}
@@ -174,6 +182,12 @@ FocusOnKeyEventCallback dpadKeyHandler({
class BackKeySuppressorObserver extends NavigatorObserver {
@override
void didPop(Route route, Route? previousRoute) {
// On AppleTV, handleBackKeyAction consumes the KeyUp silently regardless,
// so the suppressor isn't needed and arming it would pin state across the
// pop's focus-tree swap. (The atomic engine fix delivers KeyDown+KeyUp in
// a single recognizer Began callback, so didPop fires squarely inside the
// window where BackKeyPressTracker.isBackKeyDown is true.)
if (PlatformDetector.isAppleTV()) return;
if (BackKeyPressTracker.isBackKeyDown) {
BackKeyUpSuppressor.suppressBackUntilKeyUp();
}
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "Søg til næste undertekst",
"subSeekPrev": "Søg til forrige undertekst",
"shaderToggle": "Skift shadere",
"skipMarker": "Spring intro/rulletekster over"
"skipMarker": "Spring intro/rulletekster over",
"screenshot": "Tag skærmbillede"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "Afspil fra begyndelsen",
"playVersion": "Afspil version..."
},
"rateSheet": {
"title": "Bedøm",
"server": "Server",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "Angiv en score",
"notRated": "Ikke bedømt",
"liked": "Synes godt om",
"notLiked": "Ikke liket",
"saved": "Gemt",
"notAvailable": "Intet match fundet",
"noConnectedTrackers": "Forbind en tracker i Indstillinger for at bedømme der."
},
"accessibility": {
"mediaCardMovie": "${title}, film",
"mediaCardShow": "${title}, TV-serie",
@@ -420,6 +434,7 @@
"endsAt": "Slutter kl. ${time}",
"pipActive": "Afspiller i billede-i-billede",
"pipFailed": "Billede-i-billede kunne ikke starte",
"screenshotSaved": "Skærmbillede gemt",
"pipErrors": {
"androidVersion": "Kræver Android 8.0 eller nyere",
"iosVersion": "Kræver iOS 15.0 eller nyere",
@@ -691,8 +706,18 @@
"dateAdded": "Tilføjet dato",
"releaseDate": "Udgivelsesdato",
"rating": "Vurdering",
"communityRating": "Fællesskabsvurdering",
"criticRating": "Kritikerbedømmelse",
"lastPlayed": "Sidst afspillet",
"datePlayed": "Afspilningsdato",
"playCount": "Antal afspilninger",
"productionYear": "Produktionsår",
"runtime": "Spilletid",
"officialRating": "Officiel vurdering",
"premiereDate": "Premieredato",
"startDate": "Startdato",
"airTime": "Sendetid",
"studio": "Studie",
"random": "Tilfældig",
"dateShared": "Delt dato",
"latestEpisodeAirDate": "Seneste episodes premieredato"
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "Zum nächsten Untertitel springen",
"subSeekPrev": "Zum vorherigen Untertitel springen",
"shaderToggle": "Shader umschalten",
"skipMarker": "Intro/Abspann überspringen"
"skipMarker": "Intro/Abspann überspringen",
"screenshot": "Screenshot aufnehmen"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "Von Anfang an abspielen",
"playVersion": "Version abspielen..."
},
"rateSheet": {
"title": "Bewerten",
"server": "Server",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "Eine Wertung festlegen",
"notRated": "Nicht bewertet",
"liked": "Gefällt mir",
"notLiked": "Nicht geliket",
"saved": "Gespeichert",
"notAvailable": "Keine Übereinstimmung gefunden",
"noConnectedTrackers": "Verbinde einen Tracker in den Einstellungen, um dort zu bewerten."
},
"accessibility": {
"mediaCardMovie": "${title}, Film",
"mediaCardShow": "${title}, Serie",
@@ -420,6 +434,7 @@
"endsAt": "Endet um ${time}",
"pipActive": "Wiedergabe im Bild-in-Bild-Modus",
"pipFailed": "Bild-in-Bild konnte nicht gestartet werden",
"screenshotSaved": "Screenshot gespeichert",
"pipErrors": {
"androidVersion": "Erfordert Android 8.0 oder neuer",
"iosVersion": "Erfordert iOS 15.0 oder neuer",
@@ -691,8 +706,18 @@
"dateAdded": "Hinzugefügt am",
"releaseDate": "Erscheinungsdatum",
"rating": "Bewertung",
"communityRating": "Community-Bewertung",
"criticRating": "Kritikerbewertung",
"lastPlayed": "Zuletzt abgespielt",
"datePlayed": "Wiedergabedatum",
"playCount": "Wiedergaben",
"productionYear": "Produktionsjahr",
"runtime": "Laufzeit",
"officialRating": "Offizielle Bewertung",
"premiereDate": "Premierendatum",
"startDate": "Startdatum",
"airTime": "Sendezeit",
"studio": "Studio",
"random": "Zufällig",
"dateShared": "Datum geteilt",
"latestEpisodeAirDate": "Letztes Folgenausstrahlungsdatum"
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "Seek to Next Subtitle",
"subSeekPrev": "Seek to Previous Subtitle",
"shaderToggle": "Toggle Shaders",
"skipMarker": "Skip Intro/Credits"
"skipMarker": "Skip Intro/Credits",
"screenshot": "Take Screenshot"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "Play from Beginning",
"playVersion": "Play Version..."
},
"rateSheet": {
"title": "Rate",
"server": "Server",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "Set a score",
"notRated": "Not rated",
"liked": "Liked",
"notLiked": "Not liked",
"saved": "Saved",
"notAvailable": "No match found",
"noConnectedTrackers": "Connect a tracker in Settings to rate there."
},
"accessibility": {
"mediaCardMovie": "${title}, movie",
"mediaCardShow": "${title}, TV show",
@@ -420,6 +434,7 @@
"endsAt": "Ends at ${time}",
"pipActive": "Playing in Picture-in-Picture",
"pipFailed": "Picture-in-picture failed to start",
"screenshotSaved": "Screenshot saved",
"pipErrors": {
"androidVersion": "Requires Android 8.0 or newer",
"iosVersion": "Requires iOS 15.0 or newer",
@@ -691,8 +706,18 @@
"dateAdded": "Date Added",
"releaseDate": "Release Date",
"rating": "Rating",
"communityRating": "Community Rating",
"criticRating": "Critic Rating",
"lastPlayed": "Last Played",
"datePlayed": "Date Played",
"playCount": "Play Count",
"productionYear": "Production Year",
"runtime": "Runtime",
"officialRating": "Official Rating",
"premiereDate": "Premiere Date",
"startDate": "Start Date",
"airTime": "Air Time",
"studio": "Studio",
"random": "Random",
"dateShared": "Date Shared",
"latestEpisodeAirDate": "Latest Episode Air Date"
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "Ir al Siguiente Subtítulo",
"subSeekPrev": "Ir al Anterior Subtítulo",
"shaderToggle": "Alternar Shaders",
"skipMarker": "Saltar Intro/Créditos"
"skipMarker": "Saltar Intro/Créditos",
"screenshot": "Tomar captura de pantalla"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "Reproducir desde el inicio",
"playVersion": "Reproducir versión..."
},
"rateSheet": {
"title": "Calificar",
"server": "Servidor",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "Establecer puntuación",
"notRated": "Sin calificar",
"liked": "Me gusta",
"notLiked": "Sin Me gusta",
"saved": "Guardado",
"notAvailable": "No se encontró coincidencia",
"noConnectedTrackers": "Conecta un tracker en Ajustes para calificar allí."
},
"accessibility": {
"mediaCardMovie": "${title}, película",
"mediaCardShow": "${title}, serie de TV",
@@ -420,6 +434,7 @@
"endsAt": "Termina a las ${time}",
"pipActive": "Reproduciendo en Imagen en Imagen",
"pipFailed": "Error al iniciar Imagen en Imagen",
"screenshotSaved": "Captura de pantalla guardada",
"pipErrors": {
"androidVersion": "Requiere Android 8.0 o más reciente",
"iosVersion": "Requiere iOS 15.0 o más reciente",
@@ -691,8 +706,18 @@
"dateAdded": "Fecha de adición",
"releaseDate": "Fecha de estreno",
"rating": "Valoración",
"communityRating": "Calificación de comunidad",
"criticRating": "Calificación de crítica",
"lastPlayed": "Última reproducción",
"datePlayed": "Fecha de reproducción",
"playCount": "Reproducciones",
"productionYear": "Año de producción",
"runtime": "Duración",
"officialRating": "Calificación oficial",
"premiereDate": "Fecha de estreno",
"startDate": "Fecha de inicio",
"airTime": "Hora de emisión",
"studio": "Estudio",
"random": "Aleatorio",
"dateShared": "Fecha de compartición",
"latestEpisodeAirDate": "Última fecha de emisión del episodio"
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "Rechercher le sous-titre suivant",
"subSeekPrev": "Rechercher le sous-titre précédent",
"shaderToggle": "Activer/désactiver les shaders",
"skipMarker": "Passer l'intro/le générique"
"skipMarker": "Passer l'intro/le générique",
"screenshot": "Prendre une capture d'écran"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "Lire depuis le début",
"playVersion": "Lire la version..."
},
"rateSheet": {
"title": "Noter",
"server": "Serveur",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "Définir une note",
"notRated": "Non noté",
"liked": "Aimé",
"notLiked": "Non aimé",
"saved": "Enregistré",
"notAvailable": "Aucune correspondance trouvée",
"noConnectedTrackers": "Connectez un tracker dans Paramètres pour y noter."
},
"accessibility": {
"mediaCardMovie": "${title}, film",
"mediaCardShow": "${title}, show TV",
@@ -420,6 +434,7 @@
"endsAt": "Fin à ${time}",
"pipActive": "Lecture en mode image dans l'image",
"pipFailed": "Échec du démarrage du mode image dans l'image",
"screenshotSaved": "Capture d'écran enregistrée",
"pipErrors": {
"androidVersion": "Nécessite Android 8.0 ou plus récent",
"iosVersion": "Nécessite iOS 15.0 ou plus récent",
@@ -691,8 +706,18 @@
"dateAdded": "Date d'ajout",
"releaseDate": "Date de sortie",
"rating": "Note",
"communityRating": "Note communautaire",
"criticRating": "Note critique",
"lastPlayed": "Dernière lecture",
"datePlayed": "Date de lecture",
"playCount": "Lectures",
"productionYear": "Année de production",
"runtime": "Durée",
"officialRating": "Classification officielle",
"premiereDate": "Date de première",
"startDate": "Date de début",
"airTime": "Heure de diffusion",
"studio": "Studio",
"random": "Aléatoire",
"dateShared": "Date de partage",
"latestEpisodeAirDate": "Dernière date de diffusion"
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "Vai al sottotitolo successivo",
"subSeekPrev": "Vai al sottotitolo precedente",
"shaderToggle": "Attiva/disattiva shader",
"skipMarker": "Salta intro/titoli di coda"
"skipMarker": "Salta intro/titoli di coda",
"screenshot": "Cattura schermata"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "Riproduci dall'inizio",
"playVersion": "Riproduci versione..."
},
"rateSheet": {
"title": "Valuta",
"server": "Server",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "Imposta un punteggio",
"notRated": "Non valutato",
"liked": "Mi piace",
"notLiked": "Non contrassegnato con Mi piace",
"saved": "Salvato",
"notAvailable": "Nessuna corrispondenza trovata",
"noConnectedTrackers": "Collega un tracker in Impostazioni per valutarlo lì."
},
"accessibility": {
"mediaCardMovie": "${title}, film",
"mediaCardShow": "${title}, serie TV",
@@ -420,6 +434,7 @@
"endsAt": "Finisce alle ${time}",
"pipActive": "Riproduzione in Picture-in-Picture",
"pipFailed": "Impossibile avviare la modalità Picture-in-Picture",
"screenshotSaved": "Schermata salvata",
"pipErrors": {
"androidVersion": "Richiede Android 8.0 o versioni successive",
"iosVersion": "Richiede iOS 15.0 o versioni successive",
@@ -691,8 +706,18 @@
"dateAdded": "Data di aggiunta",
"releaseDate": "Data di uscita",
"rating": "Valutazione",
"communityRating": "Valutazione della community",
"criticRating": "Valutazione critica",
"lastPlayed": "Ultima riproduzione",
"datePlayed": "Data di riproduzione",
"playCount": "Riproduzioni",
"productionYear": "Anno di produzione",
"runtime": "Durata",
"officialRating": "Classificazione ufficiale",
"premiereDate": "Data di première",
"startDate": "Data di inizio",
"airTime": "Orario di messa in onda",
"studio": "Studio",
"random": "Casuale",
"dateShared": "Data di condivisione",
"latestEpisodeAirDate": "Data ultima messa in onda"
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "次の字幕にシーク",
"subSeekPrev": "前の字幕にシーク",
"shaderToggle": "シェーダー切替",
"skipMarker": "イントロ/クレジットをスキップ"
"skipMarker": "イントロ/クレジットをスキップ",
"screenshot": "スクリーンショットを撮る"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "最初から再生",
"playVersion": "バージョンを再生..."
},
"rateSheet": {
"title": "評価",
"server": "サーバー",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "スコアを設定",
"notRated": "未評価",
"liked": "いいね済み",
"notLiked": "いいねなし",
"saved": "保存済み",
"notAvailable": "一致なし",
"noConnectedTrackers": "設定でトラッカーを接続すると、そこで評価できます。"
},
"accessibility": {
"mediaCardMovie": "${title}、映画",
"mediaCardShow": "${title}、テレビ番組",
@@ -420,6 +434,7 @@
"endsAt": "${time}に終了",
"pipActive": "ピクチャーインピクチャーで再生中",
"pipFailed": "ピクチャーインピクチャーの開始に失敗しました",
"screenshotSaved": "スクリーンショットを保存しました",
"pipErrors": {
"androidVersion": "Android 8.0以降が必要です",
"iosVersion": "iOS 15.0以降が必要です",
@@ -691,8 +706,18 @@
"dateAdded": "追加日",
"releaseDate": "リリース日",
"rating": "評価",
"communityRating": "コミュニティ評価",
"criticRating": "批評家評価",
"lastPlayed": "最終再生",
"datePlayed": "再生日",
"playCount": "再生回数",
"productionYear": "製作年",
"runtime": "再生時間",
"officialRating": "公式レーティング",
"premiereDate": "プレミア日",
"startDate": "開始日",
"airTime": "放送時刻",
"studio": "スタジオ",
"random": "ランダム",
"dateShared": "共有日",
"latestEpisodeAirDate": "最新エピソード放送日"
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "다음 자막으로 이동",
"subSeekPrev": "이전 자막으로 이동",
"shaderToggle": "셰이더 전환",
"skipMarker": "인트로/크레딧 건너뛰기"
"skipMarker": "인트로/크레딧 건너뛰기",
"screenshot": "스크린샷 찍기"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "처음부터 재생",
"playVersion": "버전 재생..."
},
"rateSheet": {
"title": "평가",
"server": "서버",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "점수 설정",
"notRated": "평가 없음",
"liked": "좋아요",
"notLiked": "좋아요 아님",
"saved": "저장됨",
"notAvailable": "일치 항목 없음",
"noConnectedTrackers": "설정에서 트래커를 연결하면 거기에도 평가할 수 있습니다."
},
"accessibility": {
"mediaCardMovie": "${title}, 영화",
"mediaCardShow": "${title}, TV 프로그램",
@@ -420,6 +434,7 @@
"endsAt": "${time}에 종료",
"pipActive": "화면 속 화면으로 재생 중",
"pipFailed": "화면 속 화면 모드를 시작할 수 없습니다",
"screenshotSaved": "스크린샷 저장됨",
"pipErrors": {
"androidVersion": "Android 8.0 이상이 필요합니다",
"iosVersion": "iOS 15.0 이상이 필요합니다",
@@ -691,8 +706,18 @@
"dateAdded": "추가된 날짜",
"releaseDate": "출시일",
"rating": "평점",
"communityRating": "커뮤니티 평점",
"criticRating": "평론가 평점",
"lastPlayed": "마지막 재생",
"datePlayed": "재생일",
"playCount": "재생 횟수",
"productionYear": "제작 연도",
"runtime": "재생 시간",
"officialRating": "공식 등급",
"premiereDate": "최초 공개일",
"startDate": "시작일",
"airTime": "방영 시간",
"studio": "스튜디오",
"random": "무작위",
"dateShared": "공유된 날짜",
"latestEpisodeAirDate": "최신 에피소드 방영일"
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "Spol til neste undertekst",
"subSeekPrev": "Spol til forrige undertekst",
"shaderToggle": "Veksle shadere",
"skipMarker": "Hopp over intro/rulletekst"
"skipMarker": "Hopp over intro/rulletekst",
"screenshot": "Ta skjermbilde"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "Spill fra begynnelsen",
"playVersion": "Spill av versjon..."
},
"rateSheet": {
"title": "Vurder",
"server": "Server",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "Sett en poengsum",
"notRated": "Ikke vurdert",
"liked": "Likt",
"notLiked": "Ikke likt",
"saved": "Lagret",
"notAvailable": "Ingen treff",
"noConnectedTrackers": "Koble til en sporer i Innstillinger for å vurdere der."
},
"accessibility": {
"mediaCardMovie": "${title}, film",
"mediaCardShow": "${title}, TV-serie",
@@ -420,6 +434,7 @@
"endsAt": "Slutter kl. ${time}",
"pipActive": "Spiller i bilde-i-bilde",
"pipFailed": "Bilde-i-bilde kunne ikke starte",
"screenshotSaved": "Skjermbilde lagret",
"pipErrors": {
"androidVersion": "Krever Android 8.0 eller nyere",
"iosVersion": "Krever iOS 15.0 eller nyere",
@@ -691,8 +706,18 @@
"dateAdded": "Lagt til-dato",
"releaseDate": "Utgivelsesdato",
"rating": "Vurdering",
"communityRating": "Fellesskapsvurdering",
"criticRating": "Kritikervurdering",
"lastPlayed": "Sist spilt",
"datePlayed": "Avspillingsdato",
"playCount": "Avspillinger",
"productionYear": "Produksjonsår",
"runtime": "Varighet",
"officialRating": "Offisiell vurdering",
"premiereDate": "Premieredato",
"startDate": "Startdato",
"airTime": "Sendetid",
"studio": "Studio",
"random": "Tilfeldig",
"dateShared": "Delingsdato",
"latestEpisodeAirDate": "Siste episodes sendedato"
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "Naar volgende ondertitel",
"subSeekPrev": "Naar vorige ondertitel",
"shaderToggle": "Shaders aan/uit",
"skipMarker": "Intro/aftiteling overslaan"
"skipMarker": "Intro/aftiteling overslaan",
"screenshot": "Schermafbeelding maken"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "Afspelen vanaf het begin",
"playVersion": "Versie afspelen..."
},
"rateSheet": {
"title": "Beoordelen",
"server": "Server",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "Score instellen",
"notRated": "Niet beoordeeld",
"liked": "Geliket",
"notLiked": "Niet geliket",
"saved": "Opgeslagen",
"notAvailable": "Geen match gevonden",
"noConnectedTrackers": "Verbind een tracker in Instellingen om daar te beoordelen."
},
"accessibility": {
"mediaCardMovie": "${title}, film",
"mediaCardShow": "${title}, TV-serie",
@@ -420,6 +434,7 @@
"endsAt": "Eindigt om ${time}",
"pipActive": "Afspelen in beeld-in-beeld",
"pipFailed": "Beeld-in-beeld kon niet worden gestart",
"screenshotSaved": "Schermafbeelding opgeslagen",
"pipErrors": {
"androidVersion": "Vereist Android 8.0 of nieuwer",
"iosVersion": "Vereist iOS 15.0 of nieuwer",
@@ -691,8 +706,18 @@
"dateAdded": "Toegevoegd op",
"releaseDate": "Uitgavedatum",
"rating": "Beoordeling",
"communityRating": "Communitybeoordeling",
"criticRating": "Criticusbeoordeling",
"lastPlayed": "Laatst afgespeeld",
"datePlayed": "Afspeeldatum",
"playCount": "Aantal afspelingen",
"productionYear": "Productiejaar",
"runtime": "Speelduur",
"officialRating": "Officiële beoordeling",
"premiereDate": "Premièredatum",
"startDate": "Begindatum",
"airTime": "Uitzendtijd",
"studio": "Studio",
"random": "Willekeurig",
"dateShared": "Gedeeld op",
"latestEpisodeAirDate": "Laatste afleveringsuitzending"
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "Przewiń do następnego napisu",
"subSeekPrev": "Przewiń do poprzedniego napisu",
"shaderToggle": "Przełącz shadery",
"skipMarker": "Pomiń intro/napisy końcowe"
"skipMarker": "Pomiń intro/napisy końcowe",
"screenshot": "Zrób zrzut ekranu"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "Odtwórz od początku",
"playVersion": "Odtwórz wersję..."
},
"rateSheet": {
"title": "Oceń",
"server": "Serwer",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "Ustaw ocenę",
"notRated": "Nie oceniono",
"liked": "Polubione",
"notLiked": "Nie polubiono",
"saved": "Zapisano",
"notAvailable": "Nie znaleziono dopasowania",
"noConnectedTrackers": "Połącz tracker w Ustawieniach, aby tam oceniać."
},
"accessibility": {
"mediaCardMovie": "${title}, film",
"mediaCardShow": "${title}, serial TV",
@@ -420,6 +434,7 @@
"endsAt": "Kończy się o ${time}",
"pipActive": "Odtwarzanie w trybie obraz w obrazie",
"pipFailed": "Nie udało się uruchomić trybu obraz w obrazie",
"screenshotSaved": "Zrzut ekranu zapisany",
"pipErrors": {
"androidVersion": "Wymaga Androida 8.0 lub nowszego",
"iosVersion": "Wymaga iOS 15.0 lub nowszego",
@@ -691,8 +706,18 @@
"dateAdded": "Data dodania",
"releaseDate": "Data premiery",
"rating": "Ocena",
"communityRating": "Ocena społeczności",
"criticRating": "Ocena krytyków",
"lastPlayed": "Ostatnio odtwarzane",
"datePlayed": "Data odtworzenia",
"playCount": "Liczba odtworzeń",
"productionYear": "Rok produkcji",
"runtime": "Czas trwania",
"officialRating": "Oficjalna klasyfikacja",
"premiereDate": "Data premiery",
"startDate": "Data rozpoczęcia",
"airTime": "Godzina emisji",
"studio": "Studio",
"random": "Losowo",
"dateShared": "Data udostępnienia",
"latestEpisodeAirDate": "Data emisji ostatniego odcinka"
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "Ir para Próxima Legenda",
"subSeekPrev": "Ir para Legenda Anterior",
"shaderToggle": "Alternar Shaders",
"skipMarker": "Pular Intro/Créditos"
"skipMarker": "Pular Intro/Créditos",
"screenshot": "Capturar tela"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "Reproduzir do início",
"playVersion": "Reproduzir versão..."
},
"rateSheet": {
"title": "Avaliar",
"server": "Servidor",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "Definir pontuação",
"notRated": "Sem avaliação",
"liked": "Gostei",
"notLiked": "Não marcado como gostei",
"saved": "Salvo",
"notAvailable": "Nenhuma correspondência encontrada",
"noConnectedTrackers": "Conecte um rastreador em Configurações para avaliar lá."
},
"accessibility": {
"mediaCardMovie": "${title}, filme",
"mediaCardShow": "${title}, série de TV",
@@ -420,6 +434,7 @@
"endsAt": "Termina às ${time}",
"pipActive": "Reproduzindo em Picture-in-Picture",
"pipFailed": "Falha ao iniciar picture-in-picture",
"screenshotSaved": "Captura de tela salva",
"pipErrors": {
"androidVersion": "Requer Android 8.0 ou superior",
"iosVersion": "Requer iOS 15.0 ou superior",
@@ -691,8 +706,18 @@
"dateAdded": "Data de adição",
"releaseDate": "Data de lançamento",
"rating": "Avaliação",
"communityRating": "Avaliação da comunidade",
"criticRating": "Avaliação da crítica",
"lastPlayed": "Última reprodução",
"datePlayed": "Data de reprodução",
"playCount": "Reproduções",
"productionYear": "Ano de produção",
"runtime": "Duração",
"officialRating": "Classificação oficial",
"premiereDate": "Data de estreia",
"startDate": "Data de início",
"airTime": "Horário de exibição",
"studio": "Estúdio",
"random": "Aleatório",
"dateShared": "Data de compartilhamento",
"latestEpisodeAirDate": "Última data de exibição do episódio"
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "К следующему субтитру",
"subSeekPrev": "К предыдущему субтитру",
"shaderToggle": "Вкл./выкл. шейдеры",
"skipMarker": "Пропустить вступление/титры"
"skipMarker": "Пропустить вступление/титры",
"screenshot": "Сделать снимок экрана"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "Воспроизвести сначала",
"playVersion": "Воспроизвести версию..."
},
"rateSheet": {
"title": "Оценить",
"server": "Сервер",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "Установить оценку",
"notRated": "Без оценки",
"liked": "Понравилось",
"notLiked": "Не отмечено понравившимся",
"saved": "Сохранено",
"notAvailable": "Совпадений не найдено",
"noConnectedTrackers": "Подключите трекер в настройках, чтобы оценивать там."
},
"accessibility": {
"mediaCardMovie": "${title}, фильм",
"mediaCardShow": "${title}, сериал",
@@ -420,6 +434,7 @@
"endsAt": "Закончится в ${time}",
"pipActive": "Воспроизводится в режиме «картинка в картинке»",
"pipFailed": "Не удалось запустить режим «картинка в картинке»",
"screenshotSaved": "Снимок экрана сохранён",
"pipErrors": {
"androidVersion": "Требуется Android 8.0 или новее",
"iosVersion": "Требуется iOS 15.0 или новее",
@@ -691,8 +706,18 @@
"dateAdded": "Дата добавления",
"releaseDate": "Дата выхода",
"rating": "Рейтинг",
"communityRating": "Оценка сообщества",
"criticRating": "Оценка критиков",
"lastPlayed": "Последний просмотр",
"datePlayed": "Дата просмотра",
"playCount": "Количество просмотров",
"productionYear": "Год производства",
"runtime": "Длительность",
"officialRating": "Официальный рейтинг",
"premiereDate": "Дата премьеры",
"startDate": "Дата начала",
"airTime": "Время эфира",
"studio": "Студия",
"random": "Случайно",
"dateShared": "Дата открытия доступа",
"latestEpisodeAirDate": "Дата выхода последнего эпизода"
+2 -2
View File
@@ -4,9 +4,9 @@
/// To regenerate, run: `dart run slang`
///
/// Locales: 15
/// Strings: 17145 (1143 per locale)
/// Strings: 17490 (1166 per locale)
///
/// Built on 2026-05-11 at 02:36 UTC
/// Built on 2026-05-16 at 21:43 UTC
// coverage:ignore-file
// ignore_for_file: type=lint, unused_import
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsDa extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysDa hotkeys = _TranslationsHotkeysDa._(_root);
@override late final _TranslationsFileInfoDa fileInfo = _TranslationsFileInfoDa._(_root);
@override late final _TranslationsMediaMenuDa mediaMenu = _TranslationsMediaMenuDa._(_root);
@override late final _TranslationsRateSheetDa rateSheet = _TranslationsRateSheetDa._(_root);
@override late final _TranslationsAccessibilityDa accessibility = _TranslationsAccessibilityDa._(_root);
@override late final _TranslationsTooltipsDa tooltips = _TranslationsTooltipsDa._(_root);
@override late final _TranslationsVideoControlsDa videoControls = _TranslationsVideoControlsDa._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuDa extends TranslationsMediaMenuEn {
@override String get playVersion => 'Afspil version...';
}
// Path: rateSheet
class _TranslationsRateSheetDa extends TranslationsRateSheetEn {
_TranslationsRateSheetDa._(TranslationsDa root) : this._root = root, super.internal(root);
final TranslationsDa _root; // ignore: unused_field
// Translations
@override String get title => 'Bedøm';
@override String get server => 'Server';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => 'Angiv en score';
@override String get notRated => 'Ikke bedømt';
@override String get liked => 'Synes godt om';
@override String get notLiked => 'Ikke liket';
@override String get saved => 'Gemt';
@override String get notAvailable => 'Intet match fundet';
@override String get noConnectedTrackers => 'Forbind en tracker i Indstillinger for at bedømme der.';
}
// Path: accessibility
class _TranslationsAccessibilityDa extends TranslationsAccessibilityEn {
_TranslationsAccessibilityDa._(TranslationsDa root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsDa extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => 'Slutter kl. ${time}';
@override String get pipActive => 'Afspiller i billede-i-billede';
@override String get pipFailed => 'Billede-i-billede kunne ikke starte';
@override String get screenshotSaved => 'Skærmbillede gemt';
@override late final _TranslationsVideoControlsPipErrorsDa pipErrors = _TranslationsVideoControlsPipErrorsDa._(_root);
@override String get chapters => 'Kapitler';
@override String get noChaptersAvailable => 'Ingen kapitler tilgængelige';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsDa extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => 'Søg til forrige undertekst';
@override String get shaderToggle => 'Skift shadere';
@override String get skipMarker => 'Spring intro/rulletekster over';
@override String get screenshot => 'Tag skærmbillede';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsDa extends TranslationsLibrariesSortLabels
@override String get dateAdded => 'Tilføjet dato';
@override String get releaseDate => 'Udgivelsesdato';
@override String get rating => 'Vurdering';
@override String get communityRating => 'Fællesskabsvurdering';
@override String get criticRating => 'Kritikerbedømmelse';
@override String get lastPlayed => 'Sidst afspillet';
@override String get datePlayed => 'Afspilningsdato';
@override String get playCount => 'Antal afspilninger';
@override String get productionYear => 'Produktionsår';
@override String get runtime => 'Spilletid';
@override String get officialRating => 'Officiel vurdering';
@override String get premiereDate => 'Premieredato';
@override String get startDate => 'Startdato';
@override String get airTime => 'Sendetid';
@override String get studio => 'Studie';
@override String get random => 'Tilfældig';
@override String get dateShared => 'Delt dato';
@override String get latestEpisodeAirDate => 'Seneste episodes premieredato';
@@ -2048,6 +2081,7 @@ extension on TranslationsDa {
'hotkeys.actions.subSeekPrev' => 'Søg til forrige undertekst',
'hotkeys.actions.shaderToggle' => 'Skift shadere',
'hotkeys.actions.skipMarker' => 'Spring intro/rulletekster over',
'hotkeys.actions.screenshot' => 'Tag skærmbillede',
'fileInfo.title' => 'Filinfo',
'fileInfo.video' => 'Video',
'fileInfo.audio' => 'Lyd',
@@ -2088,6 +2122,17 @@ extension on TranslationsDa {
'mediaMenu.rate' => 'Bedøm',
'mediaMenu.playFromBeginning' => 'Afspil fra begyndelsen',
'mediaMenu.playVersion' => 'Afspil version...',
'rateSheet.title' => 'Bedøm',
'rateSheet.server' => 'Server',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => 'Angiv en score',
'rateSheet.notRated' => 'Ikke bedømt',
'rateSheet.liked' => 'Synes godt om',
'rateSheet.notLiked' => 'Ikke liket',
'rateSheet.saved' => 'Gemt',
'rateSheet.notAvailable' => 'Intet match fundet',
'rateSheet.noConnectedTrackers' => 'Forbind en tracker i Indstillinger for at bedømme der.',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, film',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, TV-serie',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsDa {
'videoControls.endsAt' => ({required Object time}) => 'Slutter kl. ${time}',
'videoControls.pipActive' => 'Afspiller i billede-i-billede',
'videoControls.pipFailed' => 'Billede-i-billede kunne ikke starte',
'videoControls.screenshotSaved' => 'Skærmbillede gemt',
'videoControls.pipErrors.androidVersion' => 'Kræver Android 8.0 eller nyere',
'videoControls.pipErrors.iosVersion' => 'Kræver iOS 15.0 eller nyere',
'videoControls.pipErrors.permissionDisabled' => 'Billede-i-billede er deaktiveret. Slå det til i systemindstillinger.',
@@ -2261,6 +2307,8 @@ extension on TranslationsDa {
'profiles.summarySingle' => 'Tilføj profiler for at blande administrerede brugere og lokale identiteter',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profiler · aktiv: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profiler',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Fjern forbindelse?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Fjern ${displayName}s adgang til ${connectionLabel}. Andre profiler beholder den.',
'profiles.deleteProfileTitle' => 'Slet profil?',
@@ -2274,8 +2322,6 @@ extension on TranslationsDa {
'profiles.confirmPinTitle' => 'Bekræft PIN',
'profiles.pinSet' => 'PIN angivet',
'profiles.changePin' => 'Skift',
_ => null,
} ?? switch (path) {
'profiles.removePin' => 'Fjern',
'profiles.connectionsLabel' => 'Forbindelser',
'profiles.add' => 'Tilføj',
@@ -2400,8 +2446,18 @@ extension on TranslationsDa {
'libraries.sortLabels.dateAdded' => 'Tilføjet dato',
'libraries.sortLabels.releaseDate' => 'Udgivelsesdato',
'libraries.sortLabels.rating' => 'Vurdering',
'libraries.sortLabels.communityRating' => 'Fællesskabsvurdering',
'libraries.sortLabels.criticRating' => 'Kritikerbedømmelse',
'libraries.sortLabels.lastPlayed' => 'Sidst afspillet',
'libraries.sortLabels.datePlayed' => 'Afspilningsdato',
'libraries.sortLabels.playCount' => 'Antal afspilninger',
'libraries.sortLabels.productionYear' => 'Produktionsår',
'libraries.sortLabels.runtime' => 'Spilletid',
'libraries.sortLabels.officialRating' => 'Officiel vurdering',
'libraries.sortLabels.premiereDate' => 'Premieredato',
'libraries.sortLabels.startDate' => 'Startdato',
'libraries.sortLabels.airTime' => 'Sendetid',
'libraries.sortLabels.studio' => 'Studie',
'libraries.sortLabels.random' => 'Tilfældig',
'libraries.sortLabels.dateShared' => 'Delt dato',
'libraries.sortLabels.latestEpisodeAirDate' => 'Seneste episodes premieredato',
@@ -2765,6 +2821,8 @@ extension on TranslationsDa {
'metadataEdit.selectBackground' => 'Vælg baggrund',
'metadataEdit.selectLogo' => 'Vælg logo',
'metadataEdit.selectSquareArt' => 'Vælg kvadratisk billede',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Fra URL',
'metadataEdit.uploadFile' => 'Upload fil',
'metadataEdit.enterImageUrl' => 'Indtast billed-URL',
@@ -2788,8 +2846,6 @@ extension on TranslationsDa {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Episoder tilføjet de seneste ${count} dage',
'metadataEdit.deleteAfterPlaying' => 'Slet episoder efter afspilning',
'metadataEdit.never' => 'Aldrig',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => 'Efter en dag',
'metadataEdit.afterAWeek' => 'Efter en uge',
'metadataEdit.afterAMonth' => 'Efter en måned',
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsDe extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysDe hotkeys = _TranslationsHotkeysDe._(_root);
@override late final _TranslationsFileInfoDe fileInfo = _TranslationsFileInfoDe._(_root);
@override late final _TranslationsMediaMenuDe mediaMenu = _TranslationsMediaMenuDe._(_root);
@override late final _TranslationsRateSheetDe rateSheet = _TranslationsRateSheetDe._(_root);
@override late final _TranslationsAccessibilityDe accessibility = _TranslationsAccessibilityDe._(_root);
@override late final _TranslationsTooltipsDe tooltips = _TranslationsTooltipsDe._(_root);
@override late final _TranslationsVideoControlsDe videoControls = _TranslationsVideoControlsDe._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuDe extends TranslationsMediaMenuEn {
@override String get playVersion => 'Version abspielen...';
}
// Path: rateSheet
class _TranslationsRateSheetDe extends TranslationsRateSheetEn {
_TranslationsRateSheetDe._(TranslationsDe root) : this._root = root, super.internal(root);
final TranslationsDe _root; // ignore: unused_field
// Translations
@override String get title => 'Bewerten';
@override String get server => 'Server';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => 'Eine Wertung festlegen';
@override String get notRated => 'Nicht bewertet';
@override String get liked => 'Gefällt mir';
@override String get notLiked => 'Nicht geliket';
@override String get saved => 'Gespeichert';
@override String get notAvailable => 'Keine Übereinstimmung gefunden';
@override String get noConnectedTrackers => 'Verbinde einen Tracker in den Einstellungen, um dort zu bewerten.';
}
// Path: accessibility
class _TranslationsAccessibilityDe extends TranslationsAccessibilityEn {
_TranslationsAccessibilityDe._(TranslationsDe root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsDe extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => 'Endet um ${time}';
@override String get pipActive => 'Wiedergabe im Bild-in-Bild-Modus';
@override String get pipFailed => 'Bild-in-Bild konnte nicht gestartet werden';
@override String get screenshotSaved => 'Screenshot gespeichert';
@override late final _TranslationsVideoControlsPipErrorsDe pipErrors = _TranslationsVideoControlsPipErrorsDe._(_root);
@override String get chapters => 'Kapitel';
@override String get noChaptersAvailable => 'Keine Kapitel verfügbar';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsDe extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => 'Zum vorherigen Untertitel springen';
@override String get shaderToggle => 'Shader umschalten';
@override String get skipMarker => 'Intro/Abspann überspringen';
@override String get screenshot => 'Screenshot aufnehmen';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsDe extends TranslationsLibrariesSortLabels
@override String get dateAdded => 'Hinzugefügt am';
@override String get releaseDate => 'Erscheinungsdatum';
@override String get rating => 'Bewertung';
@override String get communityRating => 'Community-Bewertung';
@override String get criticRating => 'Kritikerbewertung';
@override String get lastPlayed => 'Zuletzt abgespielt';
@override String get datePlayed => 'Wiedergabedatum';
@override String get playCount => 'Wiedergaben';
@override String get productionYear => 'Produktionsjahr';
@override String get runtime => 'Laufzeit';
@override String get officialRating => 'Offizielle Bewertung';
@override String get premiereDate => 'Premierendatum';
@override String get startDate => 'Startdatum';
@override String get airTime => 'Sendezeit';
@override String get studio => 'Studio';
@override String get random => 'Zufällig';
@override String get dateShared => 'Datum geteilt';
@override String get latestEpisodeAirDate => 'Letztes Folgenausstrahlungsdatum';
@@ -2048,6 +2081,7 @@ extension on TranslationsDe {
'hotkeys.actions.subSeekPrev' => 'Zum vorherigen Untertitel springen',
'hotkeys.actions.shaderToggle' => 'Shader umschalten',
'hotkeys.actions.skipMarker' => 'Intro/Abspann überspringen',
'hotkeys.actions.screenshot' => 'Screenshot aufnehmen',
'fileInfo.title' => 'Dateiinfo',
'fileInfo.video' => 'Video',
'fileInfo.audio' => 'Audio',
@@ -2088,6 +2122,17 @@ extension on TranslationsDe {
'mediaMenu.rate' => 'Bewerten',
'mediaMenu.playFromBeginning' => 'Von Anfang an abspielen',
'mediaMenu.playVersion' => 'Version abspielen...',
'rateSheet.title' => 'Bewerten',
'rateSheet.server' => 'Server',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => 'Eine Wertung festlegen',
'rateSheet.notRated' => 'Nicht bewertet',
'rateSheet.liked' => 'Gefällt mir',
'rateSheet.notLiked' => 'Nicht geliket',
'rateSheet.saved' => 'Gespeichert',
'rateSheet.notAvailable' => 'Keine Übereinstimmung gefunden',
'rateSheet.noConnectedTrackers' => 'Verbinde einen Tracker in den Einstellungen, um dort zu bewerten.',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, Film',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, Serie',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsDe {
'videoControls.endsAt' => ({required Object time}) => 'Endet um ${time}',
'videoControls.pipActive' => 'Wiedergabe im Bild-in-Bild-Modus',
'videoControls.pipFailed' => 'Bild-in-Bild konnte nicht gestartet werden',
'videoControls.screenshotSaved' => 'Screenshot gespeichert',
'videoControls.pipErrors.androidVersion' => 'Erfordert Android 8.0 oder neuer',
'videoControls.pipErrors.iosVersion' => 'Erfordert iOS 15.0 oder neuer',
'videoControls.pipErrors.permissionDisabled' => 'Bild-in-Bild ist deaktiviert. Aktiviere es in den Systemeinstellungen.',
@@ -2261,6 +2307,8 @@ extension on TranslationsDe {
'profiles.summarySingle' => 'Profile hinzufügen, um verwaltete Benutzer und lokale Identitäten zu mischen',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} Profile · aktiv: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} Profile',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Verbindung entfernen?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Zugriff von ${displayName} auf ${connectionLabel} entfernen. Andere Profile behalten ihn.',
'profiles.deleteProfileTitle' => 'Profil löschen?',
@@ -2274,8 +2322,6 @@ extension on TranslationsDe {
'profiles.confirmPinTitle' => 'PIN bestätigen',
'profiles.pinSet' => 'PIN festgelegt',
'profiles.changePin' => 'Ändern',
_ => null,
} ?? switch (path) {
'profiles.removePin' => 'Entfernen',
'profiles.connectionsLabel' => 'Verbindungen',
'profiles.add' => 'Hinzufügen',
@@ -2400,8 +2446,18 @@ extension on TranslationsDe {
'libraries.sortLabels.dateAdded' => 'Hinzugefügt am',
'libraries.sortLabels.releaseDate' => 'Erscheinungsdatum',
'libraries.sortLabels.rating' => 'Bewertung',
'libraries.sortLabels.communityRating' => 'Community-Bewertung',
'libraries.sortLabels.criticRating' => 'Kritikerbewertung',
'libraries.sortLabels.lastPlayed' => 'Zuletzt abgespielt',
'libraries.sortLabels.datePlayed' => 'Wiedergabedatum',
'libraries.sortLabels.playCount' => 'Wiedergaben',
'libraries.sortLabels.productionYear' => 'Produktionsjahr',
'libraries.sortLabels.runtime' => 'Laufzeit',
'libraries.sortLabels.officialRating' => 'Offizielle Bewertung',
'libraries.sortLabels.premiereDate' => 'Premierendatum',
'libraries.sortLabels.startDate' => 'Startdatum',
'libraries.sortLabels.airTime' => 'Sendezeit',
'libraries.sortLabels.studio' => 'Studio',
'libraries.sortLabels.random' => 'Zufällig',
'libraries.sortLabels.dateShared' => 'Datum geteilt',
'libraries.sortLabels.latestEpisodeAirDate' => 'Letztes Folgenausstrahlungsdatum',
@@ -2765,6 +2821,8 @@ extension on TranslationsDe {
'metadataEdit.selectBackground' => 'Hintergrund auswählen',
'metadataEdit.selectLogo' => 'Logo auswählen',
'metadataEdit.selectSquareArt' => 'Quadratisches Bild auswählen',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Von URL',
'metadataEdit.uploadFile' => 'Datei hochladen',
'metadataEdit.enterImageUrl' => 'Bild-URL eingeben',
@@ -2788,8 +2846,6 @@ extension on TranslationsDe {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Episoden der letzten ${count} Tage',
'metadataEdit.deleteAfterPlaying' => 'Episoden nach Wiedergabe löschen',
'metadataEdit.never' => 'Nie',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => 'Nach einem Tag',
'metadataEdit.afterAWeek' => 'Nach einer Woche',
'metadataEdit.afterAMonth' => 'Nach einem Monat',
+106 -4
View File
@@ -50,6 +50,7 @@ class Translations with BaseTranslations<AppLocale, Translations> {
late final TranslationsHotkeysEn hotkeys = TranslationsHotkeysEn.internal(_root);
late final TranslationsFileInfoEn fileInfo = TranslationsFileInfoEn.internal(_root);
late final TranslationsMediaMenuEn mediaMenu = TranslationsMediaMenuEn.internal(_root);
late final TranslationsRateSheetEn rateSheet = TranslationsRateSheetEn.internal(_root);
late final TranslationsAccessibilityEn accessibility = TranslationsAccessibilityEn.internal(_root);
late final TranslationsTooltipsEn tooltips = TranslationsTooltipsEn.internal(_root);
late final TranslationsVideoControlsEn videoControls = TranslationsVideoControlsEn.internal(_root);
@@ -1093,6 +1094,48 @@ class TranslationsMediaMenuEn {
String get playVersion => 'Play Version...';
}
// Path: rateSheet
class TranslationsRateSheetEn {
TranslationsRateSheetEn.internal(this._root);
final Translations _root; // ignore: unused_field
// Translations
/// en: 'Rate'
String get title => 'Rate';
/// en: 'Server'
String get server => 'Server';
/// en: '${rating} / 5'
String starValue({required Object rating}) => '${rating} / 5';
/// en: '${score} / 10'
String scoreValue({required Object score}) => '${score} / 10';
/// en: 'Set a score'
String get setScore => 'Set a score';
/// en: 'Not rated'
String get notRated => 'Not rated';
/// en: 'Liked'
String get liked => 'Liked';
/// en: 'Not liked'
String get notLiked => 'Not liked';
/// en: 'Saved'
String get saved => 'Saved';
/// en: 'No match found'
String get notAvailable => 'No match found';
/// en: 'Connect a tracker in Settings to rate there.'
String get noConnectedTrackers => 'Connect a tracker in Settings to rate there.';
}
// Path: accessibility
class TranslationsAccessibilityEn {
TranslationsAccessibilityEn.internal(this._root);
@@ -1323,6 +1366,9 @@ class TranslationsVideoControlsEn {
/// en: 'Picture-in-picture failed to start'
String get pipFailed => 'Picture-in-picture failed to start';
/// en: 'Screenshot saved'
String get screenshotSaved => 'Screenshot saved';
late final TranslationsVideoControlsPipErrorsEn pipErrors = TranslationsVideoControlsPipErrorsEn.internal(_root);
/// en: 'Chapters'
@@ -3609,6 +3655,9 @@ class TranslationsHotkeysActionsEn {
/// en: 'Skip Intro/Credits'
String get skipMarker => 'Skip Intro/Credits';
/// en: 'Take Screenshot'
String get screenshot => 'Take Screenshot';
}
// Path: videoControls.pipErrors
@@ -3733,12 +3782,42 @@ class TranslationsLibrariesSortLabelsEn {
/// en: 'Rating'
String get rating => 'Rating';
/// en: 'Community Rating'
String get communityRating => 'Community Rating';
/// en: 'Critic Rating'
String get criticRating => 'Critic Rating';
/// en: 'Last Played'
String get lastPlayed => 'Last Played';
/// en: 'Date Played'
String get datePlayed => 'Date Played';
/// en: 'Play Count'
String get playCount => 'Play Count';
/// en: 'Production Year'
String get productionYear => 'Production Year';
/// en: 'Runtime'
String get runtime => 'Runtime';
/// en: 'Official Rating'
String get officialRating => 'Official Rating';
/// en: 'Premiere Date'
String get premiereDate => 'Premiere Date';
/// en: 'Start Date'
String get startDate => 'Start Date';
/// en: 'Air Time'
String get airTime => 'Air Time';
/// en: 'Studio'
String get studio => 'Studio';
/// en: 'Random'
String get random => 'Random';
@@ -4340,6 +4419,7 @@ extension on Translations {
'hotkeys.actions.subSeekPrev' => 'Seek to Previous Subtitle',
'hotkeys.actions.shaderToggle' => 'Toggle Shaders',
'hotkeys.actions.skipMarker' => 'Skip Intro/Credits',
'hotkeys.actions.screenshot' => 'Take Screenshot',
'fileInfo.title' => 'File Info',
'fileInfo.video' => 'Video',
'fileInfo.audio' => 'Audio',
@@ -4380,6 +4460,17 @@ extension on Translations {
'mediaMenu.rate' => 'Rate',
'mediaMenu.playFromBeginning' => 'Play from Beginning',
'mediaMenu.playVersion' => 'Play Version...',
'rateSheet.title' => 'Rate',
'rateSheet.server' => 'Server',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => 'Set a score',
'rateSheet.notRated' => 'Not rated',
'rateSheet.liked' => 'Liked',
'rateSheet.notLiked' => 'Not liked',
'rateSheet.saved' => 'Saved',
'rateSheet.notAvailable' => 'No match found',
'rateSheet.noConnectedTrackers' => 'Connect a tracker in Settings to rate there.',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, movie',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, TV show',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -4448,6 +4539,7 @@ extension on Translations {
'videoControls.endsAt' => ({required Object time}) => 'Ends at ${time}',
'videoControls.pipActive' => 'Playing in Picture-in-Picture',
'videoControls.pipFailed' => 'Picture-in-picture failed to start',
'videoControls.screenshotSaved' => 'Screenshot saved',
'videoControls.pipErrors.androidVersion' => 'Requires Android 8.0 or newer',
'videoControls.pipErrors.iosVersion' => 'Requires iOS 15.0 or newer',
'videoControls.pipErrors.permissionDisabled' => 'Picture-in-picture is disabled. Enable it in system settings.',
@@ -4553,6 +4645,8 @@ extension on Translations {
'profiles.summarySingle' => 'Add profiles to mix managed users and local identities',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profiles · active: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profiles',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Remove connection?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Remove ${displayName}\'s access to ${connectionLabel}. Other profiles keep it.',
'profiles.deleteProfileTitle' => 'Delete profile?',
@@ -4566,8 +4660,6 @@ extension on Translations {
'profiles.confirmPinTitle' => 'Confirm PIN',
'profiles.pinSet' => 'PIN set',
'profiles.changePin' => 'Change',
_ => null,
} ?? switch (path) {
'profiles.removePin' => 'Remove',
'profiles.connectionsLabel' => 'Connections',
'profiles.add' => 'Add',
@@ -4692,8 +4784,18 @@ extension on Translations {
'libraries.sortLabels.dateAdded' => 'Date Added',
'libraries.sortLabels.releaseDate' => 'Release Date',
'libraries.sortLabels.rating' => 'Rating',
'libraries.sortLabels.communityRating' => 'Community Rating',
'libraries.sortLabels.criticRating' => 'Critic Rating',
'libraries.sortLabels.lastPlayed' => 'Last Played',
'libraries.sortLabels.datePlayed' => 'Date Played',
'libraries.sortLabels.playCount' => 'Play Count',
'libraries.sortLabels.productionYear' => 'Production Year',
'libraries.sortLabels.runtime' => 'Runtime',
'libraries.sortLabels.officialRating' => 'Official Rating',
'libraries.sortLabels.premiereDate' => 'Premiere Date',
'libraries.sortLabels.startDate' => 'Start Date',
'libraries.sortLabels.airTime' => 'Air Time',
'libraries.sortLabels.studio' => 'Studio',
'libraries.sortLabels.random' => 'Random',
'libraries.sortLabels.dateShared' => 'Date Shared',
'libraries.sortLabels.latestEpisodeAirDate' => 'Latest Episode Air Date',
@@ -5057,6 +5159,8 @@ extension on Translations {
'metadataEdit.selectBackground' => 'Select Background',
'metadataEdit.selectLogo' => 'Select Logo',
'metadataEdit.selectSquareArt' => 'Select Square Art',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'From URL',
'metadataEdit.uploadFile' => 'Upload File',
'metadataEdit.enterImageUrl' => 'Enter image URL',
@@ -5080,8 +5184,6 @@ extension on Translations {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Episodes added in the past ${count} days',
'metadataEdit.deleteAfterPlaying' => 'Delete Episodes After Playing',
'metadataEdit.never' => 'Never',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => 'After a day',
'metadataEdit.afterAWeek' => 'After a week',
'metadataEdit.afterAMonth' => 'After a month',
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsEs extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysEs hotkeys = _TranslationsHotkeysEs._(_root);
@override late final _TranslationsFileInfoEs fileInfo = _TranslationsFileInfoEs._(_root);
@override late final _TranslationsMediaMenuEs mediaMenu = _TranslationsMediaMenuEs._(_root);
@override late final _TranslationsRateSheetEs rateSheet = _TranslationsRateSheetEs._(_root);
@override late final _TranslationsAccessibilityEs accessibility = _TranslationsAccessibilityEs._(_root);
@override late final _TranslationsTooltipsEs tooltips = _TranslationsTooltipsEs._(_root);
@override late final _TranslationsVideoControlsEs videoControls = _TranslationsVideoControlsEs._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuEs extends TranslationsMediaMenuEn {
@override String get playVersion => 'Reproducir versión...';
}
// Path: rateSheet
class _TranslationsRateSheetEs extends TranslationsRateSheetEn {
_TranslationsRateSheetEs._(TranslationsEs root) : this._root = root, super.internal(root);
final TranslationsEs _root; // ignore: unused_field
// Translations
@override String get title => 'Calificar';
@override String get server => 'Servidor';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => 'Establecer puntuación';
@override String get notRated => 'Sin calificar';
@override String get liked => 'Me gusta';
@override String get notLiked => 'Sin Me gusta';
@override String get saved => 'Guardado';
@override String get notAvailable => 'No se encontró coincidencia';
@override String get noConnectedTrackers => 'Conecta un tracker en Ajustes para calificar allí.';
}
// Path: accessibility
class _TranslationsAccessibilityEs extends TranslationsAccessibilityEn {
_TranslationsAccessibilityEs._(TranslationsEs root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsEs extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => 'Termina a las ${time}';
@override String get pipActive => 'Reproduciendo en Imagen en Imagen';
@override String get pipFailed => 'Error al iniciar Imagen en Imagen';
@override String get screenshotSaved => 'Captura de pantalla guardada';
@override late final _TranslationsVideoControlsPipErrorsEs pipErrors = _TranslationsVideoControlsPipErrorsEs._(_root);
@override String get chapters => 'Capítulos';
@override String get noChaptersAvailable => 'No hay capítulos disponibles';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsEs extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => 'Ir al Anterior Subtítulo';
@override String get shaderToggle => 'Alternar Shaders';
@override String get skipMarker => 'Saltar Intro/Créditos';
@override String get screenshot => 'Tomar captura de pantalla';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsEs extends TranslationsLibrariesSortLabels
@override String get dateAdded => 'Fecha de adición';
@override String get releaseDate => 'Fecha de estreno';
@override String get rating => 'Valoración';
@override String get communityRating => 'Calificación de comunidad';
@override String get criticRating => 'Calificación de crítica';
@override String get lastPlayed => 'Última reproducción';
@override String get datePlayed => 'Fecha de reproducción';
@override String get playCount => 'Reproducciones';
@override String get productionYear => 'Año de producción';
@override String get runtime => 'Duración';
@override String get officialRating => 'Calificación oficial';
@override String get premiereDate => 'Fecha de estreno';
@override String get startDate => 'Fecha de inicio';
@override String get airTime => 'Hora de emisión';
@override String get studio => 'Estudio';
@override String get random => 'Aleatorio';
@override String get dateShared => 'Fecha de compartición';
@override String get latestEpisodeAirDate => 'Última fecha de emisión del episodio';
@@ -2048,6 +2081,7 @@ extension on TranslationsEs {
'hotkeys.actions.subSeekPrev' => 'Ir al Anterior Subtítulo',
'hotkeys.actions.shaderToggle' => 'Alternar Shaders',
'hotkeys.actions.skipMarker' => 'Saltar Intro/Créditos',
'hotkeys.actions.screenshot' => 'Tomar captura de pantalla',
'fileInfo.title' => 'Información del Archivo',
'fileInfo.video' => 'Video',
'fileInfo.audio' => 'Audio',
@@ -2088,6 +2122,17 @@ extension on TranslationsEs {
'mediaMenu.rate' => 'Calificar',
'mediaMenu.playFromBeginning' => 'Reproducir desde el inicio',
'mediaMenu.playVersion' => 'Reproducir versión...',
'rateSheet.title' => 'Calificar',
'rateSheet.server' => 'Servidor',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => 'Establecer puntuación',
'rateSheet.notRated' => 'Sin calificar',
'rateSheet.liked' => 'Me gusta',
'rateSheet.notLiked' => 'Sin Me gusta',
'rateSheet.saved' => 'Guardado',
'rateSheet.notAvailable' => 'No se encontró coincidencia',
'rateSheet.noConnectedTrackers' => 'Conecta un tracker en Ajustes para calificar allí.',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, película',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, serie de TV',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsEs {
'videoControls.endsAt' => ({required Object time}) => 'Termina a las ${time}',
'videoControls.pipActive' => 'Reproduciendo en Imagen en Imagen',
'videoControls.pipFailed' => 'Error al iniciar Imagen en Imagen',
'videoControls.screenshotSaved' => 'Captura de pantalla guardada',
'videoControls.pipErrors.androidVersion' => 'Requiere Android 8.0 o más reciente',
'videoControls.pipErrors.iosVersion' => 'Requiere iOS 15.0 o más reciente',
'videoControls.pipErrors.permissionDisabled' => 'Picture-in-picture está desactivado. Actívalo en los ajustes del sistema.',
@@ -2261,6 +2307,8 @@ extension on TranslationsEs {
'profiles.summarySingle' => 'Añade perfiles para mezclar usuarios gestionados e identidades locales',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} perfiles · activo: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} perfiles',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => '¿Eliminar conexión?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Eliminar el acceso de ${displayName} a ${connectionLabel}. Los demás perfiles lo conservan.',
'profiles.deleteProfileTitle' => '¿Eliminar perfil?',
@@ -2274,8 +2322,6 @@ extension on TranslationsEs {
'profiles.confirmPinTitle' => 'Confirmar PIN',
'profiles.pinSet' => 'PIN establecido',
'profiles.changePin' => 'Cambiar',
_ => null,
} ?? switch (path) {
'profiles.removePin' => 'Eliminar',
'profiles.connectionsLabel' => 'Conexiones',
'profiles.add' => 'Añadir',
@@ -2400,8 +2446,18 @@ extension on TranslationsEs {
'libraries.sortLabels.dateAdded' => 'Fecha de adición',
'libraries.sortLabels.releaseDate' => 'Fecha de estreno',
'libraries.sortLabels.rating' => 'Valoración',
'libraries.sortLabels.communityRating' => 'Calificación de comunidad',
'libraries.sortLabels.criticRating' => 'Calificación de crítica',
'libraries.sortLabels.lastPlayed' => 'Última reproducción',
'libraries.sortLabels.datePlayed' => 'Fecha de reproducción',
'libraries.sortLabels.playCount' => 'Reproducciones',
'libraries.sortLabels.productionYear' => 'Año de producción',
'libraries.sortLabels.runtime' => 'Duración',
'libraries.sortLabels.officialRating' => 'Calificación oficial',
'libraries.sortLabels.premiereDate' => 'Fecha de estreno',
'libraries.sortLabels.startDate' => 'Fecha de inicio',
'libraries.sortLabels.airTime' => 'Hora de emisión',
'libraries.sortLabels.studio' => 'Estudio',
'libraries.sortLabels.random' => 'Aleatorio',
'libraries.sortLabels.dateShared' => 'Fecha de compartición',
'libraries.sortLabels.latestEpisodeAirDate' => 'Última fecha de emisión del episodio',
@@ -2765,6 +2821,8 @@ extension on TranslationsEs {
'metadataEdit.selectBackground' => 'Seleccionar fondo',
'metadataEdit.selectLogo' => 'Seleccionar logo',
'metadataEdit.selectSquareArt' => 'Seleccionar imagen cuadrada',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Desde URL',
'metadataEdit.uploadFile' => 'Subir archivo',
'metadataEdit.enterImageUrl' => 'Introducir URL de imagen',
@@ -2788,8 +2846,6 @@ extension on TranslationsEs {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Episodios añadidos en los últimos ${count} días',
'metadataEdit.deleteAfterPlaying' => 'Eliminar episodios después de reproducir',
'metadataEdit.never' => 'Nunca',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => 'Después de un día',
'metadataEdit.afterAWeek' => 'Después de una semana',
'metadataEdit.afterAMonth' => 'Después de un mes',
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsFr extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysFr hotkeys = _TranslationsHotkeysFr._(_root);
@override late final _TranslationsFileInfoFr fileInfo = _TranslationsFileInfoFr._(_root);
@override late final _TranslationsMediaMenuFr mediaMenu = _TranslationsMediaMenuFr._(_root);
@override late final _TranslationsRateSheetFr rateSheet = _TranslationsRateSheetFr._(_root);
@override late final _TranslationsAccessibilityFr accessibility = _TranslationsAccessibilityFr._(_root);
@override late final _TranslationsTooltipsFr tooltips = _TranslationsTooltipsFr._(_root);
@override late final _TranslationsVideoControlsFr videoControls = _TranslationsVideoControlsFr._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuFr extends TranslationsMediaMenuEn {
@override String get playVersion => 'Lire la version...';
}
// Path: rateSheet
class _TranslationsRateSheetFr extends TranslationsRateSheetEn {
_TranslationsRateSheetFr._(TranslationsFr root) : this._root = root, super.internal(root);
final TranslationsFr _root; // ignore: unused_field
// Translations
@override String get title => 'Noter';
@override String get server => 'Serveur';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => 'Définir une note';
@override String get notRated => 'Non noté';
@override String get liked => 'Aimé';
@override String get notLiked => 'Non aimé';
@override String get saved => 'Enregistré';
@override String get notAvailable => 'Aucune correspondance trouvée';
@override String get noConnectedTrackers => 'Connectez un tracker dans Paramètres pour y noter.';
}
// Path: accessibility
class _TranslationsAccessibilityFr extends TranslationsAccessibilityEn {
_TranslationsAccessibilityFr._(TranslationsFr root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsFr extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => 'Fin à ${time}';
@override String get pipActive => 'Lecture en mode image dans l\'image';
@override String get pipFailed => 'Échec du démarrage du mode image dans l\'image';
@override String get screenshotSaved => 'Capture d\'écran enregistrée';
@override late final _TranslationsVideoControlsPipErrorsFr pipErrors = _TranslationsVideoControlsPipErrorsFr._(_root);
@override String get chapters => 'Chapitres';
@override String get noChaptersAvailable => 'Aucun chapitre disponible';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsFr extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => 'Rechercher le sous-titre précédent';
@override String get shaderToggle => 'Activer/désactiver les shaders';
@override String get skipMarker => 'Passer l\'intro/le générique';
@override String get screenshot => 'Prendre une capture d\'écran';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsFr extends TranslationsLibrariesSortLabels
@override String get dateAdded => 'Date d\'ajout';
@override String get releaseDate => 'Date de sortie';
@override String get rating => 'Note';
@override String get communityRating => 'Note communautaire';
@override String get criticRating => 'Note critique';
@override String get lastPlayed => 'Dernière lecture';
@override String get datePlayed => 'Date de lecture';
@override String get playCount => 'Lectures';
@override String get productionYear => 'Année de production';
@override String get runtime => 'Durée';
@override String get officialRating => 'Classification officielle';
@override String get premiereDate => 'Date de première';
@override String get startDate => 'Date de début';
@override String get airTime => 'Heure de diffusion';
@override String get studio => 'Studio';
@override String get random => 'Aléatoire';
@override String get dateShared => 'Date de partage';
@override String get latestEpisodeAirDate => 'Dernière date de diffusion';
@@ -2048,6 +2081,7 @@ extension on TranslationsFr {
'hotkeys.actions.subSeekPrev' => 'Rechercher le sous-titre précédent',
'hotkeys.actions.shaderToggle' => 'Activer/désactiver les shaders',
'hotkeys.actions.skipMarker' => 'Passer l\'intro/le générique',
'hotkeys.actions.screenshot' => 'Prendre une capture d\'écran',
'fileInfo.title' => 'Informations sur le fichier',
'fileInfo.video' => 'Vidéo',
'fileInfo.audio' => 'Audio',
@@ -2088,6 +2122,17 @@ extension on TranslationsFr {
'mediaMenu.rate' => 'Noter',
'mediaMenu.playFromBeginning' => 'Lire depuis le début',
'mediaMenu.playVersion' => 'Lire la version...',
'rateSheet.title' => 'Noter',
'rateSheet.server' => 'Serveur',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => 'Définir une note',
'rateSheet.notRated' => 'Non noté',
'rateSheet.liked' => 'Aimé',
'rateSheet.notLiked' => 'Non aimé',
'rateSheet.saved' => 'Enregistré',
'rateSheet.notAvailable' => 'Aucune correspondance trouvée',
'rateSheet.noConnectedTrackers' => 'Connectez un tracker dans Paramètres pour y noter.',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, film',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, show TV',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsFr {
'videoControls.endsAt' => ({required Object time}) => 'Fin à ${time}',
'videoControls.pipActive' => 'Lecture en mode image dans l\'image',
'videoControls.pipFailed' => 'Échec du démarrage du mode image dans l\'image',
'videoControls.screenshotSaved' => 'Capture d\'écran enregistrée',
'videoControls.pipErrors.androidVersion' => 'Nécessite Android 8.0 ou plus récent',
'videoControls.pipErrors.iosVersion' => 'Nécessite iOS 15.0 ou plus récent',
'videoControls.pipErrors.permissionDisabled' => 'Picture-in-picture est désactivé. Activez-le dans les paramètres système.',
@@ -2261,6 +2307,8 @@ extension on TranslationsFr {
'profiles.summarySingle' => 'Ajoutez des profils pour mélanger utilisateurs gérés et identités locales',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profils · actif : ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profils',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Retirer la connexion ?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Supprimer l\'accès de ${displayName} à ${connectionLabel}. Les autres profils le conservent.',
'profiles.deleteProfileTitle' => 'Supprimer le profil ?',
@@ -2274,8 +2322,6 @@ extension on TranslationsFr {
'profiles.confirmPinTitle' => 'Confirmer le PIN',
'profiles.pinSet' => 'PIN défini',
'profiles.changePin' => 'Modifier',
_ => null,
} ?? switch (path) {
'profiles.removePin' => 'Retirer',
'profiles.connectionsLabel' => 'Connexions',
'profiles.add' => 'Ajouter',
@@ -2400,8 +2446,18 @@ extension on TranslationsFr {
'libraries.sortLabels.dateAdded' => 'Date d\'ajout',
'libraries.sortLabels.releaseDate' => 'Date de sortie',
'libraries.sortLabels.rating' => 'Note',
'libraries.sortLabels.communityRating' => 'Note communautaire',
'libraries.sortLabels.criticRating' => 'Note critique',
'libraries.sortLabels.lastPlayed' => 'Dernière lecture',
'libraries.sortLabels.datePlayed' => 'Date de lecture',
'libraries.sortLabels.playCount' => 'Lectures',
'libraries.sortLabels.productionYear' => 'Année de production',
'libraries.sortLabels.runtime' => 'Durée',
'libraries.sortLabels.officialRating' => 'Classification officielle',
'libraries.sortLabels.premiereDate' => 'Date de première',
'libraries.sortLabels.startDate' => 'Date de début',
'libraries.sortLabels.airTime' => 'Heure de diffusion',
'libraries.sortLabels.studio' => 'Studio',
'libraries.sortLabels.random' => 'Aléatoire',
'libraries.sortLabels.dateShared' => 'Date de partage',
'libraries.sortLabels.latestEpisodeAirDate' => 'Dernière date de diffusion',
@@ -2765,6 +2821,8 @@ extension on TranslationsFr {
'metadataEdit.selectBackground' => 'Sélectionner l\'arrière-plan',
'metadataEdit.selectLogo' => 'Sélectionner le logo',
'metadataEdit.selectSquareArt' => 'Sélectionner l\'image carrée',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Depuis une URL',
'metadataEdit.uploadFile' => 'Importer un fichier',
'metadataEdit.enterImageUrl' => 'Entrer l\'URL de l\'image',
@@ -2788,8 +2846,6 @@ extension on TranslationsFr {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Épisodes ajoutés ces ${count} derniers jours',
'metadataEdit.deleteAfterPlaying' => 'Supprimer les épisodes après lecture',
'metadataEdit.never' => 'Jamais',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => 'Après un jour',
'metadataEdit.afterAWeek' => 'Après une semaine',
'metadataEdit.afterAMonth' => 'Après un mois',
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsIt extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysIt hotkeys = _TranslationsHotkeysIt._(_root);
@override late final _TranslationsFileInfoIt fileInfo = _TranslationsFileInfoIt._(_root);
@override late final _TranslationsMediaMenuIt mediaMenu = _TranslationsMediaMenuIt._(_root);
@override late final _TranslationsRateSheetIt rateSheet = _TranslationsRateSheetIt._(_root);
@override late final _TranslationsAccessibilityIt accessibility = _TranslationsAccessibilityIt._(_root);
@override late final _TranslationsTooltipsIt tooltips = _TranslationsTooltipsIt._(_root);
@override late final _TranslationsVideoControlsIt videoControls = _TranslationsVideoControlsIt._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuIt extends TranslationsMediaMenuEn {
@override String get playVersion => 'Riproduci versione...';
}
// Path: rateSheet
class _TranslationsRateSheetIt extends TranslationsRateSheetEn {
_TranslationsRateSheetIt._(TranslationsIt root) : this._root = root, super.internal(root);
final TranslationsIt _root; // ignore: unused_field
// Translations
@override String get title => 'Valuta';
@override String get server => 'Server';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => 'Imposta un punteggio';
@override String get notRated => 'Non valutato';
@override String get liked => 'Mi piace';
@override String get notLiked => 'Non contrassegnato con Mi piace';
@override String get saved => 'Salvato';
@override String get notAvailable => 'Nessuna corrispondenza trovata';
@override String get noConnectedTrackers => 'Collega un tracker in Impostazioni per valutarlo lì.';
}
// Path: accessibility
class _TranslationsAccessibilityIt extends TranslationsAccessibilityEn {
_TranslationsAccessibilityIt._(TranslationsIt root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsIt extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => 'Finisce alle ${time}';
@override String get pipActive => 'Riproduzione in Picture-in-Picture';
@override String get pipFailed => 'Impossibile avviare la modalità Picture-in-Picture';
@override String get screenshotSaved => 'Schermata salvata';
@override late final _TranslationsVideoControlsPipErrorsIt pipErrors = _TranslationsVideoControlsPipErrorsIt._(_root);
@override String get chapters => 'Capitoli';
@override String get noChaptersAvailable => 'Nessun capitolo disponibile';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsIt extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => 'Vai al sottotitolo precedente';
@override String get shaderToggle => 'Attiva/disattiva shader';
@override String get skipMarker => 'Salta intro/titoli di coda';
@override String get screenshot => 'Cattura schermata';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsIt extends TranslationsLibrariesSortLabels
@override String get dateAdded => 'Data di aggiunta';
@override String get releaseDate => 'Data di uscita';
@override String get rating => 'Valutazione';
@override String get communityRating => 'Valutazione della community';
@override String get criticRating => 'Valutazione critica';
@override String get lastPlayed => 'Ultima riproduzione';
@override String get datePlayed => 'Data di riproduzione';
@override String get playCount => 'Riproduzioni';
@override String get productionYear => 'Anno di produzione';
@override String get runtime => 'Durata';
@override String get officialRating => 'Classificazione ufficiale';
@override String get premiereDate => 'Data di première';
@override String get startDate => 'Data di inizio';
@override String get airTime => 'Orario di messa in onda';
@override String get studio => 'Studio';
@override String get random => 'Casuale';
@override String get dateShared => 'Data di condivisione';
@override String get latestEpisodeAirDate => 'Data ultima messa in onda';
@@ -2048,6 +2081,7 @@ extension on TranslationsIt {
'hotkeys.actions.subSeekPrev' => 'Vai al sottotitolo precedente',
'hotkeys.actions.shaderToggle' => 'Attiva/disattiva shader',
'hotkeys.actions.skipMarker' => 'Salta intro/titoli di coda',
'hotkeys.actions.screenshot' => 'Cattura schermata',
'fileInfo.title' => 'Info sul file',
'fileInfo.video' => 'Video',
'fileInfo.audio' => 'Audio',
@@ -2088,6 +2122,17 @@ extension on TranslationsIt {
'mediaMenu.rate' => 'Valuta',
'mediaMenu.playFromBeginning' => 'Riproduci dall\'inizio',
'mediaMenu.playVersion' => 'Riproduci versione...',
'rateSheet.title' => 'Valuta',
'rateSheet.server' => 'Server',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => 'Imposta un punteggio',
'rateSheet.notRated' => 'Non valutato',
'rateSheet.liked' => 'Mi piace',
'rateSheet.notLiked' => 'Non contrassegnato con Mi piace',
'rateSheet.saved' => 'Salvato',
'rateSheet.notAvailable' => 'Nessuna corrispondenza trovata',
'rateSheet.noConnectedTrackers' => 'Collega un tracker in Impostazioni per valutarlo lì.',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, film',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, serie TV',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsIt {
'videoControls.endsAt' => ({required Object time}) => 'Finisce alle ${time}',
'videoControls.pipActive' => 'Riproduzione in Picture-in-Picture',
'videoControls.pipFailed' => 'Impossibile avviare la modalità Picture-in-Picture',
'videoControls.screenshotSaved' => 'Schermata salvata',
'videoControls.pipErrors.androidVersion' => 'Richiede Android 8.0 o versioni successive',
'videoControls.pipErrors.iosVersion' => 'Richiede iOS 15.0 o versioni successive',
'videoControls.pipErrors.permissionDisabled' => 'Picture-in-picture è disattivato. Attivalo nelle impostazioni di sistema.',
@@ -2261,6 +2307,8 @@ extension on TranslationsIt {
'profiles.summarySingle' => 'Aggiungi profili per combinare utenti gestiti e identità locali',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profili · attivo: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profili',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Rimuovere la connessione?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Rimuovi l\'accesso di ${displayName} a ${connectionLabel}. Gli altri profili lo mantengono.',
'profiles.deleteProfileTitle' => 'Eliminare il profilo?',
@@ -2274,8 +2322,6 @@ extension on TranslationsIt {
'profiles.confirmPinTitle' => 'Conferma PIN',
'profiles.pinSet' => 'PIN impostato',
'profiles.changePin' => 'Cambia',
_ => null,
} ?? switch (path) {
'profiles.removePin' => 'Rimuovi',
'profiles.connectionsLabel' => 'Connessioni',
'profiles.add' => 'Aggiungi',
@@ -2400,8 +2446,18 @@ extension on TranslationsIt {
'libraries.sortLabels.dateAdded' => 'Data di aggiunta',
'libraries.sortLabels.releaseDate' => 'Data di uscita',
'libraries.sortLabels.rating' => 'Valutazione',
'libraries.sortLabels.communityRating' => 'Valutazione della community',
'libraries.sortLabels.criticRating' => 'Valutazione critica',
'libraries.sortLabels.lastPlayed' => 'Ultima riproduzione',
'libraries.sortLabels.datePlayed' => 'Data di riproduzione',
'libraries.sortLabels.playCount' => 'Riproduzioni',
'libraries.sortLabels.productionYear' => 'Anno di produzione',
'libraries.sortLabels.runtime' => 'Durata',
'libraries.sortLabels.officialRating' => 'Classificazione ufficiale',
'libraries.sortLabels.premiereDate' => 'Data di première',
'libraries.sortLabels.startDate' => 'Data di inizio',
'libraries.sortLabels.airTime' => 'Orario di messa in onda',
'libraries.sortLabels.studio' => 'Studio',
'libraries.sortLabels.random' => 'Casuale',
'libraries.sortLabels.dateShared' => 'Data di condivisione',
'libraries.sortLabels.latestEpisodeAirDate' => 'Data ultima messa in onda',
@@ -2765,6 +2821,8 @@ extension on TranslationsIt {
'metadataEdit.selectBackground' => 'Seleziona sfondo',
'metadataEdit.selectLogo' => 'Seleziona logo',
'metadataEdit.selectSquareArt' => 'Seleziona immagine quadrata',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Da URL',
'metadataEdit.uploadFile' => 'Carica file',
'metadataEdit.enterImageUrl' => 'Inserisci URL immagine',
@@ -2788,8 +2846,6 @@ extension on TranslationsIt {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Episodi aggiunti negli ultimi ${count} giorni',
'metadataEdit.deleteAfterPlaying' => 'Elimina episodi dopo la riproduzione',
'metadataEdit.never' => 'Mai',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => 'Dopo un giorno',
'metadataEdit.afterAWeek' => 'Dopo una settimana',
'metadataEdit.afterAMonth' => 'Dopo un mese',
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsJa extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysJa hotkeys = _TranslationsHotkeysJa._(_root);
@override late final _TranslationsFileInfoJa fileInfo = _TranslationsFileInfoJa._(_root);
@override late final _TranslationsMediaMenuJa mediaMenu = _TranslationsMediaMenuJa._(_root);
@override late final _TranslationsRateSheetJa rateSheet = _TranslationsRateSheetJa._(_root);
@override late final _TranslationsAccessibilityJa accessibility = _TranslationsAccessibilityJa._(_root);
@override late final _TranslationsTooltipsJa tooltips = _TranslationsTooltipsJa._(_root);
@override late final _TranslationsVideoControlsJa videoControls = _TranslationsVideoControlsJa._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuJa extends TranslationsMediaMenuEn {
@override String get playVersion => 'バージョンを再生...';
}
// Path: rateSheet
class _TranslationsRateSheetJa extends TranslationsRateSheetEn {
_TranslationsRateSheetJa._(TranslationsJa root) : this._root = root, super.internal(root);
final TranslationsJa _root; // ignore: unused_field
// Translations
@override String get title => '評価';
@override String get server => 'サーバー';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => 'スコアを設定';
@override String get notRated => '未評価';
@override String get liked => 'いいね済み';
@override String get notLiked => 'いいねなし';
@override String get saved => '保存済み';
@override String get notAvailable => '一致なし';
@override String get noConnectedTrackers => '設定でトラッカーを接続すると、そこで評価できます。';
}
// Path: accessibility
class _TranslationsAccessibilityJa extends TranslationsAccessibilityEn {
_TranslationsAccessibilityJa._(TranslationsJa root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsJa extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => '${time}に終了';
@override String get pipActive => 'ピクチャーインピクチャーで再生中';
@override String get pipFailed => 'ピクチャーインピクチャーの開始に失敗しました';
@override String get screenshotSaved => 'スクリーンショットを保存しました';
@override late final _TranslationsVideoControlsPipErrorsJa pipErrors = _TranslationsVideoControlsPipErrorsJa._(_root);
@override String get chapters => 'チャプター';
@override String get noChaptersAvailable => 'チャプターがありません';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsJa extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => '前の字幕にシーク';
@override String get shaderToggle => 'シェーダー切替';
@override String get skipMarker => 'イントロ/クレジットをスキップ';
@override String get screenshot => 'スクリーンショットを撮る';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsJa extends TranslationsLibrariesSortLabels
@override String get dateAdded => '追加日';
@override String get releaseDate => 'リリース日';
@override String get rating => '評価';
@override String get communityRating => 'コミュニティ評価';
@override String get criticRating => '批評家評価';
@override String get lastPlayed => '最終再生';
@override String get datePlayed => '再生日';
@override String get playCount => '再生回数';
@override String get productionYear => '製作年';
@override String get runtime => '再生時間';
@override String get officialRating => '公式レーティング';
@override String get premiereDate => 'プレミア日';
@override String get startDate => '開始日';
@override String get airTime => '放送時刻';
@override String get studio => 'スタジオ';
@override String get random => 'ランダム';
@override String get dateShared => '共有日';
@override String get latestEpisodeAirDate => '最新エピソード放送日';
@@ -2048,6 +2081,7 @@ extension on TranslationsJa {
'hotkeys.actions.subSeekPrev' => '前の字幕にシーク',
'hotkeys.actions.shaderToggle' => 'シェーダー切替',
'hotkeys.actions.skipMarker' => 'イントロ/クレジットをスキップ',
'hotkeys.actions.screenshot' => 'スクリーンショットを撮る',
'fileInfo.title' => 'ファイル情報',
'fileInfo.video' => '映像',
'fileInfo.audio' => '音声',
@@ -2088,6 +2122,17 @@ extension on TranslationsJa {
'mediaMenu.rate' => '評価',
'mediaMenu.playFromBeginning' => '最初から再生',
'mediaMenu.playVersion' => 'バージョンを再生...',
'rateSheet.title' => '評価',
'rateSheet.server' => 'サーバー',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => 'スコアを設定',
'rateSheet.notRated' => '未評価',
'rateSheet.liked' => 'いいね済み',
'rateSheet.notLiked' => 'いいねなし',
'rateSheet.saved' => '保存済み',
'rateSheet.notAvailable' => '一致なし',
'rateSheet.noConnectedTrackers' => '設定でトラッカーを接続すると、そこで評価できます。',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}、映画',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}、テレビ番組',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}、${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsJa {
'videoControls.endsAt' => ({required Object time}) => '${time}に終了',
'videoControls.pipActive' => 'ピクチャーインピクチャーで再生中',
'videoControls.pipFailed' => 'ピクチャーインピクチャーの開始に失敗しました',
'videoControls.screenshotSaved' => 'スクリーンショットを保存しました',
'videoControls.pipErrors.androidVersion' => 'Android 8.0以降が必要です',
'videoControls.pipErrors.iosVersion' => 'iOS 15.0以降が必要です',
'videoControls.pipErrors.permissionDisabled' => 'ピクチャーインピクチャーが無効です。システム設定で有効にしてください。',
@@ -2261,6 +2307,8 @@ extension on TranslationsJa {
'profiles.summarySingle' => 'プロファイルを追加して、管理対象ユーザーとローカルIDを混在させます',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count}個のプロファイル · アクティブ: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count}個のプロファイル',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => '接続を削除しますか?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => '${displayName}の${connectionLabel}へのアクセスを削除します。他のプロフィールには残ります。',
'profiles.deleteProfileTitle' => 'プロファイルを削除しますか?',
@@ -2274,8 +2322,6 @@ extension on TranslationsJa {
'profiles.confirmPinTitle' => 'PINを確認',
'profiles.pinSet' => 'PIN設定済み',
'profiles.changePin' => '変更',
_ => null,
} ?? switch (path) {
'profiles.removePin' => '削除',
'profiles.connectionsLabel' => '接続',
'profiles.add' => '追加',
@@ -2400,8 +2446,18 @@ extension on TranslationsJa {
'libraries.sortLabels.dateAdded' => '追加日',
'libraries.sortLabels.releaseDate' => 'リリース日',
'libraries.sortLabels.rating' => '評価',
'libraries.sortLabels.communityRating' => 'コミュニティ評価',
'libraries.sortLabels.criticRating' => '批評家評価',
'libraries.sortLabels.lastPlayed' => '最終再生',
'libraries.sortLabels.datePlayed' => '再生日',
'libraries.sortLabels.playCount' => '再生回数',
'libraries.sortLabels.productionYear' => '製作年',
'libraries.sortLabels.runtime' => '再生時間',
'libraries.sortLabels.officialRating' => '公式レーティング',
'libraries.sortLabels.premiereDate' => 'プレミア日',
'libraries.sortLabels.startDate' => '開始日',
'libraries.sortLabels.airTime' => '放送時刻',
'libraries.sortLabels.studio' => 'スタジオ',
'libraries.sortLabels.random' => 'ランダム',
'libraries.sortLabels.dateShared' => '共有日',
'libraries.sortLabels.latestEpisodeAirDate' => '最新エピソード放送日',
@@ -2765,6 +2821,8 @@ extension on TranslationsJa {
'metadataEdit.selectBackground' => '背景を選択',
'metadataEdit.selectLogo' => 'ロゴを選択',
'metadataEdit.selectSquareArt' => '正方形アートを選択',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'URLから',
'metadataEdit.uploadFile' => 'ファイルをアップロード',
'metadataEdit.enterImageUrl' => '画像URLを入力',
@@ -2788,8 +2846,6 @@ extension on TranslationsJa {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => '過去${count}日間に追加されたエピソード',
'metadataEdit.deleteAfterPlaying' => '再生後にエピソードを削除',
'metadataEdit.never' => 'しない',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => '1日後',
'metadataEdit.afterAWeek' => '1週間後',
'metadataEdit.afterAMonth' => '1ヶ月後',
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsKo extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysKo hotkeys = _TranslationsHotkeysKo._(_root);
@override late final _TranslationsFileInfoKo fileInfo = _TranslationsFileInfoKo._(_root);
@override late final _TranslationsMediaMenuKo mediaMenu = _TranslationsMediaMenuKo._(_root);
@override late final _TranslationsRateSheetKo rateSheet = _TranslationsRateSheetKo._(_root);
@override late final _TranslationsAccessibilityKo accessibility = _TranslationsAccessibilityKo._(_root);
@override late final _TranslationsTooltipsKo tooltips = _TranslationsTooltipsKo._(_root);
@override late final _TranslationsVideoControlsKo videoControls = _TranslationsVideoControlsKo._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuKo extends TranslationsMediaMenuEn {
@override String get playVersion => '버전 재생...';
}
// Path: rateSheet
class _TranslationsRateSheetKo extends TranslationsRateSheetEn {
_TranslationsRateSheetKo._(TranslationsKo root) : this._root = root, super.internal(root);
final TranslationsKo _root; // ignore: unused_field
// Translations
@override String get title => '평가';
@override String get server => '서버';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => '점수 설정';
@override String get notRated => '평가 없음';
@override String get liked => '좋아요';
@override String get notLiked => '좋아요 아님';
@override String get saved => '저장됨';
@override String get notAvailable => '일치 항목 없음';
@override String get noConnectedTrackers => '설정에서 트래커를 연결하면 거기에도 평가할 수 있습니다.';
}
// Path: accessibility
class _TranslationsAccessibilityKo extends TranslationsAccessibilityEn {
_TranslationsAccessibilityKo._(TranslationsKo root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsKo extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => '${time}에 종료';
@override String get pipActive => '화면 속 화면으로 재생 중';
@override String get pipFailed => '화면 속 화면 모드를 시작할 수 없습니다';
@override String get screenshotSaved => '스크린샷 저장됨';
@override late final _TranslationsVideoControlsPipErrorsKo pipErrors = _TranslationsVideoControlsPipErrorsKo._(_root);
@override String get chapters => '챕터';
@override String get noChaptersAvailable => '사용 가능한 챕터가 없습니다';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsKo extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => '이전 자막으로 이동';
@override String get shaderToggle => '셰이더 전환';
@override String get skipMarker => '인트로/크레딧 건너뛰기';
@override String get screenshot => '스크린샷 찍기';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsKo extends TranslationsLibrariesSortLabels
@override String get dateAdded => '추가된 날짜';
@override String get releaseDate => '출시일';
@override String get rating => '평점';
@override String get communityRating => '커뮤니티 평점';
@override String get criticRating => '평론가 평점';
@override String get lastPlayed => '마지막 재생';
@override String get datePlayed => '재생일';
@override String get playCount => '재생 횟수';
@override String get productionYear => '제작 연도';
@override String get runtime => '재생 시간';
@override String get officialRating => '공식 등급';
@override String get premiereDate => '최초 공개일';
@override String get startDate => '시작일';
@override String get airTime => '방영 시간';
@override String get studio => '스튜디오';
@override String get random => '무작위';
@override String get dateShared => '공유된 날짜';
@override String get latestEpisodeAirDate => '최신 에피소드 방영일';
@@ -2048,6 +2081,7 @@ extension on TranslationsKo {
'hotkeys.actions.subSeekPrev' => '이전 자막으로 이동',
'hotkeys.actions.shaderToggle' => '셰이더 전환',
'hotkeys.actions.skipMarker' => '인트로/크레딧 건너뛰기',
'hotkeys.actions.screenshot' => '스크린샷 찍기',
'fileInfo.title' => '파일 정보',
'fileInfo.video' => '비디오',
'fileInfo.audio' => '오디오',
@@ -2088,6 +2122,17 @@ extension on TranslationsKo {
'mediaMenu.rate' => '평가',
'mediaMenu.playFromBeginning' => '처음부터 재생',
'mediaMenu.playVersion' => '버전 재생...',
'rateSheet.title' => '평가',
'rateSheet.server' => '서버',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => '점수 설정',
'rateSheet.notRated' => '평가 없음',
'rateSheet.liked' => '좋아요',
'rateSheet.notLiked' => '좋아요 아님',
'rateSheet.saved' => '저장됨',
'rateSheet.notAvailable' => '일치 항목 없음',
'rateSheet.noConnectedTrackers' => '설정에서 트래커를 연결하면 거기에도 평가할 수 있습니다.',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, 영화',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, TV 프로그램',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsKo {
'videoControls.endsAt' => ({required Object time}) => '${time}에 종료',
'videoControls.pipActive' => '화면 속 화면으로 재생 중',
'videoControls.pipFailed' => '화면 속 화면 모드를 시작할 수 없습니다',
'videoControls.screenshotSaved' => '스크린샷 저장됨',
'videoControls.pipErrors.androidVersion' => 'Android 8.0 이상이 필요합니다',
'videoControls.pipErrors.iosVersion' => 'iOS 15.0 이상이 필요합니다',
'videoControls.pipErrors.permissionDisabled' => '화면 속 화면이 비활성화되어 있습니다. 시스템 설정에서 활성화하세요.',
@@ -2261,6 +2307,8 @@ extension on TranslationsKo {
'profiles.summarySingle' => '관리되는 사용자와 로컬 ID를 혼합하려면 프로필을 추가하세요',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count}개 프로필 · 활성: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count}개 프로필',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => '연결을 제거하시겠습니까?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => '${displayName}의 ${connectionLabel} 접근 권한을 제거합니다. 다른 프로필에는 유지됩니다.',
'profiles.deleteProfileTitle' => '프로필을 삭제하시겠습니까?',
@@ -2274,8 +2322,6 @@ extension on TranslationsKo {
'profiles.confirmPinTitle' => 'PIN 확인',
'profiles.pinSet' => 'PIN 설정됨',
'profiles.changePin' => '변경',
_ => null,
} ?? switch (path) {
'profiles.removePin' => '제거',
'profiles.connectionsLabel' => '연결',
'profiles.add' => '추가',
@@ -2400,8 +2446,18 @@ extension on TranslationsKo {
'libraries.sortLabels.dateAdded' => '추가된 날짜',
'libraries.sortLabels.releaseDate' => '출시일',
'libraries.sortLabels.rating' => '평점',
'libraries.sortLabels.communityRating' => '커뮤니티 평점',
'libraries.sortLabels.criticRating' => '평론가 평점',
'libraries.sortLabels.lastPlayed' => '마지막 재생',
'libraries.sortLabels.datePlayed' => '재생일',
'libraries.sortLabels.playCount' => '재생 횟수',
'libraries.sortLabels.productionYear' => '제작 연도',
'libraries.sortLabels.runtime' => '재생 시간',
'libraries.sortLabels.officialRating' => '공식 등급',
'libraries.sortLabels.premiereDate' => '최초 공개일',
'libraries.sortLabels.startDate' => '시작일',
'libraries.sortLabels.airTime' => '방영 시간',
'libraries.sortLabels.studio' => '스튜디오',
'libraries.sortLabels.random' => '무작위',
'libraries.sortLabels.dateShared' => '공유된 날짜',
'libraries.sortLabels.latestEpisodeAirDate' => '최신 에피소드 방영일',
@@ -2765,6 +2821,8 @@ extension on TranslationsKo {
'metadataEdit.selectBackground' => '배경 선택',
'metadataEdit.selectLogo' => '로고 선택',
'metadataEdit.selectSquareArt' => '정사각형 아트 선택',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'URL에서',
'metadataEdit.uploadFile' => '파일 업로드',
'metadataEdit.enterImageUrl' => '이미지 URL 입력',
@@ -2788,8 +2846,6 @@ extension on TranslationsKo {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => '최근 ${count}일 내 추가된 에피소드',
'metadataEdit.deleteAfterPlaying' => '재생 후 에피소드 삭제',
'metadataEdit.never' => '안 함',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => '하루 후',
'metadataEdit.afterAWeek' => '일주일 후',
'metadataEdit.afterAMonth' => '한 달 후',
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsNb extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysNb hotkeys = _TranslationsHotkeysNb._(_root);
@override late final _TranslationsFileInfoNb fileInfo = _TranslationsFileInfoNb._(_root);
@override late final _TranslationsMediaMenuNb mediaMenu = _TranslationsMediaMenuNb._(_root);
@override late final _TranslationsRateSheetNb rateSheet = _TranslationsRateSheetNb._(_root);
@override late final _TranslationsAccessibilityNb accessibility = _TranslationsAccessibilityNb._(_root);
@override late final _TranslationsTooltipsNb tooltips = _TranslationsTooltipsNb._(_root);
@override late final _TranslationsVideoControlsNb videoControls = _TranslationsVideoControlsNb._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuNb extends TranslationsMediaMenuEn {
@override String get playVersion => 'Spill av versjon...';
}
// Path: rateSheet
class _TranslationsRateSheetNb extends TranslationsRateSheetEn {
_TranslationsRateSheetNb._(TranslationsNb root) : this._root = root, super.internal(root);
final TranslationsNb _root; // ignore: unused_field
// Translations
@override String get title => 'Vurder';
@override String get server => 'Server';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => 'Sett en poengsum';
@override String get notRated => 'Ikke vurdert';
@override String get liked => 'Likt';
@override String get notLiked => 'Ikke likt';
@override String get saved => 'Lagret';
@override String get notAvailable => 'Ingen treff';
@override String get noConnectedTrackers => 'Koble til en sporer i Innstillinger for å vurdere der.';
}
// Path: accessibility
class _TranslationsAccessibilityNb extends TranslationsAccessibilityEn {
_TranslationsAccessibilityNb._(TranslationsNb root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsNb extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => 'Slutter kl. ${time}';
@override String get pipActive => 'Spiller i bilde-i-bilde';
@override String get pipFailed => 'Bilde-i-bilde kunne ikke starte';
@override String get screenshotSaved => 'Skjermbilde lagret';
@override late final _TranslationsVideoControlsPipErrorsNb pipErrors = _TranslationsVideoControlsPipErrorsNb._(_root);
@override String get chapters => 'Kapitler';
@override String get noChaptersAvailable => 'Ingen kapitler tilgjengelig';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsNb extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => 'Spol til forrige undertekst';
@override String get shaderToggle => 'Veksle shadere';
@override String get skipMarker => 'Hopp over intro/rulletekst';
@override String get screenshot => 'Ta skjermbilde';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsNb extends TranslationsLibrariesSortLabels
@override String get dateAdded => 'Lagt til-dato';
@override String get releaseDate => 'Utgivelsesdato';
@override String get rating => 'Vurdering';
@override String get communityRating => 'Fellesskapsvurdering';
@override String get criticRating => 'Kritikervurdering';
@override String get lastPlayed => 'Sist spilt';
@override String get datePlayed => 'Avspillingsdato';
@override String get playCount => 'Avspillinger';
@override String get productionYear => 'Produksjonsår';
@override String get runtime => 'Varighet';
@override String get officialRating => 'Offisiell vurdering';
@override String get premiereDate => 'Premieredato';
@override String get startDate => 'Startdato';
@override String get airTime => 'Sendetid';
@override String get studio => 'Studio';
@override String get random => 'Tilfeldig';
@override String get dateShared => 'Delingsdato';
@override String get latestEpisodeAirDate => 'Siste episodes sendedato';
@@ -2048,6 +2081,7 @@ extension on TranslationsNb {
'hotkeys.actions.subSeekPrev' => 'Spol til forrige undertekst',
'hotkeys.actions.shaderToggle' => 'Veksle shadere',
'hotkeys.actions.skipMarker' => 'Hopp over intro/rulletekst',
'hotkeys.actions.screenshot' => 'Ta skjermbilde',
'fileInfo.title' => 'Filinformasjon',
'fileInfo.video' => 'Video',
'fileInfo.audio' => 'Lyd',
@@ -2088,6 +2122,17 @@ extension on TranslationsNb {
'mediaMenu.rate' => 'Vurder',
'mediaMenu.playFromBeginning' => 'Spill fra begynnelsen',
'mediaMenu.playVersion' => 'Spill av versjon...',
'rateSheet.title' => 'Vurder',
'rateSheet.server' => 'Server',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => 'Sett en poengsum',
'rateSheet.notRated' => 'Ikke vurdert',
'rateSheet.liked' => 'Likt',
'rateSheet.notLiked' => 'Ikke likt',
'rateSheet.saved' => 'Lagret',
'rateSheet.notAvailable' => 'Ingen treff',
'rateSheet.noConnectedTrackers' => 'Koble til en sporer i Innstillinger for å vurdere der.',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, film',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, TV-serie',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsNb {
'videoControls.endsAt' => ({required Object time}) => 'Slutter kl. ${time}',
'videoControls.pipActive' => 'Spiller i bilde-i-bilde',
'videoControls.pipFailed' => 'Bilde-i-bilde kunne ikke starte',
'videoControls.screenshotSaved' => 'Skjermbilde lagret',
'videoControls.pipErrors.androidVersion' => 'Krever Android 8.0 eller nyere',
'videoControls.pipErrors.iosVersion' => 'Krever iOS 15.0 eller nyere',
'videoControls.pipErrors.permissionDisabled' => 'Bilde-i-bilde er deaktivert. Slå det på i systeminnstillinger.',
@@ -2261,6 +2307,8 @@ extension on TranslationsNb {
'profiles.summarySingle' => 'Legg til profiler for å blande administrerte brukere og lokale identiteter',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profiler · aktiv: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profiler',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Fjerne tilkobling?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Fjern ${displayName}s tilgang til ${connectionLabel}. Andre profiler beholder den.',
'profiles.deleteProfileTitle' => 'Slette profil?',
@@ -2274,8 +2322,6 @@ extension on TranslationsNb {
'profiles.confirmPinTitle' => 'Bekreft PIN',
'profiles.pinSet' => 'PIN satt',
'profiles.changePin' => 'Endre',
_ => null,
} ?? switch (path) {
'profiles.removePin' => 'Fjern',
'profiles.connectionsLabel' => 'Tilkoblinger',
'profiles.add' => 'Legg til',
@@ -2400,8 +2446,18 @@ extension on TranslationsNb {
'libraries.sortLabels.dateAdded' => 'Lagt til-dato',
'libraries.sortLabels.releaseDate' => 'Utgivelsesdato',
'libraries.sortLabels.rating' => 'Vurdering',
'libraries.sortLabels.communityRating' => 'Fellesskapsvurdering',
'libraries.sortLabels.criticRating' => 'Kritikervurdering',
'libraries.sortLabels.lastPlayed' => 'Sist spilt',
'libraries.sortLabels.datePlayed' => 'Avspillingsdato',
'libraries.sortLabels.playCount' => 'Avspillinger',
'libraries.sortLabels.productionYear' => 'Produksjonsår',
'libraries.sortLabels.runtime' => 'Varighet',
'libraries.sortLabels.officialRating' => 'Offisiell vurdering',
'libraries.sortLabels.premiereDate' => 'Premieredato',
'libraries.sortLabels.startDate' => 'Startdato',
'libraries.sortLabels.airTime' => 'Sendetid',
'libraries.sortLabels.studio' => 'Studio',
'libraries.sortLabels.random' => 'Tilfeldig',
'libraries.sortLabels.dateShared' => 'Delingsdato',
'libraries.sortLabels.latestEpisodeAirDate' => 'Siste episodes sendedato',
@@ -2765,6 +2821,8 @@ extension on TranslationsNb {
'metadataEdit.selectBackground' => 'Velg bakgrunn',
'metadataEdit.selectLogo' => 'Velg logo',
'metadataEdit.selectSquareArt' => 'Velg kvadratisk bilde',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Fra URL',
'metadataEdit.uploadFile' => 'Last opp fil',
'metadataEdit.enterImageUrl' => 'Skriv inn bilde-URL',
@@ -2788,8 +2846,6 @@ extension on TranslationsNb {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Episoder lagt til de siste ${count} dagene',
'metadataEdit.deleteAfterPlaying' => 'Slett episoder etter avspilling',
'metadataEdit.never' => 'Aldri',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => 'Etter en dag',
'metadataEdit.afterAWeek' => 'Etter en uke',
'metadataEdit.afterAMonth' => 'Etter en måned',
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsNl extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysNl hotkeys = _TranslationsHotkeysNl._(_root);
@override late final _TranslationsFileInfoNl fileInfo = _TranslationsFileInfoNl._(_root);
@override late final _TranslationsMediaMenuNl mediaMenu = _TranslationsMediaMenuNl._(_root);
@override late final _TranslationsRateSheetNl rateSheet = _TranslationsRateSheetNl._(_root);
@override late final _TranslationsAccessibilityNl accessibility = _TranslationsAccessibilityNl._(_root);
@override late final _TranslationsTooltipsNl tooltips = _TranslationsTooltipsNl._(_root);
@override late final _TranslationsVideoControlsNl videoControls = _TranslationsVideoControlsNl._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuNl extends TranslationsMediaMenuEn {
@override String get playVersion => 'Versie afspelen...';
}
// Path: rateSheet
class _TranslationsRateSheetNl extends TranslationsRateSheetEn {
_TranslationsRateSheetNl._(TranslationsNl root) : this._root = root, super.internal(root);
final TranslationsNl _root; // ignore: unused_field
// Translations
@override String get title => 'Beoordelen';
@override String get server => 'Server';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => 'Score instellen';
@override String get notRated => 'Niet beoordeeld';
@override String get liked => 'Geliket';
@override String get notLiked => 'Niet geliket';
@override String get saved => 'Opgeslagen';
@override String get notAvailable => 'Geen match gevonden';
@override String get noConnectedTrackers => 'Verbind een tracker in Instellingen om daar te beoordelen.';
}
// Path: accessibility
class _TranslationsAccessibilityNl extends TranslationsAccessibilityEn {
_TranslationsAccessibilityNl._(TranslationsNl root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsNl extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => 'Eindigt om ${time}';
@override String get pipActive => 'Afspelen in beeld-in-beeld';
@override String get pipFailed => 'Beeld-in-beeld kon niet worden gestart';
@override String get screenshotSaved => 'Schermafbeelding opgeslagen';
@override late final _TranslationsVideoControlsPipErrorsNl pipErrors = _TranslationsVideoControlsPipErrorsNl._(_root);
@override String get chapters => 'Hoofdstukken';
@override String get noChaptersAvailable => 'Geen hoofdstukken beschikbaar';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsNl extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => 'Naar vorige ondertitel';
@override String get shaderToggle => 'Shaders aan/uit';
@override String get skipMarker => 'Intro/aftiteling overslaan';
@override String get screenshot => 'Schermafbeelding maken';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsNl extends TranslationsLibrariesSortLabels
@override String get dateAdded => 'Toegevoegd op';
@override String get releaseDate => 'Uitgavedatum';
@override String get rating => 'Beoordeling';
@override String get communityRating => 'Communitybeoordeling';
@override String get criticRating => 'Criticusbeoordeling';
@override String get lastPlayed => 'Laatst afgespeeld';
@override String get datePlayed => 'Afspeeldatum';
@override String get playCount => 'Aantal afspelingen';
@override String get productionYear => 'Productiejaar';
@override String get runtime => 'Speelduur';
@override String get officialRating => 'Officiële beoordeling';
@override String get premiereDate => 'Premièredatum';
@override String get startDate => 'Begindatum';
@override String get airTime => 'Uitzendtijd';
@override String get studio => 'Studio';
@override String get random => 'Willekeurig';
@override String get dateShared => 'Gedeeld op';
@override String get latestEpisodeAirDate => 'Laatste afleveringsuitzending';
@@ -2048,6 +2081,7 @@ extension on TranslationsNl {
'hotkeys.actions.subSeekPrev' => 'Naar vorige ondertitel',
'hotkeys.actions.shaderToggle' => 'Shaders aan/uit',
'hotkeys.actions.skipMarker' => 'Intro/aftiteling overslaan',
'hotkeys.actions.screenshot' => 'Schermafbeelding maken',
'fileInfo.title' => 'Bestand info',
'fileInfo.video' => 'Video',
'fileInfo.audio' => 'Audio',
@@ -2088,6 +2122,17 @@ extension on TranslationsNl {
'mediaMenu.rate' => 'Beoordelen',
'mediaMenu.playFromBeginning' => 'Afspelen vanaf het begin',
'mediaMenu.playVersion' => 'Versie afspelen...',
'rateSheet.title' => 'Beoordelen',
'rateSheet.server' => 'Server',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => 'Score instellen',
'rateSheet.notRated' => 'Niet beoordeeld',
'rateSheet.liked' => 'Geliket',
'rateSheet.notLiked' => 'Niet geliket',
'rateSheet.saved' => 'Opgeslagen',
'rateSheet.notAvailable' => 'Geen match gevonden',
'rateSheet.noConnectedTrackers' => 'Verbind een tracker in Instellingen om daar te beoordelen.',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, film',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, TV-serie',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsNl {
'videoControls.endsAt' => ({required Object time}) => 'Eindigt om ${time}',
'videoControls.pipActive' => 'Afspelen in beeld-in-beeld',
'videoControls.pipFailed' => 'Beeld-in-beeld kon niet worden gestart',
'videoControls.screenshotSaved' => 'Schermafbeelding opgeslagen',
'videoControls.pipErrors.androidVersion' => 'Vereist Android 8.0 of nieuwer',
'videoControls.pipErrors.iosVersion' => 'Vereist iOS 15.0 of nieuwer',
'videoControls.pipErrors.permissionDisabled' => 'Picture-in-picture is uitgeschakeld. Schakel het in via systeeminstellingen.',
@@ -2261,6 +2307,8 @@ extension on TranslationsNl {
'profiles.summarySingle' => 'Voeg profielen toe om beheerde gebruikers en lokale identiteiten te combineren',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profielen · actief: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profielen',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Verbinding verwijderen?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Verwijder ${displayName}s toegang tot ${connectionLabel}. Andere profielen behouden die.',
'profiles.deleteProfileTitle' => 'Profiel verwijderen?',
@@ -2274,8 +2322,6 @@ extension on TranslationsNl {
'profiles.confirmPinTitle' => 'PIN bevestigen',
'profiles.pinSet' => 'PIN ingesteld',
'profiles.changePin' => 'Wijzigen',
_ => null,
} ?? switch (path) {
'profiles.removePin' => 'Verwijderen',
'profiles.connectionsLabel' => 'Verbindingen',
'profiles.add' => 'Toevoegen',
@@ -2400,8 +2446,18 @@ extension on TranslationsNl {
'libraries.sortLabels.dateAdded' => 'Toegevoegd op',
'libraries.sortLabels.releaseDate' => 'Uitgavedatum',
'libraries.sortLabels.rating' => 'Beoordeling',
'libraries.sortLabels.communityRating' => 'Communitybeoordeling',
'libraries.sortLabels.criticRating' => 'Criticusbeoordeling',
'libraries.sortLabels.lastPlayed' => 'Laatst afgespeeld',
'libraries.sortLabels.datePlayed' => 'Afspeeldatum',
'libraries.sortLabels.playCount' => 'Aantal afspelingen',
'libraries.sortLabels.productionYear' => 'Productiejaar',
'libraries.sortLabels.runtime' => 'Speelduur',
'libraries.sortLabels.officialRating' => 'Officiële beoordeling',
'libraries.sortLabels.premiereDate' => 'Premièredatum',
'libraries.sortLabels.startDate' => 'Begindatum',
'libraries.sortLabels.airTime' => 'Uitzendtijd',
'libraries.sortLabels.studio' => 'Studio',
'libraries.sortLabels.random' => 'Willekeurig',
'libraries.sortLabels.dateShared' => 'Gedeeld op',
'libraries.sortLabels.latestEpisodeAirDate' => 'Laatste afleveringsuitzending',
@@ -2765,6 +2821,8 @@ extension on TranslationsNl {
'metadataEdit.selectBackground' => 'Achtergrond selecteren',
'metadataEdit.selectLogo' => 'Logo selecteren',
'metadataEdit.selectSquareArt' => 'Vierkante afbeelding selecteren',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Vanaf URL',
'metadataEdit.uploadFile' => 'Bestand uploaden',
'metadataEdit.enterImageUrl' => 'Voer afbeeldings-URL in',
@@ -2788,8 +2846,6 @@ extension on TranslationsNl {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Afleveringen toegevoegd in de afgelopen ${count} dagen',
'metadataEdit.deleteAfterPlaying' => 'Afleveringen verwijderen na afspelen',
'metadataEdit.never' => 'Nooit',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => 'Na een dag',
'metadataEdit.afterAWeek' => 'Na een week',
'metadataEdit.afterAMonth' => 'Na een maand',
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsPl extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysPl hotkeys = _TranslationsHotkeysPl._(_root);
@override late final _TranslationsFileInfoPl fileInfo = _TranslationsFileInfoPl._(_root);
@override late final _TranslationsMediaMenuPl mediaMenu = _TranslationsMediaMenuPl._(_root);
@override late final _TranslationsRateSheetPl rateSheet = _TranslationsRateSheetPl._(_root);
@override late final _TranslationsAccessibilityPl accessibility = _TranslationsAccessibilityPl._(_root);
@override late final _TranslationsTooltipsPl tooltips = _TranslationsTooltipsPl._(_root);
@override late final _TranslationsVideoControlsPl videoControls = _TranslationsVideoControlsPl._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuPl extends TranslationsMediaMenuEn {
@override String get playVersion => 'Odtwórz wersję...';
}
// Path: rateSheet
class _TranslationsRateSheetPl extends TranslationsRateSheetEn {
_TranslationsRateSheetPl._(TranslationsPl root) : this._root = root, super.internal(root);
final TranslationsPl _root; // ignore: unused_field
// Translations
@override String get title => 'Oceń';
@override String get server => 'Serwer';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => 'Ustaw ocenę';
@override String get notRated => 'Nie oceniono';
@override String get liked => 'Polubione';
@override String get notLiked => 'Nie polubiono';
@override String get saved => 'Zapisano';
@override String get notAvailable => 'Nie znaleziono dopasowania';
@override String get noConnectedTrackers => 'Połącz tracker w Ustawieniach, aby tam oceniać.';
}
// Path: accessibility
class _TranslationsAccessibilityPl extends TranslationsAccessibilityEn {
_TranslationsAccessibilityPl._(TranslationsPl root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsPl extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => 'Kończy się o ${time}';
@override String get pipActive => 'Odtwarzanie w trybie obraz w obrazie';
@override String get pipFailed => 'Nie udało się uruchomić trybu obraz w obrazie';
@override String get screenshotSaved => 'Zrzut ekranu zapisany';
@override late final _TranslationsVideoControlsPipErrorsPl pipErrors = _TranslationsVideoControlsPipErrorsPl._(_root);
@override String get chapters => 'Rozdziały';
@override String get noChaptersAvailable => 'Brak dostępnych rozdziałów';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsPl extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => 'Przewiń do poprzedniego napisu';
@override String get shaderToggle => 'Przełącz shadery';
@override String get skipMarker => 'Pomiń intro/napisy końcowe';
@override String get screenshot => 'Zrób zrzut ekranu';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsPl extends TranslationsLibrariesSortLabels
@override String get dateAdded => 'Data dodania';
@override String get releaseDate => 'Data premiery';
@override String get rating => 'Ocena';
@override String get communityRating => 'Ocena społeczności';
@override String get criticRating => 'Ocena krytyków';
@override String get lastPlayed => 'Ostatnio odtwarzane';
@override String get datePlayed => 'Data odtworzenia';
@override String get playCount => 'Liczba odtworzeń';
@override String get productionYear => 'Rok produkcji';
@override String get runtime => 'Czas trwania';
@override String get officialRating => 'Oficjalna klasyfikacja';
@override String get premiereDate => 'Data premiery';
@override String get startDate => 'Data rozpoczęcia';
@override String get airTime => 'Godzina emisji';
@override String get studio => 'Studio';
@override String get random => 'Losowo';
@override String get dateShared => 'Data udostępnienia';
@override String get latestEpisodeAirDate => 'Data emisji ostatniego odcinka';
@@ -2048,6 +2081,7 @@ extension on TranslationsPl {
'hotkeys.actions.subSeekPrev' => 'Przewiń do poprzedniego napisu',
'hotkeys.actions.shaderToggle' => 'Przełącz shadery',
'hotkeys.actions.skipMarker' => 'Pomiń intro/napisy końcowe',
'hotkeys.actions.screenshot' => 'Zrób zrzut ekranu',
'fileInfo.title' => 'Informacje o pliku',
'fileInfo.video' => 'Wideo',
'fileInfo.audio' => 'Audio',
@@ -2088,6 +2122,17 @@ extension on TranslationsPl {
'mediaMenu.rate' => 'Oceń',
'mediaMenu.playFromBeginning' => 'Odtwórz od początku',
'mediaMenu.playVersion' => 'Odtwórz wersję...',
'rateSheet.title' => 'Oceń',
'rateSheet.server' => 'Serwer',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => 'Ustaw ocenę',
'rateSheet.notRated' => 'Nie oceniono',
'rateSheet.liked' => 'Polubione',
'rateSheet.notLiked' => 'Nie polubiono',
'rateSheet.saved' => 'Zapisano',
'rateSheet.notAvailable' => 'Nie znaleziono dopasowania',
'rateSheet.noConnectedTrackers' => 'Połącz tracker w Ustawieniach, aby tam oceniać.',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, film',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, serial TV',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsPl {
'videoControls.endsAt' => ({required Object time}) => 'Kończy się o ${time}',
'videoControls.pipActive' => 'Odtwarzanie w trybie obraz w obrazie',
'videoControls.pipFailed' => 'Nie udało się uruchomić trybu obraz w obrazie',
'videoControls.screenshotSaved' => 'Zrzut ekranu zapisany',
'videoControls.pipErrors.androidVersion' => 'Wymaga Androida 8.0 lub nowszego',
'videoControls.pipErrors.iosVersion' => 'Wymaga iOS 15.0 lub nowszego',
'videoControls.pipErrors.permissionDisabled' => 'Obraz w obrazie jest wyłączony. Włącz go w ustawieniach systemu.',
@@ -2261,6 +2307,8 @@ extension on TranslationsPl {
'profiles.summarySingle' => 'Dodaj profile, aby łączyć zarządzanych użytkowników i tożsamości lokalne',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profili · aktywny: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profili',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Usunąć połączenie?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Usuń dostęp ${displayName} do ${connectionLabel}. Inne profile go zachowają.',
'profiles.deleteProfileTitle' => 'Usunąć profil?',
@@ -2274,8 +2322,6 @@ extension on TranslationsPl {
'profiles.confirmPinTitle' => 'Potwierdź PIN',
'profiles.pinSet' => 'PIN ustawiony',
'profiles.changePin' => 'Zmień',
_ => null,
} ?? switch (path) {
'profiles.removePin' => 'Usuń',
'profiles.connectionsLabel' => 'Połączenia',
'profiles.add' => 'Dodaj',
@@ -2400,8 +2446,18 @@ extension on TranslationsPl {
'libraries.sortLabels.dateAdded' => 'Data dodania',
'libraries.sortLabels.releaseDate' => 'Data premiery',
'libraries.sortLabels.rating' => 'Ocena',
'libraries.sortLabels.communityRating' => 'Ocena społeczności',
'libraries.sortLabels.criticRating' => 'Ocena krytyków',
'libraries.sortLabels.lastPlayed' => 'Ostatnio odtwarzane',
'libraries.sortLabels.datePlayed' => 'Data odtworzenia',
'libraries.sortLabels.playCount' => 'Liczba odtworzeń',
'libraries.sortLabels.productionYear' => 'Rok produkcji',
'libraries.sortLabels.runtime' => 'Czas trwania',
'libraries.sortLabels.officialRating' => 'Oficjalna klasyfikacja',
'libraries.sortLabels.premiereDate' => 'Data premiery',
'libraries.sortLabels.startDate' => 'Data rozpoczęcia',
'libraries.sortLabels.airTime' => 'Godzina emisji',
'libraries.sortLabels.studio' => 'Studio',
'libraries.sortLabels.random' => 'Losowo',
'libraries.sortLabels.dateShared' => 'Data udostępnienia',
'libraries.sortLabels.latestEpisodeAirDate' => 'Data emisji ostatniego odcinka',
@@ -2765,6 +2821,8 @@ extension on TranslationsPl {
'metadataEdit.selectBackground' => 'Wybierz tło',
'metadataEdit.selectLogo' => 'Wybierz logo',
'metadataEdit.selectSquareArt' => 'Wybierz kwadratowy obraz',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Z URL',
'metadataEdit.uploadFile' => 'Prześlij plik',
'metadataEdit.enterImageUrl' => 'Wprowadź URL obrazu',
@@ -2788,8 +2846,6 @@ extension on TranslationsPl {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Odcinki dodane w ciągu ostatnich ${count} dni',
'metadataEdit.deleteAfterPlaying' => 'Usuń odcinki po odtworzeniu',
'metadataEdit.never' => 'Nigdy',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => 'Po jednym dniu',
'metadataEdit.afterAWeek' => 'Po tygodniu',
'metadataEdit.afterAMonth' => 'Po miesiącu',
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsPt extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysPt hotkeys = _TranslationsHotkeysPt._(_root);
@override late final _TranslationsFileInfoPt fileInfo = _TranslationsFileInfoPt._(_root);
@override late final _TranslationsMediaMenuPt mediaMenu = _TranslationsMediaMenuPt._(_root);
@override late final _TranslationsRateSheetPt rateSheet = _TranslationsRateSheetPt._(_root);
@override late final _TranslationsAccessibilityPt accessibility = _TranslationsAccessibilityPt._(_root);
@override late final _TranslationsTooltipsPt tooltips = _TranslationsTooltipsPt._(_root);
@override late final _TranslationsVideoControlsPt videoControls = _TranslationsVideoControlsPt._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuPt extends TranslationsMediaMenuEn {
@override String get playVersion => 'Reproduzir versão...';
}
// Path: rateSheet
class _TranslationsRateSheetPt extends TranslationsRateSheetEn {
_TranslationsRateSheetPt._(TranslationsPt root) : this._root = root, super.internal(root);
final TranslationsPt _root; // ignore: unused_field
// Translations
@override String get title => 'Avaliar';
@override String get server => 'Servidor';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => 'Definir pontuação';
@override String get notRated => 'Sem avaliação';
@override String get liked => 'Gostei';
@override String get notLiked => 'Não marcado como gostei';
@override String get saved => 'Salvo';
@override String get notAvailable => 'Nenhuma correspondência encontrada';
@override String get noConnectedTrackers => 'Conecte um rastreador em Configurações para avaliar lá.';
}
// Path: accessibility
class _TranslationsAccessibilityPt extends TranslationsAccessibilityEn {
_TranslationsAccessibilityPt._(TranslationsPt root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsPt extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => 'Termina às ${time}';
@override String get pipActive => 'Reproduzindo em Picture-in-Picture';
@override String get pipFailed => 'Falha ao iniciar picture-in-picture';
@override String get screenshotSaved => 'Captura de tela salva';
@override late final _TranslationsVideoControlsPipErrorsPt pipErrors = _TranslationsVideoControlsPipErrorsPt._(_root);
@override String get chapters => 'Capítulos';
@override String get noChaptersAvailable => 'Nenhum capítulo disponível';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsPt extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => 'Ir para Legenda Anterior';
@override String get shaderToggle => 'Alternar Shaders';
@override String get skipMarker => 'Pular Intro/Créditos';
@override String get screenshot => 'Capturar tela';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsPt extends TranslationsLibrariesSortLabels
@override String get dateAdded => 'Data de adição';
@override String get releaseDate => 'Data de lançamento';
@override String get rating => 'Avaliação';
@override String get communityRating => 'Avaliação da comunidade';
@override String get criticRating => 'Avaliação da crítica';
@override String get lastPlayed => 'Última reprodução';
@override String get datePlayed => 'Data de reprodução';
@override String get playCount => 'Reproduções';
@override String get productionYear => 'Ano de produção';
@override String get runtime => 'Duração';
@override String get officialRating => 'Classificação oficial';
@override String get premiereDate => 'Data de estreia';
@override String get startDate => 'Data de início';
@override String get airTime => 'Horário de exibição';
@override String get studio => 'Estúdio';
@override String get random => 'Aleatório';
@override String get dateShared => 'Data de compartilhamento';
@override String get latestEpisodeAirDate => 'Última data de exibição do episódio';
@@ -2048,6 +2081,7 @@ extension on TranslationsPt {
'hotkeys.actions.subSeekPrev' => 'Ir para Legenda Anterior',
'hotkeys.actions.shaderToggle' => 'Alternar Shaders',
'hotkeys.actions.skipMarker' => 'Pular Intro/Créditos',
'hotkeys.actions.screenshot' => 'Capturar tela',
'fileInfo.title' => 'Info do Arquivo',
'fileInfo.video' => 'Vídeo',
'fileInfo.audio' => 'Áudio',
@@ -2088,6 +2122,17 @@ extension on TranslationsPt {
'mediaMenu.rate' => 'Avaliar',
'mediaMenu.playFromBeginning' => 'Reproduzir do início',
'mediaMenu.playVersion' => 'Reproduzir versão...',
'rateSheet.title' => 'Avaliar',
'rateSheet.server' => 'Servidor',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => 'Definir pontuação',
'rateSheet.notRated' => 'Sem avaliação',
'rateSheet.liked' => 'Gostei',
'rateSheet.notLiked' => 'Não marcado como gostei',
'rateSheet.saved' => 'Salvo',
'rateSheet.notAvailable' => 'Nenhuma correspondência encontrada',
'rateSheet.noConnectedTrackers' => 'Conecte um rastreador em Configurações para avaliar lá.',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, filme',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, série de TV',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsPt {
'videoControls.endsAt' => ({required Object time}) => 'Termina às ${time}',
'videoControls.pipActive' => 'Reproduzindo em Picture-in-Picture',
'videoControls.pipFailed' => 'Falha ao iniciar picture-in-picture',
'videoControls.screenshotSaved' => 'Captura de tela salva',
'videoControls.pipErrors.androidVersion' => 'Requer Android 8.0 ou superior',
'videoControls.pipErrors.iosVersion' => 'Requer iOS 15.0 ou superior',
'videoControls.pipErrors.permissionDisabled' => 'Picture-in-picture está desativado. Ative nas configurações do sistema.',
@@ -2261,6 +2307,8 @@ extension on TranslationsPt {
'profiles.summarySingle' => 'Adicione perfis para mesclar usuários gerenciados e identidades locais',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} perfis · ativo: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} perfis',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Remover conexão?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Remover acesso de ${displayName} a ${connectionLabel}. Outros perfis mantêm o acesso.',
'profiles.deleteProfileTitle' => 'Excluir perfil?',
@@ -2274,8 +2322,6 @@ extension on TranslationsPt {
'profiles.confirmPinTitle' => 'Confirmar PIN',
'profiles.pinSet' => 'PIN definido',
'profiles.changePin' => 'Alterar',
_ => null,
} ?? switch (path) {
'profiles.removePin' => 'Remover',
'profiles.connectionsLabel' => 'Conexões',
'profiles.add' => 'Adicionar',
@@ -2400,8 +2446,18 @@ extension on TranslationsPt {
'libraries.sortLabels.dateAdded' => 'Data de adição',
'libraries.sortLabels.releaseDate' => 'Data de lançamento',
'libraries.sortLabels.rating' => 'Avaliação',
'libraries.sortLabels.communityRating' => 'Avaliação da comunidade',
'libraries.sortLabels.criticRating' => 'Avaliação da crítica',
'libraries.sortLabels.lastPlayed' => 'Última reprodução',
'libraries.sortLabels.datePlayed' => 'Data de reprodução',
'libraries.sortLabels.playCount' => 'Reproduções',
'libraries.sortLabels.productionYear' => 'Ano de produção',
'libraries.sortLabels.runtime' => 'Duração',
'libraries.sortLabels.officialRating' => 'Classificação oficial',
'libraries.sortLabels.premiereDate' => 'Data de estreia',
'libraries.sortLabels.startDate' => 'Data de início',
'libraries.sortLabels.airTime' => 'Horário de exibição',
'libraries.sortLabels.studio' => 'Estúdio',
'libraries.sortLabels.random' => 'Aleatório',
'libraries.sortLabels.dateShared' => 'Data de compartilhamento',
'libraries.sortLabels.latestEpisodeAirDate' => 'Última data de exibição do episódio',
@@ -2765,6 +2821,8 @@ extension on TranslationsPt {
'metadataEdit.selectBackground' => 'Selecionar Plano de Fundo',
'metadataEdit.selectLogo' => 'Selecionar Logo',
'metadataEdit.selectSquareArt' => 'Selecionar Imagem Quadrada',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Da URL',
'metadataEdit.uploadFile' => 'Enviar Arquivo',
'metadataEdit.enterImageUrl' => 'Insira a URL da imagem',
@@ -2788,8 +2846,6 @@ extension on TranslationsPt {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Episódios adicionados nos últimos ${count} dias',
'metadataEdit.deleteAfterPlaying' => 'Excluir Episódios Após Reproduzir',
'metadataEdit.never' => 'Nunca',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => 'Após um dia',
'metadataEdit.afterAWeek' => 'Após uma semana',
'metadataEdit.afterAMonth' => 'Após um mês',
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsRu extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysRu hotkeys = _TranslationsHotkeysRu._(_root);
@override late final _TranslationsFileInfoRu fileInfo = _TranslationsFileInfoRu._(_root);
@override late final _TranslationsMediaMenuRu mediaMenu = _TranslationsMediaMenuRu._(_root);
@override late final _TranslationsRateSheetRu rateSheet = _TranslationsRateSheetRu._(_root);
@override late final _TranslationsAccessibilityRu accessibility = _TranslationsAccessibilityRu._(_root);
@override late final _TranslationsTooltipsRu tooltips = _TranslationsTooltipsRu._(_root);
@override late final _TranslationsVideoControlsRu videoControls = _TranslationsVideoControlsRu._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuRu extends TranslationsMediaMenuEn {
@override String get playVersion => 'Воспроизвести версию...';
}
// Path: rateSheet
class _TranslationsRateSheetRu extends TranslationsRateSheetEn {
_TranslationsRateSheetRu._(TranslationsRu root) : this._root = root, super.internal(root);
final TranslationsRu _root; // ignore: unused_field
// Translations
@override String get title => 'Оценить';
@override String get server => 'Сервер';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => 'Установить оценку';
@override String get notRated => 'Без оценки';
@override String get liked => 'Понравилось';
@override String get notLiked => 'Не отмечено понравившимся';
@override String get saved => 'Сохранено';
@override String get notAvailable => 'Совпадений не найдено';
@override String get noConnectedTrackers => 'Подключите трекер в настройках, чтобы оценивать там.';
}
// Path: accessibility
class _TranslationsAccessibilityRu extends TranslationsAccessibilityEn {
_TranslationsAccessibilityRu._(TranslationsRu root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsRu extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => 'Закончится в ${time}';
@override String get pipActive => 'Воспроизводится в режиме «картинка в картинке»';
@override String get pipFailed => 'Не удалось запустить режим «картинка в картинке»';
@override String get screenshotSaved => 'Снимок экрана сохранён';
@override late final _TranslationsVideoControlsPipErrorsRu pipErrors = _TranslationsVideoControlsPipErrorsRu._(_root);
@override String get chapters => 'Главы';
@override String get noChaptersAvailable => 'Главы недоступны';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsRu extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => 'К предыдущему субтитру';
@override String get shaderToggle => 'Вкл./выкл. шейдеры';
@override String get skipMarker => 'Пропустить вступление/титры';
@override String get screenshot => 'Сделать снимок экрана';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsRu extends TranslationsLibrariesSortLabels
@override String get dateAdded => 'Дата добавления';
@override String get releaseDate => 'Дата выхода';
@override String get rating => 'Рейтинг';
@override String get communityRating => 'Оценка сообщества';
@override String get criticRating => 'Оценка критиков';
@override String get lastPlayed => 'Последний просмотр';
@override String get datePlayed => 'Дата просмотра';
@override String get playCount => 'Количество просмотров';
@override String get productionYear => 'Год производства';
@override String get runtime => 'Длительность';
@override String get officialRating => 'Официальный рейтинг';
@override String get premiereDate => 'Дата премьеры';
@override String get startDate => 'Дата начала';
@override String get airTime => 'Время эфира';
@override String get studio => 'Студия';
@override String get random => 'Случайно';
@override String get dateShared => 'Дата открытия доступа';
@override String get latestEpisodeAirDate => 'Дата выхода последнего эпизода';
@@ -2048,6 +2081,7 @@ extension on TranslationsRu {
'hotkeys.actions.subSeekPrev' => 'К предыдущему субтитру',
'hotkeys.actions.shaderToggle' => 'Вкл./выкл. шейдеры',
'hotkeys.actions.skipMarker' => 'Пропустить вступление/титры',
'hotkeys.actions.screenshot' => 'Сделать снимок экрана',
'fileInfo.title' => 'Информация о файле',
'fileInfo.video' => 'Видео',
'fileInfo.audio' => 'Аудио',
@@ -2088,6 +2122,17 @@ extension on TranslationsRu {
'mediaMenu.rate' => 'Оценить',
'mediaMenu.playFromBeginning' => 'Воспроизвести сначала',
'mediaMenu.playVersion' => 'Воспроизвести версию...',
'rateSheet.title' => 'Оценить',
'rateSheet.server' => 'Сервер',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => 'Установить оценку',
'rateSheet.notRated' => 'Без оценки',
'rateSheet.liked' => 'Понравилось',
'rateSheet.notLiked' => 'Не отмечено понравившимся',
'rateSheet.saved' => 'Сохранено',
'rateSheet.notAvailable' => 'Совпадений не найдено',
'rateSheet.noConnectedTrackers' => 'Подключите трекер в настройках, чтобы оценивать там.',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, фильм',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, сериал',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsRu {
'videoControls.endsAt' => ({required Object time}) => 'Закончится в ${time}',
'videoControls.pipActive' => 'Воспроизводится в режиме «картинка в картинке»',
'videoControls.pipFailed' => 'Не удалось запустить режим «картинка в картинке»',
'videoControls.screenshotSaved' => 'Снимок экрана сохранён',
'videoControls.pipErrors.androidVersion' => 'Требуется Android 8.0 или новее',
'videoControls.pipErrors.iosVersion' => 'Требуется iOS 15.0 или новее',
'videoControls.pipErrors.permissionDisabled' => 'Картинка-в-картинке отключена. Включите ее в системных настройках.',
@@ -2261,6 +2307,8 @@ extension on TranslationsRu {
'profiles.summarySingle' => 'Добавьте профили, чтобы смешать управляемых пользователей и локальные идентификаторы',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} профилей · активный: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} профилей',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Удалить соединение?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Удалить доступ ${displayName} к ${connectionLabel}. У других профилей он останется.',
'profiles.deleteProfileTitle' => 'Удалить профиль?',
@@ -2274,8 +2322,6 @@ extension on TranslationsRu {
'profiles.confirmPinTitle' => 'Подтвердить PIN',
'profiles.pinSet' => 'PIN установлен',
'profiles.changePin' => 'Изменить',
_ => null,
} ?? switch (path) {
'profiles.removePin' => 'Удалить',
'profiles.connectionsLabel' => 'Соединения',
'profiles.add' => 'Добавить',
@@ -2400,8 +2446,18 @@ extension on TranslationsRu {
'libraries.sortLabels.dateAdded' => 'Дата добавления',
'libraries.sortLabels.releaseDate' => 'Дата выхода',
'libraries.sortLabels.rating' => 'Рейтинг',
'libraries.sortLabels.communityRating' => 'Оценка сообщества',
'libraries.sortLabels.criticRating' => 'Оценка критиков',
'libraries.sortLabels.lastPlayed' => 'Последний просмотр',
'libraries.sortLabels.datePlayed' => 'Дата просмотра',
'libraries.sortLabels.playCount' => 'Количество просмотров',
'libraries.sortLabels.productionYear' => 'Год производства',
'libraries.sortLabels.runtime' => 'Длительность',
'libraries.sortLabels.officialRating' => 'Официальный рейтинг',
'libraries.sortLabels.premiereDate' => 'Дата премьеры',
'libraries.sortLabels.startDate' => 'Дата начала',
'libraries.sortLabels.airTime' => 'Время эфира',
'libraries.sortLabels.studio' => 'Студия',
'libraries.sortLabels.random' => 'Случайно',
'libraries.sortLabels.dateShared' => 'Дата открытия доступа',
'libraries.sortLabels.latestEpisodeAirDate' => 'Дата выхода последнего эпизода',
@@ -2765,6 +2821,8 @@ extension on TranslationsRu {
'metadataEdit.selectBackground' => 'Выбрать фон',
'metadataEdit.selectLogo' => 'Выбрать логотип',
'metadataEdit.selectSquareArt' => 'Выбрать квадратное изображение',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'По URL',
'metadataEdit.uploadFile' => 'Загрузить файл',
'metadataEdit.enterImageUrl' => 'Введите URL изображения',
@@ -2788,8 +2846,6 @@ extension on TranslationsRu {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Эпизоды, добавленные за последние ${count} дней',
'metadataEdit.deleteAfterPlaying' => 'Удалять эпизоды после просмотра',
'metadataEdit.never' => 'Никогда',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => 'Через день',
'metadataEdit.afterAWeek' => 'Через неделю',
'metadataEdit.afterAMonth' => 'Через месяц',
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsSv extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysSv hotkeys = _TranslationsHotkeysSv._(_root);
@override late final _TranslationsFileInfoSv fileInfo = _TranslationsFileInfoSv._(_root);
@override late final _TranslationsMediaMenuSv mediaMenu = _TranslationsMediaMenuSv._(_root);
@override late final _TranslationsRateSheetSv rateSheet = _TranslationsRateSheetSv._(_root);
@override late final _TranslationsAccessibilitySv accessibility = _TranslationsAccessibilitySv._(_root);
@override late final _TranslationsTooltipsSv tooltips = _TranslationsTooltipsSv._(_root);
@override late final _TranslationsVideoControlsSv videoControls = _TranslationsVideoControlsSv._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuSv extends TranslationsMediaMenuEn {
@override String get playVersion => 'Spela version...';
}
// Path: rateSheet
class _TranslationsRateSheetSv extends TranslationsRateSheetEn {
_TranslationsRateSheetSv._(TranslationsSv root) : this._root = root, super.internal(root);
final TranslationsSv _root; // ignore: unused_field
// Translations
@override String get title => 'Betygsätt';
@override String get server => 'Server';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => 'Ange betyg';
@override String get notRated => 'Inte betygsatt';
@override String get liked => 'Gillad';
@override String get notLiked => 'Inte gillad';
@override String get saved => 'Sparat';
@override String get notAvailable => 'Ingen matchning hittades';
@override String get noConnectedTrackers => 'Anslut en spårare i Inställningar för att betygsätta där.';
}
// Path: accessibility
class _TranslationsAccessibilitySv extends TranslationsAccessibilityEn {
_TranslationsAccessibilitySv._(TranslationsSv root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsSv extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => 'Slutar ${time}';
@override String get pipActive => 'Spelar i bild-i-bild';
@override String get pipFailed => 'Bild-i-bild kunde inte starta';
@override String get screenshotSaved => 'Skärmbild sparad';
@override late final _TranslationsVideoControlsPipErrorsSv pipErrors = _TranslationsVideoControlsPipErrorsSv._(_root);
@override String get chapters => 'Kapitel';
@override String get noChaptersAvailable => 'Inga kapitel tillgängliga';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsSv extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => 'Hoppa till föregående undertext';
@override String get shaderToggle => 'Växla shaders';
@override String get skipMarker => 'Hoppa över intro/eftertexter';
@override String get screenshot => 'Ta skärmbild';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsSv extends TranslationsLibrariesSortLabels
@override String get dateAdded => 'Tillagd';
@override String get releaseDate => 'Releasedatum';
@override String get rating => 'Betyg';
@override String get communityRating => 'Användarbetyg';
@override String get criticRating => 'Kritikerbetyg';
@override String get lastPlayed => 'Senast spelad';
@override String get datePlayed => 'Speldatum';
@override String get playCount => 'Antal spelningar';
@override String get productionYear => 'Produktionsår';
@override String get runtime => 'Speltid';
@override String get officialRating => 'Officiell klassificering';
@override String get premiereDate => 'Premiärdatum';
@override String get startDate => 'Startdatum';
@override String get airTime => 'Sändningstid';
@override String get studio => 'Studio';
@override String get random => 'Slumpmässigt';
@override String get dateShared => 'Delningsdatum';
@override String get latestEpisodeAirDate => 'Senaste avsnittets sändningsdatum';
@@ -2048,6 +2081,7 @@ extension on TranslationsSv {
'hotkeys.actions.subSeekPrev' => 'Hoppa till föregående undertext',
'hotkeys.actions.shaderToggle' => 'Växla shaders',
'hotkeys.actions.skipMarker' => 'Hoppa över intro/eftertexter',
'hotkeys.actions.screenshot' => 'Ta skärmbild',
'fileInfo.title' => 'Filinformation',
'fileInfo.video' => 'Video',
'fileInfo.audio' => 'Ljud',
@@ -2088,6 +2122,17 @@ extension on TranslationsSv {
'mediaMenu.rate' => 'Betygsätt',
'mediaMenu.playFromBeginning' => 'Spela från början',
'mediaMenu.playVersion' => 'Spela version...',
'rateSheet.title' => 'Betygsätt',
'rateSheet.server' => 'Server',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => 'Ange betyg',
'rateSheet.notRated' => 'Inte betygsatt',
'rateSheet.liked' => 'Gillad',
'rateSheet.notLiked' => 'Inte gillad',
'rateSheet.saved' => 'Sparat',
'rateSheet.notAvailable' => 'Ingen matchning hittades',
'rateSheet.noConnectedTrackers' => 'Anslut en spårare i Inställningar för att betygsätta där.',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, film',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, TV-serie',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsSv {
'videoControls.endsAt' => ({required Object time}) => 'Slutar ${time}',
'videoControls.pipActive' => 'Spelar i bild-i-bild',
'videoControls.pipFailed' => 'Bild-i-bild kunde inte starta',
'videoControls.screenshotSaved' => 'Skärmbild sparad',
'videoControls.pipErrors.androidVersion' => 'Kräver Android 8.0 eller nyare',
'videoControls.pipErrors.iosVersion' => 'Kräver iOS 15.0 eller nyare',
'videoControls.pipErrors.permissionDisabled' => 'Bild-i-bild är inaktiverat. Aktivera det i systeminställningarna.',
@@ -2261,6 +2307,8 @@ extension on TranslationsSv {
'profiles.summarySingle' => 'Lägg till profiler för att blanda hanterade användare och lokala identiteter',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profiler · aktiv: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profiler',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Ta bort anslutning?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Ta bort ${displayName}s åtkomst till ${connectionLabel}. Andra profiler behåller den.',
'profiles.deleteProfileTitle' => 'Ta bort profil?',
@@ -2274,8 +2322,6 @@ extension on TranslationsSv {
'profiles.confirmPinTitle' => 'Bekräfta PIN',
'profiles.pinSet' => 'PIN angiven',
'profiles.changePin' => 'Ändra',
_ => null,
} ?? switch (path) {
'profiles.removePin' => 'Ta bort',
'profiles.connectionsLabel' => 'Anslutningar',
'profiles.add' => 'Lägg till',
@@ -2400,8 +2446,18 @@ extension on TranslationsSv {
'libraries.sortLabels.dateAdded' => 'Tillagd',
'libraries.sortLabels.releaseDate' => 'Releasedatum',
'libraries.sortLabels.rating' => 'Betyg',
'libraries.sortLabels.communityRating' => 'Användarbetyg',
'libraries.sortLabels.criticRating' => 'Kritikerbetyg',
'libraries.sortLabels.lastPlayed' => 'Senast spelad',
'libraries.sortLabels.datePlayed' => 'Speldatum',
'libraries.sortLabels.playCount' => 'Antal spelningar',
'libraries.sortLabels.productionYear' => 'Produktionsår',
'libraries.sortLabels.runtime' => 'Speltid',
'libraries.sortLabels.officialRating' => 'Officiell klassificering',
'libraries.sortLabels.premiereDate' => 'Premiärdatum',
'libraries.sortLabels.startDate' => 'Startdatum',
'libraries.sortLabels.airTime' => 'Sändningstid',
'libraries.sortLabels.studio' => 'Studio',
'libraries.sortLabels.random' => 'Slumpmässigt',
'libraries.sortLabels.dateShared' => 'Delningsdatum',
'libraries.sortLabels.latestEpisodeAirDate' => 'Senaste avsnittets sändningsdatum',
@@ -2765,6 +2821,8 @@ extension on TranslationsSv {
'metadataEdit.selectBackground' => 'Välj bakgrund',
'metadataEdit.selectLogo' => 'Välj logotyp',
'metadataEdit.selectSquareArt' => 'Välj kvadratisk bild',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Från URL',
'metadataEdit.uploadFile' => 'Ladda upp fil',
'metadataEdit.enterImageUrl' => 'Ange bild-URL',
@@ -2788,8 +2846,6 @@ extension on TranslationsSv {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Avsnitt tillagda de senaste ${count} dagarna',
'metadataEdit.deleteAfterPlaying' => 'Ta bort avsnitt efter uppspelning',
'metadataEdit.never' => 'Aldrig',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => 'Efter en dag',
'metadataEdit.afterAWeek' => 'Efter en vecka',
'metadataEdit.afterAMonth' => 'Efter en månad',
+60 -4
View File
@@ -49,6 +49,7 @@ class TranslationsZh extends Translations with BaseTranslations<AppLocale, Trans
@override late final _TranslationsHotkeysZh hotkeys = _TranslationsHotkeysZh._(_root);
@override late final _TranslationsFileInfoZh fileInfo = _TranslationsFileInfoZh._(_root);
@override late final _TranslationsMediaMenuZh mediaMenu = _TranslationsMediaMenuZh._(_root);
@override late final _TranslationsRateSheetZh rateSheet = _TranslationsRateSheetZh._(_root);
@override late final _TranslationsAccessibilityZh accessibility = _TranslationsAccessibilityZh._(_root);
@override late final _TranslationsTooltipsZh tooltips = _TranslationsTooltipsZh._(_root);
@override late final _TranslationsVideoControlsZh videoControls = _TranslationsVideoControlsZh._(_root);
@@ -481,6 +482,26 @@ class _TranslationsMediaMenuZh extends TranslationsMediaMenuEn {
@override String get playVersion => '播放版本...';
}
// Path: rateSheet
class _TranslationsRateSheetZh extends TranslationsRateSheetEn {
_TranslationsRateSheetZh._(TranslationsZh root) : this._root = root, super.internal(root);
final TranslationsZh _root; // ignore: unused_field
// Translations
@override String get title => '评分';
@override String get server => '服务器';
@override String starValue({required Object rating}) => '${rating} / 5';
@override String scoreValue({required Object score}) => '${score} / 10';
@override String get setScore => '设置分数';
@override String get notRated => '未评分';
@override String get liked => '已喜欢';
@override String get notLiked => '未喜欢';
@override String get saved => '已保存';
@override String get notAvailable => '未找到匹配项';
@override String get noConnectedTrackers => '在设置中连接跟踪器即可在那里评分。';
}
// Path: accessibility
class _TranslationsAccessibilityZh extends TranslationsAccessibilityEn {
_TranslationsAccessibilityZh._(TranslationsZh root) : this._root = root, super.internal(root);
@@ -574,6 +595,7 @@ class _TranslationsVideoControlsZh extends TranslationsVideoControlsEn {
@override String endsAt({required Object time}) => '${time} 结束';
@override String get pipActive => '正在画中画模式中播放';
@override String get pipFailed => '画中画启动失败';
@override String get screenshotSaved => '截图已保存';
@override late final _TranslationsVideoControlsPipErrorsZh pipErrors = _TranslationsVideoControlsPipErrorsZh._(_root);
@override String get chapters => '章节';
@override String get noChaptersAvailable => '没有可用的章节';
@@ -1535,6 +1557,7 @@ class _TranslationsHotkeysActionsZh extends TranslationsHotkeysActionsEn {
@override String get subSeekPrev => '跳转到上一字幕';
@override String get shaderToggle => '切换着色器';
@override String get skipMarker => '跳过片头/片尾';
@override String get screenshot => '截图';
}
// Path: videoControls.pipErrors
@@ -1606,8 +1629,18 @@ class _TranslationsLibrariesSortLabelsZh extends TranslationsLibrariesSortLabels
@override String get dateAdded => '添加日期';
@override String get releaseDate => '发行日期';
@override String get rating => '评分';
@override String get communityRating => '社区评分';
@override String get criticRating => '影评人评分';
@override String get lastPlayed => '最近播放';
@override String get datePlayed => '播放日期';
@override String get playCount => '播放次数';
@override String get productionYear => '制作年份';
@override String get runtime => '时长';
@override String get officialRating => '官方分级';
@override String get premiereDate => '首映日期';
@override String get startDate => '开始日期';
@override String get airTime => '播出时间';
@override String get studio => '工作室';
@override String get random => '随机';
@override String get dateShared => '共享日期';
@override String get latestEpisodeAirDate => '最新一集播出日期';
@@ -2048,6 +2081,7 @@ extension on TranslationsZh {
'hotkeys.actions.subSeekPrev' => '跳转到上一字幕',
'hotkeys.actions.shaderToggle' => '切换着色器',
'hotkeys.actions.skipMarker' => '跳过片头/片尾',
'hotkeys.actions.screenshot' => '截图',
'fileInfo.title' => '文件信息',
'fileInfo.video' => '视频',
'fileInfo.audio' => '音频',
@@ -2088,6 +2122,17 @@ extension on TranslationsZh {
'mediaMenu.rate' => '评分',
'mediaMenu.playFromBeginning' => '从头播放',
'mediaMenu.playVersion' => '播放版本...',
'rateSheet.title' => '评分',
'rateSheet.server' => '服务器',
'rateSheet.starValue' => ({required Object rating}) => '${rating} / 5',
'rateSheet.scoreValue' => ({required Object score}) => '${score} / 10',
'rateSheet.setScore' => '设置分数',
'rateSheet.notRated' => '未评分',
'rateSheet.liked' => '已喜欢',
'rateSheet.notLiked' => '未喜欢',
'rateSheet.saved' => '已保存',
'rateSheet.notAvailable' => '未找到匹配项',
'rateSheet.noConnectedTrackers' => '在设置中连接跟踪器即可在那里评分。',
'accessibility.mediaCardMovie' => ({required Object title}) => '${title}, 电影',
'accessibility.mediaCardShow' => ({required Object title}) => '${title}, 电视剧',
'accessibility.mediaCardEpisode' => ({required Object title, required Object episodeInfo}) => '${title}, ${episodeInfo}',
@@ -2156,6 +2201,7 @@ extension on TranslationsZh {
'videoControls.endsAt' => ({required Object time}) => '${time} 结束',
'videoControls.pipActive' => '正在画中画模式中播放',
'videoControls.pipFailed' => '画中画启动失败',
'videoControls.screenshotSaved' => '截图已保存',
'videoControls.pipErrors.androidVersion' => '需要 Android 8.0 或更高版本',
'videoControls.pipErrors.iosVersion' => '需要 iOS 15.0 或更高版本',
'videoControls.pipErrors.permissionDisabled' => '画中画已禁用。请在系统设置中启用。',
@@ -2261,6 +2307,8 @@ extension on TranslationsZh {
'profiles.summarySingle' => '添加配置文件以混合托管用户和本地身份',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} 个配置文件 · 活跃:${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} 个配置文件',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => '移除连接?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => '移除 ${displayName} 对 ${connectionLabel} 的访问。其他个人资料仍保留。',
'profiles.deleteProfileTitle' => '删除配置文件?',
@@ -2274,8 +2322,6 @@ extension on TranslationsZh {
'profiles.confirmPinTitle' => '确认 PIN',
'profiles.pinSet' => '已设置 PIN',
'profiles.changePin' => '更改',
_ => null,
} ?? switch (path) {
'profiles.removePin' => '移除',
'profiles.connectionsLabel' => '连接',
'profiles.add' => '添加',
@@ -2400,8 +2446,18 @@ extension on TranslationsZh {
'libraries.sortLabels.dateAdded' => '添加日期',
'libraries.sortLabels.releaseDate' => '发行日期',
'libraries.sortLabels.rating' => '评分',
'libraries.sortLabels.communityRating' => '社区评分',
'libraries.sortLabels.criticRating' => '影评人评分',
'libraries.sortLabels.lastPlayed' => '最近播放',
'libraries.sortLabels.datePlayed' => '播放日期',
'libraries.sortLabels.playCount' => '播放次数',
'libraries.sortLabels.productionYear' => '制作年份',
'libraries.sortLabels.runtime' => '时长',
'libraries.sortLabels.officialRating' => '官方分级',
'libraries.sortLabels.premiereDate' => '首映日期',
'libraries.sortLabels.startDate' => '开始日期',
'libraries.sortLabels.airTime' => '播出时间',
'libraries.sortLabels.studio' => '工作室',
'libraries.sortLabels.random' => '随机',
'libraries.sortLabels.dateShared' => '共享日期',
'libraries.sortLabels.latestEpisodeAirDate' => '最新一集播出日期',
@@ -2765,6 +2821,8 @@ extension on TranslationsZh {
'metadataEdit.selectBackground' => '选择背景',
'metadataEdit.selectLogo' => '选择标志',
'metadataEdit.selectSquareArt' => '选择方形图片',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => '从 URL',
'metadataEdit.uploadFile' => '上传文件',
'metadataEdit.enterImageUrl' => '输入图片 URL',
@@ -2788,8 +2846,6 @@ extension on TranslationsZh {
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => '过去 ${count} 天内添加的剧集',
'metadataEdit.deleteAfterPlaying' => '播放后删除剧集',
'metadataEdit.never' => '从不',
_ => null,
} ?? switch (path) {
'metadataEdit.afterADay' => '一天后',
'metadataEdit.afterAWeek' => '一周后',
'metadataEdit.afterAMonth' => '一个月后',
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "Hoppa till nästa undertext",
"subSeekPrev": "Hoppa till föregående undertext",
"shaderToggle": "Växla shaders",
"skipMarker": "Hoppa över intro/eftertexter"
"skipMarker": "Hoppa över intro/eftertexter",
"screenshot": "Ta skärmbild"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "Spela från början",
"playVersion": "Spela version..."
},
"rateSheet": {
"title": "Betygsätt",
"server": "Server",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "Ange betyg",
"notRated": "Inte betygsatt",
"liked": "Gillad",
"notLiked": "Inte gillad",
"saved": "Sparat",
"notAvailable": "Ingen matchning hittades",
"noConnectedTrackers": "Anslut en spårare i Inställningar för att betygsätta där."
},
"accessibility": {
"mediaCardMovie": "${title}, film",
"mediaCardShow": "${title}, TV-serie",
@@ -420,6 +434,7 @@
"endsAt": "Slutar ${time}",
"pipActive": "Spelar i bild-i-bild",
"pipFailed": "Bild-i-bild kunde inte starta",
"screenshotSaved": "Skärmbild sparad",
"pipErrors": {
"androidVersion": "Kräver Android 8.0 eller nyare",
"iosVersion": "Kräver iOS 15.0 eller nyare",
@@ -691,8 +706,18 @@
"dateAdded": "Tillagd",
"releaseDate": "Releasedatum",
"rating": "Betyg",
"communityRating": "Användarbetyg",
"criticRating": "Kritikerbetyg",
"lastPlayed": "Senast spelad",
"datePlayed": "Speldatum",
"playCount": "Antal spelningar",
"productionYear": "Produktionsår",
"runtime": "Speltid",
"officialRating": "Officiell klassificering",
"premiereDate": "Premiärdatum",
"startDate": "Startdatum",
"airTime": "Sändningstid",
"studio": "Studio",
"random": "Slumpmässigt",
"dateShared": "Delningsdatum",
"latestEpisodeAirDate": "Senaste avsnittets sändningsdatum"
+26 -1
View File
@@ -300,7 +300,8 @@
"subSeekNext": "跳转到下一字幕",
"subSeekPrev": "跳转到上一字幕",
"shaderToggle": "切换着色器",
"skipMarker": "跳过片头/片尾"
"skipMarker": "跳过片头/片尾",
"screenshot": "截图"
}
},
"fileInfo": {
@@ -347,6 +348,19 @@
"playFromBeginning": "从头播放",
"playVersion": "播放版本..."
},
"rateSheet": {
"title": "评分",
"server": "服务器",
"starValue": "${rating} / 5",
"scoreValue": "${score} / 10",
"setScore": "设置分数",
"notRated": "未评分",
"liked": "已喜欢",
"notLiked": "未喜欢",
"saved": "已保存",
"notAvailable": "未找到匹配项",
"noConnectedTrackers": "在设置中连接跟踪器即可在那里评分。"
},
"accessibility": {
"mediaCardMovie": "${title}, 电影",
"mediaCardShow": "${title}, 电视剧",
@@ -420,6 +434,7 @@
"endsAt": "${time} 结束",
"pipActive": "正在画中画模式中播放",
"pipFailed": "画中画启动失败",
"screenshotSaved": "截图已保存",
"pipErrors": {
"androidVersion": "需要 Android 8.0 或更高版本",
"iosVersion": "需要 iOS 15.0 或更高版本",
@@ -691,8 +706,18 @@
"dateAdded": "添加日期",
"releaseDate": "发行日期",
"rating": "评分",
"communityRating": "社区评分",
"criticRating": "影评人评分",
"lastPlayed": "最近播放",
"datePlayed": "播放日期",
"playCount": "播放次数",
"productionYear": "制作年份",
"runtime": "时长",
"officialRating": "官方分级",
"premiereDate": "首映日期",
"startDate": "开始日期",
"airTime": "播出时间",
"studio": "工作室",
"random": "随机",
"dateShared": "共享日期",
"latestEpisodeAirDate": "最新一集播出日期"
+66 -7
View File
@@ -1,5 +1,5 @@
import 'dart:async';
import 'dart:io' show Platform, ProcessInfo;
import 'dart:io' show Directory, Platform, ProcessInfo;
import 'dart:ui' show AppExitResponse;
import 'package:flutter/foundation.dart';
// ignore: depend_on_referenced_packages
@@ -33,6 +33,8 @@ import 'services/settings_service.dart';
import 'utils/platform_detector.dart';
import 'services/apple_tv_remote_touch_service.dart';
import 'services/discord_rpc_service.dart';
import 'package:path_provider/path_provider.dart';
import 'services/image_cache_service.dart';
import 'services/gamepad_service.dart';
import 'services/trakt/trakt_scrobble_service.dart';
import 'services/trakt/trakt_sync_service.dart';
@@ -66,7 +68,8 @@ import 'services/plex_api_cache.dart';
import 'database/app_database.dart';
import 'screens/video_player_screen.dart';
import 'utils/app_logger.dart';
import 'utils/media_server_http_client.dart' show httpClient;
import 'utils/managed_http_client.dart';
import 'utils/media_server_http_client.dart';
import 'utils/orientation_helper.dart';
import 'utils/watch_state_notifier.dart';
import 'i18n/strings.g.dart';
@@ -80,6 +83,7 @@ import 'package:package_info_plus/package_info_plus.dart';
const bool _enableSentry = bool.fromEnvironment('ENABLE_SENTRY', defaultValue: false);
const String gitCommit = String.fromEnvironment('GIT_COMMIT');
const String _sentryEnvironment = String.fromEnvironment('SENTRY_ENVIRONMENT');
const String _sentryDist = String.fromEnvironment('SENTRY_DIST');
// Workaround for Flutter bug #177992: iPadOS 26.1+ misinterprets fake touch events
// at (0,0) as barrier taps, causing modals to dismiss immediately.
@@ -130,6 +134,7 @@ Future<void> main() async {
? 'plezy@${gitCommit.substring(0, 7)}'
: 'plezy@${packageInfo.version}+${packageInfo.buildNumber}';
if (_sentryEnvironment.isNotEmpty) options.environment = _sentryEnvironment;
if (_sentryDist.isNotEmpty) options.dist = _sentryDist;
options.tracesSampleRate = 0;
options.attachStacktrace = true;
options.enableAutoSessionTracking = false;
@@ -154,6 +159,21 @@ Future<void> _bootstrapApp() async {
await initializeDateFormatting(savedLocale.languageCode, null);
// One-time cleanup of the old flutter_cache_manager image cache directory
// (replaced by cached_network_image_ce in a prior refactor).
if (!settings.read(SettingsService.cleanedOldImageCache)) {
try {
final tempDir = await getTemporaryDirectory();
final oldCacheDir = Directory('${tempDir.path}/plexImageCache');
if (await oldCacheDir.exists()) {
await oldCacheDir.delete(recursive: true);
}
} catch (_) {
// Best-effort; the directory may be locked or already partial.
}
await settings.write(SettingsService.cleanedOldImageCache, true);
}
// Configure image cache — keep budget modest to leave headroom for Skia decode buffers
if (PlatformDetector.isDesktopOS()) {
PaintingBinding.instance.imageCache.maximumSize = 1000;
@@ -421,6 +441,7 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
final Set<String> _pendingSyncKeys = <String>{};
bool _isAutoDeleteRunning = false;
bool _lastConnectivityWasWifi = false;
bool _shutdownStarted = false;
/// Last time server health probes ran from a resume event (cooldown for desktop)
DateTime _lastResumeProbe = DateTime(0);
@@ -468,13 +489,35 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
_appLifecycleListener = AppLifecycleListener(
onExitRequested: () async {
httpClient.close();
await _appDatabase.close();
await _shutdownForExit();
return AppExitResponse.exit;
},
);
}
Future<void> _shutdownForExit() async {
if (_shutdownStarted) return;
_shutdownStarted = true;
_syncDebounce?.cancel();
await _watchStateSubscription?.cancel();
await _connectivitySubscription?.cancel();
_memoryCheckTimer?.cancel();
_downloadManager.dispose();
TrackerCoordinator.instance.cancelInFlight();
TraktScrobbleService.instance.cancelInFlight();
await TraktSyncService.instance.dispose();
await _serverManager.disconnectAllGracefully();
await Future.wait([
httpClient.closeGracefully(drainTimeout: const Duration(seconds: 5)),
closeArtworkHttpClientGracefully(),
], eagerError: false);
await ManagedHttpClient.closeAllGracefully();
await _appDatabase.close();
}
@override
void dispose() {
_syncDebounce?.cancel();
@@ -482,8 +525,10 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
_connectivitySubscription?.cancel();
_memoryCheckTimer?.cancel();
_appLifecycleListener.dispose();
_downloadManager.dispose();
_serverManager.dispose();
if (!_shutdownStarted) {
_downloadManager.dispose();
_serverManager.dispose();
}
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
@@ -1081,7 +1126,21 @@ class _SetupScreenState extends State<SetupScreen> with MountedSetStateMixin {
// through `context` after async gaps trip the use_build_context_synchronously
// lint, and reading early is safe because the registry is a singleton.
final connectionRegistry = context.read<ConnectionRegistry>();
final allConnections = await connectionRegistry.list();
final List<Connection> allConnections;
try {
allConnections = await connectionRegistry.list();
} catch (e, st) {
// Defence-in-depth: a DB-open failure here used to propagate
// uncaught and strand the splash forever (#1022). Route to auth so
// the user is never trapped, and surface to Sentry so an unknown
// regression doesn't go silent.
appLogger.e('Setup: failed to load connections; returning to auth', error: e, stackTrace: st);
unawaited(Sentry.captureException(e, stackTrace: st));
if (mounted) {
unawaited(Navigator.pushReplacement(context, fadeRoute(const AuthScreen())));
}
return;
}
if (allConnections.isEmpty) {
if (mounted) {
+45 -85
View File
@@ -1,114 +1,74 @@
// ignore_for_file: invalid_annotation_target
import 'package:freezed_annotation/freezed_annotation.dart';
import 'media_kind.dart';
part 'library_query.freezed.dart';
/// Sort order applied to a library query.
enum LibrarySortDirection { ascending, descending }
class LibrarySort {
@freezed
sealed class LibrarySort with _$LibrarySort {
/// Backend-neutral sort field. Common values: `addedAt`, `originallyAvailableAt`,
/// `lastViewedAt`, `title`, `rating`, `viewCount`, `random`.
final String field;
final LibrarySortDirection direction;
const LibrarySort({required this.field, this.direction = LibrarySortDirection.descending});
const factory LibrarySort({
required String field,
@Default(LibrarySortDirection.descending) LibrarySortDirection direction,
}) = _LibrarySort;
}
/// A single filter clause. The semantics of `field` and `value` are
/// backend-translated — the neutral query just carries the intent.
class LibraryFilter {
final String field;
final String op; // "=", "!=", "contains", ">=", etc.
final List<String> values;
const LibraryFilter({required this.field, this.op = '=', required this.values});
@freezed
sealed class LibraryFilter with _$LibraryFilter {
const factory LibraryFilter({required String field, @Default('=') String op, required List<String> values}) =
_LibraryFilter;
}
/// Backend-neutral library content query. Each backend's adapter translates
/// these into its own query DSL (Plex `/library/sections/{id}/all?type=...`
/// or Jellyfin `/Items?ParentId=...&Filters=...`).
class LibraryQuery {
/// Restrict to a single kind (e.g. `MediaKind.movie`). Null = library default.
final MediaKind? kind;
/// Pagination — zero-based offset.
final int offset;
final int limit;
final LibrarySort? sort;
final List<LibraryFilter> filters;
/// Free-text search restricted to this library. Distinct from the global
/// search endpoint.
final String? search;
/// Whether to include items the active user has already watched.
final bool includeWatched;
/// Restrict the result to items whose sort name starts with this string —
/// the alpha-jump bar's filter UX. The literal `#` is a sentinel for
/// "non-alphabetic" and translates to a `NameLessThan=A` query for backends
/// that support it.
final String? nameStartsWith;
/// Genre filter — used by the per-library filter sheet. Backends that
/// take multiple values (Jellyfin) AND/intersect; those that take one
/// (Plex's existing flow) consult `filters` instead.
final List<String>? genres;
final List<String>? officialRatings;
final List<int>? years;
final List<String>? tags;
const LibraryQuery({
this.kind,
this.offset = 0,
this.limit = 50,
this.sort,
this.filters = const [],
this.search,
this.includeWatched = true,
this.nameStartsWith,
this.genres,
this.officialRatings,
this.years,
this.tags,
});
LibraryQuery copyWith({
@freezed
sealed class LibraryQuery with _$LibraryQuery {
const factory LibraryQuery({
/// Restrict to a single kind (e.g. `MediaKind.movie`). Null = library default.
MediaKind? kind,
int? offset,
int? limit,
/// Pagination — zero-based offset.
@Default(0) int offset,
@Default(50) int limit,
LibrarySort? sort,
List<LibraryFilter>? filters,
@Default(<LibraryFilter>[]) List<LibraryFilter> filters,
/// Free-text search restricted to this library. Distinct from the global
/// search endpoint.
String? search,
bool? includeWatched,
/// Whether to include items the active user has already watched.
@Default(true) bool includeWatched,
/// Restrict the result to items whose sort name starts with this string —
/// the alpha-jump bar's filter UX. The literal `#` is a sentinel for
/// "non-alphabetic" and translates to a `NameLessThan=A` query for backends
/// that support it.
String? nameStartsWith,
/// Genre filter — used by the per-library filter sheet. Backends that
/// take multiple values (Jellyfin) AND/intersect; those that take one
/// (Plex's existing flow) consult `filters` instead.
List<String>? genres,
List<String>? officialRatings,
List<int>? years,
List<String>? tags,
}) {
return LibraryQuery(
kind: kind ?? this.kind,
offset: offset ?? this.offset,
limit: limit ?? this.limit,
sort: sort ?? this.sort,
filters: filters ?? this.filters,
search: search ?? this.search,
includeWatched: includeWatched ?? this.includeWatched,
nameStartsWith: nameStartsWith ?? this.nameStartsWith,
genres: genres ?? this.genres,
officialRatings: officialRatings ?? this.officialRatings,
years: years ?? this.years,
tags: tags ?? this.tags,
);
}
}) = _LibraryQuery;
}
/// Page of items returned by [MediaServerClient.getLibraryContent].
/// Carries the total count so the UI can render correct pagination affordances.
class LibraryPage<T> {
final List<T> items;
final int totalCount;
final int offset;
const LibraryPage({required this.items, required this.totalCount, this.offset = 0});
@freezed
sealed class LibraryPage<T> with _$LibraryPage<T> {
const factory LibraryPage({required List<T> items, required int totalCount, @Default(0) int offset}) =
_LibraryPage<T>;
}
File diff suppressed because it is too large Load Diff
+101
View File
@@ -0,0 +1,101 @@
import '../utils/json_utils.dart';
/// Backend-neutral display metadata used to prime native display matching
/// before the decoder has emitted mpv/video properties.
class MediaDisplayCriteria {
final double? fps;
final int? width;
final int? height;
final int? doviProfile;
final int? doviLevel;
final int? doviCompatibilityId;
final String? transfer;
final String? primaries;
final String? matrix;
const MediaDisplayCriteria({
this.fps,
this.width,
this.height,
this.doviProfile,
this.doviLevel,
this.doviCompatibilityId,
this.transfer,
this.primaries,
this.matrix,
});
factory MediaDisplayCriteria.fromRaw({
Object? fps,
Object? width,
Object? height,
Object? doviProfile,
Object? doviLevel,
Object? doviCompatibilityId,
Object? transfer,
Object? primaries,
Object? matrix,
}) {
return MediaDisplayCriteria(
fps: flexibleDouble(fps),
width: flexibleInt(width),
height: flexibleInt(height),
doviProfile: flexibleInt(doviProfile),
doviLevel: flexibleInt(doviLevel),
doviCompatibilityId: flexibleInt(doviCompatibilityId),
transfer: _stringOrNull(transfer),
primaries: _stringOrNull(primaries),
matrix: _stringOrNull(matrix),
);
}
bool get hasDimensions => (width ?? 0) > 0 && (height ?? 0) > 0;
bool get hasFrameRate => (fps ?? 0) > 0;
bool get hasDisplayMetadata =>
(doviProfile ?? 0) > 0 || _hasValue(transfer) || _hasValue(primaries) || _hasValue(matrix);
bool get canPrimeNativeDisplayCriteria => hasDimensions && hasDisplayMetadata;
bool get isHdr {
if ((doviProfile ?? 0) > 0 && doviCompatibilityId != 2) return true;
final tags = _normalizedColorTags(transfer, primaries, matrix);
return tags.contains('hlg') ||
tags.contains('arib') ||
tags.contains('pq') ||
tags.contains('smpte2084') ||
tags.contains('st2084') ||
tags.contains('bt2020');
}
bool get isUsable => hasFrameRate || canPrimeNativeDisplayCriteria;
Map<String, Object> toJson() {
final json = <String, Object>{};
void put(String key, Object? value) {
if (value != null) json[key] = value;
}
put('fps', fps);
put('width', width);
put('height', height);
put('doviProfile', doviProfile);
put('doviLevel', doviLevel);
put('doviCompatibilityId', doviCompatibilityId);
put('transfer', transfer);
put('primaries', primaries);
put('matrix', matrix);
return json;
}
}
String? _stringOrNull(Object? value) {
final string = value?.toString().trim();
return string == null || string.isEmpty ? null : string;
}
bool _hasValue(String? value) => value != null && value.isNotEmpty;
String _normalizedColorTags(String? transfer, String? primaries, String? matrix) =>
[transfer, primaries, matrix].whereType<String>().join(' ').toLowerCase().replaceAll(RegExp(r'[^a-z0-9]'), '');
+63 -8
View File
@@ -61,6 +61,10 @@ import 'server_capabilities.dart';
/// two states to different UI ("Sign in again" vs "Server offline").
enum HealthStatus { online, offline, authError }
abstract interface class GracefullyCloseable {
Future<void> closeGracefully({Duration drainTimeout});
}
abstract class MediaServerClient {
String get serverId;
String? get serverName;
@@ -163,6 +167,17 @@ abstract class MediaServerClient {
/// show, tracks of an album, items of a collection.
Future<List<MediaItem>> fetchChildren(String parentId);
/// Page through playable descendants of [parentId]. Used by large show /
/// season detail views so episodes can render before the full list has
/// loaded. [fetchPlayableDescendants] remains the complete-list helper for
/// playback/download/sync paths.
Future<LibraryPage<MediaItem>> fetchPlayableDescendantsPage(
String parentId, {
int? start,
int? size,
AbortController? abort,
});
/// Playable descendants of [parentId] in one server-side query — for a
/// show this returns every episode across every season; for a season the
/// same episodes as [fetchChildren]; on Jellyfin a collection/playlist
@@ -191,14 +206,14 @@ abstract class MediaServerClient {
Future<List<MediaItem>?> fetchClientSideEpisodeQueue(String seriesId);
/// Free-text search across the user's libraries.
Future<List<MediaItem>> searchItems(String query, {int limit = 30});
Future<List<MediaItem>> searchItems(String query, {int limit = 100});
/// Recently-added items across all libraries.
Future<List<MediaItem>> fetchRecentlyAdded({int limit = 50});
/// Items the user has started but not finished. Plex calls this "On Deck"
/// internally; the neutral name matches the Continue Watching UI surface.
Future<List<MediaItem>> fetchContinueWatching({int count = 20});
Future<List<MediaItem>> fetchContinueWatching({int? count = 20});
/// Curated home-screen hubs across all libraries (Plex Discover; Jellyfin
/// synthesizes `Latest` plus optional `Resume` + `NextUp`).
@@ -208,23 +223,35 @@ abstract class MediaServerClient {
/// the title of synthetic hubs (Jellyfin) so per-library "Recently Added"
/// / "Next Up" hubs aren't all identically named on the home screen.
/// [includePlaybackHubs] lets surfaces that already render Continue
/// Watching skip duplicate playback rows.
/// Watching skip duplicate playback rows. [libraryKind] lets backends avoid
/// irrelevant expensive probes, e.g. Jellyfin `NextUp` for movie libraries.
Future<List<MediaHub>> fetchLibraryHubs(
String libraryId, {
required String libraryName,
int limit = 10,
bool includePlaybackHubs = true,
MediaKind? libraryKind,
});
/// "More like this" recommendations for [id].
Future<List<MediaHub>> fetchRelatedHubs(String id, {int count = 10});
/// Media featuring a specific person/actor.
Future<List<MediaItem>> fetchPersonMedia(String personId);
/// Page through media featuring a specific person/actor.
Future<LibraryPage<MediaItem>> fetchPersonMediaPage(String personId, {int? start, int? size, AbortController? abort});
/// Page through items in [hubId] when the hub previewed only the first N
/// items (`MediaHub.more == true`). Plex hits `/hubs/{key}` (the same
/// id used in [fetchGlobalHubs]); Jellyfin re-runs the synthesised query
/// (Latest / Resume / NextUp) without the preview limit.
Future<List<MediaItem>> fetchMoreHubItems(String hubId, {int? limit});
/// Page through expanded hub content where the backend exposes a paged
/// endpoint. Backends without true hub pagination may return a single page.
Future<LibraryPage<MediaItem>> fetchMoreHubItemsPage(String hubId, {int? start, int? size, AbortController? abort});
/// Mark [item] as watched. The full item is passed (not just an id) so
/// implementations can fire a [WatchStateEvent] on [WatchStateNotifier]
/// for UI invalidation — episode/season/show parent chain, library
@@ -246,11 +273,26 @@ abstract class MediaServerClient {
Future<List<MediaPlaylist>> fetchPlaylists({String playlistType = 'video', bool? smart});
/// Page through server playlists. Used by the library Playlists tab so large
/// servers can render incrementally; [fetchPlaylists] remains the complete
/// list helper for dialogs and bulk operations.
Future<LibraryPage<MediaPlaylist>> fetchPlaylistsPage({
String playlistType = 'video',
bool? smart,
int? start,
int? size,
AbortController? abort,
});
/// Metadata only — items are fetched via [fetchPlaylistItems].
Future<MediaPlaylist?> fetchPlaylistMetadata(String id);
Future<List<MediaItem>> fetchPlaylistItems(String id, {int offset = 0, int limit = 100});
/// Page through items in [id]. Backends preserve playlist order and include
/// per-playlist item ids where the server exposes them.
Future<LibraryPage<MediaItem>> fetchPlaylistPage(String id, {int? start, int? size, AbortController? abort});
/// Create a new playlist seeded with [items]. Returns the created
/// playlist on success, `null` on failure. Plex builds a metadata URI
/// from the item ids; Jellyfin posts `Ids=<comma-joined>`.
@@ -284,20 +326,33 @@ abstract class MediaServerClient {
Future<bool> removeFromPlaylist({required String playlistId, required MediaItem item});
/// Collections in [libraryId]. Plex hits `/library/sections/{id}/collections`;
/// Jellyfin queries `/Items?ParentId={libraryId}&IncludeItemTypes=BoxSet`.
/// Jellyfin resolves its top-level `boxsets` view and walks that root in
/// bounded pages.
/// Each result carries `kind == MediaKind.collection`.
Future<List<MediaItem>> fetchCollections(String libraryId);
/// Page through collections in [libraryId]. Used by the library Collections
/// tab so large Jellyfin/Plex servers can render incrementally while the
/// user scrolls. [fetchCollections] remains the complete-list helper for
/// dialogs and bulk operations.
Future<LibraryPage<MediaItem>> fetchCollectionsPage(
String libraryId, {
int? start,
int? size,
AbortController? abort,
});
/// Page through items in [collectionId]. Plex paginates server-side via
/// `/library/collections/{id}/children`; Jellyfin's API has no
/// pagination knob for collection children, so its impl fetches the full
/// list once (cached on the client) and slices locally. Callers can rely
/// on [LibraryPage.totalCount] either way.
/// `/library/collections/{id}/children`; Jellyfin uses `/Items` with
/// `ParentId`, `StartIndex`, and `Limit`. Callers can rely on
/// [LibraryPage.totalCount] either way.
Future<LibraryPage<MediaItem>> fetchCollectionPage(
String collectionId, {
int? start,
int? size,
AbortController? abort,
String? libraryId,
String? libraryTitle,
});
/// Create a new collection in [libraryId] seeded with [items]. Returns the
+7 -24
View File
@@ -1,20 +1,17 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'media_sort.freezed.dart';
part 'media_sort.g.dart';
@JsonSerializable()
class MediaSort {
final String key;
final String? descKey;
final String title;
final String? defaultDirection;
@freezed
sealed class MediaSort with _$MediaSort {
const MediaSort._();
MediaSort({required this.key, this.descKey, required this.title, this.defaultDirection});
const factory MediaSort({required String key, String? descKey, required String title, String? defaultDirection}) =
_MediaSort;
factory MediaSort.fromJson(Map<String, dynamic> json) => _$MediaSortFromJson(json);
Map<String, dynamic> toJson() => _$MediaSortToJson(this);
String getSortKey({bool descending = false}) {
if (!descending) {
return key;
@@ -26,18 +23,4 @@ class MediaSort {
bool get isDefaultDescending {
return defaultDirection?.toLowerCase() == 'desc';
}
@override
String toString() {
return 'MediaSort(key: $key, title: $title, defaultDirection: $defaultDirection)';
}
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is MediaSort && other.key == key;
}
@override
int get hashCode => key.hashCode;
}
+280
View File
@@ -0,0 +1,280 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'media_sort.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$MediaSort {
String get key; String? get descKey; String get title; String? get defaultDirection;
/// Create a copy of MediaSort
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$MediaSortCopyWith<MediaSort> get copyWith => _$MediaSortCopyWithImpl<MediaSort>(this as MediaSort, _$identity);
/// Serializes this MediaSort to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is MediaSort&&(identical(other.key, key) || other.key == key)&&(identical(other.descKey, descKey) || other.descKey == descKey)&&(identical(other.title, title) || other.title == title)&&(identical(other.defaultDirection, defaultDirection) || other.defaultDirection == defaultDirection));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,key,descKey,title,defaultDirection);
@override
String toString() {
return 'MediaSort(key: $key, descKey: $descKey, title: $title, defaultDirection: $defaultDirection)';
}
}
/// @nodoc
abstract mixin class $MediaSortCopyWith<$Res> {
factory $MediaSortCopyWith(MediaSort value, $Res Function(MediaSort) _then) = _$MediaSortCopyWithImpl;
@useResult
$Res call({
String key, String? descKey, String title, String? defaultDirection
});
}
/// @nodoc
class _$MediaSortCopyWithImpl<$Res>
implements $MediaSortCopyWith<$Res> {
_$MediaSortCopyWithImpl(this._self, this._then);
final MediaSort _self;
final $Res Function(MediaSort) _then;
/// Create a copy of MediaSort
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? key = null,Object? descKey = freezed,Object? title = null,Object? defaultDirection = freezed,}) {
return _then(_self.copyWith(
key: null == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String,descKey: freezed == descKey ? _self.descKey : descKey // ignore: cast_nullable_to_non_nullable
as String?,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
as String,defaultDirection: freezed == defaultDirection ? _self.defaultDirection : defaultDirection // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [MediaSort].
extension MediaSortPatterns on MediaSort {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _MediaSort value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _MediaSort() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _MediaSort value) $default,){
final _that = this;
switch (_that) {
case _MediaSort():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _MediaSort value)? $default,){
final _that = this;
switch (_that) {
case _MediaSort() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String key, String? descKey, String title, String? defaultDirection)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _MediaSort() when $default != null:
return $default(_that.key,_that.descKey,_that.title,_that.defaultDirection);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String key, String? descKey, String title, String? defaultDirection) $default,) {final _that = this;
switch (_that) {
case _MediaSort():
return $default(_that.key,_that.descKey,_that.title,_that.defaultDirection);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String key, String? descKey, String title, String? defaultDirection)? $default,) {final _that = this;
switch (_that) {
case _MediaSort() when $default != null:
return $default(_that.key,_that.descKey,_that.title,_that.defaultDirection);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _MediaSort extends MediaSort {
const _MediaSort({required this.key, this.descKey, required this.title, this.defaultDirection}): super._();
factory _MediaSort.fromJson(Map<String, dynamic> json) => _$MediaSortFromJson(json);
@override final String key;
@override final String? descKey;
@override final String title;
@override final String? defaultDirection;
/// Create a copy of MediaSort
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$MediaSortCopyWith<_MediaSort> get copyWith => __$MediaSortCopyWithImpl<_MediaSort>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$MediaSortToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _MediaSort&&(identical(other.key, key) || other.key == key)&&(identical(other.descKey, descKey) || other.descKey == descKey)&&(identical(other.title, title) || other.title == title)&&(identical(other.defaultDirection, defaultDirection) || other.defaultDirection == defaultDirection));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,key,descKey,title,defaultDirection);
@override
String toString() {
return 'MediaSort(key: $key, descKey: $descKey, title: $title, defaultDirection: $defaultDirection)';
}
}
/// @nodoc
abstract mixin class _$MediaSortCopyWith<$Res> implements $MediaSortCopyWith<$Res> {
factory _$MediaSortCopyWith(_MediaSort value, $Res Function(_MediaSort) _then) = __$MediaSortCopyWithImpl;
@override @useResult
$Res call({
String key, String? descKey, String title, String? defaultDirection
});
}
/// @nodoc
class __$MediaSortCopyWithImpl<$Res>
implements _$MediaSortCopyWith<$Res> {
__$MediaSortCopyWithImpl(this._self, this._then);
final _MediaSort _self;
final $Res Function(_MediaSort) _then;
/// Create a copy of MediaSort
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? key = null,Object? descKey = freezed,Object? title = null,Object? defaultDirection = freezed,}) {
return _then(_MediaSort(
key: null == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String,descKey: freezed == descKey ? _self.descKey : descKey // ignore: cast_nullable_to_non_nullable
as String?,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
as String,defaultDirection: freezed == defaultDirection ? _self.defaultDirection : defaultDirection // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on
+8 -7
View File
@@ -6,16 +6,17 @@ part of 'media_sort.dart';
// JsonSerializableGenerator
// **************************************************************************
MediaSort _$MediaSortFromJson(Map<String, dynamic> json) => MediaSort(
_MediaSort _$MediaSortFromJson(Map<String, dynamic> json) => _MediaSort(
key: json['key'] as String,
descKey: json['descKey'] as String?,
title: json['title'] as String,
defaultDirection: json['defaultDirection'] as String?,
);
Map<String, dynamic> _$MediaSortToJson(MediaSort instance) => <String, dynamic>{
'key': instance.key,
'descKey': instance.descKey,
'title': instance.title,
'defaultDirection': instance.defaultDirection,
};
Map<String, dynamic> _$MediaSortToJson(_MediaSort instance) =>
<String, dynamic>{
'key': instance.key,
'descKey': instance.descKey,
'title': instance.title,
'defaultDirection': instance.defaultDirection,
};
+3 -2
View File
@@ -1,5 +1,6 @@
import '../utils/codec_utils.dart';
import '../utils/track_label_builder.dart' show TrackLabelBuilder, buildTrackLabel;
import 'media_display_criteria.dart';
class MediaSourceInfo {
final String videoUrl;
@@ -7,7 +8,7 @@ class MediaSourceInfo {
final List<MediaSubtitleTrack> subtitleTracks;
final List<MediaChapter> chapters;
final int? partId;
final double? frameRate;
final MediaDisplayCriteria? displayCriteria;
/// Jellyfin source id for the *selected* version (null on Plex). Lets the
/// trickplay loader request the right tile sheet when an item has multiple
@@ -30,7 +31,7 @@ class MediaSourceInfo {
required this.subtitleTracks,
required this.chapters,
this.partId,
this.frameRate,
this.displayCriteria,
this.mediaSourceId,
this.defaultAudioStreamIndex,
this.defaultSubtitleStreamIndex,
+50 -111
View File
@@ -1,122 +1,61 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'media_item.dart';
part 'play_queue.freezed.dart';
/// Backend-neutral play queue — a flat ordered list of items with a current
/// cursor. Implementations differ in whether the queue is server-resourced
/// (Plex) or client-only (Jellyfin).
sealed class PlayQueue {
/// Items in playback order.
List<MediaItem> get items;
@freezed
sealed class PlayQueue with _$PlayQueue {
const PlayQueue._();
/// Index of the currently-playing item, or `null` if the queue has not
/// started.
int? get currentIndex;
/// Whether the queue has been shuffled.
bool get shuffled;
/// Backend that minted this queue.
String get backendId;
MediaItem? get current =>
currentIndex != null && currentIndex! >= 0 && currentIndex! < items.length ? items[currentIndex!] : null;
bool get hasNext => currentIndex != null && currentIndex! + 1 < items.length;
bool get hasPrevious => currentIndex != null && currentIndex! > 0;
}
/// Plex play queue — coordinated server-side via `/playQueues` so multiple
/// devices can view/control the same queue.
class PlexServerPlayQueue extends PlayQueue {
/// Plex `playQueueID` — addresses the queue for subsequent fetches.
final int playQueueId;
@override
final List<MediaItem> items;
@override
final int? currentIndex;
@override
final bool shuffled;
/// Plex `playQueueSelectedItemID` of the active item.
final int? selectedItemId;
/// Plex `playQueueVersion` — server-side optimistic concurrency token.
final int? version;
/// Plex `playQueueSourceURI` — used for "Up Next" derivation.
final String? sourceUri;
PlexServerPlayQueue({
required this.playQueueId,
required this.items,
this.currentIndex,
this.shuffled = false,
this.selectedItemId,
this.version,
this.sourceUri,
});
@override
String get backendId => 'plex';
PlexServerPlayQueue copyWith({
int? playQueueId,
List<MediaItem>? items,
/// Plex play queue — coordinated server-side via `/playQueues` so multiple
/// devices can view/control the same queue.
const factory PlayQueue.plex({
/// Plex `playQueueID` — addresses the queue for subsequent fetches.
required int playQueueId,
required List<MediaItem> items,
int? currentIndex,
bool? shuffled,
@Default(false) bool shuffled,
/// Plex `playQueueSelectedItemID` of the active item.
int? selectedItemId,
/// Plex `playQueueVersion` — server-side optimistic concurrency token.
int? version,
/// Plex `playQueueSourceURI` — used for "Up Next" derivation.
String? sourceUri,
}) {
return PlexServerPlayQueue(
playQueueId: playQueueId ?? this.playQueueId,
items: items ?? this.items,
currentIndex: currentIndex ?? this.currentIndex,
shuffled: shuffled ?? this.shuffled,
selectedItemId: selectedItemId ?? this.selectedItemId,
version: version ?? this.version,
sourceUri: sourceUri ?? this.sourceUri,
);
}
}
/// Client-only play queue used by Jellyfin and any backend without a
/// server-side queue concept. Each [LocalPlayQueue] is anchored by a
/// client-generated UUID so callers can address it like a Plex queue.
class LocalPlayQueue extends PlayQueue {
/// Client-generated UUID identifying this queue for the session.
final String id;
@override
final List<MediaItem> items;
@override
final int? currentIndex;
@override
final bool shuffled;
/// Server kind that owns this queue's items (typically `"jellyfin"`).
@override
final String backendId;
LocalPlayQueue({
required this.id,
required this.items,
required this.backendId,
this.currentIndex,
this.shuffled = false,
});
LocalPlayQueue copyWith({String? id, List<MediaItem>? items, int? currentIndex, bool? shuffled, String? backendId}) {
return LocalPlayQueue(
id: id ?? this.id,
items: items ?? this.items,
currentIndex: currentIndex ?? this.currentIndex,
shuffled: shuffled ?? this.shuffled,
backendId: backendId ?? this.backendId,
);
}
}) = PlexServerPlayQueue;
/// Client-only play queue used by Jellyfin and any backend without a
/// server-side queue concept. Each [LocalPlayQueue] is anchored by a
/// client-generated UUID so callers can address it like a Plex queue.
const factory PlayQueue.local({
/// Client-generated UUID identifying this queue for the session.
required String id,
required List<MediaItem> items,
/// Server kind that owns this queue's items (typically `"jellyfin"`).
required String backendId,
int? currentIndex,
@Default(false) bool shuffled,
}) = LocalPlayQueue;
MediaItem? get current => switch (this) {
PlexServerPlayQueue(:final items, :final currentIndex) || LocalPlayQueue(:final items, :final currentIndex) =>
currentIndex != null && currentIndex >= 0 && currentIndex < items.length ? items[currentIndex] : null,
};
bool get hasNext => switch (this) {
PlexServerPlayQueue(:final items, :final currentIndex) ||
LocalPlayQueue(:final items, :final currentIndex) => currentIndex != null && currentIndex + 1 < items.length,
};
bool get hasPrevious => switch (this) {
PlexServerPlayQueue(:final currentIndex) ||
LocalPlayQueue(:final currentIndex) => currentIndex != null && currentIndex > 0,
};
}
+377
View File
@@ -0,0 +1,377 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'play_queue.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$PlayQueue {
List<MediaItem> get items; int? get currentIndex; bool get shuffled;
/// Create a copy of PlayQueue
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$PlayQueueCopyWith<PlayQueue> get copyWith => _$PlayQueueCopyWithImpl<PlayQueue>(this as PlayQueue, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is PlayQueue&&const DeepCollectionEquality().equals(other.items, items)&&(identical(other.currentIndex, currentIndex) || other.currentIndex == currentIndex)&&(identical(other.shuffled, shuffled) || other.shuffled == shuffled));
}
@override
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(items),currentIndex,shuffled);
@override
String toString() {
return 'PlayQueue(items: $items, currentIndex: $currentIndex, shuffled: $shuffled)';
}
}
/// @nodoc
abstract mixin class $PlayQueueCopyWith<$Res> {
factory $PlayQueueCopyWith(PlayQueue value, $Res Function(PlayQueue) _then) = _$PlayQueueCopyWithImpl;
@useResult
$Res call({
List<MediaItem> items, int? currentIndex, bool shuffled
});
}
/// @nodoc
class _$PlayQueueCopyWithImpl<$Res>
implements $PlayQueueCopyWith<$Res> {
_$PlayQueueCopyWithImpl(this._self, this._then);
final PlayQueue _self;
final $Res Function(PlayQueue) _then;
/// Create a copy of PlayQueue
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? items = null,Object? currentIndex = freezed,Object? shuffled = null,}) {
return _then(_self.copyWith(
items: null == items ? _self.items : items // ignore: cast_nullable_to_non_nullable
as List<MediaItem>,currentIndex: freezed == currentIndex ? _self.currentIndex : currentIndex // ignore: cast_nullable_to_non_nullable
as int?,shuffled: null == shuffled ? _self.shuffled : shuffled // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// Adds pattern-matching-related methods to [PlayQueue].
extension PlayQueuePatterns on PlayQueue {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( PlexServerPlayQueue value)? plex,TResult Function( LocalPlayQueue value)? local,required TResult orElse(),}){
final _that = this;
switch (_that) {
case PlexServerPlayQueue() when plex != null:
return plex(_that);case LocalPlayQueue() when local != null:
return local(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( PlexServerPlayQueue value) plex,required TResult Function( LocalPlayQueue value) local,}){
final _that = this;
switch (_that) {
case PlexServerPlayQueue():
return plex(_that);case LocalPlayQueue():
return local(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( PlexServerPlayQueue value)? plex,TResult? Function( LocalPlayQueue value)? local,}){
final _that = this;
switch (_that) {
case PlexServerPlayQueue() when plex != null:
return plex(_that);case LocalPlayQueue() when local != null:
return local(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( int playQueueId, List<MediaItem> items, int? currentIndex, bool shuffled, int? selectedItemId, int? version, String? sourceUri)? plex,TResult Function( String id, List<MediaItem> items, String backendId, int? currentIndex, bool shuffled)? local,required TResult orElse(),}) {final _that = this;
switch (_that) {
case PlexServerPlayQueue() when plex != null:
return plex(_that.playQueueId,_that.items,_that.currentIndex,_that.shuffled,_that.selectedItemId,_that.version,_that.sourceUri);case LocalPlayQueue() when local != null:
return local(_that.id,_that.items,_that.backendId,_that.currentIndex,_that.shuffled);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( int playQueueId, List<MediaItem> items, int? currentIndex, bool shuffled, int? selectedItemId, int? version, String? sourceUri) plex,required TResult Function( String id, List<MediaItem> items, String backendId, int? currentIndex, bool shuffled) local,}) {final _that = this;
switch (_that) {
case PlexServerPlayQueue():
return plex(_that.playQueueId,_that.items,_that.currentIndex,_that.shuffled,_that.selectedItemId,_that.version,_that.sourceUri);case LocalPlayQueue():
return local(_that.id,_that.items,_that.backendId,_that.currentIndex,_that.shuffled);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( int playQueueId, List<MediaItem> items, int? currentIndex, bool shuffled, int? selectedItemId, int? version, String? sourceUri)? plex,TResult? Function( String id, List<MediaItem> items, String backendId, int? currentIndex, bool shuffled)? local,}) {final _that = this;
switch (_that) {
case PlexServerPlayQueue() when plex != null:
return plex(_that.playQueueId,_that.items,_that.currentIndex,_that.shuffled,_that.selectedItemId,_that.version,_that.sourceUri);case LocalPlayQueue() when local != null:
return local(_that.id,_that.items,_that.backendId,_that.currentIndex,_that.shuffled);case _:
return null;
}
}
}
/// @nodoc
class PlexServerPlayQueue extends PlayQueue {
const PlexServerPlayQueue({required this.playQueueId, required final List<MediaItem> items, this.currentIndex, this.shuffled = false, this.selectedItemId, this.version, this.sourceUri}): _items = items,super._();
/// Plex `playQueueID` — addresses the queue for subsequent fetches.
final int playQueueId;
final List<MediaItem> _items;
@override List<MediaItem> get items {
if (_items is EqualUnmodifiableListView) return _items;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_items);
}
@override final int? currentIndex;
@override@JsonKey() final bool shuffled;
/// Plex `playQueueSelectedItemID` of the active item.
final int? selectedItemId;
/// Plex `playQueueVersion` — server-side optimistic concurrency token.
final int? version;
/// Plex `playQueueSourceURI` — used for "Up Next" derivation.
final String? sourceUri;
/// Create a copy of PlayQueue
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$PlexServerPlayQueueCopyWith<PlexServerPlayQueue> get copyWith => _$PlexServerPlayQueueCopyWithImpl<PlexServerPlayQueue>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is PlexServerPlayQueue&&(identical(other.playQueueId, playQueueId) || other.playQueueId == playQueueId)&&const DeepCollectionEquality().equals(other._items, _items)&&(identical(other.currentIndex, currentIndex) || other.currentIndex == currentIndex)&&(identical(other.shuffled, shuffled) || other.shuffled == shuffled)&&(identical(other.selectedItemId, selectedItemId) || other.selectedItemId == selectedItemId)&&(identical(other.version, version) || other.version == version)&&(identical(other.sourceUri, sourceUri) || other.sourceUri == sourceUri));
}
@override
int get hashCode => Object.hash(runtimeType,playQueueId,const DeepCollectionEquality().hash(_items),currentIndex,shuffled,selectedItemId,version,sourceUri);
@override
String toString() {
return 'PlayQueue.plex(playQueueId: $playQueueId, items: $items, currentIndex: $currentIndex, shuffled: $shuffled, selectedItemId: $selectedItemId, version: $version, sourceUri: $sourceUri)';
}
}
/// @nodoc
abstract mixin class $PlexServerPlayQueueCopyWith<$Res> implements $PlayQueueCopyWith<$Res> {
factory $PlexServerPlayQueueCopyWith(PlexServerPlayQueue value, $Res Function(PlexServerPlayQueue) _then) = _$PlexServerPlayQueueCopyWithImpl;
@override @useResult
$Res call({
int playQueueId, List<MediaItem> items, int? currentIndex, bool shuffled, int? selectedItemId, int? version, String? sourceUri
});
}
/// @nodoc
class _$PlexServerPlayQueueCopyWithImpl<$Res>
implements $PlexServerPlayQueueCopyWith<$Res> {
_$PlexServerPlayQueueCopyWithImpl(this._self, this._then);
final PlexServerPlayQueue _self;
final $Res Function(PlexServerPlayQueue) _then;
/// Create a copy of PlayQueue
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? playQueueId = null,Object? items = null,Object? currentIndex = freezed,Object? shuffled = null,Object? selectedItemId = freezed,Object? version = freezed,Object? sourceUri = freezed,}) {
return _then(PlexServerPlayQueue(
playQueueId: null == playQueueId ? _self.playQueueId : playQueueId // ignore: cast_nullable_to_non_nullable
as int,items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable
as List<MediaItem>,currentIndex: freezed == currentIndex ? _self.currentIndex : currentIndex // ignore: cast_nullable_to_non_nullable
as int?,shuffled: null == shuffled ? _self.shuffled : shuffled // ignore: cast_nullable_to_non_nullable
as bool,selectedItemId: freezed == selectedItemId ? _self.selectedItemId : selectedItemId // ignore: cast_nullable_to_non_nullable
as int?,version: freezed == version ? _self.version : version // ignore: cast_nullable_to_non_nullable
as int?,sourceUri: freezed == sourceUri ? _self.sourceUri : sourceUri // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
class LocalPlayQueue extends PlayQueue {
const LocalPlayQueue({required this.id, required final List<MediaItem> items, required this.backendId, this.currentIndex, this.shuffled = false}): _items = items,super._();
/// Client-generated UUID identifying this queue for the session.
final String id;
final List<MediaItem> _items;
@override List<MediaItem> get items {
if (_items is EqualUnmodifiableListView) return _items;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_items);
}
/// Server kind that owns this queue's items (typically `"jellyfin"`).
final String backendId;
@override final int? currentIndex;
@override@JsonKey() final bool shuffled;
/// Create a copy of PlayQueue
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$LocalPlayQueueCopyWith<LocalPlayQueue> get copyWith => _$LocalPlayQueueCopyWithImpl<LocalPlayQueue>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is LocalPlayQueue&&(identical(other.id, id) || other.id == id)&&const DeepCollectionEquality().equals(other._items, _items)&&(identical(other.backendId, backendId) || other.backendId == backendId)&&(identical(other.currentIndex, currentIndex) || other.currentIndex == currentIndex)&&(identical(other.shuffled, shuffled) || other.shuffled == shuffled));
}
@override
int get hashCode => Object.hash(runtimeType,id,const DeepCollectionEquality().hash(_items),backendId,currentIndex,shuffled);
@override
String toString() {
return 'PlayQueue.local(id: $id, items: $items, backendId: $backendId, currentIndex: $currentIndex, shuffled: $shuffled)';
}
}
/// @nodoc
abstract mixin class $LocalPlayQueueCopyWith<$Res> implements $PlayQueueCopyWith<$Res> {
factory $LocalPlayQueueCopyWith(LocalPlayQueue value, $Res Function(LocalPlayQueue) _then) = _$LocalPlayQueueCopyWithImpl;
@override @useResult
$Res call({
String id, List<MediaItem> items, String backendId, int? currentIndex, bool shuffled
});
}
/// @nodoc
class _$LocalPlayQueueCopyWithImpl<$Res>
implements $LocalPlayQueueCopyWith<$Res> {
_$LocalPlayQueueCopyWithImpl(this._self, this._then);
final LocalPlayQueue _self;
final $Res Function(LocalPlayQueue) _then;
/// Create a copy of PlayQueue
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? items = null,Object? backendId = null,Object? currentIndex = freezed,Object? shuffled = null,}) {
return _then(LocalPlayQueue(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,items: null == items ? _self._items : items // ignore: cast_nullable_to_non_nullable
as List<MediaItem>,backendId: null == backendId ? _self.backendId : backendId // ignore: cast_nullable_to_non_nullable
as String,currentIndex: freezed == currentIndex ? _self.currentIndex : currentIndex // ignore: cast_nullable_to_non_nullable
as int?,shuffled: null == shuffled ? _self.shuffled : shuffled // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
// dart format on
+1
View File
@@ -26,6 +26,7 @@ mixin ItemUpdatable<T extends StatefulWidget> on State<T> {
if (serverId == null) return;
final updatedItem = await context.tryGetMediaClientForServer(serverId)?.fetchItem(itemId);
if (updatedItem != null) {
if (!mounted) return;
setState(() {
updateItemInLists(itemId, updatedItem);
});
+25 -11
View File
@@ -3,7 +3,6 @@ import 'dart:async';
import 'package:flutter/widgets.dart';
import '../media/library_query.dart';
import '../media/media_item.dart';
import '../utils/media_server_http_client.dart';
import '../exceptions/media_server_exceptions.dart';
@@ -20,9 +19,9 @@ import '../exceptions/media_server_exceptions.dart';
/// 2. On scroll, subclass calls [ensureRangeLoaded] with the visible index
/// range. Eager prefetch ahead of the viewport via [prefetchAhead].
/// 3. On dispose, subclass calls [disposePagination].
mixin PaginatedItemLoader<W extends StatefulWidget> on State<W> {
mixin PaginatedItemLoader<T, W extends StatefulWidget> on State<W> {
/// Sparse map of loaded items, keyed by position.
final Map<int, MediaItem> loadedItems = {};
final Map<int, T> loadedItems = {};
/// Total items on the server. 0 until the first page completes.
int totalSize = 0;
@@ -43,12 +42,12 @@ mixin PaginatedItemLoader<W extends StatefulWidget> on State<W> {
VoidCallback? _scheduledRetry;
/// Fetch a page of items. Subclass implements this — typically delegating
/// to a paginated client method that returns a [LibraryPage] of [MediaItem].
Future<LibraryPage<MediaItem>> fetchPage(int start, int size, AbortController? abort);
/// to a paginated client method that returns a [LibraryPage].
Future<LibraryPage<T>> fetchPage(int start, int size, AbortController? abort);
/// Hook fired after each successful page merge. Default: no-op.
/// Override for image prefetch, syncing a base-class `items` list, etc.
void onPageLoaded(int start, List<MediaItem> items) {}
void onPageLoaded(int _, List<T> __) {}
/// Synchronously clear pagination state and bump the generation counter.
/// Call from inside the subclass's `setState` before awaiting
@@ -69,17 +68,32 @@ mixin PaginatedItemLoader<W extends StatefulWidget> on State<W> {
/// Fetch the first page. Await from outside `setState`. Mutates
/// [loadedItems] and [totalSize] on success; throws on failure.
Future<LibraryPage<MediaItem>> loadInitialPage(int pageSize) async {
Future<LibraryPage<T>> loadInitialPage(int pageSize) async {
final result = await loadInitialPageWithStatus(pageSize);
return result.page;
}
/// Like [loadInitialPage], but reports whether the fetched page was still
/// current and actually merged into [loadedItems].
Future<({LibraryPage<T> page, bool applied})> loadInitialPageWithStatus(int pageSize) async {
final generation = _requestId;
final result = await fetchPage(0, pageSize, _cancelToken);
if (generation != _requestId || !mounted) return result;
late final LibraryPage<T> result;
try {
result = await fetchPage(0, pageSize, _cancelToken);
} catch (_) {
if (generation != _requestId || !mounted) {
return (page: LibraryPage<T>(items: const [], totalCount: 0), applied: false);
}
rethrow;
}
if (generation != _requestId || !mounted) return (page: result, applied: false);
for (var i = 0; i < result.items.length; i++) {
loadedItems[i] = result.items[i];
}
totalSize = result.totalCount;
onPageLoaded(0, result.items);
return result;
return (page: result, applied: true);
}
/// Fetch any unloaded items inside [firstIndex, firstIndex + visibleCount)
@@ -160,7 +174,7 @@ mixin PaginatedItemLoader<W extends StatefulWidget> on State<W> {
/// [totalSize] even if [index] wasn't in the sparse map (evicted).
void removeLoadedItemAndShift(int index) {
loadedItems.remove(index);
final shifted = <int, MediaItem>{};
final shifted = <int, T>{};
for (final entry in loadedItems.entries) {
if (entry.key > index) {
shifted[entry.key - 1] = entry.value;
+20 -20
View File
@@ -1,3 +1,11 @@
// ignore_for_file: invalid_annotation_target
import 'package:freezed_annotation/freezed_annotation.dart';
import '../../utils/json_converters.dart';
part 'remote_command.freezed.dart';
part 'remote_command.g.dart';
enum RemoteCommandType {
dpadUp,
dpadDown,
@@ -46,24 +54,16 @@ enum RemoteCommandType {
syncState,
}
class RemoteCommand {
final RemoteCommandType type;
final Map<String, dynamic>? data;
const RemoteCommand({required this.type, this.data});
factory RemoteCommand.fromJson(Map<String, dynamic> json) {
final index = json['t'] as int;
return RemoteCommand(
type: index < RemoteCommandType.values.length ? RemoteCommandType.values[index] : RemoteCommandType.ping,
data: json['d'] as Map<String, dynamic>?,
);
}
Map<String, dynamic> toJson() {
return {'t': type.index, if (data != null) 'd': data};
}
@override
String toString() => 'RemoteCommand(${type.name}, data: $data)';
class _RemoteCommandTypeConverter extends IndexedEnumConverter<RemoteCommandType> {
const _RemoteCommandTypeConverter() : super(RemoteCommandType.values, RemoteCommandType.ping);
}
@freezed
sealed class RemoteCommand with _$RemoteCommand {
const factory RemoteCommand({
@JsonKey(name: 't') @_RemoteCommandTypeConverter() required RemoteCommandType type,
@JsonKey(name: 'd') Map<String, dynamic>? data,
}) = _RemoteCommand;
factory RemoteCommand.fromJson(Map<String, dynamic> json) => _$RemoteCommandFromJson(json);
}
@@ -0,0 +1,282 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'remote_command.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$RemoteCommand {
@JsonKey(name: 't')@_RemoteCommandTypeConverter() RemoteCommandType get type;@JsonKey(name: 'd') Map<String, dynamic>? get data;
/// Create a copy of RemoteCommand
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$RemoteCommandCopyWith<RemoteCommand> get copyWith => _$RemoteCommandCopyWithImpl<RemoteCommand>(this as RemoteCommand, _$identity);
/// Serializes this RemoteCommand to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is RemoteCommand&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other.data, data));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,type,const DeepCollectionEquality().hash(data));
@override
String toString() {
return 'RemoteCommand(type: $type, data: $data)';
}
}
/// @nodoc
abstract mixin class $RemoteCommandCopyWith<$Res> {
factory $RemoteCommandCopyWith(RemoteCommand value, $Res Function(RemoteCommand) _then) = _$RemoteCommandCopyWithImpl;
@useResult
$Res call({
@JsonKey(name: 't')@_RemoteCommandTypeConverter() RemoteCommandType type,@JsonKey(name: 'd') Map<String, dynamic>? data
});
}
/// @nodoc
class _$RemoteCommandCopyWithImpl<$Res>
implements $RemoteCommandCopyWith<$Res> {
_$RemoteCommandCopyWithImpl(this._self, this._then);
final RemoteCommand _self;
final $Res Function(RemoteCommand) _then;
/// Create a copy of RemoteCommand
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? type = null,Object? data = freezed,}) {
return _then(_self.copyWith(
type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as RemoteCommandType,data: freezed == data ? _self.data : data // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
));
}
}
/// Adds pattern-matching-related methods to [RemoteCommand].
extension RemoteCommandPatterns on RemoteCommand {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _RemoteCommand value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _RemoteCommand() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _RemoteCommand value) $default,){
final _that = this;
switch (_that) {
case _RemoteCommand():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _RemoteCommand value)? $default,){
final _that = this;
switch (_that) {
case _RemoteCommand() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(name: 't')@_RemoteCommandTypeConverter() RemoteCommandType type, @JsonKey(name: 'd') Map<String, dynamic>? data)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _RemoteCommand() when $default != null:
return $default(_that.type,_that.data);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(name: 't')@_RemoteCommandTypeConverter() RemoteCommandType type, @JsonKey(name: 'd') Map<String, dynamic>? data) $default,) {final _that = this;
switch (_that) {
case _RemoteCommand():
return $default(_that.type,_that.data);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(name: 't')@_RemoteCommandTypeConverter() RemoteCommandType type, @JsonKey(name: 'd') Map<String, dynamic>? data)? $default,) {final _that = this;
switch (_that) {
case _RemoteCommand() when $default != null:
return $default(_that.type,_that.data);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _RemoteCommand implements RemoteCommand {
const _RemoteCommand({@JsonKey(name: 't')@_RemoteCommandTypeConverter() required this.type, @JsonKey(name: 'd') final Map<String, dynamic>? data}): _data = data;
factory _RemoteCommand.fromJson(Map<String, dynamic> json) => _$RemoteCommandFromJson(json);
@override@JsonKey(name: 't')@_RemoteCommandTypeConverter() final RemoteCommandType type;
final Map<String, dynamic>? _data;
@override@JsonKey(name: 'd') Map<String, dynamic>? get data {
final value = _data;
if (value == null) return null;
if (_data is EqualUnmodifiableMapView) return _data;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(value);
}
/// Create a copy of RemoteCommand
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$RemoteCommandCopyWith<_RemoteCommand> get copyWith => __$RemoteCommandCopyWithImpl<_RemoteCommand>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$RemoteCommandToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _RemoteCommand&&(identical(other.type, type) || other.type == type)&&const DeepCollectionEquality().equals(other._data, _data));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,type,const DeepCollectionEquality().hash(_data));
@override
String toString() {
return 'RemoteCommand(type: $type, data: $data)';
}
}
/// @nodoc
abstract mixin class _$RemoteCommandCopyWith<$Res> implements $RemoteCommandCopyWith<$Res> {
factory _$RemoteCommandCopyWith(_RemoteCommand value, $Res Function(_RemoteCommand) _then) = __$RemoteCommandCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(name: 't')@_RemoteCommandTypeConverter() RemoteCommandType type,@JsonKey(name: 'd') Map<String, dynamic>? data
});
}
/// @nodoc
class __$RemoteCommandCopyWithImpl<$Res>
implements _$RemoteCommandCopyWith<$Res> {
__$RemoteCommandCopyWithImpl(this._self, this._then);
final _RemoteCommand _self;
final $Res Function(_RemoteCommand) _then;
/// Create a copy of RemoteCommand
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? type = null,Object? data = freezed,}) {
return _then(_RemoteCommand(
type: null == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as RemoteCommandType,data: freezed == data ? _self._data : data // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
));
}
}
// dart format on
@@ -0,0 +1,21 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'remote_command.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_RemoteCommand _$RemoteCommandFromJson(Map<String, dynamic> json) =>
_RemoteCommand(
type: const _RemoteCommandTypeConverter().fromJson(
(json['t'] as num).toInt(),
),
data: json['d'] as Map<String, dynamic>?,
);
Map<String, dynamic> _$RemoteCommandToJson(_RemoteCommand instance) =>
<String, dynamic>{
't': const _RemoteCommandTypeConverter().toJson(instance.type),
'd': instance.data,
};
+21 -86
View File
@@ -1,100 +1,35 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'remote_session.g.dart';
part 'remote_session.freezed.dart';
enum RemoteSessionRole { host, remote }
enum RemoteSessionStatus { disconnected, connecting, connected, reconnecting, error }
@JsonSerializable()
class RemoteDevice {
final String id;
final String name;
final String platform;
final DateTime connectedAt;
final Map<String, bool> capabilities;
RemoteDevice({
required this.id,
required this.name,
required this.platform,
DateTime? connectedAt,
Map<String, bool>? capabilities,
}) : connectedAt = connectedAt ?? DateTime.now(),
capabilities = capabilities ?? {};
factory RemoteDevice.fromJson(Map<String, dynamic> json) => _$RemoteDeviceFromJson(json);
Map<String, dynamic> toJson() => _$RemoteDeviceToJson(this);
RemoteDevice copyWith({
String? id,
String? name,
String? platform,
DateTime? connectedAt,
Map<String, bool>? capabilities,
}) {
return RemoteDevice(
id: id ?? this.id,
name: name ?? this.name,
platform: platform ?? this.platform,
connectedAt: connectedAt ?? this.connectedAt,
capabilities: capabilities ?? this.capabilities,
);
}
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is RemoteDevice && other.id == id;
}
@override
int get hashCode => id.hashCode;
@freezed
sealed class RemoteDevice with _$RemoteDevice {
const factory RemoteDevice({
required String id,
required String name,
required String platform,
required DateTime connectedAt,
@Default(<String, bool>{}) Map<String, bool> capabilities,
}) = _RemoteDevice;
}
@JsonSerializable()
class RemoteSession {
@JsonKey(unknownEnumValue: RemoteSessionRole.remote)
final RemoteSessionRole role;
@JsonKey(unknownEnumValue: RemoteSessionStatus.disconnected)
final RemoteSessionStatus status;
final RemoteDevice? connectedDevice;
final DateTime createdAt;
final String? errorMessage;
@freezed
sealed class RemoteSession with _$RemoteSession {
const RemoteSession._();
RemoteSession({
required this.role,
this.status = RemoteSessionStatus.disconnected,
this.connectedDevice,
DateTime? createdAt,
this.errorMessage,
}) : createdAt = createdAt ?? DateTime.now();
const factory RemoteSession({
required RemoteSessionRole role,
@Default(RemoteSessionStatus.disconnected) RemoteSessionStatus status,
RemoteDevice? connectedDevice,
required DateTime createdAt,
String? errorMessage,
}) = _RemoteSession;
bool get isConnected => status == RemoteSessionStatus.connected;
bool get isHost => role == RemoteSessionRole.host;
bool get isRemote => role == RemoteSessionRole.remote;
factory RemoteSession.fromJson(Map<String, dynamic> json) => _$RemoteSessionFromJson(json);
Map<String, dynamic> toJson() => _$RemoteSessionToJson(this);
RemoteSession copyWith({
RemoteSessionRole? role,
RemoteSessionStatus? status,
RemoteDevice? connectedDevice,
bool clearConnectedDevice = false,
DateTime? createdAt,
String? errorMessage,
bool clearErrorMessage = false,
}) {
return RemoteSession(
role: role ?? this.role,
status: status ?? this.status,
connectedDevice: clearConnectedDevice ? null : (connectedDevice ?? this.connectedDevice),
createdAt: createdAt ?? this.createdAt,
errorMessage: clearErrorMessage ? null : (errorMessage ?? this.errorMessage),
);
}
}
@@ -0,0 +1,570 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'remote_session.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$RemoteDevice {
String get id; String get name; String get platform; DateTime get connectedAt; Map<String, bool> get capabilities;
/// Create a copy of RemoteDevice
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$RemoteDeviceCopyWith<RemoteDevice> get copyWith => _$RemoteDeviceCopyWithImpl<RemoteDevice>(this as RemoteDevice, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is RemoteDevice&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.platform, platform) || other.platform == platform)&&(identical(other.connectedAt, connectedAt) || other.connectedAt == connectedAt)&&const DeepCollectionEquality().equals(other.capabilities, capabilities));
}
@override
int get hashCode => Object.hash(runtimeType,id,name,platform,connectedAt,const DeepCollectionEquality().hash(capabilities));
@override
String toString() {
return 'RemoteDevice(id: $id, name: $name, platform: $platform, connectedAt: $connectedAt, capabilities: $capabilities)';
}
}
/// @nodoc
abstract mixin class $RemoteDeviceCopyWith<$Res> {
factory $RemoteDeviceCopyWith(RemoteDevice value, $Res Function(RemoteDevice) _then) = _$RemoteDeviceCopyWithImpl;
@useResult
$Res call({
String id, String name, String platform, DateTime connectedAt, Map<String, bool> capabilities
});
}
/// @nodoc
class _$RemoteDeviceCopyWithImpl<$Res>
implements $RemoteDeviceCopyWith<$Res> {
_$RemoteDeviceCopyWithImpl(this._self, this._then);
final RemoteDevice _self;
final $Res Function(RemoteDevice) _then;
/// Create a copy of RemoteDevice
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? name = null,Object? platform = null,Object? connectedAt = null,Object? capabilities = null,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,platform: null == platform ? _self.platform : platform // ignore: cast_nullable_to_non_nullable
as String,connectedAt: null == connectedAt ? _self.connectedAt : connectedAt // ignore: cast_nullable_to_non_nullable
as DateTime,capabilities: null == capabilities ? _self.capabilities : capabilities // ignore: cast_nullable_to_non_nullable
as Map<String, bool>,
));
}
}
/// Adds pattern-matching-related methods to [RemoteDevice].
extension RemoteDevicePatterns on RemoteDevice {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _RemoteDevice value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _RemoteDevice() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _RemoteDevice value) $default,){
final _that = this;
switch (_that) {
case _RemoteDevice():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _RemoteDevice value)? $default,){
final _that = this;
switch (_that) {
case _RemoteDevice() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String name, String platform, DateTime connectedAt, Map<String, bool> capabilities)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _RemoteDevice() when $default != null:
return $default(_that.id,_that.name,_that.platform,_that.connectedAt,_that.capabilities);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String name, String platform, DateTime connectedAt, Map<String, bool> capabilities) $default,) {final _that = this;
switch (_that) {
case _RemoteDevice():
return $default(_that.id,_that.name,_that.platform,_that.connectedAt,_that.capabilities);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String name, String platform, DateTime connectedAt, Map<String, bool> capabilities)? $default,) {final _that = this;
switch (_that) {
case _RemoteDevice() when $default != null:
return $default(_that.id,_that.name,_that.platform,_that.connectedAt,_that.capabilities);case _:
return null;
}
}
}
/// @nodoc
class _RemoteDevice implements RemoteDevice {
const _RemoteDevice({required this.id, required this.name, required this.platform, required this.connectedAt, final Map<String, bool> capabilities = const <String, bool>{}}): _capabilities = capabilities;
@override final String id;
@override final String name;
@override final String platform;
@override final DateTime connectedAt;
final Map<String, bool> _capabilities;
@override@JsonKey() Map<String, bool> get capabilities {
if (_capabilities is EqualUnmodifiableMapView) return _capabilities;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(_capabilities);
}
/// Create a copy of RemoteDevice
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$RemoteDeviceCopyWith<_RemoteDevice> get copyWith => __$RemoteDeviceCopyWithImpl<_RemoteDevice>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _RemoteDevice&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name)&&(identical(other.platform, platform) || other.platform == platform)&&(identical(other.connectedAt, connectedAt) || other.connectedAt == connectedAt)&&const DeepCollectionEquality().equals(other._capabilities, _capabilities));
}
@override
int get hashCode => Object.hash(runtimeType,id,name,platform,connectedAt,const DeepCollectionEquality().hash(_capabilities));
@override
String toString() {
return 'RemoteDevice(id: $id, name: $name, platform: $platform, connectedAt: $connectedAt, capabilities: $capabilities)';
}
}
/// @nodoc
abstract mixin class _$RemoteDeviceCopyWith<$Res> implements $RemoteDeviceCopyWith<$Res> {
factory _$RemoteDeviceCopyWith(_RemoteDevice value, $Res Function(_RemoteDevice) _then) = __$RemoteDeviceCopyWithImpl;
@override @useResult
$Res call({
String id, String name, String platform, DateTime connectedAt, Map<String, bool> capabilities
});
}
/// @nodoc
class __$RemoteDeviceCopyWithImpl<$Res>
implements _$RemoteDeviceCopyWith<$Res> {
__$RemoteDeviceCopyWithImpl(this._self, this._then);
final _RemoteDevice _self;
final $Res Function(_RemoteDevice) _then;
/// Create a copy of RemoteDevice
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? name = null,Object? platform = null,Object? connectedAt = null,Object? capabilities = null,}) {
return _then(_RemoteDevice(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,platform: null == platform ? _self.platform : platform // ignore: cast_nullable_to_non_nullable
as String,connectedAt: null == connectedAt ? _self.connectedAt : connectedAt // ignore: cast_nullable_to_non_nullable
as DateTime,capabilities: null == capabilities ? _self._capabilities : capabilities // ignore: cast_nullable_to_non_nullable
as Map<String, bool>,
));
}
}
/// @nodoc
mixin _$RemoteSession {
RemoteSessionRole get role; RemoteSessionStatus get status; RemoteDevice? get connectedDevice; DateTime get createdAt; String? get errorMessage;
/// Create a copy of RemoteSession
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$RemoteSessionCopyWith<RemoteSession> get copyWith => _$RemoteSessionCopyWithImpl<RemoteSession>(this as RemoteSession, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is RemoteSession&&(identical(other.role, role) || other.role == role)&&(identical(other.status, status) || other.status == status)&&(identical(other.connectedDevice, connectedDevice) || other.connectedDevice == connectedDevice)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
int get hashCode => Object.hash(runtimeType,role,status,connectedDevice,createdAt,errorMessage);
@override
String toString() {
return 'RemoteSession(role: $role, status: $status, connectedDevice: $connectedDevice, createdAt: $createdAt, errorMessage: $errorMessage)';
}
}
/// @nodoc
abstract mixin class $RemoteSessionCopyWith<$Res> {
factory $RemoteSessionCopyWith(RemoteSession value, $Res Function(RemoteSession) _then) = _$RemoteSessionCopyWithImpl;
@useResult
$Res call({
RemoteSessionRole role, RemoteSessionStatus status, RemoteDevice? connectedDevice, DateTime createdAt, String? errorMessage
});
$RemoteDeviceCopyWith<$Res>? get connectedDevice;
}
/// @nodoc
class _$RemoteSessionCopyWithImpl<$Res>
implements $RemoteSessionCopyWith<$Res> {
_$RemoteSessionCopyWithImpl(this._self, this._then);
final RemoteSession _self;
final $Res Function(RemoteSession) _then;
/// Create a copy of RemoteSession
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? role = null,Object? status = null,Object? connectedDevice = freezed,Object? createdAt = null,Object? errorMessage = freezed,}) {
return _then(_self.copyWith(
role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
as RemoteSessionRole,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as RemoteSessionStatus,connectedDevice: freezed == connectedDevice ? _self.connectedDevice : connectedDevice // ignore: cast_nullable_to_non_nullable
as RemoteDevice?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,errorMessage: freezed == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String?,
));
}
/// Create a copy of RemoteSession
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$RemoteDeviceCopyWith<$Res>? get connectedDevice {
if (_self.connectedDevice == null) {
return null;
}
return $RemoteDeviceCopyWith<$Res>(_self.connectedDevice!, (value) {
return _then(_self.copyWith(connectedDevice: value));
});
}
}
/// Adds pattern-matching-related methods to [RemoteSession].
extension RemoteSessionPatterns on RemoteSession {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _RemoteSession value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _RemoteSession() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _RemoteSession value) $default,){
final _that = this;
switch (_that) {
case _RemoteSession():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _RemoteSession value)? $default,){
final _that = this;
switch (_that) {
case _RemoteSession() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( RemoteSessionRole role, RemoteSessionStatus status, RemoteDevice? connectedDevice, DateTime createdAt, String? errorMessage)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _RemoteSession() when $default != null:
return $default(_that.role,_that.status,_that.connectedDevice,_that.createdAt,_that.errorMessage);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( RemoteSessionRole role, RemoteSessionStatus status, RemoteDevice? connectedDevice, DateTime createdAt, String? errorMessage) $default,) {final _that = this;
switch (_that) {
case _RemoteSession():
return $default(_that.role,_that.status,_that.connectedDevice,_that.createdAt,_that.errorMessage);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( RemoteSessionRole role, RemoteSessionStatus status, RemoteDevice? connectedDevice, DateTime createdAt, String? errorMessage)? $default,) {final _that = this;
switch (_that) {
case _RemoteSession() when $default != null:
return $default(_that.role,_that.status,_that.connectedDevice,_that.createdAt,_that.errorMessage);case _:
return null;
}
}
}
/// @nodoc
class _RemoteSession extends RemoteSession {
const _RemoteSession({required this.role, this.status = RemoteSessionStatus.disconnected, this.connectedDevice, required this.createdAt, this.errorMessage}): super._();
@override final RemoteSessionRole role;
@override@JsonKey() final RemoteSessionStatus status;
@override final RemoteDevice? connectedDevice;
@override final DateTime createdAt;
@override final String? errorMessage;
/// Create a copy of RemoteSession
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$RemoteSessionCopyWith<_RemoteSession> get copyWith => __$RemoteSessionCopyWithImpl<_RemoteSession>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _RemoteSession&&(identical(other.role, role) || other.role == role)&&(identical(other.status, status) || other.status == status)&&(identical(other.connectedDevice, connectedDevice) || other.connectedDevice == connectedDevice)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
}
@override
int get hashCode => Object.hash(runtimeType,role,status,connectedDevice,createdAt,errorMessage);
@override
String toString() {
return 'RemoteSession(role: $role, status: $status, connectedDevice: $connectedDevice, createdAt: $createdAt, errorMessage: $errorMessage)';
}
}
/// @nodoc
abstract mixin class _$RemoteSessionCopyWith<$Res> implements $RemoteSessionCopyWith<$Res> {
factory _$RemoteSessionCopyWith(_RemoteSession value, $Res Function(_RemoteSession) _then) = __$RemoteSessionCopyWithImpl;
@override @useResult
$Res call({
RemoteSessionRole role, RemoteSessionStatus status, RemoteDevice? connectedDevice, DateTime createdAt, String? errorMessage
});
@override $RemoteDeviceCopyWith<$Res>? get connectedDevice;
}
/// @nodoc
class __$RemoteSessionCopyWithImpl<$Res>
implements _$RemoteSessionCopyWith<$Res> {
__$RemoteSessionCopyWithImpl(this._self, this._then);
final _RemoteSession _self;
final $Res Function(_RemoteSession) _then;
/// Create a copy of RemoteSession
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? role = null,Object? status = null,Object? connectedDevice = freezed,Object? createdAt = null,Object? errorMessage = freezed,}) {
return _then(_RemoteSession(
role: null == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
as RemoteSessionRole,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as RemoteSessionStatus,connectedDevice: freezed == connectedDevice ? _self.connectedDevice : connectedDevice // ignore: cast_nullable_to_non_nullable
as RemoteDevice?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,errorMessage: freezed == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String?,
));
}
/// Create a copy of RemoteSession
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$RemoteDeviceCopyWith<$Res>? get connectedDevice {
if (_self.connectedDevice == null) {
return null;
}
return $RemoteDeviceCopyWith<$Res>(_self.connectedDevice!, (value) {
return _then(_self.copyWith(connectedDevice: value));
});
}
}
// dart format on
@@ -1,75 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'remote_session.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
RemoteDevice _$RemoteDeviceFromJson(Map<String, dynamic> json) => RemoteDevice(
id: json['id'] as String,
name: json['name'] as String,
platform: json['platform'] as String,
connectedAt: json['connectedAt'] == null
? null
: DateTime.parse(json['connectedAt'] as String),
capabilities: (json['capabilities'] as Map<String, dynamic>?)?.map(
(k, e) => MapEntry(k, e as bool),
),
);
Map<String, dynamic> _$RemoteDeviceToJson(RemoteDevice instance) =>
<String, dynamic>{
'id': instance.id,
'name': instance.name,
'platform': instance.platform,
'connectedAt': instance.connectedAt.toIso8601String(),
'capabilities': instance.capabilities,
};
RemoteSession _$RemoteSessionFromJson(Map<String, dynamic> json) =>
RemoteSession(
role: $enumDecode(
_$RemoteSessionRoleEnumMap,
json['role'],
unknownValue: RemoteSessionRole.remote,
),
status:
$enumDecodeNullable(
_$RemoteSessionStatusEnumMap,
json['status'],
unknownValue: RemoteSessionStatus.disconnected,
) ??
RemoteSessionStatus.disconnected,
connectedDevice: json['connectedDevice'] == null
? null
: RemoteDevice.fromJson(
json['connectedDevice'] as Map<String, dynamic>,
),
createdAt: json['createdAt'] == null
? null
: DateTime.parse(json['createdAt'] as String),
errorMessage: json['errorMessage'] as String?,
);
Map<String, dynamic> _$RemoteSessionToJson(RemoteSession instance) =>
<String, dynamic>{
'role': _$RemoteSessionRoleEnumMap[instance.role]!,
'status': _$RemoteSessionStatusEnumMap[instance.status]!,
'connectedDevice': instance.connectedDevice,
'createdAt': instance.createdAt.toIso8601String(),
'errorMessage': instance.errorMessage,
};
const _$RemoteSessionRoleEnumMap = {
RemoteSessionRole.host: 'host',
RemoteSessionRole.remote: 'remote',
};
const _$RemoteSessionStatusEnumMap = {
RemoteSessionStatus.disconnected: 'disconnected',
RemoteSessionStatus.connecting: 'connecting',
RemoteSessionStatus.connected: 'connected',
RemoteSessionStatus.reconnecting: 'reconnecting',
RemoteSessionStatus.error: 'error',
};
+29 -83
View File
@@ -1,5 +1,10 @@
// ignore_for_file: invalid_annotation_target
import 'package:freezed_annotation/freezed_annotation.dart';
import '../utils/formatters.dart';
part 'download_models.freezed.dart';
enum DownloadStatus {
queued,
downloading,
@@ -10,30 +15,21 @@ enum DownloadStatus {
partial, // Some episodes downloaded, but not all (for shows/seasons)
}
class DownloadProgress {
final String globalKey;
final DownloadStatus status;
final int progress; // 0-100
final int downloadedBytes;
final int totalBytes;
final double speed; // bytes per second
final String? errorMessage;
final String? currentFile; // What's being downloaded (video, subtitles, artwork)
@freezed
sealed class DownloadProgress with _$DownloadProgress {
const DownloadProgress._();
// Thumbnail path (populated after artwork download completes)
final String? thumbPath;
const DownloadProgress({
required this.globalKey,
required this.status,
this.progress = 0,
this.downloadedBytes = 0,
this.totalBytes = 0,
this.speed = 0,
this.errorMessage,
this.currentFile,
this.thumbPath,
});
const factory DownloadProgress({
required String globalKey,
required DownloadStatus status,
@Default(0) int progress,
@Default(0) int downloadedBytes,
@Default(0) int totalBytes,
@Default(0.0) double speed,
String? errorMessage,
String? currentFile,
String? thumbPath,
}) = _DownloadProgress;
double get progressPercent => progress / 100.0;
@@ -42,73 +38,23 @@ class DownloadProgress {
String get totalFormatted => ByteFormatter.formatBytes(totalBytes);
bool get hasArtworkPaths => thumbPath != null;
DownloadProgress copyWith({
String? globalKey,
DownloadStatus? status,
int? progress,
int? downloadedBytes,
int? totalBytes,
double? speed,
String? errorMessage,
String? currentFile,
String? thumbPath,
}) {
return DownloadProgress(
globalKey: globalKey ?? this.globalKey,
status: status ?? this.status,
progress: progress ?? this.progress,
downloadedBytes: downloadedBytes ?? this.downloadedBytes,
totalBytes: totalBytes ?? this.totalBytes,
speed: speed ?? this.speed,
errorMessage: errorMessage ?? this.errorMessage,
currentFile: currentFile ?? this.currentFile,
thumbPath: thumbPath ?? this.thumbPath,
);
}
}
class DeletionProgress {
final String globalKey;
final String itemTitle;
final int currentItem;
final int totalItems;
final String? currentOperation;
@freezed
sealed class DeletionProgress with _$DeletionProgress {
const DeletionProgress._();
const DeletionProgress({
required this.globalKey,
required this.itemTitle,
required this.currentItem,
required this.totalItems,
this.currentOperation,
});
const factory DeletionProgress({
required String globalKey,
required String itemTitle,
required int currentItem,
required int totalItems,
String? currentOperation,
}) = _DeletionProgress;
double get progressPercent => totalItems > 0 ? (currentItem / totalItems) : 0.0;
int get progressPercentInt => (progressPercent * 100).round();
bool get isComplete => currentItem >= totalItems;
DeletionProgress copyWith({
String? globalKey,
String? itemTitle,
int? currentItem,
int? totalItems,
String? currentOperation,
}) {
return DeletionProgress(
globalKey: globalKey ?? this.globalKey,
itemTitle: itemTitle ?? this.itemTitle,
currentItem: currentItem ?? this.currentItem,
totalItems: totalItems ?? this.totalItems,
currentOperation: currentOperation ?? this.currentOperation,
);
}
@override
String toString() {
return 'DeletionProgress(globalKey: $globalKey, itemTitle: $itemTitle, '
'currentItem: $currentItem, totalItems: $totalItems, '
'progressPercent: $progressPercentInt%)';
}
}
+552
View File
@@ -0,0 +1,552 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'download_models.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$DownloadProgress {
String get globalKey; DownloadStatus get status; int get progress; int get downloadedBytes; int get totalBytes; double get speed; String? get errorMessage; String? get currentFile; String? get thumbPath;
/// Create a copy of DownloadProgress
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$DownloadProgressCopyWith<DownloadProgress> get copyWith => _$DownloadProgressCopyWithImpl<DownloadProgress>(this as DownloadProgress, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DownloadProgress&&(identical(other.globalKey, globalKey) || other.globalKey == globalKey)&&(identical(other.status, status) || other.status == status)&&(identical(other.progress, progress) || other.progress == progress)&&(identical(other.downloadedBytes, downloadedBytes) || other.downloadedBytes == downloadedBytes)&&(identical(other.totalBytes, totalBytes) || other.totalBytes == totalBytes)&&(identical(other.speed, speed) || other.speed == speed)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.currentFile, currentFile) || other.currentFile == currentFile)&&(identical(other.thumbPath, thumbPath) || other.thumbPath == thumbPath));
}
@override
int get hashCode => Object.hash(runtimeType,globalKey,status,progress,downloadedBytes,totalBytes,speed,errorMessage,currentFile,thumbPath);
@override
String toString() {
return 'DownloadProgress(globalKey: $globalKey, status: $status, progress: $progress, downloadedBytes: $downloadedBytes, totalBytes: $totalBytes, speed: $speed, errorMessage: $errorMessage, currentFile: $currentFile, thumbPath: $thumbPath)';
}
}
/// @nodoc
abstract mixin class $DownloadProgressCopyWith<$Res> {
factory $DownloadProgressCopyWith(DownloadProgress value, $Res Function(DownloadProgress) _then) = _$DownloadProgressCopyWithImpl;
@useResult
$Res call({
String globalKey, DownloadStatus status, int progress, int downloadedBytes, int totalBytes, double speed, String? errorMessage, String? currentFile, String? thumbPath
});
}
/// @nodoc
class _$DownloadProgressCopyWithImpl<$Res>
implements $DownloadProgressCopyWith<$Res> {
_$DownloadProgressCopyWithImpl(this._self, this._then);
final DownloadProgress _self;
final $Res Function(DownloadProgress) _then;
/// Create a copy of DownloadProgress
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? globalKey = null,Object? status = null,Object? progress = null,Object? downloadedBytes = null,Object? totalBytes = null,Object? speed = null,Object? errorMessage = freezed,Object? currentFile = freezed,Object? thumbPath = freezed,}) {
return _then(_self.copyWith(
globalKey: null == globalKey ? _self.globalKey : globalKey // ignore: cast_nullable_to_non_nullable
as String,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as DownloadStatus,progress: null == progress ? _self.progress : progress // ignore: cast_nullable_to_non_nullable
as int,downloadedBytes: null == downloadedBytes ? _self.downloadedBytes : downloadedBytes // ignore: cast_nullable_to_non_nullable
as int,totalBytes: null == totalBytes ? _self.totalBytes : totalBytes // ignore: cast_nullable_to_non_nullable
as int,speed: null == speed ? _self.speed : speed // ignore: cast_nullable_to_non_nullable
as double,errorMessage: freezed == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String?,currentFile: freezed == currentFile ? _self.currentFile : currentFile // ignore: cast_nullable_to_non_nullable
as String?,thumbPath: freezed == thumbPath ? _self.thumbPath : thumbPath // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [DownloadProgress].
extension DownloadProgressPatterns on DownloadProgress {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _DownloadProgress value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _DownloadProgress() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _DownloadProgress value) $default,){
final _that = this;
switch (_that) {
case _DownloadProgress():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _DownloadProgress value)? $default,){
final _that = this;
switch (_that) {
case _DownloadProgress() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String globalKey, DownloadStatus status, int progress, int downloadedBytes, int totalBytes, double speed, String? errorMessage, String? currentFile, String? thumbPath)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DownloadProgress() when $default != null:
return $default(_that.globalKey,_that.status,_that.progress,_that.downloadedBytes,_that.totalBytes,_that.speed,_that.errorMessage,_that.currentFile,_that.thumbPath);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String globalKey, DownloadStatus status, int progress, int downloadedBytes, int totalBytes, double speed, String? errorMessage, String? currentFile, String? thumbPath) $default,) {final _that = this;
switch (_that) {
case _DownloadProgress():
return $default(_that.globalKey,_that.status,_that.progress,_that.downloadedBytes,_that.totalBytes,_that.speed,_that.errorMessage,_that.currentFile,_that.thumbPath);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String globalKey, DownloadStatus status, int progress, int downloadedBytes, int totalBytes, double speed, String? errorMessage, String? currentFile, String? thumbPath)? $default,) {final _that = this;
switch (_that) {
case _DownloadProgress() when $default != null:
return $default(_that.globalKey,_that.status,_that.progress,_that.downloadedBytes,_that.totalBytes,_that.speed,_that.errorMessage,_that.currentFile,_that.thumbPath);case _:
return null;
}
}
}
/// @nodoc
class _DownloadProgress extends DownloadProgress {
const _DownloadProgress({required this.globalKey, required this.status, this.progress = 0, this.downloadedBytes = 0, this.totalBytes = 0, this.speed = 0.0, this.errorMessage, this.currentFile, this.thumbPath}): super._();
@override final String globalKey;
@override final DownloadStatus status;
@override@JsonKey() final int progress;
@override@JsonKey() final int downloadedBytes;
@override@JsonKey() final int totalBytes;
@override@JsonKey() final double speed;
@override final String? errorMessage;
@override final String? currentFile;
@override final String? thumbPath;
/// Create a copy of DownloadProgress
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$DownloadProgressCopyWith<_DownloadProgress> get copyWith => __$DownloadProgressCopyWithImpl<_DownloadProgress>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DownloadProgress&&(identical(other.globalKey, globalKey) || other.globalKey == globalKey)&&(identical(other.status, status) || other.status == status)&&(identical(other.progress, progress) || other.progress == progress)&&(identical(other.downloadedBytes, downloadedBytes) || other.downloadedBytes == downloadedBytes)&&(identical(other.totalBytes, totalBytes) || other.totalBytes == totalBytes)&&(identical(other.speed, speed) || other.speed == speed)&&(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage)&&(identical(other.currentFile, currentFile) || other.currentFile == currentFile)&&(identical(other.thumbPath, thumbPath) || other.thumbPath == thumbPath));
}
@override
int get hashCode => Object.hash(runtimeType,globalKey,status,progress,downloadedBytes,totalBytes,speed,errorMessage,currentFile,thumbPath);
@override
String toString() {
return 'DownloadProgress(globalKey: $globalKey, status: $status, progress: $progress, downloadedBytes: $downloadedBytes, totalBytes: $totalBytes, speed: $speed, errorMessage: $errorMessage, currentFile: $currentFile, thumbPath: $thumbPath)';
}
}
/// @nodoc
abstract mixin class _$DownloadProgressCopyWith<$Res> implements $DownloadProgressCopyWith<$Res> {
factory _$DownloadProgressCopyWith(_DownloadProgress value, $Res Function(_DownloadProgress) _then) = __$DownloadProgressCopyWithImpl;
@override @useResult
$Res call({
String globalKey, DownloadStatus status, int progress, int downloadedBytes, int totalBytes, double speed, String? errorMessage, String? currentFile, String? thumbPath
});
}
/// @nodoc
class __$DownloadProgressCopyWithImpl<$Res>
implements _$DownloadProgressCopyWith<$Res> {
__$DownloadProgressCopyWithImpl(this._self, this._then);
final _DownloadProgress _self;
final $Res Function(_DownloadProgress) _then;
/// Create a copy of DownloadProgress
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? globalKey = null,Object? status = null,Object? progress = null,Object? downloadedBytes = null,Object? totalBytes = null,Object? speed = null,Object? errorMessage = freezed,Object? currentFile = freezed,Object? thumbPath = freezed,}) {
return _then(_DownloadProgress(
globalKey: null == globalKey ? _self.globalKey : globalKey // ignore: cast_nullable_to_non_nullable
as String,status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable
as DownloadStatus,progress: null == progress ? _self.progress : progress // ignore: cast_nullable_to_non_nullable
as int,downloadedBytes: null == downloadedBytes ? _self.downloadedBytes : downloadedBytes // ignore: cast_nullable_to_non_nullable
as int,totalBytes: null == totalBytes ? _self.totalBytes : totalBytes // ignore: cast_nullable_to_non_nullable
as int,speed: null == speed ? _self.speed : speed // ignore: cast_nullable_to_non_nullable
as double,errorMessage: freezed == errorMessage ? _self.errorMessage : errorMessage // ignore: cast_nullable_to_non_nullable
as String?,currentFile: freezed == currentFile ? _self.currentFile : currentFile // ignore: cast_nullable_to_non_nullable
as String?,thumbPath: freezed == thumbPath ? _self.thumbPath : thumbPath // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
mixin _$DeletionProgress {
String get globalKey; String get itemTitle; int get currentItem; int get totalItems; String? get currentOperation;
/// Create a copy of DeletionProgress
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$DeletionProgressCopyWith<DeletionProgress> get copyWith => _$DeletionProgressCopyWithImpl<DeletionProgress>(this as DeletionProgress, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeletionProgress&&(identical(other.globalKey, globalKey) || other.globalKey == globalKey)&&(identical(other.itemTitle, itemTitle) || other.itemTitle == itemTitle)&&(identical(other.currentItem, currentItem) || other.currentItem == currentItem)&&(identical(other.totalItems, totalItems) || other.totalItems == totalItems)&&(identical(other.currentOperation, currentOperation) || other.currentOperation == currentOperation));
}
@override
int get hashCode => Object.hash(runtimeType,globalKey,itemTitle,currentItem,totalItems,currentOperation);
@override
String toString() {
return 'DeletionProgress(globalKey: $globalKey, itemTitle: $itemTitle, currentItem: $currentItem, totalItems: $totalItems, currentOperation: $currentOperation)';
}
}
/// @nodoc
abstract mixin class $DeletionProgressCopyWith<$Res> {
factory $DeletionProgressCopyWith(DeletionProgress value, $Res Function(DeletionProgress) _then) = _$DeletionProgressCopyWithImpl;
@useResult
$Res call({
String globalKey, String itemTitle, int currentItem, int totalItems, String? currentOperation
});
}
/// @nodoc
class _$DeletionProgressCopyWithImpl<$Res>
implements $DeletionProgressCopyWith<$Res> {
_$DeletionProgressCopyWithImpl(this._self, this._then);
final DeletionProgress _self;
final $Res Function(DeletionProgress) _then;
/// Create a copy of DeletionProgress
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? globalKey = null,Object? itemTitle = null,Object? currentItem = null,Object? totalItems = null,Object? currentOperation = freezed,}) {
return _then(_self.copyWith(
globalKey: null == globalKey ? _self.globalKey : globalKey // ignore: cast_nullable_to_non_nullable
as String,itemTitle: null == itemTitle ? _self.itemTitle : itemTitle // ignore: cast_nullable_to_non_nullable
as String,currentItem: null == currentItem ? _self.currentItem : currentItem // ignore: cast_nullable_to_non_nullable
as int,totalItems: null == totalItems ? _self.totalItems : totalItems // ignore: cast_nullable_to_non_nullable
as int,currentOperation: freezed == currentOperation ? _self.currentOperation : currentOperation // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [DeletionProgress].
extension DeletionProgressPatterns on DeletionProgress {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _DeletionProgress value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _DeletionProgress() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _DeletionProgress value) $default,){
final _that = this;
switch (_that) {
case _DeletionProgress():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _DeletionProgress value)? $default,){
final _that = this;
switch (_that) {
case _DeletionProgress() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String globalKey, String itemTitle, int currentItem, int totalItems, String? currentOperation)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DeletionProgress() when $default != null:
return $default(_that.globalKey,_that.itemTitle,_that.currentItem,_that.totalItems,_that.currentOperation);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String globalKey, String itemTitle, int currentItem, int totalItems, String? currentOperation) $default,) {final _that = this;
switch (_that) {
case _DeletionProgress():
return $default(_that.globalKey,_that.itemTitle,_that.currentItem,_that.totalItems,_that.currentOperation);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String globalKey, String itemTitle, int currentItem, int totalItems, String? currentOperation)? $default,) {final _that = this;
switch (_that) {
case _DeletionProgress() when $default != null:
return $default(_that.globalKey,_that.itemTitle,_that.currentItem,_that.totalItems,_that.currentOperation);case _:
return null;
}
}
}
/// @nodoc
class _DeletionProgress extends DeletionProgress {
const _DeletionProgress({required this.globalKey, required this.itemTitle, required this.currentItem, required this.totalItems, this.currentOperation}): super._();
@override final String globalKey;
@override final String itemTitle;
@override final int currentItem;
@override final int totalItems;
@override final String? currentOperation;
/// Create a copy of DeletionProgress
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$DeletionProgressCopyWith<_DeletionProgress> get copyWith => __$DeletionProgressCopyWithImpl<_DeletionProgress>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeletionProgress&&(identical(other.globalKey, globalKey) || other.globalKey == globalKey)&&(identical(other.itemTitle, itemTitle) || other.itemTitle == itemTitle)&&(identical(other.currentItem, currentItem) || other.currentItem == currentItem)&&(identical(other.totalItems, totalItems) || other.totalItems == totalItems)&&(identical(other.currentOperation, currentOperation) || other.currentOperation == currentOperation));
}
@override
int get hashCode => Object.hash(runtimeType,globalKey,itemTitle,currentItem,totalItems,currentOperation);
@override
String toString() {
return 'DeletionProgress(globalKey: $globalKey, itemTitle: $itemTitle, currentItem: $currentItem, totalItems: $totalItems, currentOperation: $currentOperation)';
}
}
/// @nodoc
abstract mixin class _$DeletionProgressCopyWith<$Res> implements $DeletionProgressCopyWith<$Res> {
factory _$DeletionProgressCopyWith(_DeletionProgress value, $Res Function(_DeletionProgress) _then) = __$DeletionProgressCopyWithImpl;
@override @useResult
$Res call({
String globalKey, String itemTitle, int currentItem, int totalItems, String? currentOperation
});
}
/// @nodoc
class __$DeletionProgressCopyWithImpl<$Res>
implements _$DeletionProgressCopyWith<$Res> {
__$DeletionProgressCopyWithImpl(this._self, this._then);
final _DeletionProgress _self;
final $Res Function(_DeletionProgress) _then;
/// Create a copy of DeletionProgress
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? globalKey = null,Object? itemTitle = null,Object? currentItem = null,Object? totalItems = null,Object? currentOperation = freezed,}) {
return _then(_DeletionProgress(
globalKey: null == globalKey ? _self.globalKey : globalKey // ignore: cast_nullable_to_non_nullable
as String,itemTitle: null == itemTitle ? _self.itemTitle : itemTitle // ignore: cast_nullable_to_non_nullable
as String,currentItem: null == currentItem ? _self.currentItem : currentItem // ignore: cast_nullable_to_non_nullable
as int,totalItems: null == totalItems ? _self.totalItems : totalItems // ignore: cast_nullable_to_non_nullable
as int,currentOperation: freezed == currentOperation ? _self.currentOperation : currentOperation // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on
+20
View File
@@ -31,6 +31,21 @@ String favoriteChannelKey(String source, String id) => '$source\u0000$id';
String liveTvChannelScopeKey(LiveTvChannel channel) =>
'${channel.serverId ?? ''}\u0000${channel.liveDvrKey ?? ''}\u0000${channel.key}';
List<LiveTvChannel> filterLiveTvChannelsForFavorites({
required List<LiveTvChannel> channels,
required bool favoritesOnly,
required Iterable<FavoriteChannel> favorites,
required String Function(LiveTvChannel channel) sourceForChannel,
}) {
if (!favoritesOnly || favorites.isEmpty) return channels;
final channelMap = {
for (final channel in channels) favoriteChannelKey(sourceForChannel(channel), channel.key): channel,
};
return [for (final favorite in favorites) ?channelMap[favorite.stableKey]];
}
@JsonSerializable(createToJson: false)
class LiveTvChannel with MultiServerFields {
@JsonKey(readValue: _readChannelKey)
@@ -60,6 +75,8 @@ class LiveTvChannel with MultiServerFields {
@JsonKey(includeFromJson: false, includeToJson: false)
final String? liveDvrKey;
@JsonKey(includeFromJson: false, includeToJson: false)
final String? liveTvSourceTitle;
@JsonKey(includeFromJson: false, includeToJson: false)
final String? favoriteSource;
@JsonKey(includeFromJson: false, includeToJson: false)
final String? favoriteStoreKey;
@@ -79,6 +96,7 @@ class LiveTvChannel with MultiServerFields {
this.serverId,
this.serverName,
this.liveDvrKey,
this.liveTvSourceTitle,
this.favoriteSource,
this.favoriteStoreKey,
});
@@ -89,6 +107,7 @@ class LiveTvChannel with MultiServerFields {
String? serverId,
String? serverName,
String? liveDvrKey,
String? liveTvSourceTitle,
String? favoriteSource,
String? favoriteStoreKey,
}) {
@@ -107,6 +126,7 @@ class LiveTvChannel with MultiServerFields {
serverId: serverId ?? this.serverId,
serverName: serverName ?? this.serverName,
liveDvrKey: liveDvrKey ?? this.liveDvrKey,
liveTvSourceTitle: liveTvSourceTitle ?? this.liveTvSourceTitle,
favoriteSource: favoriteSource ?? this.favoriteSource,
favoriteStoreKey: favoriteStoreKey ?? this.favoriteStoreKey,
);
+1 -1
View File
@@ -27,5 +27,5 @@ Map<String, dynamic> _$PlexHomeToJson(PlexHome instance) => <String, dynamic>{
'guestUserUUID': instance.guestUserUUID,
'guestEnabled': instance.guestEnabled,
'subscription': instance.subscription,
'users': instance.users,
'users': instance.users.map((e) => e.toJson()).toList(),
};
+27 -63
View File
@@ -1,3 +1,9 @@
// ignore_for_file: invalid_annotation_target
import 'package:freezed_annotation/freezed_annotation.dart';
part 'shader_preset.freezed.dart';
part 'shader_preset.g.dart';
enum ShaderPresetType { none, nvscaler, artcnn, anime4k, custom }
/// ArtCNN real-time model sizes.
@@ -51,76 +57,34 @@ enum Anime4KMode {
modeCA,
}
class Anime4KConfig {
final Anime4KQuality quality;
final Anime4KMode mode;
@freezed
sealed class Anime4KConfig with _$Anime4KConfig {
const factory Anime4KConfig({
@JsonKey(unknownEnumValue: Anime4KQuality.fast) required Anime4KQuality quality,
@JsonKey(unknownEnumValue: Anime4KMode.modeA) required Anime4KMode mode,
}) = _Anime4KConfig;
const Anime4KConfig({required this.quality, required this.mode});
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is Anime4KConfig && other.quality == quality && other.mode == mode;
}
@override
int get hashCode => quality.hashCode ^ mode.hashCode;
Map<String, dynamic> toJson() => {'quality': quality.name, 'mode': mode.name};
factory Anime4KConfig.fromJson(Map<String, dynamic> json) {
return Anime4KConfig(
quality: Anime4KQuality.values.asNameMap()[json['quality']] ?? Anime4KQuality.fast,
mode: Anime4KMode.values.asNameMap()[json['mode']] ?? Anime4KMode.modeA,
);
}
factory Anime4KConfig.fromJson(Map<String, dynamic> json) => _$Anime4KConfigFromJson(json);
}
class ArtCNNConfig {
final ArtCNNModel model;
final ArtCNNVariant variant;
@freezed
sealed class ArtCNNConfig with _$ArtCNNConfig {
const factory ArtCNNConfig({
@JsonKey(unknownEnumValue: ArtCNNModel.c4f16) required ArtCNNModel model,
@JsonKey(unknownEnumValue: ArtCNNVariant.neutral) required ArtCNNVariant variant,
}) = _ArtCNNConfig;
const ArtCNNConfig({required this.model, required this.variant});
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is ArtCNNConfig && other.model == model && other.variant == variant;
}
@override
int get hashCode => model.hashCode ^ variant.hashCode;
Map<String, dynamic> toJson() => {'model': model.name, 'variant': variant.name};
factory ArtCNNConfig.fromJson(Map<String, dynamic> json) {
return ArtCNNConfig(
model: ArtCNNModel.values.asNameMap()[json['model']] ?? ArtCNNModel.c4f16,
variant: ArtCNNVariant.values.asNameMap()[json['variant']] ?? ArtCNNVariant.neutral,
);
}
factory ArtCNNConfig.fromJson(Map<String, dynamic> json) => _$ArtCNNConfigFromJson(json);
}
class NVScalerConfig {
/// Whether to automatically skip NVScaler on HDR content
final bool autoHdrSkip;
@freezed
sealed class NVScalerConfig with _$NVScalerConfig {
const factory NVScalerConfig({
/// Whether to automatically skip NVScaler on HDR content
@Default(true) bool autoHdrSkip,
}) = _NVScalerConfig;
const NVScalerConfig({this.autoHdrSkip = true});
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is NVScalerConfig && other.autoHdrSkip == autoHdrSkip;
}
@override
int get hashCode => autoHdrSkip.hashCode;
Map<String, dynamic> toJson() => {'autoHdrSkip': autoHdrSkip};
factory NVScalerConfig.fromJson(Map<String, dynamic> json) {
return NVScalerConfig(autoHdrSkip: json['autoHdrSkip'] as bool? ?? true);
}
factory NVScalerConfig.fromJson(Map<String, dynamic> json) => _$NVScalerConfigFromJson(json);
}
class ShaderPreset {
+793
View File
@@ -0,0 +1,793 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'shader_preset.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$Anime4KConfig {
@JsonKey(unknownEnumValue: Anime4KQuality.fast) Anime4KQuality get quality;@JsonKey(unknownEnumValue: Anime4KMode.modeA) Anime4KMode get mode;
/// Create a copy of Anime4KConfig
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$Anime4KConfigCopyWith<Anime4KConfig> get copyWith => _$Anime4KConfigCopyWithImpl<Anime4KConfig>(this as Anime4KConfig, _$identity);
/// Serializes this Anime4KConfig to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is Anime4KConfig&&(identical(other.quality, quality) || other.quality == quality)&&(identical(other.mode, mode) || other.mode == mode));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,quality,mode);
@override
String toString() {
return 'Anime4KConfig(quality: $quality, mode: $mode)';
}
}
/// @nodoc
abstract mixin class $Anime4KConfigCopyWith<$Res> {
factory $Anime4KConfigCopyWith(Anime4KConfig value, $Res Function(Anime4KConfig) _then) = _$Anime4KConfigCopyWithImpl;
@useResult
$Res call({
@JsonKey(unknownEnumValue: Anime4KQuality.fast) Anime4KQuality quality,@JsonKey(unknownEnumValue: Anime4KMode.modeA) Anime4KMode mode
});
}
/// @nodoc
class _$Anime4KConfigCopyWithImpl<$Res>
implements $Anime4KConfigCopyWith<$Res> {
_$Anime4KConfigCopyWithImpl(this._self, this._then);
final Anime4KConfig _self;
final $Res Function(Anime4KConfig) _then;
/// Create a copy of Anime4KConfig
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? quality = null,Object? mode = null,}) {
return _then(_self.copyWith(
quality: null == quality ? _self.quality : quality // ignore: cast_nullable_to_non_nullable
as Anime4KQuality,mode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable
as Anime4KMode,
));
}
}
/// Adds pattern-matching-related methods to [Anime4KConfig].
extension Anime4KConfigPatterns on Anime4KConfig {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Anime4KConfig value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Anime4KConfig() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Anime4KConfig value) $default,){
final _that = this;
switch (_that) {
case _Anime4KConfig():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Anime4KConfig value)? $default,){
final _that = this;
switch (_that) {
case _Anime4KConfig() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(unknownEnumValue: Anime4KQuality.fast) Anime4KQuality quality, @JsonKey(unknownEnumValue: Anime4KMode.modeA) Anime4KMode mode)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Anime4KConfig() when $default != null:
return $default(_that.quality,_that.mode);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(unknownEnumValue: Anime4KQuality.fast) Anime4KQuality quality, @JsonKey(unknownEnumValue: Anime4KMode.modeA) Anime4KMode mode) $default,) {final _that = this;
switch (_that) {
case _Anime4KConfig():
return $default(_that.quality,_that.mode);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(unknownEnumValue: Anime4KQuality.fast) Anime4KQuality quality, @JsonKey(unknownEnumValue: Anime4KMode.modeA) Anime4KMode mode)? $default,) {final _that = this;
switch (_that) {
case _Anime4KConfig() when $default != null:
return $default(_that.quality,_that.mode);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _Anime4KConfig implements Anime4KConfig {
const _Anime4KConfig({@JsonKey(unknownEnumValue: Anime4KQuality.fast) required this.quality, @JsonKey(unknownEnumValue: Anime4KMode.modeA) required this.mode});
factory _Anime4KConfig.fromJson(Map<String, dynamic> json) => _$Anime4KConfigFromJson(json);
@override@JsonKey(unknownEnumValue: Anime4KQuality.fast) final Anime4KQuality quality;
@override@JsonKey(unknownEnumValue: Anime4KMode.modeA) final Anime4KMode mode;
/// Create a copy of Anime4KConfig
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$Anime4KConfigCopyWith<_Anime4KConfig> get copyWith => __$Anime4KConfigCopyWithImpl<_Anime4KConfig>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$Anime4KConfigToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Anime4KConfig&&(identical(other.quality, quality) || other.quality == quality)&&(identical(other.mode, mode) || other.mode == mode));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,quality,mode);
@override
String toString() {
return 'Anime4KConfig(quality: $quality, mode: $mode)';
}
}
/// @nodoc
abstract mixin class _$Anime4KConfigCopyWith<$Res> implements $Anime4KConfigCopyWith<$Res> {
factory _$Anime4KConfigCopyWith(_Anime4KConfig value, $Res Function(_Anime4KConfig) _then) = __$Anime4KConfigCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(unknownEnumValue: Anime4KQuality.fast) Anime4KQuality quality,@JsonKey(unknownEnumValue: Anime4KMode.modeA) Anime4KMode mode
});
}
/// @nodoc
class __$Anime4KConfigCopyWithImpl<$Res>
implements _$Anime4KConfigCopyWith<$Res> {
__$Anime4KConfigCopyWithImpl(this._self, this._then);
final _Anime4KConfig _self;
final $Res Function(_Anime4KConfig) _then;
/// Create a copy of Anime4KConfig
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? quality = null,Object? mode = null,}) {
return _then(_Anime4KConfig(
quality: null == quality ? _self.quality : quality // ignore: cast_nullable_to_non_nullable
as Anime4KQuality,mode: null == mode ? _self.mode : mode // ignore: cast_nullable_to_non_nullable
as Anime4KMode,
));
}
}
/// @nodoc
mixin _$ArtCNNConfig {
@JsonKey(unknownEnumValue: ArtCNNModel.c4f16) ArtCNNModel get model;@JsonKey(unknownEnumValue: ArtCNNVariant.neutral) ArtCNNVariant get variant;
/// Create a copy of ArtCNNConfig
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ArtCNNConfigCopyWith<ArtCNNConfig> get copyWith => _$ArtCNNConfigCopyWithImpl<ArtCNNConfig>(this as ArtCNNConfig, _$identity);
/// Serializes this ArtCNNConfig to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ArtCNNConfig&&(identical(other.model, model) || other.model == model)&&(identical(other.variant, variant) || other.variant == variant));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,model,variant);
@override
String toString() {
return 'ArtCNNConfig(model: $model, variant: $variant)';
}
}
/// @nodoc
abstract mixin class $ArtCNNConfigCopyWith<$Res> {
factory $ArtCNNConfigCopyWith(ArtCNNConfig value, $Res Function(ArtCNNConfig) _then) = _$ArtCNNConfigCopyWithImpl;
@useResult
$Res call({
@JsonKey(unknownEnumValue: ArtCNNModel.c4f16) ArtCNNModel model,@JsonKey(unknownEnumValue: ArtCNNVariant.neutral) ArtCNNVariant variant
});
}
/// @nodoc
class _$ArtCNNConfigCopyWithImpl<$Res>
implements $ArtCNNConfigCopyWith<$Res> {
_$ArtCNNConfigCopyWithImpl(this._self, this._then);
final ArtCNNConfig _self;
final $Res Function(ArtCNNConfig) _then;
/// Create a copy of ArtCNNConfig
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? model = null,Object? variant = null,}) {
return _then(_self.copyWith(
model: null == model ? _self.model : model // ignore: cast_nullable_to_non_nullable
as ArtCNNModel,variant: null == variant ? _self.variant : variant // ignore: cast_nullable_to_non_nullable
as ArtCNNVariant,
));
}
}
/// Adds pattern-matching-related methods to [ArtCNNConfig].
extension ArtCNNConfigPatterns on ArtCNNConfig {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ArtCNNConfig value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ArtCNNConfig() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ArtCNNConfig value) $default,){
final _that = this;
switch (_that) {
case _ArtCNNConfig():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ArtCNNConfig value)? $default,){
final _that = this;
switch (_that) {
case _ArtCNNConfig() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function(@JsonKey(unknownEnumValue: ArtCNNModel.c4f16) ArtCNNModel model, @JsonKey(unknownEnumValue: ArtCNNVariant.neutral) ArtCNNVariant variant)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ArtCNNConfig() when $default != null:
return $default(_that.model,_that.variant);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function(@JsonKey(unknownEnumValue: ArtCNNModel.c4f16) ArtCNNModel model, @JsonKey(unknownEnumValue: ArtCNNVariant.neutral) ArtCNNVariant variant) $default,) {final _that = this;
switch (_that) {
case _ArtCNNConfig():
return $default(_that.model,_that.variant);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function(@JsonKey(unknownEnumValue: ArtCNNModel.c4f16) ArtCNNModel model, @JsonKey(unknownEnumValue: ArtCNNVariant.neutral) ArtCNNVariant variant)? $default,) {final _that = this;
switch (_that) {
case _ArtCNNConfig() when $default != null:
return $default(_that.model,_that.variant);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _ArtCNNConfig implements ArtCNNConfig {
const _ArtCNNConfig({@JsonKey(unknownEnumValue: ArtCNNModel.c4f16) required this.model, @JsonKey(unknownEnumValue: ArtCNNVariant.neutral) required this.variant});
factory _ArtCNNConfig.fromJson(Map<String, dynamic> json) => _$ArtCNNConfigFromJson(json);
@override@JsonKey(unknownEnumValue: ArtCNNModel.c4f16) final ArtCNNModel model;
@override@JsonKey(unknownEnumValue: ArtCNNVariant.neutral) final ArtCNNVariant variant;
/// Create a copy of ArtCNNConfig
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ArtCNNConfigCopyWith<_ArtCNNConfig> get copyWith => __$ArtCNNConfigCopyWithImpl<_ArtCNNConfig>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$ArtCNNConfigToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ArtCNNConfig&&(identical(other.model, model) || other.model == model)&&(identical(other.variant, variant) || other.variant == variant));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,model,variant);
@override
String toString() {
return 'ArtCNNConfig(model: $model, variant: $variant)';
}
}
/// @nodoc
abstract mixin class _$ArtCNNConfigCopyWith<$Res> implements $ArtCNNConfigCopyWith<$Res> {
factory _$ArtCNNConfigCopyWith(_ArtCNNConfig value, $Res Function(_ArtCNNConfig) _then) = __$ArtCNNConfigCopyWithImpl;
@override @useResult
$Res call({
@JsonKey(unknownEnumValue: ArtCNNModel.c4f16) ArtCNNModel model,@JsonKey(unknownEnumValue: ArtCNNVariant.neutral) ArtCNNVariant variant
});
}
/// @nodoc
class __$ArtCNNConfigCopyWithImpl<$Res>
implements _$ArtCNNConfigCopyWith<$Res> {
__$ArtCNNConfigCopyWithImpl(this._self, this._then);
final _ArtCNNConfig _self;
final $Res Function(_ArtCNNConfig) _then;
/// Create a copy of ArtCNNConfig
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? model = null,Object? variant = null,}) {
return _then(_ArtCNNConfig(
model: null == model ? _self.model : model // ignore: cast_nullable_to_non_nullable
as ArtCNNModel,variant: null == variant ? _self.variant : variant // ignore: cast_nullable_to_non_nullable
as ArtCNNVariant,
));
}
}
/// @nodoc
mixin _$NVScalerConfig {
/// Whether to automatically skip NVScaler on HDR content
bool get autoHdrSkip;
/// Create a copy of NVScalerConfig
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$NVScalerConfigCopyWith<NVScalerConfig> get copyWith => _$NVScalerConfigCopyWithImpl<NVScalerConfig>(this as NVScalerConfig, _$identity);
/// Serializes this NVScalerConfig to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is NVScalerConfig&&(identical(other.autoHdrSkip, autoHdrSkip) || other.autoHdrSkip == autoHdrSkip));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,autoHdrSkip);
@override
String toString() {
return 'NVScalerConfig(autoHdrSkip: $autoHdrSkip)';
}
}
/// @nodoc
abstract mixin class $NVScalerConfigCopyWith<$Res> {
factory $NVScalerConfigCopyWith(NVScalerConfig value, $Res Function(NVScalerConfig) _then) = _$NVScalerConfigCopyWithImpl;
@useResult
$Res call({
bool autoHdrSkip
});
}
/// @nodoc
class _$NVScalerConfigCopyWithImpl<$Res>
implements $NVScalerConfigCopyWith<$Res> {
_$NVScalerConfigCopyWithImpl(this._self, this._then);
final NVScalerConfig _self;
final $Res Function(NVScalerConfig) _then;
/// Create a copy of NVScalerConfig
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? autoHdrSkip = null,}) {
return _then(_self.copyWith(
autoHdrSkip: null == autoHdrSkip ? _self.autoHdrSkip : autoHdrSkip // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// Adds pattern-matching-related methods to [NVScalerConfig].
extension NVScalerConfigPatterns on NVScalerConfig {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _NVScalerConfig value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _NVScalerConfig() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _NVScalerConfig value) $default,){
final _that = this;
switch (_that) {
case _NVScalerConfig():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _NVScalerConfig value)? $default,){
final _that = this;
switch (_that) {
case _NVScalerConfig() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool autoHdrSkip)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _NVScalerConfig() when $default != null:
return $default(_that.autoHdrSkip);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool autoHdrSkip) $default,) {final _that = this;
switch (_that) {
case _NVScalerConfig():
return $default(_that.autoHdrSkip);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool autoHdrSkip)? $default,) {final _that = this;
switch (_that) {
case _NVScalerConfig() when $default != null:
return $default(_that.autoHdrSkip);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _NVScalerConfig implements NVScalerConfig {
const _NVScalerConfig({this.autoHdrSkip = true});
factory _NVScalerConfig.fromJson(Map<String, dynamic> json) => _$NVScalerConfigFromJson(json);
/// Whether to automatically skip NVScaler on HDR content
@override@JsonKey() final bool autoHdrSkip;
/// Create a copy of NVScalerConfig
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$NVScalerConfigCopyWith<_NVScalerConfig> get copyWith => __$NVScalerConfigCopyWithImpl<_NVScalerConfig>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$NVScalerConfigToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _NVScalerConfig&&(identical(other.autoHdrSkip, autoHdrSkip) || other.autoHdrSkip == autoHdrSkip));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,autoHdrSkip);
@override
String toString() {
return 'NVScalerConfig(autoHdrSkip: $autoHdrSkip)';
}
}
/// @nodoc
abstract mixin class _$NVScalerConfigCopyWith<$Res> implements $NVScalerConfigCopyWith<$Res> {
factory _$NVScalerConfigCopyWith(_NVScalerConfig value, $Res Function(_NVScalerConfig) _then) = __$NVScalerConfigCopyWithImpl;
@override @useResult
$Res call({
bool autoHdrSkip
});
}
/// @nodoc
class __$NVScalerConfigCopyWithImpl<$Res>
implements _$NVScalerConfigCopyWith<$Res> {
__$NVScalerConfigCopyWithImpl(this._self, this._then);
final _NVScalerConfig _self;
final $Res Function(_NVScalerConfig) _then;
/// Create a copy of NVScalerConfig
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? autoHdrSkip = null,}) {
return _then(_NVScalerConfig(
autoHdrSkip: null == autoHdrSkip ? _self.autoHdrSkip : autoHdrSkip // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
// dart format on
+78
View File
@@ -0,0 +1,78 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'shader_preset.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_Anime4KConfig _$Anime4KConfigFromJson(Map<String, dynamic> json) =>
_Anime4KConfig(
quality: $enumDecode(
_$Anime4KQualityEnumMap,
json['quality'],
unknownValue: Anime4KQuality.fast,
),
mode: $enumDecode(
_$Anime4KModeEnumMap,
json['mode'],
unknownValue: Anime4KMode.modeA,
),
);
Map<String, dynamic> _$Anime4KConfigToJson(_Anime4KConfig instance) =>
<String, dynamic>{
'quality': _$Anime4KQualityEnumMap[instance.quality]!,
'mode': _$Anime4KModeEnumMap[instance.mode]!,
};
const _$Anime4KQualityEnumMap = {
Anime4KQuality.fast: 'fast',
Anime4KQuality.hq: 'hq',
};
const _$Anime4KModeEnumMap = {
Anime4KMode.modeA: 'modeA',
Anime4KMode.modeB: 'modeB',
Anime4KMode.modeC: 'modeC',
Anime4KMode.modeAA: 'modeAA',
Anime4KMode.modeBB: 'modeBB',
Anime4KMode.modeCA: 'modeCA',
};
_ArtCNNConfig _$ArtCNNConfigFromJson(Map<String, dynamic> json) =>
_ArtCNNConfig(
model: $enumDecode(
_$ArtCNNModelEnumMap,
json['model'],
unknownValue: ArtCNNModel.c4f16,
),
variant: $enumDecode(
_$ArtCNNVariantEnumMap,
json['variant'],
unknownValue: ArtCNNVariant.neutral,
),
);
Map<String, dynamic> _$ArtCNNConfigToJson(_ArtCNNConfig instance) =>
<String, dynamic>{
'model': _$ArtCNNModelEnumMap[instance.model]!,
'variant': _$ArtCNNVariantEnumMap[instance.variant]!,
};
const _$ArtCNNModelEnumMap = {
ArtCNNModel.c4f16: 'c4f16',
ArtCNNModel.c4f32: 'c4f32',
};
const _$ArtCNNVariantEnumMap = {
ArtCNNVariant.neutral: 'neutral',
ArtCNNVariant.denoise: 'denoise',
ArtCNNVariant.denoiseSharpen: 'denoiseSharpen',
};
_NVScalerConfig _$NVScalerConfigFromJson(Map<String, dynamic> json) =>
_NVScalerConfig(autoHdrSkip: json['autoHdrSkip'] as bool? ?? true);
Map<String, dynamic> _$NVScalerConfigToJson(_NVScalerConfig instance) =>
<String, dynamic>{'autoHdrSkip': instance.autoHdrSkip};
@@ -0,0 +1,186 @@
enum AnimeListProvider { tvdb, tmdb }
enum AnimeListMatchKind { explicit, range, defaultMapping }
class AnimeListSeasonRef {
final int? number;
final bool isAbsolute;
const AnimeListSeasonRef.number(this.number) : isAbsolute = false;
const AnimeListSeasonRef.absolute() : number = null, isAbsolute = true;
}
class AnimeListEntry {
final int anidbId;
final String? name;
final String? rawTvdbId;
final int? tvdbId;
final AnimeListSeasonRef? defaultTvdbSeason;
final int episodeOffset;
final int? tmdbTvId;
final AnimeListSeasonRef? tmdbSeason;
final int tmdbOffset;
final List<int> tmdbMovieIds;
final List<String> imdbIds;
final List<AnimeListEpisodeMapping> mappings;
const AnimeListEntry({
required this.anidbId,
this.name,
this.rawTvdbId,
this.tvdbId,
this.defaultTvdbSeason,
this.episodeOffset = 0,
this.tmdbTvId,
this.tmdbSeason,
this.tmdbOffset = 0,
this.tmdbMovieIds = const [],
this.imdbIds = const [],
this.mappings = const [],
});
List<AnimeEpisodeMatch> resolveEpisode({
required AnimeListProvider provider,
required int externalSeason,
required int externalEpisode,
}) {
final explicit = <AnimeEpisodeMatch>[];
for (final mapping in mappings) {
if (!mapping.matchesProviderSeason(provider, externalSeason)) continue;
for (final item in mapping.explicit) {
if (item.externalEpisodes.contains(externalEpisode)) {
explicit.add(
AnimeEpisodeMatch(
anidbId: anidbId,
anidbSeason: mapping.anidbSeason,
anidbEpisode: item.anidbEpisode,
provider: provider,
externalSeason: externalSeason,
externalEpisode: externalEpisode,
kind: AnimeListMatchKind.explicit,
),
);
}
}
}
if (explicit.isNotEmpty) return explicit;
final ranges = <AnimeEpisodeMatch>[];
for (final mapping in mappings) {
if (!mapping.matchesProviderSeason(provider, externalSeason)) continue;
final start = mapping.start;
if (start == null) continue;
final anidbEpisode = externalEpisode - mapping.offset;
if (anidbEpisode < start) continue;
final end = mapping.end;
if (end != null && anidbEpisode > end) continue;
if (anidbEpisode <= 0) continue;
ranges.add(
AnimeEpisodeMatch(
anidbId: anidbId,
anidbSeason: mapping.anidbSeason,
anidbEpisode: anidbEpisode,
provider: provider,
externalSeason: externalSeason,
externalEpisode: externalEpisode,
kind: AnimeListMatchKind.range,
rangeStart: start,
rangeEnd: end,
),
);
}
if (ranges.isNotEmpty) return ranges;
final defaultSeason = switch (provider) {
AnimeListProvider.tvdb => defaultTvdbSeason,
AnimeListProvider.tmdb => tmdbSeason,
};
final defaultOffset = switch (provider) {
AnimeListProvider.tvdb => episodeOffset,
AnimeListProvider.tmdb => tmdbOffset,
};
if (defaultSeason == null || defaultSeason.isAbsolute || defaultSeason.number != externalSeason) return const [];
final anidbEpisode = externalEpisode - defaultOffset;
if (anidbEpisode <= 0) return const [];
return [
AnimeEpisodeMatch(
anidbId: anidbId,
anidbSeason: 1,
anidbEpisode: anidbEpisode,
provider: provider,
externalSeason: externalSeason,
externalEpisode: externalEpisode,
kind: AnimeListMatchKind.defaultMapping,
),
];
}
bool mapsSeason({required AnimeListProvider provider, required int externalSeason}) {
final defaultSeason = switch (provider) {
AnimeListProvider.tvdb => defaultTvdbSeason,
AnimeListProvider.tmdb => tmdbSeason,
};
if (defaultSeason != null && !defaultSeason.isAbsolute && defaultSeason.number == externalSeason) return true;
return mappings.any((mapping) => mapping.matchesProviderSeason(provider, externalSeason));
}
}
class AnimeListEpisodeMapping {
final int anidbSeason;
final AnimeListProvider provider;
final int externalSeason;
final int? start;
final int? end;
final int offset;
final List<AnimeListExplicitEpisodeMapping> explicit;
const AnimeListEpisodeMapping({
required this.anidbSeason,
required this.provider,
required this.externalSeason,
this.start,
this.end,
this.offset = 0,
this.explicit = const [],
});
bool matchesProviderSeason(AnimeListProvider provider, int season) =>
this.provider == provider && externalSeason == season;
}
class AnimeListExplicitEpisodeMapping {
final int anidbEpisode;
final List<int> externalEpisodes;
const AnimeListExplicitEpisodeMapping({required this.anidbEpisode, required this.externalEpisodes});
}
class AnimeEpisodeMatch {
final int anidbId;
final int anidbSeason;
final int anidbEpisode;
final AnimeListProvider provider;
final int externalSeason;
final int externalEpisode;
final AnimeListMatchKind kind;
final int? rangeStart;
final int? rangeEnd;
const AnimeEpisodeMatch({
required this.anidbId,
required this.anidbSeason,
required this.anidbEpisode,
required this.provider,
required this.externalSeason,
required this.externalEpisode,
required this.kind,
this.rangeStart,
this.rangeEnd,
});
bool sameAnimeEntry(AnimeEpisodeMatch other) => anidbId == other.anidbId && anidbSeason == other.anidbSeason;
bool sameEpisode(AnimeEpisodeMatch other) =>
sameAnimeEntry(other) && anidbEpisode == other.anidbEpisode && kind == other.kind;
}
+23 -42
View File
@@ -1,52 +1,33 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'device_code.freezed.dart';
/// Result of requesting a device code from an RFC 8628 authorization server.
///
/// The user enters [userCode] at [verificationUrl]; the app polls the token
/// endpoint with [deviceCode] every [interval] seconds until [expiresIn]
/// seconds elapse.
class DeviceCode {
final String deviceCode;
final String userCode;
final String verificationUrl;
@freezed
sealed class DeviceCode with _$DeviceCode {
const factory DeviceCode({
required String deviceCode,
required String userCode,
required String verificationUrl,
required int expiresIn,
required int interval,
/// URL with the code pre-filled (e.g. `https://trakt.tv/activate/ABC12345`)
/// when the provider supports it. Nullable — Simkl doesn't.
final String? verificationUrlComplete;
final int expiresIn;
final int interval;
const DeviceCode({
required this.deviceCode,
required this.userCode,
required this.verificationUrl,
required this.expiresIn,
required this.interval,
this.verificationUrlComplete,
});
/// URL with the code pre-filled (e.g. `https://trakt.tv/activate/ABC12345`)
/// when the provider supports it. Nullable — Simkl doesn't.
String? verificationUrlComplete,
}) = _DeviceCode;
}
/// Discriminated event emitted by a device-code poll loop.
sealed class DevicePollEvent {
const DevicePollEvent();
}
class DevicePollPending extends DevicePollEvent {
const DevicePollPending();
}
class DevicePollSlowDown extends DevicePollEvent {
const DevicePollSlowDown();
}
class DevicePollDenied extends DevicePollEvent {
const DevicePollDenied();
}
class DevicePollExpired extends DevicePollEvent {
const DevicePollExpired();
}
class DevicePollSuccess extends DevicePollEvent {
final Map<String, dynamic> tokenResponse;
const DevicePollSuccess(this.tokenResponse);
@freezed
sealed class DevicePollEvent with _$DevicePollEvent {
const factory DevicePollEvent.pending() = DevicePollPending;
const factory DevicePollEvent.slowDown() = DevicePollSlowDown;
const factory DevicePollEvent.denied() = DevicePollDenied;
const factory DevicePollEvent.expired() = DevicePollExpired;
const factory DevicePollEvent.success(Map<String, dynamic> tokenResponse) = DevicePollSuccess;
}
@@ -0,0 +1,718 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'device_code.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$DeviceCode {
String get deviceCode; String get userCode; String get verificationUrl; int get expiresIn; int get interval;/// URL with the code pre-filled (e.g. `https://trakt.tv/activate/ABC12345`)
/// when the provider supports it. Nullable — Simkl doesn't.
String? get verificationUrlComplete;
/// Create a copy of DeviceCode
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$DeviceCodeCopyWith<DeviceCode> get copyWith => _$DeviceCodeCopyWithImpl<DeviceCode>(this as DeviceCode, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DeviceCode&&(identical(other.deviceCode, deviceCode) || other.deviceCode == deviceCode)&&(identical(other.userCode, userCode) || other.userCode == userCode)&&(identical(other.verificationUrl, verificationUrl) || other.verificationUrl == verificationUrl)&&(identical(other.expiresIn, expiresIn) || other.expiresIn == expiresIn)&&(identical(other.interval, interval) || other.interval == interval)&&(identical(other.verificationUrlComplete, verificationUrlComplete) || other.verificationUrlComplete == verificationUrlComplete));
}
@override
int get hashCode => Object.hash(runtimeType,deviceCode,userCode,verificationUrl,expiresIn,interval,verificationUrlComplete);
@override
String toString() {
return 'DeviceCode(deviceCode: $deviceCode, userCode: $userCode, verificationUrl: $verificationUrl, expiresIn: $expiresIn, interval: $interval, verificationUrlComplete: $verificationUrlComplete)';
}
}
/// @nodoc
abstract mixin class $DeviceCodeCopyWith<$Res> {
factory $DeviceCodeCopyWith(DeviceCode value, $Res Function(DeviceCode) _then) = _$DeviceCodeCopyWithImpl;
@useResult
$Res call({
String deviceCode, String userCode, String verificationUrl, int expiresIn, int interval, String? verificationUrlComplete
});
}
/// @nodoc
class _$DeviceCodeCopyWithImpl<$Res>
implements $DeviceCodeCopyWith<$Res> {
_$DeviceCodeCopyWithImpl(this._self, this._then);
final DeviceCode _self;
final $Res Function(DeviceCode) _then;
/// Create a copy of DeviceCode
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? deviceCode = null,Object? userCode = null,Object? verificationUrl = null,Object? expiresIn = null,Object? interval = null,Object? verificationUrlComplete = freezed,}) {
return _then(_self.copyWith(
deviceCode: null == deviceCode ? _self.deviceCode : deviceCode // ignore: cast_nullable_to_non_nullable
as String,userCode: null == userCode ? _self.userCode : userCode // ignore: cast_nullable_to_non_nullable
as String,verificationUrl: null == verificationUrl ? _self.verificationUrl : verificationUrl // ignore: cast_nullable_to_non_nullable
as String,expiresIn: null == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
as int,interval: null == interval ? _self.interval : interval // ignore: cast_nullable_to_non_nullable
as int,verificationUrlComplete: freezed == verificationUrlComplete ? _self.verificationUrlComplete : verificationUrlComplete // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [DeviceCode].
extension DeviceCodePatterns on DeviceCode {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _DeviceCode value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _DeviceCode() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _DeviceCode value) $default,){
final _that = this;
switch (_that) {
case _DeviceCode():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _DeviceCode value)? $default,){
final _that = this;
switch (_that) {
case _DeviceCode() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String deviceCode, String userCode, String verificationUrl, int expiresIn, int interval, String? verificationUrlComplete)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DeviceCode() when $default != null:
return $default(_that.deviceCode,_that.userCode,_that.verificationUrl,_that.expiresIn,_that.interval,_that.verificationUrlComplete);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String deviceCode, String userCode, String verificationUrl, int expiresIn, int interval, String? verificationUrlComplete) $default,) {final _that = this;
switch (_that) {
case _DeviceCode():
return $default(_that.deviceCode,_that.userCode,_that.verificationUrl,_that.expiresIn,_that.interval,_that.verificationUrlComplete);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String deviceCode, String userCode, String verificationUrl, int expiresIn, int interval, String? verificationUrlComplete)? $default,) {final _that = this;
switch (_that) {
case _DeviceCode() when $default != null:
return $default(_that.deviceCode,_that.userCode,_that.verificationUrl,_that.expiresIn,_that.interval,_that.verificationUrlComplete);case _:
return null;
}
}
}
/// @nodoc
class _DeviceCode implements DeviceCode {
const _DeviceCode({required this.deviceCode, required this.userCode, required this.verificationUrl, required this.expiresIn, required this.interval, this.verificationUrlComplete});
@override final String deviceCode;
@override final String userCode;
@override final String verificationUrl;
@override final int expiresIn;
@override final int interval;
/// URL with the code pre-filled (e.g. `https://trakt.tv/activate/ABC12345`)
/// when the provider supports it. Nullable — Simkl doesn't.
@override final String? verificationUrlComplete;
/// Create a copy of DeviceCode
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$DeviceCodeCopyWith<_DeviceCode> get copyWith => __$DeviceCodeCopyWithImpl<_DeviceCode>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DeviceCode&&(identical(other.deviceCode, deviceCode) || other.deviceCode == deviceCode)&&(identical(other.userCode, userCode) || other.userCode == userCode)&&(identical(other.verificationUrl, verificationUrl) || other.verificationUrl == verificationUrl)&&(identical(other.expiresIn, expiresIn) || other.expiresIn == expiresIn)&&(identical(other.interval, interval) || other.interval == interval)&&(identical(other.verificationUrlComplete, verificationUrlComplete) || other.verificationUrlComplete == verificationUrlComplete));
}
@override
int get hashCode => Object.hash(runtimeType,deviceCode,userCode,verificationUrl,expiresIn,interval,verificationUrlComplete);
@override
String toString() {
return 'DeviceCode(deviceCode: $deviceCode, userCode: $userCode, verificationUrl: $verificationUrl, expiresIn: $expiresIn, interval: $interval, verificationUrlComplete: $verificationUrlComplete)';
}
}
/// @nodoc
abstract mixin class _$DeviceCodeCopyWith<$Res> implements $DeviceCodeCopyWith<$Res> {
factory _$DeviceCodeCopyWith(_DeviceCode value, $Res Function(_DeviceCode) _then) = __$DeviceCodeCopyWithImpl;
@override @useResult
$Res call({
String deviceCode, String userCode, String verificationUrl, int expiresIn, int interval, String? verificationUrlComplete
});
}
/// @nodoc
class __$DeviceCodeCopyWithImpl<$Res>
implements _$DeviceCodeCopyWith<$Res> {
__$DeviceCodeCopyWithImpl(this._self, this._then);
final _DeviceCode _self;
final $Res Function(_DeviceCode) _then;
/// Create a copy of DeviceCode
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? deviceCode = null,Object? userCode = null,Object? verificationUrl = null,Object? expiresIn = null,Object? interval = null,Object? verificationUrlComplete = freezed,}) {
return _then(_DeviceCode(
deviceCode: null == deviceCode ? _self.deviceCode : deviceCode // ignore: cast_nullable_to_non_nullable
as String,userCode: null == userCode ? _self.userCode : userCode // ignore: cast_nullable_to_non_nullable
as String,verificationUrl: null == verificationUrl ? _self.verificationUrl : verificationUrl // ignore: cast_nullable_to_non_nullable
as String,expiresIn: null == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
as int,interval: null == interval ? _self.interval : interval // ignore: cast_nullable_to_non_nullable
as int,verificationUrlComplete: freezed == verificationUrlComplete ? _self.verificationUrlComplete : verificationUrlComplete // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
mixin _$DevicePollEvent {
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DevicePollEvent);
}
@override
int get hashCode => runtimeType.hashCode;
@override
String toString() {
return 'DevicePollEvent()';
}
}
/// @nodoc
class $DevicePollEventCopyWith<$Res> {
$DevicePollEventCopyWith(DevicePollEvent _, $Res Function(DevicePollEvent) __);
}
/// Adds pattern-matching-related methods to [DevicePollEvent].
extension DevicePollEventPatterns on DevicePollEvent {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( DevicePollPending value)? pending,TResult Function( DevicePollSlowDown value)? slowDown,TResult Function( DevicePollDenied value)? denied,TResult Function( DevicePollExpired value)? expired,TResult Function( DevicePollSuccess value)? success,required TResult orElse(),}){
final _that = this;
switch (_that) {
case DevicePollPending() when pending != null:
return pending(_that);case DevicePollSlowDown() when slowDown != null:
return slowDown(_that);case DevicePollDenied() when denied != null:
return denied(_that);case DevicePollExpired() when expired != null:
return expired(_that);case DevicePollSuccess() when success != null:
return success(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( DevicePollPending value) pending,required TResult Function( DevicePollSlowDown value) slowDown,required TResult Function( DevicePollDenied value) denied,required TResult Function( DevicePollExpired value) expired,required TResult Function( DevicePollSuccess value) success,}){
final _that = this;
switch (_that) {
case DevicePollPending():
return pending(_that);case DevicePollSlowDown():
return slowDown(_that);case DevicePollDenied():
return denied(_that);case DevicePollExpired():
return expired(_that);case DevicePollSuccess():
return success(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( DevicePollPending value)? pending,TResult? Function( DevicePollSlowDown value)? slowDown,TResult? Function( DevicePollDenied value)? denied,TResult? Function( DevicePollExpired value)? expired,TResult? Function( DevicePollSuccess value)? success,}){
final _that = this;
switch (_that) {
case DevicePollPending() when pending != null:
return pending(_that);case DevicePollSlowDown() when slowDown != null:
return slowDown(_that);case DevicePollDenied() when denied != null:
return denied(_that);case DevicePollExpired() when expired != null:
return expired(_that);case DevicePollSuccess() when success != null:
return success(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? pending,TResult Function()? slowDown,TResult Function()? denied,TResult Function()? expired,TResult Function( Map<String, dynamic> tokenResponse)? success,required TResult orElse(),}) {final _that = this;
switch (_that) {
case DevicePollPending() when pending != null:
return pending();case DevicePollSlowDown() when slowDown != null:
return slowDown();case DevicePollDenied() when denied != null:
return denied();case DevicePollExpired() when expired != null:
return expired();case DevicePollSuccess() when success != null:
return success(_that.tokenResponse);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() pending,required TResult Function() slowDown,required TResult Function() denied,required TResult Function() expired,required TResult Function( Map<String, dynamic> tokenResponse) success,}) {final _that = this;
switch (_that) {
case DevicePollPending():
return pending();case DevicePollSlowDown():
return slowDown();case DevicePollDenied():
return denied();case DevicePollExpired():
return expired();case DevicePollSuccess():
return success(_that.tokenResponse);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function()? pending,TResult? Function()? slowDown,TResult? Function()? denied,TResult? Function()? expired,TResult? Function( Map<String, dynamic> tokenResponse)? success,}) {final _that = this;
switch (_that) {
case DevicePollPending() when pending != null:
return pending();case DevicePollSlowDown() when slowDown != null:
return slowDown();case DevicePollDenied() when denied != null:
return denied();case DevicePollExpired() when expired != null:
return expired();case DevicePollSuccess() when success != null:
return success(_that.tokenResponse);case _:
return null;
}
}
}
/// @nodoc
class DevicePollPending implements DevicePollEvent {
const DevicePollPending();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DevicePollPending);
}
@override
int get hashCode => runtimeType.hashCode;
@override
String toString() {
return 'DevicePollEvent.pending()';
}
}
/// @nodoc
class $DevicePollPendingCopyWith<$Res> implements $DevicePollEventCopyWith<$Res> {
$DevicePollPendingCopyWith(DevicePollPending _, $Res Function(DevicePollPending) __);
}
/// @nodoc
class _$DevicePollPendingCopyWithImpl<$Res>
implements $DevicePollPendingCopyWith<$Res> {
_$DevicePollPendingCopyWithImpl(this._self, this._then);
final DevicePollPending _self;
final $Res Function(DevicePollPending) _then;
}
/// @nodoc
class DevicePollSlowDown implements DevicePollEvent {
const DevicePollSlowDown();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DevicePollSlowDown);
}
@override
int get hashCode => runtimeType.hashCode;
@override
String toString() {
return 'DevicePollEvent.slowDown()';
}
}
/// @nodoc
class $DevicePollSlowDownCopyWith<$Res> implements $DevicePollEventCopyWith<$Res> {
$DevicePollSlowDownCopyWith(DevicePollSlowDown _, $Res Function(DevicePollSlowDown) __);
}
/// @nodoc
class _$DevicePollSlowDownCopyWithImpl<$Res>
implements $DevicePollSlowDownCopyWith<$Res> {
_$DevicePollSlowDownCopyWithImpl(this._self, this._then);
final DevicePollSlowDown _self;
final $Res Function(DevicePollSlowDown) _then;
}
/// @nodoc
class DevicePollDenied implements DevicePollEvent {
const DevicePollDenied();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DevicePollDenied);
}
@override
int get hashCode => runtimeType.hashCode;
@override
String toString() {
return 'DevicePollEvent.denied()';
}
}
/// @nodoc
class $DevicePollDeniedCopyWith<$Res> implements $DevicePollEventCopyWith<$Res> {
$DevicePollDeniedCopyWith(DevicePollDenied _, $Res Function(DevicePollDenied) __);
}
/// @nodoc
class _$DevicePollDeniedCopyWithImpl<$Res>
implements $DevicePollDeniedCopyWith<$Res> {
_$DevicePollDeniedCopyWithImpl(this._self, this._then);
final DevicePollDenied _self;
final $Res Function(DevicePollDenied) _then;
}
/// @nodoc
class DevicePollExpired implements DevicePollEvent {
const DevicePollExpired();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DevicePollExpired);
}
@override
int get hashCode => runtimeType.hashCode;
@override
String toString() {
return 'DevicePollEvent.expired()';
}
}
/// @nodoc
class $DevicePollExpiredCopyWith<$Res> implements $DevicePollEventCopyWith<$Res> {
$DevicePollExpiredCopyWith(DevicePollExpired _, $Res Function(DevicePollExpired) __);
}
/// @nodoc
class _$DevicePollExpiredCopyWithImpl<$Res>
implements $DevicePollExpiredCopyWith<$Res> {
_$DevicePollExpiredCopyWithImpl(this._self, this._then);
final DevicePollExpired _self;
final $Res Function(DevicePollExpired) _then;
}
/// @nodoc
class DevicePollSuccess implements DevicePollEvent {
const DevicePollSuccess(final Map<String, dynamic> tokenResponse): _tokenResponse = tokenResponse;
final Map<String, dynamic> _tokenResponse;
Map<String, dynamic> get tokenResponse {
if (_tokenResponse is EqualUnmodifiableMapView) return _tokenResponse;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(_tokenResponse);
}
/// Create a copy of DevicePollEvent
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$DevicePollSuccessCopyWith<DevicePollSuccess> get copyWith => _$DevicePollSuccessCopyWithImpl<DevicePollSuccess>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DevicePollSuccess&&const DeepCollectionEquality().equals(other._tokenResponse, _tokenResponse));
}
@override
int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_tokenResponse));
@override
String toString() {
return 'DevicePollEvent.success(tokenResponse: $tokenResponse)';
}
}
/// @nodoc
abstract mixin class $DevicePollSuccessCopyWith<$Res> implements $DevicePollEventCopyWith<$Res> {
factory $DevicePollSuccessCopyWith(DevicePollSuccess value, $Res Function(DevicePollSuccess) _then) = _$DevicePollSuccessCopyWithImpl;
@useResult
$Res call({
Map<String, dynamic> tokenResponse
});
}
/// @nodoc
class _$DevicePollSuccessCopyWithImpl<$Res>
implements $DevicePollSuccessCopyWith<$Res> {
_$DevicePollSuccessCopyWithImpl(this._self, this._then);
final DevicePollSuccess _self;
final $Res Function(DevicePollSuccess) _then;
/// Create a copy of DevicePollEvent
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') $Res call({Object? tokenResponse = null,}) {
return _then(DevicePollSuccess(
null == tokenResponse ? _self._tokenResponse : tokenResponse // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>,
));
}
}
// dart format on
+30 -20
View File
@@ -1,22 +1,51 @@
// ignore_for_file: invalid_annotation_target
import 'package:json_annotation/json_annotation.dart';
import '../../utils/json_utils.dart';
part 'fribb_mapping_row.g.dart';
Object? _readTvdbSeason(Map json, String key) {
final season = json['season'];
return season is Map ? season['tvdb'] : null;
}
Object? _readTmdbSeason(Map json, String key) {
final season = json['season'];
return season is Map ? season['tmdb'] : null;
}
/// One row from `anime-list-mini.json` (Fribb/anime-lists).
@JsonSerializable(createToJson: false)
class FribbMappingRow {
@JsonKey(name: 'anidb_id', fromJson: flexibleInt)
final int? anidbId;
@JsonKey(name: 'anilist_id', fromJson: flexibleInt)
final int? anilistId;
@JsonKey(name: 'imdb_id')
final String? imdbId;
@JsonKey(name: 'mal_id', fromJson: flexibleInt)
final int? malId;
@JsonKey(name: 'simkl_id', fromJson: flexibleInt)
final int? simklId;
@JsonKey(name: 'themoviedb_id', fromJson: flexibleInt)
final int? tmdbId;
@JsonKey(name: 'tvdb_id', fromJson: flexibleInt)
final int? tvdbId;
/// Plex season number this mapping corresponds to. A single show-level
/// external ID can resolve to multiple rows for split-cour anime; the
/// resolver picks by matching the episode's `parentIndex` against these.
@JsonKey(readValue: _readTvdbSeason, fromJson: flexibleInt)
final int? tvdbSeason;
@JsonKey(readValue: _readTmdbSeason, fromJson: flexibleInt)
final int? tmdbSeason;
/// `TV` / `MOVIE` / `OVA` / `ONA` / `SPECIAL` / `UNKNOWN` / `null`.
final String? type;
const FribbMappingRow({
this.anidbId,
this.anilistId,
this.imdbId,
this.malId,
@@ -30,24 +59,5 @@ class FribbMappingRow {
bool get isMovie => type == 'MOVIE';
factory FribbMappingRow.fromJson(Map<String, dynamic> json) {
final season = json['season'];
int? tvdbSeason;
int? tmdbSeason;
if (season is Map) {
tvdbSeason = (season['tvdb'] as num?)?.toInt();
tmdbSeason = (season['tmdb'] as num?)?.toInt();
}
return FribbMappingRow(
anilistId: (json['anilist_id'] as num?)?.toInt(),
imdbId: json['imdb_id'] as String?,
malId: (json['mal_id'] as num?)?.toInt(),
simklId: (json['simkl_id'] as num?)?.toInt(),
tmdbId: (json['themoviedb_id'] as num?)?.toInt(),
tvdbId: (json['tvdb_id'] as num?)?.toInt(),
tvdbSeason: tvdbSeason,
tmdbSeason: tmdbSeason,
type: json['type'] as String?,
);
}
factory FribbMappingRow.fromJson(Map<String, dynamic> json) => _$FribbMappingRowFromJson(json);
}
@@ -0,0 +1,21 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'fribb_mapping_row.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
FribbMappingRow _$FribbMappingRowFromJson(Map<String, dynamic> json) =>
FribbMappingRow(
anidbId: flexibleInt(json['anidb_id']),
anilistId: flexibleInt(json['anilist_id']),
imdbId: json['imdb_id'] as String?,
malId: flexibleInt(json['mal_id']),
simklId: flexibleInt(json['simkl_id']),
tmdbId: flexibleInt(json['themoviedb_id']),
tvdbId: flexibleInt(json['tvdb_id']),
tvdbSeason: flexibleInt(_readTvdbSeason(json, 'tvdbSeason')),
tmdbSeason: flexibleInt(_readTmdbSeason(json, 'tmdbSeason')),
type: json['type'] as String?,
);
+4
View File
@@ -15,6 +15,7 @@ class TrackerContext {
final bool isMovie;
final int? season;
final int? episodeNumber;
final int? animeProgress;
/// Plex ratingKey of the item being played. Used only for logging — not
/// sent to any tracker.
@@ -32,6 +33,7 @@ class TrackerContext {
required this.libraryGlobalKey,
this.season,
this.episodeNumber,
this.animeProgress,
});
factory TrackerContext.movie({
@@ -56,6 +58,7 @@ class TrackerContext {
required String? libraryGlobalKey,
required int season,
required int episodeNumber,
int? animeProgress,
}) {
return TrackerContext._(
external: external,
@@ -65,6 +68,7 @@ class TrackerContext {
libraryGlobalKey: libraryGlobalKey,
season: season,
episodeNumber: episodeNumber,
animeProgress: animeProgress,
);
}
}
+47 -63
View File
@@ -1,110 +1,94 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'trakt_ids.dart';
part 'trakt_scrobble_request.freezed.dart';
/// Body for `POST /scrobble/{start|pause|stop}` and `POST /sync/history`.
///
/// Either movie IDs or show IDs + season/episode are set, never both.
/// [progress] is the percent (0–100) for scrobble; ignored for `/sync/history`.
class TraktScrobbleRequest {
final TraktIds? _movieIds;
final TraktIds? _showIds;
final int? _season;
final int? _episode;
final double? progress;
const TraktScrobbleRequest._({TraktIds? movieIds, TraktIds? showIds, int? season, int? episode, this.progress})
: _movieIds = movieIds,
_showIds = showIds,
_season = season,
_episode = episode;
bool get isMovie => _movieIds != null;
bool get isEpisode => _showIds != null;
TraktScrobbleRequest copyWith({double? progress}) => TraktScrobbleRequest._(
movieIds: _movieIds,
showIds: _showIds,
season: _season,
episode: _episode,
progress: progress ?? this.progress,
);
@freezed
sealed class TraktScrobbleRequest with _$TraktScrobbleRequest {
const TraktScrobbleRequest._();
/// Build a movie scrobble payload.
factory TraktScrobbleRequest.movie({required TraktIds ids, double? progress}) {
return TraktScrobbleRequest._(movieIds: ids, progress: progress);
}
const factory TraktScrobbleRequest.movie({required TraktIds ids, double? progress}) = TraktScrobbleMovieRequest;
/// Build an episode scrobble payload using the show's external IDs plus
/// season/episode index. Trakt prefers this shape over an episode-IDs-only
/// payload because it works even when the episode itself isn't in Trakt's
/// catalog yet.
factory TraktScrobbleRequest.episode({
const factory TraktScrobbleRequest.episode({
required TraktIds showIds,
required int season,
required int number,
double? progress,
}) {
return TraktScrobbleRequest._(showIds: showIds, season: season, episode: number, progress: progress);
}
}) = TraktScrobbleEpisodeRequest;
Map<String, dynamic> toJson() => {
if (_movieIds != null) 'movie': {'ids': _movieIds.toJson()},
if (_showIds != null) 'show': {'ids': _showIds.toJson()},
if (_season != null && _episode != null) 'episode': {'season': _season, 'number': _episode},
'progress': ?progress,
bool get isMovie => this is TraktScrobbleMovieRequest;
bool get isEpisode => this is TraktScrobbleEpisodeRequest;
Map<String, dynamic> toJson() => switch (this) {
TraktScrobbleMovieRequest(:final ids, :final progress) => {
'movie': {'ids': ids.toJson()},
'progress': ?progress,
},
TraktScrobbleEpisodeRequest(:final showIds, :final season, :final number, :final progress) => {
'show': {'ids': showIds.toJson()},
'episode': {'season': season, 'number': number},
'progress': ?progress,
},
};
/// Build a `POST /sync/history` body that adds this item to history.
///
/// Optional [watchedAt] (ISO-8601 UTC) lets the server attribute the play
/// to a specific point in time; defaults to "now" on Trakt's side.
Map<String, dynamic> toHistoryAddBody({String? watchedAt}) {
if (isMovie) {
return {
'movies': [
{'watched_at': ?watchedAt, 'ids': _movieIds!.toJson()},
],
};
}
return {
Map<String, dynamic> toHistoryAddBody({String? watchedAt}) => switch (this) {
TraktScrobbleMovieRequest(:final ids) => {
'movies': [
{'watched_at': ?watchedAt, 'ids': ids.toJson()},
],
},
TraktScrobbleEpisodeRequest(:final showIds, :final season, :final number) => {
'shows': [
{
'ids': _showIds!.toJson(),
'ids': showIds.toJson(),
'seasons': [
{
'number': _season,
'number': season,
'episodes': [
{'watched_at': ?watchedAt, 'number': _episode},
{'watched_at': ?watchedAt, 'number': number},
],
},
],
},
],
};
}
},
};
/// Build a `POST /sync/history/remove` body that removes this item from history.
Map<String, dynamic> toHistoryRemoveBody() {
if (isMovie) {
return {
'movies': [
{'ids': _movieIds!.toJson()},
],
};
}
return {
Map<String, dynamic> toHistoryRemoveBody() => switch (this) {
TraktScrobbleMovieRequest(:final ids) => {
'movies': [
{'ids': ids.toJson()},
],
},
TraktScrobbleEpisodeRequest(:final showIds, :final season, :final number) => {
'shows': [
{
'ids': _showIds!.toJson(),
'ids': showIds.toJson(),
'seasons': [
{
'number': _season,
'number': season,
'episodes': [
{'number': _episode},
{'number': number},
],
},
],
},
],
};
}
},
};
}
@@ -0,0 +1,345 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'trakt_scrobble_request.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$TraktScrobbleRequest {
double? get progress;
/// Create a copy of TraktScrobbleRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$TraktScrobbleRequestCopyWith<TraktScrobbleRequest> get copyWith => _$TraktScrobbleRequestCopyWithImpl<TraktScrobbleRequest>(this as TraktScrobbleRequest, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is TraktScrobbleRequest&&(identical(other.progress, progress) || other.progress == progress));
}
@override
int get hashCode => Object.hash(runtimeType,progress);
@override
String toString() {
return 'TraktScrobbleRequest(progress: $progress)';
}
}
/// @nodoc
abstract mixin class $TraktScrobbleRequestCopyWith<$Res> {
factory $TraktScrobbleRequestCopyWith(TraktScrobbleRequest value, $Res Function(TraktScrobbleRequest) _then) = _$TraktScrobbleRequestCopyWithImpl;
@useResult
$Res call({
double? progress
});
}
/// @nodoc
class _$TraktScrobbleRequestCopyWithImpl<$Res>
implements $TraktScrobbleRequestCopyWith<$Res> {
_$TraktScrobbleRequestCopyWithImpl(this._self, this._then);
final TraktScrobbleRequest _self;
final $Res Function(TraktScrobbleRequest) _then;
/// Create a copy of TraktScrobbleRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? progress = freezed,}) {
return _then(_self.copyWith(
progress: freezed == progress ? _self.progress : progress // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
/// Adds pattern-matching-related methods to [TraktScrobbleRequest].
extension TraktScrobbleRequestPatterns on TraktScrobbleRequest {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( TraktScrobbleMovieRequest value)? movie,TResult Function( TraktScrobbleEpisodeRequest value)? episode,required TResult orElse(),}){
final _that = this;
switch (_that) {
case TraktScrobbleMovieRequest() when movie != null:
return movie(_that);case TraktScrobbleEpisodeRequest() when episode != null:
return episode(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( TraktScrobbleMovieRequest value) movie,required TResult Function( TraktScrobbleEpisodeRequest value) episode,}){
final _that = this;
switch (_that) {
case TraktScrobbleMovieRequest():
return movie(_that);case TraktScrobbleEpisodeRequest():
return episode(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( TraktScrobbleMovieRequest value)? movie,TResult? Function( TraktScrobbleEpisodeRequest value)? episode,}){
final _that = this;
switch (_that) {
case TraktScrobbleMovieRequest() when movie != null:
return movie(_that);case TraktScrobbleEpisodeRequest() when episode != null:
return episode(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( TraktIds ids, double? progress)? movie,TResult Function( TraktIds showIds, int season, int number, double? progress)? episode,required TResult orElse(),}) {final _that = this;
switch (_that) {
case TraktScrobbleMovieRequest() when movie != null:
return movie(_that.ids,_that.progress);case TraktScrobbleEpisodeRequest() when episode != null:
return episode(_that.showIds,_that.season,_that.number,_that.progress);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( TraktIds ids, double? progress) movie,required TResult Function( TraktIds showIds, int season, int number, double? progress) episode,}) {final _that = this;
switch (_that) {
case TraktScrobbleMovieRequest():
return movie(_that.ids,_that.progress);case TraktScrobbleEpisodeRequest():
return episode(_that.showIds,_that.season,_that.number,_that.progress);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( TraktIds ids, double? progress)? movie,TResult? Function( TraktIds showIds, int season, int number, double? progress)? episode,}) {final _that = this;
switch (_that) {
case TraktScrobbleMovieRequest() when movie != null:
return movie(_that.ids,_that.progress);case TraktScrobbleEpisodeRequest() when episode != null:
return episode(_that.showIds,_that.season,_that.number,_that.progress);case _:
return null;
}
}
}
/// @nodoc
class TraktScrobbleMovieRequest extends TraktScrobbleRequest {
const TraktScrobbleMovieRequest({required this.ids, this.progress}): super._();
final TraktIds ids;
@override final double? progress;
/// Create a copy of TraktScrobbleRequest
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$TraktScrobbleMovieRequestCopyWith<TraktScrobbleMovieRequest> get copyWith => _$TraktScrobbleMovieRequestCopyWithImpl<TraktScrobbleMovieRequest>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is TraktScrobbleMovieRequest&&(identical(other.ids, ids) || other.ids == ids)&&(identical(other.progress, progress) || other.progress == progress));
}
@override
int get hashCode => Object.hash(runtimeType,ids,progress);
@override
String toString() {
return 'TraktScrobbleRequest.movie(ids: $ids, progress: $progress)';
}
}
/// @nodoc
abstract mixin class $TraktScrobbleMovieRequestCopyWith<$Res> implements $TraktScrobbleRequestCopyWith<$Res> {
factory $TraktScrobbleMovieRequestCopyWith(TraktScrobbleMovieRequest value, $Res Function(TraktScrobbleMovieRequest) _then) = _$TraktScrobbleMovieRequestCopyWithImpl;
@override @useResult
$Res call({
TraktIds ids, double? progress
});
}
/// @nodoc
class _$TraktScrobbleMovieRequestCopyWithImpl<$Res>
implements $TraktScrobbleMovieRequestCopyWith<$Res> {
_$TraktScrobbleMovieRequestCopyWithImpl(this._self, this._then);
final TraktScrobbleMovieRequest _self;
final $Res Function(TraktScrobbleMovieRequest) _then;
/// Create a copy of TraktScrobbleRequest
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? ids = null,Object? progress = freezed,}) {
return _then(TraktScrobbleMovieRequest(
ids: null == ids ? _self.ids : ids // ignore: cast_nullable_to_non_nullable
as TraktIds,progress: freezed == progress ? _self.progress : progress // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
/// @nodoc
class TraktScrobbleEpisodeRequest extends TraktScrobbleRequest {
const TraktScrobbleEpisodeRequest({required this.showIds, required this.season, required this.number, this.progress}): super._();
final TraktIds showIds;
final int season;
final int number;
@override final double? progress;
/// Create a copy of TraktScrobbleRequest
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$TraktScrobbleEpisodeRequestCopyWith<TraktScrobbleEpisodeRequest> get copyWith => _$TraktScrobbleEpisodeRequestCopyWithImpl<TraktScrobbleEpisodeRequest>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is TraktScrobbleEpisodeRequest&&(identical(other.showIds, showIds) || other.showIds == showIds)&&(identical(other.season, season) || other.season == season)&&(identical(other.number, number) || other.number == number)&&(identical(other.progress, progress) || other.progress == progress));
}
@override
int get hashCode => Object.hash(runtimeType,showIds,season,number,progress);
@override
String toString() {
return 'TraktScrobbleRequest.episode(showIds: $showIds, season: $season, number: $number, progress: $progress)';
}
}
/// @nodoc
abstract mixin class $TraktScrobbleEpisodeRequestCopyWith<$Res> implements $TraktScrobbleRequestCopyWith<$Res> {
factory $TraktScrobbleEpisodeRequestCopyWith(TraktScrobbleEpisodeRequest value, $Res Function(TraktScrobbleEpisodeRequest) _then) = _$TraktScrobbleEpisodeRequestCopyWithImpl;
@override @useResult
$Res call({
TraktIds showIds, int season, int number, double? progress
});
}
/// @nodoc
class _$TraktScrobbleEpisodeRequestCopyWithImpl<$Res>
implements $TraktScrobbleEpisodeRequestCopyWith<$Res> {
_$TraktScrobbleEpisodeRequestCopyWithImpl(this._self, this._then);
final TraktScrobbleEpisodeRequest _self;
final $Res Function(TraktScrobbleEpisodeRequest) _then;
/// Create a copy of TraktScrobbleRequest
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? showIds = null,Object? season = null,Object? number = null,Object? progress = freezed,}) {
return _then(TraktScrobbleEpisodeRequest(
showIds: null == showIds ? _self.showIds : showIds // ignore: cast_nullable_to_non_nullable
as TraktIds,season: null == season ? _self.season : season // ignore: cast_nullable_to_non_nullable
as int,number: null == number ? _self.number : number // ignore: cast_nullable_to_non_nullable
as int,progress: freezed == progress ? _self.progress : progress // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
// dart format on
+6 -1
View File
@@ -1,4 +1,9 @@
import 'package:json_annotation/json_annotation.dart';
part 'trakt_user.g.dart';
/// Minimal Trakt user info parsed from `GET /users/settings`.
@JsonSerializable(createToJson: false)
class TraktUser {
final String username;
final String? name;
@@ -10,6 +15,6 @@ class TraktUser {
if (user == null) {
throw const FormatException('Trakt /users/settings response missing "user" field');
}
return TraktUser(username: user['username'] as String, name: user['name'] as String?);
return _$TraktUserFromJson(user);
}
}
+12
View File
@@ -0,0 +1,12 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'trakt_user.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
TraktUser _$TraktUserFromJson(Map<String, dynamic> json) => TraktUser(
username: json['username'] as String,
name: json['name'] as String?,
);
+66 -142
View File
@@ -1,95 +1,77 @@
class BufferRange {
final Duration start;
final Duration end;
const BufferRange({required this.start, required this.end});
// ignore_for_file: invalid_annotation_target
import 'package:freezed_annotation/freezed_annotation.dart';
part 'models.freezed.dart';
@freezed
sealed class BufferRange with _$BufferRange {
const factory BufferRange({required Duration start, required Duration end}) = _BufferRange;
}
/// [cause] is an optional machine-readable tag (e.g. `server-http-500`),
/// letting the UI branch without parsing [message].
class PlayerError {
@Freezed(toStringOverride: false)
sealed class PlayerError with _$PlayerError {
const PlayerError._();
const factory PlayerError(String message, {String? cause}) = _PlayerError;
/// Cause tag for a server-side HTTP 500 — shared-user bandwidth or
/// transcoding limit rejection set by the server owner.
static const String serverHttp500 = 'server-http-500';
final String message;
final String? cause;
const PlayerError(this.message, {this.cause});
@override
String toString() => message;
}
enum PlayerLogLevel { none, fatal, error, warn, info, verbose, debug, trace }
class AudioTrack {
final String id;
final String? title;
final String? language;
final String? codec;
final int? channels;
int? get channelsCount => channels;
final int? sampleRate;
final int? bitrate;
final bool isDefault;
final bool isForced;
@freezed
sealed class AudioTrack with _$AudioTrack {
const AudioTrack._();
const AudioTrack({
required this.id,
this.title,
this.language,
this.codec,
this.channels,
this.sampleRate,
this.bitrate,
this.isDefault = false,
this.isForced = false,
});
const factory AudioTrack({
required String id,
String? title,
String? language,
String? codec,
int? channels,
int? sampleRate,
int? bitrate,
@Default(false) bool isDefault,
@Default(false) bool isForced,
}) = _AudioTrack;
static const auto = AudioTrack(id: 'auto', title: 'Auto');
static const off = AudioTrack(id: 'no', title: 'Off');
int? get channelsCount => channels;
String get displayName {
if (title != null && title!.isNotEmpty) return title!;
if (language != null && language!.isNotEmpty) return language!;
return 'Track $id';
}
@override
String toString() => 'AudioTrack($id, $displayName)';
@override
bool operator ==(Object other) =>
identical(this, other) || other is AudioTrack && runtimeType == other.runtimeType && id == other.id;
@override
int get hashCode => id.hashCode;
}
class SubtitleTrack {
final String id;
final String? title;
final String? language;
final String? codec;
final bool isDefault;
final bool isForced;
final bool isExternal;
final String? uri;
@freezed
sealed class SubtitleTrack with _$SubtitleTrack {
const SubtitleTrack._();
const SubtitleTrack({
required this.id,
this.title,
this.language,
this.codec,
this.isDefault = false,
this.isForced = false,
this.isExternal = false,
this.uri,
});
const factory SubtitleTrack({
required String id,
String? title,
String? language,
String? codec,
@Default(false) bool isDefault,
@Default(false) bool isForced,
@Default(false) bool isExternal,
String? uri,
}) = _SubtitleTrack;
factory SubtitleTrack.uri(String uri, {String? title, String? language}) {
return SubtitleTrack(id: 'external:$uri', title: title, language: language, isExternal: true, uri: uri);
}
factory SubtitleTrack.uri(String uri, {String? title, String? language}) =>
SubtitleTrack(id: 'external:$uri', title: title, language: language, isExternal: true, uri: uri);
static const auto = SubtitleTrack(id: 'auto', title: 'Auto');
@@ -101,103 +83,45 @@ class SubtitleTrack {
if (isExternal) return 'External';
return 'Track $id';
}
@override
String toString() => 'SubtitleTrack($id, $displayName)';
@override
bool operator ==(Object other) =>
identical(this, other) || other is SubtitleTrack && runtimeType == other.runtimeType && id == other.id;
@override
int get hashCode => id.hashCode;
}
class Tracks {
final List<AudioTrack> audio;
final List<SubtitleTrack> subtitle;
@Freezed(toStringOverride: false)
sealed class Tracks with _$Tracks {
const Tracks._();
const Tracks({this.audio = const [], this.subtitle = const []});
Tracks copyWith({List<AudioTrack>? audio, List<SubtitleTrack>? subtitle}) {
return Tracks(audio: audio ?? this.audio, subtitle: subtitle ?? this.subtitle);
}
const factory Tracks({
@Default(<AudioTrack>[]) List<AudioTrack> audio,
@Default(<SubtitleTrack>[]) List<SubtitleTrack> subtitle,
}) = _Tracks;
@override
String toString() => 'Tracks(audio: ${audio.length}, subtitle: ${subtitle.length})';
}
/// Sentinel value used to distinguish "not provided" from "explicitly set to null" in copyWith.
const _sentinel = Object();
class TrackSelection {
final AudioTrack? audio;
final SubtitleTrack? subtitle;
final SubtitleTrack? secondarySubtitle;
const TrackSelection({this.audio, this.subtitle, this.secondarySubtitle});
/// Creates a copy with the given fields replaced.
/// Use [secondarySubtitle] with explicit null to clear the secondary subtitle.
TrackSelection copyWith({AudioTrack? audio, SubtitleTrack? subtitle, Object? secondarySubtitle = _sentinel}) {
return TrackSelection(
audio: audio ?? this.audio,
subtitle: subtitle ?? this.subtitle,
secondarySubtitle: identical(secondarySubtitle, _sentinel)
? this.secondarySubtitle
: secondarySubtitle as SubtitleTrack?,
);
}
@override
String toString() => 'TrackSelection(audio: $audio, subtitle: $subtitle, secondarySubtitle: $secondarySubtitle)';
@freezed
sealed class TrackSelection with _$TrackSelection {
const factory TrackSelection({AudioTrack? audio, SubtitleTrack? subtitle, SubtitleTrack? secondarySubtitle}) =
_TrackSelection;
}
class AudioDevice {
final String name;
final String description;
const AudioDevice({required this.name, this.description = ''});
@freezed
sealed class AudioDevice with _$AudioDevice {
const factory AudioDevice({required String name, @Default('') String description}) = _AudioDevice;
static const auto = AudioDevice(name: 'auto', description: 'Auto');
@override
String toString() => 'AudioDevice($name, $description)';
@override
bool operator ==(Object other) =>
identical(this, other) || other is AudioDevice && runtimeType == other.runtimeType && name == other.name;
@override
int get hashCode => name.hashCode;
}
class PlayerLog {
final PlayerLogLevel level;
final String prefix;
final String text;
@Freezed(toStringOverride: false)
sealed class PlayerLog with _$PlayerLog {
const PlayerLog._();
const PlayerLog({required this.level, required this.prefix, required this.text});
const factory PlayerLog({required PlayerLogLevel level, required String prefix, required String text}) = _PlayerLog;
@override
String toString() => '[$prefix] ${level.name}: $text';
}
class Media {
final String uri;
final Map<String, String>? headers;
final Duration? start;
const Media(this.uri, {this.headers, this.start});
@override
String toString() => 'Media($uri)';
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is Media && runtimeType == other.runtimeType && uri == other.uri && start == other.start;
@override
int get hashCode => uri.hashCode ^ start.hashCode;
@freezed
sealed class Media with _$Media {
const factory Media(String uri, {Map<String, String>? headers, Duration? start}) = _Media;
}
File diff suppressed because it is too large Load Diff
@@ -99,6 +99,7 @@ class PlayerAndroid extends PlayerBase {
if (disposed) return;
await _ensureInitialized();
final startPosition = media.start ?? Duration.zero;
clearTracks();
resetPlaybackProgress(startPosition);
setSeekable(false);
+10 -1
View File
@@ -1,5 +1,6 @@
import 'dart:io' show Platform;
import '../../media/media_display_criteria.dart';
import '../models.dart';
import 'platform/player_android.dart';
import 'player_native.dart';
@@ -146,6 +147,10 @@ abstract class Player {
/// [args] - Command and arguments as a list of strings.
Future<void> command(List<String> args);
/// Prime native display matching from server metadata before the decoder
/// emits stream properties. Unsupported platforms ignore this.
Future<void> setDisplayCriteria(MediaDisplayCriteria? criteria);
/// Configure subtitle fonts for libass rendering.
///
/// Extracts a comprehensive Unicode font (Go Noto) to the cache directory
@@ -163,8 +168,12 @@ abstract class Player {
/// On macOS, this controls the Metal layer visibility.
/// On other platforms, this may have no effect.
///
/// When [restoreOnWindowVisible] is true, macOS may restore the layer as soon
/// as AppKit reports the window visible again instead of waiting for Dart's
/// lifecycle resume callback.
///
/// Returns true if the operation was successful.
Future<bool> setVisible(bool visible);
Future<bool> setVisible(bool visible, {bool restoreOnWindowVisible = false});
/// Update the video frame/surface dimensions.
///
+9 -5
View File
@@ -5,6 +5,7 @@ import 'package:collection/collection.dart';
import 'package:flutter/foundation.dart' show protected;
import 'package:flutter/services.dart';
import '../../media/media_display_criteria.dart';
import '../../utils/app_logger.dart';
import '../../utils/track_label_builder.dart';
import '../font_loader.dart';
@@ -438,18 +439,18 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
selectedTrack = _state.tracks.audio.firstWhereOrNull((t) => t.id == id);
}
if (selectedTrack == null) return;
_state = _state.copyWith(track: _state.track.copyWith(audio: selectedTrack));
trackController.add(_state.track);
}
void updateSelectedSubtitleTrack(dynamic trackId) {
final id = trackId?.toString();
SubtitleTrack? selectedTrack;
selectedTrack = (id == null || id == 'no')
final selectedTrack = (id == null || id == 'no')
? SubtitleTrack.off
: _state.tracks.subtitle.firstWhereOrNull((t) => t.id == id);
if (selectedTrack == null) return;
_state = _state.copyWith(track: _state.track.copyWith(subtitle: selectedTrack));
trackController.add(_state.track);
}
@@ -523,10 +524,13 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
}
@override
Future<bool> setVisible(bool visible) async {
Future<void> setDisplayCriteria(MediaDisplayCriteria? criteria) async {}
@override
Future<bool> setVisible(bool visible, {bool restoreOnWindowVisible = false}) async {
if (_disposed) return false;
try {
await invoke('setVisible', {'visible': visible});
await invoke('setVisible', {'visible': visible, 'restoreOnWindowVisible': restoreOnWindowVisible});
return true;
} catch (e) {
errorController.add(PlayerError('Failed to set visibility: $e'));
+9
View File
@@ -2,6 +2,7 @@ import 'dart:io' show Platform;
import 'package:flutter/services.dart';
import '../../media/media_display_criteria.dart';
import '../models.dart';
import 'player_base.dart';
@@ -105,6 +106,7 @@ class PlayerNative extends PlayerBase {
if (disposed) return;
await _ensureInitialized();
final startPosition = media.start ?? Duration.zero;
clearTracks();
resetPlaybackProgress(startPosition);
setSeekable(false);
@@ -221,6 +223,13 @@ class PlayerNative extends PlayerBase {
await invoke('command', {'args': args});
}
@override
Future<void> setDisplayCriteria(MediaDisplayCriteria? criteria) async {
if (disposed || !Platform.isIOS) return;
await _ensureInitialized();
await invoke('setDisplayCriteria', {'criteria': criteria?.toJson()});
}
@override
Future<void> setLogLevel(String level) async {
if (disposed) return;
+39
View File
@@ -306,6 +306,9 @@ class ActiveProfileBinder {
'ActiveProfileBinder: fetchServers failed with cached token for ${profile.displayName}',
error: e,
);
if (e.isTransient) {
return _connectFromCachedServers(account, cachedToken, profile.displayName, error: e);
}
return const {};
}
} catch (e, st) {
@@ -409,6 +412,11 @@ class ActiveProfileBinder {
userToken = null;
} else {
appLogger.w('ActiveProfileBinder: fetchServers failed for ${profile.displayName}', error: e);
if (e.isTransient) {
final ids = await _connectFromCachedServers(conn, userToken, profile.displayName, error: e);
if (ids.isNotEmpty) await profileConnections.markUsed(profile.id, conn.id);
return ids;
}
return const {};
}
} catch (e, st) {
@@ -427,6 +435,14 @@ class ActiveProfileBinder {
userToken = minted;
try {
servers = await auth.fetchServers(userToken);
} on MediaServerHttpException catch (e) {
appLogger.w('ActiveProfileBinder: fetchServers failed for ${profile.displayName}', error: e);
if (e.isTransient) {
final ids = await _connectFromCachedServers(conn, userToken, profile.displayName, error: e);
if (ids.isNotEmpty) await profileConnections.markUsed(profile.id, conn.id);
return ids;
}
return const {};
} catch (e, st) {
appLogger.w('ActiveProfileBinder: fetchServers failed for ${profile.displayName}', error: e, stackTrace: st);
return const {};
@@ -465,6 +481,12 @@ class ActiveProfileBinder {
final List<PlexServer> servers;
try {
servers = await auth.fetchServers(userToken);
} on MediaServerHttpException catch (e, st) {
appLogger.w('ActiveProfileBinder: fetchServers failed for $profileLabel', error: e, stackTrace: st);
if (e.isTransient) {
return _connectFromCachedServers(account, userToken, profileLabel, error: e, stackTrace: st);
}
return const {};
} catch (e, st) {
appLogger.w('ActiveProfileBinder: fetchServers failed for $profileLabel', error: e, stackTrace: st);
return const {};
@@ -472,6 +494,23 @@ class ActiveProfileBinder {
return _connectFromServers(account, userToken, servers, profileLabel);
}
Future<Set<String>> _connectFromCachedServers(
PlexAccountConnection account,
String userToken,
String profileLabel, {
Object? error,
StackTrace? stackTrace,
}) async {
if (account.servers.isEmpty) return const {};
appLogger.w(
'ActiveProfileBinder: using cached Plex server metadata for $profileLabel after resource refresh failed',
error: error,
stackTrace: stackTrace,
);
final servers = account.servers.map((server) => server.withAccessToken(userToken)).toList(growable: false);
return _connectFromServers(account, userToken, servers, profileLabel);
}
Future<Set<String>> _connectFromServers(
PlexAccountConnection account,
String userToken,
+112 -119
View File
@@ -1,148 +1,83 @@
import 'dart:convert';
import 'package:crypto/crypto.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import '../models/plex/plex_home_user.dart';
part 'profile.freezed.dart';
/// Top-level profile — the user-facing identity in the app.
///
/// Two kinds:
/// - [ProfileKind.local]: a Plezy-only profile created by the user. May have
/// - [LocalProfile]: a Plezy-only profile created by the user. May have
/// an optional 4-digit PIN.
/// - [ProfileKind.plexHome]: auto-surfaced from a connected Plex account's
/// - [PlexHomeProfile]: auto-surfaced from a connected Plex account's
/// Home users. PIN protection is handled server-side by Plex via the
/// `/home/users/{uuid}/switch` flow — `pinHash` is unused.
///
/// A profile owns 1+ connections via the `profile_connections` join table.
/// The join row carries the per-profile user-level token used to talk to
/// each connection.
class Profile {
final String id;
final ProfileKind kind;
final String displayName;
final String? avatarThumbUrl;
@freezed
sealed class Profile with _$Profile {
const Profile._();
/// Hashed PIN if set — only meaningful for [ProfileKind.local]. The raw
/// PIN is never persisted; see [computePinHash].
final String? pinHash;
const factory Profile.local({
required String id,
required String displayName,
String? avatarThumbUrl,
/// For [ProfileKind.plexHome]: the parent Plex account's connection id.
/// `null` for local profiles.
final String? parentConnectionId;
/// Hashed PIN if set. The raw PIN is never persisted; see [computePinHash].
String? pinHash,
@Default(0) int sortOrder,
required DateTime createdAt,
DateTime? lastUsedAt,
}) = LocalProfile;
/// For [ProfileKind.plexHome]: the Plex Home user UUID. Used by the
/// active-profile binder to call `/home/users/{uuid}/switch`. `null` for
/// local profiles.
final String? plexHomeUserUuid;
const factory Profile.plexHome({
required String id,
required String displayName,
String? avatarThumbUrl,
/// Plex Home flags — only meaningful for [ProfileKind.plexHome].
final bool plexRestricted;
final bool plexAdmin;
/// The parent Plex account's connection id.
String? parentConnectionId,
/// Plex's `protected` flag — true when the home user has a PIN that must
/// be entered before `/home/users/{uuid}/switch` will succeed.
final bool plexProtected;
/// The Plex Home user UUID. Used by the active-profile binder to call
/// `/home/users/{uuid}/switch`.
String? plexHomeUserUuid,
@Default(false) bool plexRestricted,
@Default(false) bool plexAdmin,
final int sortOrder;
final DateTime createdAt;
final DateTime? lastUsedAt;
Profile({
required this.id,
required this.kind,
required this.displayName,
this.avatarThumbUrl,
this.pinHash,
this.parentConnectionId,
this.plexHomeUserUuid,
this.plexRestricted = false,
this.plexAdmin = false,
this.plexProtected = false,
this.sortOrder = 0,
required this.createdAt,
this.lastUsedAt,
});
/// Plex's `protected` flag — true when the home user has a PIN that must
/// be entered before `/home/users/{uuid}/switch` will succeed.
@Default(false) bool plexProtected,
@Default(0) int sortOrder,
required DateTime createdAt,
DateTime? lastUsedAt,
}) = PlexHomeProfile;
/// Construct an in-memory virtual `Profile` for a Plex Home user. These
/// are never persisted — Plex owns the Home user list, so the picker
/// reads them live from [PlexHomeService] and merges them with the local
/// rows from [ProfileRegistry].
/// rows from `ProfileRegistry`.
factory Profile.virtualPlexHome({
required String connectionId,
required PlexHomeUser homeUser,
DateTime? lastUsedAt,
}) {
return Profile(
id: plexHomeProfileId(accountConnectionId: connectionId, homeUserUuid: homeUser.uuid),
kind: ProfileKind.plexHome,
displayName: homeUser.displayName,
avatarThumbUrl: homeUser.thumb.isNotEmpty ? homeUser.thumb : null,
parentConnectionId: connectionId,
plexHomeUserUuid: homeUser.uuid,
plexRestricted: homeUser.restricted,
plexAdmin: homeUser.admin,
plexProtected: homeUser.protected,
sortOrder: homeUser.admin ? 0 : 1,
createdAt: DateTime.fromMillisecondsSinceEpoch(0),
lastUsedAt: lastUsedAt,
);
}
bool get isLocal => kind == ProfileKind.local;
bool get isPlexHome => kind == ProfileKind.plexHome;
/// True when entering this profile requires user-supplied PIN.
///
/// Locals: gated by their own [pinHash].
/// Plex Home: gated by Plex's own protected flag (`plexProtected`).
bool get isPinProtected => isLocal ? (pinHash != null && pinHash!.isNotEmpty) : plexProtected;
Profile copyWith({
String? id,
ProfileKind? kind,
String? displayName,
String? avatarThumbUrl,
bool clearAvatar = false,
String? pinHash,
bool clearPin = false,
String? parentConnectionId,
String? plexHomeUserUuid,
bool? plexRestricted,
bool? plexAdmin,
bool? plexProtected,
int? sortOrder,
DateTime? createdAt,
DateTime? lastUsedAt,
bool clearLastUsedAt = false,
}) {
return Profile(
id: id ?? this.id,
kind: kind ?? this.kind,
displayName: displayName ?? this.displayName,
avatarThumbUrl: clearAvatar ? null : (avatarThumbUrl ?? this.avatarThumbUrl),
pinHash: clearPin ? null : (pinHash ?? this.pinHash),
parentConnectionId: parentConnectionId ?? this.parentConnectionId,
plexHomeUserUuid: plexHomeUserUuid ?? this.plexHomeUserUuid,
plexRestricted: plexRestricted ?? this.plexRestricted,
plexAdmin: plexAdmin ?? this.plexAdmin,
plexProtected: plexProtected ?? this.plexProtected,
sortOrder: sortOrder ?? this.sortOrder,
createdAt: createdAt ?? this.createdAt,
lastUsedAt: clearLastUsedAt ? null : (lastUsedAt ?? this.lastUsedAt),
);
}
Map<String, Object?> toConfigJson() {
return switch (kind) {
ProfileKind.local => {'pinHash': pinHash},
ProfileKind.plexHome => {
'parentConnectionId': parentConnectionId,
'restricted': plexRestricted,
'admin': plexAdmin,
'protected': plexProtected,
},
};
}
}) => Profile.plexHome(
id: plexHomeProfileId(accountConnectionId: connectionId, homeUserUuid: homeUser.uuid),
displayName: homeUser.displayName,
avatarThumbUrl: homeUser.thumb.isNotEmpty ? homeUser.thumb : null,
parentConnectionId: connectionId,
plexHomeUserUuid: homeUser.uuid,
plexRestricted: homeUser.restricted,
plexAdmin: homeUser.admin,
plexProtected: homeUser.protected,
sortOrder: homeUser.admin ? 0 : 1,
createdAt: DateTime.fromMillisecondsSinceEpoch(0),
lastUsedAt: lastUsedAt,
);
factory Profile.fromRow({
required String id,
@@ -156,9 +91,8 @@ class Profile {
}) {
final parsedKind = ProfileKind.fromId(kind);
return switch (parsedKind) {
ProfileKind.local => Profile(
ProfileKind.local => Profile.local(
id: id,
kind: parsedKind,
displayName: displayName,
avatarThumbUrl: avatarThumbUrl,
pinHash: json['pinHash'] as String?,
@@ -166,9 +100,8 @@ class Profile {
createdAt: createdAt,
lastUsedAt: lastUsedAt,
),
ProfileKind.plexHome => Profile(
ProfileKind.plexHome => Profile.plexHome(
id: id,
kind: parsedKind,
displayName: displayName,
avatarThumbUrl: avatarThumbUrl,
parentConnectionId: json['parentConnectionId'] as String?,
@@ -181,6 +114,66 @@ class Profile {
),
};
}
bool get isLocal => this is LocalProfile;
bool get isPlexHome => this is PlexHomeProfile;
ProfileKind get kind => switch (this) {
LocalProfile() => ProfileKind.local,
PlexHomeProfile() => ProfileKind.plexHome,
};
/// True when entering this profile requires user-supplied PIN.
///
/// Locals: gated by their own [pinHash].
/// Plex Home: gated by Plex's own protected flag (`plexProtected`).
bool get isPinProtected => switch (this) {
LocalProfile(:final pinHash) => pinHash != null && pinHash.isNotEmpty,
PlexHomeProfile(:final plexProtected) => plexProtected,
};
/// Hashed PIN, only set for [LocalProfile]. Returns null for plexHome.
String? get pinHash => switch (this) {
LocalProfile(:final pinHash) => pinHash,
PlexHomeProfile() => null,
};
/// Parent Plex account connection id, only set for [PlexHomeProfile].
String? get parentConnectionId => switch (this) {
LocalProfile() => null,
PlexHomeProfile(:final parentConnectionId) => parentConnectionId,
};
/// Plex Home user UUID, only set for [PlexHomeProfile].
String? get plexHomeUserUuid => switch (this) {
LocalProfile() => null,
PlexHomeProfile(:final plexHomeUserUuid) => plexHomeUserUuid,
};
bool get plexRestricted => switch (this) {
LocalProfile() => false,
PlexHomeProfile(:final plexRestricted) => plexRestricted,
};
bool get plexAdmin => switch (this) {
LocalProfile() => false,
PlexHomeProfile(:final plexAdmin) => plexAdmin,
};
bool get plexProtected => switch (this) {
LocalProfile() => false,
PlexHomeProfile(:final plexProtected) => plexProtected,
};
Map<String, Object?> toConfigJson() => switch (this) {
LocalProfile(:final pinHash) => {'pinHash': pinHash},
PlexHomeProfile(:final parentConnectionId, :final plexRestricted, :final plexAdmin, :final plexProtected) => {
'parentConnectionId': parentConnectionId,
'restricted': plexRestricted,
'admin': plexAdmin,
'protected': plexProtected,
},
};
}
enum ProfileKind {
+380
View File
@@ -0,0 +1,380 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'profile.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$Profile {
String get id; String get displayName; String? get avatarThumbUrl; int get sortOrder; DateTime get createdAt; DateTime? get lastUsedAt;
/// Create a copy of Profile
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ProfileCopyWith<Profile> get copyWith => _$ProfileCopyWithImpl<Profile>(this as Profile, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is Profile&&(identical(other.id, id) || other.id == id)&&(identical(other.displayName, displayName) || other.displayName == displayName)&&(identical(other.avatarThumbUrl, avatarThumbUrl) || other.avatarThumbUrl == avatarThumbUrl)&&(identical(other.sortOrder, sortOrder) || other.sortOrder == sortOrder)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.lastUsedAt, lastUsedAt) || other.lastUsedAt == lastUsedAt));
}
@override
int get hashCode => Object.hash(runtimeType,id,displayName,avatarThumbUrl,sortOrder,createdAt,lastUsedAt);
@override
String toString() {
return 'Profile(id: $id, displayName: $displayName, avatarThumbUrl: $avatarThumbUrl, sortOrder: $sortOrder, createdAt: $createdAt, lastUsedAt: $lastUsedAt)';
}
}
/// @nodoc
abstract mixin class $ProfileCopyWith<$Res> {
factory $ProfileCopyWith(Profile value, $Res Function(Profile) _then) = _$ProfileCopyWithImpl;
@useResult
$Res call({
String id, String displayName, String? avatarThumbUrl, int sortOrder, DateTime createdAt, DateTime? lastUsedAt
});
}
/// @nodoc
class _$ProfileCopyWithImpl<$Res>
implements $ProfileCopyWith<$Res> {
_$ProfileCopyWithImpl(this._self, this._then);
final Profile _self;
final $Res Function(Profile) _then;
/// Create a copy of Profile
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? displayName = null,Object? avatarThumbUrl = freezed,Object? sortOrder = null,Object? createdAt = null,Object? lastUsedAt = freezed,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,displayName: null == displayName ? _self.displayName : displayName // ignore: cast_nullable_to_non_nullable
as String,avatarThumbUrl: freezed == avatarThumbUrl ? _self.avatarThumbUrl : avatarThumbUrl // ignore: cast_nullable_to_non_nullable
as String?,sortOrder: null == sortOrder ? _self.sortOrder : sortOrder // ignore: cast_nullable_to_non_nullable
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,lastUsedAt: freezed == lastUsedAt ? _self.lastUsedAt : lastUsedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
}
/// Adds pattern-matching-related methods to [Profile].
extension ProfilePatterns on Profile {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( LocalProfile value)? local,TResult Function( PlexHomeProfile value)? plexHome,required TResult orElse(),}){
final _that = this;
switch (_that) {
case LocalProfile() when local != null:
return local(_that);case PlexHomeProfile() when plexHome != null:
return plexHome(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( LocalProfile value) local,required TResult Function( PlexHomeProfile value) plexHome,}){
final _that = this;
switch (_that) {
case LocalProfile():
return local(_that);case PlexHomeProfile():
return plexHome(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( LocalProfile value)? local,TResult? Function( PlexHomeProfile value)? plexHome,}){
final _that = this;
switch (_that) {
case LocalProfile() when local != null:
return local(_that);case PlexHomeProfile() when plexHome != null:
return plexHome(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function( String id, String displayName, String? avatarThumbUrl, String? pinHash, int sortOrder, DateTime createdAt, DateTime? lastUsedAt)? local,TResult Function( String id, String displayName, String? avatarThumbUrl, String? parentConnectionId, String? plexHomeUserUuid, bool plexRestricted, bool plexAdmin, bool plexProtected, int sortOrder, DateTime createdAt, DateTime? lastUsedAt)? plexHome,required TResult orElse(),}) {final _that = this;
switch (_that) {
case LocalProfile() when local != null:
return local(_that.id,_that.displayName,_that.avatarThumbUrl,_that.pinHash,_that.sortOrder,_that.createdAt,_that.lastUsedAt);case PlexHomeProfile() when plexHome != null:
return plexHome(_that.id,_that.displayName,_that.avatarThumbUrl,_that.parentConnectionId,_that.plexHomeUserUuid,_that.plexRestricted,_that.plexAdmin,_that.plexProtected,_that.sortOrder,_that.createdAt,_that.lastUsedAt);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function( String id, String displayName, String? avatarThumbUrl, String? pinHash, int sortOrder, DateTime createdAt, DateTime? lastUsedAt) local,required TResult Function( String id, String displayName, String? avatarThumbUrl, String? parentConnectionId, String? plexHomeUserUuid, bool plexRestricted, bool plexAdmin, bool plexProtected, int sortOrder, DateTime createdAt, DateTime? lastUsedAt) plexHome,}) {final _that = this;
switch (_that) {
case LocalProfile():
return local(_that.id,_that.displayName,_that.avatarThumbUrl,_that.pinHash,_that.sortOrder,_that.createdAt,_that.lastUsedAt);case PlexHomeProfile():
return plexHome(_that.id,_that.displayName,_that.avatarThumbUrl,_that.parentConnectionId,_that.plexHomeUserUuid,_that.plexRestricted,_that.plexAdmin,_that.plexProtected,_that.sortOrder,_that.createdAt,_that.lastUsedAt);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function( String id, String displayName, String? avatarThumbUrl, String? pinHash, int sortOrder, DateTime createdAt, DateTime? lastUsedAt)? local,TResult? Function( String id, String displayName, String? avatarThumbUrl, String? parentConnectionId, String? plexHomeUserUuid, bool plexRestricted, bool plexAdmin, bool plexProtected, int sortOrder, DateTime createdAt, DateTime? lastUsedAt)? plexHome,}) {final _that = this;
switch (_that) {
case LocalProfile() when local != null:
return local(_that.id,_that.displayName,_that.avatarThumbUrl,_that.pinHash,_that.sortOrder,_that.createdAt,_that.lastUsedAt);case PlexHomeProfile() when plexHome != null:
return plexHome(_that.id,_that.displayName,_that.avatarThumbUrl,_that.parentConnectionId,_that.plexHomeUserUuid,_that.plexRestricted,_that.plexAdmin,_that.plexProtected,_that.sortOrder,_that.createdAt,_that.lastUsedAt);case _:
return null;
}
}
}
/// @nodoc
class LocalProfile extends Profile {
const LocalProfile({required this.id, required this.displayName, this.avatarThumbUrl, this.pinHash, this.sortOrder = 0, required this.createdAt, this.lastUsedAt}): super._();
@override final String id;
@override final String displayName;
@override final String? avatarThumbUrl;
/// Hashed PIN if set. The raw PIN is never persisted; see [computePinHash].
final String? pinHash;
@override@JsonKey() final int sortOrder;
@override final DateTime createdAt;
@override final DateTime? lastUsedAt;
/// Create a copy of Profile
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$LocalProfileCopyWith<LocalProfile> get copyWith => _$LocalProfileCopyWithImpl<LocalProfile>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is LocalProfile&&(identical(other.id, id) || other.id == id)&&(identical(other.displayName, displayName) || other.displayName == displayName)&&(identical(other.avatarThumbUrl, avatarThumbUrl) || other.avatarThumbUrl == avatarThumbUrl)&&(identical(other.pinHash, pinHash) || other.pinHash == pinHash)&&(identical(other.sortOrder, sortOrder) || other.sortOrder == sortOrder)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.lastUsedAt, lastUsedAt) || other.lastUsedAt == lastUsedAt));
}
@override
int get hashCode => Object.hash(runtimeType,id,displayName,avatarThumbUrl,pinHash,sortOrder,createdAt,lastUsedAt);
@override
String toString() {
return 'Profile.local(id: $id, displayName: $displayName, avatarThumbUrl: $avatarThumbUrl, pinHash: $pinHash, sortOrder: $sortOrder, createdAt: $createdAt, lastUsedAt: $lastUsedAt)';
}
}
/// @nodoc
abstract mixin class $LocalProfileCopyWith<$Res> implements $ProfileCopyWith<$Res> {
factory $LocalProfileCopyWith(LocalProfile value, $Res Function(LocalProfile) _then) = _$LocalProfileCopyWithImpl;
@override @useResult
$Res call({
String id, String displayName, String? avatarThumbUrl, String? pinHash, int sortOrder, DateTime createdAt, DateTime? lastUsedAt
});
}
/// @nodoc
class _$LocalProfileCopyWithImpl<$Res>
implements $LocalProfileCopyWith<$Res> {
_$LocalProfileCopyWithImpl(this._self, this._then);
final LocalProfile _self;
final $Res Function(LocalProfile) _then;
/// Create a copy of Profile
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? displayName = null,Object? avatarThumbUrl = freezed,Object? pinHash = freezed,Object? sortOrder = null,Object? createdAt = null,Object? lastUsedAt = freezed,}) {
return _then(LocalProfile(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,displayName: null == displayName ? _self.displayName : displayName // ignore: cast_nullable_to_non_nullable
as String,avatarThumbUrl: freezed == avatarThumbUrl ? _self.avatarThumbUrl : avatarThumbUrl // ignore: cast_nullable_to_non_nullable
as String?,pinHash: freezed == pinHash ? _self.pinHash : pinHash // ignore: cast_nullable_to_non_nullable
as String?,sortOrder: null == sortOrder ? _self.sortOrder : sortOrder // ignore: cast_nullable_to_non_nullable
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,lastUsedAt: freezed == lastUsedAt ? _self.lastUsedAt : lastUsedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
}
/// @nodoc
class PlexHomeProfile extends Profile {
const PlexHomeProfile({required this.id, required this.displayName, this.avatarThumbUrl, this.parentConnectionId, this.plexHomeUserUuid, this.plexRestricted = false, this.plexAdmin = false, this.plexProtected = false, this.sortOrder = 0, required this.createdAt, this.lastUsedAt}): super._();
@override final String id;
@override final String displayName;
@override final String? avatarThumbUrl;
/// The parent Plex account's connection id.
final String? parentConnectionId;
/// The Plex Home user UUID. Used by the active-profile binder to call
/// `/home/users/{uuid}/switch`.
final String? plexHomeUserUuid;
@JsonKey() final bool plexRestricted;
@JsonKey() final bool plexAdmin;
/// Plex's `protected` flag — true when the home user has a PIN that must
/// be entered before `/home/users/{uuid}/switch` will succeed.
@JsonKey() final bool plexProtected;
@override@JsonKey() final int sortOrder;
@override final DateTime createdAt;
@override final DateTime? lastUsedAt;
/// Create a copy of Profile
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$PlexHomeProfileCopyWith<PlexHomeProfile> get copyWith => _$PlexHomeProfileCopyWithImpl<PlexHomeProfile>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is PlexHomeProfile&&(identical(other.id, id) || other.id == id)&&(identical(other.displayName, displayName) || other.displayName == displayName)&&(identical(other.avatarThumbUrl, avatarThumbUrl) || other.avatarThumbUrl == avatarThumbUrl)&&(identical(other.parentConnectionId, parentConnectionId) || other.parentConnectionId == parentConnectionId)&&(identical(other.plexHomeUserUuid, plexHomeUserUuid) || other.plexHomeUserUuid == plexHomeUserUuid)&&(identical(other.plexRestricted, plexRestricted) || other.plexRestricted == plexRestricted)&&(identical(other.plexAdmin, plexAdmin) || other.plexAdmin == plexAdmin)&&(identical(other.plexProtected, plexProtected) || other.plexProtected == plexProtected)&&(identical(other.sortOrder, sortOrder) || other.sortOrder == sortOrder)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.lastUsedAt, lastUsedAt) || other.lastUsedAt == lastUsedAt));
}
@override
int get hashCode => Object.hash(runtimeType,id,displayName,avatarThumbUrl,parentConnectionId,plexHomeUserUuid,plexRestricted,plexAdmin,plexProtected,sortOrder,createdAt,lastUsedAt);
@override
String toString() {
return 'Profile.plexHome(id: $id, displayName: $displayName, avatarThumbUrl: $avatarThumbUrl, parentConnectionId: $parentConnectionId, plexHomeUserUuid: $plexHomeUserUuid, plexRestricted: $plexRestricted, plexAdmin: $plexAdmin, plexProtected: $plexProtected, sortOrder: $sortOrder, createdAt: $createdAt, lastUsedAt: $lastUsedAt)';
}
}
/// @nodoc
abstract mixin class $PlexHomeProfileCopyWith<$Res> implements $ProfileCopyWith<$Res> {
factory $PlexHomeProfileCopyWith(PlexHomeProfile value, $Res Function(PlexHomeProfile) _then) = _$PlexHomeProfileCopyWithImpl;
@override @useResult
$Res call({
String id, String displayName, String? avatarThumbUrl, String? parentConnectionId, String? plexHomeUserUuid, bool plexRestricted, bool plexAdmin, bool plexProtected, int sortOrder, DateTime createdAt, DateTime? lastUsedAt
});
}
/// @nodoc
class _$PlexHomeProfileCopyWithImpl<$Res>
implements $PlexHomeProfileCopyWith<$Res> {
_$PlexHomeProfileCopyWithImpl(this._self, this._then);
final PlexHomeProfile _self;
final $Res Function(PlexHomeProfile) _then;
/// Create a copy of Profile
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? displayName = null,Object? avatarThumbUrl = freezed,Object? parentConnectionId = freezed,Object? plexHomeUserUuid = freezed,Object? plexRestricted = null,Object? plexAdmin = null,Object? plexProtected = null,Object? sortOrder = null,Object? createdAt = null,Object? lastUsedAt = freezed,}) {
return _then(PlexHomeProfile(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,displayName: null == displayName ? _self.displayName : displayName // ignore: cast_nullable_to_non_nullable
as String,avatarThumbUrl: freezed == avatarThumbUrl ? _self.avatarThumbUrl : avatarThumbUrl // ignore: cast_nullable_to_non_nullable
as String?,parentConnectionId: freezed == parentConnectionId ? _self.parentConnectionId : parentConnectionId // ignore: cast_nullable_to_non_nullable
as String?,plexHomeUserUuid: freezed == plexHomeUserUuid ? _self.plexHomeUserUuid : plexHomeUserUuid // ignore: cast_nullable_to_non_nullable
as String?,plexRestricted: null == plexRestricted ? _self.plexRestricted : plexRestricted // ignore: cast_nullable_to_non_nullable
as bool,plexAdmin: null == plexAdmin ? _self.plexAdmin : plexAdmin // ignore: cast_nullable_to_non_nullable
as bool,plexProtected: null == plexProtected ? _self.plexProtected : plexProtected // ignore: cast_nullable_to_non_nullable
as bool,sortOrder: null == sortOrder ? _self.sortOrder : sortOrder // ignore: cast_nullable_to_non_nullable
as int,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,lastUsedAt: freezed == lastUsedAt ? _self.lastUsedAt : lastUsedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
}
// dart format on
+16 -40
View File
@@ -1,3 +1,7 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'profile_connection.freezed.dart';
/// A binding between a [Profile] and a [Connection], carrying the
/// per-profile user-level token used when the profile is active.
///
@@ -9,47 +13,19 @@
///
/// For Jellyfin: [userToken] mirrors the Connection's accessToken (one
/// user per connection); [userIdentifier] is the Jellyfin user id.
class ProfileConnection {
final String profileId;
final String connectionId;
final String? userToken;
final String userIdentifier;
final bool isDefault;
final DateTime? tokenAcquiredAt;
final DateTime? lastUsedAt;
@freezed
sealed class ProfileConnection with _$ProfileConnection {
const ProfileConnection._();
const ProfileConnection({
required this.profileId,
required this.connectionId,
this.userToken,
required this.userIdentifier,
this.isDefault = false,
this.tokenAcquiredAt,
this.lastUsedAt,
});
const factory ProfileConnection({
required String profileId,
required String connectionId,
String? userToken,
required String userIdentifier,
@Default(false) bool isDefault,
DateTime? tokenAcquiredAt,
DateTime? lastUsedAt,
}) = _ProfileConnection;
bool get hasToken => userToken != null && userToken!.isNotEmpty;
ProfileConnection copyWith({
String? profileId,
String? connectionId,
String? userToken,
bool clearUserToken = false,
String? userIdentifier,
bool? isDefault,
DateTime? tokenAcquiredAt,
bool clearTokenAcquiredAt = false,
DateTime? lastUsedAt,
bool clearLastUsedAt = false,
}) {
return ProfileConnection(
profileId: profileId ?? this.profileId,
connectionId: connectionId ?? this.connectionId,
userToken: clearUserToken ? null : (userToken ?? this.userToken),
userIdentifier: userIdentifier ?? this.userIdentifier,
isDefault: isDefault ?? this.isDefault,
tokenAcquiredAt: clearTokenAcquiredAt ? null : (tokenAcquiredAt ?? this.tokenAcquiredAt),
lastUsedAt: clearLastUsedAt ? null : (lastUsedAt ?? this.lastUsedAt),
);
}
}
@@ -0,0 +1,283 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'profile_connection.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ProfileConnection {
String get profileId; String get connectionId; String? get userToken; String get userIdentifier; bool get isDefault; DateTime? get tokenAcquiredAt; DateTime? get lastUsedAt;
/// Create a copy of ProfileConnection
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ProfileConnectionCopyWith<ProfileConnection> get copyWith => _$ProfileConnectionCopyWithImpl<ProfileConnection>(this as ProfileConnection, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ProfileConnection&&(identical(other.profileId, profileId) || other.profileId == profileId)&&(identical(other.connectionId, connectionId) || other.connectionId == connectionId)&&(identical(other.userToken, userToken) || other.userToken == userToken)&&(identical(other.userIdentifier, userIdentifier) || other.userIdentifier == userIdentifier)&&(identical(other.isDefault, isDefault) || other.isDefault == isDefault)&&(identical(other.tokenAcquiredAt, tokenAcquiredAt) || other.tokenAcquiredAt == tokenAcquiredAt)&&(identical(other.lastUsedAt, lastUsedAt) || other.lastUsedAt == lastUsedAt));
}
@override
int get hashCode => Object.hash(runtimeType,profileId,connectionId,userToken,userIdentifier,isDefault,tokenAcquiredAt,lastUsedAt);
@override
String toString() {
return 'ProfileConnection(profileId: $profileId, connectionId: $connectionId, userToken: $userToken, userIdentifier: $userIdentifier, isDefault: $isDefault, tokenAcquiredAt: $tokenAcquiredAt, lastUsedAt: $lastUsedAt)';
}
}
/// @nodoc
abstract mixin class $ProfileConnectionCopyWith<$Res> {
factory $ProfileConnectionCopyWith(ProfileConnection value, $Res Function(ProfileConnection) _then) = _$ProfileConnectionCopyWithImpl;
@useResult
$Res call({
String profileId, String connectionId, String? userToken, String userIdentifier, bool isDefault, DateTime? tokenAcquiredAt, DateTime? lastUsedAt
});
}
/// @nodoc
class _$ProfileConnectionCopyWithImpl<$Res>
implements $ProfileConnectionCopyWith<$Res> {
_$ProfileConnectionCopyWithImpl(this._self, this._then);
final ProfileConnection _self;
final $Res Function(ProfileConnection) _then;
/// Create a copy of ProfileConnection
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? profileId = null,Object? connectionId = null,Object? userToken = freezed,Object? userIdentifier = null,Object? isDefault = null,Object? tokenAcquiredAt = freezed,Object? lastUsedAt = freezed,}) {
return _then(_self.copyWith(
profileId: null == profileId ? _self.profileId : profileId // ignore: cast_nullable_to_non_nullable
as String,connectionId: null == connectionId ? _self.connectionId : connectionId // ignore: cast_nullable_to_non_nullable
as String,userToken: freezed == userToken ? _self.userToken : userToken // ignore: cast_nullable_to_non_nullable
as String?,userIdentifier: null == userIdentifier ? _self.userIdentifier : userIdentifier // ignore: cast_nullable_to_non_nullable
as String,isDefault: null == isDefault ? _self.isDefault : isDefault // ignore: cast_nullable_to_non_nullable
as bool,tokenAcquiredAt: freezed == tokenAcquiredAt ? _self.tokenAcquiredAt : tokenAcquiredAt // ignore: cast_nullable_to_non_nullable
as DateTime?,lastUsedAt: freezed == lastUsedAt ? _self.lastUsedAt : lastUsedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
}
/// Adds pattern-matching-related methods to [ProfileConnection].
extension ProfileConnectionPatterns on ProfileConnection {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ProfileConnection value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ProfileConnection() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ProfileConnection value) $default,){
final _that = this;
switch (_that) {
case _ProfileConnection():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ProfileConnection value)? $default,){
final _that = this;
switch (_that) {
case _ProfileConnection() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String profileId, String connectionId, String? userToken, String userIdentifier, bool isDefault, DateTime? tokenAcquiredAt, DateTime? lastUsedAt)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ProfileConnection() when $default != null:
return $default(_that.profileId,_that.connectionId,_that.userToken,_that.userIdentifier,_that.isDefault,_that.tokenAcquiredAt,_that.lastUsedAt);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String profileId, String connectionId, String? userToken, String userIdentifier, bool isDefault, DateTime? tokenAcquiredAt, DateTime? lastUsedAt) $default,) {final _that = this;
switch (_that) {
case _ProfileConnection():
return $default(_that.profileId,_that.connectionId,_that.userToken,_that.userIdentifier,_that.isDefault,_that.tokenAcquiredAt,_that.lastUsedAt);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String profileId, String connectionId, String? userToken, String userIdentifier, bool isDefault, DateTime? tokenAcquiredAt, DateTime? lastUsedAt)? $default,) {final _that = this;
switch (_that) {
case _ProfileConnection() when $default != null:
return $default(_that.profileId,_that.connectionId,_that.userToken,_that.userIdentifier,_that.isDefault,_that.tokenAcquiredAt,_that.lastUsedAt);case _:
return null;
}
}
}
/// @nodoc
class _ProfileConnection extends ProfileConnection {
const _ProfileConnection({required this.profileId, required this.connectionId, this.userToken, required this.userIdentifier, this.isDefault = false, this.tokenAcquiredAt, this.lastUsedAt}): super._();
@override final String profileId;
@override final String connectionId;
@override final String? userToken;
@override final String userIdentifier;
@override@JsonKey() final bool isDefault;
@override final DateTime? tokenAcquiredAt;
@override final DateTime? lastUsedAt;
/// Create a copy of ProfileConnection
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ProfileConnectionCopyWith<_ProfileConnection> get copyWith => __$ProfileConnectionCopyWithImpl<_ProfileConnection>(this, _$identity);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ProfileConnection&&(identical(other.profileId, profileId) || other.profileId == profileId)&&(identical(other.connectionId, connectionId) || other.connectionId == connectionId)&&(identical(other.userToken, userToken) || other.userToken == userToken)&&(identical(other.userIdentifier, userIdentifier) || other.userIdentifier == userIdentifier)&&(identical(other.isDefault, isDefault) || other.isDefault == isDefault)&&(identical(other.tokenAcquiredAt, tokenAcquiredAt) || other.tokenAcquiredAt == tokenAcquiredAt)&&(identical(other.lastUsedAt, lastUsedAt) || other.lastUsedAt == lastUsedAt));
}
@override
int get hashCode => Object.hash(runtimeType,profileId,connectionId,userToken,userIdentifier,isDefault,tokenAcquiredAt,lastUsedAt);
@override
String toString() {
return 'ProfileConnection(profileId: $profileId, connectionId: $connectionId, userToken: $userToken, userIdentifier: $userIdentifier, isDefault: $isDefault, tokenAcquiredAt: $tokenAcquiredAt, lastUsedAt: $lastUsedAt)';
}
}
/// @nodoc
abstract mixin class _$ProfileConnectionCopyWith<$Res> implements $ProfileConnectionCopyWith<$Res> {
factory _$ProfileConnectionCopyWith(_ProfileConnection value, $Res Function(_ProfileConnection) _then) = __$ProfileConnectionCopyWithImpl;
@override @useResult
$Res call({
String profileId, String connectionId, String? userToken, String userIdentifier, bool isDefault, DateTime? tokenAcquiredAt, DateTime? lastUsedAt
});
}
/// @nodoc
class __$ProfileConnectionCopyWithImpl<$Res>
implements _$ProfileConnectionCopyWith<$Res> {
__$ProfileConnectionCopyWithImpl(this._self, this._then);
final _ProfileConnection _self;
final $Res Function(_ProfileConnection) _then;
/// Create a copy of ProfileConnection
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? profileId = null,Object? connectionId = null,Object? userToken = freezed,Object? userIdentifier = null,Object? isDefault = null,Object? tokenAcquiredAt = freezed,Object? lastUsedAt = freezed,}) {
return _then(_ProfileConnection(
profileId: null == profileId ? _self.profileId : profileId // ignore: cast_nullable_to_non_nullable
as String,connectionId: null == connectionId ? _self.connectionId : connectionId // ignore: cast_nullable_to_non_nullable
as String,userToken: freezed == userToken ? _self.userToken : userToken // ignore: cast_nullable_to_non_nullable
as String?,userIdentifier: null == userIdentifier ? _self.userIdentifier : userIdentifier // ignore: cast_nullable_to_non_nullable
as String,isDefault: null == isDefault ? _self.isDefault : isDefault // ignore: cast_nullable_to_non_nullable
as bool,tokenAcquiredAt: freezed == tokenAcquiredAt ? _self.tokenAcquiredAt : tokenAcquiredAt // ignore: cast_nullable_to_non_nullable
as DateTime?,lastUsedAt: freezed == lastUsedAt ? _self.lastUsedAt : lastUsedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
}
// dart format on
+22 -9
View File
@@ -459,7 +459,11 @@ class CompanionRemoteProvider with ChangeNotifier, DisposableChangeNotifierMixin
final contexts = List<RemoteAuthContext>.unmodifiable(_authContexts);
final result = await _peerService!.createSessionForContexts(_deviceName, _platform, contexts);
_session = RemoteSession(role: RemoteSessionRole.host, status: RemoteSessionStatus.connected);
_session = RemoteSession(
role: RemoteSessionRole.host,
status: RemoteSessionStatus.connected,
createdAt: DateTime.now(),
);
safeNotifyListeners();
// Start LAN discovery broadcasting
@@ -480,6 +484,7 @@ class CompanionRemoteProvider with ChangeNotifier, DisposableChangeNotifierMixin
role: RemoteSessionRole.host,
status: RemoteSessionStatus.error,
errorMessage: e.toString(),
createdAt: DateTime.now(),
);
safeNotifyListeners();
}
@@ -538,7 +543,11 @@ class CompanionRemoteProvider with ChangeNotifier, DisposableChangeNotifierMixin
_peerService = CompanionRemotePeerService();
_setupPeerServiceListeners();
_session = RemoteSession(role: RemoteSessionRole.remote, status: RemoteSessionStatus.connecting);
_session = RemoteSession(
role: RemoteSessionRole.remote,
status: RemoteSessionStatus.connecting,
createdAt: DateTime.now(),
);
safeNotifyListeners();
try {
@@ -582,7 +591,11 @@ class CompanionRemoteProvider with ChangeNotifier, DisposableChangeNotifierMixin
_peerService = CompanionRemotePeerService();
_setupPeerServiceListeners();
_session = RemoteSession(role: RemoteSessionRole.remote, status: RemoteSessionStatus.connecting);
_session = RemoteSession(
role: RemoteSessionRole.remote,
status: RemoteSessionStatus.connecting,
createdAt: DateTime.now(),
);
safeNotifyListeners();
try {
@@ -629,13 +642,13 @@ class CompanionRemoteProvider with ChangeNotifier, DisposableChangeNotifierMixin
_deviceDisconnectedSubscription = _peerService!.onDeviceDisconnected.listen((_) {
appLogger.d('CompanionRemote: Device disconnected (intentional: $_intentionalDisconnect)');
if (_intentionalDisconnect) {
_session = _session?.copyWith(status: RemoteSessionStatus.disconnected, clearConnectedDevice: true);
_session = _session?.copyWith(status: RemoteSessionStatus.disconnected, connectedDevice: null);
safeNotifyListeners();
} else if (isHost) {
_session = _session?.copyWith(
status: RemoteSessionStatus.reconnecting,
clearConnectedDevice: true,
clearErrorMessage: true,
connectedDevice: null,
errorMessage: null,
);
safeNotifyListeners();
appLogger.d('CompanionRemote: Host waiting for client to reconnect');
@@ -668,7 +681,7 @@ class CompanionRemoteProvider with ChangeNotifier, DisposableChangeNotifierMixin
appLogger.d('CompanionRemote: Device info - name: $name, platform: $platform, role: $role');
final device = RemoteDevice(id: id, name: name, platform: platform);
final device = RemoteDevice(id: id, name: name, platform: platform, connectedAt: DateTime.now());
_session = _session?.copyWith(connectedDevice: device);
safeNotifyListeners();
@@ -756,7 +769,7 @@ class CompanionRemoteProvider with ChangeNotifier, DisposableChangeNotifierMixin
_lastAuthContextId = _peerService!.selectedAuthContextId ?? authContextId;
_lastHostClientId = _peerService!.selectedHostClientId ?? _lastHostClientId;
_session = _session?.copyWith(status: RemoteSessionStatus.connected, clearErrorMessage: true);
_session = _session?.copyWith(status: RemoteSessionStatus.connected, errorMessage: null);
_reconnectAttempts = 0;
safeNotifyListeners();
appLogger.d('CompanionRemote: Reconnected successfully');
@@ -777,7 +790,7 @@ class CompanionRemoteProvider with ChangeNotifier, DisposableChangeNotifierMixin
void cancelReconnect() {
_reconnectTimer?.cancel();
_reconnectAttempts = 0;
_session = _session?.copyWith(status: RemoteSessionStatus.disconnected, clearConnectedDevice: true);
_session = _session?.copyWith(status: RemoteSessionStatus.disconnected, connectedDevice: null);
safeNotifyListeners();
}
+29 -4
View File
@@ -880,6 +880,8 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
DownloadFilter filter = DownloadFilter.all,
int? maxCount,
}) async {
if (!_downloadManager.downloadsSupported) return 0;
final globalKey = metadata.globalKey;
final config = versionConfig ?? DownloadVersionConfig();
@@ -942,6 +944,8 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
DownloadFilter filter = DownloadFilter.all,
bool expandShows = true,
}) async {
if (!_downloadManager.downloadsSupported) return 0;
if (await DownloadManagerService.shouldBlockDownloadOnCellular()) {
throw CellularDownloadBlockedException();
}
@@ -965,9 +969,9 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
// was the same pattern as collectEpisodes*, just inlined.
final episodes = <MediaItem>[];
if (item.isShow) {
await collectEpisodesForShow(client, item.id, unwatchedOnly: unwatchedOnly, out: episodes);
await collectEpisodesForShow(client, item.id, unwatchedOnly: unwatchedOnly, out: episodes, fallback: item);
} else {
await collectEpisodesForSeason(client, item.id, unwatchedOnly: unwatchedOnly, out: episodes);
await collectEpisodesForSeason(client, item.id, unwatchedOnly: unwatchedOnly, out: episodes, fallback: item);
}
for (final ep in episodes) {
await queueItem(ep);
@@ -988,6 +992,8 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
int mediaIndex = 0,
DownloadVersionConfig? versionConfig,
}) async {
if (!_downloadManager.downloadsSupported) return false;
_requireActiveProfileId();
final globalKey = metadata.globalKey;
@@ -1022,6 +1028,8 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
metadataToStore = fullMetadata.copyWith(
serverId: metadata.serverId ?? fullMetadata.serverId,
serverName: metadata.serverName ?? fullMetadata.serverName,
libraryId: fullMetadata.libraryId ?? metadata.libraryId,
libraryTitle: fullMetadata.libraryTitle ?? metadata.libraryTitle,
);
}
} catch (e) {
@@ -1191,9 +1199,21 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
final unwatchedOnly = filter == DownloadFilter.unwatched;
final episodes = <MediaItem>[];
if (container.kind == MediaKind.show) {
await collectEpisodesForShow(client, container.id, unwatchedOnly: unwatchedOnly, out: episodes);
await collectEpisodesForShow(
client,
container.id,
unwatchedOnly: unwatchedOnly,
out: episodes,
fallback: container,
);
} else {
await collectEpisodesForSeason(client, container.id, unwatchedOnly: unwatchedOnly, out: episodes);
await collectEpisodesForSeason(
client,
container.id,
unwatchedOnly: unwatchedOnly,
out: episodes,
fallback: container,
);
}
int count = 0;
@@ -1370,6 +1390,7 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
/// Resume queued downloads that were interrupted by app kill.
/// Call after a [MediaServerClient] becomes available (e.g. after server connect on launch).
void resumeQueuedDownloads(MediaServerClient client) {
if (!_downloadManager.downloadsSupported) return;
_downloadManager.resumeQueuedDownloads(client);
}
@@ -1639,6 +1660,8 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
///
/// Returns titles of newly queued items (for snackbar display).
Future<List<String>> executeSyncRules(MultiServerManager serverManager, {bool force = false}) async {
if (!_downloadManager.downloadsSupported) return [];
final profileId = _activeProfileId;
if (profileId == null || profileId.isEmpty) return [];
if (_syncRules.isEmpty) return [];
@@ -1662,6 +1685,8 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
/// Execute a single sync rule immediately (eager path for `addToPlaylist` /
/// `addToCollection`). Bypasses the cooldown.
Future<SyncRuleResult?> executeSyncRuleFor(String globalKey, MultiServerManager serverManager) async {
if (!_downloadManager.downloadsSupported) return null;
final profileId = _activeProfileId;
if (profileId == null || profileId.isEmpty) return null;
if (!_syncRules.containsKey(globalKey)) return null;

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