Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b796491e60 | ||
|
|
2ad06c4dbc | ||
|
|
3494fbc5be | ||
|
|
c2ff56b1f1 | ||
|
|
95436529c6 | ||
|
|
ad7f381f54 | ||
|
|
d50a86501b | ||
|
|
d9bc7d6b86 | ||
|
|
8ab972691a | ||
|
|
47cb3f2614 | ||
|
|
743f2bb9f2 | ||
|
|
5f4c5a012b | ||
|
|
dae1750d86 | ||
|
|
e9d1055c60 | ||
|
|
c2933c0fdf | ||
|
|
e252532988 | ||
|
|
16087cf640 | ||
|
|
4804a25c1e | ||
|
|
a74838d914 | ||
|
|
b396464f70 | ||
|
|
f9198c7d7a | ||
|
|
f4753e6b2e | ||
|
|
3c5739eefd | ||
|
|
d8d39cca86 | ||
|
|
84c255b917 | ||
|
|
44007e6564 | ||
|
|
2dfebf32b6 | ||
|
|
b27aa9cbda | ||
|
|
1bce10a6a4 | ||
|
|
c018cfef03 | ||
|
|
d340536578 | ||
|
|
1419f6e043 | ||
|
|
722b53c0b9 | ||
|
|
c61b2301a6 | ||
|
|
14f0e95a3d | ||
|
|
688ad291bd | ||
|
|
2644c3ca55 | ||
|
|
2f3774db3d | ||
|
|
e11ebca370 | ||
|
|
bed2c35d97 | ||
|
|
8db30c1568 | ||
|
|
c6727baf07 | ||
|
|
d9350d704f | ||
|
|
3620f89ec8 | ||
|
|
789f1f468d | ||
|
|
b1d2b4f3f1 | ||
|
|
289ca393c7 | ||
|
|
a52b62c1b1 | ||
|
|
90ecfe8ff0 | ||
|
|
ab915d0258 | ||
|
|
0f704230f0 | ||
|
|
63ba2bb3de | ||
|
|
79ac2793e3 | ||
|
|
3c89d0eba8 | ||
|
|
e072960d36 | ||
|
|
fb17600bb0 | ||
|
|
a2a5a5ae55 | ||
|
|
00d6f920f0 | ||
|
|
5f78bbe93a | ||
|
|
b1c44e639c | ||
|
|
81393fea19 | ||
|
|
18c7661c3d | ||
|
|
8a184f6ae6 | ||
|
|
6f6c403437 | ||
|
|
44245b2340 | ||
|
|
da96ca00b4 | ||
|
|
0e62d92287 | ||
|
|
fe7f4fe744 | ||
|
|
95585ad222 | ||
|
|
f4dbaffc23 | ||
|
|
3313239b4b | ||
|
|
661913f7c9 | ||
|
|
867992e96b | ||
|
|
18c322f66a | ||
|
|
f43fbd0951 | ||
|
|
0eb84dc7d2 | ||
|
|
11461eefe5 | ||
|
|
b0ee43d8cd | ||
|
|
263eddbdba | ||
|
|
bf26894231 | ||
|
|
9f4818d5c5 | ||
|
|
dc44354036 | ||
|
|
b7c630f10e | ||
|
|
f31ef704a3 | ||
|
|
e53ba988aa | ||
|
|
471c913ee3 | ||
|
|
8b3024b71a | ||
|
|
3eedb615ef | ||
|
|
ac3f7a0b1d | ||
|
|
32dab8953b | ||
|
|
c6f41398a9 | ||
|
|
65811cd0b2 | ||
|
|
851d74e418 | ||
|
|
e804a2a3cc | ||
|
|
c9003e0a03 | ||
|
|
12969eeff9 | ||
|
|
f24bb9dc85 | ||
|
|
4d65607e59 | ||
|
|
80d60077d7 | ||
|
|
d9ea099727 | ||
|
|
223065cab0 | ||
|
|
a373477105 | ||
|
|
7b0aa12c38 | ||
|
|
888d232819 | ||
|
|
6c45706ea3 | ||
|
|
2a15126119 | ||
|
|
392ee575d0 | ||
|
|
6db21d93bb | ||
|
|
4eed2aa3d2 | ||
|
|
cc9cdc8f26 | ||
|
|
20933d3543 | ||
|
|
dc01c5af2f | ||
|
|
aa1a05f207 | ||
|
|
b3c64d62ab | ||
|
|
ac154082cd | ||
|
|
01e5648e28 | ||
|
|
1d50763d9b | ||
|
|
074a6e7e7d | ||
|
|
252da585e3 | ||
|
|
7d75f6e749 | ||
|
|
6b150f7304 | ||
|
|
e73bcd7e4b | ||
|
|
8f817815e6 | ||
|
|
ac7b867f54 | ||
|
|
87dd16d322 | ||
|
|
04b8396d13 | ||
|
|
a4dccb0198 | ||
|
|
74b34bcc77 | ||
|
|
6efc3638d4 | ||
|
|
7f23979e03 | ||
|
|
d214ade2c6 | ||
|
|
a71354d9c5 | ||
|
|
b1dd33ad7a | ||
|
|
2231f42f55 | ||
|
|
4339e00fe2 | ||
|
|
a7a4c641a7 | ||
|
|
cd8592e7e3 | ||
|
|
8a9d889311 | ||
|
|
8b88862a10 | ||
|
|
09860f81c8 | ||
|
|
dff51ca888 | ||
|
|
ecf046a92d | ||
|
|
aaf3e3651b | ||
|
|
78a5ff0fe0 | ||
|
|
a6f0a0b6c0 | ||
|
|
865cba5f9a | ||
|
|
58fd282100 | ||
|
|
75007a6f42 | ||
|
|
6154480c99 | ||
|
|
7c6a121752 | ||
|
|
73eda7c918 | ||
|
|
6d9a56fa73 | ||
|
|
08f92da41b | ||
|
|
a122fb048e | ||
|
|
4cc2426bff | ||
|
|
8a826f0035 | ||
|
|
ae4673bde7 | ||
|
|
920658485f | ||
|
|
e0fd77d7de | ||
|
|
1daded6ec6 | ||
|
|
d9cdde66d8 | ||
|
|
0a6f7c358e | ||
|
|
bc6ee79aef | ||
|
|
bf7e10b1cb | ||
|
|
e30d20e6d1 | ||
|
|
055765ead7 | ||
|
|
26fc38a5ba | ||
|
|
5cbec2398a | ||
|
|
e69644a98e | ||
|
|
c21c5396cd | ||
|
|
01bb1126ef | ||
|
|
0d0388f7a8 | ||
|
|
6ae64e6057 | ||
|
|
44dcdccb2c |
@@ -0,0 +1 @@
|
||||
github: edde746
|
||||
@@ -63,11 +63,11 @@ body:
|
||||
description: Which platform(s) are affected?
|
||||
multiple: true
|
||||
options:
|
||||
- Android
|
||||
- iOS
|
||||
- Web
|
||||
- macOS
|
||||
- Android
|
||||
- Windows
|
||||
- macOS
|
||||
- Android TV
|
||||
- Linux
|
||||
validations:
|
||||
required: true
|
||||
|
||||
@@ -49,11 +49,11 @@ body:
|
||||
description: Which platform(s) should this feature target?
|
||||
multiple: true
|
||||
options:
|
||||
- Android
|
||||
- iOS
|
||||
- Web
|
||||
- macOS
|
||||
- Android
|
||||
- Windows
|
||||
- macOS
|
||||
- Android TV
|
||||
- Linux
|
||||
- All platforms
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Build Flutter App
|
||||
name: Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -57,27 +57,35 @@ jobs:
|
||||
storeFile=upload-keystore.jks
|
||||
EOF
|
||||
|
||||
- name: Build APK
|
||||
run: flutter build apk --release --dart-define=ENABLE_UPDATE_CHECK=true
|
||||
- name: Build APKs
|
||||
run: flutter build apk --release --split-per-abi --dart-define=ENABLE_UPDATE_CHECK=true
|
||||
|
||||
- name: Clean up keystore
|
||||
if: always()
|
||||
run: rm -f android/app/upload-keystore.jks android/key.properties
|
||||
|
||||
- name: Rename APK
|
||||
- name: Package APKs
|
||||
run: |
|
||||
cp build/app/outputs/flutter-apk/app-release.apk plezy-android.apk
|
||||
tar -czf plezy-android-arm64-v8a.tar.gz -C build/app/outputs/flutter-apk app-arm64-v8a-release.apk --transform 's/app-arm64-v8a-release.apk/plezy.apk/'
|
||||
tar -czf plezy-android-armeabi-v7a.tar.gz -C build/app/outputs/flutter-apk app-armeabi-v7a-release.apk --transform 's/app-armeabi-v7a-release.apk/plezy.apk/'
|
||||
tar -czf plezy-android-x86_64.tar.gz -C build/app/outputs/flutter-apk app-x86_64-release.apk --transform 's/app-x86_64-release.apk/plezy.apk/'
|
||||
|
||||
- name: Attest APK
|
||||
- name: Attest APKs
|
||||
uses: actions/attest-build-provenance@v2
|
||||
with:
|
||||
subject-path: plezy-android.apk
|
||||
subject-path: |
|
||||
plezy-android-arm64-v8a.tar.gz
|
||||
plezy-android-armeabi-v7a.tar.gz
|
||||
plezy-android-x86_64.tar.gz
|
||||
|
||||
- name: Upload APK
|
||||
- name: Upload APKs
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: android-apk
|
||||
path: plezy-android.apk
|
||||
path: |
|
||||
plezy-android-arm64-v8a.tar.gz
|
||||
plezy-android-armeabi-v7a.tar.gz
|
||||
plezy-android-x86_64.tar.gz
|
||||
|
||||
build-ios:
|
||||
runs-on: macos-26
|
||||
@@ -254,21 +262,23 @@ jobs:
|
||||
echo "Verifying notarization..."
|
||||
xcrun stapler validate "$APP_PATH"
|
||||
|
||||
- name: Create ZIP
|
||||
- name: Create DMG
|
||||
run: |
|
||||
cd build/macos/Build/Products/Release
|
||||
ditto -c -k --sequesterRsrc --keepParent plezy.app $GITHUB_WORKSPACE/plezy-macos.zip
|
||||
mkdir -p dmg-staging
|
||||
cp -R build/macos/Build/Products/Release/plezy.app dmg-staging/
|
||||
ln -s /Applications dmg-staging/Applications
|
||||
hdiutil create -format ULMO -srcfolder dmg-staging -volname "Plezy" plezy-macos.dmg
|
||||
|
||||
- name: Attest macOS ZIP
|
||||
- name: Attest macOS DMG
|
||||
uses: actions/attest-build-provenance@v2
|
||||
with:
|
||||
subject-path: plezy-macos.zip
|
||||
subject-path: plezy-macos.dmg
|
||||
|
||||
- name: Upload macOS ZIP
|
||||
- name: Upload macOS DMG
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-zip
|
||||
path: plezy-macos.zip
|
||||
name: macos-dmg
|
||||
path: plezy-macos.dmg
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
@@ -307,14 +317,14 @@ jobs:
|
||||
uses: actions/attest-build-provenance@v2
|
||||
with:
|
||||
subject-path: |
|
||||
plezy-windows-portable.zip
|
||||
plezy-windows-portable.7z
|
||||
plezy-windows-installer.exe
|
||||
|
||||
- name: Upload Portable Archive
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-portable
|
||||
path: plezy-windows-portable.zip
|
||||
path: plezy-windows-portable.7z
|
||||
|
||||
- name: Upload Installer
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -349,13 +359,16 @@ jobs:
|
||||
- name: Cache APT packages
|
||||
uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev libasound2-dev libmpv-dev mpv keybinder-3.0
|
||||
version: 1.0
|
||||
packages: clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev libasound2-dev libmpv-dev mpv keybinder-3.0 ruby ruby-dev rubygems build-essential rpm libarchive-tools imagemagick
|
||||
version: 1.1
|
||||
|
||||
- name: Install Linux dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev libasound2-dev libmpv-dev mpv keybinder-3.0
|
||||
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev libasound2-dev libmpv-dev mpv keybinder-3.0 ruby ruby-dev rubygems build-essential rpm libarchive-tools imagemagick
|
||||
|
||||
- name: Install fpm
|
||||
run: sudo gem install fpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
@@ -368,10 +381,17 @@ jobs:
|
||||
cd build/linux/x64/release/bundle
|
||||
tar -czf $GITHUB_WORKSPACE/plezy-linux.tar.gz *
|
||||
|
||||
- name: Attest Linux tarball
|
||||
- name: Build Linux Packages
|
||||
run: OUTPUT_DIR=$GITHUB_WORKSPACE python3 linux/packaging/build-packages.py
|
||||
|
||||
- name: Attest Linux artifacts
|
||||
uses: actions/attest-build-provenance@v2
|
||||
with:
|
||||
subject-path: plezy-linux.tar.gz
|
||||
subject-path: |
|
||||
plezy-linux.tar.gz
|
||||
plezy-linux.deb
|
||||
plezy-linux.rpm
|
||||
plezy-linux.pkg.tar.zst
|
||||
|
||||
- name: Upload Linux App
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -379,15 +399,17 @@ jobs:
|
||||
name: linux-app
|
||||
path: plezy-linux.tar.gz
|
||||
|
||||
- name: Upload Linux Packages
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-packages
|
||||
path: |
|
||||
plezy-linux.deb
|
||||
plezy-linux.rpm
|
||||
plezy-linux.pkg.tar.zst
|
||||
|
||||
create-release:
|
||||
needs:
|
||||
[
|
||||
build-android,
|
||||
build-ios,
|
||||
build-macos,
|
||||
build-windows,
|
||||
build-linux,
|
||||
]
|
||||
needs: [build-android, build-ios, build-macos, build-windows, build-linux]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -404,12 +426,15 @@ jobs:
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
artifacts/android-apk/plezy-android.apk
|
||||
artifacts/android-apk/plezy-android-arm64-v8a.tar.gz
|
||||
artifacts/android-apk/plezy-android-armeabi-v7a.tar.gz
|
||||
artifacts/android-apk/plezy-android-x86_64.tar.gz
|
||||
artifacts/ios-ipa/plezy-ios.ipa
|
||||
artifacts/macos-zip/plezy-macos.zip
|
||||
artifacts/windows-portable/plezy-windows-portable.zip
|
||||
artifacts/macos-dmg/plezy-macos.dmg
|
||||
artifacts/windows-portable/plezy-windows-portable.7z
|
||||
artifacts/windows-installer/plezy-windows-installer.exe
|
||||
artifacts/linux-app/plezy-linux.tar.gz
|
||||
artifacts/linux-packages/*
|
||||
draft: true
|
||||
prerelease: false
|
||||
generate_release_notes: true
|
||||
|
||||
@@ -54,16 +54,10 @@ jobs:
|
||||
- name: Analyze code
|
||||
run: |
|
||||
# Run flutter analyze
|
||||
# Fails on any errors or warnings (info messages are allowed)
|
||||
flutter analyze 2>&1 | tee analyze_output.txt
|
||||
# Fails on errors or warnings only (info messages are allowed)
|
||||
flutter analyze 2>&1 | tee analyze_output.txt || true
|
||||
|
||||
# Check the exit status
|
||||
if [ ${PIPESTATUS[0]} -ne 0 ]; then
|
||||
echo "❌ Analysis failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Also verify no warnings or errors in output
|
||||
# Check output for errors or warnings
|
||||
if grep -q "error •" analyze_output.txt; then
|
||||
echo "❌ Analysis failed with errors"
|
||||
exit 1
|
||||
@@ -71,7 +65,7 @@ jobs:
|
||||
echo "⚠️ Analysis completed with warnings"
|
||||
exit 1
|
||||
else
|
||||
echo "✅ Analysis passed - no issues found!"
|
||||
echo "✅ Analysis passed!"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
# Privacy Policy for Plezy
|
||||
|
||||
**Last Updated: October 22, 2025**
|
||||
|
||||
## Introduction
|
||||
|
||||
Plezy ("we", "our", or "the app") is a third-party Plex client that allows you to access and stream content from your Plex Media Server. This privacy policy explains how we handle your information when you use our app.
|
||||
|
||||
## Information We Collect
|
||||
|
||||
### Authentication Information
|
||||
When you sign in to Plezy using your Plex account, we collect and process:
|
||||
- Plex authentication tokens
|
||||
- Plex account username
|
||||
- Plex server connection information
|
||||
|
||||
### Local Network Information
|
||||
To connect to your Plex Media Server on your local network, we may access:
|
||||
- Local network device discovery information
|
||||
- IP addresses of Plex servers on your network
|
||||
|
||||
### Usage Information
|
||||
The app stores locally on your device:
|
||||
- Your authentication session
|
||||
- App preferences and settings
|
||||
- Recently accessed content history
|
||||
|
||||
## How We Use Your Information
|
||||
|
||||
We use the collected information solely to:
|
||||
- Authenticate you with your Plex account
|
||||
- Connect to and communicate with your Plex Media Server
|
||||
- Display your media library and stream content
|
||||
- Maintain your session and app preferences
|
||||
|
||||
## Data Storage and Security
|
||||
|
||||
- **Authentication tokens** are stored securely on your device using platform-specific secure storage mechanisms
|
||||
- **App preferences** are stored locally on your device
|
||||
- **No data** is transmitted to our servers - all communication is directly between your device and your Plex Media Server or Plex's authentication services
|
||||
|
||||
## Third-Party Services
|
||||
|
||||
### Plex
|
||||
Plezy uses Plex's authentication and media services. When you use this app:
|
||||
- You authenticate directly with Plex's servers
|
||||
- Your media streaming occurs between your device and your Plex Media Server
|
||||
- Plex's own privacy policy applies to their services: https://www.plex.tv/about/privacy-legal/
|
||||
|
||||
We do not control and are not responsible for Plex's data practices.
|
||||
|
||||
## Data Sharing
|
||||
|
||||
We do not:
|
||||
- Sell your personal information
|
||||
- Share your information with third parties for marketing purposes
|
||||
- Transmit your data to our own servers
|
||||
- Track your viewing habits outside of local app functionality
|
||||
|
||||
Your data is only shared with:
|
||||
- **Plex services** for authentication and media server communication (as required for the app to function)
|
||||
|
||||
## Your Rights and Choices
|
||||
|
||||
You can:
|
||||
- **Sign out** at any time to remove your authentication session from the device
|
||||
- **Uninstall the app** to remove all locally stored data
|
||||
- **Manage your Plex account** directly through Plex's services
|
||||
|
||||
## Children's Privacy
|
||||
|
||||
Plezy does not knowingly collect personal information from children under 13. The app relies on Plex account authentication, and users must comply with Plex's terms of service and age requirements.
|
||||
|
||||
## Changes to This Privacy Policy
|
||||
|
||||
We may update this privacy policy from time to time. We will notify users of any material changes by updating the "Last Updated" date at the top of this policy.
|
||||
|
||||
## Data Retention
|
||||
|
||||
- Authentication tokens are retained on your device until you sign out or uninstall the app
|
||||
- Local preferences and settings are retained until you uninstall the app
|
||||
- No data is retained on our servers as we do not operate any backend services
|
||||
|
||||
## International Data Transfers
|
||||
|
||||
As we do not operate backend servers, there are no international data transfers from our side. Any data transfers occur directly between your device and Plex's services, subject to Plex's privacy policy.
|
||||
|
||||
## Legal Compliance
|
||||
|
||||
This app complies with:
|
||||
- General Data Protection Regulation (GDPR)
|
||||
- California Consumer Privacy Act (CCPA)
|
||||
- Children's Online Privacy Protection Act (COPPA)
|
||||
- Other applicable privacy laws
|
||||
|
||||
## Your Consent
|
||||
|
||||
By using Plezy, you consent to this privacy policy and the processing of your information as described herein.
|
||||
@@ -3,13 +3,13 @@
|
||||
Plezy
|
||||
</h1>
|
||||
|
||||
Plezy is a modern Plex media client that provides a seamless streaming experience across desktop and mobile platforms. Built with Flutter, it offers native performance and a clean, intuitive interface for browsing and playing your Plex media library.
|
||||
A modern Plex client for desktop and mobile. Built with Flutter for native performance and a clean interface.
|
||||
|
||||
<p align="center">
|
||||
<img src="assets/screenshots/macos-home.png" alt="Plezy macOS Home Screen" width="800" />
|
||||
</p>
|
||||
|
||||
*See more screenshots in the [screenshots folder](assets/screenshots/#readme)*
|
||||
*More screenshots in the [screenshots folder](assets/screenshots/#readme)*
|
||||
|
||||
## Download
|
||||
|
||||
@@ -17,111 +17,66 @@ Plezy is a modern Plex media client that provides a seamless streaming experienc
|
||||
<a href='https://apps.apple.com/us/app/id6754315964'><img height='60' alt='Download on the App Store' src='./assets/app-store-badge.png'/></a>
|
||||
<a href='https://play.google.com/store/apps/details?id=com.edde746.plezy'><img height='60' alt='Get it on Google Play' src='./assets/play-store-badge.png'/></a>
|
||||
|
||||
> Google Play version is in closed testing ([required by Google](https://support.google.com/googleplay/android-developer/answer/14151465#overview)). Join the [Google Group](https://groups.google.com/g/plezy-testers-2) to get access.
|
||||
|
||||
### Desktop
|
||||
- [Windows (x64)](https://github.com/edde746/plezy/releases/latest/download/plezy-windows-installer.exe)
|
||||
- [macOS (Universal)](https://github.com/edde746/plezy/releases/latest/download/plezy-macos.zip)
|
||||
- [Linux (x64)](https://github.com/edde746/plezy/releases/latest/download/plezy-linux.tar.gz)
|
||||
|
||||
> Download the latest release from the [Releases page](https://github.com/edde746/plezy/releases)
|
||||
- [macOS (Universal)](https://github.com/edde746/plezy/releases/latest/download/plezy-macos.dmg)
|
||||
- [Linux (x64)](https://github.com/edde746/plezy/releases/latest) - .deb, .rpm, .pkg.tar.zst, and portable tar.gz available
|
||||
- [NixOS/Nix](https://github.com/mio-19/nurpkgs/tree/main/pkgs/plezy) - Community package by [@mio-19](https://github.com/mio-19)
|
||||
|
||||
## Features
|
||||
|
||||
### 🔐 Authentication & Server Management
|
||||
### 🔐 Authentication
|
||||
- Sign in with Plex
|
||||
- Automatic server discovery with smart connection selection
|
||||
- Automatic server discovery and smart connection selection
|
||||
- Persistent sessions with auto-login
|
||||
|
||||
### 📚 Media Browsing
|
||||
- Browse libraries with rich metadata
|
||||
- Discover featured content
|
||||
- Advanced search across all media
|
||||
- Season and episode navigation
|
||||
- Collections and playlists
|
||||
|
||||
### 🎬 Video Playback
|
||||
- Wide codec support including HEVC, AV1, VP9, and more
|
||||
- Advanced subtitle rendering with full ASS/SSA support
|
||||
- Audio and subtitle track selection with user profile preferences
|
||||
- Playback progress sync and resume functionality
|
||||
### 🎬 Playback
|
||||
- Wide codec support (HEVC, AV1, VP9, and more)
|
||||
- HDR and Dolby Vision (iOS, macOS, Windows)
|
||||
- Full ASS/SSA subtitle support
|
||||
- Audio and subtitle preferences synced with Plex profile
|
||||
- Progress sync and resume
|
||||
- Auto-play next episode
|
||||
|
||||
## Prerequisites
|
||||
### 📥 Downloads
|
||||
- Download media for offline viewing
|
||||
- Background downloads with queue management
|
||||
|
||||
- Flutter SDK 3.8.1 or higher
|
||||
- A Plex account
|
||||
- Access to a Plex Media Server (local or remote)
|
||||
### 👥 Watch Together
|
||||
- Synchronized playback with friends
|
||||
- Real-time play/pause and seek sync
|
||||
|
||||
## Installation
|
||||
## Building from Source
|
||||
|
||||
### Prerequisites
|
||||
- Flutter SDK 3.8.1+
|
||||
- A Plex account with server access
|
||||
|
||||
### Setup
|
||||
|
||||
1. Clone the repository:
|
||||
```bash
|
||||
git clone https://github.com/edde746/plezy.git
|
||||
cd plezy
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
```bash
|
||||
flutter pub get
|
||||
```
|
||||
|
||||
3. Generate required code:
|
||||
```bash
|
||||
dart run build_runner build
|
||||
```
|
||||
|
||||
4. Run the application:
|
||||
```bash
|
||||
flutter run
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
### Code Quality
|
||||
|
||||
Before submitting changes, ensure your code passes all quality checks:
|
||||
|
||||
```bash
|
||||
# Format code (including generated files)
|
||||
dart format .
|
||||
|
||||
# Analyze code for issues
|
||||
flutter analyze
|
||||
|
||||
# Run tests (if available)
|
||||
flutter test
|
||||
```
|
||||
|
||||
**Note**: CI checks exclude generated files (`.g.dart`, `.freezed.dart`) from formatting and analysis checks. You can run `dart format .` locally to format everything, but only your hand-written code will be validated in CI.
|
||||
|
||||
These checks are automatically run in CI for all pull requests.
|
||||
|
||||
### Code Generation
|
||||
|
||||
The project uses code generation for JSON serialization. After modifying model classes, run:
|
||||
After modifying model classes:
|
||||
|
||||
```bash
|
||||
dart run build_runner build --delete-conflicting-outputs
|
||||
```
|
||||
|
||||
## Building for Production
|
||||
|
||||
### Android
|
||||
```bash
|
||||
flutter build apk --release
|
||||
# or
|
||||
flutter build appbundle --release
|
||||
```
|
||||
|
||||
### Desktop
|
||||
```bash
|
||||
flutter build macos --release
|
||||
flutter build windows --release
|
||||
flutter build linux --release
|
||||
```
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
- Built with [Flutter](https://flutter.dev)
|
||||
- Media playback powered by [MediaKit](https://github.com/media-kit/media-kit)
|
||||
- Designed for [Plex Media Server](https://www.plex.tv)
|
||||
- Playback powered by [mpv](https://mpv.io) via [MPVKit](https://github.com/mpvkit/MPVKit) and [libmpv-android](https://github.com/jarnedemeulemeester/libmpv-android)
|
||||
|
||||
@@ -10,3 +10,6 @@ analyzer:
|
||||
dart_code_linter:
|
||||
rules:
|
||||
- avoid-unused-parameters
|
||||
|
||||
formatter:
|
||||
page_width: 120
|
||||
|
||||
@@ -26,7 +26,7 @@ android {
|
||||
applicationId = "com.edde746.plezy"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||
minSdk = flutter.minSdkVersion
|
||||
minSdk = 26 // Required by libmpv-android
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
@@ -62,3 +62,7 @@ android {
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("dev.jdtech.mpv:libmpv:0.5.1")
|
||||
}
|
||||
|
||||
@@ -13,6 +13,11 @@
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:node="remove" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="remove" />
|
||||
|
||||
<!-- Android TV support (not required, but allow detection) -->
|
||||
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||
<!-- Touchscreen not required for TV -->
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
|
||||
|
||||
<application
|
||||
android:label="Plezy"
|
||||
android:name="${applicationName}"
|
||||
@@ -37,6 +42,8 @@
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
<!-- Allow app to appear in Android TV launcher -->
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
|
||||
@@ -0,0 +1,326 @@
|
||||
package com.edde746.plezy.mpv
|
||||
|
||||
import android.app.Activity
|
||||
import android.graphics.Color
|
||||
import android.graphics.PixelFormat
|
||||
import android.util.Log
|
||||
import android.view.SurfaceHolder
|
||||
import android.view.SurfaceView
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewTreeObserver
|
||||
import android.view.TextureView
|
||||
import dev.jdtech.mpv.MPVLib
|
||||
|
||||
interface MpvPlayerDelegate {
|
||||
fun onPropertyChange(name: String, value: Any?)
|
||||
fun onEvent(name: String, data: Map<String, Any>?)
|
||||
}
|
||||
|
||||
class MpvPlayerCore(private val activity: Activity) :
|
||||
SurfaceHolder.Callback,
|
||||
MPVLib.EventObserver,
|
||||
MPVLib.LogObserver {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "MpvPlayerCore"
|
||||
}
|
||||
|
||||
private var surfaceView: SurfaceView? = null
|
||||
private var overlayLayoutListener: ViewTreeObserver.OnGlobalLayoutListener? =
|
||||
null
|
||||
private var voInUse: String = "gpu"
|
||||
var delegate: MpvPlayerDelegate? = null
|
||||
var isInitialized: Boolean = false
|
||||
private set
|
||||
|
||||
private fun ensureFlutterOverlayOnTop() {
|
||||
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
|
||||
contentView.post {
|
||||
var flutterContainer: ViewGroup? = null
|
||||
|
||||
// First pass: look for FlutterView by name (debug builds)
|
||||
for (i in 0 until contentView.childCount) {
|
||||
val child = contentView.getChildAt(i)
|
||||
if (child is ViewGroup && child.javaClass.name.contains("FlutterView")) {
|
||||
flutterContainer = child
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback for release (FlutterView may be obfuscated): pick the last ViewGroup
|
||||
// that is not our mpv SurfaceView and has children.
|
||||
if (flutterContainer == null) {
|
||||
for (i in contentView.childCount - 1 downTo 0) {
|
||||
val child = contentView.getChildAt(i)
|
||||
if (child is ViewGroup && child != surfaceView?.parent && child.childCount > 0) {
|
||||
flutterContainer = child
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutterContainer?.let { container ->
|
||||
contentView.bringChildToFront(container)
|
||||
for (j in 0 until container.childCount) {
|
||||
val flutterChild = container.getChildAt(j)
|
||||
if (flutterChild is SurfaceView) {
|
||||
flutterChild.setZOrderOnTop(true)
|
||||
flutterChild.setZOrderMediaOverlay(true)
|
||||
flutterChild.holder.setFormat(PixelFormat.TRANSLUCENT)
|
||||
break
|
||||
} else if (flutterChild is TextureView) {
|
||||
// TextureView uses alpha composition; ensure it stays above.
|
||||
flutterChild.isOpaque = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun initialize(): Boolean {
|
||||
if (isInitialized) {
|
||||
Log.d(TAG, "Already initialized")
|
||||
return true
|
||||
}
|
||||
|
||||
try {
|
||||
// Create SurfaceView for video rendering
|
||||
surfaceView = SurfaceView(activity).apply {
|
||||
layoutParams = ViewGroup.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT
|
||||
)
|
||||
setBackgroundColor(Color.BLACK)
|
||||
// Keep video composited in the normal view hierarchy (avoid hardware overlay promotion)
|
||||
// so Flutter controls reliably draw above it in release builds.
|
||||
alpha = 0.999f
|
||||
holder.addCallback(this@MpvPlayerCore)
|
||||
|
||||
// Critical: Ensure SurfaceView renders BEHIND Flutter's view
|
||||
setZOrderOnTop(false)
|
||||
setZOrderMediaOverlay(false)
|
||||
}
|
||||
|
||||
// Insert SurfaceView at bottom of view hierarchy (behind Flutter)
|
||||
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
|
||||
contentView.addView(surfaceView, 0)
|
||||
|
||||
// Find FlutterView and its internal FlutterSurfaceView, set it on top
|
||||
for (i in 0 until contentView.childCount) {
|
||||
val child = contentView.getChildAt(i)
|
||||
if (child is ViewGroup && child.javaClass.name.contains("FlutterView")) {
|
||||
contentView.bringChildToFront(child)
|
||||
// Look inside FlutterView for FlutterSurfaceView
|
||||
for (j in 0 until child.childCount) {
|
||||
val flutterChild = child.getChildAt(j)
|
||||
if (flutterChild is SurfaceView) {
|
||||
// Put Flutter in media overlay layer (above our video which is in normal layer)
|
||||
flutterChild.setZOrderOnTop(true)
|
||||
flutterChild.setZOrderMediaOverlay(true)
|
||||
flutterChild.holder.setFormat(PixelFormat.TRANSLUCENT)
|
||||
break
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
// Repeat after layout settles to catch late-added Flutter surfaces (release builds)
|
||||
ensureFlutterOverlayOnTop()
|
||||
overlayLayoutListener = ViewTreeObserver.OnGlobalLayoutListener {
|
||||
ensureFlutterOverlayOnTop()
|
||||
}
|
||||
contentView.viewTreeObserver.addOnGlobalLayoutListener(overlayLayoutListener)
|
||||
|
||||
Log.d(TAG, "SurfaceView added to content view")
|
||||
|
||||
// Initialize MPVLib
|
||||
MPVLib.create(activity.applicationContext)
|
||||
|
||||
// Configure MPV defaults
|
||||
setupMpvDefaults()
|
||||
|
||||
// Initialize MPV
|
||||
MPVLib.init()
|
||||
|
||||
// Register event and log observers
|
||||
MPVLib.addObserver(this)
|
||||
MPVLib.addLogObserver(this)
|
||||
|
||||
isInitialized = true
|
||||
Log.d(TAG, "Initialized successfully")
|
||||
return true
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to initialize: ${e.message}", e)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupMpvDefaults() {
|
||||
// Video output configuration
|
||||
MPVLib.setOptionString("vo", "gpu")
|
||||
MPVLib.setOptionString("gpu-context", "android")
|
||||
MPVLib.setOptionString("opengl-es", "yes")
|
||||
// hwdec is set from Flutter via setProperty based on user preference
|
||||
|
||||
// Audio configuration
|
||||
MPVLib.setOptionString("ao", "audiotrack")
|
||||
}
|
||||
|
||||
// SurfaceHolder.Callback
|
||||
|
||||
override fun surfaceCreated(holder: SurfaceHolder) {
|
||||
Log.d(TAG, "Surface created")
|
||||
MPVLib.attachSurface(holder.surface)
|
||||
MPVLib.setOptionString("force-window", "yes")
|
||||
// Restore video output after surface is available
|
||||
MPVLib.setPropertyString("vo", voInUse)
|
||||
// Reassert overlay order whenever the surface is recreated
|
||||
ensureFlutterOverlayOnTop()
|
||||
}
|
||||
|
||||
override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) {
|
||||
Log.d(TAG, "Surface changed: ${width}x${height}")
|
||||
MPVLib.setPropertyString("android-surface-size", "${width}x${height}")
|
||||
}
|
||||
|
||||
override fun surfaceDestroyed(holder: SurfaceHolder) {
|
||||
Log.d(TAG, "Surface destroyed")
|
||||
// Disable video output before detaching (like mpv-android)
|
||||
MPVLib.setPropertyString("vo", "null")
|
||||
MPVLib.setOptionString("force-window", "no")
|
||||
MPVLib.detachSurface()
|
||||
}
|
||||
|
||||
// MPVLib.EventObserver
|
||||
|
||||
override fun eventProperty(property: String) {
|
||||
// No value provided
|
||||
}
|
||||
|
||||
override fun eventProperty(property: String, value: Long) {
|
||||
activity.runOnUiThread {
|
||||
delegate?.onPropertyChange(property, value)
|
||||
}
|
||||
}
|
||||
|
||||
override fun eventProperty(property: String, value: Double) {
|
||||
activity.runOnUiThread {
|
||||
delegate?.onPropertyChange(property, value)
|
||||
}
|
||||
}
|
||||
|
||||
override fun eventProperty(property: String, value: Boolean) {
|
||||
activity.runOnUiThread {
|
||||
delegate?.onPropertyChange(property, value)
|
||||
}
|
||||
}
|
||||
|
||||
override fun eventProperty(property: String, value: String) {
|
||||
activity.runOnUiThread {
|
||||
delegate?.onPropertyChange(property, value)
|
||||
}
|
||||
}
|
||||
|
||||
override fun event(eventId: Int) {
|
||||
val eventName = when (eventId) {
|
||||
MPVLib.MPV_EVENT_FILE_LOADED -> "file-loaded"
|
||||
MPVLib.MPV_EVENT_END_FILE -> "end-file"
|
||||
MPVLib.MPV_EVENT_PLAYBACK_RESTART -> "playback-restart"
|
||||
else -> null
|
||||
}
|
||||
eventName?.let { name ->
|
||||
activity.runOnUiThread {
|
||||
delegate?.onEvent(name, null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MPVLib.LogObserver
|
||||
|
||||
override fun logMessage(prefix: String, level: Int, text: String) {
|
||||
val levelStr = when (level) {
|
||||
MPVLib.MPV_LOG_LEVEL_FATAL -> "fatal"
|
||||
MPVLib.MPV_LOG_LEVEL_ERROR -> "error"
|
||||
MPVLib.MPV_LOG_LEVEL_WARN -> "warn"
|
||||
MPVLib.MPV_LOG_LEVEL_INFO -> "info"
|
||||
MPVLib.MPV_LOG_LEVEL_V -> "v"
|
||||
MPVLib.MPV_LOG_LEVEL_DEBUG -> "debug"
|
||||
MPVLib.MPV_LOG_LEVEL_TRACE -> "trace"
|
||||
else -> "info"
|
||||
}
|
||||
activity.runOnUiThread {
|
||||
delegate?.onEvent("log-message", mapOf(
|
||||
"prefix" to prefix,
|
||||
"level" to levelStr,
|
||||
"text" to text
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
// Public API
|
||||
|
||||
fun setProperty(name: String, value: String) {
|
||||
if (!isInitialized) return
|
||||
MPVLib.setPropertyString(name, value)
|
||||
}
|
||||
|
||||
fun getProperty(name: String): String? {
|
||||
if (!isInitialized) return null
|
||||
return try {
|
||||
MPVLib.getPropertyString(name)
|
||||
} catch (e: Exception) {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
fun observeProperty(name: String, format: String) {
|
||||
if (!isInitialized) return
|
||||
|
||||
val mpvFormat = when (format) {
|
||||
"double" -> MPVLib.MPV_FORMAT_DOUBLE
|
||||
"flag" -> MPVLib.MPV_FORMAT_FLAG
|
||||
"string" -> MPVLib.MPV_FORMAT_STRING
|
||||
"node" -> MPVLib.MPV_FORMAT_NODE
|
||||
else -> MPVLib.MPV_FORMAT_NONE
|
||||
}
|
||||
MPVLib.observeProperty(name, mpvFormat)
|
||||
}
|
||||
|
||||
fun command(args: Array<String>) {
|
||||
if (!isInitialized || args.isEmpty()) return
|
||||
MPVLib.command(args)
|
||||
}
|
||||
|
||||
fun setVisible(visible: Boolean) {
|
||||
activity.runOnUiThread {
|
||||
surfaceView?.visibility = if (visible) View.VISIBLE else View.INVISIBLE
|
||||
Log.d(TAG, "setVisible($visible)")
|
||||
}
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
|
||||
fun dispose() {
|
||||
Log.d(TAG, "Disposing")
|
||||
|
||||
MPVLib.removeObserver(this)
|
||||
MPVLib.removeLogObserver(this)
|
||||
|
||||
surfaceView?.holder?.removeCallback(this)
|
||||
overlayLayoutListener?.let { listener ->
|
||||
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
|
||||
contentView.viewTreeObserver.removeOnGlobalLayoutListener(listener)
|
||||
}
|
||||
|
||||
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
|
||||
surfaceView?.let { contentView.removeView(it) }
|
||||
surfaceView = null
|
||||
|
||||
MPVLib.destroy()
|
||||
isInitialized = false
|
||||
|
||||
Log.d(TAG, "Disposed")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
package com.edde746.plezy.mpv
|
||||
|
||||
import android.app.Activity
|
||||
import android.util.Log
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin
|
||||
import io.flutter.embedding.engine.plugins.activity.ActivityAware
|
||||
import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding
|
||||
import io.flutter.plugin.common.EventChannel
|
||||
import io.flutter.plugin.common.MethodCall
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
|
||||
class MpvPlayerPlugin : FlutterPlugin, MethodChannel.MethodCallHandler,
|
||||
EventChannel.StreamHandler, ActivityAware, MpvPlayerDelegate {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "MpvPlayerPlugin"
|
||||
private const val METHOD_CHANNEL = "com.plezy/mpv_player"
|
||||
private const val EVENT_CHANNEL = "com.plezy/mpv_player/events"
|
||||
}
|
||||
|
||||
private lateinit var methodChannel: MethodChannel
|
||||
private lateinit var eventChannel: EventChannel
|
||||
private var eventSink: EventChannel.EventSink? = null
|
||||
private var playerCore: MpvPlayerCore? = null
|
||||
private var activity: Activity? = null
|
||||
private var activityBinding: ActivityPluginBinding? = null
|
||||
|
||||
// FlutterPlugin
|
||||
|
||||
override fun onAttachedToEngine(binding: FlutterPlugin.FlutterPluginBinding) {
|
||||
methodChannel = MethodChannel(binding.binaryMessenger, METHOD_CHANNEL)
|
||||
methodChannel.setMethodCallHandler(this)
|
||||
|
||||
eventChannel = EventChannel(binding.binaryMessenger, EVENT_CHANNEL)
|
||||
eventChannel.setStreamHandler(this)
|
||||
|
||||
Log.d(TAG, "Attached to engine")
|
||||
}
|
||||
|
||||
override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {
|
||||
methodChannel.setMethodCallHandler(null)
|
||||
eventChannel.setStreamHandler(null)
|
||||
Log.d(TAG, "Detached from engine")
|
||||
}
|
||||
|
||||
// ActivityAware
|
||||
|
||||
override fun onAttachedToActivity(binding: ActivityPluginBinding) {
|
||||
activity = binding.activity
|
||||
activityBinding = binding
|
||||
Log.d(TAG, "Attached to activity")
|
||||
}
|
||||
|
||||
override fun onDetachedFromActivity() {
|
||||
playerCore?.dispose()
|
||||
playerCore = null
|
||||
activity = null
|
||||
activityBinding = null
|
||||
Log.d(TAG, "Detached from activity")
|
||||
}
|
||||
|
||||
override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) {
|
||||
activity = binding.activity
|
||||
activityBinding = binding
|
||||
Log.d(TAG, "Reattached to activity for config changes")
|
||||
}
|
||||
|
||||
override fun onDetachedFromActivityForConfigChanges() {
|
||||
activity = null
|
||||
activityBinding = null
|
||||
Log.d(TAG, "Detached from activity for config changes")
|
||||
}
|
||||
|
||||
// EventChannel.StreamHandler
|
||||
|
||||
override fun onListen(arguments: Any?, events: EventChannel.EventSink?) {
|
||||
eventSink = events
|
||||
Log.d(TAG, "Event stream connected")
|
||||
}
|
||||
|
||||
override fun onCancel(arguments: Any?) {
|
||||
eventSink = null
|
||||
Log.d(TAG, "Event stream disconnected")
|
||||
}
|
||||
|
||||
// MethodChannel.MethodCallHandler
|
||||
|
||||
override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
|
||||
when (call.method) {
|
||||
"initialize" -> handleInitialize(result)
|
||||
"dispose" -> handleDispose(result)
|
||||
"setProperty" -> handleSetProperty(call, result)
|
||||
"getProperty" -> handleGetProperty(call, result)
|
||||
"observeProperty" -> handleObserveProperty(call, result)
|
||||
"command" -> handleCommand(call, result)
|
||||
"setVisible" -> handleSetVisible(call, result)
|
||||
"isInitialized" -> result.success(playerCore?.isInitialized ?: false)
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleInitialize(result: MethodChannel.Result) {
|
||||
val currentActivity = activity
|
||||
if (currentActivity == null) {
|
||||
result.error("NO_ACTIVITY", "Activity not available", null)
|
||||
return
|
||||
}
|
||||
|
||||
if (playerCore?.isInitialized == true) {
|
||||
Log.d(TAG, "Already initialized")
|
||||
result.success(true)
|
||||
return
|
||||
}
|
||||
|
||||
currentActivity.runOnUiThread {
|
||||
try {
|
||||
playerCore = MpvPlayerCore(currentActivity).apply {
|
||||
delegate = this@MpvPlayerPlugin
|
||||
}
|
||||
val success = playerCore?.initialize() ?: false
|
||||
|
||||
// Start hidden
|
||||
playerCore?.setVisible(false)
|
||||
|
||||
Log.d(TAG, "Initialized: $success")
|
||||
result.success(success)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to initialize: ${e.message}", e)
|
||||
result.error("INIT_FAILED", e.message, null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleDispose(result: MethodChannel.Result) {
|
||||
activity?.runOnUiThread {
|
||||
playerCore?.dispose()
|
||||
playerCore = null
|
||||
Log.d(TAG, "Disposed")
|
||||
result.success(null)
|
||||
} ?: result.success(null)
|
||||
}
|
||||
|
||||
private fun handleSetProperty(call: MethodCall, result: MethodChannel.Result) {
|
||||
val name = call.argument<String>("name")
|
||||
val value = call.argument<String>("value")
|
||||
|
||||
if (name == null || value == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'name' or 'value'", null)
|
||||
return
|
||||
}
|
||||
|
||||
playerCore?.setProperty(name, value)
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleGetProperty(call: MethodCall, result: MethodChannel.Result) {
|
||||
val name = call.argument<String>("name")
|
||||
|
||||
if (name == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'name'", null)
|
||||
return
|
||||
}
|
||||
|
||||
val value = playerCore?.getProperty(name)
|
||||
result.success(value)
|
||||
}
|
||||
|
||||
private fun handleObserveProperty(call: MethodCall, result: MethodChannel.Result) {
|
||||
val name = call.argument<String>("name")
|
||||
val format = call.argument<String>("format")
|
||||
|
||||
if (name == null || format == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'name' or 'format'", null)
|
||||
return
|
||||
}
|
||||
|
||||
playerCore?.observeProperty(name, format)
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleCommand(call: MethodCall, result: MethodChannel.Result) {
|
||||
val args = call.argument<List<String>>("args")
|
||||
|
||||
if (args == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'args'", null)
|
||||
return
|
||||
}
|
||||
|
||||
playerCore?.command(args.toTypedArray())
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
private fun handleSetVisible(call: MethodCall, result: MethodChannel.Result) {
|
||||
val visible = call.argument<Boolean>("visible")
|
||||
|
||||
if (visible == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'visible'", null)
|
||||
return
|
||||
}
|
||||
|
||||
playerCore?.setVisible(visible)
|
||||
result.success(null)
|
||||
}
|
||||
|
||||
// MpvPlayerDelegate
|
||||
|
||||
override fun onPropertyChange(name: String, value: Any?) {
|
||||
eventSink?.success(
|
||||
mapOf(
|
||||
"type" to "property",
|
||||
"name" to name,
|
||||
"value" to value
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onEvent(name: String, data: Map<String, Any>?) {
|
||||
val event = mutableMapOf<String, Any>(
|
||||
"type" to "event",
|
||||
"name" to name
|
||||
)
|
||||
data?.let { event["data"] = it }
|
||||
eventSink?.success(event)
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,24 @@
|
||||
package com.edde746.plezy
|
||||
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import com.edde746.plezy.mpv.MpvPlayerPlugin
|
||||
|
||||
class MainActivity : FlutterActivity()
|
||||
class MainActivity : FlutterActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
// Disable Android's default focus highlight ring that appears when using
|
||||
// D-pad navigation so the Flutter UI can render its own focus state.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
window.decorView.defaultFocusHighlightEnabled = false
|
||||
}
|
||||
}
|
||||
|
||||
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
|
||||
super.configureFlutterEngine(flutterEngine)
|
||||
flutterEngine.plugins.add(MpvPlayerPlugin())
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 6.1 KiB |
@@ -2,6 +2,9 @@
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Disable Android's default green focus highlight that appears during d-pad/keyboard navigation -->
|
||||
<item name="android:defaultFocusHighlightEnabled">false</item>
|
||||
<item name="android:colorControlHighlight">@android:color/transparent</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
@@ -11,5 +14,8 @@
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
<!-- Disable Android's default green focus highlight that appears during d-pad/keyboard navigation -->
|
||||
<item name="android:defaultFocusHighlightEnabled">false</item>
|
||||
<item name="android:colorControlHighlight">@android:color/transparent</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Disable Android's default green focus highlight that appears during d-pad/keyboard navigation -->
|
||||
<item name="android:defaultFocusHighlightEnabled">false</item>
|
||||
<item name="android:colorControlHighlight">@android:color/transparent</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
@@ -11,5 +14,8 @@
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
<!-- Disable Android's default green focus highlight that appears during d-pad/keyboard navigation -->
|
||||
<item name="android:defaultFocusHighlightEnabled">false</item>
|
||||
<item name="android:colorControlHighlight">@android:color/transparent</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -32,13 +32,13 @@ platform :android do
|
||||
desc "Build release AAB"
|
||||
lane :build do
|
||||
# Navigate to Flutter project root and build
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build appbundle")
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build appbundle --dart-define=ENABLE_IN_APP_REVIEW=true")
|
||||
end
|
||||
|
||||
desc "Build and deploy to Google Play Store"
|
||||
lane :release do
|
||||
# Build the Flutter app
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build appbundle")
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build appbundle --dart-define=ENABLE_IN_APP_REVIEW=true")
|
||||
|
||||
# Get version code from pubspec.yaml
|
||||
pubspec_path = "#{ENV['PWD']}/../pubspec.yaml"
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 3.8 MiB |
|
Before Width: | Height: | Size: 2.8 MiB After Width: | Height: | Size: 2.4 MiB |
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 2.6 MiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 4.4 MiB |
|
Before Width: | Height: | Size: 3.5 MiB After Width: | Height: | Size: 3.4 MiB |
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 3.0 MiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.2 MiB |
@@ -1,5 +1,5 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
# platform :ios, '13.0'
|
||||
platform :ios, '14.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
@@ -25,6 +25,10 @@ end
|
||||
|
||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||
|
||||
# Disable file_picker's media picker on iOS - removes DKImagePickerController dependency
|
||||
# This app only uses file_picker for directory selection on desktop
|
||||
Pod.const_set(:PICKER_MEDIA, false) unless Pod.const_defined?(:PICKER_MEDIA)
|
||||
|
||||
flutter_ios_podfile_setup
|
||||
|
||||
target 'Runner' do
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
PODS:
|
||||
- connectivity_plus (0.0.1):
|
||||
- Flutter
|
||||
- Flutter (1.0.0)
|
||||
- media_kit_libs_ios_video (1.0.4):
|
||||
- device_info_plus (0.0.1):
|
||||
- Flutter
|
||||
- media_kit_video (0.0.1):
|
||||
- file_picker (0.0.1):
|
||||
- Flutter
|
||||
- Flutter (1.0.0)
|
||||
- flutter_webrtc (1.2.0):
|
||||
- Flutter
|
||||
- WebRTC-SDK (= 137.7151.04)
|
||||
- gamepads_ios (0.1.1):
|
||||
- Flutter
|
||||
- in_app_review (2.0.0):
|
||||
- Flutter
|
||||
- os_media_controls (0.0.1):
|
||||
- Flutter
|
||||
@@ -19,36 +26,77 @@ PODS:
|
||||
- sqflite_darwin (0.0.4):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqlite3 (3.51.1):
|
||||
- sqlite3/common (= 3.51.1)
|
||||
- sqlite3/common (3.51.1)
|
||||
- sqlite3/dbstatvtab (3.51.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/fts5 (3.51.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/math (3.51.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/perf-threadsafe (3.51.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/rtree (3.51.1):
|
||||
- sqlite3/common
|
||||
- sqlite3/session (3.51.1):
|
||||
- sqlite3/common
|
||||
- sqlite3_flutter_libs (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqlite3 (~> 3.51.1)
|
||||
- sqlite3/dbstatvtab
|
||||
- sqlite3/fts5
|
||||
- sqlite3/math
|
||||
- sqlite3/perf-threadsafe
|
||||
- sqlite3/rtree
|
||||
- sqlite3/session
|
||||
- url_launcher_ios (0.0.1):
|
||||
- Flutter
|
||||
- volume_controller (0.0.1):
|
||||
- Flutter
|
||||
- wakelock_plus (0.0.1):
|
||||
- Flutter
|
||||
- WebRTC-SDK (137.7151.04)
|
||||
- workmanager_apple (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
- media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)
|
||||
- media_kit_video (from `.symlinks/plugins/media_kit_video/ios`)
|
||||
- flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`)
|
||||
- gamepads_ios (from `.symlinks/plugins/gamepads_ios/ios`)
|
||||
- in_app_review (from `.symlinks/plugins/in_app_review/ios`)
|
||||
- os_media_controls (from `.symlinks/plugins/os_media_controls/ios`)
|
||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
|
||||
- sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/darwin`)
|
||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||
- volume_controller (from `.symlinks/plugins/volume_controller/ios`)
|
||||
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
|
||||
- workmanager_apple (from `.symlinks/plugins/workmanager_apple/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- sqlite3
|
||||
- WebRTC-SDK
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
connectivity_plus:
|
||||
:path: ".symlinks/plugins/connectivity_plus/ios"
|
||||
device_info_plus:
|
||||
:path: ".symlinks/plugins/device_info_plus/ios"
|
||||
file_picker:
|
||||
:path: ".symlinks/plugins/file_picker/ios"
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
media_kit_libs_ios_video:
|
||||
:path: ".symlinks/plugins/media_kit_libs_ios_video/ios"
|
||||
media_kit_video:
|
||||
:path: ".symlinks/plugins/media_kit_video/ios"
|
||||
flutter_webrtc:
|
||||
:path: ".symlinks/plugins/flutter_webrtc/ios"
|
||||
gamepads_ios:
|
||||
:path: ".symlinks/plugins/gamepads_ios/ios"
|
||||
in_app_review:
|
||||
:path: ".symlinks/plugins/in_app_review/ios"
|
||||
os_media_controls:
|
||||
:path: ".symlinks/plugins/os_media_controls/ios"
|
||||
package_info_plus:
|
||||
@@ -59,27 +107,35 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||
sqflite_darwin:
|
||||
:path: ".symlinks/plugins/sqflite_darwin/darwin"
|
||||
sqlite3_flutter_libs:
|
||||
:path: ".symlinks/plugins/sqlite3_flutter_libs/darwin"
|
||||
url_launcher_ios:
|
||||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||
volume_controller:
|
||||
:path: ".symlinks/plugins/volume_controller/ios"
|
||||
wakelock_plus:
|
||||
:path: ".symlinks/plugins/wakelock_plus/ios"
|
||||
workmanager_apple:
|
||||
:path: ".symlinks/plugins/workmanager_apple/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
|
||||
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
|
||||
file_picker: 8fc6fe5e42585a217d44d22f79ec046cb8d81140
|
||||
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
|
||||
media_kit_libs_ios_video: 5a18affdb97d1f5d466dc79988b13eff6c5e2854
|
||||
media_kit_video: 1746e198cb697d1ffb734b1d05ec429d1fcd1474
|
||||
flutter_webrtc: c3e21fc0dcd9d8eb246ae4d5256fcbeb2f5ecd22
|
||||
gamepads_ios: c75c6d31377d275b0effb9174c619e2705678c09
|
||||
in_app_review: 7dd1ea365263f834b8464673f9df72c80c17c937
|
||||
os_media_controls: 86dceab6245a5325af90fc0fdebe243c42d789b4
|
||||
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
||||
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
|
||||
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
|
||||
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||
sqlite3: 8d708bc63e9f4ce48f0ad9d6269e478c5ced1d9b
|
||||
sqlite3_flutter_libs: d13b8b3003f18f596e542bcb9482d105577eff41
|
||||
url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b
|
||||
volume_controller: 3657a1f65bedb98fa41ff7dc5793537919f31b12
|
||||
wakelock_plus: e29112ab3ef0b318e58cfa5c32326458be66b556
|
||||
WebRTC-SDK: 40d4f5ba05cadff14e4db5614aec402a633f007e
|
||||
workmanager_apple: 904529ae31e97fc5be632cf628507652294a0778
|
||||
|
||||
PODFILE CHECKSUM: 3c63482e143d1b91d2d2560aee9fb04ecc74ac7e
|
||||
PODFILE CHECKSUM: faeab82d8b6e3c9d039ddf62b7666988a3dea540
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
50DEEA8E23D1B433DE5341D6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2C12D873DE8572579684A82C /* Pods_Runner.framework */; };
|
||||
6A48DFB02EA70C7100C1F7CD /* plezy.icon in Resources */ = {isa = PBXBuildFile; fileRef = 6A48DFAF2EA70C7100C1F7CD /* plezy.icon */; };
|
||||
6A8A46212EDB320D0057B88C /* MPVKit-GPL in Frameworks */ = {isa = PBXBuildFile; productRef = 6A8A46202EDB320D0057B88C /* MPVKit-GPL */; };
|
||||
6A8A46252EDB370C0057B88C /* MpvPlayerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A8A46232EDB370C0057B88C /* MpvPlayerPlugin.swift */; };
|
||||
6A8A46262EDB370C0057B88C /* MpvPlayerCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A8A46222EDB370C0057B88C /* MpvPlayerCore.swift */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
@@ -52,6 +55,8 @@
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
5B81FA7048BFA976F49D555E /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
6A48DFAF2EA70C7100C1F7CD /* plezy.icon */ = {isa = PBXFileReference; lastKnownFileType = folder.iconcomposer.icon; path = plezy.icon; sourceTree = "<group>"; };
|
||||
6A8A46222EDB370C0057B88C /* MpvPlayerCore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MpvPlayerCore.swift; sourceTree = "<group>"; };
|
||||
6A8A46232EDB370C0057B88C /* MpvPlayerPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MpvPlayerPlugin.swift; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
@@ -81,6 +86,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
50DEEA8E23D1B433DE5341D6 /* Pods_Runner.framework in Frameworks */,
|
||||
6A8A46212EDB320D0057B88C /* MPVKit-GPL in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -104,6 +110,15 @@
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6A8A46242EDB370C0057B88C /* MpvPlayer */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6A8A46222EDB370C0057B88C /* MpvPlayerCore.swift */,
|
||||
6A8A46232EDB370C0057B88C /* MpvPlayerPlugin.swift */,
|
||||
);
|
||||
path = MpvPlayer;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
875C8AEFBBA3759A1849D674 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -153,6 +168,7 @@
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6A8A46242EDB370C0057B88C /* MpvPlayer */,
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
@@ -237,6 +253,9 @@
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
packageReferences = (
|
||||
6A8A461F2EDB320D0057B88C /* XCRemoteSwiftPackageReference "MPVKit" */,
|
||||
);
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
@@ -376,6 +395,8 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6A8A46252EDB370C0057B88C /* MpvPlayerPlugin.swift in Sources */,
|
||||
6A8A46262EDB370C0057B88C /* MpvPlayerCore.swift in Sources */,
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
@@ -475,6 +496,7 @@
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = Plezy;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
@@ -661,6 +683,7 @@
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = Plezy;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
@@ -687,6 +710,7 @@
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = Plezy;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
@@ -734,6 +758,25 @@
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
|
||||
/* Begin XCRemoteSwiftPackageReference section */
|
||||
6A8A461F2EDB320D0057B88C /* XCRemoteSwiftPackageReference "MPVKit" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/edde746/MPVKit";
|
||||
requirement = {
|
||||
kind = revision;
|
||||
revision = 0d0931fbbb25a3483a7edb46babd3f2f55abeefc;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
6A8A46202EDB320D0057B88C /* MPVKit-GPL */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 6A8A461F2EDB320D0057B88C /* XCRemoteSwiftPackageReference "MPVKit" */;
|
||||
productName = "MPVKit-GPL";
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"originHash" : "c535d3cdb62bd4e11e67f3c9e68290fa7ee9306634c5f56d2b0396eb75ed41ee",
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "mpvkit",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/edde746/MPVKit",
|
||||
"state" : {
|
||||
"revision" : "0d0931fbbb25a3483a7edb46babd3f2f55abeefc"
|
||||
}
|
||||
}
|
||||
],
|
||||
"version" : 3
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"originHash" : "c535d3cdb62bd4e11e67f3c9e68290fa7ee9306634c5f56d2b0396eb75ed41ee",
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "mpvkit",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/edde746/MPVKit",
|
||||
"state" : {
|
||||
"revision" : "0d0931fbbb25a3483a7edb46babd3f2f55abeefc"
|
||||
}
|
||||
}
|
||||
],
|
||||
"version" : 3
|
||||
}
|
||||
@@ -10,6 +10,11 @@ import AVFoundation
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
|
||||
// Register MPV player plugin
|
||||
if let registrar = self.registrar(forPlugin: "MpvPlayerPlugin") {
|
||||
MpvPlayerPlugin.register(with: registrar)
|
||||
}
|
||||
|
||||
// Configure audio session for media playback
|
||||
do {
|
||||
let session = AVAudioSession.sharedInstance()
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
@@ -37,8 +39,12 @@
|
||||
</array>
|
||||
<key>NSLocalNetworkUsageDescription</key>
|
||||
<string>This app needs to connect to your Plex Media Server on your local network.</string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Camera access is included by the WebRTC library used for Watch Together, but is not actively used by this app.</string>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>UIFileSharingEnabled</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
|
||||
@@ -0,0 +1,512 @@
|
||||
import Libmpv
|
||||
import UIKit
|
||||
|
||||
/// Protocol for receiving player events
|
||||
protocol MpvPlayerDelegate: AnyObject {
|
||||
func onPropertyChange(name: String, value: Any?)
|
||||
func onEvent(name: String, data: [String: Any]?)
|
||||
}
|
||||
|
||||
// Workaround for MoltenVK problems that cause flicker
|
||||
// https://github.com/mpv-player/mpv/pull/13651
|
||||
private class MetalLayer: CAMetalLayer {
|
||||
override var drawableSize: CGSize {
|
||||
get { return super.drawableSize }
|
||||
set {
|
||||
if Int(newValue.width) > 1 && Int(newValue.height) > 1 {
|
||||
super.drawableSize = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fix for target-colorspace-hint - needs main thread for EDR
|
||||
@available(iOS 16.0, *)
|
||||
override var wantsExtendedDynamicRangeContent: Bool {
|
||||
get { return super.wantsExtendedDynamicRangeContent }
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
super.wantsExtendedDynamicRangeContent = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
super.wantsExtendedDynamicRangeContent = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Core MPV player using Metal rendering for iOS
|
||||
class MpvPlayerCore: NSObject {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
private var metalLayer: MetalLayer?
|
||||
private var containerView: UIView? // Container for proper EDR activation
|
||||
private var mpv: OpaquePointer?
|
||||
private weak var window: UIWindow?
|
||||
private lazy var queue = DispatchQueue(label: "mpv", qos: .userInitiated)
|
||||
|
||||
weak var delegate: MpvPlayerDelegate?
|
||||
|
||||
private(set) var isInitialized = false
|
||||
|
||||
// HDR settings
|
||||
private var hdrEnabled = true // User preference for HDR
|
||||
private var lastSigPeak: Double = 0.0 // Last known sig-peak for re-evaluation
|
||||
|
||||
// MARK: - Initialization
|
||||
|
||||
func initialize(in window: UIWindow) -> Bool {
|
||||
guard !isInitialized else {
|
||||
print("[MpvPlayerCore] Already initialized")
|
||||
return true
|
||||
}
|
||||
|
||||
self.window = window
|
||||
|
||||
// Create container view for proper EDR activation
|
||||
// EDR requires the CAMetalLayer to be in a UIView hierarchy, not just window.layer
|
||||
let container = UIView(frame: window.bounds)
|
||||
container.backgroundColor = .clear
|
||||
container.isUserInteractionEnabled = false
|
||||
|
||||
// Create Metal layer for video rendering
|
||||
let layer = MetalLayer()
|
||||
layer.frame = container.bounds
|
||||
layer.contentsScale = UIScreen.main.nativeScale
|
||||
layer.framebufferOnly = true
|
||||
layer.backgroundColor = UIColor.black.cgColor
|
||||
|
||||
container.layer.addSublayer(layer)
|
||||
containerView = container
|
||||
metalLayer = layer
|
||||
|
||||
// Add container view to window (behind Flutter's root view controller)
|
||||
window.insertSubview(container, at: 0)
|
||||
|
||||
print(
|
||||
"[MpvPlayerCore] Metal layer added to window via container view, frame: \(layer.frame)")
|
||||
|
||||
// Initialize MPV with this Metal layer
|
||||
guard setupMpv() else {
|
||||
print("[MpvPlayerCore] Failed to setup MPV")
|
||||
layer.removeFromSuperlayer()
|
||||
container.removeFromSuperview()
|
||||
metalLayer = nil
|
||||
containerView = nil
|
||||
return false
|
||||
}
|
||||
|
||||
// Setup background/foreground notifications
|
||||
setupNotifications()
|
||||
|
||||
isInitialized = true
|
||||
print("[MpvPlayerCore] Initialized successfully with MPV")
|
||||
return true
|
||||
}
|
||||
|
||||
private func setupMpv() -> Bool {
|
||||
guard let metalLayer = metalLayer else { return false }
|
||||
|
||||
mpv = mpv_create()
|
||||
guard mpv != nil else {
|
||||
print("[MpvPlayerCore] Failed to create MPV context")
|
||||
return false
|
||||
}
|
||||
|
||||
// Logging
|
||||
#if DEBUG
|
||||
checkError(mpv_request_log_messages(mpv, "info"))
|
||||
#else
|
||||
checkError(mpv_request_log_messages(mpv, "warn"))
|
||||
#endif
|
||||
|
||||
// Set the Metal layer as the render target (must use local var for &)
|
||||
var layer = metalLayer
|
||||
checkError(mpv_set_option(mpv, "wid", MPV_FORMAT_INT64, &layer))
|
||||
|
||||
// Video output settings for Metal/Vulkan
|
||||
checkError(mpv_set_option_string(mpv, "vo", "gpu-next"))
|
||||
checkError(mpv_set_option_string(mpv, "gpu-api", "vulkan"))
|
||||
checkError(mpv_set_option_string(mpv, "gpu-context", "moltenvk"))
|
||||
checkError(mpv_set_option_string(mpv, "hwdec", "videotoolbox"))
|
||||
checkError(mpv_set_option_string(mpv, "target-colorspace-hint", "yes"))
|
||||
|
||||
// Initialize MPV
|
||||
let initResult = mpv_initialize(mpv)
|
||||
if initResult < 0 {
|
||||
print(
|
||||
"[MpvPlayerCore] mpv_initialize failed: \(String(cString: mpv_error_string(initResult)))"
|
||||
)
|
||||
mpv_terminate_destroy(mpv)
|
||||
mpv = nil
|
||||
return false
|
||||
}
|
||||
|
||||
// Set up wakeup callback for event handling
|
||||
mpv_set_wakeup_callback(
|
||||
mpv,
|
||||
{ ctx in
|
||||
let core = Unmanaged<MpvPlayerCore>.fromOpaque(ctx!).takeUnretainedValue()
|
||||
core.readEvents()
|
||||
}, UnsafeMutableRawPointer(Unmanaged.passUnretained(self).toOpaque()))
|
||||
|
||||
// Observe video-params/sig-peak for HDR detection
|
||||
mpv_observe_property(mpv, 0, "video-params/sig-peak", MPV_FORMAT_DOUBLE)
|
||||
|
||||
print("[MpvPlayerCore] MPV initialized successfully")
|
||||
return true
|
||||
}
|
||||
|
||||
// MARK: - Background/Foreground Handling
|
||||
|
||||
private func setupNotifications() {
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(enterBackground),
|
||||
name: UIApplication.didEnterBackgroundNotification,
|
||||
object: nil
|
||||
)
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(enterForeground),
|
||||
name: UIApplication.willEnterForegroundNotification,
|
||||
object: nil
|
||||
)
|
||||
}
|
||||
|
||||
@objc private func enterBackground() {
|
||||
// Disable video output to fix black screen when returning from background
|
||||
print("[MpvPlayerCore] Entering background - disabling video")
|
||||
if mpv != nil {
|
||||
mpv_set_option_string(mpv, "vid", "no")
|
||||
}
|
||||
}
|
||||
|
||||
@objc private func enterForeground() {
|
||||
// Re-enable video output
|
||||
print("[MpvPlayerCore] Entering foreground - enabling video")
|
||||
if mpv != nil {
|
||||
mpv_set_option_string(mpv, "vid", "auto")
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - MPV Properties and Commands
|
||||
|
||||
func setProperty(_ name: String, value: String) {
|
||||
guard mpv != nil else { return }
|
||||
|
||||
// Handle custom HDR toggle property
|
||||
if name == "hdr-enabled" {
|
||||
let enabled = value == "yes" || value == "true" || value == "1"
|
||||
setHDREnabled(enabled)
|
||||
return
|
||||
}
|
||||
|
||||
mpv_set_property_string(mpv, name, value)
|
||||
}
|
||||
|
||||
/// Enable or disable HDR mode
|
||||
func setHDREnabled(_ enabled: Bool) {
|
||||
hdrEnabled = enabled
|
||||
print("[MpvPlayerCore] HDR enabled: \(enabled)")
|
||||
|
||||
// Update MPV's target-colorspace-hint
|
||||
if mpv != nil {
|
||||
mpv_set_property_string(mpv, "target-colorspace-hint", enabled ? "yes" : "no")
|
||||
}
|
||||
|
||||
// Re-evaluate EDR mode with current sig-peak
|
||||
DispatchQueue.main.async {
|
||||
self.updateEDRMode(sigPeak: self.lastSigPeak)
|
||||
}
|
||||
}
|
||||
|
||||
func getProperty(_ name: String) -> String? {
|
||||
guard mpv != nil else { return nil }
|
||||
let cstr = mpv_get_property_string(mpv, name)
|
||||
defer { mpv_free(cstr) }
|
||||
return cstr.map { String(cString: $0) }
|
||||
}
|
||||
|
||||
func observeProperty(_ name: String, format: String) {
|
||||
guard mpv != nil else { return }
|
||||
|
||||
let mpvFormat: mpv_format
|
||||
switch format {
|
||||
case "double": mpvFormat = MPV_FORMAT_DOUBLE
|
||||
case "flag": mpvFormat = MPV_FORMAT_FLAG
|
||||
case "node": mpvFormat = MPV_FORMAT_NODE
|
||||
case "string": mpvFormat = MPV_FORMAT_STRING
|
||||
default: return
|
||||
}
|
||||
|
||||
mpv_observe_property(mpv, 0, name, mpvFormat)
|
||||
}
|
||||
|
||||
func command(_ args: [String]) {
|
||||
guard mpv != nil, !args.isEmpty else { return }
|
||||
command(args[0], args: Array(args.dropFirst()))
|
||||
}
|
||||
|
||||
// MARK: - Visibility
|
||||
|
||||
func setVisible(_ visible: Bool) {
|
||||
guard let container = containerView else { return }
|
||||
|
||||
if visible {
|
||||
// Re-insert at the bottom of the window view stack
|
||||
container.removeFromSuperview()
|
||||
window?.insertSubview(container, at: 0)
|
||||
}
|
||||
|
||||
container.isHidden = !visible
|
||||
print("[MpvPlayerCore] setVisible(\(visible))")
|
||||
}
|
||||
|
||||
func updateFrame(_ frame: CGRect? = nil) {
|
||||
guard let metalLayer = metalLayer, let container = containerView else { return }
|
||||
|
||||
if let frame = frame {
|
||||
container.frame = frame
|
||||
metalLayer.frame = container.bounds
|
||||
} else if let window = window {
|
||||
container.frame = window.bounds
|
||||
metalLayer.frame = container.bounds
|
||||
}
|
||||
|
||||
// Update drawable size for proper scaling
|
||||
let scale = UIScreen.main.nativeScale
|
||||
metalLayer.drawableSize = CGSize(
|
||||
width: metalLayer.frame.width * scale,
|
||||
height: metalLayer.frame.height * scale
|
||||
)
|
||||
|
||||
print("[MpvPlayerCore] updateFrame: \(container.frame)")
|
||||
}
|
||||
|
||||
// MARK: - Private Helpers
|
||||
|
||||
private func command(_ cmd: String, args: [String] = []) {
|
||||
guard mpv != nil else { return }
|
||||
|
||||
// Build array of C strings for mpv_command
|
||||
var cargs: [UnsafeMutablePointer<CChar>?] = ([cmd] + args).map { strdup($0) }
|
||||
cargs.append(nil) // null-terminate
|
||||
defer {
|
||||
for ptr in cargs {
|
||||
free(ptr)
|
||||
}
|
||||
}
|
||||
|
||||
// mpv_command expects UnsafePointer, use withUnsafeBufferPointer for the conversion
|
||||
cargs.withUnsafeBufferPointer { buffer in
|
||||
var constPtrs = buffer.map { UnsafePointer($0) }
|
||||
_ = mpv_command(mpv, &constPtrs)
|
||||
}
|
||||
}
|
||||
|
||||
private func readEvents() {
|
||||
queue.async { [weak self] in
|
||||
guard let self = self, let mpv = self.mpv else { return }
|
||||
|
||||
while true {
|
||||
let event = mpv_wait_event(mpv, 0)
|
||||
guard let eventPtr = event else { break }
|
||||
|
||||
if eventPtr.pointee.event_id == MPV_EVENT_NONE {
|
||||
break
|
||||
}
|
||||
|
||||
self.handleEvent(eventPtr.pointee)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func handleEvent(_ event: mpv_event) {
|
||||
switch event.event_id {
|
||||
case MPV_EVENT_PROPERTY_CHANGE:
|
||||
guard let data = event.data else { break }
|
||||
let property = data.assumingMemoryBound(to: mpv_event_property.self).pointee
|
||||
let name = String(cString: property.name)
|
||||
handlePropertyChange(name: name, property: property)
|
||||
|
||||
case MPV_EVENT_FILE_LOADED:
|
||||
DispatchQueue.main.async {
|
||||
self.delegate?.onEvent(name: "file-loaded", data: nil)
|
||||
}
|
||||
|
||||
case MPV_EVENT_END_FILE:
|
||||
DispatchQueue.main.async {
|
||||
self.delegate?.onEvent(name: "end-file", data: nil)
|
||||
}
|
||||
|
||||
case MPV_EVENT_SHUTDOWN:
|
||||
print("[MpvPlayerCore] MPV shutdown event")
|
||||
|
||||
case MPV_EVENT_PLAYBACK_RESTART:
|
||||
DispatchQueue.main.async {
|
||||
self.delegate?.onEvent(name: "playback-restart", data: nil)
|
||||
}
|
||||
|
||||
case MPV_EVENT_LOG_MESSAGE:
|
||||
if let msgPtr = event.data?.assumingMemoryBound(to: mpv_event_log_message.self) {
|
||||
let msg = msgPtr.pointee
|
||||
let prefix = msg.prefix.map { String(cString: $0) } ?? ""
|
||||
let level = msg.level.map { String(cString: $0) } ?? ""
|
||||
let text = msg.text.map { String(cString: $0) } ?? ""
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.delegate?.onEvent(name: "log-message", data: [
|
||||
"prefix": prefix,
|
||||
"level": level,
|
||||
"text": text
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
private func handlePropertyChange(name: String, property: mpv_event_property) {
|
||||
var value: Any?
|
||||
|
||||
switch property.format {
|
||||
case MPV_FORMAT_DOUBLE:
|
||||
if let ptr = property.data {
|
||||
value = ptr.assumingMemoryBound(to: Double.self).pointee
|
||||
}
|
||||
|
||||
case MPV_FORMAT_FLAG:
|
||||
if let ptr = property.data {
|
||||
value = ptr.assumingMemoryBound(to: Int32.self).pointee != 0
|
||||
}
|
||||
|
||||
case MPV_FORMAT_NODE:
|
||||
if let ptr = property.data {
|
||||
let node = ptr.assumingMemoryBound(to: mpv_node.self).pointee
|
||||
value = convertNode(node)
|
||||
}
|
||||
|
||||
case MPV_FORMAT_STRING:
|
||||
if let ptr = property.data {
|
||||
let cstr = ptr.assumingMemoryBound(to: UnsafePointer<CChar>?.self).pointee
|
||||
value = cstr.map { String(cString: $0) }
|
||||
}
|
||||
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
// Handle sig-peak for HDR/EDR activation
|
||||
if name == "video-params/sig-peak", let sigPeak = value as? Double {
|
||||
lastSigPeak = sigPeak
|
||||
DispatchQueue.main.async {
|
||||
self.updateEDRMode(sigPeak: sigPeak)
|
||||
}
|
||||
}
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.delegate?.onPropertyChange(name: name, value: value)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - HDR/EDR Support
|
||||
|
||||
private func updateEDRMode(sigPeak: Double) {
|
||||
guard let layer = metalLayer else { return }
|
||||
|
||||
// Check if screen supports EDR (iOS 16+)
|
||||
var edrHeadroom: CGFloat = 1.0
|
||||
if #available(iOS 16.0, *) {
|
||||
edrHeadroom = containerView?.window?.screen.potentialEDRHeadroom ?? 1.0
|
||||
}
|
||||
|
||||
let isHDRContent = sigPeak > 1.0
|
||||
let screenSupportsEDR = edrHeadroom > 1.0
|
||||
let shouldEnableEDR = hdrEnabled && isHDRContent && screenSupportsEDR
|
||||
|
||||
if #available(iOS 16.0, *) {
|
||||
layer.wantsExtendedDynamicRangeContent = shouldEnableEDR
|
||||
}
|
||||
|
||||
print(
|
||||
"[MpvPlayerCore] EDR mode: \(shouldEnableEDR) (hdrEnabled: \(hdrEnabled), sigPeak: \(sigPeak), headroom: \(edrHeadroom))"
|
||||
)
|
||||
}
|
||||
|
||||
private func convertNode(_ node: mpv_node) -> Any? {
|
||||
switch node.format {
|
||||
case MPV_FORMAT_STRING:
|
||||
return node.u.string.map { String(cString: $0) }
|
||||
|
||||
case MPV_FORMAT_FLAG:
|
||||
return node.u.flag != 0
|
||||
|
||||
case MPV_FORMAT_INT64:
|
||||
return node.u.int64
|
||||
|
||||
case MPV_FORMAT_DOUBLE:
|
||||
return node.u.double_
|
||||
|
||||
case MPV_FORMAT_NODE_ARRAY:
|
||||
guard let list = node.u.list?.pointee else { return nil }
|
||||
var array = [Any]()
|
||||
for i in 0..<Int(list.num) {
|
||||
if let item = convertNode(list.values[i]) {
|
||||
array.append(item)
|
||||
}
|
||||
}
|
||||
return array
|
||||
|
||||
case MPV_FORMAT_NODE_MAP:
|
||||
guard let list = node.u.list?.pointee else { return nil }
|
||||
var dict = [String: Any]()
|
||||
for i in 0..<Int(list.num) {
|
||||
if let key = list.keys?[i].map({ String(cString: $0) }),
|
||||
let val = convertNode(list.values[i])
|
||||
{
|
||||
dict[key] = val
|
||||
}
|
||||
}
|
||||
return dict
|
||||
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
private func checkError(_ status: CInt) {
|
||||
if status < 0 {
|
||||
print("[MpvPlayerCore] MPV error: \(String(cString: mpv_error_string(status)))")
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Cleanup
|
||||
|
||||
func dispose() {
|
||||
NotificationCenter.default.removeObserver(self)
|
||||
|
||||
let mpvHandle = mpv
|
||||
mpv = nil
|
||||
|
||||
queue.sync {
|
||||
if let handle = mpvHandle {
|
||||
mpv_set_wakeup_callback(handle, nil, nil)
|
||||
mpv_terminate_destroy(handle)
|
||||
}
|
||||
}
|
||||
metalLayer?.removeFromSuperlayer()
|
||||
metalLayer = nil
|
||||
containerView?.removeFromSuperview()
|
||||
containerView = nil
|
||||
isInitialized = false
|
||||
print("[MpvPlayerCore] Disposed")
|
||||
}
|
||||
|
||||
deinit {
|
||||
dispose()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,245 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
|
||||
/// Flutter plugin that bridges MPV player to Dart via method and event channels
|
||||
class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerDelegate {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
private var playerCore: MpvPlayerCore?
|
||||
private var eventSink: FlutterEventSink?
|
||||
private weak var registrar: FlutterPluginRegistrar?
|
||||
|
||||
// MARK: - FlutterPlugin Registration
|
||||
|
||||
static func register(with registrar: FlutterPluginRegistrar) {
|
||||
// Method channel for commands
|
||||
let methodChannel = FlutterMethodChannel(
|
||||
name: "com.plezy/mpv_player",
|
||||
binaryMessenger: registrar.messenger()
|
||||
)
|
||||
|
||||
// Event channel for state updates
|
||||
let eventChannel = FlutterEventChannel(
|
||||
name: "com.plezy/mpv_player/events",
|
||||
binaryMessenger: registrar.messenger()
|
||||
)
|
||||
|
||||
let instance = MpvPlayerPlugin()
|
||||
instance.registrar = registrar
|
||||
|
||||
registrar.addMethodCallDelegate(instance, channel: methodChannel)
|
||||
eventChannel.setStreamHandler(instance)
|
||||
|
||||
print("[MpvPlayerPlugin] Registered with Flutter")
|
||||
}
|
||||
|
||||
// MARK: - FlutterStreamHandler
|
||||
|
||||
func onListen(withArguments arguments: Any?, eventSink events: @escaping FlutterEventSink) -> FlutterError? {
|
||||
self.eventSink = events
|
||||
print("[MpvPlayerPlugin] Event stream connected")
|
||||
return nil
|
||||
}
|
||||
|
||||
func onCancel(withArguments arguments: Any?) -> FlutterError? {
|
||||
self.eventSink = nil
|
||||
print("[MpvPlayerPlugin] Event stream disconnected")
|
||||
return nil
|
||||
}
|
||||
|
||||
// MARK: - FlutterPlugin Method Handler
|
||||
|
||||
func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
switch call.method {
|
||||
case "initialize":
|
||||
handleInitialize(result: result)
|
||||
|
||||
case "dispose":
|
||||
handleDispose(result: result)
|
||||
|
||||
case "setProperty":
|
||||
handleSetProperty(call: call, result: result)
|
||||
|
||||
case "getProperty":
|
||||
handleGetProperty(call: call, result: result)
|
||||
|
||||
case "observeProperty":
|
||||
handleObserveProperty(call: call, result: result)
|
||||
|
||||
case "command":
|
||||
handleCommand(call: call, result: result)
|
||||
|
||||
case "setVisible":
|
||||
handleSetVisible(call: call, result: result)
|
||||
|
||||
case "isInitialized":
|
||||
result(playerCore?.isInitialized ?? false)
|
||||
|
||||
case "updateFrame":
|
||||
handleUpdateFrame(result: result)
|
||||
|
||||
default:
|
||||
result(FlutterMethodNotImplemented)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Method Handlers
|
||||
|
||||
private func handleInitialize(result: @escaping FlutterResult) {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
guard let self = self else {
|
||||
result(FlutterError(code: "ERROR", message: "Plugin deallocated", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
// Check if already initialized
|
||||
if self.playerCore?.isInitialized == true {
|
||||
print("[MpvPlayerPlugin] Already initialized")
|
||||
result(true)
|
||||
return
|
||||
}
|
||||
|
||||
// Find the key window
|
||||
guard let window = self.findKeyWindow() else {
|
||||
print("[MpvPlayerPlugin] Failed to find key window")
|
||||
result(FlutterError(code: "NO_WINDOW", message: "Could not find key window", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
// Create and initialize player core
|
||||
let core = MpvPlayerCore()
|
||||
core.delegate = self
|
||||
|
||||
guard core.initialize(in: window) else {
|
||||
print("[MpvPlayerPlugin] Failed to initialize MPV")
|
||||
result(FlutterError(code: "MPV_INIT_FAILED", message: "Failed to initialize MPV", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
self.playerCore = core
|
||||
|
||||
// Start hidden
|
||||
core.setVisible(false)
|
||||
|
||||
print("[MpvPlayerPlugin] Initialized successfully")
|
||||
result(true)
|
||||
}
|
||||
}
|
||||
|
||||
private func handleDispose(result: @escaping FlutterResult) {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.playerCore?.dispose()
|
||||
self?.playerCore = nil
|
||||
print("[MpvPlayerPlugin] Disposed")
|
||||
result(nil)
|
||||
}
|
||||
}
|
||||
|
||||
private func handleSetProperty(call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
guard let args = call.arguments as? [String: Any],
|
||||
let name = args["name"] as? String,
|
||||
let value = args["value"] as? String else {
|
||||
result(FlutterError(code: "INVALID_ARGS", message: "Missing 'name' or 'value' argument", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
playerCore?.setProperty(name, value: value)
|
||||
result(nil)
|
||||
}
|
||||
|
||||
private func handleGetProperty(call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
guard let args = call.arguments as? [String: Any],
|
||||
let name = args["name"] as? String else {
|
||||
result(FlutterError(code: "INVALID_ARGS", message: "Missing 'name' argument", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
let value = playerCore?.getProperty(name)
|
||||
result(value)
|
||||
}
|
||||
|
||||
private func handleObserveProperty(call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
guard let args = call.arguments as? [String: Any],
|
||||
let name = args["name"] as? String,
|
||||
let format = args["format"] as? String else {
|
||||
result(FlutterError(code: "INVALID_ARGS", message: "Missing 'name' or 'format' argument", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
playerCore?.observeProperty(name, format: format)
|
||||
result(nil)
|
||||
}
|
||||
|
||||
private func handleCommand(call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
guard let args = call.arguments as? [String: Any],
|
||||
let commandArgs = args["args"] as? [String] else {
|
||||
result(FlutterError(code: "INVALID_ARGS", message: "Missing 'args' argument", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
playerCore?.command(commandArgs)
|
||||
result(nil)
|
||||
}
|
||||
|
||||
private func handleSetVisible(call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
guard let args = call.arguments as? [String: Any],
|
||||
let visible = args["visible"] as? Bool else {
|
||||
result(FlutterError(code: "INVALID_ARGS", message: "Missing 'visible' argument", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.playerCore?.setVisible(visible)
|
||||
|
||||
// Update frame when becoming visible
|
||||
if visible {
|
||||
self?.playerCore?.updateFrame()
|
||||
}
|
||||
|
||||
result(nil)
|
||||
}
|
||||
}
|
||||
|
||||
private func handleUpdateFrame(result: @escaping FlutterResult) {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.playerCore?.updateFrame()
|
||||
result(nil)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - MpvPlayerDelegate
|
||||
|
||||
func onPropertyChange(name: String, value: Any?) {
|
||||
guard let eventSink = eventSink else { return }
|
||||
|
||||
var event: [String: Any] = ["type": "property", "name": name]
|
||||
|
||||
if let value = value {
|
||||
event["value"] = value
|
||||
}
|
||||
|
||||
eventSink(event)
|
||||
}
|
||||
|
||||
func onEvent(name: String, data: [String: Any]?) {
|
||||
guard let eventSink = eventSink else { return }
|
||||
|
||||
var event: [String: Any] = ["type": "event", "name": name]
|
||||
if let data = data {
|
||||
event["data"] = data
|
||||
}
|
||||
|
||||
eventSink(event)
|
||||
}
|
||||
|
||||
// MARK: - Helpers
|
||||
|
||||
private func findKeyWindow() -> UIWindow? {
|
||||
guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
|
||||
let window = windowScene.windows.first(where: { $0.isKeyWindow }) else {
|
||||
return nil
|
||||
}
|
||||
return window
|
||||
}
|
||||
}
|
||||
@@ -19,13 +19,13 @@ platform :ios do
|
||||
desc "Build release IPA"
|
||||
lane :build do
|
||||
# Navigate to Flutter project root and build
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build ipa")
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build ipa --dart-define=ENABLE_IN_APP_REVIEW=true")
|
||||
end
|
||||
|
||||
desc "Build and deploy to TestFlight"
|
||||
lane :deploy_testflight do
|
||||
# Build the Flutter app
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build ipa")
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build ipa --dart-define=ENABLE_IN_APP_REVIEW=true")
|
||||
|
||||
# Upload to TestFlight
|
||||
upload_to_testflight(
|
||||
@@ -36,7 +36,7 @@ platform :ios do
|
||||
desc "Build and deploy to App Store"
|
||||
lane :deploy_appstore do
|
||||
# Build the Flutter app
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build ipa")
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build ipa --dart-define=ENABLE_IN_APP_REVIEW=true")
|
||||
|
||||
# Upload to App Store
|
||||
upload_to_app_store(
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/// Layout and sizing constants used throughout the application
|
||||
/// Screen width breakpoints for responsive design
|
||||
class ScreenBreakpoints {
|
||||
/// Breakpoint for tablet devices (600px)
|
||||
static const double tablet = 600;
|
||||
|
||||
/// Breakpoint for desktop devices (1200px)
|
||||
static const double desktop = 1200;
|
||||
|
||||
/// Breakpoint for large desktop devices (1600px)
|
||||
static const double largeDesktop = 1600;
|
||||
}
|
||||
|
||||
/// Grid layout constants
|
||||
class GridLayoutConstants {
|
||||
/// Maximum cross-axis extent for grid items in comfortable density mode
|
||||
static const double comfortableDesktop = 280;
|
||||
static const double comfortableTablet = 240;
|
||||
static const double comfortableMobile = 200;
|
||||
|
||||
/// Maximum cross-axis extent for grid items in compact density mode
|
||||
static const double compactDesktop = 200;
|
||||
static const double compactTablet = 170;
|
||||
static const double compactMobile = 140;
|
||||
|
||||
/// Maximum cross-axis extent for grid items in normal density mode
|
||||
static const double normalDesktop = 240;
|
||||
static const double normalTablet = 200;
|
||||
static const double normalMobile = 170;
|
||||
|
||||
/// Default aspect ratio for media cards (poster)
|
||||
static const double posterAspectRatio = 2 / 3.3;
|
||||
|
||||
/// Grid spacing
|
||||
static const double crossAxisSpacing = 0;
|
||||
static const double mainAxisSpacing = 0;
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
import 'dart:io';
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:drift/native.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
import 'tables.dart';
|
||||
import '../models/download_models.dart';
|
||||
import '../utils/app_logger.dart';
|
||||
|
||||
part 'app_database.g.dart';
|
||||
|
||||
// Simplified database with API cache for offline support
|
||||
@DriftDatabase(tables: [DownloadedMedia, DownloadQueue, ApiCache, OfflineWatchProgress])
|
||||
class AppDatabase extends _$AppDatabase {
|
||||
AppDatabase() : super(_openConnection());
|
||||
|
||||
@override
|
||||
int get schemaVersion => 7; // Added OfflineWatchProgress table
|
||||
|
||||
@override
|
||||
MigrationStrategy get migration {
|
||||
return MigrationStrategy(
|
||||
onCreate: (Migrator m) async {
|
||||
await m.createAll();
|
||||
},
|
||||
onUpgrade: (Migrator m, int from, int to) async {
|
||||
// Additive migration for schema version 7
|
||||
if (from < 7) {
|
||||
appLogger.i('Adding OfflineWatchProgress table (v7 migration)');
|
||||
await m.createTable(offlineWatchProgress);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Offline Watch Progress Operations
|
||||
// ============================================================
|
||||
|
||||
/// Get all pending offline watch actions for sync
|
||||
Future<List<OfflineWatchProgressItem>> getPendingWatchActions() {
|
||||
return (select(offlineWatchProgress)..orderBy([(t) => OrderingTerm.asc(t.createdAt)])).get();
|
||||
}
|
||||
|
||||
/// Get pending watch actions for a specific server
|
||||
Future<List<OfflineWatchProgressItem>> getPendingWatchActionsForServer(String serverId) {
|
||||
return (select(offlineWatchProgress)
|
||||
..where((t) => t.serverId.equals(serverId))
|
||||
..orderBy([(t) => OrderingTerm.asc(t.createdAt)]))
|
||||
.get();
|
||||
}
|
||||
|
||||
/// Get the latest action for a specific item
|
||||
Future<OfflineWatchProgressItem?> getLatestWatchAction(String globalKey) {
|
||||
return (select(offlineWatchProgress)
|
||||
..where((t) => t.globalKey.equals(globalKey))
|
||||
..orderBy([(t) => OrderingTerm.desc(t.updatedAt)])
|
||||
..limit(1))
|
||||
.getSingleOrNull();
|
||||
}
|
||||
|
||||
/// Get the latest actions for multiple items in a single query
|
||||
///
|
||||
/// Returns a map of globalKey -> latest action for each key.
|
||||
/// Keys with no actions will not be present in the returned map.
|
||||
Future<Map<String, OfflineWatchProgressItem>> getLatestWatchActionsForKeys(Set<String> globalKeys) async {
|
||||
if (globalKeys.isEmpty) return {};
|
||||
|
||||
// Query all actions for the given keys
|
||||
final allActions =
|
||||
await (select(offlineWatchProgress)
|
||||
..where((t) => t.globalKey.isIn(globalKeys))
|
||||
..orderBy([(t) => OrderingTerm.desc(t.updatedAt)]))
|
||||
.get();
|
||||
|
||||
// Group by globalKey and take the latest (first due to ordering)
|
||||
final result = <String, OfflineWatchProgressItem>{};
|
||||
for (final action in allActions) {
|
||||
// Only keep the first (latest) action for each key
|
||||
result.putIfAbsent(action.globalKey, () => action);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Insert or update a progress action (merges with existing)
|
||||
Future<void> upsertProgressAction({
|
||||
required String serverId,
|
||||
required String ratingKey,
|
||||
required int viewOffset,
|
||||
required int duration,
|
||||
required bool shouldMarkWatched,
|
||||
}) async {
|
||||
final globalKey = '$serverId:$ratingKey';
|
||||
final now = DateTime.now().millisecondsSinceEpoch;
|
||||
|
||||
// Check for existing progress entry
|
||||
final existing =
|
||||
await (select(offlineWatchProgress)
|
||||
..where((t) => t.globalKey.equals(globalKey) & t.actionType.equals('progress'))
|
||||
..limit(1))
|
||||
.getSingleOrNull();
|
||||
|
||||
if (existing != null) {
|
||||
// Update existing progress entry
|
||||
await (update(offlineWatchProgress)..where((t) => t.id.equals(existing.id))).write(
|
||||
OfflineWatchProgressCompanion(
|
||||
viewOffset: Value(viewOffset),
|
||||
duration: Value(duration),
|
||||
shouldMarkWatched: Value(shouldMarkWatched),
|
||||
updatedAt: Value(now),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
// Insert new progress entry
|
||||
await into(offlineWatchProgress).insert(
|
||||
OfflineWatchProgressCompanion.insert(
|
||||
serverId: serverId,
|
||||
ratingKey: ratingKey,
|
||||
globalKey: globalKey,
|
||||
actionType: 'progress',
|
||||
viewOffset: Value(viewOffset),
|
||||
duration: Value(duration),
|
||||
shouldMarkWatched: Value(shouldMarkWatched),
|
||||
createdAt: now,
|
||||
updatedAt: now,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Insert a manual watch action (watched or unwatched)
|
||||
/// Removes conflicting actions for the same item
|
||||
Future<void> insertWatchAction({
|
||||
required String serverId,
|
||||
required String ratingKey,
|
||||
required String actionType, // 'watched' or 'unwatched'
|
||||
}) async {
|
||||
final globalKey = '$serverId:$ratingKey';
|
||||
final now = DateTime.now().millisecondsSinceEpoch;
|
||||
|
||||
// Remove conflicting actions (opposite action type and progress)
|
||||
await (delete(offlineWatchProgress)..where((t) => t.globalKey.equals(globalKey))).go();
|
||||
|
||||
// Insert the new action
|
||||
await into(offlineWatchProgress).insert(
|
||||
OfflineWatchProgressCompanion.insert(
|
||||
serverId: serverId,
|
||||
ratingKey: ratingKey,
|
||||
globalKey: globalKey,
|
||||
actionType: actionType,
|
||||
createdAt: now,
|
||||
updatedAt: now,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Delete a specific watch action after successful sync
|
||||
Future<void> deleteWatchAction(int id) {
|
||||
return (delete(offlineWatchProgress)..where((t) => t.id.equals(id))).go();
|
||||
}
|
||||
|
||||
/// Update sync attempt count and error message
|
||||
Future<void> updateSyncAttempt(int id, String? errorMessage) async {
|
||||
final existing = await (select(offlineWatchProgress)..where((t) => t.id.equals(id))).getSingleOrNull();
|
||||
|
||||
if (existing != null) {
|
||||
await (update(offlineWatchProgress)..where((t) => t.id.equals(id))).write(
|
||||
OfflineWatchProgressCompanion(syncAttempts: Value(existing.syncAttempts + 1), lastError: Value(errorMessage)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Get count of pending sync items
|
||||
Future<int> getPendingSyncCount() async {
|
||||
final count = await (selectOnly(offlineWatchProgress)..addColumns([offlineWatchProgress.id.count()]))
|
||||
.map((row) => row.read(offlineWatchProgress.id.count()))
|
||||
.getSingle();
|
||||
return count ?? 0;
|
||||
}
|
||||
|
||||
/// Clear all pending watch actions (e.g., after logout)
|
||||
Future<void> clearAllWatchActions() {
|
||||
return delete(offlineWatchProgress).go();
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Downloaded Media Queries for Watch State Sync
|
||||
// ============================================================
|
||||
|
||||
/// Get all downloaded media items (for syncing watch states)
|
||||
Future<List<DownloadedMediaItem>> getAllDownloadedMetadata() {
|
||||
return (select(downloadedMedia)..where((t) => t.status.equals(DownloadStatus.completed.index))).get();
|
||||
}
|
||||
}
|
||||
|
||||
LazyDatabase _openConnection() {
|
||||
return LazyDatabase(() async {
|
||||
final dbFolder = await getApplicationDocumentsDirectory();
|
||||
final file = File(p.join(dbFolder.path, 'plezy_downloads.db'));
|
||||
return NativeDatabase(file);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
/// Key-value cache table for Plex API responses.
|
||||
/// Used for offline support - stores raw JSON responses.
|
||||
class ApiCache extends Table {
|
||||
/// Composite key: serverId:endpoint (e.g., "abc123:/library/metadata/12345")
|
||||
TextColumn get cacheKey => text()();
|
||||
|
||||
/// JSON response data
|
||||
TextColumn get data => text()();
|
||||
|
||||
/// Whether this item is pinned for offline access
|
||||
BoolColumn get pinned => boolean().withDefault(const Constant(false))();
|
||||
|
||||
/// Timestamp for cache invalidation (optional future use)
|
||||
DateTimeColumn get cachedAt => dateTime().withDefault(currentDateAndTime)();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {cacheKey};
|
||||
}
|
||||
|
||||
@DataClassName('DownloadQueueItem')
|
||||
class DownloadQueue extends Table {
|
||||
IntColumn get id => integer().autoIncrement()();
|
||||
TextColumn get mediaGlobalKey => text().unique()();
|
||||
IntColumn get priority => integer().withDefault(const Constant(0))();
|
||||
IntColumn get addedAt => integer()();
|
||||
BoolColumn get downloadSubtitles => boolean().withDefault(const Constant(true))();
|
||||
BoolColumn get downloadArtwork => boolean().withDefault(const Constant(true))();
|
||||
}
|
||||
|
||||
@DataClassName('DownloadedMediaItem')
|
||||
class DownloadedMedia extends Table {
|
||||
IntColumn get id => integer().autoIncrement()();
|
||||
TextColumn get serverId => text()();
|
||||
TextColumn get ratingKey => text()();
|
||||
TextColumn get globalKey => text().unique()();
|
||||
TextColumn get type => text()();
|
||||
TextColumn get parentRatingKey => text().nullable()();
|
||||
TextColumn get grandparentRatingKey => text().nullable()();
|
||||
IntColumn get status => integer()();
|
||||
IntColumn get progress => integer().withDefault(const Constant(0))();
|
||||
IntColumn get totalBytes => integer().nullable()();
|
||||
IntColumn get downloadedBytes => integer().withDefault(const Constant(0))();
|
||||
TextColumn get videoFilePath => text().nullable()();
|
||||
TextColumn get thumbPath => text().nullable()();
|
||||
IntColumn get downloadedAt => integer().nullable()();
|
||||
TextColumn get errorMessage => text().nullable()();
|
||||
IntColumn get retryCount => integer().withDefault(const Constant(0))();
|
||||
}
|
||||
|
||||
/// Queue for offline watch progress and manual watch actions.
|
||||
///
|
||||
/// Stores watch progress updates and manual watch/unwatch actions
|
||||
/// that need to be synced to the Plex server when back online.
|
||||
@DataClassName('OfflineWatchProgressItem')
|
||||
class OfflineWatchProgress extends Table {
|
||||
/// Auto-incrementing primary key
|
||||
IntColumn get id => integer().autoIncrement()();
|
||||
|
||||
/// Server ID this media belongs to
|
||||
TextColumn get serverId => text()();
|
||||
|
||||
/// Rating key of the media item
|
||||
TextColumn get ratingKey => text()();
|
||||
|
||||
/// Global key (serverId:ratingKey) for easy lookup
|
||||
TextColumn get globalKey => text()();
|
||||
|
||||
/// Type of action: 'progress', 'watched', 'unwatched'
|
||||
TextColumn get actionType => text()();
|
||||
|
||||
/// Current playback position in milliseconds (for 'progress' actions)
|
||||
IntColumn get viewOffset => integer().nullable()();
|
||||
|
||||
/// Duration of the media in milliseconds (for calculating percentage)
|
||||
IntColumn get duration => integer().nullable()();
|
||||
|
||||
/// Whether this item should be marked as watched (for progress sync)
|
||||
/// Auto-set to true when viewOffset >= 90% of duration
|
||||
BoolColumn get shouldMarkWatched => boolean().withDefault(const Constant(false))();
|
||||
|
||||
/// Timestamp when this action was recorded (milliseconds since epoch)
|
||||
IntColumn get createdAt => integer()();
|
||||
|
||||
/// Timestamp when this action was last updated (for merging progress updates)
|
||||
IntColumn get updatedAt => integer()();
|
||||
|
||||
/// Number of sync attempts (for retry logic)
|
||||
IntColumn get syncAttempts => integer().withDefault(const Constant(0))();
|
||||
|
||||
/// Last sync error message
|
||||
TextColumn get lastError => text().nullable()();
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
/// Extension on KeyEvent for common event type checks.
|
||||
extension KeyEventActionable on KeyEvent {
|
||||
/// Whether this event should trigger an action (KeyDownEvent or KeyRepeatEvent).
|
||||
/// Use this to filter out KeyUpEvents early in key handlers.
|
||||
bool get isActionable => this is KeyDownEvent || this is KeyRepeatEvent;
|
||||
}
|
||||
|
||||
/// Shared sets for keyboard key categories.
|
||||
final _dpadDirectionKeys = {
|
||||
LogicalKeyboardKey.arrowUp,
|
||||
LogicalKeyboardKey.arrowDown,
|
||||
LogicalKeyboardKey.arrowLeft,
|
||||
LogicalKeyboardKey.arrowRight,
|
||||
};
|
||||
|
||||
final _selectKeys = {
|
||||
LogicalKeyboardKey.select,
|
||||
LogicalKeyboardKey.enter,
|
||||
LogicalKeyboardKey.numpadEnter,
|
||||
LogicalKeyboardKey.gameButtonA,
|
||||
};
|
||||
|
||||
final _backKeys = {
|
||||
LogicalKeyboardKey.escape,
|
||||
LogicalKeyboardKey.goBack,
|
||||
LogicalKeyboardKey.browserBack,
|
||||
LogicalKeyboardKey.gameButtonB,
|
||||
};
|
||||
|
||||
final _contextMenuKeys = {LogicalKeyboardKey.contextMenu, LogicalKeyboardKey.gameButtonX};
|
||||
|
||||
/// Extension methods for checking D-pad related keys.
|
||||
extension DpadKeyExtension on LogicalKeyboardKey {
|
||||
/// Whether this key is a D-pad directional key.
|
||||
bool get isDpadDirection => _dpadDirectionKeys.contains(this);
|
||||
|
||||
/// Whether this key is a select/activate key.
|
||||
bool get isSelectKey => _selectKeys.contains(this);
|
||||
|
||||
/// Whether this key is a back/cancel key.
|
||||
bool get isBackKey => _backKeys.contains(this);
|
||||
|
||||
/// Whether this key is a context menu key.
|
||||
bool get isContextMenuKey => _contextMenuKeys.contains(this);
|
||||
|
||||
/// Whether this key moves focus left.
|
||||
bool get isLeftKey => this == LogicalKeyboardKey.arrowLeft;
|
||||
|
||||
/// Whether this key moves focus right.
|
||||
bool get isRightKey => this == LogicalKeyboardKey.arrowRight;
|
||||
|
||||
/// Whether this key moves focus up.
|
||||
bool get isUpKey => this == LogicalKeyboardKey.arrowUp;
|
||||
|
||||
/// Whether this key moves focus down.
|
||||
bool get isDownKey => this == LogicalKeyboardKey.arrowDown;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../theme/mono_tokens.dart';
|
||||
|
||||
/// Focus styling constants for D-pad navigation.
|
||||
class FocusTheme {
|
||||
FocusTheme._();
|
||||
|
||||
/// Scale factor when an item is focused.
|
||||
static const double focusScale = 1.02;
|
||||
|
||||
/// Border width for the focus indicator.
|
||||
static const double focusBorderWidth = 2.5;
|
||||
|
||||
/// Default border radius (matches MonoTokens.radiusSm).
|
||||
static const double defaultBorderRadius = 8.0;
|
||||
|
||||
/// Get the focus border color from the theme.
|
||||
static Color getFocusBorderColor(BuildContext context) {
|
||||
return Theme.of(context).colorScheme.primary;
|
||||
}
|
||||
|
||||
/// Get the animation duration from MonoTokens.
|
||||
static Duration getAnimationDuration(BuildContext context) {
|
||||
return Theme.of(context).extension<MonoTokens>()?.fast ?? const Duration(milliseconds: 150);
|
||||
}
|
||||
|
||||
/// Build the focus border decoration.
|
||||
static BoxDecoration focusDecoration(
|
||||
BuildContext context, {
|
||||
required bool isFocused,
|
||||
double borderRadius = defaultBorderRadius,
|
||||
}) {
|
||||
final focusColor = getFocusBorderColor(context);
|
||||
|
||||
return BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(borderRadius),
|
||||
border: Border.all(color: isFocused ? focusColor : Colors.transparent, width: focusBorderWidth),
|
||||
);
|
||||
}
|
||||
|
||||
/// Build focus decoration with background color instead of border.
|
||||
/// Useful for video controls where it should match the native hover style.
|
||||
static BoxDecoration focusBackgroundDecoration({required bool isFocused, double borderRadius = defaultBorderRadius}) {
|
||||
return BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(borderRadius),
|
||||
color: isFocused ? Colors.white.withValues(alpha: 0.2) : Colors.transparent,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'dpad_navigator.dart';
|
||||
|
||||
/// Callbacks for chip key event handling.
|
||||
class ChipKeyCallbacks {
|
||||
/// Called when SELECT key is pressed.
|
||||
final VoidCallback? onSelect;
|
||||
|
||||
/// Called when DOWN arrow is pressed.
|
||||
final VoidCallback? onNavigateDown;
|
||||
|
||||
/// Called when UP arrow is pressed.
|
||||
final VoidCallback? onNavigateUp;
|
||||
|
||||
/// Called when LEFT arrow is pressed.
|
||||
final VoidCallback? onNavigateLeft;
|
||||
|
||||
/// Called when RIGHT arrow is pressed.
|
||||
final VoidCallback? onNavigateRight;
|
||||
|
||||
/// Called when BACK key is pressed.
|
||||
final VoidCallback? onBack;
|
||||
|
||||
const ChipKeyCallbacks({
|
||||
this.onSelect,
|
||||
this.onNavigateDown,
|
||||
this.onNavigateUp,
|
||||
this.onNavigateLeft,
|
||||
this.onNavigateRight,
|
||||
this.onBack,
|
||||
});
|
||||
}
|
||||
|
||||
/// A mixin that provides common FocusNode lifecycle management for chip widgets.
|
||||
///
|
||||
/// This mixin handles:
|
||||
/// - Internal/external FocusNode pattern
|
||||
/// - `_isFocused` state tracking
|
||||
/// - Listener setup in `initState`
|
||||
/// - Listener handoff in `didUpdateWidget`
|
||||
/// - Cleanup in `dispose`
|
||||
///
|
||||
/// To use this mixin:
|
||||
/// 1. Add `with FocusableChipStateMixin<YourWidget>` to your State class
|
||||
/// 2. Implement [widgetFocusNode] to return the widget's optional focusNode
|
||||
/// 3. Implement [debugLabel] to return a debug label for the internal node
|
||||
/// 4. Call [initFocusNode] in your `initState`
|
||||
/// 5. Call [updateFocusNode] in your `didUpdateWidget`
|
||||
/// 6. Call [disposeFocusNode] in your `dispose`
|
||||
/// 7. Use [focusNode] and [isFocused] in your build method
|
||||
mixin FocusableChipStateMixin<T extends StatefulWidget> on State<T> {
|
||||
FocusNode? _internalFocusNode;
|
||||
bool _isFocused = false;
|
||||
|
||||
/// Override to return the widget's optional external focus node.
|
||||
FocusNode? get widgetFocusNode;
|
||||
|
||||
/// Override to return a debug label for the internal focus node.
|
||||
String get debugLabel;
|
||||
|
||||
/// The active focus node (external if provided, otherwise internal).
|
||||
FocusNode get focusNode {
|
||||
return widgetFocusNode ?? (_internalFocusNode ??= FocusNode(debugLabel: debugLabel));
|
||||
}
|
||||
|
||||
/// Whether this widget is currently focused.
|
||||
bool get isFocused => _isFocused;
|
||||
|
||||
/// Call this in your `initState` to set up the focus listener.
|
||||
void initFocusNode() {
|
||||
focusNode.addListener(_onFocusChange);
|
||||
}
|
||||
|
||||
/// Call this in your `didUpdateWidget` with the old widget's focusNode.
|
||||
void updateFocusNode(FocusNode? oldFocusNode) {
|
||||
if (oldFocusNode != widgetFocusNode) {
|
||||
oldFocusNode?.removeListener(_onFocusChange);
|
||||
focusNode.addListener(_onFocusChange);
|
||||
}
|
||||
}
|
||||
|
||||
/// Call this in your `dispose` to clean up the focus listener.
|
||||
void disposeFocusNode() {
|
||||
focusNode.removeListener(_onFocusChange);
|
||||
_internalFocusNode?.dispose();
|
||||
}
|
||||
|
||||
void _onFocusChange() {
|
||||
if (mounted) {
|
||||
setState(() => _isFocused = focusNode.hasFocus);
|
||||
}
|
||||
}
|
||||
|
||||
/// Shared key event handler for chip widgets.
|
||||
///
|
||||
/// Handles common key patterns:
|
||||
/// - SELECT key -> onSelect
|
||||
/// - Arrow keys -> navigation callbacks
|
||||
/// - BACK key -> onBack
|
||||
///
|
||||
/// Returns [KeyEventResult.handled] if the event was consumed,
|
||||
/// [KeyEventResult.ignored] otherwise.
|
||||
KeyEventResult handleChipKeyEvent(FocusNode node, KeyEvent event, ChipKeyCallbacks callbacks) {
|
||||
if (!event.isActionable) {
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
|
||||
final key = event.logicalKey;
|
||||
|
||||
// SELECT key activates the chip
|
||||
if (key.isSelectKey && callbacks.onSelect != null) {
|
||||
callbacks.onSelect!();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
// LEFT arrow
|
||||
if (key.isLeftKey && callbacks.onNavigateLeft != null) {
|
||||
callbacks.onNavigateLeft!();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
// RIGHT arrow
|
||||
if (key.isRightKey && callbacks.onNavigateRight != null) {
|
||||
callbacks.onNavigateRight!();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
// DOWN arrow
|
||||
if (key.isDownKey) {
|
||||
callbacks.onNavigateDown?.call();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
// UP arrow
|
||||
if (key.isUpKey && callbacks.onNavigateUp != null) {
|
||||
callbacks.onNavigateUp!();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
// BACK key
|
||||
if (key.isBackKey && callbacks.onBack != null) {
|
||||
callbacks.onBack!();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,367 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'dpad_navigator.dart';
|
||||
import 'focus_theme.dart';
|
||||
import 'input_mode_tracker.dart';
|
||||
|
||||
/// A wrapper widget that makes its child focusable with D-pad navigation support.
|
||||
///
|
||||
/// Provides:
|
||||
/// - Visual focus indicator (border + scale animation)
|
||||
/// - Keyboard/D-pad event handling (Enter/Select to activate)
|
||||
/// - Optional auto-scroll to keep focused item visible
|
||||
/// - Long-press detection for SELECT key
|
||||
/// - Navigation callbacks (UP, BACK)
|
||||
class FocusableWrapper extends StatefulWidget {
|
||||
/// The child widget to wrap.
|
||||
final Widget child;
|
||||
|
||||
/// Called when the item is selected (Enter/Select/GamepadA).
|
||||
/// For short press when [enableLongPress] is true.
|
||||
final VoidCallback? onSelect;
|
||||
|
||||
/// Called when long press is triggered (hold SELECT key or context menu key).
|
||||
/// Only triggered if [enableLongPress] is true.
|
||||
final VoidCallback? onLongPress;
|
||||
|
||||
/// Called when focus changes.
|
||||
final ValueChanged<bool>? onFocusChange;
|
||||
|
||||
/// Called when the user presses UP and there's no focusable item above.
|
||||
final VoidCallback? onNavigateUp;
|
||||
|
||||
/// Called when the user presses BACK.
|
||||
final VoidCallback? onBack;
|
||||
|
||||
/// Whether this widget should request focus when first built.
|
||||
final bool autofocus;
|
||||
|
||||
/// Optional external FocusNode for programmatic focus control.
|
||||
final FocusNode? focusNode;
|
||||
|
||||
/// Border radius for the focus indicator.
|
||||
final double borderRadius;
|
||||
|
||||
/// Whether to scroll the widget into view when focused.
|
||||
final bool autoScroll;
|
||||
|
||||
/// Alignment for auto-scroll (0.0 = start, 0.5 = center, 1.0 = end).
|
||||
final double scrollAlignment;
|
||||
|
||||
/// Whether to use comfortable zone scrolling (only scroll if item is outside middle 60%).
|
||||
/// If false, always scrolls to [scrollAlignment].
|
||||
final bool useComfortableZone;
|
||||
|
||||
/// Optional semantic label for accessibility.
|
||||
final String? semanticLabel;
|
||||
|
||||
/// Whether the wrapper can receive focus.
|
||||
final bool canRequestFocus;
|
||||
|
||||
/// Custom key event handler. Return KeyEventResult.handled to consume the event.
|
||||
/// This is called before the default key handling.
|
||||
final KeyEventResult Function(FocusNode node, KeyEvent event)? onKeyEvent;
|
||||
|
||||
/// Whether to enable long-press detection for SELECT key.
|
||||
/// When enabled, holding SELECT triggers [onLongPress] after 500ms.
|
||||
/// Short press triggers [onSelect].
|
||||
final bool enableLongPress;
|
||||
|
||||
/// Duration for long-press detection.
|
||||
final Duration longPressDuration;
|
||||
|
||||
/// Whether to use background color instead of border for focus indicator.
|
||||
/// Useful for video controls where outline doesn't look good.
|
||||
final bool useBackgroundFocus;
|
||||
|
||||
/// Whether to disable the scale animation on focus.
|
||||
/// Useful for elements like sliders where scaling looks odd.
|
||||
final bool disableScale;
|
||||
|
||||
const FocusableWrapper({
|
||||
super.key,
|
||||
required this.child,
|
||||
this.onSelect,
|
||||
this.onLongPress,
|
||||
this.onFocusChange,
|
||||
this.onNavigateUp,
|
||||
this.onBack,
|
||||
this.autofocus = false,
|
||||
this.focusNode,
|
||||
this.borderRadius = FocusTheme.defaultBorderRadius,
|
||||
this.autoScroll = true,
|
||||
this.scrollAlignment = 0.5,
|
||||
this.useComfortableZone = false,
|
||||
this.semanticLabel,
|
||||
this.canRequestFocus = true,
|
||||
this.onKeyEvent,
|
||||
this.enableLongPress = false,
|
||||
this.longPressDuration = const Duration(milliseconds: 500),
|
||||
this.useBackgroundFocus = false,
|
||||
this.disableScale = false,
|
||||
});
|
||||
|
||||
@override
|
||||
State<FocusableWrapper> createState() => _FocusableWrapperState();
|
||||
}
|
||||
|
||||
class _FocusableWrapperState extends State<FocusableWrapper> with SingleTickerProviderStateMixin {
|
||||
late FocusNode _focusNode;
|
||||
bool _ownsNode = false;
|
||||
bool _isFocused = false;
|
||||
|
||||
late AnimationController _animationController;
|
||||
late Animation<double> _scaleAnimation;
|
||||
|
||||
// Long-press detection for SELECT key
|
||||
Timer? _longPressTimer;
|
||||
bool _isSelectKeyDown = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_initFocusNode();
|
||||
_initAnimations();
|
||||
}
|
||||
|
||||
void _initFocusNode() {
|
||||
if (widget.focusNode != null) {
|
||||
_focusNode = widget.focusNode!;
|
||||
_ownsNode = false;
|
||||
} else {
|
||||
_focusNode = FocusNode(
|
||||
debugLabel: widget.semanticLabel ?? 'FocusableWrapper',
|
||||
canRequestFocus: widget.canRequestFocus,
|
||||
);
|
||||
_ownsNode = true;
|
||||
}
|
||||
}
|
||||
|
||||
void _initAnimations() {
|
||||
_animationController = AnimationController(vsync: this, duration: const Duration(milliseconds: 150));
|
||||
|
||||
_scaleAnimation = Tween<double>(
|
||||
begin: 1.0,
|
||||
end: FocusTheme.focusScale,
|
||||
).animate(CurvedAnimation(parent: _animationController, curve: Curves.easeOutCubic));
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(FocusableWrapper oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
|
||||
// Handle focusNode changes
|
||||
if (widget.focusNode != oldWidget.focusNode) {
|
||||
if (_ownsNode) {
|
||||
_focusNode.dispose();
|
||||
}
|
||||
_initFocusNode();
|
||||
}
|
||||
|
||||
// Update canRequestFocus
|
||||
if (widget.canRequestFocus != oldWidget.canRequestFocus) {
|
||||
_focusNode.canRequestFocus = widget.canRequestFocus;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_longPressTimer?.cancel();
|
||||
_animationController.dispose();
|
||||
if (_ownsNode) {
|
||||
_focusNode.dispose();
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void _handleFocusChange(bool hasFocus) {
|
||||
if (_isFocused != hasFocus) {
|
||||
setState(() {
|
||||
_isFocused = hasFocus;
|
||||
});
|
||||
|
||||
// Animate scale
|
||||
if (hasFocus) {
|
||||
_animationController.forward();
|
||||
} else {
|
||||
_animationController.reverse();
|
||||
}
|
||||
|
||||
// Auto-scroll into view
|
||||
if (hasFocus && widget.autoScroll) {
|
||||
_scrollIntoView();
|
||||
}
|
||||
|
||||
// Notify listener
|
||||
widget.onFocusChange?.call(hasFocus);
|
||||
}
|
||||
}
|
||||
|
||||
void _scrollIntoView() {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (!mounted || !_isFocused) return;
|
||||
|
||||
final renderObject = context.findRenderObject();
|
||||
if (renderObject == null) return;
|
||||
|
||||
if (widget.useComfortableZone) {
|
||||
// Check if item is already in the comfortable zone
|
||||
final scrollable = Scrollable.maybeOf(context);
|
||||
if (scrollable == null) return;
|
||||
|
||||
final viewport = scrollable.context.findRenderObject() as RenderBox?;
|
||||
if (viewport == null) return;
|
||||
|
||||
// Get item's position relative to viewport
|
||||
final itemBox = renderObject as RenderBox;
|
||||
final itemPosition = itemBox.localToGlobal(Offset.zero, ancestor: viewport);
|
||||
|
||||
// Check if item is already in the comfortable zone
|
||||
final viewportHeight = viewport.size.height;
|
||||
final itemHeight = itemBox.size.height;
|
||||
final itemVerticalCenter = itemPosition.dy + itemHeight / 2;
|
||||
|
||||
// Define comfortable zone - if item center is within middle 60% of viewport, don't scroll
|
||||
final comfortZoneTop = viewportHeight * 0.2;
|
||||
final comfortZoneBottom = viewportHeight * 0.8;
|
||||
|
||||
if (itemVerticalCenter >= comfortZoneTop && itemVerticalCenter <= comfortZoneBottom) {
|
||||
// Item is in comfortable zone, no need to scroll
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Item is outside comfortable zone or comfortable zone disabled, scroll to alignment
|
||||
Scrollable.ensureVisible(
|
||||
context,
|
||||
alignment: widget.scrollAlignment,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
curve: Curves.easeInOut,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
KeyEventResult _handleKeyEvent(FocusNode node, KeyEvent event) {
|
||||
final key = event.logicalKey;
|
||||
|
||||
// Call custom key handler first
|
||||
if (widget.onKeyEvent != null) {
|
||||
final result = widget.onKeyEvent!(node, event);
|
||||
if (result == KeyEventResult.handled) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
// Handle SELECT key with optional long-press detection
|
||||
if (key.isSelectKey) {
|
||||
if (widget.enableLongPress) {
|
||||
if (event is KeyDownEvent) {
|
||||
// Only start timer on initial press, not repeats
|
||||
if (!_isSelectKeyDown) {
|
||||
_isSelectKeyDown = true;
|
||||
_longPressTimer?.cancel();
|
||||
_longPressTimer = Timer(widget.longPressDuration, () {
|
||||
// Long press detected
|
||||
if (mounted) {
|
||||
widget.onLongPress?.call();
|
||||
}
|
||||
});
|
||||
}
|
||||
return KeyEventResult.handled;
|
||||
} else if (event is KeyRepeatEvent) {
|
||||
// Consume repeat events to prevent system sounds
|
||||
return KeyEventResult.handled;
|
||||
} else if (event is KeyUpEvent) {
|
||||
final timerWasActive = _longPressTimer?.isActive ?? false;
|
||||
_longPressTimer?.cancel();
|
||||
if (timerWasActive && _isSelectKeyDown) {
|
||||
// Timer still active - short press
|
||||
widget.onSelect?.call();
|
||||
}
|
||||
// If timer already fired, long press was triggered - do nothing on key up
|
||||
_isSelectKeyDown = false;
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
} else {
|
||||
// Simple select handling without long-press
|
||||
if (event is KeyDownEvent) {
|
||||
widget.onSelect?.call();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ignore key up events for other keys
|
||||
if (!event.isActionable) {
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
|
||||
// Context menu key
|
||||
if (key.isContextMenuKey) {
|
||||
widget.onLongPress?.call();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
// UP arrow - if callback provided, navigate up
|
||||
if (key == LogicalKeyboardKey.arrowUp && widget.onNavigateUp != null) {
|
||||
widget.onNavigateUp!();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
// BACK key
|
||||
if (key.isBackKey && widget.onBack != null) {
|
||||
widget.onBack!();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final duration = FocusTheme.getAnimationDuration(context);
|
||||
// Only show focus effects during keyboard/d-pad navigation
|
||||
final showFocus = _isFocused && InputModeTracker.isKeyboardMode(context);
|
||||
|
||||
// Update animation duration if theme changes
|
||||
if (_animationController.duration != duration) {
|
||||
_animationController.duration = duration;
|
||||
}
|
||||
|
||||
// Choose decoration based on useBackgroundFocus
|
||||
final decoration = widget.useBackgroundFocus
|
||||
? FocusTheme.focusBackgroundDecoration(isFocused: showFocus, borderRadius: widget.borderRadius)
|
||||
: FocusTheme.focusDecoration(context, isFocused: showFocus, borderRadius: widget.borderRadius);
|
||||
|
||||
Widget result = Focus(
|
||||
focusNode: _focusNode,
|
||||
autofocus: widget.autofocus,
|
||||
onFocusChange: _handleFocusChange,
|
||||
onKeyEvent: _handleKeyEvent,
|
||||
child: AnimatedBuilder(
|
||||
animation: _scaleAnimation,
|
||||
builder: (context, child) {
|
||||
final shouldScale = showFocus && !widget.disableScale;
|
||||
return Transform.scale(
|
||||
scale: shouldScale ? _scaleAnimation.value : 1.0,
|
||||
child: AnimatedContainer(
|
||||
duration: duration,
|
||||
curve: Curves.easeOutCubic,
|
||||
decoration: decoration,
|
||||
child: widget.child,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
// Add semantics if label provided
|
||||
if (widget.semanticLabel != null) {
|
||||
result = Semantics(label: widget.semanticLabel, button: widget.onSelect != null, child: result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../utils/platform_detector.dart';
|
||||
import '../services/gamepad_service.dart';
|
||||
|
||||
/// Tracks whether the user is navigating via keyboard/d-pad or pointer (mouse/touch).
|
||||
///
|
||||
/// Focus effects should only be shown during keyboard navigation.
|
||||
enum InputMode { keyboard, pointer }
|
||||
|
||||
/// Provides input mode tracking to descendant widgets.
|
||||
///
|
||||
/// Wrap your app with this widget to enable input mode detection:
|
||||
/// ```dart
|
||||
/// InputModeTracker(
|
||||
/// child: MaterialApp(...),
|
||||
/// )
|
||||
/// ```
|
||||
///
|
||||
/// Then check the mode in focusable widgets:
|
||||
/// ```dart
|
||||
/// final showFocus = _isFocused && InputModeTracker.isKeyboardMode(context);
|
||||
/// ```
|
||||
class InputModeTracker extends StatefulWidget {
|
||||
final Widget child;
|
||||
|
||||
const InputModeTracker({super.key, required this.child});
|
||||
|
||||
/// Get the current input mode.
|
||||
static InputMode of(BuildContext context) {
|
||||
final provider = context.dependOnInheritedWidgetOfExactType<_InputModeProvider>();
|
||||
return provider?.mode ?? InputMode.pointer;
|
||||
}
|
||||
|
||||
/// Convenience method to check if we're in keyboard mode.
|
||||
static bool isKeyboardMode(BuildContext context) {
|
||||
return of(context) == InputMode.keyboard;
|
||||
}
|
||||
|
||||
@override
|
||||
State<InputModeTracker> createState() => _InputModeTrackerState();
|
||||
}
|
||||
|
||||
class _InputModeTrackerState extends State<InputModeTracker> {
|
||||
// Default to keyboard mode on Android TV, pointer mode elsewhere
|
||||
InputMode _mode = TvDetectionService.isTVSync() ? InputMode.keyboard : InputMode.pointer;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// Initialize focus highlight strategy based on starting mode
|
||||
_updateFocusHighlightStrategy(_mode);
|
||||
// Listen to hardware keyboard events globally
|
||||
HardwareKeyboard.instance.addHandler(_handleKeyEvent);
|
||||
|
||||
// Register callback for gamepad input to switch to keyboard mode
|
||||
GamepadService.onGamepadInput = () => _setMode(InputMode.keyboard);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
HardwareKeyboard.instance.removeHandler(_handleKeyEvent);
|
||||
GamepadService.onGamepadInput = null;
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
bool _handleKeyEvent(KeyEvent event) {
|
||||
// Only switch to keyboard mode on key down (not repeats or releases)
|
||||
if (event is KeyDownEvent) {
|
||||
_setMode(InputMode.keyboard);
|
||||
}
|
||||
// Return false to let the event continue propagating
|
||||
return false;
|
||||
}
|
||||
|
||||
void _setMode(InputMode mode) {
|
||||
if (_mode != mode) {
|
||||
setState(() => _mode = mode);
|
||||
}
|
||||
_updateFocusHighlightStrategy(mode);
|
||||
}
|
||||
|
||||
// Keep Material focus highlights in sync with our input mode so keyboard/gamepad
|
||||
// navigation immediately shows focus without waiting for a real keypress.
|
||||
void _updateFocusHighlightStrategy(InputMode mode) {
|
||||
final desiredStrategy = mode == InputMode.keyboard
|
||||
? FocusHighlightStrategy.alwaysTraditional
|
||||
: FocusHighlightStrategy.automatic;
|
||||
|
||||
if (FocusManager.instance.highlightStrategy != desiredStrategy) {
|
||||
FocusManager.instance.highlightStrategy = desiredStrategy;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// On Android TV, don't switch to pointer mode from pointer events
|
||||
// as D-pad can generate synthetic pointer events that would incorrectly
|
||||
// trigger pointer mode and show a cursor instead of D-pad focus navigation
|
||||
if (TvDetectionService.isTVSync()) {
|
||||
return _InputModeProvider(mode: _mode, child: widget.child);
|
||||
}
|
||||
|
||||
return Listener(
|
||||
// Switch to pointer mode on mouse activity
|
||||
onPointerDown: (_) => _setMode(InputMode.pointer),
|
||||
onPointerHover: (_) => _setMode(InputMode.pointer),
|
||||
behavior: HitTestBehavior.translucent,
|
||||
child: _InputModeProvider(mode: _mode, child: widget.child),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// InheritedWidget that provides the current input mode.
|
||||
class _InputModeProvider extends InheritedWidget {
|
||||
final InputMode mode;
|
||||
|
||||
const _InputModeProvider({required this.mode, required super.child});
|
||||
|
||||
@override
|
||||
bool updateShouldNotify(_InputModeProvider oldWidget) {
|
||||
return mode != oldWidget.mode;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'dpad_navigator.dart';
|
||||
|
||||
/// Handles back key events by popping the current route.
|
||||
///
|
||||
/// Optionally pass a [result] to return to the previous route.
|
||||
///
|
||||
/// Use this as an `onKeyEvent` callback for Focus widgets that need
|
||||
/// simple back navigation behavior:
|
||||
///
|
||||
/// ```dart
|
||||
/// Focus(
|
||||
/// onKeyEvent: (node, event) => handleBackKeyNavigation(context, event),
|
||||
/// child: ...
|
||||
/// )
|
||||
/// ```
|
||||
///
|
||||
/// With a result value:
|
||||
/// ```dart
|
||||
/// Focus(
|
||||
/// onKeyEvent: (node, event) => handleBackKeyNavigation(
|
||||
/// context,
|
||||
/// event,
|
||||
/// result: _hasChanges,
|
||||
/// ),
|
||||
/// child: ...
|
||||
/// )
|
||||
/// ```
|
||||
KeyEventResult handleBackKeyNavigation<T>(BuildContext context, KeyEvent event, {T? result}) {
|
||||
if (event is KeyDownEvent && event.logicalKey.isBackKey) {
|
||||
Navigator.pop(context, result);
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
return KeyEventResult.ignored;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/// Manages focus memory for hub navigation.
|
||||
///
|
||||
/// Tracks two things:
|
||||
/// 1. Per-hub memory: Each hub remembers which item was last focused
|
||||
/// 2. Global column hint: When entering a hub that hasn't been visited,
|
||||
/// we use the column position from the last focused hub as a hint
|
||||
class HubFocusMemory {
|
||||
static final Map<String, int> _perHubMemory = {};
|
||||
static int _lastColumnHint = 0;
|
||||
|
||||
/// Remember the focused index for a specific hub
|
||||
static void setForHub(String hubKey, int index) {
|
||||
_perHubMemory[hubKey] = index;
|
||||
_lastColumnHint = index;
|
||||
}
|
||||
|
||||
/// Get the remembered index for a hub, or fall back to column hint
|
||||
static int getForHub(String hubKey, int itemCount) {
|
||||
if (itemCount <= 0) return 0;
|
||||
|
||||
// If this hub has memory, use it
|
||||
if (_perHubMemory.containsKey(hubKey)) {
|
||||
return _perHubMemory[hubKey]!.clamp(0, itemCount - 1);
|
||||
}
|
||||
|
||||
// Otherwise use the last column hint (clamped to this hub's item count)
|
||||
return _lastColumnHint.clamp(0, itemCount - 1);
|
||||
}
|
||||
|
||||
/// Clear all memory (e.g., when leaving a screen)
|
||||
static void clear() {
|
||||
_perHubMemory.clear();
|
||||
_lastColumnHint = 0;
|
||||
}
|
||||
}
|
||||
@@ -26,18 +26,11 @@
|
||||
"submit": "Submit",
|
||||
"confirm": "Confirm",
|
||||
"retry": "Retry",
|
||||
"playNow": "Play Now",
|
||||
"logout": "Logout",
|
||||
"online": "Online",
|
||||
"offline": "Offline",
|
||||
"owned": "Owned",
|
||||
"shared": "Shared",
|
||||
"current": "CURRENT",
|
||||
"unknown": "Unknown",
|
||||
"refresh": "Refresh",
|
||||
"yes": "Yes",
|
||||
"no": "No",
|
||||
"server": "Server",
|
||||
"delete": "Delete",
|
||||
"shuffle": "Shuffle",
|
||||
"addTo": "Add to..."
|
||||
@@ -46,6 +39,7 @@
|
||||
"licenses": "Licenses",
|
||||
"switchProfile": "Switch Profile",
|
||||
"subtitleStyling": "Subtitle Styling",
|
||||
"mpvConfig": "MPV Configuration",
|
||||
"search": "Search",
|
||||
"logs": "Logs"
|
||||
},
|
||||
@@ -64,7 +58,6 @@
|
||||
"theme": "Theme",
|
||||
"appearance": "Appearance",
|
||||
"videoPlayback": "Video Playback",
|
||||
"shufflePlay": "Shuffle Play",
|
||||
"advanced": "Advanced",
|
||||
"useSeasonPostersDescription": "Show season poster instead of series poster for episodes",
|
||||
"showHeroSectionDescription": "Display featured content carousel on home screen",
|
||||
@@ -104,15 +97,11 @@
|
||||
"minutesUnit": "${minutes} minutes",
|
||||
"rememberTrackSelections": "Remember track selections per show/movie",
|
||||
"rememberTrackSelectionsDescription": "Automatically save audio and subtitle language preferences when you change tracks during playback",
|
||||
"unwatchedOnly": "Unwatched Only",
|
||||
"unwatchedOnlyDescription": "Only include unwatched episodes in shuffle queue",
|
||||
"shuffleOrderNavigation": "Shuffle Order Navigation",
|
||||
"shuffleOrderNavigationDescription": "Next/previous buttons follow shuffled order",
|
||||
"loopShuffleQueue": "Loop Shuffle Queue",
|
||||
"loopShuffleQueueDescription": "Restart queue when reaching the end",
|
||||
"videoPlayerControls": "Video Player Controls",
|
||||
"keyboardShortcuts": "Keyboard Shortcuts",
|
||||
"keyboardShortcutsDescription": "Customize keyboard shortcuts",
|
||||
"videoPlayerNavigation": "Video Player Navigation",
|
||||
"videoPlayerNavigationDescription": "Use arrow keys to navigate video player controls",
|
||||
"debugLogging": "Debug Logging",
|
||||
"debugLoggingDescription": "Enable detailed logging for troubleshooting",
|
||||
"viewLogs": "View Logs",
|
||||
@@ -132,7 +121,34 @@
|
||||
"validationErrorEnterNumber": "Please enter a valid number",
|
||||
"validationErrorDuration": "Duration must be between ${min} and ${max} ${unit}",
|
||||
"shortcutAlreadyAssigned": "Shortcut already assigned to ${action}",
|
||||
"shortcutUpdated": "Shortcut updated for ${action}"
|
||||
"shortcutUpdated": "Shortcut updated for ${action}",
|
||||
"autoSkip": "Auto Skip",
|
||||
"autoSkipIntro": "Auto Skip Intro",
|
||||
"autoSkipIntroDescription": "Automatically skip intro markers after a few seconds",
|
||||
"autoSkipCredits": "Auto Skip Credits",
|
||||
"autoSkipCreditsDescription": "Automatically skip credits and play next episode",
|
||||
"autoSkipDelay": "Auto Skip Delay",
|
||||
"autoSkipDelayDescription": "Wait ${seconds} seconds before auto-skipping",
|
||||
"downloads": "Downloads",
|
||||
"downloadLocationDescription": "Choose where to store downloaded content",
|
||||
"downloadLocationDefault": "Default (App Storage)",
|
||||
"downloadLocationCustom": "Custom Location",
|
||||
"selectFolder": "Select Folder",
|
||||
"resetToDefault": "Reset to Default",
|
||||
"currentPath": "Current: ${path}",
|
||||
"downloadLocationChanged": "Download location changed",
|
||||
"downloadLocationReset": "Download location reset to default",
|
||||
"downloadLocationInvalid": "Selected folder is not writable",
|
||||
"downloadLocationSelectError": "Failed to select folder",
|
||||
"downloadOnWifiOnly": "Download on WiFi only",
|
||||
"downloadOnWifiOnlyDescription": "Prevent downloads when on cellular data",
|
||||
"cellularDownloadBlocked": "Downloads are disabled on cellular data. Connect to WiFi or change the setting.",
|
||||
"maxVolume": "Maximum Volume",
|
||||
"maxVolumeDescription": "Allow volume boost above 100% for quiet media",
|
||||
"maxVolumePercent": "${percent}%",
|
||||
"maxVolumeHint": "Enter max volume (100-300)",
|
||||
"discordRichPresence": "Discord Rich Presence",
|
||||
"discordRichPresenceDescription": "Show what you're watching on Discord"
|
||||
},
|
||||
"search": {
|
||||
"hint": "Search movies, shows, music...",
|
||||
@@ -224,7 +240,6 @@
|
||||
"nextButton": "Next episode",
|
||||
"previousChapterButton": "Previous chapter",
|
||||
"nextChapterButton": "Next chapter",
|
||||
"volumeButton": "Volume",
|
||||
"muteButton": "Mute",
|
||||
"unmuteButton": "Unmute",
|
||||
"settingsButton": "Video settings",
|
||||
@@ -235,6 +250,7 @@
|
||||
"aspectRatioButton": "Aspect ratio",
|
||||
"fullscreenButton": "Enter fullscreen",
|
||||
"exitFullscreenButton": "Exit fullscreen",
|
||||
"alwaysOnTopButton": "Always on top",
|
||||
"rotationLockButton": "Rotation lock",
|
||||
"timelineSlider": "Video timeline",
|
||||
"volumeSlider": "Volume level",
|
||||
@@ -249,6 +265,8 @@
|
||||
"messages": {
|
||||
"markedAsWatched": "Marked as watched",
|
||||
"markedAsUnwatched": "Marked as unwatched",
|
||||
"markedAsWatchedOffline": "Marked as watched (will sync when online)",
|
||||
"markedAsUnwatchedOffline": "Marked as unwatched (will sync when online)",
|
||||
"removedFromContinueWatching": "Removed from Continue Watching",
|
||||
"errorLoading": "Error: ${error}",
|
||||
"fileInfoNotAvailable": "File information not available",
|
||||
@@ -265,22 +283,17 @@
|
||||
"metadataRefreshing": "Refreshing metadata for \"${title}\"...",
|
||||
"metadataRefreshStarted": "Metadata refresh started for \"${title}\"",
|
||||
"metadataRefreshFailed": "Failed to refresh metadata: ${error}",
|
||||
"noPlexToken": "No Plex token found. Please login again.",
|
||||
"logoutConfirm": "Are you sure you want to logout?",
|
||||
"noSeasonsFound": "No seasons found",
|
||||
"noEpisodesFound": "No episodes found in first season",
|
||||
"noEpisodesFoundGeneral": "No episodes found",
|
||||
"noResultsFound": "No results found",
|
||||
"sleepTimerSet": "Sleep timer set for ${label}",
|
||||
"failedToSwitchProfile": "Failed to switch to ${displayName}",
|
||||
"noItemsAvailable": "No items available",
|
||||
"failedToCreatePlayQueue": "Failed to create play queue",
|
||||
"failedToCreatePlayQueueNoItems": "Failed to create play queue - no items",
|
||||
"failedPlayback": "Failed to ${action}: ${error}"
|
||||
},
|
||||
"profile": {
|
||||
"noUsersAvailable": "No users available"
|
||||
},
|
||||
"subtitlingStyling": {
|
||||
"stylingOptions": "Styling Options",
|
||||
"fontSize": "Font Size",
|
||||
@@ -290,9 +303,34 @@
|
||||
"backgroundOpacity": "Background Opacity",
|
||||
"backgroundColor": "Background Color"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "MPV Configuration",
|
||||
"description": "Advanced video player settings",
|
||||
"properties": "Properties",
|
||||
"presets": "Presets",
|
||||
"noProperties": "No properties configured",
|
||||
"noPresets": "No saved presets",
|
||||
"addProperty": "Add Property",
|
||||
"editProperty": "Edit Property",
|
||||
"deleteProperty": "Delete Property",
|
||||
"propertyKey": "Property Key",
|
||||
"propertyKeyHint": "e.g., hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "Property Value",
|
||||
"propertyValueHint": "e.g., auto, 256000000",
|
||||
"saveAsPreset": "Save as Preset...",
|
||||
"presetName": "Preset Name",
|
||||
"presetNameHint": "Enter a name for this preset",
|
||||
"loadPreset": "Load",
|
||||
"deletePreset": "Delete",
|
||||
"presetSaved": "Preset saved",
|
||||
"presetLoaded": "Preset loaded",
|
||||
"presetDeleted": "Preset deleted",
|
||||
"confirmDeletePreset": "Are you sure you want to delete this preset?",
|
||||
"confirmDeleteProperty": "Are you sure you want to delete this property?",
|
||||
"entriesCount": "${count} entries"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "Confirm Action",
|
||||
"areYouSure": "Are you sure you want to perform this action?",
|
||||
"cancel": "Cancel",
|
||||
"playNow": "Play Now"
|
||||
},
|
||||
@@ -303,11 +341,8 @@
|
||||
"noContentAvailable": "No content available",
|
||||
"addMediaToLibraries": "Add some media to your libraries",
|
||||
"continueWatching": "Continue Watching",
|
||||
"recentlyAdded": "Recently Added",
|
||||
"play": "Play",
|
||||
"resume": "Resume",
|
||||
"playEpisode": "Play S${season}, E${episode}",
|
||||
"resumeEpisode": "Resume S${season}, E${episode}",
|
||||
"playEpisode": "S${season}E${episode}",
|
||||
"pause": "Pause",
|
||||
"overview": "Overview",
|
||||
"cast": "Cast",
|
||||
@@ -332,8 +367,7 @@
|
||||
"pleaseEnterToken": "Please enter a token",
|
||||
"invalidToken": "Invalid token",
|
||||
"failedToVerifyToken": "Failed to verify token: ${error}",
|
||||
"failedToSwitchProfile": "Failed to switch to ${displayName}",
|
||||
"connectionFailedGeneric": "Connection failed"
|
||||
"failedToSwitchProfile": "Failed to switch to ${displayName}"
|
||||
},
|
||||
"libraries": {
|
||||
"title": "Libraries",
|
||||
@@ -361,7 +395,6 @@
|
||||
"sort": "Sort",
|
||||
"sortBy": "Sort By",
|
||||
"filters": "Filters",
|
||||
"loadingLibraryWithCount": "Loading library... (${count} items loaded)",
|
||||
"confirmActionMessage": "Are you sure you want to perform this action?",
|
||||
"showLibrary": "Show library",
|
||||
"hideLibrary": "Hide library",
|
||||
@@ -396,22 +429,9 @@
|
||||
"viewLicensesDescription": "View licenses of third-party libraries"
|
||||
},
|
||||
"serverSelection": {
|
||||
"connectingToServer": "Connecting to server...",
|
||||
"connectingToAllServers": "Connecting to all servers...",
|
||||
"connectToAllServers": "Connect to All Servers",
|
||||
"allServerConnectionsFailed": "Failed to connect to any servers. Please check your network and try again.",
|
||||
"foundServers": "Found ${count} server(s)",
|
||||
"orSelectIndividually": "Or select a server individually:",
|
||||
"serverDebugCopied": "Server debug data copied to clipboard",
|
||||
"copyDebugData": "Copy Debug Data",
|
||||
"noServersFound": "No servers found",
|
||||
"malformedServerData": "Found ${count} server(s) with malformed data. No valid servers available.",
|
||||
"incompleteServerInfo": "Some servers have incomplete information and were skipped. Please check your Plex.tv account.",
|
||||
"incompleteConnectionInfo": "Server connection information is incomplete. Please try again.",
|
||||
"malformedServerInfo": "Server information is malformed: ${message}",
|
||||
"networkConnectionFailed": "Network connection failed. Please check your internet connection and try again.",
|
||||
"authenticationFailed": "Authentication failed. Please sign in again.",
|
||||
"plexServiceUnavailable": "Plex service unavailable. Please try again later.",
|
||||
"noServersFoundForAccount": "No servers found for ${username} (${email})",
|
||||
"failedToLoadServers": "Failed to load servers: ${error}"
|
||||
},
|
||||
"hubDetail": {
|
||||
@@ -422,11 +442,8 @@
|
||||
"noItemsFound": "No items found"
|
||||
},
|
||||
"logs": {
|
||||
"title": "Logs",
|
||||
"clearLogs": "Clear Logs",
|
||||
"copyLogs": "Copy Logs",
|
||||
"exportLogs": "Export Logs",
|
||||
"noLogsToShow": "No logs to show",
|
||||
"error": "Error:",
|
||||
"stackTrace": "Stack Trace:"
|
||||
},
|
||||
@@ -440,13 +457,13 @@
|
||||
"home": "Home",
|
||||
"search": "Search",
|
||||
"libraries": "Libraries",
|
||||
"settings": "Settings"
|
||||
"settings": "Settings",
|
||||
"downloads": "Downloads"
|
||||
},
|
||||
"collections": {
|
||||
"title": "Collections",
|
||||
"collection": "Collection",
|
||||
"empty": "Collection is empty",
|
||||
"noItems": "No items in this collection",
|
||||
"unknownLibrarySection": "Cannot delete: Unknown library section",
|
||||
"deleteCollection": "Delete Collection",
|
||||
"deleteConfirm": "Are you sure you want to delete \"${title}\"? This action cannot be undone.",
|
||||
@@ -454,7 +471,6 @@
|
||||
"deleteFailed": "Failed to delete collection",
|
||||
"deleteFailedWithError": "Failed to delete collection: ${error}",
|
||||
"failedToLoadItems": "Failed to load collection items: ${error}",
|
||||
"addTo": "Add to collection",
|
||||
"selectCollection": "Select Collection",
|
||||
"createNewCollection": "Create New Collection",
|
||||
"collectionName": "Collection Name",
|
||||
@@ -473,26 +489,17 @@
|
||||
"playlist": "Playlist",
|
||||
"noPlaylists": "No playlists found",
|
||||
"create": "Create Playlist",
|
||||
"newPlaylist": "New Playlist",
|
||||
"playlistName": "Playlist Name",
|
||||
"enterPlaylistName": "Enter playlist name",
|
||||
"edit": "Edit Playlist",
|
||||
"delete": "Delete Playlist",
|
||||
"addTo": "Add to Playlist",
|
||||
"addItems": "Add Items",
|
||||
"removeItem": "Remove from Playlist",
|
||||
"clearPlaylist": "Clear Playlist",
|
||||
"playAll": "Play All",
|
||||
"shuffle": "Shuffle",
|
||||
"smartPlaylist": "Smart Playlist",
|
||||
"regularPlaylist": "Regular Playlist",
|
||||
"itemCount": "${count} items",
|
||||
"oneItem": "1 item",
|
||||
"emptyPlaylist": "This playlist is empty",
|
||||
"deleteConfirm": "Delete Playlist?",
|
||||
"deleteMessage": "Are you sure you want to delete \"${name}\"?",
|
||||
"created": "Playlist created",
|
||||
"updated": "Playlist updated",
|
||||
"deleted": "Playlist deleted",
|
||||
"itemAdded": "Added to playlist",
|
||||
"itemRemoved": "Removed from playlist",
|
||||
@@ -504,5 +511,65 @@
|
||||
"errorAdding": "Failed to add to playlist",
|
||||
"errorReordering": "Failed to reorder playlist item",
|
||||
"errorRemoving": "Failed to remove from playlist"
|
||||
},
|
||||
"watchTogether": {
|
||||
"title": "Watch Together",
|
||||
"description": "Watch content in sync with friends and family",
|
||||
"createSession": "Create Session",
|
||||
"creating": "Creating...",
|
||||
"joinSession": "Join Session",
|
||||
"joining": "Joining...",
|
||||
"controlMode": "Control Mode",
|
||||
"controlModeQuestion": "Who can control playback?",
|
||||
"hostOnly": "Host Only",
|
||||
"anyone": "Anyone",
|
||||
"hostingSession": "Hosting Session",
|
||||
"inSession": "In Session",
|
||||
"sessionCode": "Session Code",
|
||||
"hostControlsPlayback": "Host controls playback",
|
||||
"anyoneCanControl": "Anyone can control playback",
|
||||
"hostControls": "Host controls",
|
||||
"anyoneControls": "Anyone controls",
|
||||
"participants": "Participants",
|
||||
"host": "Host",
|
||||
"hostBadge": "HOST",
|
||||
"youAreHost": "You are the host",
|
||||
"watchingWithOthers": "Watching with others",
|
||||
"endSession": "End Session",
|
||||
"leaveSession": "Leave Session",
|
||||
"endSessionQuestion": "End Session?",
|
||||
"leaveSessionQuestion": "Leave Session?",
|
||||
"endSessionConfirm": "This will end the session for all participants.",
|
||||
"leaveSessionConfirm": "You will be removed from the session.",
|
||||
"endSessionConfirmOverlay": "This will end the watch session for all participants.",
|
||||
"leaveSessionConfirmOverlay": "You will be disconnected from the watch session.",
|
||||
"end": "End",
|
||||
"leave": "Leave",
|
||||
"syncing": "Syncing...",
|
||||
"participant": "participant",
|
||||
"joinWatchSession": "Join Watch Session",
|
||||
"enterCodeHint": "Enter 8-character code",
|
||||
"pasteFromClipboard": "Paste from clipboard",
|
||||
"pleaseEnterCode": "Please enter a session code",
|
||||
"codeMustBe8Chars": "Session code must be 8 characters",
|
||||
"joinInstructions": "Enter the session code shared by the host to join their watch session.",
|
||||
"failedToCreate": "Failed to create session",
|
||||
"failedToJoin": "Failed to join session"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "Downloads",
|
||||
"manage": "Manage",
|
||||
"tvShows": "TV Shows",
|
||||
"movies": "Movies",
|
||||
"noDownloads": "No downloads yet",
|
||||
"noDownloadsDescription": "Downloaded content will appear here for offline viewing",
|
||||
"downloadNow": "Download",
|
||||
"deleteDownload": "Delete download",
|
||||
"retryDownload": "Retry download",
|
||||
"downloadQueued": "Download queued",
|
||||
"episodesQueued": "${count} episodes queued for download",
|
||||
"downloadDeleted": "Download deleted",
|
||||
"deleteConfirm": "Are you sure you want to delete \"${title}\"? This will remove the downloaded file from your device.",
|
||||
"deletingWithProgress": "Deleting ${title}... (${current} of ${total})"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,18 +26,11 @@
|
||||
"submit": "Senden",
|
||||
"confirm": "Bestätigen",
|
||||
"retry": "Erneut versuchen",
|
||||
"playNow": "Jetzt abspielen",
|
||||
"logout": "Abmelden",
|
||||
"online": "Online",
|
||||
"offline": "Offline",
|
||||
"owned": "Besitzer",
|
||||
"shared": "Geteilt",
|
||||
"current": "AKTUELL",
|
||||
"unknown": "Unbekannt",
|
||||
"refresh": "Aktualisieren",
|
||||
"yes": "Ja",
|
||||
"no": "Nein",
|
||||
"server": "Server",
|
||||
"delete": "Löschen",
|
||||
"shuffle": "Zufall",
|
||||
"addTo": "Hinzufügen zu..."
|
||||
@@ -47,6 +40,7 @@
|
||||
"selectServer": "Server auswählen",
|
||||
"switchProfile": "Profil wechseln",
|
||||
"subtitleStyling": "Untertitel-Stil",
|
||||
"mpvConfig": "MPV-Konfiguration",
|
||||
"search": "Suche",
|
||||
"logs": "Protokolle"
|
||||
},
|
||||
@@ -65,7 +59,6 @@
|
||||
"theme": "Design",
|
||||
"appearance": "Darstellung",
|
||||
"videoPlayback": "Videowiedergabe",
|
||||
"shufflePlay": "Zufallswiedergabe",
|
||||
"advanced": "Erweitert",
|
||||
"useSeasonPostersDescription": "Staffelposter statt Serienposter für Episoden anzeigen",
|
||||
"showHeroSectionDescription": "Bereich mit empfohlenen Inhalten auf der Startseite anzeigen",
|
||||
@@ -105,15 +98,11 @@
|
||||
"minutesUnit": "${minutes} Minuten",
|
||||
"rememberTrackSelections": "Spurauswahl pro Serie/Film merken",
|
||||
"rememberTrackSelectionsDescription": "Audio- und Untertitelsprache automatisch speichern, wenn während der Wiedergabe geändert",
|
||||
"unwatchedOnly": "Nur ungesehene",
|
||||
"unwatchedOnlyDescription": "Nur ungesehene Episoden in die Shuffle-Warteschlange aufnehmen",
|
||||
"shuffleOrderNavigation": "Navigation der Shuffle-Reihenfolge",
|
||||
"shuffleOrderNavigationDescription": "Weiter/Zurück folgt der zufälligen Reihenfolge",
|
||||
"loopShuffleQueue": "Shuffle-Warteschlange wiederholen",
|
||||
"loopShuffleQueueDescription": "Warteschlange neu starten, wenn das Ende erreicht ist",
|
||||
"videoPlayerControls": "Videoplayer-Steuerung",
|
||||
"keyboardShortcuts": "Tastenkürzel",
|
||||
"keyboardShortcutsDescription": "Tastenkürzel anpassen",
|
||||
"videoPlayerNavigation": "Videoplayer-Navigation",
|
||||
"videoPlayerNavigationDescription": "Pfeiltasten zur Navigation der Videoplayer-Steuerung verwenden",
|
||||
"debugLogging": "Debug-Protokollierung",
|
||||
"debugLoggingDescription": "Detaillierte Protokolle zur Fehleranalyse aktivieren",
|
||||
"viewLogs": "Protokolle anzeigen",
|
||||
@@ -133,7 +122,34 @@
|
||||
"validationErrorEnterNumber": "Bitte eine gültige Zahl eingeben",
|
||||
"validationErrorDuration": "Dauer muss zwischen ${min} und ${max} ${unit} liegen",
|
||||
"shortcutAlreadyAssigned": "Tastenkürzel bereits zugewiesen an ${action}",
|
||||
"shortcutUpdated": "Tastenkürzel aktualisiert für ${action}"
|
||||
"shortcutUpdated": "Tastenkürzel aktualisiert für ${action}",
|
||||
"autoSkip": "Automatisches Überspringen",
|
||||
"autoSkipIntro": "Intro automatisch überspringen",
|
||||
"autoSkipIntroDescription": "Intro-Marker nach wenigen Sekunden automatisch überspringen",
|
||||
"autoSkipCredits": "Abspann automatisch überspringen",
|
||||
"autoSkipCreditsDescription": "Abspann automatisch überspringen und nächste Episode abspielen",
|
||||
"autoSkipDelay": "Verzögerung für automatisches Überspringen",
|
||||
"autoSkipDelayDescription": "${seconds} Sekunden vor dem automatischen Überspringen warten",
|
||||
"downloads": "Downloads",
|
||||
"downloadLocationDescription": "Speicherort für heruntergeladene Inhalte wählen",
|
||||
"downloadLocationDefault": "Standard (App-Speicher)",
|
||||
"downloadLocationCustom": "Benutzerdefinierter Speicherort",
|
||||
"selectFolder": "Ordner auswählen",
|
||||
"resetToDefault": "Auf Standard zurücksetzen",
|
||||
"currentPath": "Aktuell: ${path}",
|
||||
"downloadLocationChanged": "Download-Speicherort geändert",
|
||||
"downloadLocationReset": "Download-Speicherort auf Standard zurückgesetzt",
|
||||
"downloadLocationInvalid": "Ausgewählter Ordner ist nicht beschreibbar",
|
||||
"downloadLocationSelectError": "Ordnerauswahl fehlgeschlagen",
|
||||
"downloadOnWifiOnly": "Nur über WLAN herunterladen",
|
||||
"downloadOnWifiOnlyDescription": "Downloads über mobile Daten verhindern",
|
||||
"cellularDownloadBlocked": "Downloads sind über mobile Daten deaktiviert. Verbinde dich mit einem WLAN oder ändere die Einstellung.",
|
||||
"maxVolume": "Maximale Lautstärke",
|
||||
"maxVolumeDescription": "Lautstärke über 100% für leise Medien erlauben",
|
||||
"maxVolumePercent": "${percent}%",
|
||||
"maxVolumeHint": "Maximale Lautstärke eingeben (100-300)",
|
||||
"discordRichPresence": "Discord Rich Presence",
|
||||
"discordRichPresenceDescription": "Zeige auf Discord, was du gerade schaust"
|
||||
},
|
||||
"search": {
|
||||
"hint": "Filme, Serien, Musik suchen...",
|
||||
@@ -225,7 +241,6 @@
|
||||
"nextButton": "Nächste Episode",
|
||||
"previousChapterButton": "Vorheriges Kapitel",
|
||||
"nextChapterButton": "Nächstes Kapitel",
|
||||
"volumeButton": "Lautstärke",
|
||||
"muteButton": "Stumm schalten",
|
||||
"unmuteButton": "Stummschaltung aufheben",
|
||||
"settingsButton": "Videoeinstellungen",
|
||||
@@ -236,6 +251,7 @@
|
||||
"aspectRatioButton": "Seitenverhältnis",
|
||||
"fullscreenButton": "Vollbild aktivieren",
|
||||
"exitFullscreenButton": "Vollbild verlassen",
|
||||
"alwaysOnTopButton": "Immer im Vordergrund",
|
||||
"rotationLockButton": "Drehsperre",
|
||||
"timelineSlider": "Video-Zeitleiste",
|
||||
"volumeSlider": "Lautstärkepegel",
|
||||
@@ -250,7 +266,9 @@
|
||||
"messages": {
|
||||
"markedAsWatched": "Als gesehen markiert",
|
||||
"markedAsUnwatched": "Als ungesehen markiert",
|
||||
"removedFromContinueWatching": "Aus ‚Weiterschauen‘ entfernt",
|
||||
"markedAsWatchedOffline": "Als gesehen markiert (wird synchronisiert, wenn online)",
|
||||
"markedAsUnwatchedOffline": "Als ungesehen markiert (wird synchronisiert, wenn online)",
|
||||
"removedFromContinueWatching": "Aus ‚Weiterschauen' entfernt",
|
||||
"errorLoading": "Fehler: ${error}",
|
||||
"fileInfoNotAvailable": "Dateiinfo nicht verfügbar",
|
||||
"errorLoadingFileInfo": "Fehler beim Laden der Dateiinfo: ${error}",
|
||||
@@ -266,22 +284,17 @@
|
||||
"metadataRefreshing": "Metadaten werden aktualisiert für „${title}“...",
|
||||
"metadataRefreshStarted": "Metadaten-Aktualisierung gestartet für „${title}“",
|
||||
"metadataRefreshFailed": "Metadaten konnten nicht aktualisiert werden: ${error}",
|
||||
"noPlexToken": "Kein Plex-Token gefunden. Bitte erneut anmelden.",
|
||||
"logoutConfirm": "Abmeldung wirklich durchführen?",
|
||||
"noSeasonsFound": "Keine Staffeln gefunden",
|
||||
"noEpisodesFound": "Keine Episoden in der ersten Staffel gefunden",
|
||||
"noEpisodesFoundGeneral": "Keine Episoden gefunden",
|
||||
"noResultsFound": "Keine Ergebnisse gefunden",
|
||||
"sleepTimerSet": "Sleep-Timer gesetzt auf ${label}",
|
||||
"failedToSwitchProfile": "Profilwechsel zu ${displayName} fehlgeschlagen",
|
||||
"noItemsAvailable": "Keine Elemente verfügbar",
|
||||
"failedToCreatePlayQueue": "Wiedergabewarteschlange konnte nicht erstellt werden",
|
||||
"failedToCreatePlayQueueNoItems": "Wiedergabewarteschlange konnte nicht erstellt werden – keine Elemente",
|
||||
"failedPlayback": "Wiedergabe für ${action} fehlgeschlagen: ${error}"
|
||||
},
|
||||
"profile": {
|
||||
"noUsersAvailable": "Keine Benutzer verfügbar"
|
||||
},
|
||||
"subtitlingStyling": {
|
||||
"stylingOptions": "Stiloptionen",
|
||||
"fontSize": "Schriftgröße",
|
||||
@@ -291,9 +304,34 @@
|
||||
"backgroundOpacity": "Hintergrunddeckkraft",
|
||||
"backgroundColor": "Hintergrundfarbe"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "MPV-Konfiguration",
|
||||
"description": "Erweiterte Videoplayer-Einstellungen",
|
||||
"properties": "Eigenschaften",
|
||||
"presets": "Voreinstellungen",
|
||||
"noProperties": "Keine Eigenschaften konfiguriert",
|
||||
"noPresets": "Keine gespeicherten Voreinstellungen",
|
||||
"addProperty": "Eigenschaft hinzufügen",
|
||||
"editProperty": "Eigenschaft bearbeiten",
|
||||
"deleteProperty": "Eigenschaft löschen",
|
||||
"propertyKey": "Eigenschaftsschlüssel",
|
||||
"propertyKeyHint": "z.B. hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "Eigenschaftswert",
|
||||
"propertyValueHint": "z.B. auto, 256000000",
|
||||
"saveAsPreset": "Als Voreinstellung speichern...",
|
||||
"presetName": "Name der Voreinstellung",
|
||||
"presetNameHint": "Namen für diese Voreinstellung eingeben",
|
||||
"loadPreset": "Laden",
|
||||
"deletePreset": "Löschen",
|
||||
"presetSaved": "Voreinstellung gespeichert",
|
||||
"presetLoaded": "Voreinstellung geladen",
|
||||
"presetDeleted": "Voreinstellung gelöscht",
|
||||
"confirmDeletePreset": "Möchten Sie diese Voreinstellung wirklich löschen?",
|
||||
"confirmDeleteProperty": "Möchten Sie diese Eigenschaft wirklich löschen?",
|
||||
"entriesCount": "${count} Einträge"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "Aktion bestätigen",
|
||||
"areYouSure": "Aktion wirklich ausführen?",
|
||||
"cancel": "Abbrechen",
|
||||
"playNow": "Jetzt abspielen"
|
||||
},
|
||||
@@ -305,11 +343,8 @@
|
||||
"noContentAvailable": "Kein Inhalt verfügbar",
|
||||
"addMediaToLibraries": "Medien zur Mediathek hinzufügen",
|
||||
"continueWatching": "Weiterschauen",
|
||||
"recentlyAdded": "Kürzlich hinzugefügt",
|
||||
"play": "Abspielen",
|
||||
"resume": "Fortsetzen",
|
||||
"playEpisode": "S${season}, E${episode} - Abspielen",
|
||||
"resumeEpisode": "S${season}, E${episode} - Fortsetzen",
|
||||
"playEpisode": "S${season}E${episode}",
|
||||
"pause": "Pause",
|
||||
"overview": "Übersicht",
|
||||
"cast": "Besetzung",
|
||||
@@ -334,8 +369,7 @@
|
||||
"pleaseEnterToken": "Bitte Token eingeben",
|
||||
"invalidToken": "Ungültiges Token",
|
||||
"failedToVerifyToken": "Token-Verifizierung fehlgeschlagen: ${error}",
|
||||
"failedToSwitchProfile": "Profilwechsel zu ${displayName} fehlgeschlagen",
|
||||
"connectionFailedGeneric": "Verbindung fehlgeschlagen"
|
||||
"failedToSwitchProfile": "Profilwechsel zu ${displayName} fehlgeschlagen"
|
||||
},
|
||||
"libraries": {
|
||||
"title": "Mediatheken",
|
||||
@@ -363,7 +397,6 @@
|
||||
"sort": "Sortieren",
|
||||
"sortBy": "Sortieren nach",
|
||||
"filters": "Filter",
|
||||
"loadingLibraryWithCount": "Lade Mediathek... (${count} Elemente geladen)",
|
||||
"confirmActionMessage": "Aktion wirklich durchführen?",
|
||||
"showLibrary": "Mediathek anzeigen",
|
||||
"hideLibrary": "Mediathek ausblenden",
|
||||
@@ -398,22 +431,9 @@
|
||||
"viewLicensesDescription": "Lizenzen von Drittanbieter-Bibliotheken anzeigen"
|
||||
},
|
||||
"serverSelection": {
|
||||
"connectingToServer": "Verbinde mit Server...",
|
||||
"connectingToAllServers": "Verbinde mit allen Servern...",
|
||||
"connectToAllServers": "Mit allen Servern verbinden",
|
||||
"allServerConnectionsFailed": "Verbindung zu allen Servern fehlgeschlagen. Bitte Netzwerk prüfen und erneut versuchen.",
|
||||
"foundServers": "${count} Server gefunden",
|
||||
"orSelectIndividually": "Oder einzelnen Server auswählen:",
|
||||
"serverDebugCopied": "Server-Debugdaten kopiert",
|
||||
"copyDebugData": "Debugdaten kopieren",
|
||||
"noServersFound": "Keine Server gefunden",
|
||||
"malformedServerData": "${count} Server mit fehlerhaften Daten gefunden. Keine gültigen Server verfügbar.",
|
||||
"incompleteServerInfo": "Einige Serverinformationen sind unvollständig und wurden übersprungen. Plex.tv-Konto prüfen.",
|
||||
"incompleteConnectionInfo": "Serververbindungsinformationen unvollständig. Bitte erneut versuchen.",
|
||||
"malformedServerInfo": "Serverinformationen fehlerhaft: ${message}",
|
||||
"networkConnectionFailed": "Netzwerkverbindung fehlgeschlagen. Internetverbindung prüfen und erneut versuchen.",
|
||||
"authenticationFailed": "Authentifizierung fehlgeschlagen. Bitte erneut anmelden.",
|
||||
"plexServiceUnavailable": "Plex-Dienst nicht verfügbar. Bitte später erneut versuchen.",
|
||||
"noServersFoundForAccount": "Keine Server gefunden für ${username} (${email})",
|
||||
"failedToLoadServers": "Server konnten nicht geladen werden: ${error}"
|
||||
},
|
||||
"hubDetail": {
|
||||
@@ -424,11 +444,8 @@
|
||||
"noItemsFound": "Keine Elemente gefunden"
|
||||
},
|
||||
"logs": {
|
||||
"title": "Protokolle",
|
||||
"clearLogs": "Protokolle löschen",
|
||||
"copyLogs": "Protokolle kopieren",
|
||||
"exportLogs": "Protokolle exportieren",
|
||||
"noLogsToShow": "Keine Protokolle zum Anzeigen",
|
||||
"error": "Fehler:",
|
||||
"stackTrace": "Stacktrace:"
|
||||
},
|
||||
@@ -442,32 +459,40 @@
|
||||
"home": "Start",
|
||||
"search": "Suche",
|
||||
"libraries": "Mediatheken",
|
||||
"settings": "Einstellungen"
|
||||
"settings": "Einstellungen",
|
||||
"downloads": "Downloads"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "Downloads",
|
||||
"manage": "Verwalten",
|
||||
"tvShows": "Serien",
|
||||
"movies": "Filme",
|
||||
"noDownloads": "Noch keine Downloads",
|
||||
"noDownloadsDescription": "Heruntergeladene Inhalte werden hier für die Offline-Wiedergabe angezeigt",
|
||||
"downloadNow": "Herunterladen",
|
||||
"deleteDownload": "Download löschen",
|
||||
"retryDownload": "Download wiederholen",
|
||||
"downloadQueued": "Download in Warteschlange",
|
||||
"episodesQueued": "${count} Episoden zum Download hinzugefügt",
|
||||
"downloadDeleted": "Download gelöscht",
|
||||
"deleteConfirm": "Möchtest du \"${title}\" wirklich löschen? Die heruntergeladene Datei wird von deinem Gerät entfernt.",
|
||||
"deletingWithProgress": "Lösche ${title}... (${current} von ${total})"
|
||||
},
|
||||
"playlists": {
|
||||
"title": "Wiedergabelisten",
|
||||
"noPlaylists": "Keine Wiedergabelisten gefunden",
|
||||
"create": "Wiedergabeliste erstellen",
|
||||
"newPlaylist": "Neue Wiedergabeliste",
|
||||
"playlistName": "Name der Wiedergabeliste",
|
||||
"enterPlaylistName": "Name der Wiedergabeliste eingeben",
|
||||
"edit": "Wiedergabeliste bearbeiten",
|
||||
"delete": "Wiedergabeliste löschen",
|
||||
"addTo": "Zur Wiedergabeliste hinzufügen",
|
||||
"addItems": "Elemente hinzufügen",
|
||||
"removeItem": "Aus Wiedergabeliste entfernen",
|
||||
"clearPlaylist": "Wiedergabeliste leeren",
|
||||
"playAll": "Alle abspielen",
|
||||
"shuffle": "Zufällig",
|
||||
"smartPlaylist": "Intelligente Wiedergabeliste",
|
||||
"regularPlaylist": "Normale Wiedergabeliste",
|
||||
"itemCount": "${count} Elemente",
|
||||
"oneItem": "1 Element",
|
||||
"emptyPlaylist": "Diese Wiedergabeliste ist leer",
|
||||
"deleteConfirm": "Wiedergabeliste löschen?",
|
||||
"deleteMessage": "Soll \"${name}\" wirklich gelöscht werden?",
|
||||
"created": "Wiedergabeliste erstellt",
|
||||
"updated": "Wiedergabeliste aktualisiert",
|
||||
"deleted": "Wiedergabeliste gelöscht",
|
||||
"itemAdded": "Zur Wiedergabeliste hinzugefügt",
|
||||
"itemRemoved": "Aus Wiedergabeliste entfernt",
|
||||
@@ -485,7 +510,6 @@
|
||||
"title": "Sammlungen",
|
||||
"collection": "Sammlung",
|
||||
"empty": "Sammlung ist leer",
|
||||
"noItems": "Keine Elemente in dieser Sammlung",
|
||||
"unknownLibrarySection": "Löschen nicht möglich: Unbekannte Bibliothekssektion",
|
||||
"deleteCollection": "Sammlung löschen",
|
||||
"deleteConfirm": "Sind Sie sicher, dass Sie \"${title}\" löschen möchten? Dies kann nicht rückgängig gemacht werden.",
|
||||
@@ -493,7 +517,6 @@
|
||||
"deleteFailed": "Sammlung konnte nicht gelöscht werden",
|
||||
"deleteFailedWithError": "Sammlung konnte nicht gelöscht werden: ${error}",
|
||||
"failedToLoadItems": "Sammlungselemente konnten nicht geladen werden: ${error}",
|
||||
"addTo": "Zur Sammlung hinzufügen",
|
||||
"selectCollection": "Sammlung auswählen",
|
||||
"createNewCollection": "Neue Sammlung erstellen",
|
||||
"collectionName": "Sammlungsname",
|
||||
@@ -506,5 +529,49 @@
|
||||
"removedFromCollection": "Aus Sammlung entfernt",
|
||||
"removeFromCollectionFailed": "Entfernen aus Sammlung fehlgeschlagen",
|
||||
"removeFromCollectionError": "Fehler beim Entfernen aus der Sammlung: ${error}"
|
||||
},
|
||||
"watchTogether": {
|
||||
"title": "Gemeinsam Schauen",
|
||||
"description": "Inhalte synchron mit Freunden und Familie schauen",
|
||||
"createSession": "Sitzung Erstellen",
|
||||
"creating": "Erstellen...",
|
||||
"joinSession": "Sitzung Beitreten",
|
||||
"joining": "Beitreten...",
|
||||
"controlMode": "Steuerungsmodus",
|
||||
"controlModeQuestion": "Wer kann die Wiedergabe steuern?",
|
||||
"hostOnly": "Nur Host",
|
||||
"anyone": "Alle",
|
||||
"hostingSession": "Sitzung Hosten",
|
||||
"inSession": "In Sitzung",
|
||||
"sessionCode": "Sitzungscode",
|
||||
"hostControlsPlayback": "Host steuert die Wiedergabe",
|
||||
"anyoneCanControl": "Alle können die Wiedergabe steuern",
|
||||
"hostControls": "Host steuert",
|
||||
"anyoneControls": "Alle steuern",
|
||||
"participants": "Teilnehmer",
|
||||
"host": "Host",
|
||||
"hostBadge": "HOST",
|
||||
"youAreHost": "Du bist der Host",
|
||||
"watchingWithOthers": "Mit anderen schauen",
|
||||
"endSession": "Sitzung Beenden",
|
||||
"leaveSession": "Sitzung Verlassen",
|
||||
"endSessionQuestion": "Sitzung Beenden?",
|
||||
"leaveSessionQuestion": "Sitzung Verlassen?",
|
||||
"endSessionConfirm": "Dies beendet die Sitzung für alle Teilnehmer.",
|
||||
"leaveSessionConfirm": "Du wirst aus der Sitzung entfernt.",
|
||||
"endSessionConfirmOverlay": "Dies beendet die Schausitzung für alle Teilnehmer.",
|
||||
"leaveSessionConfirmOverlay": "Du wirst von der Schausitzung getrennt.",
|
||||
"end": "Beenden",
|
||||
"leave": "Verlassen",
|
||||
"syncing": "Synchronisieren...",
|
||||
"participant": "Teilnehmer",
|
||||
"joinWatchSession": "Schausitzung Beitreten",
|
||||
"enterCodeHint": "8-stelligen Code eingeben",
|
||||
"pasteFromClipboard": "Aus Zwischenablage einfügen",
|
||||
"pleaseEnterCode": "Bitte gib einen Sitzungscode ein",
|
||||
"codeMustBe8Chars": "Sitzungscode muss 8 Zeichen haben",
|
||||
"joinInstructions": "Gib den vom Host geteilten Sitzungscode ein, um seiner Schausitzung beizutreten.",
|
||||
"failedToCreate": "Sitzung konnte nicht erstellt werden",
|
||||
"failedToJoin": "Sitzung konnte nicht beigetreten werden"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,18 +26,11 @@
|
||||
"submit": "Invia",
|
||||
"confirm": "Conferma",
|
||||
"retry": "Riprova",
|
||||
"playNow": "Riproduci ora",
|
||||
"logout": "Disconnetti",
|
||||
"online": "Online",
|
||||
"offline": "Offline",
|
||||
"owned": "Di proprietà",
|
||||
"shared": "Condiviso",
|
||||
"current": "CORRENTE",
|
||||
"unknown": "Sconosciuto",
|
||||
"refresh": "Aggiorna",
|
||||
"yes": "Sì",
|
||||
"no": "No",
|
||||
"server": "Server",
|
||||
"delete": "Elimina",
|
||||
"shuffle": "Casuale",
|
||||
"addTo": "Aggiungi a..."
|
||||
@@ -47,6 +40,7 @@
|
||||
"selectServer": "Seleziona server",
|
||||
"switchProfile": "Cambia profilo",
|
||||
"subtitleStyling": "Stile sottotitoli",
|
||||
"mpvConfig": "Configurazione MPV",
|
||||
"search": "Cerca",
|
||||
"logs": "Registro"
|
||||
},
|
||||
@@ -65,7 +59,6 @@
|
||||
"theme": "Tema",
|
||||
"appearance": "Aspetto",
|
||||
"videoPlayback": "Riproduzione video",
|
||||
"shufflePlay": "Riproduzione casuale",
|
||||
"advanced": "Avanzate",
|
||||
"useSeasonPostersDescription": "Mostra il poster della stagione invece del poster della serie per gli episodi",
|
||||
"showHeroSectionDescription": "Visualizza il carosello dei contenuti in primo piano sulla schermata iniziale",
|
||||
@@ -105,15 +98,11 @@
|
||||
"minutesUnit": "${minutes} minuti",
|
||||
"rememberTrackSelections": "Ricorda selezioni tracce per serie/film",
|
||||
"rememberTrackSelectionsDescription": "Salva automaticamente le preferenze delle lingue audio e sottotitoli quando cambi tracce durante la riproduzione",
|
||||
"unwatchedOnly": "Solo non guardati",
|
||||
"unwatchedOnlyDescription": "Includi solo gli episodi non guardati nella coda di riproduzione casuale",
|
||||
"shuffleOrderNavigation": "Navigazione in ordine casuale",
|
||||
"shuffleOrderNavigationDescription": "I pulsanti Avanti/Indietro seguono l'ordine casuale",
|
||||
"loopShuffleQueue": "Coda di riproduzione casuale in loop",
|
||||
"loopShuffleQueueDescription": "Riavvia la coda quando raggiungi la fine",
|
||||
"videoPlayerControls": "Controlli del lettore video",
|
||||
"keyboardShortcuts": "Scorciatoie da tastiera",
|
||||
"keyboardShortcutsDescription": "Personalizza le scorciatoie da tastiera",
|
||||
"videoPlayerNavigation": "Navigazione del lettore video",
|
||||
"videoPlayerNavigationDescription": "Usa i tasti freccia per navigare nei controlli del lettore video",
|
||||
"debugLogging": "Log di debug",
|
||||
"debugLoggingDescription": "Abilita il logging dettagliato per la risoluzione dei problemi",
|
||||
"viewLogs": "Visualizza log",
|
||||
@@ -133,7 +122,34 @@
|
||||
"validationErrorEnterNumber": "Inserisci un numero valido",
|
||||
"validationErrorDuration": "la durata deve essere compresa tra ${min} e ${max} ${unit}",
|
||||
"shortcutAlreadyAssigned": "Scorciatoia già assegnata a ${action}",
|
||||
"shortcutUpdated": "Scorciatoia aggiornata per ${action}"
|
||||
"shortcutUpdated": "Scorciatoia aggiornata per ${action}",
|
||||
"autoSkip": "Salto Automatico",
|
||||
"autoSkipIntro": "Salta Intro Automaticamente",
|
||||
"autoSkipIntroDescription": "Salta automaticamente i marcatori dell'intro dopo alcuni secondi",
|
||||
"autoSkipCredits": "Salta Crediti Automaticamente",
|
||||
"autoSkipCreditsDescription": "Salta automaticamente i crediti e riproduci l'episodio successivo",
|
||||
"autoSkipDelay": "Ritardo Salto Automatico",
|
||||
"autoSkipDelayDescription": "Aspetta ${seconds} secondi prima del salto automatico",
|
||||
"downloads": "Download",
|
||||
"downloadLocationDescription": "Scegli dove salvare i contenuti scaricati",
|
||||
"downloadLocationDefault": "Predefinita (Archiviazione App)",
|
||||
"downloadLocationCustom": "Posizione Personalizzata",
|
||||
"selectFolder": "Seleziona Cartella",
|
||||
"resetToDefault": "Ripristina Predefinita",
|
||||
"currentPath": "Corrente: ${path}",
|
||||
"downloadLocationChanged": "Posizione di download modificata",
|
||||
"downloadLocationReset": "Posizione di download ripristinata a predefinita",
|
||||
"downloadLocationInvalid": "La cartella selezionata non è scrivibile",
|
||||
"downloadLocationSelectError": "Impossibile selezionare la cartella",
|
||||
"downloadOnWifiOnly": "Scarica solo con WiFi",
|
||||
"downloadOnWifiOnlyDescription": "Impedisci i download quando si utilizza la rete dati cellulare",
|
||||
"cellularDownloadBlocked": "I download sono disabilitati sulla rete dati cellulare. Connettiti al WiFi o modifica l'impostazione.",
|
||||
"maxVolume": "Volume massimo",
|
||||
"maxVolumeDescription": "Consenti volume superiore al 100% per contenuti audio bassi",
|
||||
"maxVolumePercent": "${percent}%",
|
||||
"maxVolumeHint": "Inserisci volume massimo (100-300)",
|
||||
"discordRichPresence": "Discord Rich Presence",
|
||||
"discordRichPresenceDescription": "Mostra su Discord cosa stai guardando"
|
||||
},
|
||||
"search": {
|
||||
"hint": "Cerca film. spettacoli, musica...",
|
||||
@@ -225,7 +241,6 @@
|
||||
"nextButton": "Episodio successivo",
|
||||
"previousChapterButton": "Capitolo precedente",
|
||||
"nextChapterButton": "Capitolo successivo",
|
||||
"volumeButton": "Volume",
|
||||
"muteButton": "Silenzia",
|
||||
"unmuteButton": "Riattiva audio",
|
||||
"settingsButton": "Impostazioni video",
|
||||
@@ -236,6 +251,7 @@
|
||||
"aspectRatioButton": "Proporzioni",
|
||||
"fullscreenButton": "Attiva schermo intero",
|
||||
"exitFullscreenButton": "Esci da schermo intero",
|
||||
"alwaysOnTopButton": "Sempre in primo piano",
|
||||
"rotationLockButton": "Blocco rotazione",
|
||||
"timelineSlider": "Timeline video",
|
||||
"volumeSlider": "Livello volume",
|
||||
@@ -250,6 +266,8 @@
|
||||
"messages": {
|
||||
"markedAsWatched": "Segna come visto",
|
||||
"markedAsUnwatched": "Segna come non visto",
|
||||
"markedAsWatchedOffline": "Segnato come visto (sincronizzato online)",
|
||||
"markedAsUnwatchedOffline": "Segnato come non visto (sincronizzato online)",
|
||||
"removedFromContinueWatching": "Rimosso da Continua a guardare",
|
||||
"errorLoading": "Errore: ${error}",
|
||||
"fileInfoNotAvailable": "Informazioni sul file non disponibili",
|
||||
@@ -266,22 +284,17 @@
|
||||
"metadataRefreshing": "Aggiornamento metadati per \"${title}\"...",
|
||||
"metadataRefreshStarted": "Aggiornamento metadati per \"${title}\"",
|
||||
"metadataRefreshFailed": "Errore aggiornamento metadati: ${error}",
|
||||
"noPlexToken": "Nessun token Plex trovato. Riesegui l'accesso.",
|
||||
"logoutConfirm": "Sei sicuro di volerti disconnettere?",
|
||||
"noSeasonsFound": "Nessuna stagione trovata",
|
||||
"noEpisodesFound": "Nessun episodio trovato nella prima stagione",
|
||||
"noEpisodesFoundGeneral": "Nessun episodio trovato",
|
||||
"noResultsFound": "Nessun risultato",
|
||||
"sleepTimerSet": "Imposta timer spegnimento per ${label}",
|
||||
"failedToSwitchProfile": "Impossibile passare a ${displayName}",
|
||||
"noItemsAvailable": "Nessun elemento disponibile",
|
||||
"failedToCreatePlayQueue": "Impossibile creare la coda di riproduzione",
|
||||
"failedToCreatePlayQueueNoItems": "Impossibile creare la coda di riproduzione - nessun elemento",
|
||||
"failedPlayback": "Impossibile ${action}: ${error}"
|
||||
},
|
||||
"profile": {
|
||||
"noUsersAvailable": "Nessun utente disponibile"
|
||||
},
|
||||
"subtitlingStyling": {
|
||||
"stylingOptions": "Opzioni stile",
|
||||
"fontSize": "Dimensione",
|
||||
@@ -291,9 +304,34 @@
|
||||
"backgroundOpacity": "Opacità sfondo",
|
||||
"backgroundColor": "Colore sfondo"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "Configurazione MPV",
|
||||
"description": "Impostazioni avanzate del lettore video",
|
||||
"properties": "Proprietà",
|
||||
"presets": "Preset",
|
||||
"noProperties": "Nessuna proprietà configurata",
|
||||
"noPresets": "Nessun preset salvato",
|
||||
"addProperty": "Aggiungi proprietà",
|
||||
"editProperty": "Modifica proprietà",
|
||||
"deleteProperty": "Elimina proprietà",
|
||||
"propertyKey": "Chiave proprietà",
|
||||
"propertyKeyHint": "es. hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "Valore proprietà",
|
||||
"propertyValueHint": "es. auto, 256000000",
|
||||
"saveAsPreset": "Salva come preset...",
|
||||
"presetName": "Nome preset",
|
||||
"presetNameHint": "Inserisci un nome per questo preset",
|
||||
"loadPreset": "Carica",
|
||||
"deletePreset": "Elimina",
|
||||
"presetSaved": "Preset salvato",
|
||||
"presetLoaded": "Preset caricato",
|
||||
"presetDeleted": "Preset eliminato",
|
||||
"confirmDeletePreset": "Sei sicuro di voler eliminare questo preset?",
|
||||
"confirmDeleteProperty": "Sei sicuro di voler eliminare questa proprietà?",
|
||||
"entriesCount": "${count} voci"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "Conferma azione",
|
||||
"areYouSure": "Sei sicuro di voler eseguire questa azione?",
|
||||
"cancel": "Cancella",
|
||||
"playNow": "Riproduci ora"
|
||||
},
|
||||
@@ -305,11 +343,8 @@
|
||||
"noContentAvailable": "Nessun contenuto disponibile",
|
||||
"addMediaToLibraries": "Aggiungi alcuni file multimediali alle tue librerie",
|
||||
"continueWatching": "Continua a guardare",
|
||||
"recentlyAdded": "Aggiunti di recente",
|
||||
"play": "Riproduci",
|
||||
"resume": "Riprendi",
|
||||
"playEpisode": "Riproduci S${season}, E${episode}",
|
||||
"resumeEpisode": "Riprendi S${season}, E${episode}",
|
||||
"playEpisode": "S${season}E${episode}",
|
||||
"pause": "Pausa",
|
||||
"overview": "Panoramica",
|
||||
"cast": "Attori",
|
||||
@@ -334,8 +369,7 @@
|
||||
"pleaseEnterToken": "Inserisci token",
|
||||
"invalidToken": "Token non valido",
|
||||
"failedToVerifyToken": "Verifica token fallita: ${error}",
|
||||
"failedToSwitchProfile": "Impossibile passare a ${displayName}",
|
||||
"connectionFailedGeneric": "Connessione fallita"
|
||||
"failedToSwitchProfile": "Impossibile passare a ${displayName}"
|
||||
},
|
||||
"libraries": {
|
||||
"title": "Librerie",
|
||||
@@ -363,7 +397,6 @@
|
||||
"sort": "Ordina",
|
||||
"sortBy": "Ordina per",
|
||||
"filters": "Filtri",
|
||||
"loadingLibraryWithCount": "Caricamento librerie... (${count} oggetti caricati)",
|
||||
"confirmActionMessage": "Sei sicuro di voler eseguire questa azione?",
|
||||
"showLibrary": "Mostra libreria",
|
||||
"hideLibrary": "Nascondi libreria",
|
||||
@@ -398,22 +431,9 @@
|
||||
"viewLicensesDescription": "Visualizza le licenze delle librerie di terze parti"
|
||||
},
|
||||
"serverSelection": {
|
||||
"connectingToServer": "Connessione al server...",
|
||||
"connectingToAllServers": "Connessione a tutti i server...",
|
||||
"connectToAllServers": "Connetti a tutti i server",
|
||||
"allServerConnectionsFailed": "Impossibile connettersi a nessun server. Controlla la tua rete e riprova.",
|
||||
"foundServers": "Trovati ${count} server",
|
||||
"orSelectIndividually": "Oppure seleziona un server singolarmente:",
|
||||
"serverDebugCopied": "Dati di debug del server copiati negli appunti",
|
||||
"copyDebugData": "Copia dati di debug",
|
||||
"noServersFound": "Nessun server trovato",
|
||||
"malformedServerData": "Trovato ${count} server con dati difettosi. Nessun server valido disponibile.",
|
||||
"incompleteServerInfo": "Alcuni server presentano informazioni incomplete e sono stati ignorati. Controlla il tuo account Plex.tv.",
|
||||
"incompleteConnectionInfo": "Le informazioni di connessione al server sono incomplete. Riprova.",
|
||||
"malformedServerInfo": "Le informazioni sul server sono errate: ${message}",
|
||||
"networkConnectionFailed": "Connessione di rete non riuscita. Controlla la tua connessione Internet e riprova.",
|
||||
"authenticationFailed": "Autenticazione fallita. Effettua nuovamente l'accesso.",
|
||||
"plexServiceUnavailable": "Servizio Plex non disponibile. Riprova più tardi.",
|
||||
"noServersFoundForAccount": "Nessun server trovato per ${username} (${email})",
|
||||
"failedToLoadServers": "Impossibile caricare i server: ${error}"
|
||||
},
|
||||
"hubDetail": {
|
||||
@@ -424,11 +444,8 @@
|
||||
"noItemsFound": "Nessun elemento trovato"
|
||||
},
|
||||
"logs": {
|
||||
"title": "Registro",
|
||||
"clearLogs": "Cancella log",
|
||||
"copyLogs": "Copia log",
|
||||
"exportLogs": "Esporta log",
|
||||
"noLogsToShow": "Nessun log da mostrare",
|
||||
"error": "Errore:",
|
||||
"stackTrace": "Traccia dello stack:"
|
||||
},
|
||||
@@ -442,32 +459,40 @@
|
||||
"home": "Home",
|
||||
"search": "Cerca",
|
||||
"libraries": "Librerie",
|
||||
"settings": "Impostazioni"
|
||||
"settings": "Impostazioni",
|
||||
"downloads": "Download"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "Download",
|
||||
"manage": "Gestisci",
|
||||
"tvShows": "Serie TV",
|
||||
"movies": "Film",
|
||||
"noDownloads": "Nessun download",
|
||||
"noDownloadsDescription": "I contenuti scaricati appariranno qui per la visualizzazione offline",
|
||||
"downloadNow": "Scarica",
|
||||
"deleteDownload": "Elimina download",
|
||||
"retryDownload": "Riprova download",
|
||||
"downloadQueued": "Download in coda",
|
||||
"episodesQueued": "${count} episodi in coda per il download",
|
||||
"downloadDeleted": "Download eliminato",
|
||||
"deleteConfirm": "Sei sicuro di voler eliminare \"${title}\"? Il file scaricato verrà rimosso dal tuo dispositivo.",
|
||||
"deletingWithProgress": "Eliminazione di ${title}... (${current} di ${total})"
|
||||
},
|
||||
"playlists": {
|
||||
"title": "Playlist",
|
||||
"noPlaylists": "Nessuna playlist trovata",
|
||||
"create": "Crea playlist",
|
||||
"newPlaylist": "Nuova playlist",
|
||||
"playlistName": "Nome playlist",
|
||||
"enterPlaylistName": "Inserisci nome playlist",
|
||||
"edit": "Modifica playlist",
|
||||
"delete": "Elimina playlist",
|
||||
"addTo": "Aggiungi a playlist",
|
||||
"addItems": "Aggiungi elementi",
|
||||
"removeItem": "Rimuovi da playlist",
|
||||
"clearPlaylist": "Svuota playlist",
|
||||
"playAll": "Riproduci tutto",
|
||||
"shuffle": "Casuale",
|
||||
"smartPlaylist": "Playlist intelligente",
|
||||
"regularPlaylist": "Playlist normale",
|
||||
"itemCount": "${count} elementi",
|
||||
"oneItem": "1 elemento",
|
||||
"emptyPlaylist": "Questa playlist è vuota",
|
||||
"deleteConfirm": "Eliminare playlist?",
|
||||
"deleteMessage": "Sei sicuro di voler eliminare \"${name}\"?",
|
||||
"created": "Playlist creata",
|
||||
"updated": "Playlist aggiornata",
|
||||
"deleted": "Playlist eliminata",
|
||||
"itemAdded": "Aggiunto alla playlist",
|
||||
"itemRemoved": "Rimosso dalla playlist",
|
||||
@@ -485,7 +510,6 @@
|
||||
"title": "Raccolte",
|
||||
"collection": "Raccolta",
|
||||
"empty": "La raccolta è vuota",
|
||||
"noItems": "Nessun elemento in questa raccolta",
|
||||
"unknownLibrarySection": "Impossibile eliminare: sezione libreria sconosciuta",
|
||||
"deleteCollection": "Elimina raccolta",
|
||||
"deleteConfirm": "Sei sicuro di voler eliminare \"${title}\"? Questa azione non può essere annullata.",
|
||||
@@ -493,7 +517,6 @@
|
||||
"deleteFailed": "Impossibile eliminare la raccolta",
|
||||
"deleteFailedWithError": "Impossibile eliminare la raccolta: ${error}",
|
||||
"failedToLoadItems": "Impossibile caricare gli elementi della raccolta: ${error}",
|
||||
"addTo": "Aggiungi alla raccolta",
|
||||
"selectCollection": "Seleziona raccolta",
|
||||
"createNewCollection": "Crea nuova raccolta",
|
||||
"collectionName": "Nome raccolta",
|
||||
@@ -506,5 +529,49 @@
|
||||
"removedFromCollection": "Rimosso dalla raccolta",
|
||||
"removeFromCollectionFailed": "Impossibile rimuovere dalla raccolta",
|
||||
"removeFromCollectionError": "Errore durante la rimozione dalla raccolta: ${error}"
|
||||
},
|
||||
"watchTogether": {
|
||||
"title": "Guarda Insieme",
|
||||
"description": "Guarda contenuti in sincronia con amici e familiari",
|
||||
"createSession": "Crea Sessione",
|
||||
"creating": "Creazione...",
|
||||
"joinSession": "Unisciti alla Sessione",
|
||||
"joining": "Connessione...",
|
||||
"controlMode": "Modalità di Controllo",
|
||||
"controlModeQuestion": "Chi può controllare la riproduzione?",
|
||||
"hostOnly": "Solo Host",
|
||||
"anyone": "Tutti",
|
||||
"hostingSession": "Hosting Sessione",
|
||||
"inSession": "In Sessione",
|
||||
"sessionCode": "Codice Sessione",
|
||||
"hostControlsPlayback": "L'host controlla la riproduzione",
|
||||
"anyoneCanControl": "Tutti possono controllare la riproduzione",
|
||||
"hostControls": "Controllo host",
|
||||
"anyoneControls": "Controllo di tutti",
|
||||
"participants": "Partecipanti",
|
||||
"host": "Host",
|
||||
"hostBadge": "HOST",
|
||||
"youAreHost": "Sei l'host",
|
||||
"watchingWithOthers": "Guardando con altri",
|
||||
"endSession": "Termina Sessione",
|
||||
"leaveSession": "Lascia Sessione",
|
||||
"endSessionQuestion": "Terminare la Sessione?",
|
||||
"leaveSessionQuestion": "Lasciare la Sessione?",
|
||||
"endSessionConfirm": "Questo terminerà la sessione per tutti i partecipanti.",
|
||||
"leaveSessionConfirm": "Sarai rimosso dalla sessione.",
|
||||
"endSessionConfirmOverlay": "Questo terminerà la sessione di visione per tutti i partecipanti.",
|
||||
"leaveSessionConfirmOverlay": "Sarai disconnesso dalla sessione di visione.",
|
||||
"end": "Termina",
|
||||
"leave": "Lascia",
|
||||
"syncing": "Sincronizzazione...",
|
||||
"participant": "partecipante",
|
||||
"joinWatchSession": "Unisciti alla Sessione di Visione",
|
||||
"enterCodeHint": "Inserisci codice di 8 caratteri",
|
||||
"pasteFromClipboard": "Incolla dagli appunti",
|
||||
"pleaseEnterCode": "Inserisci un codice sessione",
|
||||
"codeMustBe8Chars": "Il codice sessione deve essere di 8 caratteri",
|
||||
"joinInstructions": "Inserisci il codice sessione condiviso dall'host per unirti alla loro sessione di visione.",
|
||||
"failedToCreate": "Impossibile creare la sessione",
|
||||
"failedToJoin": "Impossibile unirsi alla sessione"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,577 @@
|
||||
{
|
||||
"app": {
|
||||
"title": "Plezy",
|
||||
"loading": "로딩 중..."
|
||||
},
|
||||
"auth": {
|
||||
"signInWithPlex": "Plex 계정으로 로그인",
|
||||
"showQRCode": "QR 코드",
|
||||
"cancel": "취소",
|
||||
"authenticate": "인증",
|
||||
"retry": "재시도",
|
||||
"debugEnterToken": "디버깅을 위해 Plex 토큰을 입력하세요.",
|
||||
"plexTokenLabel": "Plex 인증 토큰",
|
||||
"plexTokenHint": "Plex.tv 토큰을 입력하세요",
|
||||
"authenticationTimeout": "인증 시간이 초과되었습니다. 다시 시도해 주세요.",
|
||||
"scanQRCodeInstruction": "Plex 계정에 로그인된 기기에서 이 QR 코드를 스캔하여 본인 인증을 해주세요.",
|
||||
"waitingForAuth": "인증 대기 중... 브라우저에서 로그인을 완료해 주세요."
|
||||
},
|
||||
"common": {
|
||||
"cancel": "취소",
|
||||
"save": "저장",
|
||||
"close": "닫기",
|
||||
"clear": "지우기",
|
||||
"reset": "초기화",
|
||||
"later": "나중에",
|
||||
"submit": "보내기",
|
||||
"confirm": "확인",
|
||||
"retry": "재시도",
|
||||
"logout": "로그아웃",
|
||||
"unknown": "알 수 없는",
|
||||
"refresh": "새로고침",
|
||||
"yes": "예",
|
||||
"no": "아니오",
|
||||
"delete": "삭제",
|
||||
"shuffle": "무작위 재생",
|
||||
"addTo": "추가하기..."
|
||||
},
|
||||
"screens": {
|
||||
"licenses": "라이선스",
|
||||
"selectServer": "서버 선택",
|
||||
"switchProfile": "프로필 전환",
|
||||
"subtitleStyling": "자막 스타일 설정",
|
||||
"mpvConfig": "MPV 설정",
|
||||
"search": "검색",
|
||||
"logs": "로그"
|
||||
},
|
||||
"update": {
|
||||
"available": "사용 가능한 업데이트",
|
||||
"versionAvailable": "버전 ${version} 출시됨",
|
||||
"currentVersion": "현재 버전: ${version}",
|
||||
"skipVersion": "이 버전 건너뛰기",
|
||||
"viewRelease": "릴리스 정보 보기",
|
||||
"latestVersion": "최신 버전을 사용 중입니다",
|
||||
"checkFailed": "업데이트 확인 실패"
|
||||
},
|
||||
"settings": {
|
||||
"title": "설정",
|
||||
"language": "언어",
|
||||
"theme": "테마",
|
||||
"appearance": "외관",
|
||||
"videoPlayback": "비디오 재생",
|
||||
"advanced": "고급",
|
||||
"useSeasonPostersDescription": "에피소드에 시리즈 포스터 대신 시즌 포스터 표시",
|
||||
"showHeroSectionDescription": "홈 화면에 주요 콘텐츠 캐러셀(슬라이드) 표시",
|
||||
"secondsLabel": "초",
|
||||
"minutesLabel": "분",
|
||||
"secondsShort": "초",
|
||||
"minutesShort": "분",
|
||||
"durationHint": "기간 입력 (${min}-${max})",
|
||||
"systemTheme": "시스템 설정",
|
||||
"systemThemeDescription": "시스템 설정에 따름",
|
||||
"lightTheme": "라이트 모드",
|
||||
"darkTheme": "다크 모드",
|
||||
"libraryDensity": "라이브러리 표시 밀도",
|
||||
"compact": "좁게",
|
||||
"compactDescription": "카드를 작게 표시하여 더 많은 항목을 보여줍니다.",
|
||||
"normal": "보통",
|
||||
"normalDescription": "기본 크기",
|
||||
"comfortable": "넓게",
|
||||
"comfortableDescription": "카드를 크게 표시하여 더 적은 항목을 보여줍니다.",
|
||||
"viewMode": "보기 모드",
|
||||
"gridView": "그리드 보기",
|
||||
"gridViewDescription": "항목을 그리드 레이아웃으로 표시합니다",
|
||||
"listView": "목록 보기",
|
||||
"listViewDescription": "항목을 목록 레이아웃으로 표시합니다",
|
||||
"useSeasonPosters": "시즌 포스터 사용",
|
||||
"showHeroSection": "주요 추천 영역 표시",
|
||||
"hardwareDecoding": "하드웨어 디코딩",
|
||||
"hardwareDecodingDescription": "가능한 경우 하드웨어 가속을 사용합니다",
|
||||
"bufferSize": "버퍼 크기",
|
||||
"bufferSizeMB": "${size}MB",
|
||||
"subtitleStyling": "자막 스타일",
|
||||
"subtitleStylingDescription": "자막의 외형을 사용자 설정",
|
||||
"smallSkipDuration": "짧은 건너뛰기 시간",
|
||||
"largeSkipDuration": "긴 건너뛰기 시간",
|
||||
"secondsUnit": "${seconds}초",
|
||||
"defaultSleepTimer": "기본 취침 타이머",
|
||||
"minutesUnit": "${minutes}분",
|
||||
"rememberTrackSelections": "에피소드/영화별 트랙 선택 기억",
|
||||
"rememberTrackSelectionsDescription": "재생 중 트랙을 변경할 때 오디오 및 자막 언어 설정을 자동으로 저장합니다",
|
||||
"videoPlayerControls": "비디오 플레이어 컨트롤",
|
||||
"keyboardShortcuts": "키보드 단축키",
|
||||
"keyboardShortcutsDescription": "사용자 정의 키보드 단축키",
|
||||
"videoPlayerNavigation": "비디오 플레이어 탐색",
|
||||
"videoPlayerNavigationDescription": "방향 키를 사용하여 비디오 플레이어 컨트롤 탐색",
|
||||
"debugLogging": "디버그 로깅",
|
||||
"debugLoggingDescription": "문제 해결을 위해 상세 로깅 활성화",
|
||||
"viewLogs": "로그 보기",
|
||||
"viewLogsDescription": "애플리케이션 로그 확인",
|
||||
"clearCache": "캐시 삭제",
|
||||
"clearCacheDescription": "모든 캐시된 이미지와 데이터를 지웁니다. 캐시를 지우면 애플리케이션 콘텐츠 로딩 속도가 느려질 수 있습니다.",
|
||||
"clearCacheSuccess": "캐시 삭제 성공",
|
||||
"resetSettings": "설정 재설정",
|
||||
"resetSettingsDescription": "모든 설정을 기본값으로 재설정합니다. 이 작업은 되돌릴 수 없습니다.",
|
||||
"resetSettingsSuccess": "설정 재설정 성공",
|
||||
"shortcutsReset": "단축키가 기본값으로 재설정되었습니다",
|
||||
"about": "정보",
|
||||
"aboutDescription": "응용 프로그램 정보 및 라이선스",
|
||||
"updates": "업데이트",
|
||||
"updateAvailable": "사용 가능한 업데이트 있음",
|
||||
"checkForUpdates": "업데이트 확인",
|
||||
"validationErrorEnterNumber": "유효한 숫자를 입력하세요",
|
||||
"validationErrorDuration": "기간은 ${min}과 ${max} ${unit} 사이여야 합니다",
|
||||
"shortcutAlreadyAssigned": "단축키가 이미 ${action}에 할당 되었습니다",
|
||||
"shortcutUpdated": "단축키가 ${action}에 대해 업데이트 되었습니다",
|
||||
"autoSkip": "자동 건너뛰기",
|
||||
"autoSkipIntro": "자동으로 오프닝 건너뛰기",
|
||||
"autoSkipIntroDescription": "몇 초 후 오프닝을 자동으로 건너뛰기",
|
||||
"autoSkipCredits": "자동으로 엔딩 건너뛰기",
|
||||
"autoSkipCreditsDescription": "엔딩 크레딧 자동 건너뛰기 후 다음 에피소드 재생",
|
||||
"autoSkipDelay": "자동 건너뛰기 지연",
|
||||
"autoSkipDelayDescription": "자동 건너뛰기 전 ${seconds} 초 대기",
|
||||
"downloads": "다운로드",
|
||||
"downloadLocationDescription": "다운로드 콘텐츠 저장 위치 선택",
|
||||
"downloadLocationDefault": "기본값 (앱 저장소)",
|
||||
"downloadLocationCustom": "사용자 지정 위치",
|
||||
"selectFolder": "폴더 선택",
|
||||
"resetToDefault": "기본값으로 재설정",
|
||||
"currentPath": "현재: ${path}",
|
||||
"downloadLocationChanged": "다운로드 위치가 변경 되었습니다",
|
||||
"downloadLocationReset": "다운로드 위치가 기본값으로 재설정 되었습니다",
|
||||
"downloadLocationInvalid": "선택한 폴더에 쓰기 권한이 없습니다",
|
||||
"downloadLocationSelectError": "폴더 선택 실패",
|
||||
"downloadOnWifiOnly": "WiFi 연결 시에만 다운로드",
|
||||
"downloadOnWifiOnlyDescription": "셀룰러 데이터 사용 시 다운로드 불가",
|
||||
"cellularDownloadBlocked": "셀룰러 데이터에서 다운로드가 차단 되었습니다. WiFi에 연결하거나 설정을 변경하세요.",
|
||||
"maxVolume": "최대 볼륨",
|
||||
"maxVolumeDescription": "조용한 미디어를 위해 100% 이상의 볼륨 허용",
|
||||
"maxVolumePercent": "${percent}%",
|
||||
"maxVolumeHint": "최대 볼륨 입력 (100-300)",
|
||||
"discordRichPresence": "Discord Rich Presence",
|
||||
"discordRichPresenceDescription": "Discord에서 시청 중인 콘텐츠 표시"
|
||||
},
|
||||
"search": {
|
||||
"hint": "영화, 시리즈, 음악 등을 검색하세요...",
|
||||
"tryDifferentTerm": "다른 검색어를 시도해 보세요",
|
||||
"searchYourMedia": "미디어 검색",
|
||||
"enterTitleActorOrKeyword": "제목, 배우 또는 키워드를 입력하세요"
|
||||
},
|
||||
"hotkeys": {
|
||||
"setShortcutFor": "${actionName}에 대한 단축키 설정",
|
||||
"clearShortcut": "단축키 삭제"
|
||||
},
|
||||
"pinEntry": {
|
||||
"enterPin": "PIN 입력",
|
||||
"showPin": "PIN 표시",
|
||||
"hidePin": "PIN 숨기기"
|
||||
},
|
||||
"fileInfo": {
|
||||
"title": "파일 정보",
|
||||
"video": "비디오",
|
||||
"audio": "오디오",
|
||||
"file": "파일",
|
||||
"advanced": "고급",
|
||||
"codec": "코덱",
|
||||
"resolution": "해상도",
|
||||
"bitrate": "비트레이트",
|
||||
"frameRate": "프레임 속도",
|
||||
"aspectRatio": "종횡비",
|
||||
"profile": "프로파일",
|
||||
"bitDepth": "비트 심도",
|
||||
"colorSpace": "색 공간",
|
||||
"colorRange": "색 범위",
|
||||
"colorPrimaries": "색상 원색",
|
||||
"chromaSubsampling": "채도 서브샘플링",
|
||||
"channels": "채널",
|
||||
"path": "경로",
|
||||
"size": "크기",
|
||||
"container": "컨테이너",
|
||||
"duration": "재생 시간",
|
||||
"optimizedForStreaming": "스트리밍 최적화",
|
||||
"has64bitOffsets": "64비트 오프셋"
|
||||
},
|
||||
"mediaMenu": {
|
||||
"markAsWatched": "시청 완료로 표시",
|
||||
"markAsUnwatched": "시청 안 함으로 표시",
|
||||
"removeFromContinueWatching": "계속 보기에서 제거",
|
||||
"goToSeries": "시리즈로 이동",
|
||||
"goToSeason": "시즌으로 이동",
|
||||
"shufflePlay": "무작위 재생",
|
||||
"fileInfo": "파일 정보"
|
||||
},
|
||||
"accessibility": {
|
||||
"mediaCardMovie": "${title}, 영화",
|
||||
"mediaCardShow": "${title}, TV 프로그램",
|
||||
"mediaCardEpisode": "${title}, ${episodeInfo}",
|
||||
"mediaCardSeason": "${title}, ${seasonInfo}",
|
||||
"mediaCardWatched": "시청 완료",
|
||||
"mediaCardPartiallyWatched": "${percent} 퍼센트 시청 완료",
|
||||
"mediaCardUnwatched": "미시청",
|
||||
"tapToPlay": "터치 하여 재생"
|
||||
},
|
||||
"tooltips": {
|
||||
"shufflePlay": "무작위 재생",
|
||||
"markAsWatched": "시청 완료로 표시",
|
||||
"markAsUnwatched": "시청 안 함으로 표시"
|
||||
},
|
||||
"videoControls": {
|
||||
"audioLabel": "오디오",
|
||||
"subtitlesLabel": "자막",
|
||||
"resetToZero": "0ms로 재설정",
|
||||
"addTime": "+${amount}${unit}",
|
||||
"minusTime": "-${amount}${unit}",
|
||||
"playsLater": "${label} 나중에 재생됨",
|
||||
"playsEarlier": "${label} 더 먼저 재생됨",
|
||||
"noOffset": "오프셋 없음",
|
||||
"letterbox": "레터박스 모드",
|
||||
"fillScreen": "화면 채우기",
|
||||
"stretch": "확장",
|
||||
"lockRotation": "회전 잠금",
|
||||
"unlockRotation": "회전 잠금 해제",
|
||||
"sleepTimer": "수면 타이머",
|
||||
"timerActive": "타이머 활성화됨",
|
||||
"playbackWillPauseIn": "재생이 ${duration} 후에 일시 중지 됩니다",
|
||||
"sleepTimerCompleted": "수면 타이머 완료됨 - 재생이 일시 중지되었습니다",
|
||||
"playButton": "재생",
|
||||
"pauseButton": "일시정지",
|
||||
"seekBackwardButton": "${seconds} 초 뒤로",
|
||||
"seekForwardButton": "${seconds} 초 앞으로",
|
||||
"previousButton": "이전 에피소드",
|
||||
"nextButton": "다음 에피소드",
|
||||
"previousChapterButton": "이전 챕터",
|
||||
"nextChapterButton": "다음 챕터",
|
||||
"muteButton": "음소거",
|
||||
"unmuteButton": "음소거 해제",
|
||||
"settingsButton": "동영상 설정",
|
||||
"audioTrackButton": "음원 트랙",
|
||||
"subtitlesButton": "자막",
|
||||
"chaptersButton": "챕터",
|
||||
"versionsButton": "동영상 버전",
|
||||
"aspectRatioButton": "화면비율",
|
||||
"fullscreenButton": "전체화면",
|
||||
"exitFullscreenButton": "전체화면 종료",
|
||||
"alwaysOnTopButton": "창 최상위 고정",
|
||||
"rotationLockButton": "회전 잠금",
|
||||
"timelineSlider": "타임라인",
|
||||
"volumeSlider": "볼륨 조절",
|
||||
"backButton": "뒤로 가기"
|
||||
},
|
||||
"userStatus": {
|
||||
"admin": "관리자",
|
||||
"restricted": "제한됨",
|
||||
"protected": "보호됨",
|
||||
"current": "현재"
|
||||
},
|
||||
"messages": {
|
||||
"markedAsWatched": "시청 완료로 표시됨",
|
||||
"markedAsUnwatched": "시청 안 함으로 표시됨",
|
||||
"markedAsWatchedOffline": "시청 완료로 표시됨 (연결 시 동기화됨)",
|
||||
"markedAsUnwatchedOffline": "미시청으로 표시됨 (연결 시 동기화됨)",
|
||||
"removedFromContinueWatching": "계속 시청 목록에서 제거됨",
|
||||
"errorLoading": "오류: ${error}",
|
||||
"fileInfoNotAvailable": "파일 정보가 없습니다",
|
||||
"errorLoadingFileInfo": "파일 정보 로딩 중 오류: ${error}",
|
||||
"errorLoadingSeries": "시리즈 로딩 중 오류",
|
||||
"errorLoadingSeason": "시즌 로딩 중 오류",
|
||||
"musicNotSupported": "음악 재생 미지원",
|
||||
"logsCleared": "로그가 삭제 되었습니다",
|
||||
"logsCopied": "로그가 클립보드에 복사 되었습니다",
|
||||
"noLogsAvailable": "사용 가능한 로그가 없습니다",
|
||||
"libraryScanning": "\"${title}\"을(를) 스캔 중입니다...",
|
||||
"libraryScanStarted": "\"${title}\" 미디어 라이브러리 스캔 시작",
|
||||
"libraryScanFailed": "미디어 라이브러리 스캔 실패: ${error}",
|
||||
"metadataRefreshing": "\"${title}\" 메타데이터 새로고침 중...",
|
||||
"metadataRefreshStarted": "\"${title}\" 메타데이터 새로고침 시작됨",
|
||||
"metadataRefreshFailed": "메타데이터 새로고침 실패: ${error}",
|
||||
"logoutConfirm": "로그아웃 하시겠습니까?",
|
||||
"noSeasonsFound": "시즌을 찾을 수 없음",
|
||||
"noEpisodesFound": "시즌 1에서 에피소드를 찾을 수 없습니다",
|
||||
"noEpisodesFoundGeneral": "에피소드를 찾을 수 없습니다",
|
||||
"noResultsFound": "결과를 찾을 수 없습니다",
|
||||
"sleepTimerSet": "수면 타이머가 ${label}로 설정 되었습니다",
|
||||
"noItemsAvailable": "사용 가능한 항목이 없습니다",
|
||||
"failedToCreatePlayQueue": "재생 대기열 생성 실패",
|
||||
"failedToCreatePlayQueueNoItems": "재생 대기열 생성 실패 - 항목 없음",
|
||||
"failedPlayback": "${action}을(를) 수행할 수 없습니다: ${error}"
|
||||
},
|
||||
"subtitlingStyling": {
|
||||
"stylingOptions": "스타일 옵션",
|
||||
"fontSize": "글자 크기",
|
||||
"textColor": "텍스트 색상",
|
||||
"borderSize": "테두리 크기",
|
||||
"borderColor": "테두리 색상",
|
||||
"backgroundOpacity": "배경 불투명도",
|
||||
"backgroundColor": "배경색"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "MPV 설정",
|
||||
"description": "고급 비디오 플레이어 설정",
|
||||
"properties": "속성",
|
||||
"presets": "사전 설정",
|
||||
"noProperties": "설정된 속성이 없습니다",
|
||||
"noPresets": "저장된 사전 설정이 없습니다",
|
||||
"addProperty": "속성 추가",
|
||||
"editProperty": "속성 편집",
|
||||
"deleteProperty": "속성 삭제",
|
||||
"propertyKey": "속성 키",
|
||||
"propertyKeyHint": "예: hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "속성값",
|
||||
"propertyValueHint": "예: auto, 256000000",
|
||||
"saveAsPreset": "프리셋으로 저장...",
|
||||
"presetName": "프리셋 이름",
|
||||
"presetNameHint": "이 프리셋의 이름을 입력하세요",
|
||||
"loadPreset": "로드",
|
||||
"deletePreset": "삭제",
|
||||
"presetSaved": "프리셋이 저장 되었습니다",
|
||||
"presetLoaded": "프리셋이 로드 되었습니다",
|
||||
"presetDeleted": "프리셋이 삭제 되었습니다",
|
||||
"confirmDeletePreset": "이 프리셋을 삭제 하시겠습니까?",
|
||||
"confirmDeleteProperty": "이 속성을 삭제 하시겠습니까?",
|
||||
"entriesCount": "${count} 항목"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "확인",
|
||||
"cancel": "취소",
|
||||
"playNow": "지금 재생"
|
||||
},
|
||||
"discover": {
|
||||
"title": "발견",
|
||||
"switchProfile": "사용자 전환",
|
||||
"switchServer": "서버 전환",
|
||||
"logout": "로그아웃",
|
||||
"noContentAvailable": "사용 가능한 콘텐츠가 없습니다",
|
||||
"addMediaToLibraries": "미디어 라이브러리에 미디어를 추가해 주세요",
|
||||
"continueWatching": "계속 시청",
|
||||
"play": "재생",
|
||||
"playEpisode": "S${season}E${episode}",
|
||||
"pause": "일시정지",
|
||||
"overview": "개요",
|
||||
"cast": "출연진",
|
||||
"seasons": "시즌 수",
|
||||
"studio": "제작사",
|
||||
"rating": "연령 등급",
|
||||
"watched": "시청 완료",
|
||||
"episodeCount": "${count} 편",
|
||||
"watchedProgress": "${watched}/${total} 편 시청 완료",
|
||||
"movie": "영화",
|
||||
"tvShow": "TV 시리즈",
|
||||
"minutesLeft": "${minutes}분 남음"
|
||||
},
|
||||
"errors": {
|
||||
"searchFailed": "검색 실패: ${error}",
|
||||
"connectionTimeout": "${context} 로드 중 연결 시간 초과",
|
||||
"connectionFailed": "Plex 서버에 연결할 수 없음",
|
||||
"failedToLoad": "${context} 로드 실패: ${error}",
|
||||
"noClientAvailable": "사용 가능한 클라이언트가 없습니다",
|
||||
"authenticationFailed": "인증 실패: ${error}",
|
||||
"couldNotLaunchUrl": "인증 URL을 열 수 없습니다",
|
||||
"pleaseEnterToken": "토큰을 입력해 주세요",
|
||||
"invalidToken": "토큰이 유효하지 않습니다",
|
||||
"failedToVerifyToken": "토큰을 확인할 수 없습니다: ${error}",
|
||||
"failedToSwitchProfile": "${displayName}으로 전환할 수 없습니다"
|
||||
},
|
||||
"libraries": {
|
||||
"title": "미디어 라이브러리",
|
||||
"scanLibraryFiles": "미디어 라이브러리 파일 스캔",
|
||||
"scanLibrary": "미디어 라이브러리 스캔",
|
||||
"analyze": "분석",
|
||||
"analyzeLibrary": "미디어 라이브러리 분석",
|
||||
"refreshMetadata": "메타데이터 새로 고침",
|
||||
"emptyTrash": "휴지통 비우기",
|
||||
"emptyingTrash": "「${title}」의 휴지통을 비우고 있습니다...",
|
||||
"trashEmptied": "「${title}」의 휴지통을 비웠습니다",
|
||||
"failedToEmptyTrash": "휴지통 비우기 실패: ${error}",
|
||||
"analyzing": "\"${title}\" 분석 중...",
|
||||
"analysisStarted": "\"${title}\" 분석 시작됨",
|
||||
"failedToAnalyze": "미디어 라이브러리 분석 실패: ${error}",
|
||||
"noLibrariesFound": "미디어 라이브러리 없음",
|
||||
"thisLibraryIsEmpty": "이 미디어 라이브러리는 비어 있습니다",
|
||||
"all": "전체",
|
||||
"clearAll": "모두 삭제",
|
||||
"scanLibraryConfirm": "「${title}」를 스캔 하시겠습니까?",
|
||||
"analyzeLibraryConfirm": "「${title}」를 분석 하시겠습니까?",
|
||||
"refreshMetadataConfirm": "「${title}」의 메타데이터를 새로고침 하시겠습니까?",
|
||||
"emptyTrashConfirm": "${title}의 휴지통을 비우시겠습니까?",
|
||||
"manageLibraries": "미디어 라이브러리 관리",
|
||||
"sort": "정렬",
|
||||
"sortBy": "정렬 기준",
|
||||
"filters": "필터",
|
||||
"confirmActionMessage": "이 작업을 실행 하시겠습니까?",
|
||||
"showLibrary": "미디어 라이브러리 표시",
|
||||
"hideLibrary": "미디어 라이브러리 숨기기",
|
||||
"libraryOptions": "미디어 라이브러리 옵션",
|
||||
"content": "미디어 라이브러리 콘텐츠",
|
||||
"selectLibrary": "미디어 라이브러리 선택",
|
||||
"filtersWithCount": "필터 (${count})",
|
||||
"noRecommendations": "추천 없음",
|
||||
"noCollections": "이 미디어 라이브러리에는 컬렉션이 없습니다",
|
||||
"noFoldersFound": "폴더를 찾을 수 없습니다",
|
||||
"folders": "폴더",
|
||||
"tabs": {
|
||||
"recommended": "추천",
|
||||
"browse": "찾아보기",
|
||||
"collections": "컬렉션",
|
||||
"playlists": "재생 목록"
|
||||
},
|
||||
"groupings": {
|
||||
"all": "전체",
|
||||
"movies": "영화",
|
||||
"shows": "TV 프로그램",
|
||||
"seasons": "시즌",
|
||||
"episodes": "화",
|
||||
"folders": "폴더"
|
||||
}
|
||||
},
|
||||
"about": {
|
||||
"title": "소개",
|
||||
"openSourceLicenses": "오픈소스 라이선스",
|
||||
"versionLabel": "버전 ${version}",
|
||||
"appDescription": "아름다운 Flutter Plex 클라이언트",
|
||||
"viewLicensesDescription": "타사 라이브러리 라이선스 보기"
|
||||
},
|
||||
"serverSelection": {
|
||||
"allServerConnectionsFailed": "어떤 서버에도 연결할 수 없습니다. 네트워크를 확인하고 다시 시도하세요.",
|
||||
"noServersFound": "서버를 찾을 수 없습니다.",
|
||||
"noServersFoundForAccount": "${username} (${email})의 서버를 찾을 수 없습니다.",
|
||||
"failedToLoadServers": "서버를 로드할 수 없습니다: ${error}"
|
||||
},
|
||||
"hubDetail": {
|
||||
"title": "제목",
|
||||
"releaseYear": "출시 연도",
|
||||
"dateAdded": "추가 날짜",
|
||||
"rating": "평점",
|
||||
"noItemsFound": "항목이 없습니다"
|
||||
},
|
||||
"logs": {
|
||||
"clearLogs": "로그 지우기",
|
||||
"copyLogs": "로그 복사",
|
||||
"error": "오류:",
|
||||
"stackTrace": "스택 추적 (Stack Trace):"
|
||||
},
|
||||
"licenses": {
|
||||
"relatedPackages": "관련 소프트웨어 패키지",
|
||||
"license": "라이선스",
|
||||
"licenseNumber": "라이선스 ${number}",
|
||||
"licensesCount": "${count} 개의 라이선스"
|
||||
},
|
||||
"navigation": {
|
||||
"home": "홈",
|
||||
"search": "검색",
|
||||
"libraries": "미디어 라이브러리",
|
||||
"settings": "설정",
|
||||
"downloads": "다운로드"
|
||||
},
|
||||
"collections": {
|
||||
"title": "컬렉션",
|
||||
"collection": "컬렉션",
|
||||
"empty": "컬렉션이 비어 있습니다",
|
||||
"unknownLibrarySection": "삭제할 수 없습니다: 알 수 없는 미디어 라이브러리 섹션입니다",
|
||||
"deleteCollection": "컬렉션 삭제",
|
||||
"deleteConfirm": "\"${title}\"을(를) 삭제 하시겠습니까? 이 작업은 되돌릴 수 없습니다.",
|
||||
"deleted": "컬렉션 삭제됨",
|
||||
"deleteFailed": "컬렉션 삭제 실패",
|
||||
"deleteFailedWithError": "컬렉션 삭제 실패: ${error}",
|
||||
"failedToLoadItems": "컬렉션 항목 로드 실패: ${error}",
|
||||
"selectCollection": "컬렉션 선택",
|
||||
"createNewCollection": "새 컬렉션 생성",
|
||||
"collectionName": "컬렉션 이름",
|
||||
"enterCollectionName": "컬렉션 이름 입력",
|
||||
"addedToCollection": "컬렉션에 추가됨",
|
||||
"errorAddingToCollection": "컬렉션에 추가 실패",
|
||||
"created": "컬렉션 생성됨",
|
||||
"removeFromCollection": "컬렉션에서 제거",
|
||||
"removeFromCollectionConfirm": "${title}을/를 이 컬렉션에서 제거 하시겠습니까?",
|
||||
"removedFromCollection": "컬렉션에서 제거됨",
|
||||
"removeFromCollectionFailed": "컬렉션에서 제거 실패",
|
||||
"removeFromCollectionError": "컬렉션에서 제거 중 오류 발생: ${error}"
|
||||
},
|
||||
"playlists": {
|
||||
"title": "플레이리스트",
|
||||
"playlist": "재생 목록",
|
||||
"noPlaylists": "재생 목록을 찾을 수 없습니다",
|
||||
"create": "재생 목록 생성",
|
||||
"playlistName": "재생 목록 이름",
|
||||
"enterPlaylistName": "재생 목록 이름 입력",
|
||||
"delete": "재생 목록 삭제",
|
||||
"removeItem": "재생 목록에서 항목 제거",
|
||||
"smartPlaylist": "스마트 재생 목록",
|
||||
"itemCount": "${count}개 항목",
|
||||
"oneItem": "1개 항목",
|
||||
"emptyPlaylist": "이 재생 목록은 비어 있습니다",
|
||||
"deleteConfirm": "재생 목록을 삭제 하시겠습니까?",
|
||||
"deleteMessage": "\"${name}\"을(를) 삭제 하시겠습니까?",
|
||||
"created": "재생 목록이 생성 되었습니다",
|
||||
"deleted": "재생 목록이 삭제 되었습니다",
|
||||
"itemAdded": "재생 목록에 추가 되었습니다",
|
||||
"itemRemoved": "재생 목록에서 제거됨",
|
||||
"selectPlaylist": "재생 목록 선택",
|
||||
"createNewPlaylist": "새 재생 목록 생성",
|
||||
"errorCreating": "재생 목록 생성 실패",
|
||||
"errorDeleting": "재생 목록 삭제 실패",
|
||||
"errorLoading": "재생 목록 로드 실패",
|
||||
"errorAdding": "재생 목록에 추가 실패",
|
||||
"errorReordering": "재생 목록 항목 재정렬 실패",
|
||||
"errorRemoving": "재생 목록에서 제거 실패"
|
||||
},
|
||||
"watchTogether": {
|
||||
"title": "함께 보기",
|
||||
"description": "친구 및 가족과 콘텐츠를 동시에 시청하세요",
|
||||
"createSession": "세션 생성",
|
||||
"creating": "생성 중...",
|
||||
"joinSession": "세션 참여",
|
||||
"joining": "참가 중...",
|
||||
"controlMode": "제어 모드",
|
||||
"controlModeQuestion": "누가 재생을 제어할 수 있나요?",
|
||||
"hostOnly": "호스트만",
|
||||
"anyone": "누구나",
|
||||
"hostingSession": "세션 호스팅",
|
||||
"inSession": "세션 중",
|
||||
"sessionCode": "세션 코드",
|
||||
"hostControlsPlayback": "호스트 재생 제어",
|
||||
"anyoneCanControl": "누구나 재생 제어 가능",
|
||||
"hostControls": "호스트 제어",
|
||||
"anyoneControls": "누구나 제어",
|
||||
"participants": "참가자",
|
||||
"host": "호스트",
|
||||
"hostBadge": "호스트",
|
||||
"youAreHost": "당신은 호스트 입니다",
|
||||
"watchingWithOthers": "다른 사람과 함께 시청 중",
|
||||
"endSession": "세션 종료",
|
||||
"leaveSession": "세션 탈퇴",
|
||||
"endSessionQuestion": "세션을 종료 하시겠습니까?",
|
||||
"leaveSessionQuestion": "세션을 탈퇴 하시겠습니까?",
|
||||
"endSessionConfirm": "이 작업은 모든 참가자의 세션을 종료합니다.",
|
||||
"leaveSessionConfirm": "당신은 세션에서 제거됩니다.",
|
||||
"endSessionConfirmOverlay": "이것은 모든 참가자의 시청 세션을 종료합니다.",
|
||||
"leaveSessionConfirmOverlay": "시청 세션 연결이 끊어집니다.",
|
||||
"end": "종료",
|
||||
"leave": "이탈",
|
||||
"syncing": "동기화 중...",
|
||||
"participant": "참여자",
|
||||
"joinWatchSession": "시청 세션에 참여",
|
||||
"enterCodeHint": "8자리 코드 입력",
|
||||
"pasteFromClipboard": "클립보드에서 붙여넣기",
|
||||
"pleaseEnterCode": "세션 코드를 입력하세요",
|
||||
"codeMustBe8Chars": "세션 코드는 반드시 8자리여야 합니다",
|
||||
"joinInstructions": "호스트가 공유한 세션 코드를 입력하여 시청 세션에 참여하세요.",
|
||||
"failedToCreate": "세션 생성 실패",
|
||||
"failedToJoin": "세션 참여 실패"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "다운로드",
|
||||
"manage": "관리",
|
||||
"tvShows": "TV 프로그램",
|
||||
"movies": "영화",
|
||||
"noDownloads": "다운로드 없음",
|
||||
"noDownloadsDescription": "다운로드한 콘텐츠는 오프라인 시청을 위해 여기에 표시됩니다",
|
||||
"downloadNow": "다운로드",
|
||||
"deleteDownload": "다운로드 삭제",
|
||||
"retryDownload": "다운로드 재시도",
|
||||
"downloadQueued": "다운로드 대기 중",
|
||||
"episodesQueued": "${count} 에피소드가 다운로드 대기열에 추가 되었습니다",
|
||||
"downloadDeleted": "다운로드 삭제됨",
|
||||
"deleteConfirm": "\"${title}\"를 삭제 하시겠습니까? 다운로드한 파일이 기기에서 삭제됩니다.",
|
||||
"deletingWithProgress": "${title} 삭제 중... (${current}/${total})"
|
||||
}
|
||||
}
|
||||
@@ -26,18 +26,11 @@
|
||||
"submit": "Verzenden",
|
||||
"confirm": "Bevestigen",
|
||||
"retry": "Opnieuw proberen",
|
||||
"playNow": "Nu afspelen",
|
||||
"logout": "Uitloggen",
|
||||
"online": "Online",
|
||||
"offline": "Offline",
|
||||
"owned": "Eigendom",
|
||||
"shared": "Gedeeld",
|
||||
"current": "HUIDIG",
|
||||
"unknown": "Onbekend",
|
||||
"refresh": "Vernieuwen",
|
||||
"yes": "Ja",
|
||||
"no": "Nee",
|
||||
"server": "Server",
|
||||
"delete": "Verwijderen",
|
||||
"shuffle": "Willekeurig",
|
||||
"addTo": "Toevoegen aan..."
|
||||
@@ -47,6 +40,7 @@
|
||||
"selectServer": "Selecteer server",
|
||||
"switchProfile": "Wissel van profiel",
|
||||
"subtitleStyling": "Ondertitel opmaak",
|
||||
"mpvConfig": "MPV-configuratie",
|
||||
"search": "Zoeken",
|
||||
"logs": "Logbestanden"
|
||||
},
|
||||
@@ -65,7 +59,6 @@
|
||||
"theme": "Thema",
|
||||
"appearance": "Uiterlijk",
|
||||
"videoPlayback": "Video afspelen",
|
||||
"shufflePlay": "Willekeurig afspelen",
|
||||
"advanced": "Geavanceerd",
|
||||
"useSeasonPostersDescription": "Toon seizoenposter in plaats van serieposter voor afleveringen",
|
||||
"showHeroSectionDescription": "Toon uitgelichte inhoud carrousel op startscherm",
|
||||
@@ -105,15 +98,11 @@
|
||||
"minutesUnit": "bij ${minutes} minuten",
|
||||
"rememberTrackSelections": "Onthoud track selecties per serie/film",
|
||||
"rememberTrackSelectionsDescription": "Bewaar automatisch audio- en ondertiteltaalvoorkeuren wanneer je tracks wijzigt tijdens afspelen",
|
||||
"unwatchedOnly": "Alleen ongekeken",
|
||||
"unwatchedOnlyDescription": "Alleen ongekeken afleveringen opnemen in willekeurige wachtrij",
|
||||
"shuffleOrderNavigation": "Willekeurige volgorde navigatie",
|
||||
"shuffleOrderNavigationDescription": "Volgende/vorige knoppen volgen willekeurige volgorde",
|
||||
"loopShuffleQueue": "Herhaal willekeurige wachtrij",
|
||||
"loopShuffleQueueDescription": "Start wachtrij opnieuw bij het einde",
|
||||
"videoPlayerControls": "Videospeler bediening",
|
||||
"keyboardShortcuts": "Toetsenbord sneltoetsen",
|
||||
"keyboardShortcutsDescription": "Pas toetsenbord sneltoetsen aan",
|
||||
"videoPlayerNavigation": "Videospeler navigatie",
|
||||
"videoPlayerNavigationDescription": "Gebruik pijltjestoetsen om door de videospeler bediening te navigeren",
|
||||
"debugLogging": "Debug logging",
|
||||
"debugLoggingDescription": "Schakel gedetailleerde logging in voor probleemoplossing",
|
||||
"viewLogs": "Bekijk logs",
|
||||
@@ -133,7 +122,34 @@
|
||||
"validationErrorEnterNumber": "Voer een geldig nummer in",
|
||||
"validationErrorDuration": "Duur moet tussen ${min} en ${max} ${unit} zijn",
|
||||
"shortcutAlreadyAssigned": "Sneltoets al toegewezen aan ${action}",
|
||||
"shortcutUpdated": "Sneltoets bijgewerkt voor ${action}"
|
||||
"shortcutUpdated": "Sneltoets bijgewerkt voor ${action}",
|
||||
"autoSkip": "Automatisch Overslaan",
|
||||
"autoSkipIntro": "Intro Automatisch Overslaan",
|
||||
"autoSkipIntroDescription": "Intro-markeringen na enkele seconden automatisch overslaan",
|
||||
"autoSkipCredits": "Credits Automatisch Overslaan",
|
||||
"autoSkipCreditsDescription": "Credits automatisch overslaan en volgende aflevering afspelen",
|
||||
"autoSkipDelay": "Vertraging Automatisch Overslaan",
|
||||
"autoSkipDelayDescription": "${seconds} seconden wachten voor automatisch overslaan",
|
||||
"downloads": "Downloads",
|
||||
"downloadLocationDescription": "Kies waar gedownloade content wordt opgeslagen",
|
||||
"downloadLocationDefault": "Standaard (App-opslag)",
|
||||
"downloadLocationCustom": "Aangepaste Locatie",
|
||||
"selectFolder": "Selecteer Map",
|
||||
"resetToDefault": "Herstel naar Standaard",
|
||||
"currentPath": "Huidig: ${path}",
|
||||
"downloadLocationChanged": "Downloadlocatie gewijzigd",
|
||||
"downloadLocationReset": "Downloadlocatie hersteld naar standaard",
|
||||
"downloadLocationInvalid": "Geselecteerde map is niet beschrijfbaar",
|
||||
"downloadLocationSelectError": "Kan map niet selecteren",
|
||||
"downloadOnWifiOnly": "Alleen via WiFi downloaden",
|
||||
"downloadOnWifiOnlyDescription": "Voorkom downloads bij gebruik van mobiele data",
|
||||
"cellularDownloadBlocked": "Downloads zijn uitgeschakeld bij mobiele data. Maak verbinding met WiFi of wijzig de instelling.",
|
||||
"maxVolume": "Maximaal volume",
|
||||
"maxVolumeDescription": "Volume boven 100% toestaan voor stille media",
|
||||
"maxVolumePercent": "${percent}%",
|
||||
"maxVolumeHint": "Voer maximaal volume in (100-300)",
|
||||
"discordRichPresence": "Discord Rich Presence",
|
||||
"discordRichPresenceDescription": "Toon op Discord wat je aan het kijken bent"
|
||||
},
|
||||
"search": {
|
||||
"hint": "Zoek films, series, muziek...",
|
||||
@@ -225,7 +241,6 @@
|
||||
"nextButton": "Volgende aflevering",
|
||||
"previousChapterButton": "Vorig hoofdstuk",
|
||||
"nextChapterButton": "Volgend hoofdstuk",
|
||||
"volumeButton": "Volume",
|
||||
"muteButton": "Dempen",
|
||||
"unmuteButton": "Dempen opheffen",
|
||||
"settingsButton": "Video-instellingen",
|
||||
@@ -236,6 +251,7 @@
|
||||
"aspectRatioButton": "Beeldverhouding",
|
||||
"fullscreenButton": "Volledig scherm activeren",
|
||||
"exitFullscreenButton": "Volledig scherm verlaten",
|
||||
"alwaysOnTopButton": "Altijd bovenop",
|
||||
"rotationLockButton": "Rotatievergrendeling",
|
||||
"timelineSlider": "Videotijdlijn",
|
||||
"volumeSlider": "Volumeniveau",
|
||||
@@ -250,6 +266,8 @@
|
||||
"messages": {
|
||||
"markedAsWatched": "Gemarkeerd als gekeken",
|
||||
"markedAsUnwatched": "Gemarkeerd als ongekeken",
|
||||
"markedAsWatchedOffline": "Gemarkeerd als gekeken (sync wanneer online)",
|
||||
"markedAsUnwatchedOffline": "Gemarkeerd als ongekeken (sync wanneer online)",
|
||||
"removedFromContinueWatching": "Verwijderd uit Doorgaan met kijken",
|
||||
"errorLoading": "Fout: ${error}",
|
||||
"fileInfoNotAvailable": "Bestand informatie niet beschikbaar",
|
||||
@@ -266,22 +284,17 @@
|
||||
"metadataRefreshing": "Metadata vernieuwen voor \"${title}\"...",
|
||||
"metadataRefreshStarted": "Metadata vernieuwen gestart voor \"${title}\"",
|
||||
"metadataRefreshFailed": "Kon metadata niet vernieuwen: ${error}",
|
||||
"noPlexToken": "Geen Plex token gevonden. Log opnieuw in.",
|
||||
"logoutConfirm": "Weet je zeker dat je wilt uitloggen?",
|
||||
"noSeasonsFound": "Geen seizoenen gevonden",
|
||||
"noEpisodesFound": "Geen afleveringen gevonden in eerste seizoen",
|
||||
"noEpisodesFoundGeneral": "Geen afleveringen gevonden",
|
||||
"noResultsFound": "Geen resultaten gevonden",
|
||||
"sleepTimerSet": "Slaap timer ingesteld voor ${label}",
|
||||
"failedToSwitchProfile": "Kon niet wisselen naar ${displayName}",
|
||||
"noItemsAvailable": "Geen items beschikbaar",
|
||||
"failedToCreatePlayQueue": "Kan afspeelwachtrij niet maken",
|
||||
"failedToCreatePlayQueueNoItems": "Kan afspeelwachtrij niet maken - geen items",
|
||||
"failedPlayback": "Afspelen van ${action} mislukt: ${error}"
|
||||
},
|
||||
"profile": {
|
||||
"noUsersAvailable": "Geen gebruikers beschikbaar"
|
||||
},
|
||||
"subtitlingStyling": {
|
||||
"stylingOptions": "Opmaak opties",
|
||||
"fontSize": "Lettergrootte",
|
||||
@@ -291,9 +304,34 @@
|
||||
"backgroundOpacity": "Achtergrond transparantie",
|
||||
"backgroundColor": "Achtergrondkleur"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "MPV-configuratie",
|
||||
"description": "Geavanceerde videospeler-instellingen",
|
||||
"properties": "Eigenschappen",
|
||||
"presets": "Voorinstellingen",
|
||||
"noProperties": "Geen eigenschappen geconfigureerd",
|
||||
"noPresets": "Geen opgeslagen voorinstellingen",
|
||||
"addProperty": "Eigenschap toevoegen",
|
||||
"editProperty": "Eigenschap bewerken",
|
||||
"deleteProperty": "Eigenschap verwijderen",
|
||||
"propertyKey": "Eigenschapssleutel",
|
||||
"propertyKeyHint": "bijv. hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "Eigenschapswaarde",
|
||||
"propertyValueHint": "bijv. auto, 256000000",
|
||||
"saveAsPreset": "Opslaan als voorinstelling...",
|
||||
"presetName": "Naam voorinstelling",
|
||||
"presetNameHint": "Voer een naam in voor deze voorinstelling",
|
||||
"loadPreset": "Laden",
|
||||
"deletePreset": "Verwijderen",
|
||||
"presetSaved": "Voorinstelling opgeslagen",
|
||||
"presetLoaded": "Voorinstelling geladen",
|
||||
"presetDeleted": "Voorinstelling verwijderd",
|
||||
"confirmDeletePreset": "Weet je zeker dat je deze voorinstelling wilt verwijderen?",
|
||||
"confirmDeleteProperty": "Weet je zeker dat je deze eigenschap wilt verwijderen?",
|
||||
"entriesCount": "${count} items"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "Bevestig actie",
|
||||
"areYouSure": "Weet je zeker dat je deze actie wilt uitvoeren?",
|
||||
"cancel": "Annuleren",
|
||||
"playNow": "Nu afspelen"
|
||||
},
|
||||
@@ -305,11 +343,8 @@
|
||||
"noContentAvailable": "Geen inhoud beschikbaar",
|
||||
"addMediaToLibraries": "Voeg wat media toe aan je bibliotheken",
|
||||
"continueWatching": "Verder kijken",
|
||||
"recentlyAdded": "Recent toegevoegd",
|
||||
"play": "Afspelen",
|
||||
"resume": "Hervatten",
|
||||
"playEpisode": "Speel S${season}, E${episode}",
|
||||
"resumeEpisode": "Hervat S${season}, E${episode}",
|
||||
"playEpisode": "S${season}E${episode}",
|
||||
"pause": "Pauzeren",
|
||||
"overview": "Overzicht",
|
||||
"cast": "Acteurs",
|
||||
@@ -334,8 +369,7 @@
|
||||
"pleaseEnterToken": "Voer een token in",
|
||||
"invalidToken": "Ongeldig token",
|
||||
"failedToVerifyToken": "Kon token niet verifiëren: ${error}",
|
||||
"failedToSwitchProfile": "Kon niet wisselen naar ${displayName}",
|
||||
"connectionFailedGeneric": "Verbinding mislukt"
|
||||
"failedToSwitchProfile": "Kon niet wisselen naar ${displayName}"
|
||||
},
|
||||
"libraries": {
|
||||
"title": "Bibliotheken",
|
||||
@@ -363,7 +397,6 @@
|
||||
"sort": "Sorteren",
|
||||
"sortBy": "Sorteer op",
|
||||
"filters": "Filters",
|
||||
"loadingLibraryWithCount": "Bibliotheek laden... (${count} items geladen)",
|
||||
"confirmActionMessage": "Weet je zeker dat je deze actie wilt uitvoeren?",
|
||||
"showLibrary": "Toon bibliotheek",
|
||||
"hideLibrary": "Verberg bibliotheek",
|
||||
@@ -398,22 +431,9 @@
|
||||
"viewLicensesDescription": "Bekijk licenties van third-party bibliotheken"
|
||||
},
|
||||
"serverSelection": {
|
||||
"connectingToServer": "Verbinden met server...",
|
||||
"connectingToAllServers": "Verbinden met alle servers...",
|
||||
"connectToAllServers": "Verbind met alle servers",
|
||||
"allServerConnectionsFailed": "Kon niet verbinden met servers. Controleer je netwerk en probeer opnieuw.",
|
||||
"foundServers": "${count} server(s) gevonden",
|
||||
"orSelectIndividually": "Of selecteer een server individueel:",
|
||||
"serverDebugCopied": "Server debug gegevens gekopieerd naar klembord",
|
||||
"copyDebugData": "Kopieer debug gegevens",
|
||||
"noServersFound": "Geen servers gevonden",
|
||||
"malformedServerData": "${count} server(s) gevonden met verkeerde data. Geen geldige servers beschikbaar.",
|
||||
"incompleteServerInfo": "Sommige servers hebben incomplete informatie en zijn overgeslagen. Controleer je Plex.tv account.",
|
||||
"incompleteConnectionInfo": "Server verbinding informatie is incompleet. Probeer opnieuw.",
|
||||
"malformedServerInfo": "Server informatie is verkeerd geformatteerd: ${message}",
|
||||
"networkConnectionFailed": "Netwerkverbinding mislukt. Controleer je internetverbinding en probeer opnieuw.",
|
||||
"authenticationFailed": "Authenticatie mislukt. Log opnieuw in.",
|
||||
"plexServiceUnavailable": "Plex service niet beschikbaar. Probeer later opnieuw.",
|
||||
"noServersFoundForAccount": "Geen servers gevonden voor ${username} (${email})",
|
||||
"failedToLoadServers": "Kon servers niet laden: ${error}"
|
||||
},
|
||||
"hubDetail": {
|
||||
@@ -424,11 +444,8 @@
|
||||
"noItemsFound": "Geen items gevonden"
|
||||
},
|
||||
"logs": {
|
||||
"title": "Logbestanden",
|
||||
"clearLogs": "Wis logs",
|
||||
"copyLogs": "Kopieer logs",
|
||||
"exportLogs": "Exporteer logs",
|
||||
"noLogsToShow": "Geen logs om te tonen",
|
||||
"error": "Fout:",
|
||||
"stackTrace": "Stacktracering:"
|
||||
},
|
||||
@@ -442,32 +459,40 @@
|
||||
"home": "Thuis",
|
||||
"search": "Zoeken",
|
||||
"libraries": "Bibliotheken",
|
||||
"settings": "Instellingen"
|
||||
"settings": "Instellingen",
|
||||
"downloads": "Downloads"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "Downloads",
|
||||
"manage": "Beheren",
|
||||
"tvShows": "Series",
|
||||
"movies": "Films",
|
||||
"noDownloads": "Nog geen downloads",
|
||||
"noDownloadsDescription": "Gedownloade content verschijnt hier voor offline weergave",
|
||||
"downloadNow": "Download",
|
||||
"deleteDownload": "Download verwijderen",
|
||||
"retryDownload": "Download opnieuw proberen",
|
||||
"downloadQueued": "Download in wachtrij",
|
||||
"episodesQueued": "${count} afleveringen in wachtrij voor download",
|
||||
"downloadDeleted": "Download verwijderd",
|
||||
"deleteConfirm": "Weet je zeker dat je \"${title}\" wilt verwijderen? Het gedownloade bestand wordt van je apparaat verwijderd.",
|
||||
"deletingWithProgress": "Verwijderen van ${title}... (${current} van ${total})"
|
||||
},
|
||||
"playlists": {
|
||||
"title": "Afspeellijsten",
|
||||
"noPlaylists": "Geen afspeellijsten gevonden",
|
||||
"create": "Afspeellijst maken",
|
||||
"newPlaylist": "Nieuwe afspeellijst",
|
||||
"playlistName": "Naam afspeellijst",
|
||||
"enterPlaylistName": "Voer naam afspeellijst in",
|
||||
"edit": "Afspeellijst bewerken",
|
||||
"delete": "Afspeellijst verwijderen",
|
||||
"addTo": "Toevoegen aan afspeellijst",
|
||||
"addItems": "Items toevoegen",
|
||||
"removeItem": "Verwijderen uit afspeellijst",
|
||||
"clearPlaylist": "Afspeellijst wissen",
|
||||
"playAll": "Alles afspelen",
|
||||
"shuffle": "Willekeurig",
|
||||
"smartPlaylist": "Slimme afspeellijst",
|
||||
"regularPlaylist": "Normale afspeellijst",
|
||||
"itemCount": "${count} items",
|
||||
"oneItem": "1 item",
|
||||
"emptyPlaylist": "Deze afspeellijst is leeg",
|
||||
"deleteConfirm": "Afspeellijst verwijderen?",
|
||||
"deleteMessage": "Weet je zeker dat je \"${name}\" wilt verwijderen?",
|
||||
"created": "Afspeellijst gemaakt",
|
||||
"updated": "Afspeellijst bijgewerkt",
|
||||
"deleted": "Afspeellijst verwijderd",
|
||||
"itemAdded": "Toegevoegd aan afspeellijst",
|
||||
"itemRemoved": "Verwijderd uit afspeellijst",
|
||||
@@ -485,7 +510,6 @@
|
||||
"title": "Collecties",
|
||||
"collection": "Collectie",
|
||||
"empty": "Collectie is leeg",
|
||||
"noItems": "Geen items in deze collectie",
|
||||
"unknownLibrarySection": "Kan niet verwijderen: onbekende bibliotheeksectie",
|
||||
"deleteCollection": "Collectie verwijderen",
|
||||
"deleteConfirm": "Weet je zeker dat je \"${title}\" wilt verwijderen? Deze actie kan niet ongedaan worden gemaakt.",
|
||||
@@ -493,7 +517,6 @@
|
||||
"deleteFailed": "Collectie verwijderen mislukt",
|
||||
"deleteFailedWithError": "Collectie verwijderen mislukt: ${error}",
|
||||
"failedToLoadItems": "Collectie-items laden mislukt: ${error}",
|
||||
"addTo": "Toevoegen aan collectie",
|
||||
"selectCollection": "Selecteer collectie",
|
||||
"createNewCollection": "Nieuwe collectie maken",
|
||||
"collectionName": "Collectienaam",
|
||||
@@ -506,5 +529,49 @@
|
||||
"removedFromCollection": "Uit collectie verwijderd",
|
||||
"removeFromCollectionFailed": "Verwijderen uit collectie mislukt",
|
||||
"removeFromCollectionError": "Fout bij verwijderen uit collectie: ${error}"
|
||||
},
|
||||
"watchTogether": {
|
||||
"title": "Samen Kijken",
|
||||
"description": "Kijk synchroon met vrienden en familie",
|
||||
"createSession": "Sessie Maken",
|
||||
"creating": "Maken...",
|
||||
"joinSession": "Sessie Deelnemen",
|
||||
"joining": "Deelnemen...",
|
||||
"controlMode": "Controlemodus",
|
||||
"controlModeQuestion": "Wie kan het afspelen bedienen?",
|
||||
"hostOnly": "Alleen Host",
|
||||
"anyone": "Iedereen",
|
||||
"hostingSession": "Sessie Hosten",
|
||||
"inSession": "In Sessie",
|
||||
"sessionCode": "Sessiecode",
|
||||
"hostControlsPlayback": "Host bedient het afspelen",
|
||||
"anyoneCanControl": "Iedereen kan het afspelen bedienen",
|
||||
"hostControls": "Host bedient",
|
||||
"anyoneControls": "Iedereen bedient",
|
||||
"participants": "Deelnemers",
|
||||
"host": "Host",
|
||||
"hostBadge": "HOST",
|
||||
"youAreHost": "Jij bent de host",
|
||||
"watchingWithOthers": "Kijken met anderen",
|
||||
"endSession": "Sessie Beëindigen",
|
||||
"leaveSession": "Sessie Verlaten",
|
||||
"endSessionQuestion": "Sessie Beëindigen?",
|
||||
"leaveSessionQuestion": "Sessie Verlaten?",
|
||||
"endSessionConfirm": "Dit beëindigt de sessie voor alle deelnemers.",
|
||||
"leaveSessionConfirm": "Je wordt uit de sessie verwijderd.",
|
||||
"endSessionConfirmOverlay": "Dit beëindigt de kijksessie voor alle deelnemers.",
|
||||
"leaveSessionConfirmOverlay": "Je wordt losgekoppeld van de kijksessie.",
|
||||
"end": "Beëindigen",
|
||||
"leave": "Verlaten",
|
||||
"syncing": "Synchroniseren...",
|
||||
"participant": "deelnemer",
|
||||
"joinWatchSession": "Kijksessie Deelnemen",
|
||||
"enterCodeHint": "Voer 8-teken code in",
|
||||
"pasteFromClipboard": "Plakken van klembord",
|
||||
"pleaseEnterCode": "Voer een sessiecode in",
|
||||
"codeMustBe8Chars": "Sessiecode moet 8 tekens zijn",
|
||||
"joinInstructions": "Voer de sessiecode in die door de host is gedeeld om deel te nemen aan hun kijksessie.",
|
||||
"failedToCreate": "Sessie maken mislukt",
|
||||
"failedToJoin": "Sessie deelnemen mislukt"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,18 +26,11 @@
|
||||
"submit": "Skicka",
|
||||
"confirm": "Bekräfta",
|
||||
"retry": "Försök igen",
|
||||
"playNow": "Spela nu",
|
||||
"logout": "Logga ut",
|
||||
"online": "Online",
|
||||
"offline": "Offline",
|
||||
"owned": "Egen",
|
||||
"shared": "Delad",
|
||||
"current": "NUVARANDE",
|
||||
"unknown": "Okänd",
|
||||
"refresh": "Uppdatera",
|
||||
"yes": "Ja",
|
||||
"no": "Nej",
|
||||
"server": "Server",
|
||||
"delete": "Ta bort",
|
||||
"shuffle": "Blanda",
|
||||
"addTo": "Lägg till i..."
|
||||
@@ -47,6 +40,7 @@
|
||||
"selectServer": "Välj server",
|
||||
"switchProfile": "Byt profil",
|
||||
"subtitleStyling": "Undertext-styling",
|
||||
"mpvConfig": "MPV-konfiguration",
|
||||
"search": "Sök",
|
||||
"logs": "Loggar"
|
||||
},
|
||||
@@ -65,7 +59,6 @@
|
||||
"theme": "Tema",
|
||||
"appearance": "Utseende",
|
||||
"videoPlayback": "Videouppspelning",
|
||||
"shufflePlay": "Blanda uppspelning",
|
||||
"advanced": "Avancerat",
|
||||
"useSeasonPostersDescription": "Visa säsongsaffisch istället för serieaffisch för avsnitt",
|
||||
"showHeroSectionDescription": "Visa utvalda innehållskarusell på startsidan",
|
||||
@@ -105,15 +98,11 @@
|
||||
"minutesUnit": "${minutes} minuter",
|
||||
"rememberTrackSelections": "Kom ihåg spårval per serie/film",
|
||||
"rememberTrackSelectionsDescription": "Spara automatiskt ljud- och undertextspråkpreferenser när du ändrar spår under uppspelning",
|
||||
"unwatchedOnly": "Endast osedda",
|
||||
"unwatchedOnlyDescription": "Inkludera endast osedda avsnitt i blandningskön",
|
||||
"shuffleOrderNavigation": "Blandningsordning-navigation",
|
||||
"shuffleOrderNavigationDescription": "Nästa/föregående knappar följer blandad ordning",
|
||||
"loopShuffleQueue": "Loopa blandningskö",
|
||||
"loopShuffleQueueDescription": "Starta om kö när slutet nås",
|
||||
"videoPlayerControls": "Videospelar-kontroller",
|
||||
"keyboardShortcuts": "Tangentbordsgenvägar",
|
||||
"keyboardShortcutsDescription": "Anpassa tangentbordsgenvägar",
|
||||
"videoPlayerNavigation": "Navigering i videospelaren",
|
||||
"videoPlayerNavigationDescription": "Använd piltangenter för att navigera videospelarens kontroller",
|
||||
"debugLogging": "Felsökningsloggning",
|
||||
"debugLoggingDescription": "Aktivera detaljerad loggning för felsökning",
|
||||
"viewLogs": "Visa loggar",
|
||||
@@ -133,7 +122,34 @@
|
||||
"validationErrorEnterNumber": "Vänligen ange ett giltigt nummer",
|
||||
"validationErrorDuration": "Tiden måste vara mellan ${min} och ${max} ${unit}",
|
||||
"shortcutAlreadyAssigned": "Genväg redan tilldelad ${action}",
|
||||
"shortcutUpdated": "Genväg uppdaterad för ${action}"
|
||||
"shortcutUpdated": "Genväg uppdaterad för ${action}",
|
||||
"autoSkip": "Auto Hoppa Över",
|
||||
"autoSkipIntro": "Hoppa Över Intro Automatiskt",
|
||||
"autoSkipIntroDescription": "Hoppa automatiskt över intro-markörer efter några sekunder",
|
||||
"autoSkipCredits": "Hoppa Över Credits Automatiskt",
|
||||
"autoSkipCreditsDescription": "Hoppa automatiskt över credits och spela nästa avsnitt",
|
||||
"autoSkipDelay": "Fördröjning Auto Hoppa Över",
|
||||
"autoSkipDelayDescription": "Vänta ${seconds} sekunder innan automatisk överhoppning",
|
||||
"downloads": "Nedladdningar",
|
||||
"downloadLocationDescription": "Välj var nedladdat innehåll ska lagras",
|
||||
"downloadLocationDefault": "Standard (App-lagring)",
|
||||
"downloadLocationCustom": "Anpassad Plats",
|
||||
"selectFolder": "Välj Mapp",
|
||||
"resetToDefault": "Återställ till Standard",
|
||||
"currentPath": "Nuvarande: ${path}",
|
||||
"downloadLocationChanged": "Nedladdningsplats ändrad",
|
||||
"downloadLocationReset": "Nedladdningsplats återställd till standard",
|
||||
"downloadLocationInvalid": "Vald mapp är inte skrivbar",
|
||||
"downloadLocationSelectError": "Kunde inte välja mapp",
|
||||
"downloadOnWifiOnly": "Ladda ner endast på WiFi",
|
||||
"downloadOnWifiOnlyDescription": "Förhindra nedladdningar vid användning av mobildata",
|
||||
"cellularDownloadBlocked": "Nedladdningar är inaktiverade på mobildata. Anslut till WiFi eller ändra inställningen.",
|
||||
"maxVolume": "Maximal volym",
|
||||
"maxVolumeDescription": "Tillåt volym över 100% för tyst media",
|
||||
"maxVolumePercent": "${percent}%",
|
||||
"maxVolumeHint": "Ange maximal volym (100-300)",
|
||||
"discordRichPresence": "Discord Rich Presence",
|
||||
"discordRichPresenceDescription": "Visa vad du tittar på i Discord"
|
||||
},
|
||||
"search": {
|
||||
"hint": "Sök filmer, serier, musik...",
|
||||
@@ -225,7 +241,6 @@
|
||||
"nextButton": "Nästa avsnitt",
|
||||
"previousChapterButton": "Föregående kapitel",
|
||||
"nextChapterButton": "Nästa kapitel",
|
||||
"volumeButton": "Volym",
|
||||
"muteButton": "Tysta",
|
||||
"unmuteButton": "Slå på ljud",
|
||||
"settingsButton": "Videoinställningar",
|
||||
@@ -236,6 +251,7 @@
|
||||
"aspectRatioButton": "Bildförhållande",
|
||||
"fullscreenButton": "Aktivera helskärm",
|
||||
"exitFullscreenButton": "Avsluta helskärm",
|
||||
"alwaysOnTopButton": "Alltid överst",
|
||||
"rotationLockButton": "Rotationslås",
|
||||
"timelineSlider": "Videotidslinje",
|
||||
"volumeSlider": "Volymnivå",
|
||||
@@ -250,6 +266,8 @@
|
||||
"messages": {
|
||||
"markedAsWatched": "Markerad som sedd",
|
||||
"markedAsUnwatched": "Markerad som osedd",
|
||||
"markedAsWatchedOffline": "Markerad som sedd (synkroniseras när online)",
|
||||
"markedAsUnwatchedOffline": "Markerad som osedd (synkroniseras när online)",
|
||||
"removedFromContinueWatching": "Borttagen från Fortsätt titta",
|
||||
"errorLoading": "Fel: ${error}",
|
||||
"fileInfoNotAvailable": "Filinformation inte tillgänglig",
|
||||
@@ -266,22 +284,17 @@
|
||||
"metadataRefreshing": "Uppdaterar metadata för \"${title}\"...",
|
||||
"metadataRefreshStarted": "Metadata-uppdatering startad för \"${title}\"",
|
||||
"metadataRefreshFailed": "Misslyckades att uppdatera metadata: ${error}",
|
||||
"noPlexToken": "Ingen Plex-token hittad. Vänligen logga in igen.",
|
||||
"logoutConfirm": "Är du säker på att du vill logga ut?",
|
||||
"noSeasonsFound": "Inga säsonger hittades",
|
||||
"noEpisodesFound": "Inga avsnitt hittades i första säsongen",
|
||||
"noEpisodesFoundGeneral": "Inga avsnitt hittades",
|
||||
"noResultsFound": "Inga resultat hittades",
|
||||
"sleepTimerSet": "Sovtimer inställd för ${label}",
|
||||
"failedToSwitchProfile": "Misslyckades att byta till ${displayName}",
|
||||
"noItemsAvailable": "Inga objekt tillgängliga",
|
||||
"failedToCreatePlayQueue": "Det gick inte att skapa uppspelningskö",
|
||||
"failedToCreatePlayQueueNoItems": "Det gick inte att skapa uppspelningskö – inga objekt",
|
||||
"failedPlayback": "Kunde inte ${action}: ${error}"
|
||||
},
|
||||
"profile": {
|
||||
"noUsersAvailable": "Inga användare tillgängliga"
|
||||
},
|
||||
"subtitlingStyling": {
|
||||
"stylingOptions": "Stilalternativ",
|
||||
"fontSize": "Teckenstorlek",
|
||||
@@ -291,9 +304,34 @@
|
||||
"backgroundOpacity": "Bakgrundsopacitet",
|
||||
"backgroundColor": "Bakgrundsfärg"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "MPV-konfiguration",
|
||||
"description": "Avancerade videospelares inställningar",
|
||||
"properties": "Egenskaper",
|
||||
"presets": "Förval",
|
||||
"noProperties": "Inga egenskaper konfigurerade",
|
||||
"noPresets": "Inga sparade förval",
|
||||
"addProperty": "Lägg till egenskap",
|
||||
"editProperty": "Redigera egenskap",
|
||||
"deleteProperty": "Ta bort egenskap",
|
||||
"propertyKey": "Egenskapsnyckel",
|
||||
"propertyKeyHint": "t.ex. hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "Egenskapsvärde",
|
||||
"propertyValueHint": "t.ex. auto, 256000000",
|
||||
"saveAsPreset": "Spara som förval...",
|
||||
"presetName": "Förvalnamn",
|
||||
"presetNameHint": "Ange ett namn för detta förval",
|
||||
"loadPreset": "Ladda",
|
||||
"deletePreset": "Ta bort",
|
||||
"presetSaved": "Förval sparat",
|
||||
"presetLoaded": "Förval laddat",
|
||||
"presetDeleted": "Förval borttaget",
|
||||
"confirmDeletePreset": "Är du säker på att du vill ta bort detta förval?",
|
||||
"confirmDeleteProperty": "Är du säker på att du vill ta bort denna egenskap?",
|
||||
"entriesCount": "${count} poster"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "Bekräfta åtgärd",
|
||||
"areYouSure": "Är du säker på att du vill utföra denna åtgärd?",
|
||||
"cancel": "Avbryt",
|
||||
"playNow": "Spela nu"
|
||||
},
|
||||
@@ -305,11 +343,8 @@
|
||||
"noContentAvailable": "Inget innehåll tillgängligt",
|
||||
"addMediaToLibraries": "Lägg till media till dina bibliotek",
|
||||
"continueWatching": "Fortsätt titta",
|
||||
"recentlyAdded": "Nyligen tillagda",
|
||||
"play": "Spela",
|
||||
"resume": "Återuppta",
|
||||
"playEpisode": "Spela S${season}, E${episode}",
|
||||
"resumeEpisode": "Återuppta S${season}, E${episode}",
|
||||
"playEpisode": "S${season}E${episode}",
|
||||
"pause": "Pausa",
|
||||
"overview": "Översikt",
|
||||
"cast": "Rollbesättning",
|
||||
@@ -334,8 +369,7 @@
|
||||
"pleaseEnterToken": "Vänligen ange en token",
|
||||
"invalidToken": "Ogiltig token",
|
||||
"failedToVerifyToken": "Misslyckades att verifiera token: ${error}",
|
||||
"failedToSwitchProfile": "Misslyckades att byta till ${displayName}",
|
||||
"connectionFailedGeneric": "Anslutning misslyckades"
|
||||
"failedToSwitchProfile": "Misslyckades att byta till ${displayName}"
|
||||
},
|
||||
"libraries": {
|
||||
"title": "Bibliotek",
|
||||
@@ -363,7 +397,6 @@
|
||||
"sort": "Sortera",
|
||||
"sortBy": "Sortera efter",
|
||||
"filters": "Filter",
|
||||
"loadingLibraryWithCount": "Laddar bibliotek... (${count} objekt laddade)",
|
||||
"confirmActionMessage": "Är du säker på att du vill utföra denna åtgärd?",
|
||||
"showLibrary": "Visa bibliotek",
|
||||
"hideLibrary": "Dölj bibliotek",
|
||||
@@ -398,22 +431,9 @@
|
||||
"viewLicensesDescription": "Visa licenser för tredjepartsbibliotek"
|
||||
},
|
||||
"serverSelection": {
|
||||
"connectingToServer": "Ansluter till server...",
|
||||
"connectingToAllServers": "Ansluter till alla servrar...",
|
||||
"connectToAllServers": "Anslut till alla servrar",
|
||||
"allServerConnectionsFailed": "Misslyckades att ansluta till servrar. Kontrollera ditt nätverk och försök igen.",
|
||||
"foundServers": "Hittade ${count} server(ar)",
|
||||
"orSelectIndividually": "Eller välj en server individuellt:",
|
||||
"serverDebugCopied": "Server-felsökningsdata kopierad till urklipp",
|
||||
"copyDebugData": "Kopiera felsökningsdata",
|
||||
"noServersFound": "Inga servrar hittades",
|
||||
"malformedServerData": "Hittade ${count} server(ar) med felformaterad data. Inga giltiga servrar tillgängliga.",
|
||||
"incompleteServerInfo": "Vissa servrar har ofullständig information och hoppades över. Vänligen kontrollera ditt Plex.tv-konto.",
|
||||
"incompleteConnectionInfo": "Server-anslutningsinformation är ofullständig. Försök igen.",
|
||||
"malformedServerInfo": "Serverinformation är felformaterad: ${message}",
|
||||
"networkConnectionFailed": "Nätverksanslutning misslyckades. Kontrollera din internetanslutning och försök igen.",
|
||||
"authenticationFailed": "Autentisering misslyckades. Logga in igen.",
|
||||
"plexServiceUnavailable": "Plex-tjänst otillgänglig. Försök igen senare.",
|
||||
"noServersFoundForAccount": "Inga servrar hittades för ${username} (${email})",
|
||||
"failedToLoadServers": "Misslyckades att ladda servrar: ${error}"
|
||||
},
|
||||
"hubDetail": {
|
||||
@@ -424,11 +444,8 @@
|
||||
"noItemsFound": "Inga objekt hittades"
|
||||
},
|
||||
"logs": {
|
||||
"title": "Loggar",
|
||||
"clearLogs": "Rensa loggar",
|
||||
"copyLogs": "Kopiera loggar",
|
||||
"exportLogs": "Exportera loggar",
|
||||
"noLogsToShow": "Inga loggar att visa",
|
||||
"error": "Fel:",
|
||||
"stackTrace": "Stack trace:"
|
||||
},
|
||||
@@ -442,32 +459,40 @@
|
||||
"home": "Hem",
|
||||
"search": "Sök",
|
||||
"libraries": "Bibliotek",
|
||||
"settings": "Inställningar"
|
||||
"settings": "Inställningar",
|
||||
"downloads": "Nedladdningar"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "Nedladdningar",
|
||||
"manage": "Hantera",
|
||||
"tvShows": "TV-serier",
|
||||
"movies": "Filmer",
|
||||
"noDownloads": "Inga nedladdningar ännu",
|
||||
"noDownloadsDescription": "Nedladdat innehåll visas här för offline-visning",
|
||||
"downloadNow": "Ladda ner",
|
||||
"deleteDownload": "Ta bort nedladdning",
|
||||
"retryDownload": "Försök igen",
|
||||
"downloadQueued": "Nedladdning köad",
|
||||
"episodesQueued": "${count} avsnitt köade för nedladdning",
|
||||
"downloadDeleted": "Nedladdning borttagen",
|
||||
"deleteConfirm": "Är du säker på att du vill ta bort \"${title}\"? Den nedladdade filen kommer att tas bort från din enhet.",
|
||||
"deletingWithProgress": "Tar bort ${title}... (${current} av ${total})"
|
||||
},
|
||||
"playlists": {
|
||||
"title": "Spellistor",
|
||||
"noPlaylists": "Inga spellistor hittades",
|
||||
"create": "Skapa spellista",
|
||||
"newPlaylist": "Ny spellista",
|
||||
"playlistName": "Spellistans namn",
|
||||
"enterPlaylistName": "Ange spellistans namn",
|
||||
"edit": "Redigera spellista",
|
||||
"delete": "Ta bort spellista",
|
||||
"addTo": "Lägg till i spellista",
|
||||
"addItems": "Lägg till objekt",
|
||||
"removeItem": "Ta bort från spellista",
|
||||
"clearPlaylist": "Rensa spellista",
|
||||
"playAll": "Spela alla",
|
||||
"shuffle": "Blanda",
|
||||
"smartPlaylist": "Smart spellista",
|
||||
"regularPlaylist": "Vanlig spellista",
|
||||
"itemCount": "${count} objekt",
|
||||
"oneItem": "1 objekt",
|
||||
"emptyPlaylist": "Denna spellista är tom",
|
||||
"deleteConfirm": "Ta bort spellista?",
|
||||
"deleteMessage": "Är du säker på att du vill ta bort \"${name}\"?",
|
||||
"created": "Spellista skapad",
|
||||
"updated": "Spellista uppdaterad",
|
||||
"deleted": "Spellista borttagen",
|
||||
"itemAdded": "Tillagd i spellista",
|
||||
"itemRemoved": "Borttagen från spellista",
|
||||
@@ -485,7 +510,6 @@
|
||||
"title": "Samlingar",
|
||||
"collection": "Samling",
|
||||
"empty": "Samlingen är tom",
|
||||
"noItems": "Inga objekt i den här samlingen",
|
||||
"unknownLibrarySection": "Kan inte ta bort: okänd bibliotekssektion",
|
||||
"deleteCollection": "Ta bort samling",
|
||||
"deleteConfirm": "Är du säker på att du vill ta bort \"${title}\"? Detta går inte att ångra.",
|
||||
@@ -493,7 +517,6 @@
|
||||
"deleteFailed": "Det gick inte att ta bort samlingen",
|
||||
"deleteFailedWithError": "Det gick inte att ta bort samlingen: ${error}",
|
||||
"failedToLoadItems": "Det gick inte att läsa in samlingsobjekt: ${error}",
|
||||
"addTo": "Lägg till i samling",
|
||||
"selectCollection": "Välj samling",
|
||||
"createNewCollection": "Skapa ny samling",
|
||||
"collectionName": "Samlingsnamn",
|
||||
@@ -506,5 +529,49 @@
|
||||
"removedFromCollection": "Borttagen från samling",
|
||||
"removeFromCollectionFailed": "Misslyckades med att ta bort från samling",
|
||||
"removeFromCollectionError": "Fel vid borttagning från samling: ${error}"
|
||||
},
|
||||
"watchTogether": {
|
||||
"title": "Titta Tillsammans",
|
||||
"description": "Titta på innehåll synkroniserat med vänner och familj",
|
||||
"createSession": "Skapa Session",
|
||||
"creating": "Skapar...",
|
||||
"joinSession": "Gå med i Session",
|
||||
"joining": "Ansluter...",
|
||||
"controlMode": "Kontrollläge",
|
||||
"controlModeQuestion": "Vem kan styra uppspelningen?",
|
||||
"hostOnly": "Endast Värd",
|
||||
"anyone": "Alla",
|
||||
"hostingSession": "Värd för Session",
|
||||
"inSession": "I Session",
|
||||
"sessionCode": "Sessionskod",
|
||||
"hostControlsPlayback": "Värden styr uppspelningen",
|
||||
"anyoneCanControl": "Alla kan styra uppspelningen",
|
||||
"hostControls": "Värd styr",
|
||||
"anyoneControls": "Alla styr",
|
||||
"participants": "Deltagare",
|
||||
"host": "Värd",
|
||||
"hostBadge": "VÄRD",
|
||||
"youAreHost": "Du är värden",
|
||||
"watchingWithOthers": "Tittar med andra",
|
||||
"endSession": "Avsluta Session",
|
||||
"leaveSession": "Lämna Session",
|
||||
"endSessionQuestion": "Avsluta Session?",
|
||||
"leaveSessionQuestion": "Lämna Session?",
|
||||
"endSessionConfirm": "Detta avslutar sessionen för alla deltagare.",
|
||||
"leaveSessionConfirm": "Du kommer att tas bort från sessionen.",
|
||||
"endSessionConfirmOverlay": "Detta avslutar tittarsessionen för alla deltagare.",
|
||||
"leaveSessionConfirmOverlay": "Du kommer att kopplas bort från tittarsessionen.",
|
||||
"end": "Avsluta",
|
||||
"leave": "Lämna",
|
||||
"syncing": "Synkroniserar...",
|
||||
"participant": "deltagare",
|
||||
"joinWatchSession": "Gå med i Tittarsession",
|
||||
"enterCodeHint": "Ange 8-teckens kod",
|
||||
"pasteFromClipboard": "Klistra in från urklipp",
|
||||
"pleaseEnterCode": "Vänligen ange en sessionskod",
|
||||
"codeMustBe8Chars": "Sessionskod måste vara 8 tecken",
|
||||
"joinInstructions": "Ange sessionskoden som delats av värden för att gå med i deras tittarsession.",
|
||||
"failedToCreate": "Det gick inte att skapa session",
|
||||
"failedToJoin": "Det gick inte att gå med i session"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,18 +26,11 @@
|
||||
"submit": "提交",
|
||||
"confirm": "确认",
|
||||
"retry": "重试",
|
||||
"playNow": "立即播放",
|
||||
"logout": "登出",
|
||||
"online": "在线",
|
||||
"offline": "离线",
|
||||
"owned": "拥有",
|
||||
"shared": "共享",
|
||||
"current": "当前",
|
||||
"unknown": "未知",
|
||||
"refresh": "刷新",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"server": "服务器",
|
||||
"delete": "删除",
|
||||
"shuffle": "随机播放",
|
||||
"addTo": "添加到..."
|
||||
@@ -45,8 +38,9 @@
|
||||
"screens": {
|
||||
"licenses": "许可证",
|
||||
"selectServer": "选择服务器",
|
||||
"switchProfile": "切换配置文件",
|
||||
"switchProfile": "切换用户",
|
||||
"subtitleStyling": "字幕样式",
|
||||
"mpvConfig": "MPV 配置",
|
||||
"search": "搜索",
|
||||
"logs": "日志"
|
||||
},
|
||||
@@ -65,7 +59,6 @@
|
||||
"theme": "主题",
|
||||
"appearance": "外观",
|
||||
"videoPlayback": "视频播放",
|
||||
"shufflePlay": "随机播放",
|
||||
"advanced": "高级",
|
||||
"useSeasonPostersDescription": "为剧集显示季海报而非剧集海报",
|
||||
"showHeroSectionDescription": "在主屏幕上显示精选内容轮播区",
|
||||
@@ -105,15 +98,11 @@
|
||||
"minutesUnit": "${minutes} 分钟",
|
||||
"rememberTrackSelections": "记住每个剧集/电影的音轨选择",
|
||||
"rememberTrackSelectionsDescription": "在播放过程中更改音轨时自动保存音频和字幕语言偏好",
|
||||
"unwatchedOnly": "仅未观看",
|
||||
"unwatchedOnlyDescription": "随机队列中仅包含未观看的剧集",
|
||||
"shuffleOrderNavigation": "随机顺序导航",
|
||||
"shuffleOrderNavigationDescription": "下一集/上一集按钮遵循随机播放顺序",
|
||||
"loopShuffleQueue": "循环随机队列",
|
||||
"loopShuffleQueueDescription": "在队列结束时重新开始",
|
||||
"videoPlayerControls": "视频播放器控制",
|
||||
"keyboardShortcuts": "键盘快捷键",
|
||||
"keyboardShortcutsDescription": "自定义键盘快捷键",
|
||||
"videoPlayerNavigation": "视频播放器导航",
|
||||
"videoPlayerNavigationDescription": "使用方向键导航视频播放器控件",
|
||||
"debugLogging": "调试日志",
|
||||
"debugLoggingDescription": "启用详细日志记录以便故障排除",
|
||||
"viewLogs": "查看日志",
|
||||
@@ -133,7 +122,34 @@
|
||||
"validationErrorEnterNumber": "请输入一个有效的数字",
|
||||
"validationErrorDuration": "时长必须介于 ${min} 和 ${max} ${unit} 之间",
|
||||
"shortcutAlreadyAssigned": "快捷键已被分配给 ${action}",
|
||||
"shortcutUpdated": "快捷键已为 ${action} 更新"
|
||||
"shortcutUpdated": "快捷键已为 ${action} 更新",
|
||||
"autoSkip": "自动跳过",
|
||||
"autoSkipIntro": "自动跳过片头",
|
||||
"autoSkipIntroDescription": "几秒钟后自动跳过片头标记",
|
||||
"autoSkipCredits": "自动跳过片尾",
|
||||
"autoSkipCreditsDescription": "自动跳过片尾并播放下一集",
|
||||
"autoSkipDelay": "自动跳过延迟",
|
||||
"autoSkipDelayDescription": "自动跳过前等待 ${seconds} 秒",
|
||||
"downloads": "下载",
|
||||
"downloadLocationDescription": "选择下载内容的存储位置",
|
||||
"downloadLocationDefault": "默认(应用存储)",
|
||||
"downloadLocationCustom": "自定义位置",
|
||||
"selectFolder": "选择文件夹",
|
||||
"resetToDefault": "重置为默认",
|
||||
"currentPath": "当前: ${path}",
|
||||
"downloadLocationChanged": "下载位置已更改",
|
||||
"downloadLocationReset": "下载位置已重置为默认",
|
||||
"downloadLocationInvalid": "所选文件夹不可写入",
|
||||
"downloadLocationSelectError": "选择文件夹失败",
|
||||
"downloadOnWifiOnly": "仅在 WiFi 时下载",
|
||||
"downloadOnWifiOnlyDescription": "使用蜂窝数据时禁止下载",
|
||||
"cellularDownloadBlocked": "蜂窝数据下已禁用下载。请连接 WiFi 或更改设置。",
|
||||
"maxVolume": "最大音量",
|
||||
"maxVolumeDescription": "允许音量超过 100% 以适应安静的媒体",
|
||||
"maxVolumePercent": "${percent}%",
|
||||
"maxVolumeHint": "输入最大音量 (100-300)",
|
||||
"discordRichPresence": "Discord 动态状态",
|
||||
"discordRichPresenceDescription": "在 Discord 上显示您正在观看的内容"
|
||||
},
|
||||
"search": {
|
||||
"hint": "搜索电影、系列、音乐...",
|
||||
@@ -225,7 +241,6 @@
|
||||
"nextButton": "下一集",
|
||||
"previousChapterButton": "上一章节",
|
||||
"nextChapterButton": "下一章节",
|
||||
"volumeButton": "音量",
|
||||
"muteButton": "静音",
|
||||
"unmuteButton": "取消静音",
|
||||
"settingsButton": "视频设置",
|
||||
@@ -236,6 +251,7 @@
|
||||
"aspectRatioButton": "宽高比",
|
||||
"fullscreenButton": "进入全屏",
|
||||
"exitFullscreenButton": "退出全屏",
|
||||
"alwaysOnTopButton": "置顶窗口",
|
||||
"rotationLockButton": "旋转锁定",
|
||||
"timelineSlider": "视频时间轴",
|
||||
"volumeSlider": "音量调节",
|
||||
@@ -250,6 +266,8 @@
|
||||
"messages": {
|
||||
"markedAsWatched": "已标记为已观看",
|
||||
"markedAsUnwatched": "已标记为未观看",
|
||||
"markedAsWatchedOffline": "已标记为已观看 (将在联网时同步)",
|
||||
"markedAsUnwatchedOffline": "已标记为未观看 (将在联网时同步)",
|
||||
"removedFromContinueWatching": "已从继续观看中移除",
|
||||
"errorLoading": "错误: ${error}",
|
||||
"fileInfoNotAvailable": "文件信息不可用",
|
||||
@@ -266,22 +284,17 @@
|
||||
"metadataRefreshing": "正在刷新 “${title}” 的元数据...",
|
||||
"metadataRefreshStarted": "已开始刷新 “${title}” 的元数据",
|
||||
"metadataRefreshFailed": "无法刷新元数据: ${error}",
|
||||
"noPlexToken": "未找到 Plex 令牌。请重新登录。",
|
||||
"logoutConfirm": "你确定要登出吗?",
|
||||
"noSeasonsFound": "未找到季",
|
||||
"noEpisodesFound": "在第一季中未找到剧集",
|
||||
"noEpisodesFoundGeneral": "未找到剧集",
|
||||
"noResultsFound": "未找到结果",
|
||||
"sleepTimerSet": "睡眠定时器已设置为 ${label}",
|
||||
"failedToSwitchProfile": "无法切换到 ${displayName}",
|
||||
"noItemsAvailable": "没有可用的项目",
|
||||
"failedToCreatePlayQueue": "创建播放队列失败",
|
||||
"failedToCreatePlayQueueNoItems": "创建播放队列失败 - 没有项目",
|
||||
"failedPlayback": "无法${action}: ${error}"
|
||||
},
|
||||
"profile": {
|
||||
"noUsersAvailable": "没有可用用户"
|
||||
},
|
||||
"subtitlingStyling": {
|
||||
"stylingOptions": "样式选项",
|
||||
"fontSize": "字号",
|
||||
@@ -291,25 +304,47 @@
|
||||
"backgroundOpacity": "背景不透明度",
|
||||
"backgroundColor": "背景颜色"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "MPV 配置",
|
||||
"description": "高级视频播放器设置",
|
||||
"properties": "属性",
|
||||
"presets": "预设",
|
||||
"noProperties": "未配置任何属性",
|
||||
"noPresets": "没有保存的预设",
|
||||
"addProperty": "添加属性",
|
||||
"editProperty": "编辑属性",
|
||||
"deleteProperty": "删除属性",
|
||||
"propertyKey": "属性键",
|
||||
"propertyKeyHint": "例如 hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "属性值",
|
||||
"propertyValueHint": "例如 auto, 256000000",
|
||||
"saveAsPreset": "保存为预设...",
|
||||
"presetName": "预设名称",
|
||||
"presetNameHint": "输入此预设的名称",
|
||||
"loadPreset": "加载",
|
||||
"deletePreset": "删除",
|
||||
"presetSaved": "预设已保存",
|
||||
"presetLoaded": "预设已加载",
|
||||
"presetDeleted": "预设已删除",
|
||||
"confirmDeletePreset": "确定要删除此预设吗?",
|
||||
"confirmDeleteProperty": "确定要删除此属性吗?",
|
||||
"entriesCount": "${count} 条目"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "确认操作",
|
||||
"areYouSure": "确定要执行此操作吗?",
|
||||
"cancel": "取消",
|
||||
"playNow": "立即播放"
|
||||
},
|
||||
"discover": {
|
||||
"title": "发现",
|
||||
"switchProfile": "切换配置文件",
|
||||
"switchProfile": "切换用户",
|
||||
"switchServer": "切换服务器",
|
||||
"logout": "登出",
|
||||
"noContentAvailable": "没有可用内容",
|
||||
"addMediaToLibraries": "请向你的媒体库添加一些媒体",
|
||||
"continueWatching": "继续观看",
|
||||
"recentlyAdded": "最近添加",
|
||||
"play": "播放",
|
||||
"resume": "继续",
|
||||
"playEpisode": "播放 S${season}, E${episode}",
|
||||
"resumeEpisode": "继续 S${season}, E${episode}",
|
||||
"playEpisode": "S${season}E${episode}",
|
||||
"pause": "暂停",
|
||||
"overview": "概述",
|
||||
"cast": "演员表",
|
||||
@@ -334,8 +369,7 @@
|
||||
"pleaseEnterToken": "请输入一个令牌",
|
||||
"invalidToken": "令牌无效",
|
||||
"failedToVerifyToken": "无法验证令牌: ${error}",
|
||||
"failedToSwitchProfile": "无法切换到 ${displayName}",
|
||||
"connectionFailedGeneric": "连接失败"
|
||||
"failedToSwitchProfile": "无法切换到 ${displayName}"
|
||||
},
|
||||
"libraries": {
|
||||
"title": "媒体库",
|
||||
@@ -363,7 +397,6 @@
|
||||
"sort": "排序",
|
||||
"sortBy": "排序依据",
|
||||
"filters": "筛选器",
|
||||
"loadingLibraryWithCount": "正在加载媒体库... (已加载 ${count} 个项目)",
|
||||
"confirmActionMessage": "确定要执行此操作吗?",
|
||||
"showLibrary": "显示媒体库",
|
||||
"hideLibrary": "隐藏媒体库",
|
||||
@@ -398,22 +431,9 @@
|
||||
"viewLicensesDescription": "查看第三方库的许可证"
|
||||
},
|
||||
"serverSelection": {
|
||||
"connectingToServer": "正在连接服务器...",
|
||||
"connectingToAllServers": "正在连接所有服务器...",
|
||||
"connectToAllServers": "连接所有服务器",
|
||||
"allServerConnectionsFailed": "无法连接到任何服务器。请检查你的网络并重试。",
|
||||
"foundServers": "找到 ${count} 个服务器",
|
||||
"orSelectIndividually": "或单独选择一个服务器:",
|
||||
"serverDebugCopied": "服务器调试数据已复制到剪贴板",
|
||||
"copyDebugData": "复制调试数据",
|
||||
"noServersFound": "未找到服务器",
|
||||
"malformedServerData": "找到 ${count} 个数据格式错误的服务器。没有可用的有效服务器。",
|
||||
"incompleteServerInfo": "某些服务器信息不完整,已被跳过。请检查你的 Plex.tv 账户。",
|
||||
"incompleteConnectionInfo": "服务器连接信息不完整。请重试。",
|
||||
"malformedServerInfo": "服务器信息格式错误: ${message}",
|
||||
"networkConnectionFailed": "网络连接失败。请检查你的网络连接并重试。",
|
||||
"authenticationFailed": "验证失败。请重新登录。",
|
||||
"plexServiceUnavailable": "Plex 服务不可用。请稍后重试。",
|
||||
"noServersFoundForAccount": "未找到 ${username} (${email}) 的服务器",
|
||||
"failedToLoadServers": "无法加载服务器: ${error}"
|
||||
},
|
||||
"hubDetail": {
|
||||
@@ -424,11 +444,8 @@
|
||||
"noItemsFound": "未找到项目"
|
||||
},
|
||||
"logs": {
|
||||
"title": "日志",
|
||||
"clearLogs": "清除日志",
|
||||
"copyLogs": "复制日志",
|
||||
"exportLogs": "导出日志",
|
||||
"noLogsToShow": "没有可显示的日志",
|
||||
"error": "错误:",
|
||||
"stackTrace": "堆栈跟踪 (Stack Trace):"
|
||||
},
|
||||
@@ -442,32 +459,40 @@
|
||||
"home": "主页",
|
||||
"search": "搜索",
|
||||
"libraries": "媒体库",
|
||||
"settings": "设置"
|
||||
"settings": "设置",
|
||||
"downloads": "下载"
|
||||
},
|
||||
"downloads": {
|
||||
"title": "下载",
|
||||
"manage": "管理",
|
||||
"tvShows": "电视剧",
|
||||
"movies": "电影",
|
||||
"noDownloads": "暂无下载",
|
||||
"noDownloadsDescription": "下载的内容将在此处显示以供离线观看",
|
||||
"downloadNow": "下载",
|
||||
"deleteDownload": "删除下载",
|
||||
"retryDownload": "重试下载",
|
||||
"downloadQueued": "下载已排队",
|
||||
"episodesQueued": "${count} 集已加入下载队列",
|
||||
"downloadDeleted": "下载已删除",
|
||||
"deleteConfirm": "确定要删除 \"${title}\" 吗?下载的文件将从您的设备中删除。",
|
||||
"deletingWithProgress": "正在删除 ${title}... (${current}/${total})"
|
||||
},
|
||||
"playlists": {
|
||||
"title": "播放列表",
|
||||
"noPlaylists": "未找到播放列表",
|
||||
"create": "创建播放列表",
|
||||
"newPlaylist": "新播放列表",
|
||||
"playlistName": "播放列表名称",
|
||||
"enterPlaylistName": "输入播放列表名称",
|
||||
"edit": "编辑播放列表",
|
||||
"delete": "删除播放列表",
|
||||
"addTo": "添加到播放列表",
|
||||
"addItems": "添加项目",
|
||||
"removeItem": "从播放列表中移除",
|
||||
"clearPlaylist": "清空播放列表",
|
||||
"playAll": "全部播放",
|
||||
"shuffle": "随机播放",
|
||||
"smartPlaylist": "智能播放列表",
|
||||
"regularPlaylist": "普通播放列表",
|
||||
"itemCount": "${count} 个项目",
|
||||
"oneItem": "1 个项目",
|
||||
"emptyPlaylist": "此播放列表为空",
|
||||
"deleteConfirm": "删除播放列表?",
|
||||
"deleteMessage": "确定要删除 \"${name}\" 吗?",
|
||||
"created": "播放列表已创建",
|
||||
"updated": "播放列表已更新",
|
||||
"deleted": "播放列表已删除",
|
||||
"itemAdded": "已添加到播放列表",
|
||||
"itemRemoved": "已从播放列表中移除",
|
||||
@@ -485,7 +510,6 @@
|
||||
"title": "合集",
|
||||
"collection": "合集",
|
||||
"empty": "合集为空",
|
||||
"noItems": "此合集没有项目",
|
||||
"unknownLibrarySection": "无法删除:未知的媒体库分区",
|
||||
"deleteCollection": "删除合集",
|
||||
"deleteConfirm": "确定要删除\"${title}\"吗?此操作无法撤销。",
|
||||
@@ -493,7 +517,6 @@
|
||||
"deleteFailed": "删除合集失败",
|
||||
"deleteFailedWithError": "删除合集失败:${error}",
|
||||
"failedToLoadItems": "加载合集项目失败:${error}",
|
||||
"addTo": "添加到合集",
|
||||
"selectCollection": "选择合集",
|
||||
"createNewCollection": "创建新合集",
|
||||
"collectionName": "合集名称",
|
||||
@@ -506,5 +529,49 @@
|
||||
"removedFromCollection": "已从合集移除",
|
||||
"removeFromCollectionFailed": "从合集移除失败",
|
||||
"removeFromCollectionError": "从合集移除时出错:${error}"
|
||||
},
|
||||
"watchTogether": {
|
||||
"title": "一起看",
|
||||
"description": "与朋友和家人同步观看内容",
|
||||
"createSession": "创建会话",
|
||||
"creating": "创建中...",
|
||||
"joinSession": "加入会话",
|
||||
"joining": "加入中...",
|
||||
"controlMode": "控制模式",
|
||||
"controlModeQuestion": "谁可以控制播放?",
|
||||
"hostOnly": "仅主持人",
|
||||
"anyone": "任何人",
|
||||
"hostingSession": "主持会话",
|
||||
"inSession": "在会话中",
|
||||
"sessionCode": "会话代码",
|
||||
"hostControlsPlayback": "主持人控制播放",
|
||||
"anyoneCanControl": "任何人都可以控制播放",
|
||||
"hostControls": "主持人控制",
|
||||
"anyoneControls": "任何人控制",
|
||||
"participants": "参与者",
|
||||
"host": "主持人",
|
||||
"hostBadge": "主持人",
|
||||
"youAreHost": "你是主持人",
|
||||
"watchingWithOthers": "与他人一起观看",
|
||||
"endSession": "结束会话",
|
||||
"leaveSession": "离开会话",
|
||||
"endSessionQuestion": "结束会话?",
|
||||
"leaveSessionQuestion": "离开会话?",
|
||||
"endSessionConfirm": "这将为所有参与者结束会话。",
|
||||
"leaveSessionConfirm": "你将被移出会话。",
|
||||
"endSessionConfirmOverlay": "这将为所有参与者结束观看会话。",
|
||||
"leaveSessionConfirmOverlay": "你将断开与观看会话的连接。",
|
||||
"end": "结束",
|
||||
"leave": "离开",
|
||||
"syncing": "同步中...",
|
||||
"participant": "参与者",
|
||||
"joinWatchSession": "加入观看会话",
|
||||
"enterCodeHint": "输入8位代码",
|
||||
"pasteFromClipboard": "从剪贴板粘贴",
|
||||
"pleaseEnterCode": "请输入会话代码",
|
||||
"codeMustBe8Chars": "会话代码必须是8个字符",
|
||||
"joinInstructions": "输入主持人分享的会话代码以加入他们的观看会话。",
|
||||
"failedToCreate": "创建会话失败",
|
||||
"failedToJoin": "加入会话失败"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'dart:io' show Platform;
|
||||
import 'package:media_kit/media_kit.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
@@ -11,6 +10,9 @@ import 'services/macos_titlebar_service.dart';
|
||||
import 'services/fullscreen_state_manager.dart';
|
||||
import 'services/update_service.dart';
|
||||
import 'services/settings_service.dart';
|
||||
import 'utils/platform_detector.dart';
|
||||
import 'services/discord_rpc_service.dart';
|
||||
import 'services/gamepad_service.dart';
|
||||
import 'providers/user_profile_provider.dart';
|
||||
import 'providers/plex_client_provider.dart';
|
||||
import 'providers/multi_server_provider.dart';
|
||||
@@ -19,13 +21,24 @@ import 'providers/theme_provider.dart';
|
||||
import 'providers/settings_provider.dart';
|
||||
import 'providers/hidden_libraries_provider.dart';
|
||||
import 'providers/playback_state_provider.dart';
|
||||
import 'providers/download_provider.dart';
|
||||
import 'providers/offline_mode_provider.dart';
|
||||
import 'providers/offline_watch_provider.dart';
|
||||
import 'watch_together/watch_together.dart';
|
||||
import 'services/multi_server_manager.dart';
|
||||
import 'services/offline_watch_sync_service.dart';
|
||||
import 'services/data_aggregation_service.dart';
|
||||
import 'services/in_app_review_service.dart';
|
||||
import 'services/server_registry.dart';
|
||||
import 'utils/language_codes.dart';
|
||||
import 'services/download_manager_service.dart';
|
||||
import 'services/download_storage_service.dart';
|
||||
import 'services/plex_api_cache.dart';
|
||||
import 'database/app_database.dart';
|
||||
import 'utils/app_logger.dart';
|
||||
import 'utils/orientation_helper.dart';
|
||||
import 'utils/language_codes.dart';
|
||||
import 'i18n/strings.g.dart';
|
||||
import 'focus/input_mode_tracker.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
@@ -38,34 +51,49 @@ void main() async {
|
||||
LocaleSettings.setLocale(savedLocale);
|
||||
|
||||
// Configure image cache for large libraries
|
||||
PaintingBinding.instance.imageCache.maximumSizeBytes = 500 << 20; // 500MB
|
||||
PaintingBinding.instance.imageCache.maximumSize = 500; // 500 images
|
||||
PaintingBinding.instance.imageCache.maximumSizeBytes = 200 << 20; // 200MB
|
||||
|
||||
// Initialize services in parallel where possible
|
||||
final futures = <Future<void>>[];
|
||||
|
||||
// Initialize window_manager for desktop platforms
|
||||
if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) {
|
||||
await windowManager.ensureInitialized();
|
||||
futures.add(windowManager.ensureInitialized());
|
||||
}
|
||||
|
||||
// Configure macOS window with custom titlebar
|
||||
await MacOSTitlebarService.setupCustomTitlebar();
|
||||
// Initialize TV detection for Android
|
||||
if (Platform.isAndroid) {
|
||||
futures.add(TvDetectionService.getInstance().then((_) {}));
|
||||
}
|
||||
|
||||
// Initialize MediaKit
|
||||
MediaKit.ensureInitialized();
|
||||
// Configure macOS window with custom titlebar (depends on window manager)
|
||||
futures.add(MacOSTitlebarService.setupCustomTitlebar());
|
||||
|
||||
// Note: Orientation will be set dynamically based on device type in MainApp
|
||||
|
||||
await StorageService.getInstance();
|
||||
// Initialize storage service
|
||||
futures.add(StorageService.getInstance().then((_) {}));
|
||||
|
||||
// Initialize language codes for track selection
|
||||
await LanguageCodes.initialize();
|
||||
futures.add(LanguageCodes.initialize());
|
||||
|
||||
// Wait for all parallel services to complete
|
||||
await Future.wait(futures);
|
||||
|
||||
// Initialize logger level based on debug setting
|
||||
final debugEnabled = settings.getEnableDebugLogging();
|
||||
setLoggerLevel(debugEnabled);
|
||||
|
||||
// Initialize download storage service with settings
|
||||
await DownloadStorageService.instance.initialize(settings);
|
||||
|
||||
// Start global fullscreen state monitoring
|
||||
FullscreenStateManager().startMonitoring();
|
||||
|
||||
// Initialize gamepad service for desktop platforms
|
||||
if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) {
|
||||
GamepadService.instance.start();
|
||||
DiscordRPCService.instance.initialize();
|
||||
}
|
||||
|
||||
// DTD service is available for MCP tooling connection if needed
|
||||
|
||||
runApp(const MainApp());
|
||||
@@ -74,45 +102,141 @@ void main() async {
|
||||
// Global RouteObserver for tracking navigation
|
||||
final RouteObserver<PageRoute> routeObserver = RouteObserver<PageRoute>();
|
||||
|
||||
class MainApp extends StatelessWidget {
|
||||
class MainApp extends StatefulWidget {
|
||||
const MainApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// Initialize multi-server infrastructure
|
||||
final serverManager = MultiServerManager();
|
||||
final aggregationService = DataAggregationService(serverManager);
|
||||
State<MainApp> createState() => _MainAppState();
|
||||
}
|
||||
|
||||
class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
|
||||
// Initialize multi-server infrastructure
|
||||
late final MultiServerManager _serverManager;
|
||||
late final DataAggregationService _aggregationService;
|
||||
late final AppDatabase _appDatabase;
|
||||
late final DownloadManagerService _downloadManager;
|
||||
late final OfflineWatchSyncService _offlineWatchSyncService;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
|
||||
_serverManager = MultiServerManager();
|
||||
_aggregationService = DataAggregationService(_serverManager);
|
||||
_appDatabase = AppDatabase();
|
||||
|
||||
// Initialize API cache with database
|
||||
PlexApiCache.initialize(_appDatabase);
|
||||
|
||||
_downloadManager = DownloadManagerService(database: _appDatabase, storageService: DownloadStorageService.instance);
|
||||
|
||||
_offlineWatchSyncService = OfflineWatchSyncService(database: _appDatabase, serverManager: _serverManager);
|
||||
|
||||
// Start in-app review session tracking
|
||||
InAppReviewService.instance.startSession();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
WidgetsBinding.instance.removeObserver(this);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||
switch (state) {
|
||||
case AppLifecycleState.resumed:
|
||||
// App came back to foreground - trigger sync check and start new session
|
||||
_offlineWatchSyncService.onAppResumed();
|
||||
InAppReviewService.instance.startSession();
|
||||
case AppLifecycleState.paused:
|
||||
case AppLifecycleState.detached:
|
||||
// App went to background or is closing - end session
|
||||
InAppReviewService.instance.endSession();
|
||||
case AppLifecycleState.inactive:
|
||||
case AppLifecycleState.hidden:
|
||||
// Transitional states - don't trigger session events
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MultiProvider(
|
||||
providers: [
|
||||
// Legacy provider for backward compatibility
|
||||
ChangeNotifierProvider(create: (context) => PlexClientProvider()),
|
||||
// New multi-server providers
|
||||
ChangeNotifierProvider(
|
||||
create: (context) =>
|
||||
MultiServerProvider(serverManager, aggregationService),
|
||||
),
|
||||
ChangeNotifierProvider(create: (context) => MultiServerProvider(_serverManager, _aggregationService)),
|
||||
ChangeNotifierProvider(create: (context) => ServerStateProvider()),
|
||||
// Existing providers
|
||||
ChangeNotifierProvider(
|
||||
create: (context) => UserProfileProvider()..initialize(),
|
||||
// Offline mode provider - depends on MultiServerProvider
|
||||
ChangeNotifierProxyProvider<MultiServerProvider, OfflineModeProvider>(
|
||||
create: (_) {
|
||||
final provider = OfflineModeProvider(_serverManager);
|
||||
provider.initialize(); // Initialize immediately so statusStream listener is ready
|
||||
return provider;
|
||||
},
|
||||
update: (_, multiServerProvider, previous) {
|
||||
final provider = previous ?? OfflineModeProvider(_serverManager);
|
||||
provider.initialize(); // Idempotent - safe to call again
|
||||
return provider;
|
||||
},
|
||||
),
|
||||
// Download provider
|
||||
ChangeNotifierProvider(create: (context) => DownloadProvider(downloadManager: _downloadManager)),
|
||||
// Offline watch sync service
|
||||
ChangeNotifierProvider<OfflineWatchSyncService>(
|
||||
create: (context) {
|
||||
final offlineModeProvider = context.read<OfflineModeProvider>();
|
||||
final downloadProvider = context.read<DownloadProvider>();
|
||||
|
||||
// Wire up callback to refresh download provider after watch state sync
|
||||
_offlineWatchSyncService.onWatchStatesRefreshed = () {
|
||||
downloadProvider.refreshMetadataFromCache();
|
||||
};
|
||||
|
||||
_offlineWatchSyncService.startConnectivityMonitoring(offlineModeProvider);
|
||||
return _offlineWatchSyncService;
|
||||
},
|
||||
),
|
||||
// Offline watch provider - depends on sync service and download provider
|
||||
ChangeNotifierProxyProvider2<OfflineWatchSyncService, DownloadProvider, OfflineWatchProvider>(
|
||||
create: (context) => OfflineWatchProvider(
|
||||
syncService: _offlineWatchSyncService,
|
||||
downloadProvider: context.read<DownloadProvider>(),
|
||||
apiCache: PlexApiCache.instance,
|
||||
),
|
||||
update: (_, syncService, downloadProvider, previous) {
|
||||
return previous ??
|
||||
OfflineWatchProvider(
|
||||
syncService: syncService,
|
||||
downloadProvider: downloadProvider,
|
||||
apiCache: PlexApiCache.instance,
|
||||
);
|
||||
},
|
||||
),
|
||||
// Existing providers
|
||||
ChangeNotifierProvider(create: (context) => UserProfileProvider()),
|
||||
ChangeNotifierProvider(create: (context) => ThemeProvider()),
|
||||
ChangeNotifierProvider(create: (context) => SettingsProvider()),
|
||||
ChangeNotifierProvider(create: (context) => HiddenLibrariesProvider()),
|
||||
ChangeNotifierProvider(create: (context) => SettingsProvider(), lazy: true),
|
||||
ChangeNotifierProvider(create: (context) => HiddenLibrariesProvider(), lazy: true),
|
||||
ChangeNotifierProvider(create: (context) => PlaybackStateProvider()),
|
||||
ChangeNotifierProvider(create: (context) => WatchTogetherProvider()),
|
||||
],
|
||||
child: Consumer<ThemeProvider>(
|
||||
builder: (context, themeProvider, child) {
|
||||
return TranslationProvider(
|
||||
child: MaterialApp(
|
||||
title: t.app.title,
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: themeProvider.lightTheme,
|
||||
darkTheme: themeProvider.darkTheme,
|
||||
themeMode: themeProvider.materialThemeMode,
|
||||
navigatorObservers: [routeObserver],
|
||||
home: const OrientationAwareSetup(),
|
||||
child: InputModeTracker(
|
||||
child: MaterialApp(
|
||||
title: t.app.title,
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: themeProvider.lightTheme,
|
||||
darkTheme: themeProvider.darkTheme,
|
||||
themeMode: themeProvider.materialThemeMode,
|
||||
navigatorObservers: [routeObserver],
|
||||
home: const OrientationAwareSetup(),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -159,7 +283,7 @@ class _SetupScreenState extends State<SetupScreen> {
|
||||
_loadSavedCredentials();
|
||||
}
|
||||
|
||||
void _checkForUpdatesOnStartup() async {
|
||||
Future<void> _checkForUpdatesOnStartup() async {
|
||||
// Delay slightly to allow UI to settle
|
||||
await Future.delayed(const Duration(milliseconds: 500));
|
||||
|
||||
@@ -238,94 +362,82 @@ class _SetupScreenState extends State<SetupScreen> {
|
||||
// Migrate from single-server to multi-server if needed
|
||||
await registry.migrateFromSingleServer();
|
||||
|
||||
// Load enabled servers
|
||||
final servers = await registry.getEnabledServers();
|
||||
// Refresh servers from API to get updated connection info (IPs may change)
|
||||
await registry.refreshServersFromApi();
|
||||
|
||||
// Load all configured servers
|
||||
final servers = await registry.getServers();
|
||||
|
||||
if (servers.isEmpty) {
|
||||
// No servers configured - show auth screen
|
||||
if (mounted) {
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const AuthScreen()),
|
||||
);
|
||||
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => const AuthScreen()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Get multi-server provider
|
||||
if (!mounted) return;
|
||||
final multiServerProvider = Provider.of<MultiServerProvider>(
|
||||
context,
|
||||
listen: false,
|
||||
);
|
||||
final multiServerProvider = Provider.of<MultiServerProvider>(context, listen: false);
|
||||
|
||||
try {
|
||||
appLogger.i('Connecting to ${servers.length} enabled servers...');
|
||||
appLogger.i('Connecting to ${servers.length} servers...');
|
||||
|
||||
// Get or generate client identifier
|
||||
final clientId = storage.getClientIdentifier();
|
||||
|
||||
// Connect to all servers in parallel
|
||||
final connectedCount = await multiServerProvider.serverManager
|
||||
.connectToAllServers(
|
||||
servers,
|
||||
clientIdentifier: clientId,
|
||||
timeout: const Duration(seconds: 10),
|
||||
onServerConnected: (serverId, client) {
|
||||
// Set first connected client in legacy provider for backward compatibility
|
||||
final legacyProvider = Provider.of<PlexClientProvider>(
|
||||
context,
|
||||
listen: false,
|
||||
);
|
||||
if (legacyProvider.client == null) {
|
||||
legacyProvider.setClient(client);
|
||||
}
|
||||
},
|
||||
);
|
||||
final connectedCount = await multiServerProvider.serverManager.connectToAllServers(
|
||||
servers,
|
||||
clientIdentifier: clientId,
|
||||
timeout: const Duration(seconds: 10),
|
||||
onServerConnected: (serverId, client) {
|
||||
// Set first connected client in legacy provider for backward compatibility
|
||||
final legacyProvider = Provider.of<PlexClientProvider>(context, listen: false);
|
||||
if (legacyProvider.client == null) {
|
||||
legacyProvider.setClient(client);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
if (connectedCount > 0) {
|
||||
// At least one server connected successfully
|
||||
appLogger.i('Successfully connected to $connectedCount servers');
|
||||
|
||||
if (mounted) {
|
||||
// Check for updates BEFORE navigation
|
||||
_checkForUpdatesOnStartup();
|
||||
// Now that Plex clients are available, trigger initial watch sync
|
||||
context.read<OfflineWatchSyncService>().onServersConnected();
|
||||
|
||||
// Navigate to main screen
|
||||
// Navigate to main screen immediately
|
||||
// Get first connected client for backward compatibility
|
||||
final firstClient =
|
||||
multiServerProvider.serverManager.onlineClients.values.first;
|
||||
final firstClient = multiServerProvider.serverManager.onlineClients.values.first;
|
||||
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => MainScreen(client: firstClient),
|
||||
),
|
||||
);
|
||||
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => MainScreen(client: firstClient)));
|
||||
|
||||
// Check for updates in background after navigation
|
||||
_checkForUpdatesOnStartup();
|
||||
}
|
||||
} else {
|
||||
// All connections failed
|
||||
appLogger.w('Failed to connect to any servers');
|
||||
// All connections failed - navigate to offline mode
|
||||
appLogger.w('Failed to connect to any servers, entering offline mode');
|
||||
|
||||
if (mounted) {
|
||||
// Show auth screen to re-authenticate
|
||||
// Navigate to MainScreen in offline mode
|
||||
// User can still access Downloads and Settings
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const AuthScreen()),
|
||||
MaterialPageRoute(builder: (context) => const MainScreen(isOfflineMode: true)),
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch (e, stackTrace) {
|
||||
appLogger.e(
|
||||
'Error during multi-server connection',
|
||||
error: e,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
appLogger.e('Error during multi-server connection', error: e, stackTrace: stackTrace);
|
||||
|
||||
if (mounted) {
|
||||
// Navigate to MainScreen in offline mode
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const AuthScreen()),
|
||||
MaterialPageRoute(builder: (context) => const MainScreen(isOfflineMode: true)),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -337,11 +449,7 @@ class _SetupScreenState extends State<SetupScreen> {
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const CircularProgressIndicator(),
|
||||
const SizedBox(height: 16),
|
||||
Text(t.app.loading),
|
||||
],
|
||||
children: [const CircularProgressIndicator(), const SizedBox(height: 16), Text(t.app.loading)],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../client/plex_client.dart';
|
||||
import '../services/plex_client.dart';
|
||||
import '../models/plex_metadata.dart';
|
||||
|
||||
/// Mixin for screens that need to update individual items after watch state changes
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Mixin that provides focus management for library tabs.
|
||||
/// Handles the lifecycle of a focus node for the first item and provides
|
||||
/// a method to request focus on that item.
|
||||
mixin LibraryTabFocusMixin<T extends StatefulWidget> on State<T> {
|
||||
/// Focus node for the first item (for programmatic focus)
|
||||
late final FocusNode firstItemFocusNode;
|
||||
|
||||
/// Debug label for the focus node
|
||||
String get focusNodeDebugLabel;
|
||||
|
||||
/// Number of items in the list/grid
|
||||
int get itemCount;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
firstItemFocusNode = FocusNode(debugLabel: focusNodeDebugLabel);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
firstItemFocusNode.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
/// Focus the first item in the grid/list (for tab activation)
|
||||
void focusFirstItem() {
|
||||
if (itemCount > 0) {
|
||||
firstItemFocusNode.requestFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../client/plex_client.dart';
|
||||
import '../services/plex_client.dart';
|
||||
import '../models/plex_library.dart';
|
||||
import '../utils/provider_extensions.dart';
|
||||
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
mixin Refreshable {
|
||||
void refresh();
|
||||
}
|
||||
|
||||
/// Mixin for screens that support full refresh (clearing all cached data)
|
||||
mixin FullRefreshable {
|
||||
void fullRefresh();
|
||||
}
|
||||
|
||||
/// Mixin for screens with focusable tab content
|
||||
mixin FocusableTab {
|
||||
void focusActiveTabIfReady();
|
||||
}
|
||||
|
||||
/// Mixin for screens with focusable search input
|
||||
mixin SearchInputFocusable {
|
||||
void focusSearchInput();
|
||||
}
|
||||
|
||||
/// Mixin for screens that can load a specific library by key
|
||||
mixin LibraryLoadable {
|
||||
void loadLibraryByKey(String libraryGlobalKey);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
import '../utils/formatters.dart';
|
||||
|
||||
enum DownloadStatus {
|
||||
queued,
|
||||
downloading,
|
||||
paused,
|
||||
completed,
|
||||
failed,
|
||||
cancelled,
|
||||
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)
|
||||
|
||||
// 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,
|
||||
});
|
||||
|
||||
double get progressPercent => progress / 100.0;
|
||||
|
||||
String get speedFormatted => ByteFormatter.formatSpeed(speed);
|
||||
String get downloadedFormatted => ByteFormatter.formatBytes(downloadedBytes);
|
||||
String get totalFormatted => ByteFormatter.formatBytes(totalBytes);
|
||||
|
||||
Duration? get estimatedTimeRemaining {
|
||||
if (speed <= 0 || totalBytes <= 0) return null;
|
||||
final remainingBytes = totalBytes - downloadedBytes;
|
||||
if (remainingBytes <= 0) return Duration.zero;
|
||||
return Duration(seconds: (remainingBytes / speed).round());
|
||||
}
|
||||
|
||||
/// Check if this progress update includes artwork paths
|
||||
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;
|
||||
|
||||
const DeletionProgress({
|
||||
required this.globalKey,
|
||||
required this.itemTitle,
|
||||
required this.currentItem,
|
||||
required this.totalItems,
|
||||
this.currentOperation,
|
||||
});
|
||||
|
||||
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%)';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/// Represents a single MPV configuration entry
|
||||
class MpvConfigEntry {
|
||||
final String key;
|
||||
final String value;
|
||||
final bool isEnabled;
|
||||
|
||||
const MpvConfigEntry({required this.key, required this.value, this.isEnabled = true});
|
||||
|
||||
factory MpvConfigEntry.fromJson(Map<String, dynamic> json) {
|
||||
return MpvConfigEntry(
|
||||
key: json['key'] as String,
|
||||
value: json['value'] as String,
|
||||
isEnabled: json['isEnabled'] as bool? ?? true,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {'key': key, 'value': value, 'isEnabled': isEnabled};
|
||||
|
||||
MpvConfigEntry copyWith({String? key, String? value, bool? isEnabled}) {
|
||||
return MpvConfigEntry(key: key ?? this.key, value: value ?? this.value, isEnabled: isEnabled ?? this.isEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents a saved preset of MPV configurations
|
||||
class MpvPreset {
|
||||
final String name;
|
||||
final List<MpvConfigEntry> entries;
|
||||
final DateTime createdAt;
|
||||
|
||||
const MpvPreset({required this.name, required this.entries, required this.createdAt});
|
||||
|
||||
factory MpvPreset.fromJson(Map<String, dynamic> json) {
|
||||
return MpvPreset(
|
||||
name: json['name'] as String,
|
||||
entries: (json['entries'] as List).map((e) => MpvConfigEntry.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
createdAt: DateTime.parse(json['createdAt'] as String),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'name': name,
|
||||
'entries': entries.map((e) => e.toJson()).toList(),
|
||||
'createdAt': createdAt.toIso8601String(),
|
||||
};
|
||||
}
|
||||
@@ -49,11 +49,7 @@ class PlayQueueResponse {
|
||||
this.items,
|
||||
});
|
||||
|
||||
factory PlayQueueResponse.fromJson(
|
||||
Map<String, dynamic> json, {
|
||||
String? serverId,
|
||||
String? serverName,
|
||||
}) {
|
||||
factory PlayQueueResponse.fromJson(Map<String, dynamic> json, {String? serverId, String? serverName}) {
|
||||
// The API returns data wrapped in MediaContainer
|
||||
final container = json['MediaContainer'] as Map<String, dynamic>? ?? json;
|
||||
final response = _$PlayQueueResponseFromJson(container);
|
||||
@@ -61,16 +57,13 @@ class PlayQueueResponse {
|
||||
// Tag all items with server info
|
||||
if (response.items != null && (serverId != null || serverName != null)) {
|
||||
final taggedItems = response.items!
|
||||
.map(
|
||||
(item) => item.copyWith(serverId: serverId, serverName: serverName),
|
||||
)
|
||||
.map((item) => item.copyWith(serverId: serverId, serverName: serverName))
|
||||
.toList();
|
||||
return PlayQueueResponse(
|
||||
playQueueID: response.playQueueID,
|
||||
playQueueSelectedItemID: response.playQueueSelectedItemID,
|
||||
playQueueSelectedItemOffset: response.playQueueSelectedItemOffset,
|
||||
playQueueSelectedMetadataItemID:
|
||||
response.playQueueSelectedMetadataItemID,
|
||||
playQueueSelectedMetadataItemID: response.playQueueSelectedMetadataItemID,
|
||||
playQueueShuffled: response.playQueueShuffled,
|
||||
playQueueSourceURI: response.playQueueSourceURI,
|
||||
playQueueTotalCount: response.playQueueTotalCount,
|
||||
@@ -87,9 +80,7 @@ class PlayQueueResponse {
|
||||
PlexMetadata? get selectedItem {
|
||||
if (items == null || playQueueSelectedItemID == null) return null;
|
||||
try {
|
||||
return items!.firstWhere(
|
||||
(item) => item.playQueueItemID == playQueueSelectedItemID,
|
||||
);
|
||||
return items!.firstWhere((item) => item.playQueueItemID == playQueueSelectedItemID);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
@@ -98,8 +89,6 @@ class PlayQueueResponse {
|
||||
/// Get the index of the selected item in the current window
|
||||
int? get selectedItemIndex {
|
||||
if (items == null || playQueueSelectedItemID == null) return null;
|
||||
return items!.indexWhere(
|
||||
(item) => item.playQueueItemID == playQueueSelectedItemID,
|
||||
);
|
||||
return items!.indexWhere((item) => item.playQueueItemID == playQueueSelectedItemID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,23 +6,15 @@ part of 'play_queue_response.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
PlayQueueResponse _$PlayQueueResponseFromJson(Map<String, dynamic> json) =>
|
||||
PlayQueueResponse(
|
||||
playQueueID: (json['playQueueID'] as num).toInt(),
|
||||
playQueueSelectedItemID: (json['playQueueSelectedItemID'] as num?)
|
||||
?.toInt(),
|
||||
playQueueSelectedItemOffset: (json['playQueueSelectedItemOffset'] as num?)
|
||||
?.toInt(),
|
||||
playQueueSelectedMetadataItemID:
|
||||
json['playQueueSelectedMetadataItemID'] as String?,
|
||||
playQueueShuffled: const BoolOrIntConverter().fromJson(
|
||||
json['playQueueShuffled'] as Object,
|
||||
),
|
||||
playQueueSourceURI: json['playQueueSourceURI'] as String?,
|
||||
playQueueTotalCount: (json['playQueueTotalCount'] as num?)?.toInt(),
|
||||
playQueueVersion: (json['playQueueVersion'] as num).toInt(),
|
||||
size: (json['size'] as num?)?.toInt(),
|
||||
items: (json['Metadata'] as List<dynamic>?)
|
||||
?.map((e) => PlexMetadata.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
PlayQueueResponse _$PlayQueueResponseFromJson(Map<String, dynamic> json) => PlayQueueResponse(
|
||||
playQueueID: (json['playQueueID'] as num).toInt(),
|
||||
playQueueSelectedItemID: (json['playQueueSelectedItemID'] as num?)?.toInt(),
|
||||
playQueueSelectedItemOffset: (json['playQueueSelectedItemOffset'] as num?)?.toInt(),
|
||||
playQueueSelectedMetadataItemID: json['playQueueSelectedMetadataItemID'] as String?,
|
||||
playQueueShuffled: const BoolOrIntConverter().fromJson(json['playQueueShuffled'] as Object),
|
||||
playQueueSourceURI: json['playQueueSourceURI'] as String?,
|
||||
playQueueTotalCount: (json['playQueueTotalCount'] as num?)?.toInt(),
|
||||
playQueueVersion: (json['playQueueVersion'] as num).toInt(),
|
||||
size: (json['size'] as num?)?.toInt(),
|
||||
items: (json['Metadata'] as List<dynamic>?)?.map((e) => PlexMetadata.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
);
|
||||
|
||||
@@ -53,6 +53,7 @@ class PlexConfig {
|
||||
'X-Plex-Product': product,
|
||||
'X-Plex-Version': version,
|
||||
'X-Plex-Platform': platform,
|
||||
'X-Plex-Client-Profile-Name': 'Generic',
|
||||
if (device != null) 'X-Plex-Device': device!,
|
||||
if (acceptJson) 'Accept': 'application/json',
|
||||
'Accept-Charset': 'utf-8',
|
||||
@@ -1,3 +1,5 @@
|
||||
import '../utils/formatters.dart';
|
||||
|
||||
class PlexFileInfo {
|
||||
// Media level properties
|
||||
final String? container;
|
||||
@@ -61,20 +63,7 @@ class PlexFileInfo {
|
||||
/// Format file size in human-readable format (GB, MB, KB, bytes)
|
||||
String get fileSizeFormatted {
|
||||
if (fileSize == null) return 'Unknown';
|
||||
|
||||
const kb = 1024;
|
||||
const mb = kb * 1024;
|
||||
const gb = mb * 1024;
|
||||
|
||||
if (fileSize! >= gb) {
|
||||
return '${(fileSize! / gb).toStringAsFixed(2)} GB';
|
||||
} else if (fileSize! >= mb) {
|
||||
return '${(fileSize! / mb).toStringAsFixed(2)} MB';
|
||||
} else if (fileSize! >= kb) {
|
||||
return '${(fileSize! / kb).toStringAsFixed(2)} KB';
|
||||
} else {
|
||||
return '$fileSize bytes';
|
||||
}
|
||||
return ByteFormatter.formatBytes(fileSize!, decimals: 2);
|
||||
}
|
||||
|
||||
/// Format duration in HH:MM:SS or MM:SS format
|
||||
@@ -96,17 +85,7 @@ class PlexFileInfo {
|
||||
/// Format bitrate in Mbps or Kbps
|
||||
String get bitrateFormatted {
|
||||
if (bitrate == null) return 'Unknown';
|
||||
|
||||
const kbps = 1000;
|
||||
const mbps = kbps * 1000;
|
||||
|
||||
if (bitrate! >= mbps) {
|
||||
return '${(bitrate! / mbps).toStringAsFixed(2)} Mbps';
|
||||
} else if (bitrate! >= kbps) {
|
||||
return '${(bitrate! / kbps).toStringAsFixed(2)} Kbps';
|
||||
} else {
|
||||
return '$bitrate bps';
|
||||
}
|
||||
return ByteFormatter.formatBitrateBps(bitrate!);
|
||||
}
|
||||
|
||||
/// Format resolution as widthxheight
|
||||
@@ -140,8 +119,7 @@ class PlexFileInfo {
|
||||
/// Format audio channels (e.g., "2 channels (stereo)")
|
||||
String get audioChannelsFormatted {
|
||||
if (audioChannels != null) {
|
||||
String channelText =
|
||||
'$audioChannels channel${audioChannels! > 1 ? 's' : ''}';
|
||||
String channelText = '$audioChannels channel${audioChannels! > 1 ? 's' : ''}';
|
||||
if (audioChannelLayout != null) {
|
||||
channelText += ' ($audioChannelLayout)';
|
||||
}
|
||||
|
||||
@@ -24,13 +24,7 @@ class PlexFilter {
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'filter': filter,
|
||||
'filterType': filterType,
|
||||
'key': key,
|
||||
'title': title,
|
||||
'type': type,
|
||||
};
|
||||
return {'filter': filter, 'filterType': filterType, 'key': key, 'title': title, 'type': type};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,11 +36,7 @@ class PlexFilterValue {
|
||||
PlexFilterValue({required this.key, required this.title, this.type});
|
||||
|
||||
factory PlexFilterValue.fromJson(Map<String, dynamic> json) {
|
||||
return PlexFilterValue(
|
||||
key: json['key'] ?? '',
|
||||
title: json['title'] ?? '',
|
||||
type: json['type'],
|
||||
);
|
||||
return PlexFilterValue(key: json['key'] ?? '', title: json['title'] ?? '', type: json['type']);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
|
||||
@@ -21,11 +21,7 @@ class PlexHome {
|
||||
|
||||
factory PlexHome.fromJson(Map<String, dynamic> json) {
|
||||
final List<dynamic> usersJson = json['users'] as List<dynamic>;
|
||||
final users = usersJson
|
||||
.map(
|
||||
(userJson) => PlexHomeUser.fromJson(userJson as Map<String, dynamic>),
|
||||
)
|
||||
.toList();
|
||||
final users = usersJson.map((userJson) => PlexHomeUser.fromJson(userJson as Map<String, dynamic>)).toList();
|
||||
|
||||
return PlexHome(
|
||||
id: (json['id'] as num?)?.toInt() ?? 0,
|
||||
@@ -52,11 +48,9 @@ class PlexHome {
|
||||
|
||||
PlexHomeUser? get adminUser => users.where((user) => user.admin).firstOrNull;
|
||||
|
||||
List<PlexHomeUser> get managedUsers =>
|
||||
users.where((user) => !user.admin).toList();
|
||||
List<PlexHomeUser> get managedUsers => users.where((user) => !user.admin).toList();
|
||||
|
||||
List<PlexHomeUser> get restrictedUsers =>
|
||||
users.where((user) => user.restricted).toList();
|
||||
List<PlexHomeUser> get restrictedUsers => users.where((user) => user.restricted).toList();
|
||||
|
||||
PlexHomeUser? getUserByUUID(String uuid) {
|
||||
try {
|
||||
|
||||
@@ -43,8 +43,7 @@ class PlexLibrary with MultiServerFields {
|
||||
this.serverName,
|
||||
});
|
||||
|
||||
factory PlexLibrary.fromJson(Map<String, dynamic> json) =>
|
||||
_$PlexLibraryFromJson(json);
|
||||
factory PlexLibrary.fromJson(Map<String, dynamic> json) => _$PlexLibraryFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$PlexLibraryToJson(this);
|
||||
|
||||
|
||||
@@ -19,16 +19,15 @@ PlexLibrary _$PlexLibraryFromJson(Map<String, dynamic> json) => PlexLibrary(
|
||||
hidden: (json['hidden'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PlexLibraryToJson(PlexLibrary instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key,
|
||||
'title': instance.title,
|
||||
'type': instance.type,
|
||||
'agent': instance.agent,
|
||||
'scanner': instance.scanner,
|
||||
'language': instance.language,
|
||||
'uuid': instance.uuid,
|
||||
'updatedAt': instance.updatedAt,
|
||||
'createdAt': instance.createdAt,
|
||||
'hidden': instance.hidden,
|
||||
};
|
||||
Map<String, dynamic> _$PlexLibraryToJson(PlexLibrary instance) => <String, dynamic>{
|
||||
'key': instance.key,
|
||||
'title': instance.title,
|
||||
'type': instance.type,
|
||||
'agent': instance.agent,
|
||||
'scanner': instance.scanner,
|
||||
'language': instance.language,
|
||||
'uuid': instance.uuid,
|
||||
'updatedAt': instance.updatedAt,
|
||||
'createdAt': instance.createdAt,
|
||||
'hidden': instance.hidden,
|
||||
};
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
import '../utils/codec_utils.dart';
|
||||
|
||||
class PlexMediaInfo {
|
||||
final String videoUrl;
|
||||
final List<PlexAudioTrack> audioTracks;
|
||||
final List<PlexSubtitleTrack> subtitleTracks;
|
||||
final List<PlexChapter> chapters;
|
||||
final int? partId;
|
||||
|
||||
PlexMediaInfo({
|
||||
required this.videoUrl,
|
||||
required this.audioTracks,
|
||||
required this.subtitleTracks,
|
||||
required this.chapters,
|
||||
this.partId,
|
||||
});
|
||||
int? getPartId() => partId;
|
||||
}
|
||||
|
||||
/// Mixin for building track labels with a consistent pattern
|
||||
@@ -64,7 +69,7 @@ class PlexAudioTrack with TrackLabelBuilder {
|
||||
|
||||
String get label {
|
||||
final additionalParts = <String>[];
|
||||
if (codec != null) additionalParts.add(codec!.toUpperCase());
|
||||
if (codec != null) additionalParts.add(CodecUtils.formatAudioCodec(codec!));
|
||||
if (channels != null) additionalParts.add('${channels!}ch');
|
||||
return buildLabel(additionalParts);
|
||||
}
|
||||
@@ -115,39 +120,11 @@ class PlexSubtitleTrack with TrackLabelBuilder {
|
||||
if (!isExternal) return null;
|
||||
|
||||
// Determine file extension based on codec
|
||||
final ext = _getExtensionFromCodec(codec);
|
||||
final ext = CodecUtils.getSubtitleExtension(codec);
|
||||
|
||||
// Construct URL with authentication token
|
||||
return '$baseUrl$key.$ext?X-Plex-Token=$token';
|
||||
}
|
||||
|
||||
/// Maps Plex subtitle codec names to file extensions
|
||||
String _getExtensionFromCodec(String? codec) {
|
||||
if (codec == null) return 'srt';
|
||||
|
||||
switch (codec.toLowerCase()) {
|
||||
case 'subrip':
|
||||
case 'srt':
|
||||
return 'srt';
|
||||
case 'ass':
|
||||
return 'ass';
|
||||
case 'ssa':
|
||||
return 'ssa';
|
||||
case 'webvtt':
|
||||
case 'vtt':
|
||||
return 'vtt';
|
||||
case 'mov_text':
|
||||
return 'srt';
|
||||
case 'pgs':
|
||||
case 'hdmv_pgs_subtitle':
|
||||
return 'sup';
|
||||
case 'dvd_subtitle':
|
||||
case 'dvdsub':
|
||||
return 'sub';
|
||||
default:
|
||||
return 'srt'; // Default to SRT for unknown codecs
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class PlexChapter {
|
||||
@@ -158,20 +135,12 @@ class PlexChapter {
|
||||
final String? title;
|
||||
final String? thumb;
|
||||
|
||||
PlexChapter({
|
||||
required this.id,
|
||||
this.index,
|
||||
this.startTimeOffset,
|
||||
this.endTimeOffset,
|
||||
this.title,
|
||||
this.thumb,
|
||||
});
|
||||
PlexChapter({required this.id, this.index, this.startTimeOffset, this.endTimeOffset, this.title, this.thumb});
|
||||
|
||||
String get label => title ?? 'Chapter ${(index ?? 0) + 1}';
|
||||
|
||||
Duration get startTime => Duration(milliseconds: startTimeOffset ?? 0);
|
||||
Duration? get endTime =>
|
||||
endTimeOffset != null ? Duration(milliseconds: endTimeOffset!) : null;
|
||||
Duration? get endTime => endTimeOffset != null ? Duration(milliseconds: endTimeOffset!) : null;
|
||||
}
|
||||
|
||||
class PlexMarker {
|
||||
@@ -180,12 +149,7 @@ class PlexMarker {
|
||||
final int startTimeOffset;
|
||||
final int endTimeOffset;
|
||||
|
||||
PlexMarker({
|
||||
required this.id,
|
||||
required this.type,
|
||||
required this.startTimeOffset,
|
||||
required this.endTimeOffset,
|
||||
});
|
||||
PlexMarker({required this.id, required this.type, required this.startTimeOffset, required this.endTimeOffset});
|
||||
|
||||
Duration get startTime => Duration(milliseconds: startTimeOffset);
|
||||
Duration get endTime => Duration(milliseconds: endTimeOffset);
|
||||
@@ -198,3 +162,11 @@ class PlexMarker {
|
||||
return posMs >= startTimeOffset && posMs <= endTimeOffset;
|
||||
}
|
||||
}
|
||||
|
||||
/// Combined chapters and markers fetched in a single API call
|
||||
class PlaybackExtras {
|
||||
final List<PlexChapter> chapters;
|
||||
final List<PlexMarker> markers;
|
||||
|
||||
PlaybackExtras({required this.chapters, required this.markers});
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import '../utils/formatters.dart';
|
||||
import '../utils/codec_utils.dart';
|
||||
|
||||
class PlexMediaVersion {
|
||||
final int id;
|
||||
final String? videoResolution;
|
||||
@@ -23,9 +26,7 @@ class PlexMediaVersion {
|
||||
factory PlexMediaVersion.fromJson(Map<String, dynamic> json) {
|
||||
// Get the first Part key for playback
|
||||
final parts = json['Part'] as List<dynamic>?;
|
||||
final partKey = parts != null && parts.isNotEmpty
|
||||
? parts[0]['key'] as String? ?? ''
|
||||
: '';
|
||||
final partKey = parts != null && parts.isNotEmpty ? parts[0]['key'] as String? ?? '' : '';
|
||||
|
||||
return PlexMediaVersion(
|
||||
id: json['id'] as int? ?? 0,
|
||||
@@ -52,7 +53,7 @@ class PlexMediaVersion {
|
||||
|
||||
// Add codec
|
||||
if (videoCodec != null && videoCodec!.isNotEmpty) {
|
||||
parts.add(videoCodec!.toUpperCase());
|
||||
parts.add(CodecUtils.formatVideoCodec(videoCodec!));
|
||||
}
|
||||
|
||||
// Add container
|
||||
@@ -65,8 +66,7 @@ class PlexMediaVersion {
|
||||
|
||||
// Add bitrate in parentheses
|
||||
if (bitrate != null && bitrate! > 0) {
|
||||
final bitrateInMbps = (bitrate! / 1000).toStringAsFixed(1);
|
||||
label += ' ($bitrateInMbps Mbps)';
|
||||
label += ' (${ByteFormatter.formatBitrate(bitrate!)})';
|
||||
}
|
||||
|
||||
return label;
|
||||
|
||||
@@ -5,6 +5,34 @@ import 'plex_role.dart';
|
||||
|
||||
part 'plex_metadata.g.dart';
|
||||
|
||||
/// Media type enum for type-safe media type handling
|
||||
enum PlexMediaType {
|
||||
movie,
|
||||
show,
|
||||
season,
|
||||
episode,
|
||||
artist,
|
||||
album,
|
||||
track,
|
||||
collection,
|
||||
playlist,
|
||||
clip,
|
||||
photo,
|
||||
unknown;
|
||||
|
||||
/// Whether this type represents video content
|
||||
bool get isVideo => this == movie || this == episode || this == clip;
|
||||
|
||||
/// Whether this type is part of a show hierarchy
|
||||
bool get isShowRelated => this == show || this == season || this == episode;
|
||||
|
||||
/// Whether this type represents music content
|
||||
bool get isMusic => this == artist || this == album || this == track;
|
||||
|
||||
/// Whether this type can be played directly
|
||||
bool get isPlayable => isVideo || this == track;
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class PlexMetadata with MultiServerFields {
|
||||
final String ratingKey;
|
||||
@@ -55,13 +83,30 @@ class PlexMetadata with MultiServerFields {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
final String? serverName;
|
||||
|
||||
// Transient field for clear logo (extracted from Image array)
|
||||
String? _clearLogo;
|
||||
String? get clearLogo => _clearLogo;
|
||||
// Clear logo URL (extracted from Image array, but serialized for offline storage)
|
||||
final String? clearLogo;
|
||||
|
||||
/// Global unique identifier across all servers (serverId:ratingKey)
|
||||
String get globalKey => serverId != null ? '$serverId:$ratingKey' : ratingKey;
|
||||
|
||||
/// Parsed media type enum for type-safe comparisons
|
||||
PlexMediaType get mediaType {
|
||||
return switch (type.toLowerCase()) {
|
||||
'movie' => PlexMediaType.movie,
|
||||
'show' => PlexMediaType.show,
|
||||
'season' => PlexMediaType.season,
|
||||
'episode' => PlexMediaType.episode,
|
||||
'artist' => PlexMediaType.artist,
|
||||
'album' => PlexMediaType.album,
|
||||
'track' => PlexMediaType.track,
|
||||
'collection' => PlexMediaType.collection,
|
||||
'playlist' => PlexMediaType.playlist,
|
||||
'clip' => PlexMediaType.clip,
|
||||
'photo' => PlexMediaType.photo,
|
||||
_ => PlexMediaType.unknown,
|
||||
};
|
||||
}
|
||||
|
||||
PlexMetadata({
|
||||
required this.ratingKey,
|
||||
required this.key,
|
||||
@@ -103,6 +148,7 @@ class PlexMetadata with MultiServerFields {
|
||||
this.librarySectionID,
|
||||
this.serverId,
|
||||
this.serverName,
|
||||
this.clearLogo,
|
||||
});
|
||||
|
||||
/// Create a copy of this metadata with optional field overrides
|
||||
@@ -147,8 +193,9 @@ class PlexMetadata with MultiServerFields {
|
||||
int? librarySectionID,
|
||||
String? serverId,
|
||||
String? serverName,
|
||||
String? clearLogo,
|
||||
}) {
|
||||
final copy = PlexMetadata(
|
||||
return PlexMetadata(
|
||||
ratingKey: ratingKey ?? this.ratingKey,
|
||||
key: key ?? this.key,
|
||||
guid: guid ?? this.guid,
|
||||
@@ -189,32 +236,34 @@ class PlexMetadata with MultiServerFields {
|
||||
librarySectionID: librarySectionID ?? this.librarySectionID,
|
||||
serverId: serverId ?? this.serverId,
|
||||
serverName: serverName ?? this.serverName,
|
||||
clearLogo: clearLogo ?? this.clearLogo,
|
||||
);
|
||||
// Preserve clearLogo
|
||||
copy._clearLogo = _clearLogo;
|
||||
return copy;
|
||||
}
|
||||
|
||||
// Extract clearLogo from Image array in raw JSON
|
||||
void _extractClearLogo(Map<String, dynamic> json) {
|
||||
if (!json.containsKey('Image')) return;
|
||||
/// Extract clearLogo from Image array in raw JSON
|
||||
static String? _extractClearLogoFromJson(Map<String, dynamic> json) {
|
||||
if (!json.containsKey('Image')) return null;
|
||||
|
||||
final images = json['Image'] as List?;
|
||||
if (images == null) return;
|
||||
if (images == null) return null;
|
||||
|
||||
for (var image in images) {
|
||||
if (image is Map && image['type'] == 'clearLogo') {
|
||||
_clearLogo = image['url'] as String?;
|
||||
return;
|
||||
return image['url'] as String?;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Custom factory that extracts clearLogo
|
||||
/// Create from JSON with clearLogo extracted from Image array
|
||||
factory PlexMetadata.fromJsonWithImages(Map<String, dynamic> json) {
|
||||
final metadata = PlexMetadata.fromJson(json);
|
||||
metadata._extractClearLogo(json);
|
||||
return metadata;
|
||||
// Extract clearLogo before parsing
|
||||
final clearLogoUrl = _extractClearLogoFromJson(json);
|
||||
// Add it to the json so it gets parsed
|
||||
if (clearLogoUrl != null) {
|
||||
json['clearLogo'] = clearLogoUrl;
|
||||
}
|
||||
return PlexMetadata.fromJson(json);
|
||||
}
|
||||
|
||||
// Helper to get the display title (show name for episodes/seasons, title otherwise)
|
||||
@@ -222,8 +271,7 @@ class PlexMetadata with MultiServerFields {
|
||||
final itemType = type.toLowerCase();
|
||||
|
||||
// For episodes and seasons, prefer grandparent title (show name)
|
||||
if ((itemType == 'episode' || itemType == 'season') &&
|
||||
grandparentTitle != null) {
|
||||
if ((itemType == 'episode' || itemType == 'season') && grandparentTitle != null) {
|
||||
return grandparentTitle!;
|
||||
}
|
||||
// For seasons without grandparent, check if this IS the show (parentTitle might have show name)
|
||||
@@ -239,8 +287,7 @@ class PlexMetadata with MultiServerFields {
|
||||
|
||||
if (itemType == 'episode' || itemType == 'season') {
|
||||
// If we showed grandparent/parent as title, show this item's title as subtitle
|
||||
if (grandparentTitle != null ||
|
||||
(itemType == 'season' && parentTitle != null)) {
|
||||
if (grandparentTitle != null || (itemType == 'season' && parentTitle != null)) {
|
||||
return title;
|
||||
}
|
||||
}
|
||||
@@ -279,8 +326,7 @@ class PlexMetadata with MultiServerFields {
|
||||
return viewCount != null && viewCount! > 0;
|
||||
}
|
||||
|
||||
factory PlexMetadata.fromJson(Map<String, dynamic> json) =>
|
||||
_$PlexMetadataFromJson(json);
|
||||
factory PlexMetadata.fromJson(Map<String, dynamic> json) => _$PlexMetadataFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$PlexMetadataToJson(this);
|
||||
}
|
||||
|
||||
@@ -39,54 +39,53 @@ PlexMetadata _$PlexMetadataFromJson(Map<String, dynamic> json) => PlexMetadata(
|
||||
leafCount: (json['leafCount'] as num?)?.toInt(),
|
||||
viewedLeafCount: (json['viewedLeafCount'] as num?)?.toInt(),
|
||||
childCount: (json['childCount'] as num?)?.toInt(),
|
||||
role: (json['Role'] as List<dynamic>?)
|
||||
?.map((e) => PlexRole.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
role: (json['Role'] as List<dynamic>?)?.map((e) => PlexRole.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
audioLanguage: json['audioLanguage'] as String?,
|
||||
subtitleLanguage: json['subtitleLanguage'] as String?,
|
||||
playlistItemID: (json['playlistItemID'] as num?)?.toInt(),
|
||||
playQueueItemID: (json['playQueueItemID'] as num?)?.toInt(),
|
||||
librarySectionID: (json['librarySectionID'] as num?)?.toInt(),
|
||||
clearLogo: json['clearLogo'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PlexMetadataToJson(PlexMetadata instance) =>
|
||||
<String, dynamic>{
|
||||
'ratingKey': instance.ratingKey,
|
||||
'key': instance.key,
|
||||
'guid': instance.guid,
|
||||
'studio': instance.studio,
|
||||
'type': instance.type,
|
||||
'title': instance.title,
|
||||
'contentRating': instance.contentRating,
|
||||
'summary': instance.summary,
|
||||
'rating': instance.rating,
|
||||
'audienceRating': instance.audienceRating,
|
||||
'year': instance.year,
|
||||
'thumb': instance.thumb,
|
||||
'art': instance.art,
|
||||
'duration': instance.duration,
|
||||
'addedAt': instance.addedAt,
|
||||
'updatedAt': instance.updatedAt,
|
||||
'lastViewedAt': instance.lastViewedAt,
|
||||
'grandparentTitle': instance.grandparentTitle,
|
||||
'grandparentThumb': instance.grandparentThumb,
|
||||
'grandparentArt': instance.grandparentArt,
|
||||
'grandparentRatingKey': instance.grandparentRatingKey,
|
||||
'parentTitle': instance.parentTitle,
|
||||
'parentThumb': instance.parentThumb,
|
||||
'parentRatingKey': instance.parentRatingKey,
|
||||
'parentIndex': instance.parentIndex,
|
||||
'index': instance.index,
|
||||
'grandparentTheme': instance.grandparentTheme,
|
||||
'viewOffset': instance.viewOffset,
|
||||
'viewCount': instance.viewCount,
|
||||
'leafCount': instance.leafCount,
|
||||
'viewedLeafCount': instance.viewedLeafCount,
|
||||
'childCount': instance.childCount,
|
||||
'Role': instance.role,
|
||||
'audioLanguage': instance.audioLanguage,
|
||||
'subtitleLanguage': instance.subtitleLanguage,
|
||||
'playlistItemID': instance.playlistItemID,
|
||||
'playQueueItemID': instance.playQueueItemID,
|
||||
'librarySectionID': instance.librarySectionID,
|
||||
};
|
||||
Map<String, dynamic> _$PlexMetadataToJson(PlexMetadata instance) => <String, dynamic>{
|
||||
'ratingKey': instance.ratingKey,
|
||||
'key': instance.key,
|
||||
'guid': instance.guid,
|
||||
'studio': instance.studio,
|
||||
'type': instance.type,
|
||||
'title': instance.title,
|
||||
'contentRating': instance.contentRating,
|
||||
'summary': instance.summary,
|
||||
'rating': instance.rating,
|
||||
'audienceRating': instance.audienceRating,
|
||||
'year': instance.year,
|
||||
'thumb': instance.thumb,
|
||||
'art': instance.art,
|
||||
'duration': instance.duration,
|
||||
'addedAt': instance.addedAt,
|
||||
'updatedAt': instance.updatedAt,
|
||||
'lastViewedAt': instance.lastViewedAt,
|
||||
'grandparentTitle': instance.grandparentTitle,
|
||||
'grandparentThumb': instance.grandparentThumb,
|
||||
'grandparentArt': instance.grandparentArt,
|
||||
'grandparentRatingKey': instance.grandparentRatingKey,
|
||||
'parentTitle': instance.parentTitle,
|
||||
'parentThumb': instance.parentThumb,
|
||||
'parentRatingKey': instance.parentRatingKey,
|
||||
'parentIndex': instance.parentIndex,
|
||||
'index': instance.index,
|
||||
'grandparentTheme': instance.grandparentTheme,
|
||||
'viewOffset': instance.viewOffset,
|
||||
'viewCount': instance.viewCount,
|
||||
'leafCount': instance.leafCount,
|
||||
'viewedLeafCount': instance.viewedLeafCount,
|
||||
'childCount': instance.childCount,
|
||||
'Role': instance.role,
|
||||
'audioLanguage': instance.audioLanguage,
|
||||
'subtitleLanguage': instance.subtitleLanguage,
|
||||
'playlistItemID': instance.playlistItemID,
|
||||
'playQueueItemID': instance.playQueueItemID,
|
||||
'librarySectionID': instance.librarySectionID,
|
||||
'clearLogo': instance.clearLogo,
|
||||
};
|
||||
|
||||
@@ -94,8 +94,7 @@ class PlexPlaylist with MultiServerFields {
|
||||
/// Playlists don't track viewed leaf count
|
||||
int? get viewedLeafCount => null;
|
||||
|
||||
factory PlexPlaylist.fromJson(Map<String, dynamic> json) =>
|
||||
_$PlexPlaylistFromJson(json);
|
||||
factory PlexPlaylist.fromJson(Map<String, dynamic> json) => _$PlexPlaylistFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$PlexPlaylistToJson(this);
|
||||
|
||||
|
||||
@@ -26,23 +26,22 @@ PlexPlaylist _$PlexPlaylistFromJson(Map<String, dynamic> json) => PlexPlaylist(
|
||||
thumb: json['thumb'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PlexPlaylistToJson(PlexPlaylist instance) =>
|
||||
<String, dynamic>{
|
||||
'ratingKey': instance.ratingKey,
|
||||
'key': instance.key,
|
||||
'type': instance.type,
|
||||
'title': instance.title,
|
||||
'summary': instance.summary,
|
||||
'smart': instance.smart,
|
||||
'playlistType': instance.playlistType,
|
||||
'duration': instance.duration,
|
||||
'leafCount': instance.leafCount,
|
||||
'composite': instance.composite,
|
||||
'addedAt': instance.addedAt,
|
||||
'updatedAt': instance.updatedAt,
|
||||
'lastViewedAt': instance.lastViewedAt,
|
||||
'viewCount': instance.viewCount,
|
||||
'content': instance.content,
|
||||
'guid': instance.guid,
|
||||
'thumb': instance.thumb,
|
||||
};
|
||||
Map<String, dynamic> _$PlexPlaylistToJson(PlexPlaylist instance) => <String, dynamic>{
|
||||
'ratingKey': instance.ratingKey,
|
||||
'key': instance.key,
|
||||
'type': instance.type,
|
||||
'title': instance.title,
|
||||
'summary': instance.summary,
|
||||
'smart': instance.smart,
|
||||
'playlistType': instance.playlistType,
|
||||
'duration': instance.duration,
|
||||
'leafCount': instance.leafCount,
|
||||
'composite': instance.composite,
|
||||
'addedAt': instance.addedAt,
|
||||
'updatedAt': instance.updatedAt,
|
||||
'lastViewedAt': instance.lastViewedAt,
|
||||
'viewCount': instance.viewCount,
|
||||
'content': instance.content,
|
||||
'guid': instance.guid,
|
||||
'thumb': instance.thumb,
|
||||
};
|
||||
|
||||
@@ -12,18 +12,9 @@ class PlexRole {
|
||||
final String? thumb;
|
||||
final int? count;
|
||||
|
||||
PlexRole({
|
||||
this.id,
|
||||
this.filter,
|
||||
required this.tag,
|
||||
this.tagKey,
|
||||
this.role,
|
||||
this.thumb,
|
||||
this.count,
|
||||
});
|
||||
PlexRole({this.id, this.filter, required this.tag, this.tagKey, this.role, this.thumb, this.count});
|
||||
|
||||
factory PlexRole.fromJson(Map<String, dynamic> json) =>
|
||||
_$PlexRoleFromJson(json);
|
||||
factory PlexRole.fromJson(Map<String, dynamic> json) => _$PlexRoleFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$PlexRoleToJson(this);
|
||||
}
|
||||
|
||||
@@ -4,12 +4,7 @@ class PlexSort {
|
||||
final String title;
|
||||
final String? defaultDirection;
|
||||
|
||||
PlexSort({
|
||||
required this.key,
|
||||
this.descKey,
|
||||
required this.title,
|
||||
this.defaultDirection,
|
||||
});
|
||||
PlexSort({required this.key, this.descKey, required this.title, this.defaultDirection});
|
||||
|
||||
factory PlexSort.fromJson(Map<String, dynamic> json) {
|
||||
return PlexSort(
|
||||
|
||||
@@ -34,8 +34,7 @@ class PlexUserProfile {
|
||||
|
||||
return PlexUserProfile(
|
||||
autoSelectAudio: profile['autoSelectAudio'] as bool? ?? true,
|
||||
defaultAudioAccessibility:
|
||||
profile['defaultAudioAccessibility'] as int? ?? 0,
|
||||
defaultAudioAccessibility: profile['defaultAudioAccessibility'] as int? ?? 0,
|
||||
defaultAudioLanguage: profile['defaultAudioLanguage'] as String?,
|
||||
defaultAudioLanguages: profile['defaultAudioLanguages'] != null
|
||||
? List<String>.from(profile['defaultAudioLanguages'] as List)
|
||||
@@ -45,8 +44,7 @@ class PlexUserProfile {
|
||||
? List<String>.from(profile['defaultSubtitleLanguages'] as List)
|
||||
: null,
|
||||
autoSelectSubtitle: profile['autoSelectSubtitle'] as int? ?? 0,
|
||||
defaultSubtitleAccessibility:
|
||||
profile['defaultSubtitleAccessibility'] as int? ?? 0,
|
||||
defaultSubtitleAccessibility: profile['defaultSubtitleAccessibility'] as int? ?? 0,
|
||||
defaultSubtitleForced: profile['defaultSubtitleForced'] as int? ?? 1,
|
||||
watchedIndicator: profile['watchedIndicator'] as int? ?? 1,
|
||||
mediaReviewsVisibility: profile['mediaReviewsVisibility'] as int? ?? 0,
|
||||
|
||||
@@ -13,11 +13,7 @@ class PlexVideoPlaybackData {
|
||||
/// Available media versions/qualities for this content
|
||||
final List<PlexMediaVersion> availableVersions;
|
||||
|
||||
PlexVideoPlaybackData({
|
||||
required this.videoUrl,
|
||||
required this.mediaInfo,
|
||||
required this.availableVersions,
|
||||
});
|
||||
PlexVideoPlaybackData({required this.videoUrl, required this.mediaInfo, required this.availableVersions});
|
||||
|
||||
/// Returns true if this playback data has a valid video URL
|
||||
bool get hasValidVideoUrl => videoUrl != null && videoUrl!.isNotEmpty;
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
import 'dart:io';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
/// Utility class for loading font assets for libass subtitle rendering.
|
||||
///
|
||||
/// Extracts font files from Flutter assets to the app's cache directory to ensure
|
||||
/// comprehensive Unicode coverage (including CJK characters) for subtitles.
|
||||
class SubtitleFontLoader {
|
||||
static const String _fontAssetPath = 'assets/go-noto-current-regular.ttf';
|
||||
static const String _fontName = 'Go Noto Current-Regular';
|
||||
|
||||
/// Loads the subtitle font from assets to the cache directory.
|
||||
/// Returns the directory path containing the font file.
|
||||
static Future<String?> loadSubtitleFont() async {
|
||||
try {
|
||||
// Get the app's cache directory
|
||||
final cacheDir = await getTemporaryDirectory();
|
||||
final fontDir = Directory(path.join(cacheDir.path, 'subtitle_fonts'));
|
||||
|
||||
// Create fonts directory if it doesn't exist
|
||||
if (!await fontDir.exists()) {
|
||||
await fontDir.create(recursive: true);
|
||||
}
|
||||
|
||||
final fontFile = File(path.join(fontDir.path, 'go-noto-current-regular.ttf'));
|
||||
|
||||
// Load font from assets and write to cache if it doesn't exist
|
||||
if (!await fontFile.exists()) {
|
||||
final fontData = await rootBundle.load(_fontAssetPath);
|
||||
await fontFile.writeAsBytes(fontData.buffer.asUint8List());
|
||||
}
|
||||
|
||||
return fontDir.path;
|
||||
} catch (e) {
|
||||
// Return null if font loading fails - libass will fall back gracefully
|
||||
if (kDebugMode) {
|
||||
debugPrint('Failed to load subtitle font: $e');
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the font name to be used with libass.
|
||||
static String get fontName => _fontName;
|
||||
|
||||
/// Returns the font asset path.
|
||||
static String get fontAssetPath => _fontAssetPath;
|
||||
}
|
||||
@@ -0,0 +1,265 @@
|
||||
/// Log level for player messages.
|
||||
enum PlayerLogLevel {
|
||||
/// No logging.
|
||||
none,
|
||||
|
||||
/// Fatal errors only.
|
||||
fatal,
|
||||
|
||||
/// Errors.
|
||||
error,
|
||||
|
||||
/// Warnings.
|
||||
warn,
|
||||
|
||||
/// Informational messages.
|
||||
info,
|
||||
|
||||
/// Verbose output.
|
||||
verbose,
|
||||
|
||||
/// Debug messages.
|
||||
debug,
|
||||
|
||||
/// Trace-level output (very verbose).
|
||||
trace,
|
||||
}
|
||||
|
||||
/// Represents an audio track in the media.
|
||||
class AudioTrack {
|
||||
/// Unique identifier for the track.
|
||||
final String id;
|
||||
|
||||
/// Human-readable title of the track.
|
||||
final String? title;
|
||||
|
||||
/// Language code (e.g., 'eng', 'jpn').
|
||||
final String? language;
|
||||
|
||||
/// Audio codec (e.g., 'aac', 'ac3', 'dts').
|
||||
final String? codec;
|
||||
|
||||
/// Number of audio channels.
|
||||
final int? channels;
|
||||
|
||||
/// Alias for channels (media_kit compatibility).
|
||||
int? get channelsCount => channels;
|
||||
|
||||
/// Sample rate in Hz.
|
||||
final int? sampleRate;
|
||||
|
||||
/// Bitrate in bits per second.
|
||||
final int? bitrate;
|
||||
|
||||
/// Whether this is the default track.
|
||||
final bool isDefault;
|
||||
|
||||
/// Whether this track is forced.
|
||||
final bool isForced;
|
||||
|
||||
const AudioTrack({
|
||||
required this.id,
|
||||
this.title,
|
||||
this.language,
|
||||
this.codec,
|
||||
this.channels,
|
||||
this.sampleRate,
|
||||
this.bitrate,
|
||||
this.isDefault = false,
|
||||
this.isForced = false,
|
||||
});
|
||||
|
||||
/// Auto-select track.
|
||||
static const auto = AudioTrack(id: 'auto', title: 'Auto');
|
||||
|
||||
/// Disable audio.
|
||||
static const off = AudioTrack(id: 'no', title: 'Off');
|
||||
|
||||
/// Returns a display name for the track.
|
||||
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;
|
||||
}
|
||||
|
||||
/// Represents a subtitle track in the media.
|
||||
class SubtitleTrack {
|
||||
/// Unique identifier for the track.
|
||||
final String id;
|
||||
|
||||
/// Human-readable title of the track.
|
||||
final String? title;
|
||||
|
||||
/// Language code (e.g., 'eng', 'jpn').
|
||||
final String? language;
|
||||
|
||||
/// Subtitle codec/format (e.g., 'subrip', 'ass', 'pgs').
|
||||
final String? codec;
|
||||
|
||||
/// Whether this is the default track.
|
||||
final bool isDefault;
|
||||
|
||||
/// Whether this track is forced (e.g., for foreign language segments).
|
||||
final bool isForced;
|
||||
|
||||
/// Whether this is an external subtitle file.
|
||||
final bool isExternal;
|
||||
|
||||
/// URI of external subtitle file (if isExternal is true).
|
||||
final String? uri;
|
||||
|
||||
const SubtitleTrack({
|
||||
required this.id,
|
||||
this.title,
|
||||
this.language,
|
||||
this.codec,
|
||||
this.isDefault = false,
|
||||
this.isForced = false,
|
||||
this.isExternal = false,
|
||||
this.uri,
|
||||
});
|
||||
|
||||
/// Create a subtitle track from an external URI.
|
||||
factory SubtitleTrack.uri(String uri, {String? title, String? language}) {
|
||||
return SubtitleTrack(id: 'external:$uri', title: title, language: language, isExternal: true, uri: uri);
|
||||
}
|
||||
|
||||
/// Auto-select track.
|
||||
static const auto = SubtitleTrack(id: 'auto', title: 'Auto');
|
||||
|
||||
/// Disable subtitles.
|
||||
static const off = SubtitleTrack(id: 'no', title: 'Off');
|
||||
|
||||
/// Returns a display name for the track.
|
||||
String get displayName {
|
||||
if (title != null && title!.isNotEmpty) return title!;
|
||||
if (language != null && language!.isNotEmpty) return language!;
|
||||
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;
|
||||
}
|
||||
|
||||
/// Container for all available tracks in the media.
|
||||
class Tracks {
|
||||
/// Available audio tracks.
|
||||
final List<AudioTrack> audio;
|
||||
|
||||
/// Available subtitle tracks.
|
||||
final List<SubtitleTrack> subtitle;
|
||||
|
||||
const Tracks({this.audio = const [], this.subtitle = const []});
|
||||
|
||||
/// Creates a copy with the given fields replaced.
|
||||
Tracks copyWith({List<AudioTrack>? audio, List<SubtitleTrack>? subtitle}) {
|
||||
return Tracks(audio: audio ?? this.audio, subtitle: subtitle ?? this.subtitle);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => 'Tracks(audio: ${audio.length}, subtitle: ${subtitle.length})';
|
||||
}
|
||||
|
||||
/// Represents the currently selected tracks.
|
||||
class TrackSelection {
|
||||
/// Currently selected audio track.
|
||||
final AudioTrack? audio;
|
||||
|
||||
/// Currently selected subtitle track.
|
||||
final SubtitleTrack? subtitle;
|
||||
|
||||
const TrackSelection({this.audio, this.subtitle});
|
||||
|
||||
/// Creates a copy with the given fields replaced.
|
||||
TrackSelection copyWith({AudioTrack? audio, SubtitleTrack? subtitle}) {
|
||||
return TrackSelection(audio: audio ?? this.audio, subtitle: subtitle ?? this.subtitle);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => 'TrackSelection(audio: $audio, subtitle: $subtitle)';
|
||||
}
|
||||
|
||||
/// Represents an audio output device.
|
||||
class AudioDevice {
|
||||
/// Unique identifier for the device.
|
||||
final String name;
|
||||
|
||||
/// Human-readable description of the device.
|
||||
final String description;
|
||||
|
||||
const AudioDevice({required this.name, this.description = ''});
|
||||
|
||||
/// Default/auto audio device.
|
||||
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;
|
||||
}
|
||||
|
||||
/// A log entry from the player.
|
||||
class PlayerLog {
|
||||
/// The log level of this message.
|
||||
final PlayerLogLevel level;
|
||||
|
||||
/// The prefix/category of the log message (e.g., 'cplayer', 'ffmpeg').
|
||||
final String prefix;
|
||||
|
||||
/// The log message text.
|
||||
final String text;
|
||||
|
||||
const PlayerLog({required this.level, required this.prefix, required this.text});
|
||||
|
||||
@override
|
||||
String toString() => '[$prefix] ${level.name}: $text';
|
||||
}
|
||||
|
||||
/// Represents a media source for the player.
|
||||
class Media {
|
||||
/// The URI of the media (file path, HTTP URL, etc.).
|
||||
final String uri;
|
||||
|
||||
/// Optional HTTP headers for network requests.
|
||||
final Map<String, String>? headers;
|
||||
|
||||
/// Optional start position for playback.
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/// MPV Player library for Flutter.
|
||||
///
|
||||
/// This library provides a platform-agnostic interface for video playback
|
||||
/// using MPV as the underlying player engine.
|
||||
///
|
||||
/// ## Features
|
||||
///
|
||||
/// - Stream-based reactive state updates
|
||||
/// - Audio passthrough support for lossless audio
|
||||
/// - Subtitle rendering with libass
|
||||
/// - Hardware-accelerated decoding
|
||||
/// - Cross-platform support (macOS, iOS, Android, Windows, Linux)
|
||||
///
|
||||
/// ## Usage
|
||||
///
|
||||
/// ```dart
|
||||
/// import 'package:flutter_application_1/mpv/mpv.dart';
|
||||
///
|
||||
/// // Create a player
|
||||
/// final player = Player();
|
||||
///
|
||||
/// // Configure player properties
|
||||
/// await player.setProperty('hwdec', 'auto');
|
||||
/// await player.setProperty('demuxer-max-bytes', '150000000');
|
||||
/// await player.setAudioPassthrough(true);
|
||||
///
|
||||
/// // Open and play media
|
||||
/// await player.open(Media('https://example.com/video.mp4'));
|
||||
///
|
||||
/// // Listen to state changes
|
||||
/// player.streams.position.listen((position) {
|
||||
/// print('Position: $position');
|
||||
/// });
|
||||
///
|
||||
/// // Display video
|
||||
/// Video(
|
||||
/// player: player,
|
||||
/// controls: (context) => MyCustomControls(),
|
||||
/// )
|
||||
///
|
||||
/// // Clean up
|
||||
/// await player.dispose();
|
||||
/// ```
|
||||
library;
|
||||
|
||||
// Player
|
||||
export 'player/player.dart';
|
||||
export 'player/player_state.dart';
|
||||
export 'player/player_streams.dart';
|
||||
|
||||
// Models
|
||||
export 'models.dart';
|
||||
|
||||
// Video
|
||||
export 'video.dart';
|
||||
@@ -0,0 +1,27 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../player_native.dart';
|
||||
|
||||
/// Linux implementation of [Player].
|
||||
///
|
||||
/// Uses libmpv with OpenGL rendering via GtkGLArea.
|
||||
/// The mpv video is rendered to a GtkGLArea positioned behind
|
||||
/// the Flutter view using a GtkOverlay, with transparent regions
|
||||
/// in the Flutter UI allowing the video to show through.
|
||||
class PlayerLinux extends PlayerNative {
|
||||
static const _methodChannel = MethodChannel('com.plezy/mpv_player');
|
||||
|
||||
@override
|
||||
int? get textureId => null; // Uses GtkGLArea, not Flutter texture
|
||||
|
||||
/// Sets the visibility of the video controls overlay.
|
||||
///
|
||||
/// On Linux, due to Flutter's lack of transparency support in GtkOverlay,
|
||||
/// we hide the video layer when controls are visible and show it when
|
||||
/// controls are hidden. This provides a workaround for the transparency
|
||||
/// limitation.
|
||||
@override
|
||||
Future<void> setControlsVisible(bool visible) async {
|
||||
await _methodChannel.invokeMethod('setControlsVisible', {'visible': visible});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../player_native.dart';
|
||||
import '../video_rect_support.dart';
|
||||
|
||||
/// Windows implementation of [Player].
|
||||
///
|
||||
/// Uses libmpv via platform channels with native window embedding.
|
||||
/// The mpv video window is positioned behind the Flutter window,
|
||||
/// with transparent regions allowing the video to show through.
|
||||
class PlayerWindows extends PlayerNative with VideoRectSupport {
|
||||
static const _methodChannel = MethodChannel('com.plezy/mpv_player');
|
||||
|
||||
@override
|
||||
int? get textureId => null; // Uses native window embedding, not Flutter texture
|
||||
|
||||
@override
|
||||
Future<void> setVideoRect({
|
||||
required int left,
|
||||
required int top,
|
||||
required int right,
|
||||
required int bottom,
|
||||
required double devicePixelRatio,
|
||||
}) async {
|
||||
await _methodChannel.invokeMethod('setVideoRect', {
|
||||
'left': left,
|
||||
'top': top,
|
||||
'right': right,
|
||||
'bottom': bottom,
|
||||
'devicePixelRatio': devicePixelRatio,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import '../models.dart';
|
||||
import 'player_native.dart';
|
||||
import 'player_state.dart';
|
||||
import 'player_streams.dart';
|
||||
import 'platform/player_linux.dart';
|
||||
import 'platform/player_windows.dart';
|
||||
|
||||
/// Abstract interface for the video player.
|
||||
///
|
||||
/// This interface defines all playback control methods, state access,
|
||||
/// and reactive streams for the video player.
|
||||
///
|
||||
/// Example usage:
|
||||
/// ```dart
|
||||
/// final player = Player();
|
||||
/// await player.open(Media('https://example.com/video.mp4'));
|
||||
/// await player.play();
|
||||
///
|
||||
/// // Configure player properties
|
||||
/// await player.setProperty('hwdec', 'auto');
|
||||
/// await player.setProperty('demuxer-max-bytes', '150000000');
|
||||
///
|
||||
/// // Listen to position updates
|
||||
/// player.streams.position.listen((position) {
|
||||
/// print('Position: $position');
|
||||
/// });
|
||||
///
|
||||
/// // Access current state
|
||||
/// print('Playing: ${player.state.playing}');
|
||||
/// ```
|
||||
abstract class Player {
|
||||
/// Current synchronous state snapshot.
|
||||
///
|
||||
/// Use this for immediate state access in UI.
|
||||
PlayerState get state;
|
||||
|
||||
/// Reactive streams for state changes.
|
||||
///
|
||||
/// Use these for reactive UI updates.
|
||||
PlayerStreams get streams;
|
||||
|
||||
/// Texture ID for Flutter's Texture widget (video rendering).
|
||||
///
|
||||
/// This is set by the platform implementation when video
|
||||
/// rendering is initialized. Returns null if not ready.
|
||||
int? get textureId;
|
||||
|
||||
// ============================================
|
||||
// Playback Control
|
||||
// ============================================
|
||||
|
||||
/// Open a media source for playback.
|
||||
///
|
||||
/// [media] - The media source to open.
|
||||
/// [play] - Whether to start playback immediately (default: true).
|
||||
Future<void> open(Media media, {bool play = true});
|
||||
|
||||
/// Start or resume playback.
|
||||
Future<void> play();
|
||||
|
||||
/// Pause playback.
|
||||
Future<void> pause();
|
||||
|
||||
/// Toggle between play and pause.
|
||||
Future<void> playOrPause();
|
||||
|
||||
/// Stop playback and reset position.
|
||||
Future<void> stop();
|
||||
|
||||
/// Seek to a specific position.
|
||||
Future<void> seek(Duration position);
|
||||
|
||||
// ============================================
|
||||
// Track Selection
|
||||
// ============================================
|
||||
|
||||
/// Select an audio track.
|
||||
Future<void> selectAudioTrack(AudioTrack track);
|
||||
|
||||
/// Select a subtitle track.
|
||||
///
|
||||
/// Pass [SubtitleTrack.off] to disable subtitles.
|
||||
Future<void> selectSubtitleTrack(SubtitleTrack track);
|
||||
|
||||
/// Add an external subtitle track.
|
||||
///
|
||||
/// [uri] - URL or path to the subtitle file.
|
||||
/// [title] - Optional display title.
|
||||
/// [language] - Optional language code.
|
||||
/// [select] - Whether to select this track immediately.
|
||||
Future<void> addSubtitleTrack({required String uri, String? title, String? language, bool select = false});
|
||||
|
||||
// ============================================
|
||||
// Volume and Rate
|
||||
// ============================================
|
||||
|
||||
/// Set the playback volume.
|
||||
///
|
||||
/// [volume] - Volume level from 0.0 (muted) to 100.0 (max).
|
||||
Future<void> setVolume(double volume);
|
||||
|
||||
/// Set the playback rate/speed.
|
||||
///
|
||||
/// [rate] - Playback rate from 0.25 to 4.0 (1.0 = normal speed).
|
||||
Future<void> setRate(double rate);
|
||||
|
||||
/// Set the audio output device.
|
||||
///
|
||||
/// [device] - The audio device to use.
|
||||
Future<void> setAudioDevice(AudioDevice device);
|
||||
|
||||
// ============================================
|
||||
// MPV Properties (Advanced)
|
||||
// ============================================
|
||||
|
||||
/// Set an MPV property by name.
|
||||
///
|
||||
/// Common properties:
|
||||
/// - 'hwdec': Hardware decoding mode ('auto', 'no', 'videotoolbox', etc.)
|
||||
/// - 'demuxer-max-bytes': Buffer size in bytes
|
||||
/// - 'audio-delay': Audio sync offset in seconds (e.g., '0.5')
|
||||
/// - 'sub-delay': Subtitle sync offset in seconds
|
||||
/// - 'sub-font': Subtitle font name
|
||||
/// - 'sub-font-size': Subtitle font size
|
||||
/// - 'sub-color': Subtitle text color
|
||||
/// - 'sub-back-color': Subtitle background color
|
||||
/// - 'sub-border-size': Subtitle border size
|
||||
/// - 'sub-margin-y': Vertical subtitle margin
|
||||
/// - 'sub-ass': Enable/disable ASS subtitle rendering ('yes'/'no')
|
||||
/// - 'audio-exclusive': Exclusive audio mode ('yes'/'no')
|
||||
/// - 'audio-spdif': Audio passthrough formats (e.g., 'ac3,eac3,dts,truehd')
|
||||
Future<void> setProperty(String name, String value);
|
||||
|
||||
/// Get an MPV property value by name.
|
||||
Future<String?> getProperty(String name);
|
||||
|
||||
/// Execute a raw MPV command.
|
||||
///
|
||||
/// [args] - Command and arguments as a list of strings.
|
||||
Future<void> command(List<String> args);
|
||||
|
||||
// ============================================
|
||||
// Passthrough Mode (Audio)
|
||||
// ============================================
|
||||
|
||||
/// Enable or disable audio passthrough mode.
|
||||
///
|
||||
/// When enabled, supported audio codecs (AC3, DTS, etc.) will be
|
||||
/// passed through to the audio device without decoding.
|
||||
Future<void> setAudioPassthrough(bool enabled);
|
||||
|
||||
// ============================================
|
||||
// Visibility (macOS Metal Layer)
|
||||
// ============================================
|
||||
|
||||
/// Show or hide the video rendering layer.
|
||||
///
|
||||
/// On macOS, this controls the Metal layer visibility.
|
||||
/// On other platforms, this may have no effect.
|
||||
///
|
||||
/// Returns true if the operation was successful.
|
||||
Future<bool> setVisible(bool visible);
|
||||
|
||||
/// Notify the player about controls visibility.
|
||||
///
|
||||
/// On Linux, due to Flutter's lack of transparency support in GtkOverlay,
|
||||
/// the video layer is hidden when controls are visible and shown when
|
||||
/// controls are hidden. On other platforms, this is a no-op.
|
||||
Future<void> setControlsVisible(bool visible);
|
||||
|
||||
/// Update the video frame/surface dimensions.
|
||||
///
|
||||
/// On iOS/macOS, this updates the Metal layer's frame to match the current
|
||||
/// window size. Call this when the layout changes (e.g., device rotation).
|
||||
/// On other platforms, this is a no-op.
|
||||
Future<void> updateFrame();
|
||||
|
||||
// ============================================
|
||||
// Lifecycle
|
||||
// ============================================
|
||||
|
||||
/// Dispose of the player and release resources.
|
||||
///
|
||||
/// After calling this, the player instance should not be used.
|
||||
Future<void> dispose();
|
||||
|
||||
// ============================================
|
||||
// Factory
|
||||
// ============================================
|
||||
|
||||
/// Creates a new player instance.
|
||||
///
|
||||
/// Returns a platform-specific implementation:
|
||||
/// - macOS/iOS/Android: [PlayerNative] using MPVKit/libmpv with texture rendering
|
||||
/// - Windows: [PlayerWindows] using libmpv with native window embedding
|
||||
/// - Linux: [PlayerLinux] using libmpv with OpenGL rendering via GtkGLArea
|
||||
factory Player() {
|
||||
if (Platform.isMacOS || Platform.isIOS || Platform.isAndroid) {
|
||||
return PlayerNative();
|
||||
}
|
||||
if (Platform.isWindows) {
|
||||
return PlayerWindows();
|
||||
}
|
||||
if (Platform.isLinux) {
|
||||
return PlayerLinux();
|
||||
}
|
||||
throw UnsupportedError('Player is not supported on this platform');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,609 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../../utils/app_logger.dart';
|
||||
import '../font_loader.dart';
|
||||
import '../models.dart';
|
||||
import 'player.dart';
|
||||
import 'player_state.dart';
|
||||
import 'player_streams.dart';
|
||||
|
||||
/// Shared native implementation of [Player] for iOS and macOS.
|
||||
/// Uses MPVKit via platform channels with Metal rendering.
|
||||
class PlayerNative implements Player {
|
||||
static const _methodChannel = MethodChannel('com.plezy/mpv_player');
|
||||
static const _eventChannel = EventChannel('com.plezy/mpv_player/events');
|
||||
|
||||
PlayerState _state = const PlayerState();
|
||||
|
||||
@override
|
||||
PlayerState get state => _state;
|
||||
|
||||
late final PlayerStreams _streams;
|
||||
|
||||
@override
|
||||
PlayerStreams get streams => _streams;
|
||||
|
||||
@override
|
||||
int? get textureId => null; // Uses direct Metal layer, not Flutter texture
|
||||
|
||||
// Stream controllers
|
||||
final _playingController = StreamController<bool>.broadcast();
|
||||
final _completedController = StreamController<bool>.broadcast();
|
||||
final _bufferingController = StreamController<bool>.broadcast();
|
||||
final _positionController = StreamController<Duration>.broadcast();
|
||||
final _durationController = StreamController<Duration>.broadcast();
|
||||
final _bufferController = StreamController<Duration>.broadcast();
|
||||
final _volumeController = StreamController<double>.broadcast();
|
||||
final _rateController = StreamController<double>.broadcast();
|
||||
final _tracksController = StreamController<Tracks>.broadcast();
|
||||
final _trackController = StreamController<TrackSelection>.broadcast();
|
||||
final _logController = StreamController<PlayerLog>.broadcast();
|
||||
final _errorController = StreamController<String>.broadcast();
|
||||
final _audioDeviceController = StreamController<AudioDevice>.broadcast();
|
||||
final _audioDevicesController = StreamController<List<AudioDevice>>.broadcast();
|
||||
final _playbackRestartController = StreamController<void>.broadcast();
|
||||
|
||||
StreamSubscription? _eventSubscription;
|
||||
bool _disposed = false;
|
||||
bool _initialized = false;
|
||||
|
||||
PlayerNative() {
|
||||
_streams = PlayerStreams(
|
||||
playing: _playingController.stream,
|
||||
completed: _completedController.stream,
|
||||
buffering: _bufferingController.stream,
|
||||
position: _positionController.stream,
|
||||
duration: _durationController.stream,
|
||||
buffer: _bufferController.stream,
|
||||
volume: _volumeController.stream,
|
||||
rate: _rateController.stream,
|
||||
tracks: _tracksController.stream,
|
||||
track: _trackController.stream,
|
||||
log: _logController.stream,
|
||||
error: _errorController.stream,
|
||||
audioDevice: _audioDeviceController.stream,
|
||||
audioDevices: _audioDevicesController.stream,
|
||||
playbackRestart: _playbackRestartController.stream,
|
||||
);
|
||||
|
||||
_setupEventListener();
|
||||
|
||||
// Forward MPV logs to app logger
|
||||
_logController.stream.listen(_forwardToAppLogger);
|
||||
}
|
||||
|
||||
void _forwardToAppLogger(PlayerLog log) {
|
||||
final message = '[MPV:${log.prefix}] ${log.text}'.trimRight();
|
||||
switch (log.level) {
|
||||
case PlayerLogLevel.fatal:
|
||||
case PlayerLogLevel.error:
|
||||
appLogger.e(message);
|
||||
case PlayerLogLevel.warn:
|
||||
appLogger.w(message);
|
||||
case PlayerLogLevel.info:
|
||||
case PlayerLogLevel.verbose:
|
||||
appLogger.i(message);
|
||||
case PlayerLogLevel.debug:
|
||||
case PlayerLogLevel.trace:
|
||||
appLogger.d(message);
|
||||
case PlayerLogLevel.none:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
PlayerLogLevel _parseLogLevel(String level) {
|
||||
return switch (level) {
|
||||
'fatal' => PlayerLogLevel.fatal,
|
||||
'error' => PlayerLogLevel.error,
|
||||
'warn' => PlayerLogLevel.warn,
|
||||
'info' => PlayerLogLevel.info,
|
||||
'v' || 'verbose' => PlayerLogLevel.verbose,
|
||||
'debug' => PlayerLogLevel.debug,
|
||||
'trace' => PlayerLogLevel.trace,
|
||||
_ => PlayerLogLevel.info,
|
||||
};
|
||||
}
|
||||
|
||||
void _setupEventListener() {
|
||||
_eventSubscription = _eventChannel.receiveBroadcastStream().listen(
|
||||
_handleEvent,
|
||||
onError: (error) {
|
||||
_errorController.add(error.toString());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void _handleEvent(dynamic event) {
|
||||
if (event is! Map) return;
|
||||
|
||||
final type = event['type'] as String?;
|
||||
final name = event['name'] as String?;
|
||||
|
||||
if (type == 'property' && name != null) {
|
||||
_handlePropertyChange(name, event['value']);
|
||||
} else if (type == 'event' && name != null) {
|
||||
_handleMpvEvent(name, event['data'] as Map?);
|
||||
}
|
||||
}
|
||||
|
||||
void _handlePropertyChange(String name, dynamic value) {
|
||||
switch (name) {
|
||||
case 'pause':
|
||||
final playing = value == false;
|
||||
_state = _state.copyWith(playing: playing);
|
||||
_playingController.add(playing);
|
||||
break;
|
||||
|
||||
case 'eof-reached':
|
||||
final completed = value == true;
|
||||
_state = _state.copyWith(completed: completed);
|
||||
_completedController.add(completed);
|
||||
break;
|
||||
|
||||
case 'paused-for-cache':
|
||||
final buffering = value == true;
|
||||
_state = _state.copyWith(buffering: buffering);
|
||||
_bufferingController.add(buffering);
|
||||
break;
|
||||
|
||||
case 'time-pos':
|
||||
if (value is num) {
|
||||
final position = Duration(milliseconds: (value * 1000).toInt());
|
||||
_state = _state.copyWith(position: position);
|
||||
_positionController.add(position);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'duration':
|
||||
if (value is num) {
|
||||
final duration = Duration(milliseconds: (value * 1000).toInt());
|
||||
_state = _state.copyWith(duration: duration);
|
||||
_durationController.add(duration);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'demuxer-cache-time':
|
||||
if (value is num) {
|
||||
final buffer = Duration(milliseconds: (value * 1000).toInt());
|
||||
_state = _state.copyWith(buffer: buffer);
|
||||
_bufferController.add(buffer);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'volume':
|
||||
if (value is num) {
|
||||
final volume = value.toDouble();
|
||||
_state = _state.copyWith(volume: volume);
|
||||
_volumeController.add(volume);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'speed':
|
||||
if (value is num) {
|
||||
final rate = value.toDouble();
|
||||
_state = _state.copyWith(rate: rate);
|
||||
_rateController.add(rate);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'track-list':
|
||||
List? trackList;
|
||||
if (value is List) {
|
||||
trackList = value;
|
||||
} else if (value is String) {
|
||||
// Android - JSON string that needs parsing
|
||||
try {
|
||||
final decoded = jsonDecode(value);
|
||||
if (decoded is List) {
|
||||
trackList = decoded;
|
||||
}
|
||||
} catch (e) {
|
||||
// Invalid JSON, ignore
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (trackList != null) {
|
||||
final tracks = _parseTrackList(trackList);
|
||||
_state = _state.copyWith(tracks: tracks);
|
||||
_tracksController.add(tracks);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'aid':
|
||||
_updateSelectedAudioTrack(value);
|
||||
break;
|
||||
|
||||
case 'sid':
|
||||
_updateSelectedSubtitleTrack(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void _handleMpvEvent(String name, Map? data) {
|
||||
switch (name) {
|
||||
case 'end-file':
|
||||
final reason = data?['reason'] as String?;
|
||||
if (reason == 'eof') {
|
||||
_state = _state.copyWith(completed: true);
|
||||
_completedController.add(true);
|
||||
} else if (reason == 'error') {
|
||||
_errorController.add('Playback error');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'file-loaded':
|
||||
// Reset completed state when new file is loaded
|
||||
_state = _state.copyWith(completed: false);
|
||||
_completedController.add(false);
|
||||
break;
|
||||
|
||||
case 'playback-restart':
|
||||
// Playback started/restarted - first frame is ready
|
||||
_playbackRestartController.add(null);
|
||||
break;
|
||||
|
||||
case 'log-message':
|
||||
final prefix = data?['prefix'] as String? ?? '';
|
||||
final levelStr = data?['level'] as String? ?? 'info';
|
||||
final text = data?['text'] as String? ?? '';
|
||||
final level = _parseLogLevel(levelStr);
|
||||
_logController.add(PlayerLog(level: level, prefix: prefix, text: text));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Tracks _parseTrackList(List trackList) {
|
||||
final audioTracks = <AudioTrack>[];
|
||||
final subtitleTracks = <SubtitleTrack>[];
|
||||
|
||||
for (final track in trackList) {
|
||||
if (track is! Map) continue;
|
||||
|
||||
final type = track['type'] as String?;
|
||||
final id = track['id']?.toString() ?? '';
|
||||
|
||||
if (type == 'audio') {
|
||||
audioTracks.add(
|
||||
AudioTrack(
|
||||
id: id,
|
||||
title: track['title'] as String?,
|
||||
language: track['lang'] as String?,
|
||||
codec: track['codec'] as String?,
|
||||
channels: (track['demux-channel-count'] as num?)?.toInt(),
|
||||
sampleRate: (track['demux-samplerate'] as num?)?.toInt(),
|
||||
isDefault: track['default'] as bool? ?? false,
|
||||
),
|
||||
);
|
||||
} else if (type == 'sub') {
|
||||
subtitleTracks.add(
|
||||
SubtitleTrack(
|
||||
id: id,
|
||||
title: track['title'] as String?,
|
||||
language: track['lang'] as String?,
|
||||
codec: track['codec'] as String?,
|
||||
isExternal: track['external'] as bool? ?? false,
|
||||
uri: track['external-filename'] as String?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return Tracks(audio: audioTracks, subtitle: subtitleTracks);
|
||||
}
|
||||
|
||||
void _updateSelectedAudioTrack(dynamic trackId) {
|
||||
_updateSelectedTrack<AudioTrack>(
|
||||
trackId,
|
||||
_state.tracks.audio.cast<AudioTrack?>().toList(),
|
||||
(selection, track) => selection.copyWith(audio: track),
|
||||
);
|
||||
}
|
||||
|
||||
void _updateSelectedSubtitleTrack(dynamic trackId) {
|
||||
_updateSelectedTrack<SubtitleTrack>(
|
||||
trackId,
|
||||
_state.tracks.subtitle.cast<SubtitleTrack?>().toList(),
|
||||
(selection, track) => selection.copyWith(subtitle: track),
|
||||
);
|
||||
}
|
||||
|
||||
void _updateSelectedTrack<T>(
|
||||
dynamic trackId,
|
||||
List<T?> tracks,
|
||||
TrackSelection Function(TrackSelection, T?) selectionSetter,
|
||||
) {
|
||||
final id = trackId?.toString();
|
||||
T? selectedTrack;
|
||||
|
||||
if (id != null && id != 'no') {
|
||||
selectedTrack = tracks.firstWhere((track) => _getTrackId(track) == id, orElse: () => null);
|
||||
}
|
||||
|
||||
_state = _state.copyWith(track: selectionSetter(_state.track, selectedTrack));
|
||||
_trackController.add(_state.track);
|
||||
}
|
||||
|
||||
String? _getTrackId<T>(T? track) {
|
||||
final dynamic t = track;
|
||||
return t?.id?.toString();
|
||||
}
|
||||
|
||||
Future<void> _ensureInitialized() async {
|
||||
if (_initialized) return;
|
||||
|
||||
try {
|
||||
final result = await _methodChannel.invokeMethod<bool>('initialize');
|
||||
_initialized = result == true;
|
||||
if (!_initialized) {
|
||||
throw Exception('Failed to initialize player');
|
||||
}
|
||||
|
||||
// Configure subtitle fonts for libass support
|
||||
await _configureSubtitleFonts();
|
||||
|
||||
// Subscribe to MPV properties
|
||||
await _observeProperty('time-pos', 'double');
|
||||
await _observeProperty('duration', 'double');
|
||||
await _observeProperty('pause', 'flag');
|
||||
await _observeProperty('paused-for-cache', 'flag');
|
||||
await _observeProperty('track-list', (Platform.isAndroid || Platform.isWindows) ? 'string' : 'node');
|
||||
await _observeProperty('eof-reached', 'flag');
|
||||
await _observeProperty('volume', 'double');
|
||||
await _observeProperty('speed', 'double');
|
||||
await _observeProperty('aid', 'string');
|
||||
await _observeProperty('sid', 'string');
|
||||
} catch (e) {
|
||||
_errorController.add('Initialization failed: $e');
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _observeProperty(String name, String format) async {
|
||||
await _methodChannel.invokeMethod('observeProperty', {'name': name, 'format': format});
|
||||
}
|
||||
|
||||
/// Configures subtitle fonts for libass support.
|
||||
/// Provides a comprehensive Unicode font (Go Noto) with CJK coverage to ensure
|
||||
/// proper rendering of non-Latin characters in subtitles.
|
||||
Future<void> _configureSubtitleFonts() async {
|
||||
try {
|
||||
final fontDir = await SubtitleFontLoader.loadSubtitleFont();
|
||||
if (fontDir != null) {
|
||||
// Configure MPV to use the extracted font for libass
|
||||
await setProperty('config', 'yes');
|
||||
await setProperty('sub-fonts-dir', fontDir);
|
||||
await setProperty('sub-font', SubtitleFontLoader.fontName);
|
||||
}
|
||||
} catch (e) {
|
||||
// Font configuration is not critical - continue without it
|
||||
_errorController.add('Failed to configure subtitle fonts: $e');
|
||||
}
|
||||
}
|
||||
|
||||
void _checkDisposed() {
|
||||
if (_disposed) {
|
||||
throw StateError('Player has been disposed');
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// Playback Control
|
||||
// ============================================
|
||||
|
||||
@override
|
||||
Future<void> open(Media media, {bool play = true}) async {
|
||||
_checkDisposed();
|
||||
await _ensureInitialized();
|
||||
|
||||
// Show the video layer
|
||||
await _methodChannel.invokeMethod('setVisible', {'visible': true});
|
||||
|
||||
// Set HTTP headers for Plex authentication and profile
|
||||
if (media.headers != null && media.headers!.isNotEmpty) {
|
||||
final headerList = media.headers!.entries.map((e) => '${e.key}: ${e.value}').toList();
|
||||
await setProperty('http-header-fields', headerList.join(','));
|
||||
}
|
||||
|
||||
// Set start position if provided (must be set before loading file)
|
||||
if (media.start != null && media.start!.inSeconds > 0) {
|
||||
await setProperty('start', media.start!.inSeconds.toString());
|
||||
} else {
|
||||
// Reset start position if not resuming
|
||||
await setProperty('start', 'none');
|
||||
}
|
||||
|
||||
await command(['loadfile', media.uri, 'replace']);
|
||||
if (!play) {
|
||||
await setProperty('pause', 'yes');
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> play() async {
|
||||
_checkDisposed();
|
||||
await setProperty('pause', 'no');
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> pause() async {
|
||||
_checkDisposed();
|
||||
await setProperty('pause', 'yes');
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> playOrPause() async {
|
||||
_checkDisposed();
|
||||
if (_state.playing) {
|
||||
await pause();
|
||||
} else {
|
||||
await play();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> stop() async {
|
||||
_checkDisposed();
|
||||
await command(['stop']);
|
||||
await _methodChannel.invokeMethod('setVisible', {'visible': false});
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> seek(Duration position) async {
|
||||
_checkDisposed();
|
||||
await command(['seek', (position.inMilliseconds / 1000.0).toString(), 'absolute']);
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// Track Selection
|
||||
// ============================================
|
||||
|
||||
@override
|
||||
Future<void> selectAudioTrack(AudioTrack track) async {
|
||||
_checkDisposed();
|
||||
await setProperty('aid', track.id);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> selectSubtitleTrack(SubtitleTrack track) async {
|
||||
_checkDisposed();
|
||||
await setProperty('sid', track.id);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> addSubtitleTrack({required String uri, String? title, String? language, bool select = false}) async {
|
||||
_checkDisposed();
|
||||
final args = ['sub-add', uri, select ? 'select' : 'auto'];
|
||||
if (title != null) args.add('title=$title');
|
||||
if (language != null) args.add('lang=$language');
|
||||
await command(args);
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// Volume and Rate
|
||||
// ============================================
|
||||
|
||||
@override
|
||||
Future<void> setVolume(double volume) async {
|
||||
_checkDisposed();
|
||||
await setProperty('volume', volume.toString());
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> setRate(double rate) async {
|
||||
_checkDisposed();
|
||||
await setProperty('speed', rate.toString());
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> setAudioDevice(AudioDevice device) async {
|
||||
_checkDisposed();
|
||||
await setProperty('audio-device', device.name);
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// MPV Properties
|
||||
// ============================================
|
||||
|
||||
@override
|
||||
Future<void> setProperty(String name, String value) async {
|
||||
_checkDisposed();
|
||||
await _ensureInitialized();
|
||||
await _methodChannel.invokeMethod('setProperty', {'name': name, 'value': value});
|
||||
}
|
||||
|
||||
@override
|
||||
Future<String?> getProperty(String name) async {
|
||||
_checkDisposed();
|
||||
await _ensureInitialized();
|
||||
return await _methodChannel.invokeMethod<String>('getProperty', {'name': name});
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> command(List<String> args) async {
|
||||
_checkDisposed();
|
||||
await _ensureInitialized();
|
||||
await _methodChannel.invokeMethod('command', {'args': args});
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// Passthrough
|
||||
// ============================================
|
||||
|
||||
@override
|
||||
Future<void> setAudioPassthrough(bool enabled) async {
|
||||
_checkDisposed();
|
||||
if (enabled) {
|
||||
await setProperty('audio-spdif', 'ac3,eac3,dts,dts-hd,truehd');
|
||||
await setProperty('audio-exclusive', 'yes');
|
||||
} else {
|
||||
await setProperty('audio-spdif', '');
|
||||
await setProperty('audio-exclusive', 'no');
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// Visibility
|
||||
// ============================================
|
||||
|
||||
@override
|
||||
Future<bool> setVisible(bool visible) async {
|
||||
_checkDisposed();
|
||||
|
||||
try {
|
||||
await _methodChannel.invokeMethod('setVisible', {'visible': visible});
|
||||
return true;
|
||||
} catch (e) {
|
||||
_errorController.add('Failed to set visibility: $e');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> setControlsVisible(bool visible) async {
|
||||
// No-op on most platforms. Override on Linux for transparency workaround.
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> updateFrame() async {
|
||||
_checkDisposed();
|
||||
if (!_initialized) return;
|
||||
// Only iOS and macOS use Metal layer that needs frame updates
|
||||
if (Platform.isIOS || Platform.isMacOS) {
|
||||
await _methodChannel.invokeMethod('updateFrame');
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// Lifecycle
|
||||
// ============================================
|
||||
|
||||
@override
|
||||
Future<void> dispose() async {
|
||||
if (_disposed) return;
|
||||
_disposed = true;
|
||||
|
||||
await _eventSubscription?.cancel();
|
||||
await _methodChannel.invokeMethod('dispose');
|
||||
|
||||
await _playingController.close();
|
||||
await _completedController.close();
|
||||
await _bufferingController.close();
|
||||
await _positionController.close();
|
||||
await _durationController.close();
|
||||
await _bufferController.close();
|
||||
await _volumeController.close();
|
||||
await _rateController.close();
|
||||
await _tracksController.close();
|
||||
await _trackController.close();
|
||||
await _logController.close();
|
||||
await _errorController.close();
|
||||
await _audioDeviceController.close();
|
||||
await _audioDevicesController.close();
|
||||
await _playbackRestartController.close();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
import '../models.dart';
|
||||
|
||||
/// Immutable snapshot of the current player state.
|
||||
///
|
||||
/// This class provides synchronous access to the player's current state.
|
||||
/// For reactive updates, use [PlayerStreams].
|
||||
class PlayerState {
|
||||
/// Whether playback is currently active.
|
||||
final bool playing;
|
||||
|
||||
/// Whether the media has completed playback.
|
||||
final bool completed;
|
||||
|
||||
/// Whether the player is currently buffering.
|
||||
final bool buffering;
|
||||
|
||||
/// Current playback position.
|
||||
final Duration position;
|
||||
|
||||
/// Total duration of the media.
|
||||
final Duration duration;
|
||||
|
||||
/// Amount of media buffered ahead of current position.
|
||||
final Duration buffer;
|
||||
|
||||
/// Current volume level (0.0 to 100.0).
|
||||
final double volume;
|
||||
|
||||
/// Current playback rate (1.0 = normal speed).
|
||||
final double rate;
|
||||
|
||||
/// Available tracks in the media.
|
||||
final Tracks tracks;
|
||||
|
||||
/// Currently selected tracks.
|
||||
final TrackSelection track;
|
||||
|
||||
/// Audio delay/sync offset in seconds.
|
||||
final double audioDelay;
|
||||
|
||||
/// Subtitle delay/sync offset in seconds.
|
||||
final double subtitleDelay;
|
||||
|
||||
/// Whether audio passthrough is currently enabled.
|
||||
final bool audioPassthrough;
|
||||
|
||||
/// Current audio output device.
|
||||
final AudioDevice audioDevice;
|
||||
|
||||
/// Available audio output devices.
|
||||
final List<AudioDevice> audioDevices;
|
||||
|
||||
const PlayerState({
|
||||
this.playing = false,
|
||||
this.completed = false,
|
||||
this.buffering = false,
|
||||
this.position = Duration.zero,
|
||||
this.duration = Duration.zero,
|
||||
this.buffer = Duration.zero,
|
||||
this.volume = 100.0,
|
||||
this.rate = 1.0,
|
||||
this.tracks = const Tracks(),
|
||||
this.track = const TrackSelection(),
|
||||
this.audioDelay = 0.0,
|
||||
this.subtitleDelay = 0.0,
|
||||
this.audioPassthrough = false,
|
||||
this.audioDevice = AudioDevice.auto,
|
||||
this.audioDevices = const [],
|
||||
});
|
||||
|
||||
/// Creates a copy with the given fields replaced.
|
||||
PlayerState copyWith({
|
||||
bool? playing,
|
||||
bool? completed,
|
||||
bool? buffering,
|
||||
Duration? position,
|
||||
Duration? duration,
|
||||
Duration? buffer,
|
||||
double? volume,
|
||||
double? rate,
|
||||
Tracks? tracks,
|
||||
TrackSelection? track,
|
||||
double? audioDelay,
|
||||
double? subtitleDelay,
|
||||
bool? audioPassthrough,
|
||||
AudioDevice? audioDevice,
|
||||
List<AudioDevice>? audioDevices,
|
||||
}) {
|
||||
return PlayerState(
|
||||
playing: playing ?? this.playing,
|
||||
completed: completed ?? this.completed,
|
||||
buffering: buffering ?? this.buffering,
|
||||
position: position ?? this.position,
|
||||
duration: duration ?? this.duration,
|
||||
buffer: buffer ?? this.buffer,
|
||||
volume: volume ?? this.volume,
|
||||
rate: rate ?? this.rate,
|
||||
tracks: tracks ?? this.tracks,
|
||||
track: track ?? this.track,
|
||||
audioDelay: audioDelay ?? this.audioDelay,
|
||||
subtitleDelay: subtitleDelay ?? this.subtitleDelay,
|
||||
audioPassthrough: audioPassthrough ?? this.audioPassthrough,
|
||||
audioDevice: audioDevice ?? this.audioDevice,
|
||||
audioDevices: audioDevices ?? this.audioDevices,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => 'PlayerState(playing: $playing, position: $position, duration: $duration)';
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
import '../models.dart';
|
||||
|
||||
/// Reactive streams for player state changes.
|
||||
///
|
||||
/// Subscribe to these streams to receive updates when the player state changes.
|
||||
/// For synchronous state access, use [PlayerState].
|
||||
class PlayerStreams {
|
||||
/// Stream of playing state changes.
|
||||
final Stream<bool> playing;
|
||||
|
||||
/// Stream of completion state changes.
|
||||
final Stream<bool> completed;
|
||||
|
||||
/// Stream of buffering state changes.
|
||||
final Stream<bool> buffering;
|
||||
|
||||
/// Stream of position updates.
|
||||
final Stream<Duration> position;
|
||||
|
||||
/// Stream of duration changes (when media is loaded).
|
||||
final Stream<Duration> duration;
|
||||
|
||||
/// Stream of buffer position updates.
|
||||
final Stream<Duration> buffer;
|
||||
|
||||
/// Stream of volume changes.
|
||||
final Stream<double> volume;
|
||||
|
||||
/// Stream of playback rate changes.
|
||||
final Stream<double> rate;
|
||||
|
||||
/// Stream of available tracks updates.
|
||||
final Stream<Tracks> tracks;
|
||||
|
||||
/// Stream of track selection changes.
|
||||
final Stream<TrackSelection> track;
|
||||
|
||||
/// Stream of log messages from the player.
|
||||
final Stream<PlayerLog> log;
|
||||
|
||||
/// Stream of error messages.
|
||||
final Stream<String> error;
|
||||
|
||||
/// Stream of audio device changes.
|
||||
final Stream<AudioDevice> audioDevice;
|
||||
|
||||
/// Stream of available audio devices.
|
||||
final Stream<List<AudioDevice>> audioDevices;
|
||||
|
||||
/// Stream that emits when playback restarts (first frame ready after load/seek).
|
||||
final Stream<void> playbackRestart;
|
||||
|
||||
const PlayerStreams({
|
||||
required this.playing,
|
||||
required this.completed,
|
||||
required this.buffering,
|
||||
required this.position,
|
||||
required this.duration,
|
||||
required this.buffer,
|
||||
required this.volume,
|
||||
required this.rate,
|
||||
required this.tracks,
|
||||
required this.track,
|
||||
required this.log,
|
||||
required this.error,
|
||||
required this.audioDevice,
|
||||
required this.audioDevices,
|
||||
required this.playbackRestart,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/// Mixin for players that support video rect positioning.
|
||||
///
|
||||
/// Players that render video behind the Flutter view (e.g., using
|
||||
/// native window embedding or GtkGLArea) implement this mixin to
|
||||
/// receive layout updates from the [Video] widget.
|
||||
mixin VideoRectSupport {
|
||||
/// Updates the video rendering area.
|
||||
///
|
||||
/// Called by the [Video] widget when the layout changes.
|
||||
///
|
||||
/// [left], [top], [right], [bottom] define the rect in physical pixels.
|
||||
/// [devicePixelRatio] is the device's pixel ratio for scaling.
|
||||
Future<void> setVideoRect({
|
||||
required int left,
|
||||
required int top,
|
||||
required int right,
|
||||
required int bottom,
|
||||
required double devicePixelRatio,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'player/player.dart';
|
||||
import 'player/video_rect_support.dart';
|
||||
|
||||
/// Video widget for displaying player output.
|
||||
///
|
||||
/// This widget displays the video output from a [Player] instance
|
||||
/// and optionally overlays custom controls.
|
||||
///
|
||||
/// Example usage:
|
||||
/// ```dart
|
||||
/// final player = Player();
|
||||
///
|
||||
/// Video(
|
||||
/// player: player,
|
||||
/// controls: (context) => MyCustomControls(),
|
||||
/// )
|
||||
/// ```
|
||||
class Video extends StatefulWidget {
|
||||
/// The player instance.
|
||||
final Player player;
|
||||
|
||||
/// Builder for custom video controls overlay.
|
||||
final Widget Function(BuildContext context)? controls;
|
||||
|
||||
/// Background color shown behind the video.
|
||||
final Color backgroundColor;
|
||||
|
||||
const Video({super.key, required this.player, this.controls, this.backgroundColor = Colors.black});
|
||||
|
||||
@override
|
||||
State<Video> createState() => _VideoState();
|
||||
}
|
||||
|
||||
class _VideoState extends State<Video> {
|
||||
Rect? _lastRect;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Colors.transparent,
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
// Video rendering area
|
||||
_buildVideoSurface(),
|
||||
|
||||
// Controls overlay
|
||||
if (widget.controls != null) widget.controls!(context),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildVideoSurface() {
|
||||
// For players that support video rect positioning (Windows, Linux),
|
||||
// communicate layout changes to the native side.
|
||||
if (widget.player is VideoRectSupport) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_updateVideoRect(context, constraints);
|
||||
});
|
||||
return const SizedBox.expand();
|
||||
},
|
||||
);
|
||||
}
|
||||
return const SizedBox.expand();
|
||||
}
|
||||
|
||||
void _updateVideoRect(BuildContext context, BoxConstraints constraints) {
|
||||
final renderBox = context.findRenderObject() as RenderBox?;
|
||||
if (renderBox == null || !renderBox.hasSize) return;
|
||||
|
||||
final position = renderBox.localToGlobal(Offset.zero);
|
||||
final size = renderBox.size;
|
||||
final dpr = MediaQuery.of(context).devicePixelRatio;
|
||||
|
||||
final newRect = Rect.fromLTWH(position.dx, position.dy, size.width, size.height);
|
||||
|
||||
// Only update if the rect has changed significantly
|
||||
if (_lastRect != null &&
|
||||
(newRect.left - _lastRect!.left).abs() < 1 &&
|
||||
(newRect.top - _lastRect!.top).abs() < 1 &&
|
||||
(newRect.width - _lastRect!.width).abs() < 1 &&
|
||||
(newRect.height - _lastRect!.height).abs() < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
_lastRect = newRect;
|
||||
|
||||
// Update the native video rect
|
||||
(widget.player as VideoRectSupport).setVideoRect(
|
||||
left: (position.dx * dpr).toInt(),
|
||||
top: (position.dy * dpr).toInt(),
|
||||
right: ((position.dx + size.width) * dpr).toInt(),
|
||||
bottom: ((position.dy + size.height) * dpr).toInt(),
|
||||
devicePixelRatio: dpr,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:plezy/widgets/app_icon.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
import '../i18n/strings.g.dart';
|
||||
|
||||
/// Navigation tab identifiers
|
||||
enum NavigationTabId { discover, libraries, search, downloads, settings }
|
||||
|
||||
/// Represents a navigation tab with its configuration
|
||||
class NavigationTab {
|
||||
final NavigationTabId id;
|
||||
final bool onlineOnly;
|
||||
final IconData icon;
|
||||
final String Function() getLabel;
|
||||
|
||||
const NavigationTab({required this.id, required this.onlineOnly, required this.icon, required this.getLabel});
|
||||
|
||||
NavigationDestination toDestination() {
|
||||
return NavigationDestination(icon: AppIcon(icon, fill: 1), selectedIcon: AppIcon(icon, fill: 1), label: getLabel());
|
||||
}
|
||||
|
||||
/// Get the index for a tab ID in the visible tabs list
|
||||
static int indexFor(NavigationTabId id, {required bool isOffline}) {
|
||||
final tabs = getVisibleTabs(isOffline: isOffline);
|
||||
return tabs.indexWhere((tab) => tab.id == id);
|
||||
}
|
||||
|
||||
/// Get tabs filtered by offline mode
|
||||
static List<NavigationTab> getVisibleTabs({required bool isOffline}) {
|
||||
return allNavigationTabs.where((tab) => !isOffline || !tab.onlineOnly).toList();
|
||||
}
|
||||
|
||||
/// Check if a visual index corresponds to a specific tab ID
|
||||
static bool isTabAtIndex(NavigationTabId id, int index, {required bool isOffline}) {
|
||||
return indexFor(id, isOffline: isOffline) == index;
|
||||
}
|
||||
}
|
||||
|
||||
// Label getters (must be top-level for const constructor)
|
||||
String _getHomeLabel() => t.navigation.home;
|
||||
String _getLibrariesLabel() => t.navigation.libraries;
|
||||
String _getSearchLabel() => t.navigation.search;
|
||||
String _getDownloadsLabel() => t.navigation.downloads;
|
||||
String _getSettingsLabel() => t.navigation.settings;
|
||||
|
||||
/// All navigation tabs in display order
|
||||
const allNavigationTabs = [
|
||||
NavigationTab(id: NavigationTabId.discover, onlineOnly: true, icon: Symbols.home_rounded, getLabel: _getHomeLabel),
|
||||
NavigationTab(
|
||||
id: NavigationTabId.libraries,
|
||||
onlineOnly: true,
|
||||
icon: Symbols.video_library_rounded,
|
||||
getLabel: _getLibrariesLabel,
|
||||
),
|
||||
NavigationTab(id: NavigationTabId.search, onlineOnly: true, icon: Symbols.search_rounded, getLabel: _getSearchLabel),
|
||||
NavigationTab(
|
||||
id: NavigationTabId.downloads,
|
||||
onlineOnly: false,
|
||||
icon: Symbols.download_rounded,
|
||||
getLabel: _getDownloadsLabel,
|
||||
),
|
||||
NavigationTab(
|
||||
id: NavigationTabId.settings,
|
||||
onlineOnly: false,
|
||||
icon: Symbols.settings_rounded,
|
||||
getLabel: _getSettingsLabel,
|
||||
),
|
||||
];
|
||||
@@ -8,19 +8,26 @@ class HiddenLibrariesProvider extends ChangeNotifier {
|
||||
late StorageService _storageService;
|
||||
Set<String> _hiddenLibraryKeys = {};
|
||||
bool _isInitialized = false;
|
||||
Future<void>? _initFuture;
|
||||
|
||||
/// Get an unmodifiable copy of hidden library keys
|
||||
Set<String> get hiddenLibraryKeys => Set.unmodifiable(_hiddenLibraryKeys);
|
||||
HiddenLibrariesProvider() {
|
||||
// Start initialization eagerly to reduce race conditions
|
||||
_initFuture = _initialize();
|
||||
}
|
||||
|
||||
/// Ensures the provider is initialized. Call this before accessing hidden
|
||||
/// libraries in contexts where you need the actual persisted values.
|
||||
Future<void> ensureInitialized() => _initFuture ?? _initialize();
|
||||
|
||||
/// Check if the provider has completed initialization
|
||||
bool get isInitialized => _isInitialized;
|
||||
|
||||
HiddenLibrariesProvider() {
|
||||
_initialize();
|
||||
}
|
||||
/// Get an unmodifiable copy of hidden library keys
|
||||
Set<String> get hiddenLibraryKeys => Set.unmodifiable(_hiddenLibraryKeys);
|
||||
|
||||
/// Initialize the provider by loading hidden libraries from storage
|
||||
Future<void> _initialize() async {
|
||||
if (_isInitialized) return;
|
||||
_storageService = await StorageService.getInstance();
|
||||
_hiddenLibraryKeys = _storageService.getHiddenLibraries();
|
||||
_isInitialized = true;
|
||||
@@ -30,6 +37,7 @@ class HiddenLibrariesProvider extends ChangeNotifier {
|
||||
/// Hide a library by its key
|
||||
/// Updates both in-memory state and persistent storage
|
||||
Future<void> hideLibrary(String libraryKey) async {
|
||||
if (!_isInitialized) await _initialize();
|
||||
if (!_hiddenLibraryKeys.contains(libraryKey)) {
|
||||
_hiddenLibraryKeys = Set.from(_hiddenLibraryKeys)..add(libraryKey);
|
||||
await _storageService.saveHiddenLibraries(_hiddenLibraryKeys);
|
||||
@@ -40,6 +48,7 @@ class HiddenLibrariesProvider extends ChangeNotifier {
|
||||
/// Unhide a library by its key
|
||||
/// Updates both in-memory state and persistent storage
|
||||
Future<void> unhideLibrary(String libraryKey) async {
|
||||
if (!_isInitialized) await _initialize();
|
||||
if (_hiddenLibraryKeys.contains(libraryKey)) {
|
||||
_hiddenLibraryKeys = Set.from(_hiddenLibraryKeys)..remove(libraryKey);
|
||||
await _storageService.saveHiddenLibraries(_hiddenLibraryKeys);
|
||||
@@ -48,9 +57,7 @@ class HiddenLibrariesProvider extends ChangeNotifier {
|
||||
}
|
||||
|
||||
/// Check if a specific library is hidden
|
||||
bool isLibraryHidden(String libraryKey) {
|
||||
return _hiddenLibraryKeys.contains(libraryKey);
|
||||
}
|
||||
bool isLibraryHidden(String libraryKey) => _hiddenLibraryKeys.contains(libraryKey);
|
||||
|
||||
/// Refresh hidden libraries from storage
|
||||
/// Useful if storage was modified outside the provider
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import '../client/plex_client.dart';
|
||||
import '../services/plex_client.dart';
|
||||
import '../services/data_aggregation_service.dart';
|
||||
import '../services/multi_server_manager.dart';
|
||||
import '../services/plex_auth_service.dart';
|
||||
@@ -58,40 +58,30 @@ class MultiServerProvider extends ChangeNotifier {
|
||||
appLogger.d('MultiServerProvider: Token updated for server $serverId');
|
||||
notifyListeners();
|
||||
} else {
|
||||
appLogger.w(
|
||||
'MultiServerProvider: Cannot update token - server $serverId not found',
|
||||
);
|
||||
appLogger.w('MultiServerProvider: Cannot update token - server $serverId not found');
|
||||
}
|
||||
}
|
||||
|
||||
/// Clear all server connections
|
||||
void clearAllConnections() {
|
||||
_serverManager.disconnectAll();
|
||||
_aggregationService.clearCache(); // Clear cached data when servers change
|
||||
appLogger.d('MultiServerProvider: All connections cleared');
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
/// Reconnect all servers after a profile switch
|
||||
/// Clears existing connections and connects to all provided servers
|
||||
Future<int> reconnectWithServers(
|
||||
List<PlexServer> servers, {
|
||||
String? clientIdentifier,
|
||||
}) async {
|
||||
Future<int> reconnectWithServers(List<PlexServer> servers, {String? clientIdentifier}) async {
|
||||
// Clear existing connections first
|
||||
_serverManager.disconnectAll();
|
||||
appLogger.d(
|
||||
'MultiServerProvider: Cleared connections, reconnecting to ${servers.length} servers',
|
||||
);
|
||||
_aggregationService.clearCache(); // Clear cached data when servers change
|
||||
appLogger.d('MultiServerProvider: Cleared connections, reconnecting to ${servers.length} servers');
|
||||
|
||||
// Connect with new server tokens
|
||||
final connectedCount = await _serverManager.connectToAllServers(
|
||||
servers,
|
||||
clientIdentifier: clientIdentifier,
|
||||
);
|
||||
final connectedCount = await _serverManager.connectToAllServers(servers, clientIdentifier: clientIdentifier);
|
||||
|
||||
appLogger.i(
|
||||
'MultiServerProvider: Reconnected to $connectedCount/${servers.length} servers after profile switch',
|
||||
);
|
||||
appLogger.i('MultiServerProvider: Reconnected to $connectedCount/${servers.length} servers after profile switch');
|
||||
notifyListeners();
|
||||
return connectedCount;
|
||||
}
|
||||
|
||||