Compare commits

..
90 Commits
Author SHA1 Message Date
github-actions[bot] 5fa8326341 chore: bump version to 2.2.1 2026-05-24 17:06:57 +00:00
edde746 c8cded70ef fix(tv): polish media detail rails
close #1117
2026-05-24 19:06:06 +02:00
edde746 8fe51075be fix(android): force display mode matching 2026-05-24 18:39:41 +02:00
edde746 d24c95f1e1 fix(android): trust Media3 TrueHD passthrough 2026-05-24 18:09:42 +02:00
edde746 1c8be031ae chore(ios): declare export compliance 2026-05-24 15:10:58 +02:00
github-actions[bot] 83c47b529c chore: update cask to 2.2.0 2026-05-24 06:17:35 +00:00
github-actions[bot] 9dce396fb4 chore: bump version to 2.2.0 2026-05-24 05:53:47 +00:00
edde746 eeaa831cc2 fix(search): guard stale refresh callbacks 2026-05-24 07:37:02 +02:00
edde746 f1a02ade17 fix(android): guard desktop fullscreen calls 2026-05-24 07:22:56 +02:00
edde746 dcd0b03096 fix(downloads): repair offline artwork 2026-05-24 05:27:19 +02:00
edde746 a189ee5774 fix(offline): honor settled profile visibility 2026-05-24 03:12:33 +02:00
edde746 e74df0d245 fix(plex): fail open on unknown transcode capability 2026-05-24 00:39:30 +02:00
edde746andGitHub d980540c09 Merge pull request #1024 from Mofeywalker/feat/harmonize-playback-speeds
fix: add missing 0.25 speed steps
2026-05-23 21:49:33 +02:00
edde746 a51215952f docs: remove duplicate screenshot link 2026-05-23 20:52:06 +02:00
edde746 993a0e4666 fix(tv): route remote keys to native text input 2026-05-23 19:19:59 +02:00
edde746 4c43d6fdec fix(jellyfin): prefer direct playback by default 2026-05-23 18:38:38 +02:00
edde746 1c58a12c90 fix(jellyfin): omit audio index from static fallback 2026-05-23 16:35:09 +02:00
edde746 b6d23ed089 fix(startup): speed offline fallback
close #1108
2026-05-23 16:00:00 +02:00
edde746 3a042d79f6 fix(player): persist shader hotkey toggles
close #1105
2026-05-23 01:37:57 +02:00
edde746 1a73fc585b fix(player): align playback settings label
close #1106
2026-05-23 00:34:16 +02:00
edde746 8ec2795da1 fix(tv): stabilize long rail focus scrolling 2026-05-22 23:55:54 +02:00
edde746 cbea1c8d8f fix(tv): correct long hub row focus scrolling 2026-05-22 21:32:26 +02:00
edde746 048d22cb99 fix(livetv): expand program summaries 2026-05-22 20:52:21 +02:00
edde746 31c01ab3e0 chore(site): update tv screenshots 2026-05-22 17:15:51 +02:00
edde746 16e31303ae fix(tv): keep spotlight background static 2026-05-22 17:06:51 +02:00
edde746 e301fec38c fix(ci): clear unused parameter warnings 2026-05-22 16:04:39 +02:00
edde746 e1e9adbb01 fix(ios): handle status bar scroll taps
close #1101
2026-05-22 15:40:03 +02:00
edde746 636ecc9d3a fix(tv): fit fallback logo titles 2026-05-22 13:34:30 +02:00
edde746 fc231a9e72 fix(playlists): load paginated items mutably
close #1100
2026-05-22 05:28:03 +02:00
edde746 c354193187 fix(tv): fade media detail transitions 2026-05-22 04:30:22 +02:00
edde746 bb7ed72073 fix(tv): stabilize detail preplay layout 2026-05-22 04:13:00 +02:00
edde746 fea973a72a fix(tv): smooth sidebar expansion behavior 2026-05-22 03:54:34 +02:00
edde746 487c7b87f6 fix(nav): hide active sidebar background during focus 2026-05-22 02:21:06 +02:00
edde746 afc94a50fc fix(tv): push sidebar content without resizing 2026-05-22 01:38:29 +02:00
edde746 2ebd730201 fix(tv): displace content beside sidebar 2026-05-22 00:14:16 +02:00
edde746 0dd7d7c522 feat(tv): push content beside sidebar 2026-05-21 21:01:14 +02:00
edde746 eaf0f4fa1a fix(tv): stabilize browse rail focus and loading 2026-05-21 18:17:00 +02:00
edde746 743a8668ec feat(tv): refine sidebar backdrop 2026-05-21 17:04:23 +02:00
edde746 6a74ff083f fix(mpv): avoid forcing HDR colorspace hint 2026-05-21 16:01:15 +02:00
edde746 9dc3a1a1b1 feat(tv): improve hub rail experience 2026-05-21 15:57:02 +02:00
edde746 2b45557743 fix(android): preserve mpv frame-rate startup position 2026-05-21 09:58:13 +02:00
edde746 11b97e626e fix(gamepad): update reconnect dependency 2026-05-21 08:41:03 +02:00
edde746 d8f69f7acd fix(plex): copy mkv attachments during transcode
close #1083
2026-05-21 08:08:25 +02:00
edde746 b547f8a47f fix(android): gate mpv startup refresh on display switch 2026-05-21 02:59:11 +02:00
edde746 f4c83bedc0 chore(tv): guard text input diagnostics 2026-05-21 00:42:19 +02:00
edde746 0582ab2947 fix(livetv): show active recording indicators
close #1076
2026-05-21 00:19:21 +02:00
edde746 209101796b refactor: use private named constructor params 2026-05-20 23:48:29 +02:00
edde746 448a5d084c fix(tv): hide season poster tab setting 2026-05-20 22:22:46 +02:00
edde746 1ebfee9354 fix(android): stabilize TrueHD tunneling 2026-05-20 21:00:02 +02:00
edde746 29e0654d47 fix(windows): launch VLC from default install path
close #1085
2026-05-20 20:16:34 +02:00
edde746 f565684842 fix(ci): stabilize analyzer and linux builds 2026-05-20 19:10:46 +02:00
edde746 5d6f34f756 fix(android): preserve tracks on DV reload 2026-05-20 18:27:42 +02:00
edde746 73735c5a00 fix(ci): unblock analyzer and windows build 2026-05-20 18:10:21 +02:00
edde746 c93a266722 fix(plex): support no-burn transcode subtitles 2026-05-20 17:21:31 +02:00
edde746 2b167a60f5 fix(jellyfin): pin merged version playback 2026-05-20 05:27:48 +02:00
edde746 63e807dd58 fix(tv): focus flattened episode rows
close #1081
2026-05-20 03:55:48 +02:00
edde746 16e3500c49 fix(android): gate TrueHD passthrough 2026-05-20 02:23:57 +02:00
edde746 6e47a5fbcf fix(tv): hide hero setting 2026-05-19 22:57:24 +02:00
edde746 b18774d60b fix(tv): complete detail rail behavior 2026-05-19 20:23:17 +02:00
edde746 0383a77b56 fix(jellyfin): pin version playback source 2026-05-19 20:12:19 +02:00
edde746 d58007a9e2 fix(ios): keep PiP timebase renderer-owned 2026-05-19 20:09:23 +02:00
edde746 7d60875e19 fix(tv): refine browse rail layout 2026-05-19 19:30:57 +02:00
edde746 6be1b7c486 fix(android): unwrap DV supplemental samples 2026-05-19 18:26:41 +02:00
edde746 88c65e1857 chore(tv): add text input routing diagnostics 2026-05-19 14:42:34 +02:00
edde746 95ff95d397 fix(player): capture media screenshots
close #1077
2026-05-19 14:17:42 +02:00
edde746 1978d710da fix(ci): unblock Flutter 3.44 checks 2026-05-19 12:38:43 +02:00
edde746 423be62218 fix(tv): pause gamepad during native text input 2026-05-19 12:10:49 +02:00
edde746 d2650667b8 fix(tv): preserve native text input routing 2026-05-19 11:17:44 +02:00
edde746 48cf8accfa fix(jellyfin): resolve versions on demand 2026-05-19 10:54:04 +02:00
edde746 565885cc1e fix(ios): add privacy usage descriptions 2026-05-19 09:31:26 +02:00
edde746 d0e74151b8 fix(ios): update MPVKit renderer recovery 2026-05-18 23:48:22 +02:00
edde746 89c9c6c49b chore(tvos): align Flutter engine with 3.44 2026-05-18 23:31:54 +02:00
edde746 e98d7febdd chore: upgrade Flutter to 3.44 2026-05-18 22:52:51 +02:00
edde746 55ee2c270d fix(android): strip DV init data 2026-05-18 22:06:39 +02:00
edde746 81b05f00df fix(ci): pin Flutter stable version 2026-05-18 20:37:00 +02:00
edde746 f4f2571168 fix(android): apply dv conversion mode during init 2026-05-18 20:32:34 +02:00
edde746 d85a622fbe fix(jellyfin): restore collection query compatibility 2026-05-18 19:24:07 +02:00
edde746 d3e8dcef86 fix(windows): pin patched connectivity_plus 2026-05-18 19:05:08 +02:00
edde746 e9c93415a8 fix(macos): guard MoltenVK heaps 2026-05-18 17:37:46 +02:00
edde746 68e27fdbb3 feat(remote): remember manual host address
close #1074
2026-05-18 17:22:10 +02:00
edde746 a679bae354 fix(android): expose DV conversion setting 2026-05-18 16:30:14 +02:00
edde746 5a68711f7b feat(ui): add pointer cursors to clickable controls
close #1068
2026-05-18 15:56:41 +02:00
edde746 324d145292 fix(jellyfin): support external audio playback 2026-05-18 13:43:58 +02:00
edde746 d004342c98 chore: add website source 2026-05-18 13:15:17 +02:00
edde746 d3d7957b62 docs: improve readme links and downloads 2026-05-18 12:35:04 +02:00
edde746 0e94558548 fix(jellyfin): reduce collection query cost 2026-05-18 10:33:10 +02:00
edde746 8d14a14781 docs: update readme showcase 2026-05-18 06:16:26 +02:00
edde746andGitHub 20f704a56d Merge pull request #1070 from PsychotherapistSam/main
fix(player): adjust performance overlay padding
2026-05-18 06:13:06 +02:00
Sam 7e9f62dc7f fix(player): adjust performance overlay padding 2026-05-17 21:14:00 +02:00
Moritz Fey fd26f470a5 fix: add missing 0.25 speed steps 2026-05-12 11:46:31 +02:00
306 changed files with 17598 additions and 3812 deletions
+49 -4
View File
@@ -29,6 +29,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.44.0"
cache: true
pub-cache: false
@@ -112,6 +113,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.44.0"
cache: true
pub-cache: false
@@ -176,6 +178,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.44.0"
cache: true
pub-cache: false
@@ -344,6 +347,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.44.0"
cache: true
pub-cache: false
@@ -404,6 +408,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "master"
flutter-version: "3.44.0"
cache: true
pub-cache: false
@@ -530,6 +535,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.44.0"
cache: true
pub-cache: false
@@ -548,8 +554,27 @@ jobs:
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang cmake meson ninja-build pkg-config nasm libgtk-3-dev libevdev-dev liblzma-dev libstdc++-12-dev libasound2-dev libass-dev libfreetype-dev libfontconfig-dev libfribidi-dev libharfbuzz-dev libepoxy-dev libegl-dev libgl-dev libgnutls28-dev libpipewire-0.3-dev libva-dev libvdpau-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxpresent-dev libxkbcommon-dev libpulse-dev libdbus-1-dev libdrm-dev libgbm-dev libwayland-dev wayland-protocols liblcms2-dev ruby ruby-dev rubygems build-essential rpm libarchive-tools imagemagick libcurl4-openssl-dev
packages=(
clang cmake meson ninja-build pkg-config nasm libgtk-3-dev libevdev-dev liblzma-dev
libstdc++-12-dev libasound2-dev libass-dev libfreetype-dev libfontconfig-dev libfribidi-dev
libharfbuzz-dev libepoxy-dev libegl-dev libgl-dev libgnutls28-dev libpipewire-0.3-dev
libva-dev libvdpau-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev
libxss-dev libxpresent-dev libxkbcommon-dev libpulse-dev libdbus-1-dev libdrm-dev
libgbm-dev libwayland-dev wayland-protocols liblcms2-dev ruby ruby-dev rubygems
build-essential rpm libarchive-tools imagemagick libcurl4-openssl-dev
)
for attempt in 1 2 3; do
if sudo apt-get update -o Acquire::Retries=3 && sudo apt-get install -y -o Acquire::Retries=3 "${packages[@]}"; then
exit 0
fi
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
sleep $((attempt * 15))
done
exit 1
- name: Cache libmpv build
id: libmpv-cache
@@ -644,6 +669,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "master"
flutter-version: "3.44.0"
cache: true
pub-cache: false
@@ -662,8 +688,27 @@ jobs:
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang cmake meson ninja-build pkg-config nasm libgtk-3-dev libevdev-dev liblzma-dev libstdc++-12-dev libasound2-dev libass-dev libfreetype-dev libfontconfig-dev libfribidi-dev libharfbuzz-dev libepoxy-dev libegl-dev libgl-dev libgnutls28-dev libpipewire-0.3-dev libva-dev libvdpau-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxpresent-dev libxkbcommon-dev libpulse-dev libdbus-1-dev libdrm-dev libgbm-dev libwayland-dev wayland-protocols liblcms2-dev ruby ruby-dev rubygems build-essential rpm libarchive-tools imagemagick libcurl4-openssl-dev
packages=(
clang cmake meson ninja-build pkg-config nasm libgtk-3-dev libevdev-dev liblzma-dev
libstdc++-12-dev libasound2-dev libass-dev libfreetype-dev libfontconfig-dev libfribidi-dev
libharfbuzz-dev libepoxy-dev libegl-dev libgl-dev libgnutls28-dev libpipewire-0.3-dev
libva-dev libvdpau-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev
libxss-dev libxpresent-dev libxkbcommon-dev libpulse-dev libdbus-1-dev libdrm-dev
libgbm-dev libwayland-dev wayland-protocols liblcms2-dev ruby ruby-dev rubygems
build-essential rpm libarchive-tools imagemagick libcurl4-openssl-dev
)
for attempt in 1 2 3; do
if sudo apt-get update -o Acquire::Retries=3 && sudo apt-get install -y -o Acquire::Retries=3 "${packages[@]}"; then
exit 0
fi
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
sleep $((attempt * 15))
done
exit 1
- name: Cache libmpv build
id: libmpv-cache
+4 -1
View File
@@ -23,6 +23,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.44.0"
cache: true
pub-cache: false
@@ -40,7 +41,7 @@ jobs:
- name: Verify generated files committed
run: |
dart run build_runner build --delete-conflicting-outputs
scripts/codegen.sh
if ! git diff --exit-code lib/; then
echo "::error::Generated files (.g.dart / .freezed.dart) are out of date."
echo "Run 'scripts/codegen.sh' and commit the result."
@@ -114,6 +115,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.44.0"
cache: true
pub-cache: false
@@ -168,6 +170,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.44.0"
cache: true
pub-cache: false
+2 -2
View File
@@ -1,6 +1,6 @@
cask "plezy" do
version "2.1.0"
sha256 "9219831cab16f33b3b7a1223f3a120aa8aed44a28352839f3ec5fb569be77cd6"
version "2.2.0"
sha256 "9bfd7397d27bb2dbfd0f4d3e47d6fb73d6a1135f9f181ec8c48767c95964f1e9"
url "https://github.com/edde746/plezy/releases/download/#{version}/plezy-macos.dmg"
name "Plezy"
+49 -11
View File
@@ -5,11 +5,17 @@
A modern client for Plex and Jellyfin on desktop, mobile, and TV. Built with Flutter for native performance and a clean interface.
<p align="center">
<img src="assets/screenshots/macos-home.png" alt="Plezy macOS Home Screen" width="800" />
<p>
<a href="https://plezy.app">Website</a> ·
<a href="https://plezy.app/#screenshots">Screenshots</a> ·
<a href="#download">Download</a> ·
<a href="CONTRIBUTING.md">Contributing</a> ·
<a href="LICENSE">License</a>
</p>
*More screenshots in the [screenshots folder](assets/screenshots/#readme)*
<p align="center">
<img src="assets/readme-showcase.webp" alt="Plezy mobile screenshots" width="900" />
</p>
## Download
@@ -17,9 +23,15 @@ A modern client for Plex and Jellyfin on desktop, mobile, and TV. Built with Flu
<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>
<a href='https://www.amazon.com/gp/product/B0GK65CVS1'><img height='60' alt='Available at the Amazon App Store' src='./assets/amazon-badge.png'/></a>
- [Windows (x64, arm64)](https://github.com/edde746/plezy/releases/latest/download/plezy-windows-installer.exe)
- [macOS (x64, arm64)](https://github.com/edde746/plezy/releases/latest/download/plezy-macos.dmg)
- [Linux (x64, arm64)](https://github.com/edde746/plezy/releases/latest) - .deb, .rpm, .pkg.tar.zst, and portable tar.gz available
| Platform | Download |
| --- | --- |
| Windows | [Installer (x64, arm64)](https://github.com/edde746/plezy/releases/latest/download/plezy-windows-installer.exe) · [Portable x64](https://github.com/edde746/plezy/releases/latest/download/plezy-windows-x64-portable.7z) · [Portable arm64](https://github.com/edde746/plezy/releases/latest/download/plezy-windows-arm64-portable.7z) |
| macOS | [DMG (x64, arm64)](https://github.com/edde746/plezy/releases/latest/download/plezy-macos.dmg) |
| Linux x64 | [.deb](https://github.com/edde746/plezy/releases/latest/download/plezy-linux-x64.deb) · [.rpm](https://github.com/edde746/plezy/releases/latest/download/plezy-linux-x64.rpm) · [.pkg.tar.zst](https://github.com/edde746/plezy/releases/latest/download/plezy-linux-x64.pkg.tar.zst) · [portable tar.gz](https://github.com/edde746/plezy/releases/latest/download/plezy-linux-x64.tar.gz) |
| Linux arm64 | [.deb](https://github.com/edde746/plezy/releases/latest/download/plezy-linux-arm64.deb) · [.rpm](https://github.com/edde746/plezy/releases/latest/download/plezy-linux-arm64.rpm) · [.pkg.tar.zst](https://github.com/edde746/plezy/releases/latest/download/plezy-linux-arm64.pkg.tar.zst) · [portable tar.gz](https://github.com/edde746/plezy/releases/latest/download/plezy-linux-arm64.tar.gz) |
Package managers:
- [Nix](https://search.nixos.org/packages?channel=unstable&query=plezy) - Community package by [@mio-19](https://github.com/mio-19) and [@MiniHarinn](https://github.com/MiniHarinn)
- **Homebrew** (macOS):
```bash
@@ -32,7 +44,7 @@ A modern client for Plex and Jellyfin on desktop, mobile, and TV. Built with Flu
```
- **WinGet** (Windows):
```bash
winget install edde746.plezy
winget install edde746.Plezy
```
## Features
@@ -107,20 +119,46 @@ A modern client for Plex and Jellyfin on desktop, mobile, and TV. Built with Flu
git clone https://github.com/edde746/plezy.git
cd plezy
flutter pub get
dart run build_runner build
scripts/codegen.sh
flutter run
```
### Code Generation
After modifying model classes:
After modifying model classes or other generated sources:
```bash
dart run build_runner build --delete-conflicting-outputs
scripts/codegen.sh
```
After modifying translations:
```bash
dart run slang
```
### Local Checks
```bash
scripts/ci_checks.sh
```
To install the same pre-commit checks locally:
```bash
scripts/setup_hooks.sh
```
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for development workflow, formatting, tests, and translation guidelines.
## License
Plezy is licensed under [GPL-3.0](LICENSE).
## Acknowledgments
- Built with [Flutter](https://flutter.dev)
- Supports [Plex Media Server](https://www.plex.tv) and [Jellyfin](https://jellyfin.org)
- Playback powered by [mpv](https://mpv.io) via [MPVKit](https://github.com/mpvkit/MPVKit) and [libmpv-android](https://github.com/jarnedemeulemeester/libmpv-android)
- Playback powered by [mpv](https://mpv.io), [MPVKit](https://github.com/mpvkit/MPVKit), Android [ExoPlayer](https://developer.android.com/media/media3/exoplayer), [libass-android](https://github.com/peerless2012/libass-android), and [libmpv-android](https://github.com/jarnedemeulemeester/libmpv-android)
@@ -15,9 +15,11 @@ import android.os.Handler
import android.os.Looper
import android.util.Log
import android.util.Rational
import android.view.InputDevice
import android.view.KeyEvent
import android.view.TextureView
import android.view.ViewGroup
import android.view.WindowInsets
import android.view.inputmethod.InputMethodManager
import android.widget.FrameLayout
import androidx.core.content.FileProvider
@@ -39,6 +41,7 @@ class MainActivity : FlutterActivity() {
companion object {
private const val TAG = "MainActivity"
private const val TEXT_INPUT_DIAGNOSTICS_ENABLED = false
var usingSkia = false
}
@@ -46,9 +49,17 @@ class MainActivity : FlutterActivity() {
private val EXTERNAL_PLAYER_CHANNEL = "com.plezy/external_player"
private val THEME_CHANNEL = "com.plezy/theme"
private val DEVICE_CHANNEL = "com.plezy/device"
private val TEXT_INPUT_CHANNEL = "com.plezy/text_input"
private val APP_EXIT_CHANNEL = "com.plezy/app_exit"
private val APP_FOREGROUND_CHANNEL = "com.plezy/app_foreground"
private var watchNextPlugin: WatchNextPlugin? = null
private var nativeTextInputFocused = false
private inline fun logTextInputDiag(message: () -> String) {
if (TEXT_INPUT_DIAGNOSTICS_ENABLED) {
Log.i(TAG, "TextInputDiag ${message()}")
}
}
// Auto PiP state
private var autoPipReady = false
@@ -57,6 +68,67 @@ class MainActivity : FlutterActivity() {
private fun isAndroidTvDevice(): Boolean = getAndroidTvDetection()["isTv"] as Boolean
private fun isImeVisible(): Boolean {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) return false
return window.decorView.rootWindowInsets?.isVisible(WindowInsets.Type.ime()) == true
}
private fun keyActionName(action: Int): String = when (action) {
KeyEvent.ACTION_DOWN -> "down"
KeyEvent.ACTION_UP -> "up"
KeyEvent.ACTION_MULTIPLE -> "multiple"
else -> "unknown($action)"
}
private fun sourceNames(source: Int): String {
val names = mutableListOf<String>()
if ((source and InputDevice.SOURCE_KEYBOARD) == InputDevice.SOURCE_KEYBOARD) names.add("keyboard")
if ((source and InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) names.add("dpad")
if ((source and InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) names.add("gamepad")
if ((source and InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK) names.add("joystick")
if ((source and InputDevice.SOURCE_TOUCHSCREEN) == InputDevice.SOURCE_TOUCHSCREEN) names.add("touchscreen")
if ((source and InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) names.add("mouse")
return names.ifEmpty { listOf("unknown") }.joinToString("+")
}
private fun isDpadKeyCode(keyCode: Int): Boolean = when (keyCode) {
KeyEvent.KEYCODE_DPAD_UP,
KeyEvent.KEYCODE_DPAD_DOWN,
KeyEvent.KEYCODE_DPAD_LEFT,
KeyEvent.KEYCODE_DPAD_RIGHT,
KeyEvent.KEYCODE_DPAD_CENTER,
KeyEvent.KEYCODE_BACK,
KeyEvent.KEYCODE_ENTER,
KeyEvent.KEYCODE_NUMPAD_ENTER -> true
else -> false
}
private fun describeDevice(event: KeyEvent): String {
val device = event.device ?: return "device=null deviceId=${event.deviceId}"
return "deviceId=${event.deviceId} name=${device.name} vendor=${device.vendorId} product=${device.productId} " +
"keyboardType=${device.keyboardType} sources=0x${Integer.toHexString(device.sources)}[${sourceNames(device.sources)}]"
}
private fun describeKeyEvent(event: KeyEvent): String = "action=${keyActionName(event.action)} key=${KeyEvent.keyCodeToString(event.keyCode)}(${event.keyCode}) " +
"scan=${event.scanCode} repeat=${event.repeatCount} source=0x${Integer.toHexString(event.source)}[${sourceNames(event.source)}] " +
"flags=0x${Integer.toHexString(event.flags)} meta=0x${Integer.toHexString(event.metaState)} ${describeDevice(event)}"
private fun describeImeState(): String {
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
val focus = currentFocus
return "nativeTextInputFocused=$nativeTextInputFocused imeVisible=${isImeVisible()} " +
"acceptingText=${imm.isAcceptingText} activeDecor=${imm.isActive(window.decorView)} " +
"decorHasFocus=${window.decorView.hasFocus()} currentFocus=${focus?.javaClass?.name} " +
"currentFocusHasFocus=${focus?.hasFocus()} currentFocusFocused=${focus?.isFocused}"
}
private fun shouldForwardDpadBeforeIme(): Boolean {
val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
val forward = !nativeTextInputFocused && !isImeVisible() && !imm.isAcceptingText
logTextInputDiag { "shouldForwardDpadBeforeIme=$forward ${describeImeState()}" }
return forward
}
private fun getAndroidTvDetection(): Map<String, Any> {
val pm = packageManager
val uiModeType = resources.configuration.uiMode and Configuration.UI_MODE_TYPE_MASK
@@ -118,20 +190,28 @@ class MainActivity : FlutterActivity() {
val content = findViewById<ViewGroup>(android.R.id.content)
val wrapper = object : FrameLayout(this) {
override fun dispatchKeyEventPreIme(event: KeyEvent): Boolean {
if (isDpadKeyCode(event.keyCode)) {
logTextInputDiag { "preIme received ${describeKeyEvent(event)} ${describeImeState()}" }
}
when (event.keyCode) {
KeyEvent.KEYCODE_DPAD_UP,
KeyEvent.KEYCODE_DPAD_DOWN,
KeyEvent.KEYCODE_DPAD_LEFT,
KeyEvent.KEYCODE_DPAD_RIGHT,
KeyEvent.KEYCODE_DPAD_CENTER -> {
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
if (!imm.isAcceptingText) {
if (shouldForwardDpadBeforeIme()) {
logTextInputDiag { "preIme forwarding-to-Flutter-and-consuming ${describeKeyEvent(event)}" }
super.dispatchKeyEvent(event)
return true
}
logTextInputDiag { "preIme letting-IME-handle ${describeKeyEvent(event)}" }
}
}
return super.dispatchKeyEventPreIme(event)
val handled = super.dispatchKeyEventPreIme(event)
if (isDpadKeyCode(event.keyCode)) {
logTextInputDiag { "preIme superResult=$handled ${describeKeyEvent(event)} ${describeImeState()}" }
}
return handled
}
}
while (content.childCount > 0) {
@@ -157,6 +237,19 @@ class MainActivity : FlutterActivity() {
handleWatchNextIntent(intent)
}
override fun dispatchKeyEvent(event: KeyEvent): Boolean {
if (isDpadKeyCode(event.keyCode)) {
logTextInputDiag { "activity.dispatchKeyEvent before ${describeKeyEvent(event)} ${describeImeState()}" }
}
val handled = super.dispatchKeyEvent(event)
if (isDpadKeyCode(event.keyCode)) {
logTextInputDiag {
"activity.dispatchKeyEvent after handled=$handled ${describeKeyEvent(event)} ${describeImeState()}"
}
}
return handled
}
private fun handleWatchNextIntent(intent: Intent?) {
val contentId = WatchNextPlugin.handleIntent(intent)
if (contentId != null) {
@@ -250,6 +343,20 @@ class MainActivity : FlutterActivity() {
}
}
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, TEXT_INPUT_CHANNEL).setMethodCallHandler { call, result ->
when (call.method) {
"setNativeTextInputFocused" -> {
val oldValue = nativeTextInputFocused
nativeTextInputFocused = call.arguments as? Boolean ?: false
logTextInputDiag {
"methodChannel setNativeTextInputFocused old=$oldValue new=$nativeTextInputFocused ${describeImeState()}"
}
result.success(null)
}
else -> result.notImplemented()
}
}
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, APP_EXIT_CHANNEL).setMethodCallHandler { call, result ->
when (call.method) {
"requestExit" -> {
@@ -1,6 +1,7 @@
package com.edde746.plezy.exoplayer
import android.util.Log
import androidx.media3.common.C
import androidx.media3.common.DataReader
import androidx.media3.common.Format
import androidx.media3.common.MimeTypes
@@ -28,7 +29,8 @@ import androidx.media3.extractor.TrackOutput
*/
class DoviConvertingTrackOutput(
private val delegate: TrackOutput,
private val dvMode: DvConversionMode = DvConversionMode.HEVC_STRIP
private val dvMode: DvConversionMode = DvConversionMode.HEVC_STRIP,
private val emitLog: ((String, String, String) -> Unit)? = null
) : TrackOutput {
companion object {
@@ -45,6 +47,8 @@ class DoviConvertingTrackOutput(
private set
var strippedNalCount = 0L
private set
var strippedInitNalCount = 0L
private set
var convertedRpuCount = 0L
private set
var rpuConversionFailureCount = 0L
@@ -69,19 +73,21 @@ class DoviConvertingTrackOutput(
private var rpuConversionCallCount = 0L
private var totalRpuConversionTimeUs = 0L
private var totalSampleProcessingTimeUs = 0L
private var loggedSupplementalWrapper = false
private var loggedEncryptedSupplementalPassthrough = false
override fun format(format: Format) {
if (!conversionActive) {
val codecs = format.codecs
if (codecs != null && codecs.startsWith("dvhe.07")) {
conversionActive = true
Log.i(TAG, "DV Profile 7 detected ($codecs), mode=$dvMode")
Log.i(
TAG,
logInfo("DV Profile 7 detected ($codecs), mode=$dvMode")
logInfo(
"Original format: mime=${format.sampleMimeType}, codecs=$codecs, " +
"initData=${format.initializationData.size} entries " +
"(${format.initializationData.mapIndexed { i, d -> "$i:${d.size}B" }.joinToString()})"
)
val strippedInitializationData = stripInitializationData(format.initializationData)
val newFormat = when (dvMode) {
DvConversionMode.DV81 -> {
@@ -89,39 +95,26 @@ class DoviConvertingTrackOutput(
val level = codecs.split('.').getOrNull(2)?.toIntOrNull() ?: 6
val newCodecs = "dvhe.08.%02d".format(level)
val dvConfigRecord = buildDv81ConfigRecord(level)
Log.i(TAG, "DV81: rewriting to $newCodecs, config=${dvConfigRecord.size}B")
logInfo("DV81: rewriting to $newCodecs, config=${dvConfigRecord.size}B")
format.buildUpon()
.setSampleMimeType(MimeTypes.VIDEO_DOLBY_VISION)
.setCodecs(newCodecs)
.setInitializationData(
if (format.initializationData.isNotEmpty()) {
listOf(format.initializationData[0], dvConfigRecord)
} else {
listOf(ByteArray(0), dvConfigRecord)
}
)
.setInitializationData(strippedInitializationData + dvConfigRecord)
.build()
}
else -> {
// HEVC_STRIP: present as plain HEVC
Log.i(TAG, "HEVC_STRIP: rewriting to video/hevc")
logInfo("HEVC_STRIP: rewriting to video/hevc")
format.buildUpon()
.setSampleMimeType(MimeTypes.VIDEO_H265)
.setCodecs(null)
.setInitializationData(
if (format.initializationData.isNotEmpty()) {
listOf(format.initializationData[0])
} else {
emptyList()
}
)
.setInitializationData(strippedInitializationData)
.build()
}
}
Log.i(
TAG,
logInfo(
"Rewritten format: mime=${newFormat.sampleMimeType}, " +
"codecs=${newFormat.codecs}, initData=${newFormat.initializationData.size} entries"
)
@@ -179,23 +172,24 @@ class DoviConvertingTrackOutput(
val srcLen = sampleLen
sampleLen = 0
val outLen: Int
val outBuf: ByteArray
val processStartNs = System.nanoTime()
val success = try {
processNalUnits(srcLen)
true
} catch (e: Exception) {
Log.e(TAG, "NAL processing failed, passing raw sample", e)
val success = if ((flags and C.BUFFER_FLAG_ENCRYPTED) != 0) {
if (!loggedEncryptedSupplementalPassthrough && (flags and C.BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA) != 0) {
loggedEncryptedSupplementalPassthrough = true
logWarn("Encrypted supplemental sample encountered, passing raw sample")
}
false
}
if (success) {
outLen = outputLen
outBuf = outputBuf
} else {
outLen = srcLen
outBuf = sampleBuf
try {
processSampleData(flags, srcLen)
true
} catch (e: Exception) {
logError("NAL processing failed, passing raw sample", e)
false
}
}
val outLen = if (success) outputLen else srcLen
val outBuf = if (success) outputBuf else sampleBuf
if (success) {
recordSampleProcessing((System.nanoTime() - processStartNs) / 1_000L)
}
@@ -209,17 +203,76 @@ class DoviConvertingTrackOutput(
}
/**
* Process NAL units in sampleBuf[0..dataLen). Auto-detects format:
* Process a sample, unwrapping Media3 supplemental-data framing when present.
*
* Samples with C.BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA are stored as:
* [4-byte big-endian main sample size][main sample][supplemental data].
* Only the main sample contains video NALs and should be rewritten.
*/
private fun processSampleData(flags: Int, dataLen: Int) {
if ((flags and C.BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA) == 0) {
processNalUnits(0, dataLen)
return
}
if (dataLen < 4) {
logWarn("Bad supplemental sample: ${dataLen}B is too small")
copyRawSample(dataLen)
return
}
val mainSampleLen = readInt32BE(sampleBuf, 0)
if (mainSampleLen < 0 || mainSampleLen > dataLen - 4) {
logWarn("Bad supplemental sample: mainLen=$mainSampleLen total=$dataLen")
copyRawSample(dataLen)
return
}
val supplementalLen = dataLen - 4 - mainSampleLen
if (!loggedSupplementalWrapper) {
loggedSupplementalWrapper = true
logDebug(
"Supplemental wrapper detected: total=${dataLen}B, main=${mainSampleLen}B, " +
"supplemental=${supplementalLen}B, innerFirstBytes=${formatBytes(sampleBuf, 4, 8)}"
)
}
processNalUnits(4, mainSampleLen)
val processedMainLen = outputLen
if (processedMainLen == 0) {
outputLen = 0
return
}
ensureOutputCapacity(4 + processedMainLen + supplementalLen)
System.arraycopy(outputBuf, 0, outputBuf, 4, processedMainLen)
writeInt32BE(outputBuf, 0, processedMainLen)
if (supplementalLen > 0) {
System.arraycopy(sampleBuf, 4 + mainSampleLen, outputBuf, 4 + processedMainLen, supplementalLen)
}
outputLen = 4 + processedMainLen + supplementalLen
if (sampleCount <= 3 || (sampleCount % 500 == 0L)) {
logDebug(
"Sample #$sampleCount (Supplemental): main=${mainSampleLen}B -> ${processedMainLen}B, " +
"supplemental=${supplementalLen}B, total=${dataLen}B -> ${outputLen}B"
)
}
}
/**
* Process NAL units in sampleBuf[dataOffset..dataOffset+dataLen). Auto-detects format:
* - Annex B (00 00 00 01 / 00 00 01 start codes) — used by MatroskaExtractor
* - Length-prefixed (4-byte big-endian length) — used by Mp4Extractor
*
* Result is written to outputBuf[0..outputLen).
*/
private fun processNalUnits(dataLen: Int) {
private fun processNalUnits(dataOffset: Int, dataLen: Int) {
outputLen = 0
if (dataLen < 4) {
ensureOutputCapacity(dataLen)
System.arraycopy(sampleBuf, 0, outputBuf, 0, dataLen)
System.arraycopy(sampleBuf, dataOffset, outputBuf, 0, dataLen)
outputLen = dataLen
return
}
@@ -227,41 +280,41 @@ class DoviConvertingTrackOutput(
// Auto-detect: Annex B starts with 00 00 00 01 or 00 00 01
val isAnnexB = (
dataLen >= 4 &&
sampleBuf[0] == 0.toByte() &&
sampleBuf[1] == 0.toByte() &&
sampleBuf[2] == 0.toByte() &&
sampleBuf[3] == 1.toByte()
sampleBuf[dataOffset] == 0.toByte() &&
sampleBuf[dataOffset + 1] == 0.toByte() &&
sampleBuf[dataOffset + 2] == 0.toByte() &&
sampleBuf[dataOffset + 3] == 1.toByte()
) ||
(
dataLen >= 3 &&
sampleBuf[0] == 0.toByte() &&
sampleBuf[1] == 0.toByte() &&
sampleBuf[2] == 1.toByte()
sampleBuf[dataOffset] == 0.toByte() &&
sampleBuf[dataOffset + 1] == 0.toByte() &&
sampleBuf[dataOffset + 2] == 1.toByte()
)
if (sampleCount == 0L) {
Log.d(
TAG,
logDebug(
"NAL format detected: ${if (isAnnexB) "Annex B" else "length-prefixed"}, " +
"first bytes: ${sampleBuf.take(8).joinToString(" ") { "%02X".format(it) }}"
"first bytes: ${formatBytes(sampleBuf, dataOffset, 8)}"
)
}
if (isAnnexB) processAnnexBNals(dataLen) else processLengthPrefixedNals(dataLen)
if (isAnnexB) processAnnexBNals(dataOffset, dataLen) else processLengthPrefixedNals(dataOffset, dataLen)
}
/** Process Annex B formatted NAL units (MKV path). Scans inline, no list allocation. */
private fun processAnnexBNals(dataLen: Int) {
private fun processAnnexBNals(dataOffset: Int, dataLen: Int) {
ensureOutputCapacity(dataLen)
val dataEnd = dataOffset + dataLen
var kept = 0
var stripped = 0
// Find first start code
var scEnd = -1
var i = 0
while (i < dataLen - 2) {
var i = dataOffset
while (i < dataEnd - 2) {
if (sampleBuf[i] == 0.toByte() && sampleBuf[i + 1] == 0.toByte()) {
if (i + 3 < dataLen && sampleBuf[i + 2] == 0.toByte() && sampleBuf[i + 3] == 1.toByte()) {
if (i + 3 < dataEnd && sampleBuf[i + 2] == 0.toByte() && sampleBuf[i + 3] == 1.toByte()) {
scEnd = i + 4
break
} else if (sampleBuf[i + 2] == 1.toByte()) {
@@ -274,7 +327,7 @@ class DoviConvertingTrackOutput(
if (scEnd < 0) {
// No start codes found — pass through
System.arraycopy(sampleBuf, 0, outputBuf, 0, dataLen)
System.arraycopy(sampleBuf, dataOffset, outputBuf, 0, dataLen)
outputLen = dataLen
sampleCount++
return
@@ -282,13 +335,13 @@ class DoviConvertingTrackOutput(
var nalStart = scEnd
while (nalStart < dataLen) {
while (nalStart < dataEnd) {
// Find next start code to determine end of current NAL
var nalEnd = dataLen
var nalEnd = dataEnd
i = nalStart
while (i < dataLen - 2) {
while (i < dataEnd - 2) {
if (sampleBuf[i] == 0.toByte() && sampleBuf[i + 1] == 0.toByte()) {
if (i + 3 < dataLen && sampleBuf[i + 2] == 0.toByte() && sampleBuf[i + 3] == 1.toByte()) {
if (i + 3 < dataEnd && sampleBuf[i + 2] == 0.toByte() && sampleBuf[i + 3] == 1.toByte()) {
nalEnd = i
break
} else if (sampleBuf[i + 2] == 1.toByte()) {
@@ -330,8 +383,8 @@ class DoviConvertingTrackOutput(
}
// Advance past the next start code
if (nalEnd >= dataLen) break
nalStart = if (nalEnd + 3 < dataLen && sampleBuf[nalEnd + 2] == 0.toByte() && sampleBuf[nalEnd + 3] == 1.toByte()) {
if (nalEnd >= dataEnd) break
nalStart = if (nalEnd + 3 < dataEnd && sampleBuf[nalEnd + 2] == 0.toByte() && sampleBuf[nalEnd + 3] == 1.toByte()) {
nalEnd + 4
} else {
nalEnd + 3
@@ -340,8 +393,7 @@ class DoviConvertingTrackOutput(
sampleCount++
if (sampleCount <= 3 || (sampleCount % 500 == 0L)) {
Log.d(
TAG,
logDebug(
"Sample #$sampleCount (AnnexB): ${dataLen}B -> ${outputLen}B, " +
"kept=$kept stripped=$stripped NALs"
)
@@ -349,21 +401,22 @@ class DoviConvertingTrackOutput(
}
/** Process length-prefixed NAL units (MP4 path). */
private fun processLengthPrefixedNals(dataLen: Int) {
private fun processLengthPrefixedNals(dataOffset: Int, dataLen: Int) {
ensureOutputCapacity(dataLen)
var pos = 0
val dataEnd = dataOffset + dataLen
var pos = dataOffset
var kept = 0
var stripped = 0
while (pos + 4 <= dataLen) {
while (pos + 4 <= dataEnd) {
val nalLen = ((sampleBuf[pos].toInt() and 0xFF) shl 24) or
((sampleBuf[pos + 1].toInt() and 0xFF) shl 16) or
((sampleBuf[pos + 2].toInt() and 0xFF) shl 8) or
(sampleBuf[pos + 3].toInt() and 0xFF)
if (nalLen <= 0 || pos + 4 + nalLen > dataLen) {
if (nalLen <= 0 || pos + 4 + nalLen > dataEnd) {
if (sampleCount < 5) {
Log.w(TAG, "Bad NAL length $nalLen at pos $pos (data.size=$dataLen)")
logWarn("Bad NAL length $nalLen at pos ${pos - dataOffset} (data.size=$dataLen)")
}
break
}
@@ -401,8 +454,7 @@ class DoviConvertingTrackOutput(
sampleCount++
if (sampleCount <= 3 || (sampleCount % 500 == 0L)) {
Log.d(
TAG,
logDebug(
"Sample #$sampleCount (LenPrefix): ${dataLen}B -> ${outputLen}B, " +
"kept=$kept stripped=$stripped NALs"
)
@@ -449,8 +501,7 @@ class DoviConvertingTrackOutput(
private fun recordSampleProcessing(elapsedUs: Long) {
totalSampleProcessingTimeUs += elapsedUs
if (sampleCount <= 3 || (sampleCount > 0 && sampleCount % 500 == 0L)) {
Log.d(
TAG,
logDebug(
"Perf: avgSample=${averageSampleProcessingTimeUs}us, " +
"avgRpu=${averageRpuConversionTimeUs}us, converted=$convertedRpuCount, " +
"rpuFailures=$rpuConversionFailureCount, rpuTooSmall=$rpuOutputTooSmallCount"
@@ -458,14 +509,121 @@ class DoviConvertingTrackOutput(
}
}
private fun stripInitializationData(initializationData: List<ByteArray>): List<ByteArray> {
if (initializationData.isEmpty()) return emptyList()
val stripped = ArrayList<ByteArray>(initializationData.size)
var beforeBytes = 0
var afterBytes = 0
var droppedBuffers = 0
for (data in initializationData) {
beforeBytes += data.size
val processed = stripInitializationAnnexB(data)
if (processed == null) {
// Media3's HEVC init data is normally Annex B. Non-AnnexB entries in
// Dolby Vision formats are typically dvcC/dvvC records, which must not
// be forwarded when advertising plain HEVC.
droppedBuffers++
continue
}
if (processed.isEmpty()) {
droppedBuffers++
continue
}
afterBytes += processed.size
stripped.add(processed)
}
logInfo(
"Init data stripped: ${initializationData.size} entries/${beforeBytes}B -> " +
"${stripped.size} entries/${afterBytes}B, strippedNals=$strippedInitNalCount, " +
"droppedBuffers=$droppedBuffers"
)
return stripped
}
private fun stripInitializationAnnexB(data: ByteArray): ByteArray? {
if (data.isEmpty()) return data
val firstStartCodeEnd = findStartCodeEnd(data, 0) ?: return null
ensureOutputCapacity(data.size)
outputLen = 0
var kept = 0
var stripped = 0
var nalStart = firstStartCodeEnd
while (nalStart < data.size) {
val nalEnd = findNextStartCodeOffset(data, nalStart) ?: data.size
val nalLen = nalEnd - nalStart
if (nalLen > 0) {
when (classifyNal(data, nalStart, nalLen, convertRpu = false)) {
NalAction.KEEP -> {
ensureOutputCapacity(outputLen + 4 + nalLen)
System.arraycopy(ANNEX_B_START_CODE, 0, outputBuf, outputLen, 4)
outputLen += 4
System.arraycopy(data, nalStart, outputBuf, outputLen, nalLen)
normalizeLayerId(outputBuf, outputLen)
outputLen += nalLen
kept++
}
else -> {
strippedInitNalCount++
stripped++
}
}
}
if (nalEnd >= data.size) break
nalStart = findStartCodeEnd(data, nalEnd) ?: break
}
logDebug("Init data sample: ${data.size}B -> ${outputLen}B, kept=$kept stripped=$stripped NALs")
return outputBuf.copyOf(outputLen)
}
private fun findStartCodeEnd(data: ByteArray, from: Int): Int? {
var i = from
while (i < data.size - 2) {
if (data[i] == 0.toByte() && data[i + 1] == 0.toByte()) {
if (i + 3 < data.size && data[i + 2] == 0.toByte() && data[i + 3] == 1.toByte()) {
return i + 4
} else if (data[i + 2] == 1.toByte()) {
return i + 3
}
}
i++
}
return null
}
private fun findNextStartCodeOffset(data: ByteArray, from: Int): Int? {
var i = from
while (i < data.size - 2) {
if (data[i] == 0.toByte() && data[i + 1] == 0.toByte()) {
if (i + 3 < data.size && data[i + 2] == 0.toByte() && data[i + 3] == 1.toByte()) {
return i
} else if (data[i + 2] == 1.toByte()) {
return i
}
}
i++
}
return null
}
/** Classify a NAL at sampleBuf[offset..offset+len) without copying. */
private fun processNalInline(offset: Int, len: Int): NalAction {
private fun processNalInline(offset: Int, len: Int): NalAction = classifyNal(sampleBuf, offset, len, convertRpu = dvMode == DvConversionMode.DV81)
private fun classifyNal(data: ByteArray, offset: Int, len: Int, convertRpu: Boolean): NalAction {
if (len < 2) return NalAction.KEEP
val nalType = (sampleBuf[offset].toInt() ushr 1) and 0x3F
val nuhLayerId = ((sampleBuf[offset].toInt() and 1) shl 5) or
((sampleBuf[offset + 1].toInt() ushr 3) and 0x1F)
val nalType = (data[offset].toInt() ushr 1) and 0x3F
val nuhLayerId = ((data[offset].toInt() and 1) shl 5) or
((data[offset + 1].toInt() ushr 3) and 0x1F)
return when {
nalType == NAL_TYPE_UNSPEC62 && dvMode == DvConversionMode.DV81 -> NalAction.CONVERT
nalType == NAL_TYPE_UNSPEC62 && convertRpu -> NalAction.CONVERT
nalType == NAL_TYPE_UNSPEC62 || nalType == NAL_TYPE_UNSPEC63 || nuhLayerId > 0 -> NalAction.STRIP
else -> NalAction.KEEP
}
@@ -485,6 +643,23 @@ class DoviConvertingTrackOutput(
buf[offset + 3] = (value and 0xFF).toByte()
}
private fun readInt32BE(buf: ByteArray, offset: Int): Int = ((buf[offset].toInt() and 0xFF) shl 24) or
((buf[offset + 1].toInt() and 0xFF) shl 16) or
((buf[offset + 2].toInt() and 0xFF) shl 8) or
(buf[offset + 3].toInt() and 0xFF)
private fun copyRawSample(dataLen: Int) {
ensureOutputCapacity(dataLen)
System.arraycopy(sampleBuf, 0, outputBuf, 0, dataLen)
outputLen = dataLen
}
private fun formatBytes(data: ByteArray, offset: Int, length: Int): String {
val end = minOf(data.size, offset + length)
if (offset >= end) return ""
return (offset until end).joinToString(" ") { "%02X".format(data[it]) }
}
private fun ensureSampleCapacity(needed: Int) {
if (sampleBuf.size < needed) {
sampleBuf = sampleBuf.copyOf(maxOf(needed, sampleBuf.size * 2))
@@ -497,6 +672,26 @@ class DoviConvertingTrackOutput(
}
}
private fun logDebug(message: String) {
Log.d(TAG, message)
emitLog?.invoke("debug", "dv-convert", message)
}
private fun logInfo(message: String) {
Log.i(TAG, message)
emitLog?.invoke("info", "dv-convert", message)
}
private fun logWarn(message: String) {
Log.w(TAG, message)
emitLog?.invoke("warn", "dv-convert", message)
}
private fun logError(message: String, throwable: Throwable) {
Log.e(TAG, message, throwable)
emitLog?.invoke("error", "dv-convert", "$message: ${throwable.message}")
}
/**
* Build a 24-byte DOVIDecoderConfigurationRecord for DV Profile 8.1.
*
@@ -16,12 +16,13 @@ import androidx.media3.extractor.TrackOutput
class DoviExtractorOutputWrapper(
private val delegate: ExtractorOutput,
private val dvMode: DvConversionMode,
private val emitLog: ((String, String, String) -> Unit)?,
private val onVideoTrackWrapped: (DoviConvertingTrackOutput) -> Unit
) : ExtractorOutput {
override fun track(id: Int, type: Int): TrackOutput {
val original = delegate.track(id, type)
if (type == C.TRACK_TYPE_VIDEO) {
val wrapper = DoviConvertingTrackOutput(original, dvMode)
val wrapper = DoviConvertingTrackOutput(original, dvMode, emitLog)
onVideoTrackWrapped(wrapper)
return wrapper
}
@@ -39,7 +40,8 @@ class DoviExtractorOutputWrapper(
*/
class DoviExtractorWrapper(
private val delegate: Extractor,
private val dvMode: DvConversionMode = DvConversionMode.HEVC_STRIP
private val dvMode: DvConversionMode = DvConversionMode.HEVC_STRIP,
private val emitLog: ((String, String, String) -> Unit)? = null
) : Extractor {
@Volatile var doviTrackOutput: DoviConvertingTrackOutput? = null
@@ -48,7 +50,7 @@ class DoviExtractorWrapper(
override fun sniff(input: ExtractorInput): Boolean = delegate.sniff(input)
override fun init(output: ExtractorOutput) {
delegate.init(DoviExtractorOutputWrapper(output, dvMode) { doviTrackOutput = it })
delegate.init(DoviExtractorOutputWrapper(output, dvMode, emitLog) { doviTrackOutput = it })
}
override fun read(input: ExtractorInput, seekPosition: PositionHolder): Int = delegate.read(input, seekPosition)
File diff suppressed because it is too large Load Diff
@@ -180,6 +180,7 @@ class ExoPlayerPlugin :
val bufferSizeBytes = call.argument<Int>("bufferSizeBytes")
val tunnelingEnabled = call.argument<Boolean>("tunnelingEnabled") ?: true
val dvConversionMode = call.argument<String>("dvConversionMode") ?: "auto"
configuredBufferSizeBytes = bufferSizeBytes
currentActivity.runOnUiThread {
@@ -201,6 +202,9 @@ class ExoPlayerPlugin :
bufferSizeBytes = bufferSizeBytes,
tunnelingEnabled = tunnelingEnabled
) ?: false
if (success && playerCore?.setDebugDvConversionMode(dvConversionMode) != true) {
Log.w(TAG, "Invalid DV conversion mode during initialize: $dvConversionMode")
}
// Start hidden
playerCore?.setVisible(false)
@@ -4,6 +4,8 @@ import android.content.Context
import android.media.AudioDeviceInfo
import android.os.Build
import androidx.annotation.OptIn
import androidx.media3.common.Format
import androidx.media3.common.MimeTypes
import androidx.media3.common.PlaybackParameters
import androidx.media3.common.util.Clock
import androidx.media3.common.util.UnstableApi
@@ -27,6 +29,14 @@ class PlezyRenderersFactory(context: Context) : DefaultRenderersFactory(context)
/** Audio delay in microseconds. Shared with PositionFixAudioSink for live updates. */
val audioDelayUs = AtomicLong(0L)
/** Returns whether direct TrueHD output should be hidden so decoded PCM output can be selected. */
var shouldBlockDirectTrueHd: ((Format) -> Boolean)? = null
/** Called before Media3 reacts to an audio route/capability change. */
var onAudioCapabilitiesChanged: (() -> Unit)? = null
var audioDiagnosticsLogger: ((String, String, String) -> Unit)? = null
override fun buildAudioSink(
context: Context,
enableFloatOutput: Boolean,
@@ -51,10 +61,17 @@ class PlezyRenderersFactory(context: Context) : DefaultRenderersFactory(context)
val defaultSink = DefaultAudioSink.Builder(context)
.setEnableFloatOutput(enableFloatOutput)
.setEnableAudioOutputPlaybackParameters(enableAudioOutputPlaybackParams)
.setAudioOutputProvider(RawPositionOutputProvider(realProvider, rawPositionUs))
.setAudioOutputProvider(RawPositionOutputProvider(realProvider, rawPositionUs, audioDiagnosticsLogger))
.build()
return PositionFixAudioSink(defaultSink, rawPositionUs, audioDelayUs)
return PositionFixAudioSink(
defaultSink,
rawPositionUs,
audioDelayUs,
shouldBlockDirectTrueHd,
onAudioCapabilitiesChanged,
audioDiagnosticsLogger
)
}
}
@@ -83,7 +100,10 @@ class PlezyRenderersFactory(context: Context) : DefaultRenderersFactory(context)
private class PositionFixAudioSink(
sink: AudioSink,
private val rawPositionUs: AtomicLong,
private val audioDelayUs: AtomicLong
private val audioDelayUs: AtomicLong,
private val shouldBlockDirectTrueHd: ((Format) -> Boolean)?,
private val onAudioCapabilitiesChanged: (() -> Unit)?,
private val log: ((String, String, String) -> Unit)?
) : ForwardingAudioSink(sink) {
private var startMediaTimeUs = Long.MIN_VALUE
@@ -97,12 +117,45 @@ private class PositionFixAudioSink(
// Transient counter-offset: after seek/flush, ramp offset from 0 to full
// over recoveryDurationUs to prevent video frame drops.
private var recoveryDurationUs = 0L
private var loggedTrueHdDirectBlock = false
private var loggedFirstBuffer = false
override fun supportsFormat(format: Format): Boolean {
if (blocksDirectTrueHd(format)) return false
return super.supportsFormat(format)
}
override fun getFormatSupport(format: Format): Int {
if (blocksDirectTrueHd(format)) return AudioSink.SINK_FORMAT_UNSUPPORTED
return super.getFormatSupport(format)
}
private fun blocksDirectTrueHd(format: Format): Boolean {
if (format.sampleMimeType != MimeTypes.AUDIO_TRUEHD || shouldBlockDirectTrueHd?.invoke(format) != true) return false
if (!loggedTrueHdDirectBlock) {
loggedTrueHdDirectBlock = true
log?.invoke(
"info",
"audio",
"Blocking direct TrueHD output; route does not report TrueHD bitstream support, decoded PCM output will be preferred"
)
}
return true
}
override fun handleBuffer(
buffer: ByteBuffer,
presentationTimeUs: Long,
encodedAccessUnitCount: Int
): Boolean {
if (!loggedFirstBuffer && buffer.hasRemaining()) {
loggedFirstBuffer = true
log?.invoke(
"debug",
"audio-sink",
"First buffer: size=${buffer.remaining()}B, pts=${presentationTimeUs}us, accessUnits=$encodedAccessUnitCount"
)
}
if (startMediaTimeUs == Long.MIN_VALUE) {
startMediaTimeUs = presentationTimeUs
refMediaTimeUs = presentationTimeUs
@@ -163,7 +216,10 @@ private class PositionFixAudioSink(
override fun onSkipSilenceEnabledChanged(skipSilenceEnabled: Boolean) = listener.onSkipSilenceEnabledChanged(skipSilenceEnabled)
override fun onOffloadBufferEmptying() = listener.onOffloadBufferEmptying()
override fun onOffloadBufferFull() = listener.onOffloadBufferFull()
override fun onAudioCapabilitiesChanged() = listener.onAudioCapabilitiesChanged()
override fun onAudioCapabilitiesChanged() {
onAudioCapabilitiesChanged?.invoke()
listener.onAudioCapabilitiesChanged()
}
override fun onAudioTrackInitialized(audioTrackConfig: AudioSink.AudioTrackConfig) = listener.onAudioTrackInitialized(audioTrackConfig)
override fun onAudioTrackReleased(audioTrackConfig: AudioSink.AudioTrackConfig) = listener.onAudioTrackReleased(audioTrackConfig)
override fun onSilenceSkipped() = listener.onSilenceSkipped()
@@ -235,7 +291,8 @@ internal class SubtitleDelayRenderer(
@OptIn(UnstableApi::class)
private class RawPositionOutputProvider(
private val delegate: AudioOutputProvider,
private val rawPositionUs: AtomicLong
private val rawPositionUs: AtomicLong,
private val log: ((String, String, String) -> Unit)?
) : AudioOutputProvider {
private var cachedOutput: RawPositionAudioOutput? = null
@@ -256,7 +313,7 @@ private class RawPositionOutputProvider(
val realOutput = delegate.getAudioOutput(config)
cachedConfig = config
return RawPositionAudioOutput(realOutput, rawPositionUs, this)
return RawPositionAudioOutput(realOutput, rawPositionUs, this, log)
}
fun returnToCache(output: RawPositionAudioOutput) {
@@ -285,9 +342,14 @@ private class RawPositionOutputProvider(
private class RawPositionAudioOutput(
private val delegate: AudioOutput,
private val rawPositionUs: AtomicLong,
private val provider: RawPositionOutputProvider
private val provider: RawPositionOutputProvider,
private val log: ((String, String, String) -> Unit)?
) : AudioOutput {
private var loggedFirstWrite = false
private var writeCount = 0L
private var writtenBytes = 0L
override fun getPositionUs(): Long {
val pos = delegate.getPositionUs()
rawPositionUs.set(pos)
@@ -298,10 +360,30 @@ private class RawPositionAudioOutput(
override fun pause() = delegate.pause()
@Throws(AudioOutput.WriteException::class)
override fun write(buffer: ByteBuffer, size: Int, presentationTimeUs: Long) = delegate.write(buffer, size, presentationTimeUs)
override fun write(buffer: ByteBuffer, size: Int, presentationTimeUs: Long): Boolean {
val before = buffer.position()
val handled = delegate.write(buffer, size, presentationTimeUs)
val written = buffer.position() - before
if (written > 0) {
writeCount++
writtenBytes += written.toLong()
if (!loggedFirstWrite) {
loggedFirstWrite = true
log?.invoke(
"debug",
"audio-output",
"First write: wrote=${written}B, handled=$handled, pts=${presentationTimeUs}us, writes=$writeCount, total=${writtenBytes}B"
)
}
}
return handled
}
override fun flush() {
rawPositionUs.set(Long.MIN_VALUE)
loggedFirstWrite = false
writeCount = 0
writtenBytes = 0
delegate.flush()
}
@@ -174,7 +174,8 @@ class MpvPlayerCore(private val activity: Activity) : SurfaceHolder.Callback {
)
frameRateManager = FrameRateManager(
activity = activity,
handler = handler
handler = handler,
log = { emitLog("info", "framerate", it) }
)
// Create FrameLayout container for video
@@ -276,6 +277,17 @@ class MpvPlayerCore(private val activity: Activity) : SurfaceHolder.Callback {
// Flow collectors
private fun emitLog(level: String, prefix: String, text: String) {
delegate?.onEvent(
"log-message",
mapOf(
"prefix" to prefix,
"level" to level,
"text" to text
)
)
}
private fun collectEvents(p: MpvPlayer) {
scope.launch(start = CoroutineStart.UNDISPATCHED) {
p.eventFlow.collect { event ->
@@ -317,14 +329,7 @@ class MpvPlayerCore(private val activity: Activity) : SurfaceHolder.Callback {
private fun collectLogMessages(p: MpvPlayer) {
scope.launch(start = CoroutineStart.UNDISPATCHED) {
p.logFlow.collect { msg ->
delegate?.onEvent(
"log-message",
mapOf(
"prefix" to msg.prefix,
"level" to msg.level.name.lowercase(),
"text" to msg.text
)
)
emitLog(msg.level.name.lowercase(), msg.prefix, msg.text)
}
}
}
@@ -784,7 +789,7 @@ class MpvPlayerCore(private val activity: Activity) : SurfaceHolder.Callback {
onComplete(false)
return
}
mgr.setVideoFrameRate(fps, videoDurationMs, surfaceView?.holder?.surface, extraDelayMs) { switched ->
mgr.setVideoFrameRate(fps, videoDurationMs, extraDelayMs) { switched ->
player?.let { updateDisplayFpsOverride(it, "frame rate switch, switched=$switched") }
onComplete(switched)
}
@@ -6,11 +6,11 @@ import android.hardware.display.DisplayManager
import android.os.Build
import android.os.Handler
import android.util.Log
import android.view.Surface
import android.view.Display
import android.view.WindowManager
import androidx.annotation.RequiresApi
import java.math.BigDecimal
import java.math.RoundingMode
import kotlin.math.abs
import kotlin.math.roundToInt
class FrameRateManager(
private val activity: Activity,
@@ -19,11 +19,23 @@ class FrameRateManager(
) {
companion object {
private const val TAG = "FrameRateManager"
private const val SHORT_VIDEO_LENGTH_MS = 300000L // 5 minutes
private const val DISPLAY_SETTLE_MS = 2000L
private const val WATCHDOG_MARGIN_MS = 3000L
private const val RATE_TOLERANCE = 0.1f
}
private data class RefreshRateMatch(
val reason: String,
val priority: Int,
val error: Float
)
@RequiresApi(Build.VERSION_CODES.M)
private data class DisplayModeCandidate(
val mode: Display.Mode,
val match: RefreshRateMatch
)
private var currentVideoFps: Float = 0f
private var displayListener: DisplayManager.DisplayListener? = null
private var pendingSettleRunnable: Runnable? = null
@@ -32,20 +44,18 @@ class FrameRateManager(
private fun getDisplayManager(): DisplayManager = activity.getSystemService(Context.DISPLAY_SERVICE) as DisplayManager
// / Request a display frame-rate switch. Invokes [onComplete] once, either:
// / - immediately with `switched=false` when no switch is needed (invalid
// / fps, no matching mode, seamless fallback); or
// / - after the real DisplayListener event + [DISPLAY_SETTLE_MS] + the
// / caller's [extraDelayMs], with `switched=true`; or
// / - via a watchdog with `switched=true` if the real event never arrives,
// / so the caller doesn't hang.
// /
// / The caller is responsible for pausing playback before calling and
// / resuming it after [onComplete] fires.
// Request a display frame-rate switch. Invokes [onComplete] once, either:
// - immediately with `switched=false` when no switch is needed (invalid fps,
// no matching mode, or already matching); or
// - after the real DisplayListener event + [DISPLAY_SETTLE_MS] + the caller's
// [extraDelayMs], with `switched=true`; or
// - via a watchdog if the real event never arrives, so the caller doesn't hang.
//
// The caller is responsible for pausing playback before calling and resuming
// it after [onComplete] fires.
fun setVideoFrameRate(
fps: Float,
videoDurationMs: Long,
surface: Surface?,
extraDelayMs: Long,
onComplete: (switched: Boolean) -> Unit
) {
@@ -56,22 +66,15 @@ class FrameRateManager(
return
}
log("fps=$fps, duration=${videoDurationMs}ms, extraDelayMs=$extraDelayMs, API=${Build.VERSION.SDK_INT}")
log(
"request fps=$fps, duration=${videoDurationMs}ms, extraDelayMs=$extraDelayMs, " +
"API=${Build.VERSION.SDK_INT}, currentMode=${currentModeDescription()}"
)
when {
Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
if (surface == null) {
Log.d(TAG, "setVideoFrameRate: Surface not available")
onComplete(false)
return
}
setFrameRateS(fps, surface, videoDurationMs, extraDelayMs, onComplete)
}
// API R's Surface.setFrameRate() only supports seamless switching (no
// CHANGE_FRAME_RATE_ALWAYS), so 60→24Hz won't switch. Fall through to
// preferredDisplayModeId which directly sets the display mode.
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M -> setFrameRateM(fps, extraDelayMs, onComplete)
else -> onComplete(false)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
setDisplayMode(fps, extraDelayMs, onComplete)
} else {
onComplete(false)
}
}
@@ -116,11 +119,11 @@ class FrameRateManager(
}
val cb = pendingCompletion ?: return
pendingCompletion = null
Log.d(TAG, "FrameRateManager complete ($reason, switched=$switched)")
log("complete reason=$reason, switched=$switched, currentMode=${currentModeDescription()}")
cb(switched)
}
private fun registerDisplayListener(extraDelayMs: Long, onComplete: (switched: Boolean) -> Unit) {
private fun registerDisplayListener(fps: Float, extraDelayMs: Long, onComplete: (switched: Boolean) -> Unit) {
// Resolve any previous pending op before starting a new one.
firePendingCompletion("superseded", switched = false)
pendingCompletion = onComplete
@@ -135,7 +138,7 @@ class FrameRateManager(
getDisplayManager().unregisterDisplayListener(this)
displayListener = null
val settle = Runnable { firePendingCompletion("display settled", switched = true) }
val settle = Runnable { firePendingCompletion("display settled", switched = currentRateMatch(fps) != null) }
pendingSettleRunnable = settle
handler.postDelayed(settle, DISPLAY_SETTLE_MS + extraDelayMs)
}
@@ -145,148 +148,122 @@ class FrameRateManager(
// Watchdog: if the TV never signals a display change (silently ignoring
// the mode request), still complete after a bounded wait so the caller
// doesn't hang.
val watchdog = Runnable { firePendingCompletion("watchdog", switched = true) }
val watchdog = Runnable { firePendingCompletion("watchdog", switched = currentRateMatch(fps) != null) }
watchdogRunnable = watchdog
handler.postDelayed(watchdog, DISPLAY_SETTLE_MS + extraDelayMs + WATCHDOG_MARGIN_MS)
}
private fun currentRateMatchesFps(fps: Float): Boolean {
val current = activity.display?.mode?.refreshRate ?: return false
if (current <= 0f) return false
// Treat "equal within a frame" and "clean multiple" as a match —
// same tolerance the API M matcher uses below.
if (kotlin.math.abs(current - fps) < 0.1f) return true
val mod = current % fps
return mod < 0.1f || (fps - mod) < 0.1f
private fun matchRefreshRate(refreshRate: Float, fps: Float): RefreshRateMatch? {
if (refreshRate <= 0f || fps <= 0f) return null
val exactError = abs(refreshRate - fps)
if (exactError < RATE_TOLERANCE) {
return RefreshRateMatch(reason = "exact", priority = 0, error = exactError)
}
val multiple = (refreshRate / fps).roundToInt()
if (multiple > 1) {
val multipleError = abs(refreshRate - (fps * multiple))
if (multipleError < RATE_TOLERANCE) {
return RefreshRateMatch(reason = "${multiple}x", priority = 1, error = multipleError)
}
}
return null
}
@RequiresApi(Build.VERSION_CODES.S)
private fun setFrameRateS(
fps: Float,
surface: Surface,
videoDurationMs: Long,
extraDelayMs: Long,
onComplete: (switched: Boolean) -> Unit
) {
Log.d(TAG, "setFrameRateS: fps=$fps, duration=${videoDurationMs}ms")
// If the current display rate already satisfies the video fps, issue
// the hint for book-keeping but skip the listener — otherwise we'd
// wait for an onDisplayChanged event that never fires and end up
// burning the watchdog timeout for no reason.
if (currentRateMatchesFps(fps)) {
Log.d(TAG, "Current display rate already matches ${fps}fps, no switch needed")
surface.setFrameRate(
fps,
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
Surface.CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS
)
onComplete(false)
return
}
if (videoDurationMs < SHORT_VIDEO_LENGTH_MS) {
Log.d(TAG, "Short video, using seamless-only switching")
surface.setFrameRate(
fps,
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
Surface.CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS
)
onComplete(false)
return
}
var seamless = false
activity.display?.mode?.alternativeRefreshRates?.let { refreshRates ->
for (rate in refreshRates) {
if (fps.toString().startsWith(rate.toString()) ||
rate.toString().startsWith(fps.toString()) ||
rate % fps == 0f
) {
seamless = true
break
}
}
}
if (seamless) {
log("Seamless switch available for ${fps}fps")
surface.setFrameRate(
fps,
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
Surface.CHANGE_FRAME_RATE_ALWAYS
)
registerDisplayListener(extraDelayMs, onComplete)
private fun currentRateMatch(fps: Float): RefreshRateMatch? {
val current = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
currentDisplayMode()?.refreshRate
} else {
val userPreference = getDisplayManager().matchContentFrameRateUserPreference
if (userPreference == DisplayManager.MATCH_CONTENT_FRAMERATE_ALWAYS) {
Log.d(TAG, "User preference allows non-seamless switch")
surface.setFrameRate(
fps,
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
Surface.CHANGE_FRAME_RATE_ALWAYS
)
registerDisplayListener(extraDelayMs, onComplete)
} else {
Log.d(TAG, "Non-seamless switch not allowed, using seamless-only")
surface.setFrameRate(
fps,
Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
Surface.CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS
)
onComplete(false)
}
}
null
} ?: return null
return matchRefreshRate(current, fps)
}
private fun currentModeDescription(): String = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
describeMode(currentDisplayMode())
} else {
"unavailable"
}
@RequiresApi(Build.VERSION_CODES.M)
private fun setFrameRateM(fps: Float, extraDelayMs: Long, onComplete: (switched: Boolean) -> Unit) {
Log.d(TAG, "setFrameRateM: fps=$fps")
val wm = activity.getSystemService(Context.WINDOW_SERVICE) as WindowManager
private fun currentDisplay(): Display? = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
activity.display
} else {
@Suppress("DEPRECATION")
val display = wm.defaultDisplay
(activity.getSystemService(Context.WINDOW_SERVICE) as WindowManager).defaultDisplay
}
@RequiresApi(Build.VERSION_CODES.M)
private fun currentDisplayMode(): Display.Mode? = currentDisplay()?.mode
@RequiresApi(Build.VERSION_CODES.M)
private fun describeMode(mode: Display.Mode?): String {
if (mode == null) return "unknown"
return "#${mode.modeId} ${mode.physicalWidth}x${mode.physicalHeight}@${mode.refreshRate}Hz"
}
@RequiresApi(Build.VERSION_CODES.M)
private fun describeSupportedModes(modes: Array<Display.Mode>): String = modes.joinToString(prefix = "[", postfix = "]") { describeMode(it) }
@RequiresApi(Build.VERSION_CODES.M)
private fun findBestModeMatch(fps: Float, currentMode: Display.Mode, supportedModes: Array<Display.Mode>): DisplayModeCandidate? = supportedModes.asSequence()
.filter { mode ->
mode.physicalHeight == currentMode.physicalHeight &&
mode.physicalWidth == currentMode.physicalWidth
}
.mapNotNull { mode -> matchRefreshRate(mode.refreshRate, fps)?.let { DisplayModeCandidate(mode, it) } }
.minWithOrNull(
compareBy<DisplayModeCandidate> { it.match.priority }
.thenBy { it.match.error }
.thenBy { abs(it.mode.refreshRate - currentMode.refreshRate) }
)
@RequiresApi(Build.VERSION_CODES.M)
private fun setDisplayMode(fps: Float, extraDelayMs: Long, onComplete: (switched: Boolean) -> Unit) {
log("setDisplayMode fps=$fps")
val display = currentDisplay()
if (display == null) {
log("display unavailable")
onComplete(false)
return
}
val supportedModes = display.supportedModes
if (supportedModes == null) {
log("supported display modes unavailable")
onComplete(false)
return
}
val currentMode = display.mode
var modeToUse = currentMode
log("supported modes=${describeSupportedModes(supportedModes)}")
for (mode in supportedModes) {
if (mode.physicalHeight != currentMode.physicalHeight ||
mode.physicalWidth != currentMode.physicalWidth
) {
continue
}
if (BigDecimal(fps.toString()).setScale(1, RoundingMode.FLOOR) ==
BigDecimal(mode.refreshRate.toString()).setScale(1, RoundingMode.FLOOR)
) {
modeToUse = mode
break
} else if ((mode.refreshRate % fps).let { it < 0.1f || (fps - it) < 0.1f }) {
modeToUse = mode
break
}
}
if (modeToUse == currentMode) {
val modeMatch = findBestModeMatch(fps, currentMode, supportedModes)
if (modeMatch == null) {
log("no matching display mode for ${fps}fps at ${currentMode.physicalWidth}x${currentMode.physicalHeight}")
onComplete(false)
return
}
Log.d(TAG, "Switching to mode ${modeToUse.modeId} (${modeToUse.refreshRate}Hz)")
activity.window?.attributes?.let { attrs ->
attrs.preferredDisplayModeId = modeToUse.modeId
activity.window?.attributes = attrs
val modeToUse = modeMatch.mode
if (modeToUse.modeId == currentMode.modeId) {
log("current mode already matches ${fps}fps (${modeMatch.match.reason}), no switch needed")
onComplete(false)
return
}
registerDisplayListener(extraDelayMs, onComplete)
log(
"switching to ${describeMode(modeToUse)} for ${fps}fps " +
"(${modeMatch.match.reason}, error=${modeMatch.match.error})"
)
val window = activity.window
if (window == null) {
log("window unavailable")
onComplete(false)
return
}
registerDisplayListener(fps, extraDelayMs, onComplete)
window.attributes = window.attributes.apply { preferredDisplayModeId = modeToUse.modeId }
}
}
+4
View File
@@ -1,3 +1,7 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=false
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=false
Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

-15
View File
@@ -1,15 +0,0 @@
## iOS
| Home | Library | Media Card | Season |
|------|---------|------------|--------|
| ![iOS Home - Content discovery and recommendations](ios-home.png) | ![iOS Library - Media collection view](ios-library.png) | ![iOS Media Card](ios-media-card.png) | ![iOS Season View](ios-season.png) |
## macOS
![macOS Home - Content discovery and recommendations](macos-home.png)
![macOS Library - Media collection view](macos-library.png)
![macOS Media Card](macos-media-card.png)
![macOS Season View](macos-season.png)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

+2
View File
@@ -13,3 +13,5 @@ targets:
copy_with: true
equal: true
to_string: true
slang_build_runner:
enabled: false
-94
View File
@@ -1,128 +1,34 @@
PODS:
- background_downloader (0.0.1):
- Flutter
- connectivity_plus (0.0.1):
- Flutter
- cupertino_http (0.0.1):
- Flutter
- FlutterMacOS
- device_info_plus (0.0.1):
- Flutter
- file_picker (0.0.1):
- Flutter
- Flutter (1.0.0)
- os_media_controls (0.2.1):
- Flutter
- package_info_plus (0.4.5):
- Flutter
- Sentry/HybridSDK (8.58.0)
- sentry_flutter (9.16.0):
- Flutter
- FlutterMacOS
- Sentry/HybridSDK (= 8.58.0)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqlite3 (3.52.0):
- sqlite3/common (= 3.52.0)
- sqlite3/common (3.52.0)
- sqlite3/dbstatvtab (3.52.0):
- sqlite3/common
- sqlite3/fts5 (3.52.0):
- sqlite3/common
- sqlite3/math (3.52.0):
- sqlite3/common
- sqlite3/perf-threadsafe (3.52.0):
- sqlite3/common
- sqlite3/rtree (3.52.0):
- sqlite3/common
- sqlite3/session (3.52.0):
- sqlite3/common
- sqlite3_flutter_libs (0.0.1):
- Flutter
- FlutterMacOS
- sqlite3 (~> 3.52.0)
- sqlite3/dbstatvtab
- sqlite3/fts5
- sqlite3/math
- sqlite3/perf-threadsafe
- sqlite3/rtree
- sqlite3/session
- universal_gamepad (0.1.0):
- Flutter
- url_launcher_ios (0.0.1):
- Flutter
- wakelock_plus (0.0.1):
- Flutter
DEPENDENCIES:
- background_downloader (from `.symlinks/plugins/background_downloader/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- cupertino_http (from `.symlinks/plugins/cupertino_http/darwin`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`)
- os_media_controls (from `.symlinks/plugins/os_media_controls/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/darwin`)
- universal_gamepad (from `.symlinks/plugins/universal_gamepad/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
SPEC REPOS:
trunk:
- Sentry
- sqlite3
EXTERNAL SOURCES:
background_downloader:
:path: ".symlinks/plugins/background_downloader/ios"
connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/ios"
cupertino_http:
:path: ".symlinks/plugins/cupertino_http/darwin"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
Flutter:
:path: Flutter
os_media_controls:
:path: ".symlinks/plugins/os_media_controls/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
sentry_flutter:
:path: ".symlinks/plugins/sentry_flutter/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqlite3_flutter_libs:
:path: ".symlinks/plugins/sqlite3_flutter_libs/darwin"
universal_gamepad:
:path: ".symlinks/plugins/universal_gamepad/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
wakelock_plus:
:path: ".symlinks/plugins/wakelock_plus/ios"
SPEC CHECKSUMS:
background_downloader: 50e91d979067b82081aba359d7d916b3ba5fadad
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
cupertino_http: 94ac07f5ff090b8effa6c5e2c47871d48ab7c86c
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
file_picker: 8fc6fe5e42585a217d44d22f79ec046cb8d81140
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
os_media_controls: 3b06fe2dc0977dfa94f9c1dd73df7a55022d202f
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
Sentry: d587a8fe91ca13503ecd69a1905f3e8a0fcf61be
sentry_flutter: 31101687061fb85211ebab09ce6eb8db4e9ba74f
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
sqlite3: a51c07cf16e023d6c48abd5e5791a61a47354921
sqlite3_flutter_libs: b3e120efe9a82017e5552a620f696589ed4f62ab
universal_gamepad: 838bbb70d37d8c7c719038aa397214f2c4c4f866
url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b
wakelock_plus: 5aaa6a7ccaf4749a96a7d8ff0721d68061ad62cf
PODFILE CHECKSUM: 16bb7f67e16d8aaa2bfb97666803fbfb291b6559
+19 -1
View File
@@ -23,6 +23,7 @@
B1D51A6A2F00110000000001 /* MpvPlayerCoreBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D51A6A2F00110000000002 /* MpvPlayerCoreBase.swift */; };
B1D51A6A2F00110000000005 /* MpvPlayerPluginShared.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D51A6A2F00110000000006 /* MpvPlayerPluginShared.swift */; };
B1D51A6A2F00110000000008 /* ExternalDisplayManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1D51A6A2F00110000000007 /* ExternalDisplayManager.swift */; };
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -78,6 +79,7 @@
BB346A1D0705AB171F80B11B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DE48FF2E074644167608B23D /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
F3553CDE70191F0FC81A782E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -93,6 +95,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
6A8A46212EDB320D0057B88C /* MPVKit in Frameworks */,
69E1B4BB161DC9D84D1DFC62 /* Pods_Runner.framework in Frameworks */,
);
@@ -147,6 +150,7 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
@@ -215,6 +219,9 @@
productType = "com.apple.product-type.bundle.unit-test";
};
97C146ED1CF9000F007C117D /* Runner */ = {
packageProductDependencies = (
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
);
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
@@ -266,6 +273,7 @@
);
mainGroup = 97C146E51CF9000F007C117D;
packageReferences = (
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
6A8A461F2EDB320D0057B88C /* XCRemoteSwiftPackageReference "MPVKit" */,
);
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
@@ -781,7 +789,7 @@
repositoryURL = "https://github.com/edde746/MPVKit";
requirement = {
kind = revision;
revision = 45ff446b369d388457781e09371a356111a4faee;
revision = 42dcc3123000361d0be54fbaec981043b77e1e05;
};
};
/* End XCRemoteSwiftPackageReference section */
@@ -792,7 +800,17 @@
package = 6A8A461F2EDB320D0057B88C /* XCRemoteSwiftPackageReference "MPVKit" */;
productName = MPVKit;
};
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
isa = XCSwiftPackageProductDependency;
productName = FlutterGeneratedPluginSwiftPackage;
};
/* End XCSwiftPackageProductDependency section */
/* Begin XCLocalSwiftPackageReference section */
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
};
/* End XCLocalSwiftPackageReference section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
@@ -1,14 +1,84 @@
{
"originHash" : "c535d3cdb62bd4e11e67f3c9e68290fa7ee9306634c5f56d2b0396eb75ed41ee",
"pins" : [
{
"identity" : "csqlite",
"kind" : "remoteSourceControl",
"location" : "https://github.com/simolus3/CSQLite.git",
"state" : {
"revision" : "1ee46d19a4f451a7aa64ffc64fc99b4748131e62"
}
},
{
"identity" : "dkcamera",
"kind" : "remoteSourceControl",
"location" : "https://github.com/zhangao0086/DKCamera",
"state" : {
"branch" : "master",
"revision" : "5c691d11014b910aff69f960475d70e65d9dcc96"
}
},
{
"identity" : "dkimagepickercontroller",
"kind" : "remoteSourceControl",
"location" : "https://github.com/zhangao0086/DKImagePickerController",
"state" : {
"branch" : "4.3.9",
"revision" : "0bdfeacefa308545adde07bef86e349186335915"
}
},
{
"identity" : "dkphotogallery",
"kind" : "remoteSourceControl",
"location" : "https://github.com/zhangao0086/DKPhotoGallery",
"state" : {
"branch" : "master",
"revision" : "311c1bc7a94f1538f82773a79c84374b12a2ef3d"
}
},
{
"identity" : "mpvkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/edde746/MPVKit",
"state" : {
"revision" : "45ff446b369d388457781e09371a356111a4faee"
"revision" : "42dcc3123000361d0be54fbaec981043b77e1e05"
}
},
{
"identity" : "sdwebimage",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SDWebImage/SDWebImage",
"state" : {
"revision" : "2de3a496eaf6df9a1312862adcfd54acd73c39c0",
"version" : "5.21.7"
}
},
{
"identity" : "sentry-cocoa",
"kind" : "remoteSourceControl",
"location" : "https://github.com/getsentry/sentry-cocoa",
"state" : {
"revision" : "16cd512711375fa73f25ae5e373f596bdf4251ae",
"version" : "8.58.0"
}
},
{
"identity" : "swiftygif",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kirualex/SwiftyGif.git",
"state" : {
"revision" : "4430cbc148baa3907651d40562d96325426f409a",
"version" : "5.4.5"
}
},
{
"identity" : "tocropviewcontroller",
"kind" : "remoteSourceControl",
"location" : "https://github.com/TimOliver/TOCropViewController",
"state" : {
"revision" : "d4a6d8100f4b886fdbc8ae399bf144ff3e9afb7e",
"version" : "2.8.0"
}
}
],
"version" : 3
"version" : 2
}
@@ -5,6 +5,24 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Prepare Flutter Framework Script"
scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
@@ -1,14 +1,84 @@
{
"originHash" : "c535d3cdb62bd4e11e67f3c9e68290fa7ee9306634c5f56d2b0396eb75ed41ee",
"pins" : [
{
"identity" : "csqlite",
"kind" : "remoteSourceControl",
"location" : "https://github.com/simolus3/CSQLite.git",
"state" : {
"revision" : "1ee46d19a4f451a7aa64ffc64fc99b4748131e62"
}
},
{
"identity" : "dkcamera",
"kind" : "remoteSourceControl",
"location" : "https://github.com/zhangao0086/DKCamera",
"state" : {
"branch" : "master",
"revision" : "5c691d11014b910aff69f960475d70e65d9dcc96"
}
},
{
"identity" : "dkimagepickercontroller",
"kind" : "remoteSourceControl",
"location" : "https://github.com/zhangao0086/DKImagePickerController",
"state" : {
"branch" : "4.3.9",
"revision" : "0bdfeacefa308545adde07bef86e349186335915"
}
},
{
"identity" : "dkphotogallery",
"kind" : "remoteSourceControl",
"location" : "https://github.com/zhangao0086/DKPhotoGallery",
"state" : {
"branch" : "master",
"revision" : "311c1bc7a94f1538f82773a79c84374b12a2ef3d"
}
},
{
"identity" : "mpvkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/edde746/MPVKit",
"state" : {
"revision" : "45ff446b369d388457781e09371a356111a4faee"
"revision" : "42dcc3123000361d0be54fbaec981043b77e1e05"
}
},
{
"identity" : "sdwebimage",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SDWebImage/SDWebImage",
"state" : {
"revision" : "2de3a496eaf6df9a1312862adcfd54acd73c39c0",
"version" : "5.21.7"
}
},
{
"identity" : "sentry-cocoa",
"kind" : "remoteSourceControl",
"location" : "https://github.com/getsentry/sentry-cocoa",
"state" : {
"revision" : "16cd512711375fa73f25ae5e373f596bdf4251ae",
"version" : "8.58.0"
}
},
{
"identity" : "swiftygif",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kirualex/SwiftyGif.git",
"state" : {
"revision" : "4430cbc148baa3907651d40562d96325426f409a",
"version" : "5.4.5"
}
},
{
"identity" : "tocropviewcontroller",
"kind" : "remoteSourceControl",
"location" : "https://github.com/TimOliver/TOCropViewController",
"state" : {
"revision" : "d4a6d8100f4b886fdbc8ae399bf144ff3e9afb7e",
"version" : "2.8.0"
}
}
],
"version" : 3
"version" : 2
}
+6
View File
@@ -24,6 +24,8 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
@@ -35,6 +37,10 @@
</dict>
<key>NSLocalNetworkUsageDescription</key>
<string>This app needs to connect to your media servers on your local network.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Plezy uses location access when iOS requires it to detect your local network and connect to your media servers.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Plezy needs photo library access so you can choose images to upload as media artwork.</string>
<key>NSCameraUsageDescription</key>
<string>Camera is used to scan QR codes for Companion Remote pairing.</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
+13 -26
View File
@@ -13,7 +13,7 @@ import UIKit
func pipDidStop(restored: Bool)
func pipDidFailToStart(error: Error?)
func pipSetPlaying(_ playing: Bool)
func pipSkip(byInterval seconds: Double)
func pipSkip(byInterval seconds: Double, completion: @escaping () -> Void)
var isPipPlaying: Bool { get }
var pipDuration: Double { get }
}
@@ -48,7 +48,7 @@ import UIKit
/// Forward play/pause commands from PiP overlay to mpv
func pipSetPlaying(_ playing: Bool)
/// Forward skip forward/backward commands from PiP overlay to mpv
func pipSkip(byInterval seconds: Double)
func pipSkip(byInterval seconds: Double, completion: @escaping () -> Void)
/// Query whether mpv is currently playing
var isPipPlaying: Bool { get }
/// Get total duration in seconds
@@ -99,9 +99,7 @@ import UIKit
self.delegateHelper = helper
pipController = AVPictureInPictureController(contentSource: contentSource)
pipController?.delegate = helper
if #available(iOS 14.2, *) {
pipController?.canStartPictureInPictureAutomaticallyFromInline = false
}
pipController?.canStartPictureInPictureAutomaticallyFromInline = false
}
/// Enable/disable system auto-PiP (starts PiP automatically on background transition)
@@ -110,30 +108,15 @@ import UIKit
pipController?.canStartPictureInPictureAutomaticallyFromInline = enabled
}
/// Sync the layer's controlTimebase with the actual playback position.
/// This makes the PiP progress bar show the correct time.
/// MPVKit owns the sample-buffer layer timebase. PiP only reads it.
func syncTimebase(currentTime: Double, isPlaying: Bool) {
guard let timebase = sampleBufferLayer?.controlTimebase else { return }
let cmTime = CMTime(seconds: currentTime, preferredTimescale: 1000)
CMTimebaseSetTime(timebase, time: cmTime)
CMTimebaseSetRate(timebase, rate: isPlaying ? 1.0 : 0.0)
}
/// Ensure the layer has a timebase so the PiP progress UI can follow mpv.
/// Ensure the layer has MPVKit's renderer-owned timebase before PiP starts.
func warmLayer(currentTime: Double, isPlaying: Bool) {
guard let sampleBufferLayer else { return }
if sampleBufferLayer.controlTimebase == nil {
var timebase: CMTimebase?
CMTimebaseCreateWithSourceClock(
allocator: kCFAllocatorDefault,
sourceClock: CMClockGetHostTimeClock(),
timebaseOut: &timebase
)
if let tb = timebase {
sampleBufferLayer.controlTimebase = tb
}
if sampleBufferLayer?.controlTimebase == nil {
print("[MpvPipController] Waiting for MPVKit renderer timebase before PiP")
}
syncTimebase(currentTime: currentTime, isPlaying: isPlaying)
}
// MARK: - Public API
@@ -188,6 +171,7 @@ import UIKit
/// Invalidate the playback state so PiP updates its UI (play/pause button)
func invalidatePlaybackState() {
guard #available(iOS 15.0, *) else { return }
pipController?.invalidatePlaybackState()
}
@@ -310,8 +294,11 @@ import UIKit
) {
let seconds = CMTimeGetSeconds(skipInterval)
print("[MpvPipController] PiP skip by \(seconds)s")
controller?.delegate?.pipSkip(byInterval: seconds)
completionHandler()
guard let delegate = controller?.delegate else {
completionHandler()
return
}
delegate.pipSkip(byInterval: seconds, completion: completionHandler)
}
}
+10 -6
View File
@@ -504,13 +504,17 @@ extension MpvPlayerPlugin: MpvPipDelegate {
}
}
func pipSkip(byInterval seconds: Double) {
guard let playerCore = playerCore else { return }
func pipSkip(byInterval seconds: Double, completion: @escaping () -> Void) {
guard let playerCore = playerCore else {
completion()
return
}
let newTime = max(0, playerCore.timePos + seconds)
playerCore.command(["seek", String(newTime), "absolute"])
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self] in
self?.syncPipTimebase()
self?.pipController?.invalidatePlaybackState()
playerCore.commandAsync(["seek", String(newTime), "absolute"]) { [weak self] _ in
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self?.pipController?.invalidatePlaybackState()
completion()
}
}
}
+1 -3
View File
@@ -9,9 +9,7 @@ class FocusMemoryTracker {
final String _debugLabelPrefix;
String? _lastFocusedKey;
FocusMemoryTracker({VoidCallback? onFocusChanged, String debugLabelPrefix = 'focus'})
: _onFocusChanged = onFocusChanged,
_debugLabelPrefix = debugLabelPrefix;
FocusMemoryTracker({this._onFocusChanged, this._debugLabelPrefix = 'focus'});
/// Get or create a focus node for the given key
FocusNode get(String key, {String? debugLabel}) {
+16 -12
View File
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import '../widgets/app_icon.dart';
import '../widgets/clickable_cursor.dart';
import 'focus_theme.dart';
import 'input_mode_tracker.dart';
import 'key_event_utils.dart';
@@ -141,18 +142,21 @@ class FocusableActionBarState extends State<FocusableActionBar> {
onUp: widget.onNavigateUp,
)(node, event);
},
child: AnimatedOpacity(
opacity: showFocus ? 1.0 : opacity,
duration: duration,
child: Container(
decoration: FocusTheme.focusBackgroundDecoration(isFocused: showFocus, borderRadius: 20),
child:
action.child ??
IconButton(
icon: AppIcon(action.icon, fill: action.iconFill, color: action.iconColor),
tooltip: action.tooltip,
onPressed: action.onPressed,
),
child: ClickableCursor(
enabled: action.onPressed != null || action.child != null,
child: AnimatedOpacity(
opacity: showFocus ? 1.0 : opacity,
duration: duration,
child: Container(
decoration: FocusTheme.focusBackgroundDecoration(isFocused: showFocus, borderRadius: 20),
child:
action.child ??
IconButton(
icon: AppIcon(action.icon, fill: action.iconFill, color: action.iconColor),
tooltip: action.tooltip,
onPressed: action.onPressed,
),
),
),
),
);
+141 -18
View File
@@ -1,7 +1,11 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import '../services/gamepad_service.dart';
import '../utils/platform_detector.dart';
import '../utils/text_input_diagnostics.dart';
import '../widgets/tv_virtual_keyboard.dart';
import 'dpad_navigator.dart';
@@ -9,6 +13,65 @@ bool _usesTvKeyboard(bool enableTvKeyboard) => enableTvKeyboard && PlatformDetec
String? _keyboardHint(InputDecoration? decoration) => decoration?.hintText ?? decoration?.labelText;
String _describeTextInputKey(KeyEvent event) {
return 'type=${event.runtimeType} logical=${event.logicalKey.keyLabel}/${event.logicalKey.keyId} '
'physical=${event.physicalKey.usbHidUsage} deviceType=${event.deviceType} character=${event.character}';
}
void _logTvTextInput(String message) {
TextInputDiagnostics.log('FlutterTextField', message);
}
class _NativeTvTextInputFocusBridge {
static const _channel = MethodChannel('com.plezy/text_input');
static final Set<Object> _focusedTokens = <Object>{};
static bool _lastSentFocused = false;
static void setFocused(Object token, bool focused) {
_logTvTextInput(
'NativeFocusBridge.setFocused requested focused=$focused token=$token activeTokens=${_focusedTokens.length}',
);
if (focused) {
_focusedTokens.add(token);
} else {
_focusedTokens.remove(token);
}
if (!PlatformDetector.isTV() || PlatformDetector.isAppleTV()) {
_logTvTextInput(
'NativeFocusBridge clearing without platform send isTv=${PlatformDetector.isTV()} '
'isAppleTV=${PlatformDetector.isAppleTV()}',
);
_focusedTokens.clear();
_lastSentFocused = false;
return;
}
final anyFocused = _focusedTokens.isNotEmpty;
if (_lastSentFocused == anyFocused) {
_logTvTextInput('NativeFocusBridge no-op anyFocused=$anyFocused tokenCount=${_focusedTokens.length}');
return;
}
_lastSentFocused = anyFocused;
_logTvTextInput('NativeFocusBridge sending anyFocused=$anyFocused tokenCount=${_focusedTokens.length}');
unawaited(GamepadService.setNativeTextInputFocused(anyFocused));
unawaited(_sendFocused(anyFocused));
}
static Future<void> _sendFocused(bool focused) async {
try {
await _channel.invokeMethod<void>('setNativeTextInputFocused', focused);
_logTvTextInput('NativeFocusBridge platform send complete focused=$focused');
} on MissingPluginException {
_logTvTextInput('NativeFocusBridge platform send missing plugin focused=$focused');
// Tests and non-Android embedders do not register this channel.
} on PlatformException {
_logTvTextInput('NativeFocusBridge platform send failed focused=$focused');
// Focus reporting is a best-effort native routing hint.
}
}
}
KeyEventResult _handleInputKey({
required TextEditingController controller,
required bool usesTvKeyboard,
@@ -31,14 +94,28 @@ KeyEventResult _handleInputKey({
VoidCallback? onNavigateDown,
}) {
final key = event.logicalKey;
KeyEventResult finish(KeyEventResult result, String reason) {
_logTvTextInput(
'result=$result reason=$reason key=(${_describeTextInputKey(event)}) '
'usesTvKeyboard=$usesTvKeyboard enabled=$enabled textLength=${controller.text.length} '
'selection=${controller.selection} onNav(up=${onNavigateUp != null},down=${onNavigateDown != null},'
'left=${onNavigateLeft != null},right=${onNavigateRight != null}) onSelect=${onSelect != null} onBack=${onBack != null}',
);
return result;
}
_logTvTextInput(
'received key=(${_describeTextInputKey(event)}) usesTvKeyboard=$usesTvKeyboard enabled=$enabled '
'textLength=${controller.text.length} selection=${controller.selection}',
);
if (_shouldPassNativeTvKeyToPlatform(usesTvKeyboard: usesTvKeyboard, enabled: enabled, event: event)) {
return KeyEventResult.skipRemainingHandlers;
return finish(KeyEventResult.skipRemainingHandlers, 'pass-native-tv-key-to-platform');
}
if (usesTvKeyboard && enabled && event.isTvSelectEvent) {
if (event is KeyDownEvent) openKeyboard();
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'open-custom-tv-keyboard');
}
if (usesTvKeyboard && enabled && event.isPhysicalKeyboardEvent) {
@@ -54,12 +131,12 @@ KeyEventResult _handleInputKey({
maxLines: maxLines,
event: event,
);
if (result != KeyEventResult.ignored) return result;
if (result != KeyEventResult.ignored) return finish(result, 'custom-tv-hardware-keyboard');
}
if (onBack != null && key.isBackKey) {
if (event is KeyDownEvent) onBack();
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'onBack');
}
// Enter/numpad enter are left to TextField.onSubmitted. Handle only
@@ -68,45 +145,55 @@ KeyEventResult _handleInputKey({
onSelect != null &&
(key == LogicalKeyboardKey.select || key == LogicalKeyboardKey.gameButtonA)) {
if (event is KeyDownEvent) onSelect();
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'native-tv-non-text-select');
}
if (!event.isActionable) return KeyEventResult.ignored;
if (!event.isActionable) return finish(KeyEventResult.ignored, 'non-actionable');
if (key.isUpKey && onNavigateUp != null) {
onNavigateUp();
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'onNavigateUp');
}
if (key.isDownKey && onNavigateDown != null) {
onNavigateDown();
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'onNavigateDown');
}
final sel = controller.selection;
if (sel.isCollapsed) {
if (key.isLeftKey && sel.baseOffset == 0 && onNavigateLeft != null) {
onNavigateLeft();
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'onNavigateLeft-at-start');
}
if (key.isRightKey && sel.baseOffset == controller.text.length && onNavigateRight != null) {
onNavigateRight();
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'onNavigateRight-at-end');
}
}
return KeyEventResult.ignored;
return finish(KeyEventResult.ignored, 'fall-through');
}
bool _shouldPassNativeTvKeyToPlatform({required bool usesTvKeyboard, required bool enabled, required KeyEvent event}) {
if (!enabled || usesTvKeyboard || !PlatformDetector.isTV()) return false;
if (!enabled || usesTvKeyboard || !PlatformDetector.isTV()) {
_logTvTextInput(
'native-pass=false reason=disabled-or-custom-keyboard enabled=$enabled usesTvKeyboard=$usesTvKeyboard '
'isTv=${PlatformDetector.isTV()} key=(${_describeTextInputKey(event)})',
);
return false;
}
// Android TV provides its own IME. Remote keys must reach the platform so
// users can move around that keyboard instead of escaping the app field.
// Some remotes (Chromecast) are reported by Flutter as keyboard events, so
// native TV navigation cannot rely on deviceType.
final key = event.logicalKey;
final isEngineSynthesizedTvSelect = key == LogicalKeyboardKey.select || key == LogicalKeyboardKey.gameButtonA;
if (event.isPhysicalKeyboardEvent && !isEngineSynthesizedTvSelect) return false;
return key.isDpadDirection || key.isBackKey || event.isTvSelectEvent;
final shouldPass = key.isDpadDirection || key.isBackKey || event.isTvSelectEvent;
_logTvTextInput(
'native-pass=$shouldPass reason=${shouldPass ? "remote-navigation-key" : "not-navigation-key"} '
'key=(${_describeTextInputKey(event)})',
);
return shouldPass;
}
KeyEventResult _handleTvHardwareKeyboardKey({
@@ -528,6 +615,9 @@ class _FocusableTextInputHostState extends State<_FocusableTextInputHost> {
FocusNode? _installedFocusNode;
FocusOnKeyEventCallback? _previousOnKeyEvent;
late final FocusOnKeyEventCallback _keyHandler = _handleKey;
late final VoidCallback _focusListener = _syncNativeTextInputFocus;
final Object _nativeFocusToken = Object();
bool _reportedNativeTextInputFocused = false;
FocusNode get _effectiveFocusNode =>
widget.input.focusNode ?? (_ownedFocusNode ??= FocusNode(debugLabel: 'FocusableTextInput'));
@@ -538,6 +628,7 @@ class _FocusableTextInputHostState extends State<_FocusableTextInputHost> {
if (oldWidget.input.focusNode != widget.input.focusNode) {
_restoreInstalledHandler();
}
_syncNativeTextInputFocus();
}
@override
@@ -547,10 +638,33 @@ class _FocusableTextInputHostState extends State<_FocusableTextInputHost> {
super.dispose();
}
void _syncNativeTextInputFocus() {
final focused = _installedFocusNode?.hasFocus == true && widget.input.enabled && widget.input._usesNativeTvKeyboard;
_logTvTextInput(
'Host.syncNativeTextInputFocus focused=$focused installed=${_installedFocusNode?.debugLabel} '
'hasFocus=${_installedFocusNode?.hasFocus} enabled=${widget.input.enabled} '
'usesNativeTvKeyboard=${widget.input._usesNativeTvKeyboard}',
);
_setNativeTextInputFocused(focused);
}
void _setNativeTextInputFocused(bool focused) {
if (_reportedNativeTextInputFocused == focused) {
_logTvTextInput('Host.setNativeTextInputFocused no-op focused=$focused');
return;
}
_logTvTextInput('Host.setNativeTextInputFocused old=$_reportedNativeTextInputFocused new=$focused');
_reportedNativeTextInputFocused = focused;
_NativeTvTextInputFocusBridge.setFocused(_nativeFocusToken, focused);
}
KeyEventResult _handleKey(FocusNode node, KeyEvent event) {
final previous = _previousOnKeyEvent;
if (previous != null && !identical(previous, _keyHandler)) {
final result = previous(node, event);
_logTvTextInput(
'Host.previousOnKeyEvent node=${node.debugLabel} result=$result key=(${_describeTextInputKey(event)})',
);
if (result != KeyEventResult.ignored) return result;
}
return widget.input._handleKey(context, node, event);
@@ -563,6 +677,7 @@ class _FocusableTextInputHostState extends State<_FocusableTextInputHost> {
if (identical(node.onKeyEvent, _keyHandler)) return;
_previousOnKeyEvent = node.onKeyEvent;
node.onKeyEvent = _keyHandler;
_logTvTextInput('Host.reinstalled key handler node=${node.debugLabel} previous=${_previousOnKeyEvent != null}');
return;
}
@@ -570,12 +685,19 @@ class _FocusableTextInputHostState extends State<_FocusableTextInputHost> {
_installedFocusNode = node;
_previousOnKeyEvent = node.onKeyEvent;
node.onKeyEvent = _keyHandler;
node.addListener(_focusListener);
_logTvTextInput('Host.installed key handler node=${node.debugLabel} previous=${_previousOnKeyEvent != null}');
}
void _restoreInstalledHandler() {
_logTvTextInput('Host.restoreInstalledHandler node=${_installedFocusNode?.debugLabel}');
_setNativeTextInputFocused(false);
final node = _installedFocusNode;
if (node != null && identical(node.onKeyEvent, _keyHandler)) {
node.onKeyEvent = _previousOnKeyEvent;
if (node != null) {
node.removeListener(_focusListener);
if (identical(node.onKeyEvent, _keyHandler)) {
node.onKeyEvent = _previousOnKeyEvent;
}
}
_installedFocusNode = null;
_previousOnKeyEvent = null;
@@ -585,6 +707,7 @@ class _FocusableTextInputHostState extends State<_FocusableTextInputHost> {
Widget build(BuildContext context) {
final focusNode = _effectiveFocusNode;
_installKeyHandler(focusNode);
_syncNativeTextInputFocus();
return widget.builder(widget.input._hasTvKeyboard, focusNode);
}
}
+43 -16
View File
@@ -2,11 +2,23 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import '../widgets/clickable_cursor.dart';
import '../utils/text_input_diagnostics.dart';
import 'dpad_navigator.dart';
import 'focus_theme.dart';
import 'input_mode_tracker.dart';
import 'key_event_utils.dart';
String _describeFocusableKey(KeyEvent event) {
return 'type=${event.runtimeType} logical=${event.logicalKey.keyLabel}/${event.logicalKey.keyId} '
'physical=${event.physicalKey.usbHidUsage} deviceType=${event.deviceType} character=${event.character}';
}
void _logFocusableWrapper(String message) {
TextInputDiagnostics.log('FocusableWrapper', message);
}
/// A wrapper widget that makes its child focusable with D-pad navigation support.
///
/// Provides:
@@ -70,7 +82,7 @@ class FocusableWrapper extends StatefulWidget {
/// Whether the wrapper can receive focus.
final bool canRequestFocus;
/// Custom key event handler. Return KeyEventResult.handled to consume the event.
/// Custom key event handler. Return any non-ignored result to stop default handling.
/// This is called before the default key handling.
final KeyEventResult Function(FocusNode node, KeyEvent event)? onKeyEvent;
@@ -315,23 +327,34 @@ class _FocusableWrapperState extends State<FocusableWrapper> with SingleTickerPr
KeyEventResult _handleKeyEvent(FocusNode node, KeyEvent event) {
final key = event.logicalKey;
KeyEventResult finish(KeyEventResult result, String reason) {
_logFocusableWrapper(
'node=${node.debugLabel} result=$result reason=$reason key=(${_describeFocusableKey(event)}) '
'onNav(up=${widget.onNavigateUp != null},down=${widget.onNavigateDown != null},'
'left=${widget.onNavigateLeft != null},right=${widget.onNavigateRight != null}) '
'onSelect=${widget.onSelect != null} onBack=${widget.onBack != null}',
);
return result;
}
_logFocusableWrapper('node=${node.debugLabel} received key=(${_describeFocusableKey(event)})');
if (SelectKeyUpSuppressor.consumeIfSuppressed(event)) {
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'select-key-up-suppressed');
}
// Call custom key handler first
if (widget.onKeyEvent != null) {
final result = widget.onKeyEvent!(node, event);
if (result == KeyEventResult.handled) {
return result;
if (result != KeyEventResult.ignored) {
return finish(result, 'custom-onKeyEvent');
}
}
if (widget.onBack != null) {
final backResult = handleBackKeyAction(event, widget.onBack!);
if (backResult != KeyEventResult.ignored) {
return backResult;
return finish(backResult, 'onBack');
}
}
@@ -351,10 +374,10 @@ class _FocusableWrapperState extends State<FocusableWrapper> with SingleTickerPr
}
});
}
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'select-long-press-down');
} else if (event is KeyRepeatEvent) {
// Consume repeat events to prevent system sounds
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'select-long-press-repeat');
} else if (event is KeyUpEvent) {
final timerWasActive = _longPressTimer?.isActive ?? false;
_longPressTimer?.cancel();
@@ -364,52 +387,52 @@ class _FocusableWrapperState extends State<FocusableWrapper> with SingleTickerPr
}
// If timer already fired, long press was triggered - do nothing on key up
_isSelectKeyDown = false;
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'select-long-press-up');
}
} else if (widget.onSelect != null) {
return handleOneShotSelect(event, widget.onSelect!);
return finish(handleOneShotSelect(event, widget.onSelect!), 'one-shot-select');
}
}
// Ignore key up events for other keys
if (!event.isActionable) {
return KeyEventResult.ignored;
return finish(KeyEventResult.ignored, 'non-actionable');
}
// Context menu key
if (key.isContextMenuKey) {
SelectKeyUpSuppressor.suppressSelectUntilKeyUp();
widget.onLongPress?.call();
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'context-menu');
}
// UP arrow - if callback provided, navigate up
if (key == LogicalKeyboardKey.arrowUp && widget.onNavigateUp != null) {
widget.onNavigateUp!();
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'onNavigateUp');
}
// DOWN arrow - if callback provided, navigate down
if (key == LogicalKeyboardKey.arrowDown && widget.onNavigateDown != null) {
widget.onNavigateDown!();
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'onNavigateDown');
}
// LEFT arrow - if callback provided, navigate left (caller is responsible
// for only providing this callback when the item is at the left edge)
if (key == LogicalKeyboardKey.arrowLeft && widget.onNavigateLeft != null) {
widget.onNavigateLeft!();
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'onNavigateLeft');
}
// RIGHT arrow - if callback provided, navigate right (caller is responsible
// for only providing this callback when the item is at the right edge)
if (key == LogicalKeyboardKey.arrowRight && widget.onNavigateRight != null) {
widget.onNavigateRight!();
return KeyEventResult.handled;
return finish(KeyEventResult.handled, 'onNavigateRight');
}
return KeyEventResult.ignored;
return finish(KeyEventResult.ignored, 'fall-through');
}
@override
@@ -461,6 +484,10 @@ class _FocusableWrapperState extends State<FocusableWrapper> with SingleTickerPr
result = Semantics(label: widget.semanticLabel, button: widget.onSelect != null, child: result);
}
if (widget.onSelect != null || widget.onLongPress != null) {
result = ClickableCursor(child: result);
}
return result;
}
}
+7
View File
@@ -26,6 +26,13 @@ class HubFocusMemory {
return _lastColumnHint.clamp(0, itemCount - 1);
}
/// Get only this hub's remembered index, without falling back to the global column hint.
static int getForHubOnly(String hubKey, int itemCount, {int fallback = 0}) {
if (itemCount <= 0) return 0;
final remembered = _perHubMemory[hubKey];
return (remembered ?? fallback).clamp(0, itemCount - 1);
}
/// Clear all memory (e.g., when leaving a screen)
static void clear() {
_perHubMemory.clear();
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "Forsinkelse ved skærmskift",
"tunneledPlayback": "Tunneleret afspilning",
"tunneledPlaybackDescription": "Brug videotunneling. Slå fra, hvis HDR-afspilning viser sort video.",
"dvConversionMode": "Dolby Vision-konvertering",
"dvConversionModeDescription": "Vælg, hvordan ExoPlayer håndterer Dolby Vision Profile 7-filer.",
"dvConversionAuto": "Auto",
"dvConversionNative": "Native / deaktiveret",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "Spørg om profil ved åbning",
"requireProfileSelectionOnOpenDescription": "Vis profilvalg hver gang appen åbnes",
"forceTvMode": "Gennemtving TV-tilstand",
@@ -408,7 +414,7 @@
"nextChapterButton": "Næste kapitel",
"muteButton": "Lydløs",
"unmuteButton": "Slå lyd til",
"settingsButton": "Videoindstillinger",
"settingsButton": "Afspilningsindstillinger",
"tracksButton": "Lyd og undertekster",
"chaptersButton": "Kapitler",
"versionsButton": "Videoversioner",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "Afspilningsindstillinger",
"playbackSpeed": "Afspilningshastighed",
"sleepTimer": "Sove-timer",
"audioSync": "Lydsynkronisering",
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "Verzögerung beim Displaywechsel",
"tunneledPlayback": "Tunnelwiedergabe",
"tunneledPlaybackDescription": "Video-Tunneling verwenden. Deaktivieren, wenn HDR-Wiedergabe schwarzes Video zeigt.",
"dvConversionMode": "Dolby-Vision-Konvertierung",
"dvConversionModeDescription": "Wähle, wie ExoPlayer Dolby-Vision-Profil-7-Dateien behandelt.",
"dvConversionAuto": "Automatisch",
"dvConversionNative": "Nativ / deaktiviert",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "Profil beim Öffnen abfragen",
"requireProfileSelectionOnOpenDescription": "Profilauswahl bei jedem Öffnen der App anzeigen",
"forceTvMode": "TV-Modus erzwingen",
@@ -408,7 +414,7 @@
"nextChapterButton": "Nächstes Kapitel",
"muteButton": "Stumm schalten",
"unmuteButton": "Stummschaltung aufheben",
"settingsButton": "Videoeinstellungen",
"settingsButton": "Wiedergabeeinstellungen",
"tracksButton": "Audio und Untertitel",
"chaptersButton": "Kapitel",
"versionsButton": "Videoversionen",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "Wiedergabeeinstellungen",
"playbackSpeed": "Wiedergabegeschwindigkeit",
"sleepTimer": "Schlaftimer",
"audioSync": "Audio-Synchronisation",
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "Display Switch Delay",
"tunneledPlayback": "Tunneled Playback",
"tunneledPlaybackDescription": "Use video tunneling. Disable if HDR playback shows black video.",
"dvConversionMode": "Dolby Vision Conversion",
"dvConversionModeDescription": "Choose how ExoPlayer handles Dolby Vision Profile 7 files.",
"dvConversionAuto": "Auto",
"dvConversionNative": "Native / Disabled",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "Ask for profile on app open",
"requireProfileSelectionOnOpenDescription": "Show profile selection every time the app is opened",
"forceTvMode": "Force TV mode",
@@ -408,7 +414,7 @@
"nextChapterButton": "Next chapter",
"muteButton": "Mute",
"unmuteButton": "Unmute",
"settingsButton": "Video settings",
"settingsButton": "Playback Settings",
"tracksButton": "Audio & Subtitles",
"chaptersButton": "Chapters",
"versionsButton": "Video versions",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "Playback Settings",
"playbackSpeed": "Playback Speed",
"sleepTimer": "Sleep Timer",
"audioSync": "Audio Sync",
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "Retraso de cambio de pantalla",
"tunneledPlayback": "Reproducción tunelizada",
"tunneledPlaybackDescription": "Usar tunelización de video. Desactívala si HDR muestra video negro.",
"dvConversionMode": "Conversión de Dolby Vision",
"dvConversionModeDescription": "Elige cómo ExoPlayer gestiona archivos Dolby Vision Profile 7.",
"dvConversionAuto": "Automático",
"dvConversionNative": "Nativo / desactivado",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "Pedir perfil al abrir la app",
"requireProfileSelectionOnOpenDescription": "Mostrar selección de perfil cada vez que se abre la aplicación",
"forceTvMode": "Forzar modo TV",
@@ -408,7 +414,7 @@
"nextChapterButton": "Capítulo siguiente",
"muteButton": "Silenciar",
"unmuteButton": "Activar sonido",
"settingsButton": "Ajustes de video",
"settingsButton": "Ajustes de reproducción",
"tracksButton": "Audio y subtítulos",
"chaptersButton": "Capítulos",
"versionsButton": "Versiones de video",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "Ajustes de reproducción",
"playbackSpeed": "Velocidad de reproducción",
"sleepTimer": "Temporizador de apagado",
"audioSync": "Sincronización de audio",
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "Délai de changement d'affichage",
"tunneledPlayback": "Lecture tunnelée",
"tunneledPlaybackDescription": "Utiliser le tunneling vidéo. Désactivez si la lecture HDR affiche un écran noir.",
"dvConversionMode": "Conversion Dolby Vision",
"dvConversionModeDescription": "Choisissez comment ExoPlayer gère les fichiers Dolby Vision Profile 7.",
"dvConversionAuto": "Auto",
"dvConversionNative": "Natif / désactivé",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "Demander le profil à l'ouverture",
"requireProfileSelectionOnOpenDescription": "Afficher la sélection de profil à chaque ouverture de l'application",
"forceTvMode": "Forcer le mode TV",
@@ -408,7 +414,7 @@
"nextChapterButton": "Chapitre suivant",
"muteButton": "Mute",
"unmuteButton": "Dé-mute",
"settingsButton": "Paramètres vidéo",
"settingsButton": "Paramètres de lecture",
"tracksButton": "Audio et sous-titres",
"chaptersButton": "Chapitres",
"versionsButton": "Versions vidéo",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "Paramètres de lecture",
"playbackSpeed": "Vitesse de lecture",
"sleepTimer": "Minuterie de mise en veille",
"audioSync": "Synchronisation audio",
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "Ritardo cambio display",
"tunneledPlayback": "Riproduzione tunnelizzata",
"tunneledPlaybackDescription": "Usa tunneling video. Disattiva se la riproduzione HDR mostra video nero.",
"dvConversionMode": "Conversione Dolby Vision",
"dvConversionModeDescription": "Scegli come ExoPlayer gestisce i file Dolby Vision Profile 7.",
"dvConversionAuto": "Auto",
"dvConversionNative": "Nativo / disattivato",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "Chiedi profilo all'apertura",
"requireProfileSelectionOnOpenDescription": "Mostra la selezione del profilo ogni volta che l'app viene aperta",
"forceTvMode": "Forza modalità TV",
@@ -408,7 +414,7 @@
"nextChapterButton": "Capitolo successivo",
"muteButton": "Silenzia",
"unmuteButton": "Riattiva audio",
"settingsButton": "Impostazioni video",
"settingsButton": "Impostazioni di riproduzione",
"tracksButton": "Audio e sottotitoli",
"chaptersButton": "Capitoli",
"versionsButton": "Versioni video",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "Impostazioni di riproduzione",
"playbackSpeed": "Velocità di riproduzione",
"sleepTimer": "Timer di spegnimento",
"audioSync": "Sincronizzazione audio",
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "ディスプレイ切り替え遅延",
"tunneledPlayback": "トンネル再生",
"tunneledPlaybackDescription": "動画トンネリングを使用します。HDR再生で画面が黒くなる場合は無効にしてください。",
"dvConversionMode": "Dolby Vision 変換",
"dvConversionModeDescription": "ExoPlayer が Dolby Vision Profile 7 ファイルを処理する方法を選択します。",
"dvConversionAuto": "自動",
"dvConversionNative": "ネイティブ / 無効",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "アプリ起動時にプロフィールを確認",
"requireProfileSelectionOnOpenDescription": "アプリを開くたびにプロフィール選択を表示",
"forceTvMode": "TVモードを強制",
@@ -408,7 +414,7 @@
"nextChapterButton": "次のチャプター",
"muteButton": "ミュート",
"unmuteButton": "ミュート解除",
"settingsButton": "動画設定",
"settingsButton": "再生設定",
"tracksButton": "音声と字幕",
"chaptersButton": "チャプター",
"versionsButton": "動画バージョン",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "再生設定",
"playbackSpeed": "再生速度",
"sleepTimer": "スリープタイマー",
"audioSync": "音声同期",
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "디스플레이 전환 지연",
"tunneledPlayback": "터널 재생",
"tunneledPlaybackDescription": "비디오 터널링을 사용합니다. HDR 재생 시 검은 화면이 보이면 비활성화하세요.",
"dvConversionMode": "Dolby Vision 변환",
"dvConversionModeDescription": "ExoPlayer가 Dolby Vision Profile 7 파일을 처리하는 방식을 선택합니다.",
"dvConversionAuto": "자동",
"dvConversionNative": "네이티브 / 비활성화",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "앱 실행 시 프로필 선택",
"requireProfileSelectionOnOpenDescription": "앱을 열 때마다 프로필 선택 화면을 표시합니다",
"forceTvMode": "TV 모드 강제 사용",
@@ -408,7 +414,7 @@
"nextChapterButton": "다음 챕터",
"muteButton": "음소거",
"unmuteButton": "음소거 해제",
"settingsButton": "동영상 설정",
"settingsButton": "재생 설정",
"tracksButton": "오디오 및 자막",
"chaptersButton": "챕터",
"versionsButton": "동영상 버전",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "재생 설정",
"playbackSpeed": "재생 속도",
"sleepTimer": "취침 타이머",
"audioSync": "오디오 동기화",
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "Forsinkelse ved skjermbytte",
"tunneledPlayback": "Tunnelert avspilling",
"tunneledPlaybackDescription": "Bruk videotunneling. Slå av hvis HDR-avspilling viser svart video.",
"dvConversionMode": "Dolby Vision-konvertering",
"dvConversionModeDescription": "Velg hvordan ExoPlayer håndterer Dolby Vision Profile 7-filer.",
"dvConversionAuto": "Auto",
"dvConversionNative": "Innebygd / deaktivert",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "Spør om profil ved appåpning",
"requireProfileSelectionOnOpenDescription": "Vis profilvalg hver gang appen åpnes",
"forceTvMode": "Tving TV-modus",
@@ -408,7 +414,7 @@
"nextChapterButton": "Neste kapittel",
"muteButton": "Demp",
"unmuteButton": "Opphev demping",
"settingsButton": "Videoinnstillinger",
"settingsButton": "Avspillingsinnstillinger",
"tracksButton": "Lyd og undertekster",
"chaptersButton": "Kapitler",
"versionsButton": "Videoversjoner",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "Avspillingsinnstillinger",
"playbackSpeed": "Avspillingshastighet",
"sleepTimer": "Søvntimer",
"audioSync": "Lydsynkronisering",
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "Vertraging bij schermwisseling",
"tunneledPlayback": "Getunnelde weergave",
"tunneledPlaybackDescription": "Gebruik videotunneling. Schakel uit als HDR-afspelen zwart beeld geeft.",
"dvConversionMode": "Dolby Vision-conversie",
"dvConversionModeDescription": "Kies hoe ExoPlayer Dolby Vision Profile 7-bestanden verwerkt.",
"dvConversionAuto": "Auto",
"dvConversionNative": "Native / uitgeschakeld",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "Vraag om profiel bij openen",
"requireProfileSelectionOnOpenDescription": "Toon profielselectie telkens wanneer de app wordt geopend",
"forceTvMode": "TV-modus forceren",
@@ -408,7 +414,7 @@
"nextChapterButton": "Volgend hoofdstuk",
"muteButton": "Dempen",
"unmuteButton": "Dempen opheffen",
"settingsButton": "Video-instellingen",
"settingsButton": "Afspeelinstellingen",
"tracksButton": "Audio en ondertitels",
"chaptersButton": "Hoofdstukken",
"versionsButton": "Videoversies",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "Afspeelinstellingen",
"playbackSpeed": "Afspeelsnelheid",
"sleepTimer": "Slaaptimer",
"audioSync": "Audio synchronisatie",
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "Opóźnienie przełączania ekranu",
"tunneledPlayback": "Tunelowane odtwarzanie",
"tunneledPlaybackDescription": "Użyj tunelowania wideo. Wyłącz, jeśli HDR pokazuje czarny obraz.",
"dvConversionMode": "Konwersja Dolby Vision",
"dvConversionModeDescription": "Wybierz, jak ExoPlayer obsługuje pliki Dolby Vision Profile 7.",
"dvConversionAuto": "Automatycznie",
"dvConversionNative": "Natywnie / wyłączone",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "Pytaj o profil przy otwarciu aplikacji",
"requireProfileSelectionOnOpenDescription": "Pokaż wybór profilu za każdym razem, gdy aplikacja jest otwierana",
"forceTvMode": "Wymuś tryb TV",
@@ -408,7 +414,7 @@
"nextChapterButton": "Następny rozdział",
"muteButton": "Wycisz",
"unmuteButton": "Wyłącz wyciszenie",
"settingsButton": "Ustawienia wideo",
"settingsButton": "Ustawienia odtwarzania",
"tracksButton": "Audio i napisy",
"chaptersButton": "Rozdziały",
"versionsButton": "Wersje wideo",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "Ustawienia odtwarzania",
"playbackSpeed": "Prędkość odtwarzania",
"sleepTimer": "Wyłącznik czasowy",
"audioSync": "Synchronizacja audio",
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "Atraso na Troca de Tela",
"tunneledPlayback": "Reprodução Tunelizada",
"tunneledPlaybackDescription": "Usar tunelamento de vídeo. Desative se HDR mostrar vídeo preto.",
"dvConversionMode": "Conversão Dolby Vision",
"dvConversionModeDescription": "Escolha como o ExoPlayer lida com arquivos Dolby Vision Profile 7.",
"dvConversionAuto": "Automático",
"dvConversionNative": "Nativo / desativado",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "Pedir perfil ao abrir o app",
"requireProfileSelectionOnOpenDescription": "Mostrar seleção de perfil toda vez que o app for aberto",
"forceTvMode": "Forçar modo TV",
@@ -408,7 +414,7 @@
"nextChapterButton": "Próximo capítulo",
"muteButton": "Silenciar",
"unmuteButton": "Ativar som",
"settingsButton": "Configurações de vídeo",
"settingsButton": "Configurações de Reprodução",
"tracksButton": "Áudio e Legendas",
"chaptersButton": "Capítulos",
"versionsButton": "Versões do vídeo",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "Configurações de Reprodução",
"playbackSpeed": "Velocidade de Reprodução",
"sleepTimer": "Timer de Sono",
"audioSync": "Sincronia de Áudio",
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "Задержка переключения дисплея",
"tunneledPlayback": "Туннельное воспроизведение",
"tunneledPlaybackDescription": "Использовать видеотуннелирование. Отключите, если HDR показывает черный экран.",
"dvConversionMode": "Преобразование Dolby Vision",
"dvConversionModeDescription": "Выберите, как ExoPlayer обрабатывает файлы Dolby Vision Profile 7.",
"dvConversionAuto": "Авто",
"dvConversionNative": "Нативно / отключено",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "Запрашивать профиль при запуске",
"requireProfileSelectionOnOpenDescription": "Показывать выбор профиля при каждом открытии приложения",
"forceTvMode": "Принудительный режим ТВ",
@@ -408,7 +414,7 @@
"nextChapterButton": "Следующая глава",
"muteButton": "Без звука",
"unmuteButton": "Включить звук",
"settingsButton": "Настройки видео",
"settingsButton": "Настройки воспроизведения",
"tracksButton": "Аудио и субтитры",
"chaptersButton": "Главы",
"versionsButton": "Версии видео",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "Настройки воспроизведения",
"playbackSpeed": "Скорость воспроизведения",
"sleepTimer": "Таймер сна",
"audioSync": "Синхронизация аудио",
+1 -3
View File
@@ -4,9 +4,7 @@
/// To regenerate, run: `dart run slang`
///
/// Locales: 15
/// Strings: 17490 (1166 per locale)
///
/// Built on 2026-05-16 at 21:43 UTC
/// Strings: 17565 (1171 per locale)
// coverage:ignore-file
// ignore_for_file: type=lint, unused_import
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsDa extends TranslationsSettingsEn {
@override String get displaySwitchDelay => 'Forsinkelse ved skærmskift';
@override String get tunneledPlayback => 'Tunneleret afspilning';
@override String get tunneledPlaybackDescription => 'Brug videotunneling. Slå fra, hvis HDR-afspilning viser sort video.';
@override String get dvConversionMode => 'Dolby Vision-konvertering';
@override String get dvConversionModeDescription => 'Vælg, hvordan ExoPlayer håndterer Dolby Vision Profile 7-filer.';
@override String get dvConversionAuto => 'Auto';
@override String get dvConversionNative => 'Native / deaktiveret';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => 'Spørg om profil ved åbning';
@override String get requireProfileSelectionOnOpenDescription => 'Vis profilvalg hver gang appen åbnes';
@override String get forceTvMode => 'Gennemtving TV-tilstand';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsDa extends TranslationsVideoControlsEn {
@override String get nextChapterButton => 'Næste kapitel';
@override String get muteButton => 'Lydløs';
@override String get unmuteButton => 'Slå lyd til';
@override String get settingsButton => 'Videoindstillinger';
@override String get settingsButton => 'Afspilningsindstillinger';
@override String get tracksButton => 'Lyd og undertekster';
@override String get chaptersButton => 'Kapitler';
@override String get versionsButton => 'Videoversioner';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsDa extends TranslationsVideoSettingsEn {
final TranslationsDa _root; // ignore: unused_field
// Translations
@override String get playbackSettings => 'Afspilningsindstillinger';
@override String get playbackSpeed => 'Afspilningshastighed';
@override String get sleepTimer => 'Sove-timer';
@override String get audioSync => 'Lydsynkronisering';
@@ -2033,6 +2038,12 @@ extension on TranslationsDa {
'settings.displaySwitchDelay' => 'Forsinkelse ved skærmskift',
'settings.tunneledPlayback' => 'Tunneleret afspilning',
'settings.tunneledPlaybackDescription' => 'Brug videotunneling. Slå fra, hvis HDR-afspilning viser sort video.',
'settings.dvConversionMode' => 'Dolby Vision-konvertering',
'settings.dvConversionModeDescription' => 'Vælg, hvordan ExoPlayer håndterer Dolby Vision Profile 7-filer.',
'settings.dvConversionAuto' => 'Auto',
'settings.dvConversionNative' => 'Native / deaktiveret',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => 'Spørg om profil ved åbning',
'settings.requireProfileSelectionOnOpenDescription' => 'Vis profilvalg hver gang appen åbnes',
'settings.forceTvMode' => 'Gennemtving TV-tilstand',
@@ -2175,7 +2186,7 @@ extension on TranslationsDa {
'videoControls.nextChapterButton' => 'Næste kapitel',
'videoControls.muteButton' => 'Lydløs',
'videoControls.unmuteButton' => 'Slå lyd til',
'videoControls.settingsButton' => 'Videoindstillinger',
'videoControls.settingsButton' => 'Afspilningsindstillinger',
'videoControls.tracksButton' => 'Lyd og undertekster',
'videoControls.chaptersButton' => 'Kapitler',
'videoControls.versionsButton' => 'Videoversioner',
@@ -2301,14 +2312,14 @@ extension on TranslationsDa {
'profiles.signOut' => 'Log ud',
'profiles.signOutPlexTitle' => 'Log ud af Plex?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => 'Fjern ${displayName} og alle Plex Home-brugere? Log ind igen når som helst.',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Logget ud af Plex.',
'profiles.signOutFailed' => 'Log ud mislykkedes.',
'profiles.sectionTitle' => 'Profiler',
'profiles.summarySingle' => 'Tilføj profiler for at blande administrerede brugere og lokale identiteter',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profiler · aktiv: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profiler',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Fjern forbindelse?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Fjern ${displayName}s adgang til ${connectionLabel}. Andre profiler beholder den.',
'profiles.deleteProfileTitle' => 'Slet profil?',
@@ -2775,7 +2786,6 @@ extension on TranslationsDa {
'companionRemote.remote.subtitles' => 'Undertekster',
'companionRemote.remote.audio' => 'Lyd',
'companionRemote.remote.searchHint' => 'Søg på desktop...',
'videoSettings.playbackSettings' => 'Afspilningsindstillinger',
'videoSettings.playbackSpeed' => 'Afspilningshastighed',
'videoSettings.sleepTimer' => 'Sove-timer',
'videoSettings.audioSync' => 'Lydsynkronisering',
@@ -2816,13 +2826,13 @@ extension on TranslationsDa {
'metadataEdit.poster' => 'Plakat',
'metadataEdit.background' => 'Baggrund',
'metadataEdit.logo' => 'Logo',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => 'Kvadratisk billede',
'metadataEdit.selectPoster' => 'Vælg plakat',
'metadataEdit.selectBackground' => 'Vælg baggrund',
'metadataEdit.selectLogo' => 'Vælg logo',
'metadataEdit.selectSquareArt' => 'Vælg kvadratisk billede',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Fra URL',
'metadataEdit.uploadFile' => 'Upload fil',
'metadataEdit.enterImageUrl' => 'Indtast billed-URL',
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsDe extends TranslationsSettingsEn {
@override String get displaySwitchDelay => 'Verzögerung beim Displaywechsel';
@override String get tunneledPlayback => 'Tunnelwiedergabe';
@override String get tunneledPlaybackDescription => 'Video-Tunneling verwenden. Deaktivieren, wenn HDR-Wiedergabe schwarzes Video zeigt.';
@override String get dvConversionMode => 'Dolby-Vision-Konvertierung';
@override String get dvConversionModeDescription => 'Wähle, wie ExoPlayer Dolby-Vision-Profil-7-Dateien behandelt.';
@override String get dvConversionAuto => 'Automatisch';
@override String get dvConversionNative => 'Nativ / deaktiviert';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => 'Profil beim Öffnen abfragen';
@override String get requireProfileSelectionOnOpenDescription => 'Profilauswahl bei jedem Öffnen der App anzeigen';
@override String get forceTvMode => 'TV-Modus erzwingen';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsDe extends TranslationsVideoControlsEn {
@override String get nextChapterButton => 'Nächstes Kapitel';
@override String get muteButton => 'Stumm schalten';
@override String get unmuteButton => 'Stummschaltung aufheben';
@override String get settingsButton => 'Videoeinstellungen';
@override String get settingsButton => 'Wiedergabeeinstellungen';
@override String get tracksButton => 'Audio und Untertitel';
@override String get chaptersButton => 'Kapitel';
@override String get versionsButton => 'Videoversionen';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsDe extends TranslationsVideoSettingsEn {
final TranslationsDe _root; // ignore: unused_field
// Translations
@override String get playbackSettings => 'Wiedergabeeinstellungen';
@override String get playbackSpeed => 'Wiedergabegeschwindigkeit';
@override String get sleepTimer => 'Schlaftimer';
@override String get audioSync => 'Audio-Synchronisation';
@@ -2033,6 +2038,12 @@ extension on TranslationsDe {
'settings.displaySwitchDelay' => 'Verzögerung beim Displaywechsel',
'settings.tunneledPlayback' => 'Tunnelwiedergabe',
'settings.tunneledPlaybackDescription' => 'Video-Tunneling verwenden. Deaktivieren, wenn HDR-Wiedergabe schwarzes Video zeigt.',
'settings.dvConversionMode' => 'Dolby-Vision-Konvertierung',
'settings.dvConversionModeDescription' => 'Wähle, wie ExoPlayer Dolby-Vision-Profil-7-Dateien behandelt.',
'settings.dvConversionAuto' => 'Automatisch',
'settings.dvConversionNative' => 'Nativ / deaktiviert',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => 'Profil beim Öffnen abfragen',
'settings.requireProfileSelectionOnOpenDescription' => 'Profilauswahl bei jedem Öffnen der App anzeigen',
'settings.forceTvMode' => 'TV-Modus erzwingen',
@@ -2175,7 +2186,7 @@ extension on TranslationsDe {
'videoControls.nextChapterButton' => 'Nächstes Kapitel',
'videoControls.muteButton' => 'Stumm schalten',
'videoControls.unmuteButton' => 'Stummschaltung aufheben',
'videoControls.settingsButton' => 'Videoeinstellungen',
'videoControls.settingsButton' => 'Wiedergabeeinstellungen',
'videoControls.tracksButton' => 'Audio und Untertitel',
'videoControls.chaptersButton' => 'Kapitel',
'videoControls.versionsButton' => 'Videoversionen',
@@ -2301,14 +2312,14 @@ extension on TranslationsDe {
'profiles.signOut' => 'Abmelden',
'profiles.signOutPlexTitle' => 'Von Plex abmelden?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => '${displayName} und alle Plex Home-Benutzer entfernen? Du kannst dich jederzeit wieder anmelden.',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Von Plex abgemeldet.',
'profiles.signOutFailed' => 'Abmeldung fehlgeschlagen.',
'profiles.sectionTitle' => 'Profile',
'profiles.summarySingle' => 'Profile hinzufügen, um verwaltete Benutzer und lokale Identitäten zu mischen',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} Profile · aktiv: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} Profile',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Verbindung entfernen?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Zugriff von ${displayName} auf ${connectionLabel} entfernen. Andere Profile behalten ihn.',
'profiles.deleteProfileTitle' => 'Profil löschen?',
@@ -2775,7 +2786,6 @@ extension on TranslationsDe {
'companionRemote.remote.subtitles' => 'Untertitel',
'companionRemote.remote.audio' => 'Audio',
'companionRemote.remote.searchHint' => 'Auf Desktop suchen...',
'videoSettings.playbackSettings' => 'Wiedergabeeinstellungen',
'videoSettings.playbackSpeed' => 'Wiedergabegeschwindigkeit',
'videoSettings.sleepTimer' => 'Schlaftimer',
'videoSettings.audioSync' => 'Audio-Synchronisation',
@@ -2816,13 +2826,13 @@ extension on TranslationsDe {
'metadataEdit.poster' => 'Poster',
'metadataEdit.background' => 'Hintergrund',
'metadataEdit.logo' => 'Logo',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => 'Quadratisches Bild',
'metadataEdit.selectPoster' => 'Poster auswählen',
'metadataEdit.selectBackground' => 'Hintergrund auswählen',
'metadataEdit.selectLogo' => 'Logo auswählen',
'metadataEdit.selectSquareArt' => 'Quadratisches Bild auswählen',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Von URL',
'metadataEdit.uploadFile' => 'Datei hochladen',
'metadataEdit.enterImageUrl' => 'Bild-URL eingeben',
+31 -11
View File
@@ -854,6 +854,24 @@ class TranslationsSettingsEn {
/// en: 'Use video tunneling. Disable if HDR playback shows black video.'
String get tunneledPlaybackDescription => 'Use video tunneling. Disable if HDR playback shows black video.';
/// en: 'Dolby Vision Conversion'
String get dvConversionMode => 'Dolby Vision Conversion';
/// en: 'Choose how ExoPlayer handles Dolby Vision Profile 7 files.'
String get dvConversionModeDescription => 'Choose how ExoPlayer handles Dolby Vision Profile 7 files.';
/// en: 'Auto'
String get dvConversionAuto => 'Auto';
/// en: 'Native / Disabled'
String get dvConversionNative => 'Native / Disabled';
/// en: 'P7 → P8.1'
String get dvConversionDv81 => 'P7 → P8.1';
/// en: 'P7 → HEVC'
String get dvConversionHevcStrip => 'P7 → HEVC';
/// en: 'Ask for profile on app open'
String get requireProfileSelectionOnOpen => 'Ask for profile on app open';
@@ -1288,8 +1306,8 @@ class TranslationsVideoControlsEn {
/// en: 'Unmute'
String get unmuteButton => 'Unmute';
/// en: 'Video settings'
String get settingsButton => 'Video settings';
/// en: 'Playback Settings'
String get settingsButton => 'Playback Settings';
/// en: 'Audio & Subtitles'
String get tracksButton => 'Audio & Subtitles';
@@ -3024,9 +3042,6 @@ class TranslationsVideoSettingsEn {
// Translations
/// en: 'Playback Settings'
String get playbackSettings => 'Playback Settings';
/// en: 'Playback Speed'
String get playbackSpeed => 'Playback Speed';
@@ -4371,6 +4386,12 @@ extension on Translations {
'settings.displaySwitchDelay' => 'Display Switch Delay',
'settings.tunneledPlayback' => 'Tunneled Playback',
'settings.tunneledPlaybackDescription' => 'Use video tunneling. Disable if HDR playback shows black video.',
'settings.dvConversionMode' => 'Dolby Vision Conversion',
'settings.dvConversionModeDescription' => 'Choose how ExoPlayer handles Dolby Vision Profile 7 files.',
'settings.dvConversionAuto' => 'Auto',
'settings.dvConversionNative' => 'Native / Disabled',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => 'Ask for profile on app open',
'settings.requireProfileSelectionOnOpenDescription' => 'Show profile selection every time the app is opened',
'settings.forceTvMode' => 'Force TV mode',
@@ -4513,7 +4534,7 @@ extension on Translations {
'videoControls.nextChapterButton' => 'Next chapter',
'videoControls.muteButton' => 'Mute',
'videoControls.unmuteButton' => 'Unmute',
'videoControls.settingsButton' => 'Video settings',
'videoControls.settingsButton' => 'Playback Settings',
'videoControls.tracksButton' => 'Audio & Subtitles',
'videoControls.chaptersButton' => 'Chapters',
'videoControls.versionsButton' => 'Video versions',
@@ -4639,14 +4660,14 @@ extension on Translations {
'profiles.signOut' => 'Sign out',
'profiles.signOutPlexTitle' => 'Sign out of Plex?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => 'Remove ${displayName} and all Plex Home users? Sign back in anytime.',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Signed out of Plex.',
'profiles.signOutFailed' => 'Sign out failed.',
'profiles.sectionTitle' => 'Profiles',
'profiles.summarySingle' => 'Add profiles to mix managed users and local identities',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profiles · active: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profiles',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Remove connection?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Remove ${displayName}\'s access to ${connectionLabel}. Other profiles keep it.',
'profiles.deleteProfileTitle' => 'Delete profile?',
@@ -5113,7 +5134,6 @@ extension on Translations {
'companionRemote.remote.subtitles' => 'Subtitles',
'companionRemote.remote.audio' => 'Audio',
'companionRemote.remote.searchHint' => 'Search on desktop...',
'videoSettings.playbackSettings' => 'Playback Settings',
'videoSettings.playbackSpeed' => 'Playback Speed',
'videoSettings.sleepTimer' => 'Sleep Timer',
'videoSettings.audioSync' => 'Audio Sync',
@@ -5154,13 +5174,13 @@ extension on Translations {
'metadataEdit.poster' => 'Poster',
'metadataEdit.background' => 'Background',
'metadataEdit.logo' => 'Logo',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => 'Square Art',
'metadataEdit.selectPoster' => 'Select Poster',
'metadataEdit.selectBackground' => 'Select Background',
'metadataEdit.selectLogo' => 'Select Logo',
'metadataEdit.selectSquareArt' => 'Select Square Art',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'From URL',
'metadataEdit.uploadFile' => 'Upload File',
'metadataEdit.enterImageUrl' => 'Enter image URL',
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsEs extends TranslationsSettingsEn {
@override String get displaySwitchDelay => 'Retraso de cambio de pantalla';
@override String get tunneledPlayback => 'Reproducción tunelizada';
@override String get tunneledPlaybackDescription => 'Usar tunelización de video. Desactívala si HDR muestra video negro.';
@override String get dvConversionMode => 'Conversión de Dolby Vision';
@override String get dvConversionModeDescription => 'Elige cómo ExoPlayer gestiona archivos Dolby Vision Profile 7.';
@override String get dvConversionAuto => 'Automático';
@override String get dvConversionNative => 'Nativo / desactivado';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => 'Pedir perfil al abrir la app';
@override String get requireProfileSelectionOnOpenDescription => 'Mostrar selección de perfil cada vez que se abre la aplicación';
@override String get forceTvMode => 'Forzar modo TV';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsEs extends TranslationsVideoControlsEn {
@override String get nextChapterButton => 'Capítulo siguiente';
@override String get muteButton => 'Silenciar';
@override String get unmuteButton => 'Activar sonido';
@override String get settingsButton => 'Ajustes de video';
@override String get settingsButton => 'Ajustes de reproducción';
@override String get tracksButton => 'Audio y subtítulos';
@override String get chaptersButton => 'Capítulos';
@override String get versionsButton => 'Versiones de video';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsEs extends TranslationsVideoSettingsEn {
final TranslationsEs _root; // ignore: unused_field
// Translations
@override String get playbackSettings => 'Ajustes de reproducción';
@override String get playbackSpeed => 'Velocidad de reproducción';
@override String get sleepTimer => 'Temporizador de apagado';
@override String get audioSync => 'Sincronización de audio';
@@ -2033,6 +2038,12 @@ extension on TranslationsEs {
'settings.displaySwitchDelay' => 'Retraso de cambio de pantalla',
'settings.tunneledPlayback' => 'Reproducción tunelizada',
'settings.tunneledPlaybackDescription' => 'Usar tunelización de video. Desactívala si HDR muestra video negro.',
'settings.dvConversionMode' => 'Conversión de Dolby Vision',
'settings.dvConversionModeDescription' => 'Elige cómo ExoPlayer gestiona archivos Dolby Vision Profile 7.',
'settings.dvConversionAuto' => 'Automático',
'settings.dvConversionNative' => 'Nativo / desactivado',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => 'Pedir perfil al abrir la app',
'settings.requireProfileSelectionOnOpenDescription' => 'Mostrar selección de perfil cada vez que se abre la aplicación',
'settings.forceTvMode' => 'Forzar modo TV',
@@ -2175,7 +2186,7 @@ extension on TranslationsEs {
'videoControls.nextChapterButton' => 'Capítulo siguiente',
'videoControls.muteButton' => 'Silenciar',
'videoControls.unmuteButton' => 'Activar sonido',
'videoControls.settingsButton' => 'Ajustes de video',
'videoControls.settingsButton' => 'Ajustes de reproducción',
'videoControls.tracksButton' => 'Audio y subtítulos',
'videoControls.chaptersButton' => 'Capítulos',
'videoControls.versionsButton' => 'Versiones de video',
@@ -2301,14 +2312,14 @@ extension on TranslationsEs {
'profiles.signOut' => 'Cerrar sesión',
'profiles.signOutPlexTitle' => '¿Cerrar sesión de Plex?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => '¿Eliminar ${displayName} y todos los usuarios de Plex Home? Puedes iniciar sesión de nuevo cuando quieras.',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Sesión de Plex cerrada.',
'profiles.signOutFailed' => 'Error al cerrar sesión.',
'profiles.sectionTitle' => 'Perfiles',
'profiles.summarySingle' => 'Añade perfiles para mezclar usuarios gestionados e identidades locales',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} perfiles · activo: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} perfiles',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => '¿Eliminar conexión?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Eliminar el acceso de ${displayName} a ${connectionLabel}. Los demás perfiles lo conservan.',
'profiles.deleteProfileTitle' => '¿Eliminar perfil?',
@@ -2775,7 +2786,6 @@ extension on TranslationsEs {
'companionRemote.remote.subtitles' => 'Subtítulos',
'companionRemote.remote.audio' => 'Audio',
'companionRemote.remote.searchHint' => 'Buscar en escritorio...',
'videoSettings.playbackSettings' => 'Ajustes de reproducción',
'videoSettings.playbackSpeed' => 'Velocidad de reproducción',
'videoSettings.sleepTimer' => 'Temporizador de apagado',
'videoSettings.audioSync' => 'Sincronización de audio',
@@ -2816,13 +2826,13 @@ extension on TranslationsEs {
'metadataEdit.poster' => 'Póster',
'metadataEdit.background' => 'Fondo',
'metadataEdit.logo' => 'Logo',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => 'Imagen cuadrada',
'metadataEdit.selectPoster' => 'Seleccionar póster',
'metadataEdit.selectBackground' => 'Seleccionar fondo',
'metadataEdit.selectLogo' => 'Seleccionar logo',
'metadataEdit.selectSquareArt' => 'Seleccionar imagen cuadrada',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Desde URL',
'metadataEdit.uploadFile' => 'Subir archivo',
'metadataEdit.enterImageUrl' => 'Introducir URL de imagen',
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsFr extends TranslationsSettingsEn {
@override String get displaySwitchDelay => 'Délai de changement d\'affichage';
@override String get tunneledPlayback => 'Lecture tunnelée';
@override String get tunneledPlaybackDescription => 'Utiliser le tunneling vidéo. Désactivez si la lecture HDR affiche un écran noir.';
@override String get dvConversionMode => 'Conversion Dolby Vision';
@override String get dvConversionModeDescription => 'Choisissez comment ExoPlayer gère les fichiers Dolby Vision Profile 7.';
@override String get dvConversionAuto => 'Auto';
@override String get dvConversionNative => 'Natif / désactivé';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => 'Demander le profil à l\'ouverture';
@override String get requireProfileSelectionOnOpenDescription => 'Afficher la sélection de profil à chaque ouverture de l\'application';
@override String get forceTvMode => 'Forcer le mode TV';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsFr extends TranslationsVideoControlsEn {
@override String get nextChapterButton => 'Chapitre suivant';
@override String get muteButton => 'Mute';
@override String get unmuteButton => 'Dé-mute';
@override String get settingsButton => 'Paramètres vidéo';
@override String get settingsButton => 'Paramètres de lecture';
@override String get tracksButton => 'Audio et sous-titres';
@override String get chaptersButton => 'Chapitres';
@override String get versionsButton => 'Versions vidéo';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsFr extends TranslationsVideoSettingsEn {
final TranslationsFr _root; // ignore: unused_field
// Translations
@override String get playbackSettings => 'Paramètres de lecture';
@override String get playbackSpeed => 'Vitesse de lecture';
@override String get sleepTimer => 'Minuterie de mise en veille';
@override String get audioSync => 'Synchronisation audio';
@@ -2033,6 +2038,12 @@ extension on TranslationsFr {
'settings.displaySwitchDelay' => 'Délai de changement d\'affichage',
'settings.tunneledPlayback' => 'Lecture tunnelée',
'settings.tunneledPlaybackDescription' => 'Utiliser le tunneling vidéo. Désactivez si la lecture HDR affiche un écran noir.',
'settings.dvConversionMode' => 'Conversion Dolby Vision',
'settings.dvConversionModeDescription' => 'Choisissez comment ExoPlayer gère les fichiers Dolby Vision Profile 7.',
'settings.dvConversionAuto' => 'Auto',
'settings.dvConversionNative' => 'Natif / désactivé',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => 'Demander le profil à l\'ouverture',
'settings.requireProfileSelectionOnOpenDescription' => 'Afficher la sélection de profil à chaque ouverture de l\'application',
'settings.forceTvMode' => 'Forcer le mode TV',
@@ -2175,7 +2186,7 @@ extension on TranslationsFr {
'videoControls.nextChapterButton' => 'Chapitre suivant',
'videoControls.muteButton' => 'Mute',
'videoControls.unmuteButton' => 'Dé-mute',
'videoControls.settingsButton' => 'Paramètres vidéo',
'videoControls.settingsButton' => 'Paramètres de lecture',
'videoControls.tracksButton' => 'Audio et sous-titres',
'videoControls.chaptersButton' => 'Chapitres',
'videoControls.versionsButton' => 'Versions vidéo',
@@ -2301,14 +2312,14 @@ extension on TranslationsFr {
'profiles.signOut' => 'Se déconnecter',
'profiles.signOutPlexTitle' => 'Se déconnecter de Plex ?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => 'Supprimer ${displayName} et tous les utilisateurs Plex Home ? Reconnexion possible à tout moment.',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Déconnecté de Plex.',
'profiles.signOutFailed' => 'Échec de la déconnexion.',
'profiles.sectionTitle' => 'Profils',
'profiles.summarySingle' => 'Ajoutez des profils pour mélanger utilisateurs gérés et identités locales',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profils · actif : ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profils',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Retirer la connexion ?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Supprimer l\'accès de ${displayName} à ${connectionLabel}. Les autres profils le conservent.',
'profiles.deleteProfileTitle' => 'Supprimer le profil ?',
@@ -2775,7 +2786,6 @@ extension on TranslationsFr {
'companionRemote.remote.subtitles' => 'Sous-titres',
'companionRemote.remote.audio' => 'Audio',
'companionRemote.remote.searchHint' => 'Rechercher sur le bureau...',
'videoSettings.playbackSettings' => 'Paramètres de lecture',
'videoSettings.playbackSpeed' => 'Vitesse de lecture',
'videoSettings.sleepTimer' => 'Minuterie de mise en veille',
'videoSettings.audioSync' => 'Synchronisation audio',
@@ -2816,13 +2826,13 @@ extension on TranslationsFr {
'metadataEdit.poster' => 'Affiche',
'metadataEdit.background' => 'Arrière-plan',
'metadataEdit.logo' => 'Logo',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => 'Image carrée',
'metadataEdit.selectPoster' => 'Sélectionner l\'affiche',
'metadataEdit.selectBackground' => 'Sélectionner l\'arrière-plan',
'metadataEdit.selectLogo' => 'Sélectionner le logo',
'metadataEdit.selectSquareArt' => 'Sélectionner l\'image carrée',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Depuis une URL',
'metadataEdit.uploadFile' => 'Importer un fichier',
'metadataEdit.enterImageUrl' => 'Entrer l\'URL de l\'image',
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsIt extends TranslationsSettingsEn {
@override String get displaySwitchDelay => 'Ritardo cambio display';
@override String get tunneledPlayback => 'Riproduzione tunnelizzata';
@override String get tunneledPlaybackDescription => 'Usa tunneling video. Disattiva se la riproduzione HDR mostra video nero.';
@override String get dvConversionMode => 'Conversione Dolby Vision';
@override String get dvConversionModeDescription => 'Scegli come ExoPlayer gestisce i file Dolby Vision Profile 7.';
@override String get dvConversionAuto => 'Auto';
@override String get dvConversionNative => 'Nativo / disattivato';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => 'Chiedi profilo all\'apertura';
@override String get requireProfileSelectionOnOpenDescription => 'Mostra la selezione del profilo ogni volta che l\'app viene aperta';
@override String get forceTvMode => 'Forza modalità TV';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsIt extends TranslationsVideoControlsEn {
@override String get nextChapterButton => 'Capitolo successivo';
@override String get muteButton => 'Silenzia';
@override String get unmuteButton => 'Riattiva audio';
@override String get settingsButton => 'Impostazioni video';
@override String get settingsButton => 'Impostazioni di riproduzione';
@override String get tracksButton => 'Audio e sottotitoli';
@override String get chaptersButton => 'Capitoli';
@override String get versionsButton => 'Versioni video';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsIt extends TranslationsVideoSettingsEn {
final TranslationsIt _root; // ignore: unused_field
// Translations
@override String get playbackSettings => 'Impostazioni di riproduzione';
@override String get playbackSpeed => 'Velocità di riproduzione';
@override String get sleepTimer => 'Timer di spegnimento';
@override String get audioSync => 'Sincronizzazione audio';
@@ -2033,6 +2038,12 @@ extension on TranslationsIt {
'settings.displaySwitchDelay' => 'Ritardo cambio display',
'settings.tunneledPlayback' => 'Riproduzione tunnelizzata',
'settings.tunneledPlaybackDescription' => 'Usa tunneling video. Disattiva se la riproduzione HDR mostra video nero.',
'settings.dvConversionMode' => 'Conversione Dolby Vision',
'settings.dvConversionModeDescription' => 'Scegli come ExoPlayer gestisce i file Dolby Vision Profile 7.',
'settings.dvConversionAuto' => 'Auto',
'settings.dvConversionNative' => 'Nativo / disattivato',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => 'Chiedi profilo all\'apertura',
'settings.requireProfileSelectionOnOpenDescription' => 'Mostra la selezione del profilo ogni volta che l\'app viene aperta',
'settings.forceTvMode' => 'Forza modalità TV',
@@ -2175,7 +2186,7 @@ extension on TranslationsIt {
'videoControls.nextChapterButton' => 'Capitolo successivo',
'videoControls.muteButton' => 'Silenzia',
'videoControls.unmuteButton' => 'Riattiva audio',
'videoControls.settingsButton' => 'Impostazioni video',
'videoControls.settingsButton' => 'Impostazioni di riproduzione',
'videoControls.tracksButton' => 'Audio e sottotitoli',
'videoControls.chaptersButton' => 'Capitoli',
'videoControls.versionsButton' => 'Versioni video',
@@ -2301,14 +2312,14 @@ extension on TranslationsIt {
'profiles.signOut' => 'Esci',
'profiles.signOutPlexTitle' => 'Uscire da Plex?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => 'Rimuovere ${displayName} e tutti gli utenti Plex Home? Puoi accedere di nuovo quando vuoi.',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Uscito da Plex.',
'profiles.signOutFailed' => 'Uscita non riuscita.',
'profiles.sectionTitle' => 'Profili',
'profiles.summarySingle' => 'Aggiungi profili per combinare utenti gestiti e identità locali',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profili · attivo: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profili',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Rimuovere la connessione?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Rimuovi l\'accesso di ${displayName} a ${connectionLabel}. Gli altri profili lo mantengono.',
'profiles.deleteProfileTitle' => 'Eliminare il profilo?',
@@ -2775,7 +2786,6 @@ extension on TranslationsIt {
'companionRemote.remote.subtitles' => 'Sottotitoli',
'companionRemote.remote.audio' => 'Audio',
'companionRemote.remote.searchHint' => 'Cerca sul desktop...',
'videoSettings.playbackSettings' => 'Impostazioni di riproduzione',
'videoSettings.playbackSpeed' => 'Velocità di riproduzione',
'videoSettings.sleepTimer' => 'Timer di spegnimento',
'videoSettings.audioSync' => 'Sincronizzazione audio',
@@ -2816,13 +2826,13 @@ extension on TranslationsIt {
'metadataEdit.poster' => 'Poster',
'metadataEdit.background' => 'Sfondo',
'metadataEdit.logo' => 'Logo',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => 'Immagine quadrata',
'metadataEdit.selectPoster' => 'Seleziona poster',
'metadataEdit.selectBackground' => 'Seleziona sfondo',
'metadataEdit.selectLogo' => 'Seleziona logo',
'metadataEdit.selectSquareArt' => 'Seleziona immagine quadrata',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Da URL',
'metadataEdit.uploadFile' => 'Carica file',
'metadataEdit.enterImageUrl' => 'Inserisci URL immagine',
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsJa extends TranslationsSettingsEn {
@override String get displaySwitchDelay => 'ディスプレイ切り替え遅延';
@override String get tunneledPlayback => 'トンネル再生';
@override String get tunneledPlaybackDescription => '動画トンネリングを使用します。HDR再生で画面が黒くなる場合は無効にしてください。';
@override String get dvConversionMode => 'Dolby Vision 変換';
@override String get dvConversionModeDescription => 'ExoPlayer が Dolby Vision Profile 7 ファイルを処理する方法を選択します。';
@override String get dvConversionAuto => '自動';
@override String get dvConversionNative => 'ネイティブ / 無効';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => 'アプリ起動時にプロフィールを確認';
@override String get requireProfileSelectionOnOpenDescription => 'アプリを開くたびにプロフィール選択を表示';
@override String get forceTvMode => 'TVモードを強制';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsJa extends TranslationsVideoControlsEn {
@override String get nextChapterButton => '次のチャプター';
@override String get muteButton => 'ミュート';
@override String get unmuteButton => 'ミュート解除';
@override String get settingsButton => '動画設定';
@override String get settingsButton => '再生設定';
@override String get tracksButton => '音声と字幕';
@override String get chaptersButton => 'チャプター';
@override String get versionsButton => '動画バージョン';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsJa extends TranslationsVideoSettingsEn {
final TranslationsJa _root; // ignore: unused_field
// Translations
@override String get playbackSettings => '再生設定';
@override String get playbackSpeed => '再生速度';
@override String get sleepTimer => 'スリープタイマー';
@override String get audioSync => '音声同期';
@@ -2033,6 +2038,12 @@ extension on TranslationsJa {
'settings.displaySwitchDelay' => 'ディスプレイ切り替え遅延',
'settings.tunneledPlayback' => 'トンネル再生',
'settings.tunneledPlaybackDescription' => '動画トンネリングを使用します。HDR再生で画面が黒くなる場合は無効にしてください。',
'settings.dvConversionMode' => 'Dolby Vision 変換',
'settings.dvConversionModeDescription' => 'ExoPlayer が Dolby Vision Profile 7 ファイルを処理する方法を選択します。',
'settings.dvConversionAuto' => '自動',
'settings.dvConversionNative' => 'ネイティブ / 無効',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => 'アプリ起動時にプロフィールを確認',
'settings.requireProfileSelectionOnOpenDescription' => 'アプリを開くたびにプロフィール選択を表示',
'settings.forceTvMode' => 'TVモードを強制',
@@ -2175,7 +2186,7 @@ extension on TranslationsJa {
'videoControls.nextChapterButton' => '次のチャプター',
'videoControls.muteButton' => 'ミュート',
'videoControls.unmuteButton' => 'ミュート解除',
'videoControls.settingsButton' => '動画設定',
'videoControls.settingsButton' => '再生設定',
'videoControls.tracksButton' => '音声と字幕',
'videoControls.chaptersButton' => 'チャプター',
'videoControls.versionsButton' => '動画バージョン',
@@ -2301,14 +2312,14 @@ extension on TranslationsJa {
'profiles.signOut' => 'サインアウト',
'profiles.signOutPlexTitle' => 'Plex からサインアウトしますか?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => '${displayName}とすべてのPlex Homeユーザーを削除しますか?いつでも再サインインできます。',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Plex からサインアウトしました。',
'profiles.signOutFailed' => 'サインアウトに失敗しました。',
'profiles.sectionTitle' => 'プロファイル',
'profiles.summarySingle' => 'プロファイルを追加して、管理対象ユーザーとローカルIDを混在させます',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count}個のプロファイル · アクティブ: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count}個のプロファイル',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => '接続を削除しますか?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => '${displayName}の${connectionLabel}へのアクセスを削除します。他のプロフィールには残ります。',
'profiles.deleteProfileTitle' => 'プロファイルを削除しますか?',
@@ -2775,7 +2786,6 @@ extension on TranslationsJa {
'companionRemote.remote.subtitles' => '字幕',
'companionRemote.remote.audio' => '音声',
'companionRemote.remote.searchHint' => 'デスクトップで検索...',
'videoSettings.playbackSettings' => '再生設定',
'videoSettings.playbackSpeed' => '再生速度',
'videoSettings.sleepTimer' => 'スリープタイマー',
'videoSettings.audioSync' => '音声同期',
@@ -2816,13 +2826,13 @@ extension on TranslationsJa {
'metadataEdit.poster' => 'ポスター',
'metadataEdit.background' => '背景',
'metadataEdit.logo' => 'ロゴ',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => '正方形アート',
'metadataEdit.selectPoster' => 'ポスターを選択',
'metadataEdit.selectBackground' => '背景を選択',
'metadataEdit.selectLogo' => 'ロゴを選択',
'metadataEdit.selectSquareArt' => '正方形アートを選択',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'URLから',
'metadataEdit.uploadFile' => 'ファイルをアップロード',
'metadataEdit.enterImageUrl' => '画像URLを入力',
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsKo extends TranslationsSettingsEn {
@override String get displaySwitchDelay => '디스플레이 전환 지연';
@override String get tunneledPlayback => '터널 재생';
@override String get tunneledPlaybackDescription => '비디오 터널링을 사용합니다. HDR 재생 시 검은 화면이 보이면 비활성화하세요.';
@override String get dvConversionMode => 'Dolby Vision 변환';
@override String get dvConversionModeDescription => 'ExoPlayer가 Dolby Vision Profile 7 파일을 처리하는 방식을 선택합니다.';
@override String get dvConversionAuto => '자동';
@override String get dvConversionNative => '네이티브 / 비활성화';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => '앱 실행 시 프로필 선택';
@override String get requireProfileSelectionOnOpenDescription => '앱을 열 때마다 프로필 선택 화면을 표시합니다';
@override String get forceTvMode => 'TV 모드 강제 사용';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsKo extends TranslationsVideoControlsEn {
@override String get nextChapterButton => '다음 챕터';
@override String get muteButton => '음소거';
@override String get unmuteButton => '음소거 해제';
@override String get settingsButton => '동영상 설정';
@override String get settingsButton => '재생 설정';
@override String get tracksButton => '오디오 및 자막';
@override String get chaptersButton => '챕터';
@override String get versionsButton => '동영상 버전';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsKo extends TranslationsVideoSettingsEn {
final TranslationsKo _root; // ignore: unused_field
// Translations
@override String get playbackSettings => '재생 설정';
@override String get playbackSpeed => '재생 속도';
@override String get sleepTimer => '취침 타이머';
@override String get audioSync => '오디오 동기화';
@@ -2033,6 +2038,12 @@ extension on TranslationsKo {
'settings.displaySwitchDelay' => '디스플레이 전환 지연',
'settings.tunneledPlayback' => '터널 재생',
'settings.tunneledPlaybackDescription' => '비디오 터널링을 사용합니다. HDR 재생 시 검은 화면이 보이면 비활성화하세요.',
'settings.dvConversionMode' => 'Dolby Vision 변환',
'settings.dvConversionModeDescription' => 'ExoPlayer가 Dolby Vision Profile 7 파일을 처리하는 방식을 선택합니다.',
'settings.dvConversionAuto' => '자동',
'settings.dvConversionNative' => '네이티브 / 비활성화',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => '앱 실행 시 프로필 선택',
'settings.requireProfileSelectionOnOpenDescription' => '앱을 열 때마다 프로필 선택 화면을 표시합니다',
'settings.forceTvMode' => 'TV 모드 강제 사용',
@@ -2175,7 +2186,7 @@ extension on TranslationsKo {
'videoControls.nextChapterButton' => '다음 챕터',
'videoControls.muteButton' => '음소거',
'videoControls.unmuteButton' => '음소거 해제',
'videoControls.settingsButton' => '동영상 설정',
'videoControls.settingsButton' => '재생 설정',
'videoControls.tracksButton' => '오디오 및 자막',
'videoControls.chaptersButton' => '챕터',
'videoControls.versionsButton' => '동영상 버전',
@@ -2301,14 +2312,14 @@ extension on TranslationsKo {
'profiles.signOut' => '로그아웃',
'profiles.signOutPlexTitle' => 'Plex에서 로그아웃하시겠습니까?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => '${displayName} 및 모든 Plex Home 사용자를 제거할까요? 언제든 다시 로그인할 수 있습니다.',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Plex에서 로그아웃되었습니다.',
'profiles.signOutFailed' => '로그아웃에 실패했습니다.',
'profiles.sectionTitle' => '프로필',
'profiles.summarySingle' => '관리되는 사용자와 로컬 ID를 혼합하려면 프로필을 추가하세요',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count}개 프로필 · 활성: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count}개 프로필',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => '연결을 제거하시겠습니까?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => '${displayName}의 ${connectionLabel} 접근 권한을 제거합니다. 다른 프로필에는 유지됩니다.',
'profiles.deleteProfileTitle' => '프로필을 삭제하시겠습니까?',
@@ -2775,7 +2786,6 @@ extension on TranslationsKo {
'companionRemote.remote.subtitles' => '자막',
'companionRemote.remote.audio' => '오디오',
'companionRemote.remote.searchHint' => '데스크톱에서 검색...',
'videoSettings.playbackSettings' => '재생 설정',
'videoSettings.playbackSpeed' => '재생 속도',
'videoSettings.sleepTimer' => '취침 타이머',
'videoSettings.audioSync' => '오디오 동기화',
@@ -2816,13 +2826,13 @@ extension on TranslationsKo {
'metadataEdit.poster' => '포스터',
'metadataEdit.background' => '배경',
'metadataEdit.logo' => '로고',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => '정사각형 아트',
'metadataEdit.selectPoster' => '포스터 선택',
'metadataEdit.selectBackground' => '배경 선택',
'metadataEdit.selectLogo' => '로고 선택',
'metadataEdit.selectSquareArt' => '정사각형 아트 선택',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'URL에서',
'metadataEdit.uploadFile' => '파일 업로드',
'metadataEdit.enterImageUrl' => '이미지 URL 입력',
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsNb extends TranslationsSettingsEn {
@override String get displaySwitchDelay => 'Forsinkelse ved skjermbytte';
@override String get tunneledPlayback => 'Tunnelert avspilling';
@override String get tunneledPlaybackDescription => 'Bruk videotunneling. Slå av hvis HDR-avspilling viser svart video.';
@override String get dvConversionMode => 'Dolby Vision-konvertering';
@override String get dvConversionModeDescription => 'Velg hvordan ExoPlayer håndterer Dolby Vision Profile 7-filer.';
@override String get dvConversionAuto => 'Auto';
@override String get dvConversionNative => 'Innebygd / deaktivert';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => 'Spør om profil ved appåpning';
@override String get requireProfileSelectionOnOpenDescription => 'Vis profilvalg hver gang appen åpnes';
@override String get forceTvMode => 'Tving TV-modus';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsNb extends TranslationsVideoControlsEn {
@override String get nextChapterButton => 'Neste kapittel';
@override String get muteButton => 'Demp';
@override String get unmuteButton => 'Opphev demping';
@override String get settingsButton => 'Videoinnstillinger';
@override String get settingsButton => 'Avspillingsinnstillinger';
@override String get tracksButton => 'Lyd og undertekster';
@override String get chaptersButton => 'Kapitler';
@override String get versionsButton => 'Videoversjoner';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsNb extends TranslationsVideoSettingsEn {
final TranslationsNb _root; // ignore: unused_field
// Translations
@override String get playbackSettings => 'Avspillingsinnstillinger';
@override String get playbackSpeed => 'Avspillingshastighet';
@override String get sleepTimer => 'Søvntimer';
@override String get audioSync => 'Lydsynkronisering';
@@ -2033,6 +2038,12 @@ extension on TranslationsNb {
'settings.displaySwitchDelay' => 'Forsinkelse ved skjermbytte',
'settings.tunneledPlayback' => 'Tunnelert avspilling',
'settings.tunneledPlaybackDescription' => 'Bruk videotunneling. Slå av hvis HDR-avspilling viser svart video.',
'settings.dvConversionMode' => 'Dolby Vision-konvertering',
'settings.dvConversionModeDescription' => 'Velg hvordan ExoPlayer håndterer Dolby Vision Profile 7-filer.',
'settings.dvConversionAuto' => 'Auto',
'settings.dvConversionNative' => 'Innebygd / deaktivert',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => 'Spør om profil ved appåpning',
'settings.requireProfileSelectionOnOpenDescription' => 'Vis profilvalg hver gang appen åpnes',
'settings.forceTvMode' => 'Tving TV-modus',
@@ -2175,7 +2186,7 @@ extension on TranslationsNb {
'videoControls.nextChapterButton' => 'Neste kapittel',
'videoControls.muteButton' => 'Demp',
'videoControls.unmuteButton' => 'Opphev demping',
'videoControls.settingsButton' => 'Videoinnstillinger',
'videoControls.settingsButton' => 'Avspillingsinnstillinger',
'videoControls.tracksButton' => 'Lyd og undertekster',
'videoControls.chaptersButton' => 'Kapitler',
'videoControls.versionsButton' => 'Videoversjoner',
@@ -2301,14 +2312,14 @@ extension on TranslationsNb {
'profiles.signOut' => 'Logg ut',
'profiles.signOutPlexTitle' => 'Logge ut av Plex?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => 'Fjerne ${displayName} og alle Plex Home-brukere? Du kan logge inn igjen når som helst.',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Logget ut av Plex.',
'profiles.signOutFailed' => 'Utlogging mislyktes.',
'profiles.sectionTitle' => 'Profiler',
'profiles.summarySingle' => 'Legg til profiler for å blande administrerte brukere og lokale identiteter',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profiler · aktiv: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profiler',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Fjerne tilkobling?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Fjern ${displayName}s tilgang til ${connectionLabel}. Andre profiler beholder den.',
'profiles.deleteProfileTitle' => 'Slette profil?',
@@ -2775,7 +2786,6 @@ extension on TranslationsNb {
'companionRemote.remote.subtitles' => 'Undertekster',
'companionRemote.remote.audio' => 'Lyd',
'companionRemote.remote.searchHint' => 'Søk på stasjonær...',
'videoSettings.playbackSettings' => 'Avspillingsinnstillinger',
'videoSettings.playbackSpeed' => 'Avspillingshastighet',
'videoSettings.sleepTimer' => 'Søvntimer',
'videoSettings.audioSync' => 'Lydsynkronisering',
@@ -2816,13 +2826,13 @@ extension on TranslationsNb {
'metadataEdit.poster' => 'Plakat',
'metadataEdit.background' => 'Bakgrunn',
'metadataEdit.logo' => 'Logo',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => 'Kvadratisk bilde',
'metadataEdit.selectPoster' => 'Velg plakat',
'metadataEdit.selectBackground' => 'Velg bakgrunn',
'metadataEdit.selectLogo' => 'Velg logo',
'metadataEdit.selectSquareArt' => 'Velg kvadratisk bilde',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Fra URL',
'metadataEdit.uploadFile' => 'Last opp fil',
'metadataEdit.enterImageUrl' => 'Skriv inn bilde-URL',
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsNl extends TranslationsSettingsEn {
@override String get displaySwitchDelay => 'Vertraging bij schermwisseling';
@override String get tunneledPlayback => 'Getunnelde weergave';
@override String get tunneledPlaybackDescription => 'Gebruik videotunneling. Schakel uit als HDR-afspelen zwart beeld geeft.';
@override String get dvConversionMode => 'Dolby Vision-conversie';
@override String get dvConversionModeDescription => 'Kies hoe ExoPlayer Dolby Vision Profile 7-bestanden verwerkt.';
@override String get dvConversionAuto => 'Auto';
@override String get dvConversionNative => 'Native / uitgeschakeld';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => 'Vraag om profiel bij openen';
@override String get requireProfileSelectionOnOpenDescription => 'Toon profielselectie telkens wanneer de app wordt geopend';
@override String get forceTvMode => 'TV-modus forceren';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsNl extends TranslationsVideoControlsEn {
@override String get nextChapterButton => 'Volgend hoofdstuk';
@override String get muteButton => 'Dempen';
@override String get unmuteButton => 'Dempen opheffen';
@override String get settingsButton => 'Video-instellingen';
@override String get settingsButton => 'Afspeelinstellingen';
@override String get tracksButton => 'Audio en ondertitels';
@override String get chaptersButton => 'Hoofdstukken';
@override String get versionsButton => 'Videoversies';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsNl extends TranslationsVideoSettingsEn {
final TranslationsNl _root; // ignore: unused_field
// Translations
@override String get playbackSettings => 'Afspeelinstellingen';
@override String get playbackSpeed => 'Afspeelsnelheid';
@override String get sleepTimer => 'Slaaptimer';
@override String get audioSync => 'Audio synchronisatie';
@@ -2033,6 +2038,12 @@ extension on TranslationsNl {
'settings.displaySwitchDelay' => 'Vertraging bij schermwisseling',
'settings.tunneledPlayback' => 'Getunnelde weergave',
'settings.tunneledPlaybackDescription' => 'Gebruik videotunneling. Schakel uit als HDR-afspelen zwart beeld geeft.',
'settings.dvConversionMode' => 'Dolby Vision-conversie',
'settings.dvConversionModeDescription' => 'Kies hoe ExoPlayer Dolby Vision Profile 7-bestanden verwerkt.',
'settings.dvConversionAuto' => 'Auto',
'settings.dvConversionNative' => 'Native / uitgeschakeld',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => 'Vraag om profiel bij openen',
'settings.requireProfileSelectionOnOpenDescription' => 'Toon profielselectie telkens wanneer de app wordt geopend',
'settings.forceTvMode' => 'TV-modus forceren',
@@ -2175,7 +2186,7 @@ extension on TranslationsNl {
'videoControls.nextChapterButton' => 'Volgend hoofdstuk',
'videoControls.muteButton' => 'Dempen',
'videoControls.unmuteButton' => 'Dempen opheffen',
'videoControls.settingsButton' => 'Video-instellingen',
'videoControls.settingsButton' => 'Afspeelinstellingen',
'videoControls.tracksButton' => 'Audio en ondertitels',
'videoControls.chaptersButton' => 'Hoofdstukken',
'videoControls.versionsButton' => 'Videoversies',
@@ -2301,14 +2312,14 @@ extension on TranslationsNl {
'profiles.signOut' => 'Afmelden',
'profiles.signOutPlexTitle' => 'Afmelden bij Plex?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => '${displayName} en alle Plex Home-gebruikers verwijderen? Je kunt altijd opnieuw inloggen.',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Afgemeld bij Plex.',
'profiles.signOutFailed' => 'Afmelden mislukt.',
'profiles.sectionTitle' => 'Profielen',
'profiles.summarySingle' => 'Voeg profielen toe om beheerde gebruikers en lokale identiteiten te combineren',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profielen · actief: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profielen',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Verbinding verwijderen?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Verwijder ${displayName}s toegang tot ${connectionLabel}. Andere profielen behouden die.',
'profiles.deleteProfileTitle' => 'Profiel verwijderen?',
@@ -2775,7 +2786,6 @@ extension on TranslationsNl {
'companionRemote.remote.subtitles' => 'Ondertitels',
'companionRemote.remote.audio' => 'Audio',
'companionRemote.remote.searchHint' => 'Zoeken op desktop...',
'videoSettings.playbackSettings' => 'Afspeelinstellingen',
'videoSettings.playbackSpeed' => 'Afspeelsnelheid',
'videoSettings.sleepTimer' => 'Slaaptimer',
'videoSettings.audioSync' => 'Audio synchronisatie',
@@ -2816,13 +2826,13 @@ extension on TranslationsNl {
'metadataEdit.poster' => 'Poster',
'metadataEdit.background' => 'Achtergrond',
'metadataEdit.logo' => 'Logo',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => 'Vierkante afbeelding',
'metadataEdit.selectPoster' => 'Poster selecteren',
'metadataEdit.selectBackground' => 'Achtergrond selecteren',
'metadataEdit.selectLogo' => 'Logo selecteren',
'metadataEdit.selectSquareArt' => 'Vierkante afbeelding selecteren',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Vanaf URL',
'metadataEdit.uploadFile' => 'Bestand uploaden',
'metadataEdit.enterImageUrl' => 'Voer afbeeldings-URL in',
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsPl extends TranslationsSettingsEn {
@override String get displaySwitchDelay => 'Opóźnienie przełączania ekranu';
@override String get tunneledPlayback => 'Tunelowane odtwarzanie';
@override String get tunneledPlaybackDescription => 'Użyj tunelowania wideo. Wyłącz, jeśli HDR pokazuje czarny obraz.';
@override String get dvConversionMode => 'Konwersja Dolby Vision';
@override String get dvConversionModeDescription => 'Wybierz, jak ExoPlayer obsługuje pliki Dolby Vision Profile 7.';
@override String get dvConversionAuto => 'Automatycznie';
@override String get dvConversionNative => 'Natywnie / wyłączone';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => 'Pytaj o profil przy otwarciu aplikacji';
@override String get requireProfileSelectionOnOpenDescription => 'Pokaż wybór profilu za każdym razem, gdy aplikacja jest otwierana';
@override String get forceTvMode => 'Wymuś tryb TV';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsPl extends TranslationsVideoControlsEn {
@override String get nextChapterButton => 'Następny rozdział';
@override String get muteButton => 'Wycisz';
@override String get unmuteButton => 'Wyłącz wyciszenie';
@override String get settingsButton => 'Ustawienia wideo';
@override String get settingsButton => 'Ustawienia odtwarzania';
@override String get tracksButton => 'Audio i napisy';
@override String get chaptersButton => 'Rozdziały';
@override String get versionsButton => 'Wersje wideo';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsPl extends TranslationsVideoSettingsEn {
final TranslationsPl _root; // ignore: unused_field
// Translations
@override String get playbackSettings => 'Ustawienia odtwarzania';
@override String get playbackSpeed => 'Prędkość odtwarzania';
@override String get sleepTimer => 'Wyłącznik czasowy';
@override String get audioSync => 'Synchronizacja audio';
@@ -2033,6 +2038,12 @@ extension on TranslationsPl {
'settings.displaySwitchDelay' => 'Opóźnienie przełączania ekranu',
'settings.tunneledPlayback' => 'Tunelowane odtwarzanie',
'settings.tunneledPlaybackDescription' => 'Użyj tunelowania wideo. Wyłącz, jeśli HDR pokazuje czarny obraz.',
'settings.dvConversionMode' => 'Konwersja Dolby Vision',
'settings.dvConversionModeDescription' => 'Wybierz, jak ExoPlayer obsługuje pliki Dolby Vision Profile 7.',
'settings.dvConversionAuto' => 'Automatycznie',
'settings.dvConversionNative' => 'Natywnie / wyłączone',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => 'Pytaj o profil przy otwarciu aplikacji',
'settings.requireProfileSelectionOnOpenDescription' => 'Pokaż wybór profilu za każdym razem, gdy aplikacja jest otwierana',
'settings.forceTvMode' => 'Wymuś tryb TV',
@@ -2175,7 +2186,7 @@ extension on TranslationsPl {
'videoControls.nextChapterButton' => 'Następny rozdział',
'videoControls.muteButton' => 'Wycisz',
'videoControls.unmuteButton' => 'Wyłącz wyciszenie',
'videoControls.settingsButton' => 'Ustawienia wideo',
'videoControls.settingsButton' => 'Ustawienia odtwarzania',
'videoControls.tracksButton' => 'Audio i napisy',
'videoControls.chaptersButton' => 'Rozdziały',
'videoControls.versionsButton' => 'Wersje wideo',
@@ -2301,14 +2312,14 @@ extension on TranslationsPl {
'profiles.signOut' => 'Wyloguj się',
'profiles.signOutPlexTitle' => 'Wylogować się z Plex?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => 'Usunąć ${displayName} i wszystkich użytkowników Plex Home? Możesz zalogować się ponownie w każdej chwili.',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Wylogowano z Plex.',
'profiles.signOutFailed' => 'Wylogowanie nie powiodło się.',
'profiles.sectionTitle' => 'Profile',
'profiles.summarySingle' => 'Dodaj profile, aby łączyć zarządzanych użytkowników i tożsamości lokalne',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profili · aktywny: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profili',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Usunąć połączenie?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Usuń dostęp ${displayName} do ${connectionLabel}. Inne profile go zachowają.',
'profiles.deleteProfileTitle' => 'Usunąć profil?',
@@ -2775,7 +2786,6 @@ extension on TranslationsPl {
'companionRemote.remote.subtitles' => 'Napisy',
'companionRemote.remote.audio' => 'Audio',
'companionRemote.remote.searchHint' => 'Szukaj na komputerze...',
'videoSettings.playbackSettings' => 'Ustawienia odtwarzania',
'videoSettings.playbackSpeed' => 'Prędkość odtwarzania',
'videoSettings.sleepTimer' => 'Wyłącznik czasowy',
'videoSettings.audioSync' => 'Synchronizacja audio',
@@ -2816,13 +2826,13 @@ extension on TranslationsPl {
'metadataEdit.poster' => 'Plakat',
'metadataEdit.background' => 'Tło',
'metadataEdit.logo' => 'Logo',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => 'Kwadratowy obraz',
'metadataEdit.selectPoster' => 'Wybierz plakat',
'metadataEdit.selectBackground' => 'Wybierz tło',
'metadataEdit.selectLogo' => 'Wybierz logo',
'metadataEdit.selectSquareArt' => 'Wybierz kwadratowy obraz',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Z URL',
'metadataEdit.uploadFile' => 'Prześlij plik',
'metadataEdit.enterImageUrl' => 'Wprowadź URL obrazu',
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsPt extends TranslationsSettingsEn {
@override String get displaySwitchDelay => 'Atraso na Troca de Tela';
@override String get tunneledPlayback => 'Reprodução Tunelizada';
@override String get tunneledPlaybackDescription => 'Usar tunelamento de vídeo. Desative se HDR mostrar vídeo preto.';
@override String get dvConversionMode => 'Conversão Dolby Vision';
@override String get dvConversionModeDescription => 'Escolha como o ExoPlayer lida com arquivos Dolby Vision Profile 7.';
@override String get dvConversionAuto => 'Automático';
@override String get dvConversionNative => 'Nativo / desativado';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => 'Pedir perfil ao abrir o app';
@override String get requireProfileSelectionOnOpenDescription => 'Mostrar seleção de perfil toda vez que o app for aberto';
@override String get forceTvMode => 'Forçar modo TV';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsPt extends TranslationsVideoControlsEn {
@override String get nextChapterButton => 'Próximo capítulo';
@override String get muteButton => 'Silenciar';
@override String get unmuteButton => 'Ativar som';
@override String get settingsButton => 'Configurações de vídeo';
@override String get settingsButton => 'Configurações de Reprodução';
@override String get tracksButton => 'Áudio e Legendas';
@override String get chaptersButton => 'Capítulos';
@override String get versionsButton => 'Versões do vídeo';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsPt extends TranslationsVideoSettingsEn {
final TranslationsPt _root; // ignore: unused_field
// Translations
@override String get playbackSettings => 'Configurações de Reprodução';
@override String get playbackSpeed => 'Velocidade de Reprodução';
@override String get sleepTimer => 'Timer de Sono';
@override String get audioSync => 'Sincronia de Áudio';
@@ -2033,6 +2038,12 @@ extension on TranslationsPt {
'settings.displaySwitchDelay' => 'Atraso na Troca de Tela',
'settings.tunneledPlayback' => 'Reprodução Tunelizada',
'settings.tunneledPlaybackDescription' => 'Usar tunelamento de vídeo. Desative se HDR mostrar vídeo preto.',
'settings.dvConversionMode' => 'Conversão Dolby Vision',
'settings.dvConversionModeDescription' => 'Escolha como o ExoPlayer lida com arquivos Dolby Vision Profile 7.',
'settings.dvConversionAuto' => 'Automático',
'settings.dvConversionNative' => 'Nativo / desativado',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => 'Pedir perfil ao abrir o app',
'settings.requireProfileSelectionOnOpenDescription' => 'Mostrar seleção de perfil toda vez que o app for aberto',
'settings.forceTvMode' => 'Forçar modo TV',
@@ -2175,7 +2186,7 @@ extension on TranslationsPt {
'videoControls.nextChapterButton' => 'Próximo capítulo',
'videoControls.muteButton' => 'Silenciar',
'videoControls.unmuteButton' => 'Ativar som',
'videoControls.settingsButton' => 'Configurações de vídeo',
'videoControls.settingsButton' => 'Configurações de Reprodução',
'videoControls.tracksButton' => 'Áudio e Legendas',
'videoControls.chaptersButton' => 'Capítulos',
'videoControls.versionsButton' => 'Versões do vídeo',
@@ -2301,14 +2312,14 @@ extension on TranslationsPt {
'profiles.signOut' => 'Sair',
'profiles.signOutPlexTitle' => 'Sair do Plex?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => 'Remover ${displayName} e todos os usuários Plex Home? Você pode entrar novamente quando quiser.',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Saiu do Plex.',
'profiles.signOutFailed' => 'Falha ao sair.',
'profiles.sectionTitle' => 'Perfis',
'profiles.summarySingle' => 'Adicione perfis para mesclar usuários gerenciados e identidades locais',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} perfis · ativo: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} perfis',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Remover conexão?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Remover acesso de ${displayName} a ${connectionLabel}. Outros perfis mantêm o acesso.',
'profiles.deleteProfileTitle' => 'Excluir perfil?',
@@ -2775,7 +2786,6 @@ extension on TranslationsPt {
'companionRemote.remote.subtitles' => 'Legendas',
'companionRemote.remote.audio' => 'Áudio',
'companionRemote.remote.searchHint' => 'Buscar no desktop...',
'videoSettings.playbackSettings' => 'Configurações de Reprodução',
'videoSettings.playbackSpeed' => 'Velocidade de Reprodução',
'videoSettings.sleepTimer' => 'Timer de Sono',
'videoSettings.audioSync' => 'Sincronia de Áudio',
@@ -2816,13 +2826,13 @@ extension on TranslationsPt {
'metadataEdit.poster' => 'Poster',
'metadataEdit.background' => 'Plano de Fundo',
'metadataEdit.logo' => 'Logo',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => 'Imagem Quadrada',
'metadataEdit.selectPoster' => 'Selecionar Poster',
'metadataEdit.selectBackground' => 'Selecionar Plano de Fundo',
'metadataEdit.selectLogo' => 'Selecionar Logo',
'metadataEdit.selectSquareArt' => 'Selecionar Imagem Quadrada',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Da URL',
'metadataEdit.uploadFile' => 'Enviar Arquivo',
'metadataEdit.enterImageUrl' => 'Insira a URL da imagem',
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsRu extends TranslationsSettingsEn {
@override String get displaySwitchDelay => 'Задержка переключения дисплея';
@override String get tunneledPlayback => 'Туннельное воспроизведение';
@override String get tunneledPlaybackDescription => 'Использовать видеотуннелирование. Отключите, если HDR показывает черный экран.';
@override String get dvConversionMode => 'Преобразование Dolby Vision';
@override String get dvConversionModeDescription => 'Выберите, как ExoPlayer обрабатывает файлы Dolby Vision Profile 7.';
@override String get dvConversionAuto => 'Авто';
@override String get dvConversionNative => 'Нативно / отключено';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => 'Запрашивать профиль при запуске';
@override String get requireProfileSelectionOnOpenDescription => 'Показывать выбор профиля при каждом открытии приложения';
@override String get forceTvMode => 'Принудительный режим ТВ';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsRu extends TranslationsVideoControlsEn {
@override String get nextChapterButton => 'Следующая глава';
@override String get muteButton => 'Без звука';
@override String get unmuteButton => 'Включить звук';
@override String get settingsButton => 'Настройки видео';
@override String get settingsButton => 'Настройки воспроизведения';
@override String get tracksButton => 'Аудио и субтитры';
@override String get chaptersButton => 'Главы';
@override String get versionsButton => 'Версии видео';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsRu extends TranslationsVideoSettingsEn {
final TranslationsRu _root; // ignore: unused_field
// Translations
@override String get playbackSettings => 'Настройки воспроизведения';
@override String get playbackSpeed => 'Скорость воспроизведения';
@override String get sleepTimer => 'Таймер сна';
@override String get audioSync => 'Синхронизация аудио';
@@ -2033,6 +2038,12 @@ extension on TranslationsRu {
'settings.displaySwitchDelay' => 'Задержка переключения дисплея',
'settings.tunneledPlayback' => 'Туннельное воспроизведение',
'settings.tunneledPlaybackDescription' => 'Использовать видеотуннелирование. Отключите, если HDR показывает черный экран.',
'settings.dvConversionMode' => 'Преобразование Dolby Vision',
'settings.dvConversionModeDescription' => 'Выберите, как ExoPlayer обрабатывает файлы Dolby Vision Profile 7.',
'settings.dvConversionAuto' => 'Авто',
'settings.dvConversionNative' => 'Нативно / отключено',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => 'Запрашивать профиль при запуске',
'settings.requireProfileSelectionOnOpenDescription' => 'Показывать выбор профиля при каждом открытии приложения',
'settings.forceTvMode' => 'Принудительный режим ТВ',
@@ -2175,7 +2186,7 @@ extension on TranslationsRu {
'videoControls.nextChapterButton' => 'Следующая глава',
'videoControls.muteButton' => 'Без звука',
'videoControls.unmuteButton' => 'Включить звук',
'videoControls.settingsButton' => 'Настройки видео',
'videoControls.settingsButton' => 'Настройки воспроизведения',
'videoControls.tracksButton' => 'Аудио и субтитры',
'videoControls.chaptersButton' => 'Главы',
'videoControls.versionsButton' => 'Версии видео',
@@ -2301,14 +2312,14 @@ extension on TranslationsRu {
'profiles.signOut' => 'Выйти',
'profiles.signOutPlexTitle' => 'Выйти из Plex?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => 'Удалить ${displayName} и всех пользователей Plex Home? Вы сможете войти снова в любое время.',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Вы вышли из Plex.',
'profiles.signOutFailed' => 'Не удалось выйти.',
'profiles.sectionTitle' => 'Профили',
'profiles.summarySingle' => 'Добавьте профили, чтобы смешать управляемых пользователей и локальные идентификаторы',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} профилей · активный: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} профилей',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Удалить соединение?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Удалить доступ ${displayName} к ${connectionLabel}. У других профилей он останется.',
'profiles.deleteProfileTitle' => 'Удалить профиль?',
@@ -2775,7 +2786,6 @@ extension on TranslationsRu {
'companionRemote.remote.subtitles' => 'Субтитры',
'companionRemote.remote.audio' => 'Аудио',
'companionRemote.remote.searchHint' => 'Поиск на десктопе...',
'videoSettings.playbackSettings' => 'Настройки воспроизведения',
'videoSettings.playbackSpeed' => 'Скорость воспроизведения',
'videoSettings.sleepTimer' => 'Таймер сна',
'videoSettings.audioSync' => 'Синхронизация аудио',
@@ -2816,13 +2826,13 @@ extension on TranslationsRu {
'metadataEdit.poster' => 'Постер',
'metadataEdit.background' => 'Фон',
'metadataEdit.logo' => 'Логотип',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => 'Квадратное изображение',
'metadataEdit.selectPoster' => 'Выбрать постер',
'metadataEdit.selectBackground' => 'Выбрать фон',
'metadataEdit.selectLogo' => 'Выбрать логотип',
'metadataEdit.selectSquareArt' => 'Выбрать квадратное изображение',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'По URL',
'metadataEdit.uploadFile' => 'Загрузить файл',
'metadataEdit.enterImageUrl' => 'Введите URL изображения',
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsSv extends TranslationsSettingsEn {
@override String get displaySwitchDelay => 'Fördröjning vid skärmbyte';
@override String get tunneledPlayback => 'Tunneluppspelning';
@override String get tunneledPlaybackDescription => 'Använd videotunnling. Inaktivera om HDR-uppspelning visar svart video.';
@override String get dvConversionMode => 'Dolby Vision-konvertering';
@override String get dvConversionModeDescription => 'Välj hur ExoPlayer hanterar Dolby Vision Profile 7-filer.';
@override String get dvConversionAuto => 'Auto';
@override String get dvConversionNative => 'Inbyggt / inaktiverat';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => 'Fråga efter profil vid appstart';
@override String get requireProfileSelectionOnOpenDescription => 'Visa profilval varje gång appen öppnas';
@override String get forceTvMode => 'Tvinga TV-läge';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsSv extends TranslationsVideoControlsEn {
@override String get nextChapterButton => 'Nästa kapitel';
@override String get muteButton => 'Tysta';
@override String get unmuteButton => 'Slå på ljud';
@override String get settingsButton => 'Videoinställningar';
@override String get settingsButton => 'Uppspelningsinställningar';
@override String get tracksButton => 'Ljud och undertexter';
@override String get chaptersButton => 'Kapitel';
@override String get versionsButton => 'Videoversioner';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsSv extends TranslationsVideoSettingsEn {
final TranslationsSv _root; // ignore: unused_field
// Translations
@override String get playbackSettings => 'Uppspelningsinställningar';
@override String get playbackSpeed => 'Uppspelningshastighet';
@override String get sleepTimer => 'Sovtimer';
@override String get audioSync => 'Ljudsynkronisering';
@@ -2033,6 +2038,12 @@ extension on TranslationsSv {
'settings.displaySwitchDelay' => 'Fördröjning vid skärmbyte',
'settings.tunneledPlayback' => 'Tunneluppspelning',
'settings.tunneledPlaybackDescription' => 'Använd videotunnling. Inaktivera om HDR-uppspelning visar svart video.',
'settings.dvConversionMode' => 'Dolby Vision-konvertering',
'settings.dvConversionModeDescription' => 'Välj hur ExoPlayer hanterar Dolby Vision Profile 7-filer.',
'settings.dvConversionAuto' => 'Auto',
'settings.dvConversionNative' => 'Inbyggt / inaktiverat',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => 'Fråga efter profil vid appstart',
'settings.requireProfileSelectionOnOpenDescription' => 'Visa profilval varje gång appen öppnas',
'settings.forceTvMode' => 'Tvinga TV-läge',
@@ -2175,7 +2186,7 @@ extension on TranslationsSv {
'videoControls.nextChapterButton' => 'Nästa kapitel',
'videoControls.muteButton' => 'Tysta',
'videoControls.unmuteButton' => 'Slå på ljud',
'videoControls.settingsButton' => 'Videoinställningar',
'videoControls.settingsButton' => 'Uppspelningsinställningar',
'videoControls.tracksButton' => 'Ljud och undertexter',
'videoControls.chaptersButton' => 'Kapitel',
'videoControls.versionsButton' => 'Videoversioner',
@@ -2301,14 +2312,14 @@ extension on TranslationsSv {
'profiles.signOut' => 'Logga ut',
'profiles.signOutPlexTitle' => 'Logga ut från Plex?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => 'Ta bort ${displayName} och alla Plex Home-användare? Du kan logga in igen när som helst.',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => 'Utloggad från Plex.',
'profiles.signOutFailed' => 'Utloggningen misslyckades.',
'profiles.sectionTitle' => 'Profiler',
'profiles.summarySingle' => 'Lägg till profiler för att blanda hanterade användare och lokala identiteter',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} profiler · aktiv: ${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} profiler',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => 'Ta bort anslutning?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => 'Ta bort ${displayName}s åtkomst till ${connectionLabel}. Andra profiler behåller den.',
'profiles.deleteProfileTitle' => 'Ta bort profil?',
@@ -2775,7 +2786,6 @@ extension on TranslationsSv {
'companionRemote.remote.subtitles' => 'Undertexter',
'companionRemote.remote.audio' => 'Ljud',
'companionRemote.remote.searchHint' => 'Sök på datorn...',
'videoSettings.playbackSettings' => 'Uppspelningsinställningar',
'videoSettings.playbackSpeed' => 'Uppspelningshastighet',
'videoSettings.sleepTimer' => 'Sovtimer',
'videoSettings.audioSync' => 'Ljudsynkronisering',
@@ -2816,13 +2826,13 @@ extension on TranslationsSv {
'metadataEdit.poster' => 'Poster',
'metadataEdit.background' => 'Bakgrund',
'metadataEdit.logo' => 'Logotyp',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => 'Kvadratisk bild',
'metadataEdit.selectPoster' => 'Välj poster',
'metadataEdit.selectBackground' => 'Välj bakgrund',
'metadataEdit.selectLogo' => 'Välj logotyp',
'metadataEdit.selectSquareArt' => 'Välj kvadratisk bild',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => 'Från URL',
'metadataEdit.uploadFile' => 'Ladda upp fil',
'metadataEdit.enterImageUrl' => 'Ange bild-URL',
+18 -8
View File
@@ -376,6 +376,12 @@ class _TranslationsSettingsZh extends TranslationsSettingsEn {
@override String get displaySwitchDelay => '显示切换延迟';
@override String get tunneledPlayback => '通道化播放';
@override String get tunneledPlaybackDescription => '使用视频隧道。若 HDR 播放出现黑屏,请禁用。';
@override String get dvConversionMode => 'Dolby Vision 转换';
@override String get dvConversionModeDescription => '选择 ExoPlayer 如何处理 Dolby Vision Profile 7 文件。';
@override String get dvConversionAuto => '自动';
@override String get dvConversionNative => '原生 / 禁用';
@override String get dvConversionDv81 => 'P7 → P8.1';
@override String get dvConversionHevcStrip => 'P7 → HEVC';
@override String get requireProfileSelectionOnOpen => '打开应用时询问配置文件';
@override String get requireProfileSelectionOnOpenDescription => '每次打开应用时显示配置文件选择';
@override String get forceTvMode => '强制 TV 模式';
@@ -569,7 +575,7 @@ class _TranslationsVideoControlsZh extends TranslationsVideoControlsEn {
@override String get nextChapterButton => '下一章节';
@override String get muteButton => '静音';
@override String get unmuteButton => '取消静音';
@override String get settingsButton => '视频设置';
@override String get settingsButton => '播放设置';
@override String get tracksButton => '音频和字幕';
@override String get chaptersButton => '章节';
@override String get versionsButton => '视频版本';
@@ -1296,7 +1302,6 @@ class _TranslationsVideoSettingsZh extends TranslationsVideoSettingsEn {
final TranslationsZh _root; // ignore: unused_field
// Translations
@override String get playbackSettings => '播放设置';
@override String get playbackSpeed => '播放速度';
@override String get sleepTimer => '睡眠定时器';
@override String get audioSync => '音频同步';
@@ -2033,6 +2038,12 @@ extension on TranslationsZh {
'settings.displaySwitchDelay' => '显示切换延迟',
'settings.tunneledPlayback' => '通道化播放',
'settings.tunneledPlaybackDescription' => '使用视频隧道。若 HDR 播放出现黑屏,请禁用。',
'settings.dvConversionMode' => 'Dolby Vision 转换',
'settings.dvConversionModeDescription' => '选择 ExoPlayer 如何处理 Dolby Vision Profile 7 文件。',
'settings.dvConversionAuto' => '自动',
'settings.dvConversionNative' => '原生 / 禁用',
'settings.dvConversionDv81' => 'P7 → P8.1',
'settings.dvConversionHevcStrip' => 'P7 → HEVC',
'settings.requireProfileSelectionOnOpen' => '打开应用时询问配置文件',
'settings.requireProfileSelectionOnOpenDescription' => '每次打开应用时显示配置文件选择',
'settings.forceTvMode' => '强制 TV 模式',
@@ -2175,7 +2186,7 @@ extension on TranslationsZh {
'videoControls.nextChapterButton' => '下一章节',
'videoControls.muteButton' => '静音',
'videoControls.unmuteButton' => '取消静音',
'videoControls.settingsButton' => '视频设置',
'videoControls.settingsButton' => '播放设置',
'videoControls.tracksButton' => '音频和字幕',
'videoControls.chaptersButton' => '章节',
'videoControls.versionsButton' => '视频版本',
@@ -2301,14 +2312,14 @@ extension on TranslationsZh {
'profiles.signOut' => '退出登录',
'profiles.signOutPlexTitle' => '退出 Plex 登录?',
'profiles.signOutPlexMessage' => ({required Object displayName}) => '要移除 ${displayName} 和所有 Plex Home 用户吗?可随时重新登录。',
_ => null,
} ?? switch (path) {
'profiles.signedOutPlex' => '已退出 Plex 登录。',
'profiles.signOutFailed' => '退出登录失败。',
'profiles.sectionTitle' => '配置文件',
'profiles.summarySingle' => '添加配置文件以混合托管用户和本地身份',
'profiles.summaryMultipleWithActive' => ({required Object count, required Object activeName}) => '${count} 个配置文件 · 活跃:${activeName}',
'profiles.summaryMultiple' => ({required Object count}) => '${count} 个配置文件',
_ => null,
} ?? switch (path) {
'profiles.removeConnectionTitle' => '移除连接?',
'profiles.removeConnectionMessage' => ({required Object displayName, required Object connectionLabel}) => '移除 ${displayName} 对 ${connectionLabel} 的访问。其他个人资料仍保留。',
'profiles.deleteProfileTitle' => '删除配置文件?',
@@ -2775,7 +2786,6 @@ extension on TranslationsZh {
'companionRemote.remote.subtitles' => '字幕',
'companionRemote.remote.audio' => '音频',
'companionRemote.remote.searchHint' => '在桌面上搜索...',
'videoSettings.playbackSettings' => '播放设置',
'videoSettings.playbackSpeed' => '播放速度',
'videoSettings.sleepTimer' => '睡眠定时器',
'videoSettings.audioSync' => '音频同步',
@@ -2816,13 +2826,13 @@ extension on TranslationsZh {
'metadataEdit.poster' => '海报',
'metadataEdit.background' => '背景',
'metadataEdit.logo' => '标志',
_ => null,
} ?? switch (path) {
'metadataEdit.squareArt' => '方形图片',
'metadataEdit.selectPoster' => '选择海报',
'metadataEdit.selectBackground' => '选择背景',
'metadataEdit.selectLogo' => '选择标志',
'metadataEdit.selectSquareArt' => '选择方形图片',
_ => null,
} ?? switch (path) {
'metadataEdit.fromUrl' => '从 URL',
'metadataEdit.uploadFile' => '上传文件',
'metadataEdit.enterImageUrl' => '输入图片 URL',
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "Fördröjning vid skärmbyte",
"tunneledPlayback": "Tunneluppspelning",
"tunneledPlaybackDescription": "Använd videotunnling. Inaktivera om HDR-uppspelning visar svart video.",
"dvConversionMode": "Dolby Vision-konvertering",
"dvConversionModeDescription": "Välj hur ExoPlayer hanterar Dolby Vision Profile 7-filer.",
"dvConversionAuto": "Auto",
"dvConversionNative": "Inbyggt / inaktiverat",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "Fråga efter profil vid appstart",
"requireProfileSelectionOnOpenDescription": "Visa profilval varje gång appen öppnas",
"forceTvMode": "Tvinga TV-läge",
@@ -408,7 +414,7 @@
"nextChapterButton": "Nästa kapitel",
"muteButton": "Tysta",
"unmuteButton": "Slå på ljud",
"settingsButton": "Videoinställningar",
"settingsButton": "Uppspelningsinställningar",
"tracksButton": "Ljud och undertexter",
"chaptersButton": "Kapitel",
"versionsButton": "Videoversioner",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "Uppspelningsinställningar",
"playbackSpeed": "Uppspelningshastighet",
"sleepTimer": "Sovtimer",
"audioSync": "Ljudsynkronisering",
+7 -2
View File
@@ -248,6 +248,12 @@
"displaySwitchDelay": "显示切换延迟",
"tunneledPlayback": "通道化播放",
"tunneledPlaybackDescription": "使用视频隧道。若 HDR 播放出现黑屏,请禁用。",
"dvConversionMode": "Dolby Vision 转换",
"dvConversionModeDescription": "选择 ExoPlayer 如何处理 Dolby Vision Profile 7 文件。",
"dvConversionAuto": "自动",
"dvConversionNative": "原生 / 禁用",
"dvConversionDv81": "P7 → P8.1",
"dvConversionHevcStrip": "P7 → HEVC",
"requireProfileSelectionOnOpen": "打开应用时询问配置文件",
"requireProfileSelectionOnOpenDescription": "每次打开应用时显示配置文件选择",
"forceTvMode": "强制 TV 模式",
@@ -408,7 +414,7 @@
"nextChapterButton": "下一章节",
"muteButton": "静音",
"unmuteButton": "取消静音",
"settingsButton": "视频设置",
"settingsButton": "播放设置",
"tracksButton": "音频和字幕",
"chaptersButton": "章节",
"versionsButton": "视频版本",
@@ -1070,7 +1076,6 @@
}
},
"videoSettings": {
"playbackSettings": "播放设置",
"playbackSpeed": "播放速度",
"sleepTimer": "睡眠定时器",
"audioSync": "音频同步",
+39 -29
View File
@@ -711,10 +711,29 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
return MultiServerProvider(_serverManager, _aggregationService);
},
),
ChangeNotifierProxyProvider<MultiServerProvider, OfflineModeProvider>(
create: (context) {
final provider = OfflineModeProvider(
_serverManager,
multiServerProvider: context.read<MultiServerProvider>(),
);
provider.initialize(); // Initialize immediately so statusStream listener is ready
return provider;
},
update: (_, multiServerProvider, previous) {
final provider = previous ?? OfflineModeProvider(_serverManager, multiServerProvider: multiServerProvider);
provider.updateMultiServerProvider(multiServerProvider);
provider.initialize(); // Idempotent - safe to call again
return provider;
},
),
// Profile binder owns the cold-start client connect: Plex token
// refresh + Jellyfin client creation. Hoisted out of MainScreen so
// the splash can await its first settle — without this, MainScreen
// mounts (and discover/libraries query) before any client exists.
// It is intentionally not auto-started here: SetupScreen first checks
// whether startup should go straight offline, otherwise the binder's
// microtask can begin network work before the offline decision lands.
Provider<ActiveProfileBinder>(
lazy: false,
create: (context) {
@@ -731,22 +750,10 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
return settings.read(SettingsService.requireProfileSelectionOnOpen) &&
activeProfile.hasMultipleProfiles;
},
)..start();
);
},
dispose: (_, binder) => binder.dispose(),
),
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. Downloads are shared, but sync rules are scoped to
// the active profile and reload when the profile changes.
ChangeNotifierProxyProvider<ActiveProfileProvider, DownloadProvider>(
@@ -1054,6 +1061,7 @@ class SetupScreen extends StatefulWidget {
class _SetupScreenState extends State<SetupScreen> with MountedSetStateMixin {
String _statusMessage = '';
bool _enteringOffline = false;
// Per-server connection status: serverId -> (name, connected?)
final Map<String, (String name, bool? connected)> _serverStatus = {};
@@ -1068,6 +1076,15 @@ class _SetupScreenState extends State<SetupScreen> with MountedSetStateMixin {
setStateIfMounted(() => _statusMessage = message);
}
Future<void> _enterOfflineMode() async {
if (_enteringOffline) return;
_enteringOffline = true;
_setStatus(t.common.startingOfflineMode);
await context.read<DownloadProvider>().ensureInitialized();
if (!mounted) return;
unawaited(Navigator.pushReplacement(context, fadeRoute(const MainScreen(isOfflineMode: true))));
}
Future<void> _loadSavedCredentials() async {
_setStatus(t.common.checkingNetwork);
@@ -1153,10 +1170,7 @@ class _SetupScreenState extends State<SetupScreen> with MountedSetStateMixin {
// No network — skip connection attempts and go straight to offline mode
if (!hasNetwork) {
_setStatus(t.common.startingOfflineMode);
await context.read<DownloadProvider>().ensureInitialized();
if (!mounted) return;
unawaited(Navigator.pushReplacement(context, fadeRoute(const MainScreen(isOfflineMode: true))));
await _enterOfflineMode();
return;
}
@@ -1188,9 +1202,8 @@ class _SetupScreenState extends State<SetupScreen> with MountedSetStateMixin {
// Snapshot Provider refs before further awaits.
final activeProfile = context.read<ActiveProfileProvider>();
// Reading the binder here is enough — the Provider is `lazy: false` so
// it has already constructed the binder and called `start()` during
// MultiProvider build. We just need to wait for it.
// The Provider is `lazy: false` so the binder is constructed already, but
// SetupScreen starts it only after the offline fast path has been ruled out.
final binder = context.read<ActiveProfileBinder>();
final downloadProvider = context.read<DownloadProvider>();
@@ -1211,6 +1224,11 @@ class _SetupScreenState extends State<SetupScreen> with MountedSetStateMixin {
// checkmarks fill in even while the user is choosing a profile.
_bindServerStatusListener(activeProfile, _serverManagerFromContext);
// Start only after network/offline startup has been decided and the
// active profile snapshot is hydrated. This prevents an eager binder
// microtask from racing the no-network/manual-offline fast path.
binder.start();
// If "prompt for profile on launch" is on (or no profile is selected
// yet), surface the picker BEFORE waiting for the previously-active
// profile's bind to settle — otherwise the user sees the splash fully
@@ -1239,12 +1257,6 @@ class _SetupScreenState extends State<SetupScreen> with MountedSetStateMixin {
// available" race the old eager-navigate flow caused.
bindingSucceeded = await activeProfile.awaitBindingSettle();
if (!mounted) return;
if (!bindingSucceeded) {
appLogger.w('Setup: initial profile bind failed; retrying once before entering main screen');
await binder.rebindActive();
if (!mounted) return;
bindingSucceeded = activeProfile.lastBindingSucceeded;
}
}
if (shouldEnterOfflineModeAfterStartupBind(
@@ -1252,9 +1264,7 @@ class _SetupScreenState extends State<SetupScreen> with MountedSetStateMixin {
hasOnlineServers: _serverManagerFromContext().onlineServerIds.isNotEmpty,
)) {
appLogger.w('Setup: no servers online after startup bind; starting offline mode');
await downloadProvider.ensureInitialized();
if (!mounted) return;
unawaited(Navigator.pushReplacement(context, fadeRoute(const MainScreen(isOfflineMode: true))));
await _enterOfflineMode();
return;
}
+4 -4
View File
@@ -505,7 +505,8 @@ abstract class MediaServerClient {
/// Resolve the video URL, media info, and external subtitle list for
/// playback. Backends own the per-backend particulars: Plex runs the
/// transcode-decision flow when [PlaybackInitializationOptions.qualityPreset]
/// is non-original; Jellyfin always direct-streams. Throws
/// is non-original; Jellyfin asks PlaybackInfo for a matching stream when a
/// non-original preset is explicitly selected. Throws
/// [PlaybackException] when the item can't be resolved (no MediaSources,
/// no playable URL, transcode decision unavailable).
///
@@ -522,8 +523,7 @@ abstract class MediaServerClient {
/// Resolve the download URL for [item]'s primary video file along with
/// any external subtitle tracks that should be saved alongside it.
///
/// [mediaIndex] selects among multiple media versions when an item has
/// them (Plex only — Jellyfin returns the same file regardless).
/// [mediaIndex] selects among multiple media versions when an item has them.
Future<DownloadResolution> resolveDownload(MediaItem item, {int mediaIndex = 0});
/// The artwork files the download pipeline should persist for [item] so
@@ -537,7 +537,7 @@ abstract class MediaServerClient {
/// media version's part path; Jellyfin returns its `/Videos/{id}/stream`
/// endpoint with `Static=true` so transcoding is bypassed. Returns null
/// when the backend can't resolve a playable URL for the item.
Future<String?> resolveExternalPlaybackUrl(MediaItem item, {int mediaIndex = 0});
Future<String?> resolveExternalPlaybackUrl(MediaItem item, {int mediaIndex = 0, String? mediaSourceId});
}
/// Optional interface for backends whose public server id is not specific
+21 -2
View File
@@ -94,6 +94,7 @@ class MediaAudioTrack with _TrackLabelMixin {
final String? displayTitle;
final int? channels;
final bool selected;
final bool external;
MediaAudioTrack({
required this.id,
@@ -105,8 +106,11 @@ class MediaAudioTrack with _TrackLabelMixin {
this.displayTitle,
this.channels,
required this.selected,
this.external = false,
});
bool get isExternal => external;
String get label {
final additionalParts = <String>[];
if (codec != null) additionalParts.add(CodecUtils.formatAudioCodec(codec!));
@@ -147,15 +151,30 @@ class MediaSubtitleTrack with _TrackLabelMixin {
});
String get label {
return labelForIndex(_fallbackLabelIndex);
}
String labelForIndex(int visibleIndex) {
return TrackLabelBuilder.buildSubtitleLabel(
title: displayTitle ?? title,
title: _labelTitle,
language: languageCode ?? language,
codec: codec,
forced: forced,
index: (index ?? id) - 1,
index: visibleIndex,
);
}
String? get _labelTitle {
final explicitTitle = title;
if (explicitTitle != null && explicitTitle.trim().isNotEmpty) return explicitTitle;
return displayTitle;
}
int get _fallbackLabelIndex {
final streamIndex = index ?? id;
return streamIndex > 0 ? streamIndex - 1 : 0;
}
/// Returns true if this subtitle track is an external file (sidecar subtitle).
/// Some backends provide a direct key/URL, others require constructing one
/// from stream metadata.
+2
View File
@@ -21,6 +21,8 @@ mixin ItemUpdatable<T extends StatefulWidget> on State<T> {
/// If the fetch fails, the error is silently caught and the item will
/// be updated on the next full refresh.
Future<void> updateItem(String itemId) async {
if (!mounted) return;
try {
final serverId = itemServerId;
if (serverId == null) return;
+1 -1
View File
@@ -84,7 +84,7 @@ mixin TabNavigationMixin<T extends StatefulWidget> on State<T>, TickerProviderSt
}
void onTabBarBack() {
MainScreenFocusScope.of(context)?.focusSidebar();
MainScreenFocusScope.of(context, listen: false)?.focusSidebar();
}
/// Shared tab chip builder — eliminates duplication between screens.
+46
View File
@@ -128,6 +128,51 @@ Future<bool> _launchCommand(String command, String url) async {
}
}
Future<bool> _launchCommandCandidates(Iterable<String> commands, String url) async {
final commandList = commands.toList(growable: false);
Object? lastError;
for (final command in commandList) {
try {
final result = await Process.start(command, [url], mode: ProcessStartMode.detached);
appLogger.d('Launched $command with PID: ${result.pid}');
return true;
} catch (e) {
lastError = e;
appLogger.d('Failed to launch $command', error: e);
}
}
appLogger.w('Failed to launch any of: ${commandList.join(', ')}', error: lastError);
return false;
}
List<String> _windowsVlcCommandCandidates(Map<String, String> environment) {
final candidates = <String>['vlc'];
void addInstallPath(String? programFilesDir) {
final trimmed = programFilesDir?.trim();
if (trimmed == null || trimmed.isEmpty) return;
final root = trimmed.replaceFirst(RegExp(r'[\\/]+$'), '');
candidates.add('$root\\VideoLAN\\VLC\\vlc.exe');
}
addInstallPath(environment['ProgramW6432']);
addInstallPath(environment['ProgramFiles']);
addInstallPath(environment['ProgramFiles(x86)']);
addInstallPath(r'C:\Program Files');
addInstallPath(r'C:\Program Files (x86)');
final seen = <String>{};
return [
for (final candidate in candidates)
if (seen.add(candidate.toLowerCase())) candidate,
];
}
Future<bool> _launchWindowsVlc(String url) {
return _launchCommandCandidates(_windowsVlcCommandCandidates(Platform.environment), url);
}
Future<bool> _launchCustom(String value, String url, CustomPlayerType type) async {
if (type == CustomPlayerType.urlScheme) {
return _launchUrlScheme(value, url);
@@ -158,6 +203,7 @@ class KnownPlayers {
if (Platform.isAndroid) return _launchAndroidIntent(url, package: 'org.videolan.vlc');
if (Platform.isIOS) return _launchUrlScheme('vlc://', url);
if (Platform.isMacOS) return _launchMacApp('VLC', url);
if (Platform.isWindows) return _launchWindowsVlc(url);
return _launchCommand('vlc', url);
},
),
+17 -2
View File
@@ -11,6 +11,7 @@ class PlayerAndroid extends PlayerBase {
int? _bufferSizeBytes;
bool _tunnelingEnabled = true;
String _dvConversionMode = 'auto';
String? _hiddenSubtitleTrackId;
@@ -60,6 +61,7 @@ class PlayerAndroid extends PlayerBase {
final result = await invoke<bool>('initialize', {
'bufferSizeBytes': _bufferSizeBytes,
'tunnelingEnabled': _tunnelingEnabled,
'dvConversionMode': _dvConversionMode,
});
if (result != true) {
throw Exception('Failed to initialize ExoPlayer');
@@ -95,10 +97,13 @@ class PlayerAndroid extends PlayerBase {
bool play = true,
bool isLive = false,
List<SubtitleTrack>? externalSubtitles,
Duration timelineOffset = Duration.zero,
Duration? timelineDuration,
}) async {
if (disposed) return;
await _ensureInitialized();
final startPosition = media.start ?? Duration.zero;
configureTimeline(offset: timelineOffset, duration: timelineDuration);
clearTracks();
resetPlaybackProgress(startPosition);
setSeekable(false);
@@ -139,7 +144,8 @@ class PlayerAndroid extends PlayerBase {
@override
Future<void> seek(Duration position) async {
await runSeek(position, () => invoke('seek', {'positionMs': position.inMilliseconds}));
final sourcePosition = sourceSeekPosition(position);
await runSeek(position, () => invoke('seek', {'positionMs': sourcePosition.inMilliseconds}));
}
@override
@@ -192,7 +198,16 @@ class PlayerAndroid extends PlayerBase {
_tunnelingEnabled = value != 'no';
break;
case 'dv-conversion-mode':
await invoke('setDvConversionMode', {'mode': value});
_dvConversionMode = value;
final initFuture = _initFuture;
if (initialized) {
await invoke('setDvConversionMode', {'mode': value});
} else if (initFuture != null) {
await initFuture;
if (!disposed && initialized && _dvConversionMode == value) {
await invoke('setDvConversionMode', {'mode': value});
}
}
break;
case 'sub-visibility':
if (value == 'no') {
+8 -1
View File
@@ -58,7 +58,14 @@ abstract class Player {
///
/// [media] - The media source to open.
/// [play] - Whether to start playback immediately (default: true).
Future<void> open(Media media, {bool play = true, bool isLive = false, List<SubtitleTrack>? externalSubtitles});
Future<void> open(
Media media, {
bool play = true,
bool isLive = false,
List<SubtitleTrack>? externalSubtitles,
Duration timelineOffset = Duration.zero,
Duration? timelineDuration,
});
/// Start or resume playback.
Future<void> play();
+29 -10
View File
@@ -46,6 +46,8 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
int _lastEmitMs = 0;
int _lastCacheStateMs = 0;
int _positionMs = 0;
Duration _timelineOffset = Duration.zero;
Duration? _timelineDuration;
int _nextPropId = 0;
final Map<int, String> _propIdToName = {};
@@ -142,13 +144,13 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
case 'time-pos':
if (value is num) {
_positionMs = (value * 1000).round();
final pos = _toTimelinePosition(Duration(milliseconds: (value * 1000).round()));
_positionMs = pos.inMilliseconds;
// Only allocate Duration + copyWith + emit at ~4Hz (250ms).
// Raw int is stored every tick so synchronous reads via _positionMs stay current.
final nowMs = _throttleSw.elapsedMilliseconds;
if (nowMs - _lastEmitMs >= 250) {
_lastEmitMs = nowMs;
final pos = Duration(milliseconds: _positionMs);
_state = _state.copyWith(position: pos);
positionController.add(pos);
}
@@ -157,7 +159,7 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
case 'duration':
if (value is num) {
final duration = Duration(milliseconds: (value * 1000).toInt());
final duration = _timelineDuration ?? _toTimelinePosition(Duration(milliseconds: (value * 1000).toInt()));
_state = _state.copyWith(duration: duration);
durationController.add(duration);
}
@@ -174,7 +176,7 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
final nowMs = _throttleSw.elapsedMilliseconds;
if (nowMs - _lastCacheStateMs < 250) break;
_lastCacheStateMs = nowMs;
final buffer = Duration(milliseconds: (value * 1000).toInt());
final buffer = _toTimelinePosition(Duration(milliseconds: (value * 1000).toInt()));
_state = _state.copyWith(buffer: buffer);
bufferController.add(buffer);
// Synthesize a single range for players without demuxer-cache-state (ExoPlayer).
@@ -295,7 +297,7 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
// Extract cache-end for the single buffer duration (replaces demuxer-cache-time)
final cacheEnd = cacheState['cache-end'] as num?;
if (cacheEnd != null) {
final buffer = Duration(milliseconds: (cacheEnd * 1000).toInt());
final buffer = _toTimelinePosition(Duration(milliseconds: (cacheEnd * 1000).toInt()));
_state = _state.copyWith(buffer: buffer);
bufferController.add(buffer);
}
@@ -311,8 +313,8 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
if (start != null && end != null) {
ranges.add(
BufferRange(
start: Duration(milliseconds: (start * 1000).toInt()),
end: Duration(milliseconds: (end * 1000).toInt()),
start: _toTimelinePosition(Duration(milliseconds: (start * 1000).toInt())),
end: _toTimelinePosition(Duration(milliseconds: (end * 1000).toInt())),
),
);
}
@@ -491,18 +493,35 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
}
@protected
void resetPlaybackProgress(Duration position) {
void configureTimeline({Duration offset = Duration.zero, Duration? duration}) {
_timelineOffset = offset;
_timelineDuration = duration;
}
@protected
Duration sourceSeekPosition(Duration timelinePosition) {
final sourcePosition = timelinePosition - _timelineOffset;
return sourcePosition.isNegative ? Duration.zero : sourcePosition;
}
Duration _toTimelinePosition(Duration sourcePosition) {
return sourcePosition + _timelineOffset;
}
@protected
void resetPlaybackProgress(Duration sourcePosition) {
final position = _toTimelinePosition(sourcePosition);
_positionMs = position.inMilliseconds;
_state = _state.copyWith(
completed: false,
position: position,
duration: Duration.zero,
duration: _timelineDuration ?? Duration.zero,
buffer: Duration.zero,
bufferRanges: const [],
);
completedController.add(false);
positionController.add(position);
durationController.add(Duration.zero);
durationController.add(_timelineDuration ?? Duration.zero);
bufferController.add(Duration.zero);
bufferRangesController.add(const []);
}
+5 -1
View File
@@ -102,10 +102,13 @@ class PlayerNative extends PlayerBase {
bool play = true,
bool isLive = false,
List<SubtitleTrack>? externalSubtitles,
Duration timelineOffset = Duration.zero,
Duration? timelineDuration,
}) async {
if (disposed) return;
await _ensureInitialized();
final startPosition = media.start ?? Duration.zero;
configureTimeline(offset: timelineOffset, duration: timelineDuration);
clearTracks();
resetPlaybackProgress(startPosition);
setSeekable(false);
@@ -160,7 +163,8 @@ class PlayerNative extends PlayerBase {
@override
Future<void> seek(Duration position) async {
await runSeek(position, () => command(['seek', (position.inMilliseconds / 1000.0).toString(), 'absolute']));
final sourcePosition = sourceSeekPosition(position);
await runSeek(position, () => command(['seek', (sourcePosition.inMilliseconds / 1000.0).toString(), 'absolute']));
}
@override
+120 -43
View File
@@ -22,6 +22,19 @@ typedef PlexHomePinPrompt = Future<String?> Function(Profile profile, {String? e
typedef ShouldDeferInitialBind = FutureOr<bool> Function(Profile profile);
class _ProfileBindResult {
const _ProfileBindResult({required this.visibleServerIds, required this.expectedServerIds});
const _ProfileBindResult.empty() : visibleServerIds = const {}, expectedServerIds = const {};
_ProfileBindResult.visible(Set<String> ids)
: visibleServerIds = Set.unmodifiable(ids),
expectedServerIds = Set.unmodifiable(ids);
final Set<String> visibleServerIds;
final Set<String> expectedServerIds;
}
@visibleForTesting
bool shouldUsePlexHomeTokenCache({required bool preVerified, required bool hasBoundOnce}) {
return preVerified || !hasBoundOnce;
@@ -39,8 +52,8 @@ class ActiveProfileBinder {
required this.multiServerProvider,
required this.pinPrompt,
this.shouldDeferInitialBind,
PlexAuthService? plexAuth,
}) : _plexAuth = plexAuth;
this._plexAuth,
});
final ActiveProfileProvider activeProfile;
final ConnectionRegistry connections;
@@ -209,19 +222,28 @@ class ActiveProfileBinder {
appLogger.i('ActiveProfileBinder: rebinding for ${profile.displayName} (${profile.id})');
final visibleServerIds = <String>{};
final expectedServerIds = await _expectedServerIdsForProfile(profile);
multiServerProvider.setExpectedVisibleServerIds(expectedServerIds);
final localProfileHasJoinRows =
profile.isLocal && (await profileConnections.listForProfile(profile.id)).isNotEmpty;
if (profile.isPlexHome) {
visibleServerIds.addAll(await _bindPlexHome(profile));
// Bind the implicit Plex Home parent and borrowed/extra join rows in
// parallel. A slow/offline Plex parent should not add its timeout budget
// on top of an otherwise reachable Jellyfin or borrowed-server bind.
final results = await Future.wait([
if (profile.isPlexHome) _bindPlexHome(profile),
// Both kinds also bind borrowed/extra connections via the join table.
// For plex_home this handles a Jellyfin server (or extra Plex account)
// that was attached to the profile via the borrow flow — the parent
// account is bound by `_bindPlexHome` above and isn't represented in
// the join table.
_bindJoinRows(profile),
]);
final visibleServerIds = <String>{};
for (final result in results) {
visibleServerIds.addAll(result.visibleServerIds);
expectedServerIds.addAll(result.expectedServerIds);
}
// Both kinds also bind borrowed/extra connections via the join table.
// For plex_home this handles a Jellyfin server (or extra Plex account)
// that was attached to the profile via the borrow flow — the parent
// account is bound by `_bindPlexHome` above and isn't represented in
// the join table.
visibleServerIds.addAll(await _bindJoinRows(profile));
// Remove servers the profile no longer has access to. Always set the
// filter to the bound set (even when empty) so a profile with no
@@ -232,6 +254,7 @@ class ActiveProfileBinder {
serverManager.removeServer(serverId);
}
}
multiServerProvider.setExpectedVisibleServerIds(expectedServerIds);
multiServerProvider.setVisibleServerIds(visibleServerIds);
success = (profile.isLocal && !localProfileHasJoinRows) || visibleServerIds.isNotEmpty;
// Once we've bound a profile with real servers in this session,
@@ -253,17 +276,45 @@ class ActiveProfileBinder {
}
}
Future<Set<String>> _bindPlexHome(Profile profile) async {
Future<Set<String>> _expectedServerIdsForProfile(Profile profile) async {
final expected = <String>{};
final parentId = profile.parentConnectionId;
if (profile.isPlexHome && parentId != null) {
final account = await connections.getPlexAccount(parentId);
if (account != null) {
expected.addAll(account.servers.map((server) => server.clientIdentifier));
}
}
final pcs = await profileConnections.listForProfile(profile.id);
if (pcs.isEmpty) return expected;
final all = await connections.list();
final byId = {for (final c in all) c.id: c};
for (final pc in pcs) {
if (parentId != null && pc.connectionId == parentId) continue;
switch (byId[pc.connectionId]) {
case PlexAccountConnection(:final servers):
expected.addAll(servers.map((server) => server.clientIdentifier));
case JellyfinConnection(:final serverMachineId):
expected.add(serverMachineId);
case null:
break;
}
}
return expected;
}
Future<_ProfileBindResult> _bindPlexHome(Profile profile) async {
final parentId = profile.parentConnectionId;
final homeUuid = profile.plexHomeUserUuid;
if (parentId == null || homeUuid == null) {
appLogger.w('ActiveProfileBinder: ${profile.displayName} missing parent/uuid metadata');
return const {};
return const _ProfileBindResult.empty();
}
final account = await connections.getPlexAccount(parentId);
if (account == null) {
appLogger.w('ActiveProfileBinder: parent connection $parentId for ${profile.displayName} not found');
return const {};
return const _ProfileBindResult.empty();
}
final auth = await _ensureAuth();
@@ -309,7 +360,7 @@ class ActiveProfileBinder {
if (e.isTransient) {
return _connectFromCachedServers(account, cachedToken, profile.displayName, error: e);
}
return const {};
return const _ProfileBindResult.empty();
}
} catch (e, st) {
appLogger.w(
@@ -317,7 +368,7 @@ class ActiveProfileBinder {
error: e,
stackTrace: st,
);
return const {};
return const _ProfileBindResult.empty();
}
}
@@ -330,7 +381,7 @@ class ActiveProfileBinder {
promptForPin: ({String? errorMessage}) => pinPrompt(profile, errorMessage: errorMessage),
logLabel: profile.displayName,
);
if (!result.succeeded) return const {};
if (!result.succeeded) return const _ProfileBindResult.empty();
// Persist the minted user-token onto the parent ProfileConnection
// row. Plex Home profiles don't normally have a join row for the
// parent (the borrow flow is for *other* connections layered onto
@@ -360,19 +411,21 @@ class ActiveProfileBinder {
/// join table). Skips Plex rows whose `connectionId` matches the parent
/// (defensive guard — sync code shouldn't insert one, but treating it as
/// a borrow would re-mint a redundant token).
Future<Set<String>> _bindJoinRows(Profile profile) async {
Future<_ProfileBindResult> _bindJoinRows(Profile profile) async {
final pcs = await profileConnections.listForProfile(profile.id);
if (pcs.isEmpty) {
if (profile.isLocal) {
appLogger.w('ActiveProfileBinder: ${profile.displayName} has no connections');
}
return const {};
return const _ProfileBindResult.empty();
}
final all = await connections.list();
final byId = {for (final c in all) c.id: c};
final parentId = profile.parentConnectionId;
final visible = <String>{};
final expected = <String>{};
final futures = <Future<_ProfileBindResult>>[];
for (final pc in pcs) {
if (parentId != null && pc.connectionId == parentId) continue;
final conn = byId[pc.connectionId];
@@ -382,16 +435,22 @@ class ActiveProfileBinder {
}
switch (conn) {
case PlexAccountConnection():
visible.addAll(await _bindLocalPlexConnection(profile: profile, conn: conn, pc: pc));
expected.addAll(conn.servers.map((server) => server.clientIdentifier));
futures.add(_bindLocalPlexConnection(profile: profile, conn: conn, pc: pc));
case JellyfinConnection():
final id = await _bindJellyfin(conn);
if (id != null) visible.add(id);
expected.add(conn.serverMachineId);
futures.add(_bindJellyfin(conn));
}
}
return visible;
final results = await Future.wait(futures);
for (final result in results) {
visible.addAll(result.visibleServerIds);
expected.addAll(result.expectedServerIds);
}
return _ProfileBindResult(visibleServerIds: visible, expectedServerIds: expected);
}
Future<Set<String>> _bindLocalPlexConnection({
Future<_ProfileBindResult> _bindLocalPlexConnection({
required Profile profile,
required PlexAccountConnection conn,
required ProfileConnection pc,
@@ -414,38 +473,43 @@ class ActiveProfileBinder {
appLogger.w('ActiveProfileBinder: fetchServers failed for ${profile.displayName}', error: e);
if (e.isTransient) {
final ids = await _connectFromCachedServers(conn, userToken, profile.displayName, error: e);
if (ids.isNotEmpty) await profileConnections.markUsed(profile.id, conn.id);
if (ids.visibleServerIds.isNotEmpty) await profileConnections.markUsed(profile.id, conn.id);
return ids;
}
return const {};
return const _ProfileBindResult.empty();
}
} catch (e, st) {
appLogger.w('ActiveProfileBinder: fetchServers failed for ${profile.displayName}', error: e, stackTrace: st);
return const {};
return const _ProfileBindResult.empty();
}
}
if (userToken == null || userToken.isEmpty) {
if (pc.userIdentifier.isEmpty) {
appLogger.w('ActiveProfileBinder: ${profile.displayName} has no Plex Home user identifier');
return const {};
return const _ProfileBindResult.empty();
}
final minted = await _mintLocalPlexToken(auth: auth, profile: profile, conn: conn, pc: pc);
if (minted == null) return const {};
if (minted == null) return const _ProfileBindResult.empty();
userToken = minted;
try {
servers = await auth.fetchServers(userToken);
} on MediaServerHttpException catch (e) {
appLogger.w('ActiveProfileBinder: fetchServers failed for ${profile.displayName}', error: e);
if (e.statusCode == 401 || e.statusCode == 403) {
serverManager.markPlexConnectionAuthError(conn);
final ids = conn.servers.map((server) => server.clientIdentifier).toSet();
return _ProfileBindResult.visible(ids);
}
if (e.isTransient) {
final ids = await _connectFromCachedServers(conn, userToken, profile.displayName, error: e);
if (ids.isNotEmpty) await profileConnections.markUsed(profile.id, conn.id);
if (ids.visibleServerIds.isNotEmpty) await profileConnections.markUsed(profile.id, conn.id);
return ids;
}
return const {};
return const _ProfileBindResult.empty();
} catch (e, st) {
appLogger.w('ActiveProfileBinder: fetchServers failed for ${profile.displayName}', error: e, stackTrace: st);
return const {};
return const _ProfileBindResult.empty();
}
}
@@ -476,32 +540,41 @@ class ActiveProfileBinder {
return userToken;
}
Future<Set<String>> _connectPlexServers(PlexAccountConnection account, String userToken, String profileLabel) async {
Future<_ProfileBindResult> _connectPlexServers(
PlexAccountConnection account,
String userToken,
String profileLabel,
) async {
final auth = await _ensureAuth();
final List<PlexServer> servers;
try {
servers = await auth.fetchServers(userToken);
} on MediaServerHttpException catch (e, st) {
appLogger.w('ActiveProfileBinder: fetchServers failed for $profileLabel', error: e, stackTrace: st);
if (e.statusCode == 401 || e.statusCode == 403) {
serverManager.markPlexConnectionAuthError(account);
final ids = account.servers.map((server) => server.clientIdentifier).toSet();
return _ProfileBindResult.visible(ids);
}
if (e.isTransient) {
return _connectFromCachedServers(account, userToken, profileLabel, error: e, stackTrace: st);
}
return const {};
return const _ProfileBindResult.empty();
} catch (e, st) {
appLogger.w('ActiveProfileBinder: fetchServers failed for $profileLabel', error: e, stackTrace: st);
return const {};
return const _ProfileBindResult.empty();
}
return _connectFromServers(account, userToken, servers, profileLabel);
}
Future<Set<String>> _connectFromCachedServers(
Future<_ProfileBindResult> _connectFromCachedServers(
PlexAccountConnection account,
String userToken,
String profileLabel, {
Object? error,
StackTrace? stackTrace,
}) async {
if (account.servers.isEmpty) return const {};
if (account.servers.isEmpty) return const _ProfileBindResult.empty();
appLogger.w(
'ActiveProfileBinder: using cached Plex server metadata for $profileLabel after resource refresh failed',
error: error,
@@ -511,7 +584,7 @@ class ActiveProfileBinder {
return _connectFromServers(account, userToken, servers, profileLabel);
}
Future<Set<String>> _connectFromServers(
Future<_ProfileBindResult> _connectFromServers(
PlexAccountConnection account,
String userToken,
List<PlexServer> servers,
@@ -519,7 +592,7 @@ class ActiveProfileBinder {
) async {
if (servers.isEmpty) {
appLogger.w('ActiveProfileBinder: no servers for $profileLabel on ${account.accountLabel}');
return const {};
return const _ProfileBindResult.empty();
}
final updatedConn = account.copyWith(servers: servers);
final boundIds = await serverManager.refreshTokensForProfile(updatedConn);
@@ -527,19 +600,22 @@ class ActiveProfileBinder {
// Return only the ids that actually connected — the visibility filter
// pushed downstream must not include unreachable servers, otherwise
// the UI lists them and downstream calls 404/timeout per interaction.
return boundIds;
return _ProfileBindResult(
visibleServerIds: boundIds,
expectedServerIds: servers.map((server) => server.clientIdentifier).toSet(),
);
}
Future<String?> _bindJellyfin(JellyfinConnection conn) async {
Future<_ProfileBindResult> _bindJellyfin(JellyfinConnection conn) async {
final ok = await serverManager.addJellyfinConnection(conn);
// `addJellyfinConnection` registers the client even when the health probe
// returns authError. Keep that server in the active profile's visibility
// filter so the re-auth banner can surface it instead of hiding it as if
// the profile had no server.
if (ok || serverManager.authErrorServerIds.contains(conn.serverMachineId)) {
return conn.serverMachineId;
return _ProfileBindResult.visible({conn.serverMachineId});
}
return null;
return _ProfileBindResult(visibleServerIds: const {}, expectedServerIds: {conn.serverMachineId});
}
Future<PlexAuthService> _ensureAuth() async {
@@ -561,6 +637,7 @@ class ActiveProfileBinder {
for (final serverId in serverManager.serverIds.toList()) {
serverManager.removeServer(serverId);
}
multiServerProvider.setExpectedVisibleServerIds(<String>{});
multiServerProvider.setVisibleServerIds(<String>{});
}
+1 -9
View File
@@ -22,15 +22,7 @@ import 'profile_registry.dart';
/// local profiles first, then live home users; if neither matches we fall
/// back to the first profile in the merged list.
class ActiveProfileProvider extends ChangeNotifier with DisposableChangeNotifierMixin {
ActiveProfileProvider({
required ProfileRegistry registry,
required PlexHomeService plexHome,
required ConnectionRegistry connections,
StorageService? storage,
}) : _registry = registry,
_plexHome = plexHome,
_connections = connections,
_storage = storage;
ActiveProfileProvider({required this._registry, required this._plexHome, required this._connections, this._storage});
final ProfileRegistry _registry;
final PlexHomeService _plexHome;
+5 -9
View File
@@ -21,16 +21,12 @@ import 'profile_connection_registry.dart';
/// background refreshes happen on connection add and via the periodic ticker.
class PlexHomeService {
PlexHomeService({
required ConnectionRegistry connections,
required ProfileConnectionRegistry profileConnections,
StorageService? storage,
required this._connections,
required this._profileConnections,
this._storage,
Future<List<PlexHomeUser>> Function(String accountToken)? plexHomeUserFetcher,
Duration refreshInterval = const Duration(hours: 1),
}) : _connections = connections,
_profileConnections = profileConnections,
_storage = storage,
_fetchHomeUsers = plexHomeUserFetcher ?? _defaultHomeUserFetcher,
_refreshInterval = refreshInterval;
this._refreshInterval = const Duration(hours: 1),
}) : _fetchHomeUsers = plexHomeUserFetcher ?? _defaultHomeUserFetcher;
final ConnectionRegistry _connections;
final ProfileConnectionRegistry _profileConnections;
+66 -26
View File
@@ -12,6 +12,7 @@ import '../database/app_database.dart';
import '../database/download_operations.dart';
import '../services/download_manager_service.dart';
import '../services/api_cache.dart';
import '../services/download_artwork_service.dart';
import '../services/download_storage_service.dart';
import '../services/multi_server_manager.dart';
import '../services/offline_mode_source.dart';
@@ -40,10 +41,15 @@ class DownloadedArtwork {
/// Get the local file path for this artwork
String? getLocalPath(DownloadStorageService storage, String serverId) {
if (thumbPath == null) return null;
return storage.getArtworkPathSync(serverId, thumbPath!);
return DownloadArtworkService.localPathSync(storage, serverId, thumbPath);
}
}
class _RelatedMetadataDownloadContext {
final hydratedMetadataKeys = <String>{};
final ensuredArtworkKeys = <String>{};
}
/// Provider for managing download state and operations.
class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin {
final DownloadManagerService _downloadManager;
@@ -87,10 +93,8 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
OfflineModeSource? _offlineSource;
DownloadProvider({required DownloadManagerService downloadManager, required AppDatabase database})
: _downloadManager = downloadManager,
_database = database,
_syncRuleExecutor = SyncRuleExecutor(database: database) {
DownloadProvider({required this._downloadManager, required this._database})
: _syncRuleExecutor = SyncRuleExecutor(database: _database) {
// Listen to progress updates from the download manager
_progressSubscription = _downloadManager.progressStream.listen(_onProgressUpdate);
@@ -112,13 +116,10 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
/// or path_provider.
@visibleForTesting
DownloadProvider.forTesting({
required DownloadManagerService downloadManager,
required AppDatabase database,
String? activeProfileId = 'test-profile',
}) : _downloadManager = downloadManager,
_database = database,
_syncRuleExecutor = SyncRuleExecutor(database: database),
_activeProfileId = activeProfileId {
required this._downloadManager,
required this._database,
this._activeProfileId = 'test-profile',
}) : _syncRuleExecutor = SyncRuleExecutor(database: _database) {
_progressSubscription = _downloadManager.progressStream.listen(_onProgressUpdate);
_deletionProgressSubscription = _downloadManager.deletionProgressStream.listen(_onDeletionProgressUpdate);
_watchStateSubscription = WatchStateNotifier().stream.listen(_onWatchStateChanged);
@@ -597,7 +598,7 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
/// Returns null if artwork directory isn't initialized or artworkPath is null
String? getArtworkLocalPath(String serverId, String? artworkPath) {
if (artworkPath == null) return null;
return DownloadStorageService.instance.getArtworkPathSync(serverId, artworkPath);
return DownloadArtworkService.localPathSync(DownloadStorageService.instance, serverId, artworkPath);
}
/// Get downloaded episodes for a specific show (by grandparentRatingKey)
@@ -951,11 +952,12 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
}
final unwatchedOnly = filter == DownloadFilter.unwatched;
final relatedContext = _RelatedMetadataDownloadContext();
int count = 0;
Future<void> queueItem(MediaItem item) async {
if (unwatchedOnly && item.isWatched && !item.hasActiveProgress) return;
final queued = await _queueSingleDownload(item, client);
final queued = await _queueSingleDownload(item, client, relatedContext: relatedContext);
if (queued) count++;
}
@@ -991,6 +993,7 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
MediaServerClient client, {
int mediaIndex = 0,
DownloadVersionConfig? versionConfig,
_RelatedMetadataDownloadContext? relatedContext,
}) async {
if (!_downloadManager.downloadsSupported) return false;
@@ -1056,7 +1059,11 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
// For episodes, also fetch and store show and season metadata for offline display
if (metadataToStore.isEpisode) {
await _fetchAndStoreParentMetadata(metadataToStore, client);
await _fetchAndStoreParentMetadata(
metadataToStore,
client,
context: relatedContext ?? _RelatedMetadataDownloadContext(),
);
}
// Store full metadata for display
@@ -1075,12 +1082,26 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
/// Fetch and store show and season metadata for an episode
/// Also downloads artwork for show and season
Future<void> _fetchAndStoreParentMetadata(MediaItem episode, MediaServerClient client) async {
Future<void> _fetchAndStoreParentMetadata(
MediaItem episode,
MediaServerClient client, {
required _RelatedMetadataDownloadContext context,
}) async {
final serverId = episode.serverId;
if (serverId == null) return;
await _fetchAndStoreRelatedMetadata(serverId: serverId, ratingKey: episode.grandparentId, client: client);
await _fetchAndStoreRelatedMetadata(serverId: serverId, ratingKey: episode.parentId, client: client);
await _fetchAndStoreRelatedMetadata(
serverId: serverId,
ratingKey: episode.grandparentId,
client: client,
context: context,
);
await _fetchAndStoreRelatedMetadata(
serverId: serverId,
ratingKey: episode.parentId,
client: client,
context: context,
);
}
/// Fetch, persist, and download artwork for a related metadata item (show or season).
@@ -1088,15 +1109,27 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
required String serverId,
required String? ratingKey,
required MediaServerClient client,
required _RelatedMetadataDownloadContext context,
}) async {
if (ratingKey == null) return;
final globalKey = buildGlobalKey(serverId, ratingKey);
final storageService = DownloadStorageService.instance;
MediaItem? metadata = _metadata[globalKey];
if (metadata == null) {
var fetchedFreshMetadata = false;
if (!(_offlineSource?.isOffline ?? false) && !context.hydratedMetadataKeys.contains(globalKey)) {
try {
metadata = await client.fetchItem(ratingKey);
final fetched = await client.fetchItem(ratingKey);
if (fetched != null) {
final existing = metadata;
metadata = fetched.copyWith(
serverId: existing?.serverId ?? fetched.serverId ?? serverId,
serverName: existing?.serverName ?? fetched.serverName,
libraryId: fetched.libraryId ?? existing?.libraryId,
libraryTitle: fetched.libraryTitle ?? existing?.libraryTitle,
);
context.hydratedMetadataKeys.add(globalKey);
fetchedFreshMetadata = true;
}
} catch (e) {
appLogger.w('Failed to fetch metadata for $ratingKey', error: e);
}
@@ -1108,8 +1141,7 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
await _downloadManager.saveMetadata(withServer, client);
final thumbPath = withServer.thumbPath;
final hasPoster = thumbPath != null && await storageService.artworkExists(serverId, thumbPath);
if (!hasPoster) {
if (fetchedFreshMetadata || context.ensuredArtworkKeys.add(globalKey)) {
await _downloadManager.downloadArtworkForMetadata(withServer, client);
}
_artworkPaths[globalKey] = DownloadedArtwork(thumbPath: thumbPath);
@@ -1197,6 +1229,7 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
required bool skipExisting,
}) async {
final unwatchedOnly = filter == DownloadFilter.unwatched;
final relatedContext = _RelatedMetadataDownloadContext();
final episodes = <MediaItem>[];
if (container.kind == MediaKind.show) {
await collectEpisodesForShow(
@@ -1233,7 +1266,12 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
}
}
final queued = await _queueSingleDownload(episodeWithServer, client, versionConfig: versionConfig);
final queued = await _queueSingleDownload(
episodeWithServer,
client,
versionConfig: versionConfig,
relatedContext: relatedContext,
);
if (queued) count++;
}
return count;
@@ -1666,13 +1704,14 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
if (profileId == null || profileId.isEmpty) return [];
if (_syncRules.isEmpty) return [];
final relatedContext = _RelatedMetadataDownloadContext();
final results = await _syncRuleExecutor.executeSyncRules(
profileId: profileId,
serverManager: serverManager,
downloads: downloads,
metadata: Map.unmodifiable(_metadata),
queueSingleDownload: (episode, client, {int mediaIndex = 0}) =>
_queueSingleDownload(episode, client, mediaIndex: mediaIndex),
_queueSingleDownload(episode, client, mediaIndex: mediaIndex, relatedContext: relatedContext),
force: force,
);
@@ -1691,6 +1730,7 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
if (profileId == null || profileId.isEmpty) return null;
if (!_syncRules.containsKey(globalKey)) return null;
final relatedContext = _RelatedMetadataDownloadContext();
return _syncRuleExecutor.executeSingleRule(
profileId: profileId,
globalKey: globalKey,
@@ -1698,7 +1738,7 @@ class DownloadProvider extends ChangeNotifier with DisposableChangeNotifierMixin
downloads: downloads,
metadata: Map.unmodifiable(_metadata),
queueSingleDownload: (episode, client, {int mediaIndex = 0}) =>
_queueSingleDownload(episode, client, mediaIndex: mediaIndex),
_queueSingleDownload(episode, client, mediaIndex: mediaIndex, relatedContext: relatedContext),
);
}
+38 -4
View File
@@ -45,6 +45,16 @@ class MultiServerProvider extends ChangeNotifier with DisposableChangeNotifierMi
/// ids in the set surface through [serverIds] / [onlineServerIds].
Set<String>? _visibleServerIds;
/// True once the active profile has explicitly resolved visibility. An empty
/// set is meaningful: the profile has servers, but none are currently visible.
bool get hasExplicitVisibleServerFilter => _visibleServerIds != null;
/// Server ids the active profile is expected to have access to, including
/// unreachable servers that do not have a live client in [MultiServerManager].
/// This is intentionally separate from [_visibleServerIds]: visible ids drive
/// UI/API surfaces, expected ids drive offline/auth decisions.
Set<String>? _expectedVisibleServerIds;
/// Replace the active visibility filter and notify listeners. Pass `null`
/// to clear the filter (all servers visible). Idempotent — does nothing
/// when [ids] equals the current filter.
@@ -62,6 +72,20 @@ class MultiServerProvider extends ChangeNotifier with DisposableChangeNotifierMi
_refreshLiveTvAvailabilitySoon();
}
/// Replace the expected active-profile server ids. Pass `null` to fall back
/// to the live visible ids when no profile-scoped expectation is known.
void setExpectedVisibleServerIds(Set<String>? ids) {
if (_expectedVisibleServerIds == null && ids == null) return;
if (_expectedVisibleServerIds != null &&
ids != null &&
_expectedVisibleServerIds!.length == ids.length &&
_expectedVisibleServerIds!.containsAll(ids)) {
return;
}
_expectedVisibleServerIds = ids;
safeNotifyListeners();
}
/// Add [serverId] to the active visibility filter. Used after adding a
/// connection inline (without a profile switch), so the new server
/// becomes visible without the binder having to re-run. Initializes the
@@ -70,12 +94,14 @@ class MultiServerProvider extends ChangeNotifier with DisposableChangeNotifierMi
final current = _visibleServerIds;
if (current == null) {
_visibleServerIds = {serverId};
_expectedVisibleServerIds = {...?_expectedVisibleServerIds, serverId};
safeNotifyListeners();
_refreshLiveTvAvailabilitySoon();
return;
}
if (current.contains(serverId)) return;
_visibleServerIds = {...current, serverId};
_expectedVisibleServerIds = {...?_expectedVisibleServerIds, serverId};
safeNotifyListeners();
_refreshLiveTvAvailabilitySoon();
}
@@ -151,6 +177,14 @@ class MultiServerProvider extends ChangeNotifier with DisposableChangeNotifierMi
return all.where(filter.contains).toList();
}
/// Server ids the active profile is expected to have, including unreachable
/// Plex servers that have no live client yet.
List<String> get expectedServerIds {
final expected = _expectedVisibleServerIds;
if (expected != null) return expected.toList(growable: false);
return serverIds;
}
/// Check if a server is online (and visible under the active profile).
bool isServerOnline(String serverId) {
final filter = _visibleServerIds;
@@ -177,7 +211,7 @@ class MultiServerProvider extends ChangeNotifier with DisposableChangeNotifierMi
/// "Sign in again" banner distinct from generic "Server offline".
List<String> get authErrorServerIds {
final all = _serverManager.authErrorServerIds;
final filter = _visibleServerIds;
final filter = _expectedVisibleServerIds ?? _visibleServerIds;
if (filter == null) return all.toList();
return all.where(filter.contains).toList();
}
@@ -188,14 +222,14 @@ class MultiServerProvider extends ChangeNotifier with DisposableChangeNotifierMi
/// Display names for the visible auth-errored servers, in stable order.
/// Falls back to the server id when the client doesn't expose a name.
List<({String serverId, String displayName})> get authErrorServers {
return authErrorServerIds
.map((id) => (serverId: id, displayName: _serverManager.getClient(id)?.serverName ?? id))
.toList();
return authErrorServerIds.map((id) => (serverId: id, displayName: _serverManager.serverDisplayName(id))).toList();
}
/// Clear all server connections
void clearAllConnections() {
_serverManager.disconnectAll();
_visibleServerIds = null;
_expectedVisibleServerIds = null;
appLogger.d('MultiServerProvider: All connections cleared');
safeNotifyListeners();
}
+62 -16
View File
@@ -2,18 +2,21 @@ import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:connectivity_plus/connectivity_plus.dart';
import '../mixins/disposable_change_notifier_mixin.dart';
import 'multi_server_provider.dart';
import '../services/multi_server_manager.dart';
import '../services/offline_mode_source.dart';
/// Tracks offline mode status based on network connectivity and server reachability.
class OfflineModeProvider extends ChangeNotifier with DisposableChangeNotifierMixin implements OfflineModeSource {
final MultiServerManager _serverManager;
MultiServerProvider? _multiServerProvider;
StreamSubscription<List<ConnectivityResult>>? _connectivitySubscription;
StreamSubscription<Map<String, bool>>? _serverStatusSubscription;
bool _hasNetworkConnection = true;
late bool _hasServerConnection;
bool _lastOfflineState = false;
bool _isInitialized = false;
/// True once [MultiServerManager] has emitted its first server-status
@@ -24,11 +27,15 @@ class OfflineModeProvider extends ChangeNotifier with DisposableChangeNotifierMi
/// trust the real flag.
bool _hasReceivedServerStatus = false;
OfflineModeProvider(this._serverManager) : _hasServerConnection = _serverManager.onlineServerIds.isNotEmpty {
OfflineModeProvider(this._serverManager, {MultiServerProvider? multiServerProvider})
: _multiServerProvider = multiServerProvider,
_hasServerConnection = (multiServerProvider?.hasConnectedServers ?? _serverManager.onlineServerIds.isNotEmpty) {
// Pre-seed the "received status" flag if there are already online
// servers (e.g. provider rebuilt mid-session) — otherwise we'd
// incorrectly say "online" after the manager already emitted.
if (_hasServerConnection) _hasReceivedServerStatus = true;
// servers (e.g. provider rebuilt mid-session) or the active profile's
// visibility filter has already settled.
_markServerStatusKnownIfSettled();
_lastOfflineState = isOffline;
_multiServerProvider?.addListener(_handleMultiServerProviderChanged);
}
/// Whether the app is currently in offline mode
@@ -37,6 +44,8 @@ class OfflineModeProvider extends ChangeNotifier with DisposableChangeNotifierMi
bool get isOffline {
if (!_hasNetworkConnection) return true;
if (!_hasReceivedServerStatus) return false;
if (!_hasKnownVisibleServers) return false;
if (_hasOnlyAuthErrorServers) return false;
return !_hasServerConnection;
}
@@ -46,6 +55,29 @@ class OfflineModeProvider extends ChangeNotifier with DisposableChangeNotifierMi
/// Whether at least one media server (Plex or Jellyfin) is reachable
bool get hasServerConnection => _hasServerConnection;
bool get _hasKnownVisibleServers =>
(_multiServerProvider?.expectedServerIds.length ?? _serverManager.serverIds.length) > 0;
bool get _hasOnlyAuthErrorServers {
final provider = _multiServerProvider;
if (provider == null) return false;
final serverCount = provider.expectedServerIds.length;
return serverCount > 0 && provider.authErrorServerIds.length == serverCount;
}
/// Attach the profile-visible server provider. Offline state is evaluated
/// against visible servers, not global manager state, so another profile's
/// online server does not keep the active profile out of offline mode.
void updateMultiServerProvider(MultiServerProvider provider) {
if (identical(_multiServerProvider, provider)) return;
_multiServerProvider?.removeListener(_handleMultiServerProviderChanged);
_multiServerProvider = provider;
_multiServerProvider?.addListener(_handleMultiServerProviderChanged);
_hasServerConnection = provider.hasConnectedServers;
_markServerStatusKnownIfSettled();
_notifyIfOfflineChanged();
}
/// Updates network and server connection flags
Future<void> _updateConnectionFlags() async {
try {
@@ -58,7 +90,26 @@ class OfflineModeProvider extends ChangeNotifier with DisposableChangeNotifierMi
// connectivity_plus can throw PlatformException on Windows (NetworkManager::StartListen)
_hasNetworkConnection = true;
}
_hasServerConnection = _serverManager.onlineServerIds.isNotEmpty;
_hasServerConnection = _multiServerProvider?.hasConnectedServers ?? _serverManager.onlineServerIds.isNotEmpty;
}
void _handleMultiServerProviderChanged() {
_hasServerConnection = _multiServerProvider?.hasConnectedServers ?? _serverManager.onlineServerIds.isNotEmpty;
_markServerStatusKnownIfSettled();
_notifyIfOfflineChanged();
}
void _markServerStatusKnownIfSettled() {
if (_hasServerConnection || (_multiServerProvider?.hasExplicitVisibleServerFilter ?? false)) {
_hasReceivedServerStatus = true;
}
}
void _notifyIfOfflineChanged() {
final offline = isOffline;
if (_lastOfflineState == offline) return;
_lastOfflineState = offline;
safeNotifyListeners();
}
/// Initialize the provider and start monitoring
@@ -75,12 +126,8 @@ class OfflineModeProvider extends ChangeNotifier with DisposableChangeNotifierMi
() {
_connectivitySubscription = Connectivity().onConnectivityChanged.listen(
(results) {
final wasOffline = isOffline;
_hasNetworkConnection = !results.contains(ConnectivityResult.none);
if (wasOffline != isOffline) {
safeNotifyListeners();
}
_notifyIfOfflineChanged();
},
onError: (e) {
_hasNetworkConnection = true;
@@ -95,26 +142,25 @@ class OfflineModeProvider extends ChangeNotifier with DisposableChangeNotifierMi
// Monitor server status from MultiServerManager
_serverStatusSubscription = _serverManager.statusStream.listen((statusMap) {
final wasOffline = isOffline;
_hasServerConnection = statusMap.values.any((isOnline) => isOnline);
_hasServerConnection = _multiServerProvider?.hasConnectedServers ?? statusMap.values.any((isOnline) => isOnline);
_hasReceivedServerStatus = true;
if (wasOffline != isOffline) {
safeNotifyListeners();
}
_notifyIfOfflineChanged();
});
_lastOfflineState = isOffline;
safeNotifyListeners();
}
/// Force a refresh of connectivity status
Future<void> refresh() async {
await _updateConnectionFlags();
_lastOfflineState = isOffline;
safeNotifyListeners();
}
@override
void dispose() {
_multiServerProvider?.removeListener(_handleMultiServerProviderChanged);
_connectivitySubscription?.cancel();
_serverStatusSubscription?.cancel();
super.dispose();
+1 -3
View File
@@ -23,9 +23,7 @@ class OfflineWatchProvider extends ChangeNotifier with DisposableChangeNotifierM
final OfflineWatchSyncService _syncService;
final DownloadProvider _downloadProvider;
OfflineWatchProvider({required OfflineWatchSyncService syncService, required DownloadProvider downloadProvider})
: _syncService = syncService,
_downloadProvider = downloadProvider {
OfflineWatchProvider({required this._syncService, required this._downloadProvider}) {
// Listen to sync service changes to update UI
_syncService.addListener(_onSyncServiceChanged);
}
+386 -305
View File
@@ -25,6 +25,7 @@ import '../providers/hidden_libraries_provider.dart';
import '../providers/libraries_provider.dart';
import '../providers/playback_state_provider.dart';
import '../widgets/hub_section.dart';
import '../widgets/clickable_cursor.dart';
import '../widgets/loading_indicator_box.dart';
import '../widgets/profile_switching_overlay.dart';
import 'profile/profile_switch_screen.dart';
@@ -40,6 +41,7 @@ import '../providers/user_profile_provider.dart';
import '../services/storage_service.dart';
import '../services/settings_service.dart';
import '../widgets/settings_builder.dart';
import '../widgets/fitting_title_text.dart';
import '../widgets/tv_browse_rail.dart';
import '../widgets/tv_spotlight_background.dart';
import '../mixins/refreshable.dart';
@@ -92,6 +94,8 @@ class _DiscoverScreenState extends State<DiscoverScreen>
/// mixin's single-server [itemServerId] hook.
@override
Future<void> updateItem(String itemId) async {
if (!mounted) return;
try {
final serverId = _serverIdForItem(itemId);
if (serverId == null) return;
@@ -194,6 +198,7 @@ class _DiscoverScreenState extends State<DiscoverScreen>
// Track initial load so we can focus hero when content first appears
bool _initialLoadComplete = false;
bool _pendingTvBrowseRailFocus = false;
// Hub navigation keys
GlobalKey<HubSectionState>? _continueWatchingHubKey;
@@ -314,7 +319,7 @@ class _DiscoverScreenState extends State<DiscoverScreen>
void _focusContentFromAppBar() {
if (PlatformDetector.isTV()) {
_tvBrowseRailKey.currentState?.requestFocus();
_focusTvBrowseRailWhenReady(immediate: true);
return;
}
@@ -329,6 +334,41 @@ class _DiscoverScreenState extends State<DiscoverScreen>
}
}
void _focusTvBrowseRailWhenReady({bool immediate = false}) {
if (!PlatformDetector.isTV()) return;
if (!_isTabVisible || !(ModalRoute.of(context)?.isCurrent ?? false)) {
_pendingTvBrowseRailFocus = false;
return;
}
_pendingTvBrowseRailFocus = true;
if (immediate && _tvBrowseHubs.isNotEmpty) {
final rail = _tvBrowseRailKey.currentState;
if (rail != null) {
_pendingTvBrowseRailFocus = false;
rail.requestFocus();
return;
}
}
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!mounted) return;
if (!_isTabVisible || !(ModalRoute.of(context)?.isCurrent ?? false)) {
_pendingTvBrowseRailFocus = false;
return;
}
if (_tvBrowseHubs.isEmpty) return;
final rail = _tvBrowseRailKey.currentState;
if (rail == null) return;
_pendingTvBrowseRailFocus = false;
rail.requestFocus();
});
}
void _applyPendingTvBrowseRailFocus() {
if (_pendingTvBrowseRailFocus) _focusTvBrowseRailWhenReady();
}
/// Handle vertical navigation between hubs
/// Returns true if the navigation was handled
bool _handleVerticalNavigation(int hubIndex, bool isUp) {
@@ -365,7 +405,7 @@ class _DiscoverScreenState extends State<DiscoverScreen>
/// Navigate focus to the sidebar
void _navigateToSidebar() {
MainScreenFocusScope.of(context)?.focusSidebar();
MainScreenFocusScope.of(context, listen: false)?.focusSidebar();
}
@override
@@ -585,6 +625,7 @@ class _DiscoverScreenState extends State<DiscoverScreen>
@override
void onTabHidden() {
_isTabVisible = false;
_pendingTvBrowseRailFocus = false;
_autoScrollTimer?.cancel();
_stopIndicatorProgress();
}
@@ -599,6 +640,10 @@ class _DiscoverScreenState extends State<DiscoverScreen>
@override
void focusActiveTabIfReady() {
if (PlatformDetector.isTV()) {
_focusTvBrowseRailWhenReady();
return;
}
_focusTopBoundary();
}
@@ -701,6 +746,7 @@ class _DiscoverScreenState extends State<DiscoverScreen>
_continueWatchingHubKey ??= GlobalKey<HubSectionState>();
}
});
_applyPendingTvBrowseRailFocus();
// Focus hero section now that it's visible, but only if no modal route is on top
if (!PlatformDetector.isTV() && onDeck.isNotEmpty && (ModalRoute.of(context)?.isCurrent ?? false)) {
@@ -720,14 +766,16 @@ class _DiscoverScreenState extends State<DiscoverScreen>
// On initial load, focus the hero so the user starts on content (not the toolbar)
if (!_initialLoadComplete && onDeck.isNotEmpty) {
_initialLoadComplete = true;
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!mounted || !(ModalRoute.of(context)?.isCurrent ?? false)) return;
if (PlatformDetector.isTV()) {
_tvBrowseRailKey.currentState?.requestFocus();
} else if (_heroFocusNode.canRequestFocus) {
_heroFocusNode.requestFocus();
}
});
if (PlatformDetector.isTV()) {
_focusTvBrowseRailWhenReady();
} else {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!mounted || !(ModalRoute.of(context)?.isCurrent ?? false)) return;
if (_heroFocusNode.canRequestFocus) {
_heroFocusNode.requestFocus();
}
});
}
}
// Wait for global hubs
@@ -757,14 +805,11 @@ class _DiscoverScreenState extends State<DiscoverScreen>
_areHubsLoading = false;
_updateHubKeys();
});
_applyPendingTvBrowseRailFocus();
if (PlatformDetector.isTV() && !_initialLoadComplete && filteredHubs.isNotEmpty) {
_initialLoadComplete = true;
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted && (ModalRoute.of(context)?.isCurrent ?? false)) {
_tvBrowseRailKey.currentState?.requestFocus();
}
});
_focusTvBrowseRailWhenReady();
}
appLogger.d('Discover content loaded successfully');
@@ -1192,12 +1237,13 @@ class _DiscoverScreenState extends State<DiscoverScreen>
padding: const EdgeInsets.symmetric(vertical: 8),
child: Row(
children: [
Text(
t.discover.title,
style: Theme.of(
context,
).textTheme.titleLarge?.copyWith(color: Colors.white, fontWeight: FontWeight.bold),
),
if (!PlatformDetector.isTV())
Text(
t.discover.title,
style: Theme.of(
context,
).textTheme.titleLarge?.copyWith(color: Colors.white, fontWeight: FontWeight.bold),
),
const Spacer(),
Consumer2<WatchTogetherProvider, CompanionRemoteProvider>(
builder: (context, watchTogether, companionRemote, _) {
@@ -1327,6 +1373,8 @@ class _DiscoverScreenState extends State<DiscoverScreen>
SettingsService.showServerNameOnHubs,
SettingsService.showHeroSection,
SettingsService.hideSpoilers,
SettingsService.libraryDensity,
SettingsService.episodePosterMode,
],
builder: (context) => _buildContent(context),
);
@@ -1482,25 +1530,56 @@ class _DiscoverScreenState extends State<DiscoverScreen>
final size = MediaQuery.sizeOf(context);
final theme = Theme.of(context);
final spotlight = _effectiveSpotlightItem;
final hideSpoilers = SettingsService.instanceOrNull!.read(SettingsService.hideSpoilers);
final svc = SettingsService.instanceOrNull!;
final hideSpoilers = svc.read(SettingsService.hideSpoilers);
final browseHubs = _tvBrowseHubs;
final spotlightTop = (size.height * 0.1).clamp(96.0, 150.0).toDouble();
final spotlightBottom = (size.height * 0.53).clamp(180.0, 900.0).toDouble();
final spotlightLeft = (24 * TvLayoutConstants.scaleForSize(size)).clamp(18.0, 40.0).toDouble();
final scale = TvLayoutConstants.scaleForSize(size);
final sidebarBleed = MainScreenFocusScope.sideNavigationBleedOf(
context,
alwaysKeepSidebarOpen: svc.read(SettingsService.alwaysKeepSidebarOpen),
);
final railSize = MainScreenFocusScope.foregroundSizeOf(context);
final fullBleedWidth = MainScreenFocusScope.fullBleedWidthOf(context);
final foregroundLeft = MainScreenFocusScope.foregroundLeftOf(context);
final railHeight = browseHubs.isEmpty
? 0.0
: TvBrowseRailLayout.estimateHeight(
size: railSize,
hubs: browseHubs,
density: svc.read(SettingsService.libraryDensity),
episodePosterMode: svc.read(SettingsService.episodePosterMode),
tallPosterScale: TvBrowseRailLayout.compactTallPosterScale,
);
final spotlightTop = (size.height * 0.075).clamp(64.0 * scale, 120.0 * scale).toDouble();
final minimumSpotlightBottom = railHeight + (8 * scale);
final baseSpotlightBottom = (size.height * 0.48).clamp(160.0, 820.0).toDouble();
final desiredSpotlightBottom = minimumSpotlightBottom > baseSpotlightBottom
? minimumSpotlightBottom
: baseSpotlightBottom;
final maxSpotlightBottom = (size.height - spotlightTop - (96 * scale)).clamp(0.0, double.infinity).toDouble();
final spotlightBottom = desiredSpotlightBottom > maxSpotlightBottom ? maxSpotlightBottom : desiredSpotlightBottom;
final spotlightLeft = (24 * scale).clamp(18.0, 40.0).toDouble();
return Material(
color: theme.scaffoldBackgroundColor,
child: Stack(
clipBehavior: Clip.none,
children: [
TvSpotlightBackground(
item: spotlight,
client: _getMediaClientForItem(spotlight),
hideSpoilers: hideSpoilers,
contentTop: spotlightTop,
contentBottom: spotlightBottom,
contentLeft: spotlightLeft,
compact: true,
showPrimaryAction: false,
Positioned(
top: 0,
bottom: 0,
left: -foregroundLeft,
width: fullBleedWidth,
child: TvSpotlightBackground(
item: spotlight,
client: _getMediaClientForItem(spotlight),
hideSpoilers: hideSpoilers,
contentTop: spotlightTop,
contentBottom: spotlightBottom,
contentLeft: spotlightLeft + foregroundLeft,
compact: true,
showPrimaryAction: false,
),
),
if (_isLoading || (_areHubsLoading && browseHubs.isEmpty)) const Center(child: CircularProgressIndicator()),
if (_errorMessage != null)
@@ -1547,9 +1626,16 @@ class _DiscoverScreenState extends State<DiscoverScreen>
hub.id == 'continue_watching' ? _loadAllContinueWatchingItems() : Future.value(hub.items),
onNavigateUp: _focusTopActions,
onNavigateToSidebar: _navigateToSidebar,
tallPosterScale: TvBrowseRailLayout.compactTallPosterScale,
backgroundBleedLeft: sidebarBleed,
),
),
Positioned(top: 0, left: 0, right: 0, child: ExcludeFocusTraversal(child: _buildOverlaidAppBar())),
SideNavigationBleedBuilder(
targetBleed: sidebarBleed,
child: ExcludeFocusTraversal(child: _buildOverlaidAppBar()),
builder: (context, animatedBleed, child) =>
Positioned(top: 0, left: -animatedBleed, width: fullBleedWidth, child: child!),
),
if (_switchingProfile) const ProfileSwitchingOverlay(),
],
),
@@ -1600,20 +1686,22 @@ class _DiscoverScreenState extends State<DiscoverScreen>
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Pause/Play button
GestureDetector(
onTap: () {
if (_isAutoScrollPaused) {
_resumeAutoScroll();
} else {
_pauseAutoScroll();
}
},
child: AppIcon(
_isAutoScrollPaused ? Symbols.play_arrow_rounded : Symbols.pause_rounded,
fill: 1,
color: Theme.of(context).colorScheme.onSurface,
size: 18,
semanticLabel: '${_isAutoScrollPaused ? t.common.play : t.common.pause} auto-scroll',
ClickableCursor(
child: GestureDetector(
onTap: () {
if (_isAutoScrollPaused) {
_resumeAutoScroll();
} else {
_pauseAutoScroll();
}
},
child: AppIcon(
_isAutoScrollPaused ? Symbols.play_arrow_rounded : Symbols.pause_rounded,
fill: 1,
color: Theme.of(context).colorScheme.onSurface,
size: 18,
semanticLabel: '${_isAutoScrollPaused ? t.common.play : t.common.pause} auto-scroll',
),
),
),
const SizedBox(width: 8),
@@ -1688,6 +1776,14 @@ class _DiscoverScreenState extends State<DiscoverScreen>
final alignLeft = isTv || isLargeScreen;
final theme = Theme.of(context);
final colorScheme = theme.colorScheme;
final heroLogoWidth = isTv ? TvLayoutConstants.heroLogoWidth : 400.0;
final heroLogoHeight = isTv ? TvLayoutConstants.heroLogoHeight : 120.0;
final heroTitleStyle = theme.textTheme.displaySmall?.copyWith(
color: colorScheme.onSurface,
fontWeight: FontWeight.bold,
fontSize: isTv ? 52 : null,
shadows: [Shadow(color: colorScheme.surface.withValues(alpha: 0.8), blurRadius: 8)],
);
// Determine content type label for chip
final contentTypeLabel = heroItem.isMovie ? t.discover.movie : t.discover.tvShow;
@@ -1703,237 +1799,255 @@ class _DiscoverScreenState extends State<DiscoverScreen>
label: heroLabel,
button: true,
hint: t.accessibility.tapToPlay,
child: GestureDetector(
onTap: () {
appLogger.d('Navigating to VideoPlayerScreen for: ${heroItem.title}');
navigateToVideoPlayer(context, metadata: heroItem);
},
child: Stack(
fit: StackFit.expand,
clipBehavior: Clip.none,
children: [
// Background Image with fade/zoom animation and parallax
if (heroItem.artPath != null ||
heroItem.backgroundSquarePath != null ||
heroItem.grandparentArtPath != null)
ClipRect(
child: AnimatedBuilder(
animation: _scrollController,
builder: (context, child) {
final scrollOffset = _scrollController.hasClients ? _scrollController.offset : 0.0;
return Transform.translate(offset: Offset(0, scrollOffset * 0.3), child: child);
},
child: TweenAnimationBuilder<double>(
tween: Tween(begin: 0.0, end: 1.0),
duration: const Duration(milliseconds: 800),
curve: Curves.easeOut,
builder: (context, value, child) {
return Transform.scale(
scale: 1.0 + (0.1 * (1 - value)),
child: Opacity(opacity: value, child: child),
);
child: ClickableCursor(
child: GestureDetector(
onTap: () {
appLogger.d('Navigating to VideoPlayerScreen for: ${heroItem.title}');
navigateToVideoPlayer(context, metadata: heroItem);
},
child: Stack(
fit: StackFit.expand,
clipBehavior: Clip.none,
children: [
// Background Image with fade/zoom animation and parallax
if (heroItem.artPath != null ||
heroItem.backgroundSquarePath != null ||
heroItem.grandparentArtPath != null)
ClipRect(
child: AnimatedBuilder(
animation: _scrollController,
builder: (context, child) {
final scrollOffset = _scrollController.hasClients ? _scrollController.offset : 0.0;
return Transform.translate(offset: Offset(0, scrollOffset * 0.3), child: child);
},
child: Builder(
builder: (context) {
// heroClient resolves to the actual server's client
// (Plex or Jellyfin) so each backend's transcoder
// builds sized URLs.
final size = MediaQuery.sizeOf(context);
final dpr = MediaImageHelper.effectiveDevicePixelRatio(context);
final containerAspect = screenWidth / heroHeight;
final imageUrl = MediaImageHelper.getOptimizedImageUrl(
client: heroClient,
thumbPath:
heroItem.heroArt(containerAspectRatio: containerAspect) ?? heroItem.grandparentArtPath,
maxWidth: size.width,
maxHeight: size.height * 0.7,
devicePixelRatio: dpr,
imageType: ImageType.art,
);
final (_, memHeight) = MediaImageHelper.getMemCacheDimensions(
displayWidth: (screenWidth * dpr).round(),
displayHeight: (heroHeight * dpr).round(),
imageType: ImageType.art,
);
return blurArtwork(
CachedNetworkImage(
imageUrl: imageUrl,
cacheManager: PlexImageCacheManager.instance,
fit: BoxFit.cover,
memCacheHeight: memHeight,
placeholder: (context, url) =>
ColoredBox(color: Theme.of(context).colorScheme.surfaceContainerHighest),
errorBuilder: (context, error, stackTrace) =>
ColoredBox(color: Theme.of(context).colorScheme.surfaceContainerHighest),
),
child: TweenAnimationBuilder<double>(
tween: Tween(begin: 0.0, end: 1.0),
duration: const Duration(milliseconds: 800),
curve: Curves.easeOut,
builder: (context, value, child) {
return Transform.scale(
scale: 1.0 + (0.1 * (1 - value)),
child: Opacity(opacity: value, child: child),
);
},
child: Builder(
builder: (context) {
// heroClient resolves to the actual server's client
// (Plex or Jellyfin) so each backend's transcoder
// builds sized URLs.
final size = MediaQuery.sizeOf(context);
final dpr = MediaImageHelper.effectiveDevicePixelRatio(context);
final containerAspect = screenWidth / heroHeight;
final imageUrl = MediaImageHelper.getOptimizedImageUrl(
client: heroClient,
thumbPath:
heroItem.heroArt(containerAspectRatio: containerAspect) ?? heroItem.grandparentArtPath,
maxWidth: size.width,
maxHeight: size.height * 0.7,
devicePixelRatio: dpr,
imageType: ImageType.art,
);
final (_, memHeight) = MediaImageHelper.getMemCacheDimensions(
displayWidth: (screenWidth * dpr).round(),
displayHeight: (heroHeight * dpr).round(),
imageType: ImageType.art,
);
return blurArtwork(
CachedNetworkImage(
imageUrl: imageUrl,
cacheManager: PlexImageCacheManager.instance,
fit: BoxFit.cover,
memCacheHeight: memHeight,
placeholder: (context, url) =>
ColoredBox(color: Theme.of(context).colorScheme.surfaceContainerHighest),
errorBuilder: (context, error, stackTrace) =>
ColoredBox(color: Theme.of(context).colorScheme.surfaceContainerHighest),
),
);
},
),
),
),
),
)
else
ColoredBox(color: colorScheme.surfaceContainerHighest),
)
else
ColoredBox(color: colorScheme.surfaceContainerHighest),
// Gradient Overlay - blends into scaffold background
Positioned(
top: 0,
left: 0,
right: 0,
bottom: -4, // Extend past stack bounds to ensure coverage
child: IgnorePointer(
child: Builder(
builder: (context) {
final bgColor = Theme.of(context).scaffoldBackgroundColor;
return Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Colors.transparent, bgColor.withValues(alpha: 0.9), bgColor],
stops: isTv ? const [0.25, 0.78, 1.0] : const [0.5, 0.85, 1.0],
// Gradient Overlay - blends into scaffold background
Positioned(
top: 0,
left: 0,
right: 0,
bottom: -4, // Extend past stack bounds to ensure coverage
child: IgnorePointer(
child: Builder(
builder: (context) {
final bgColor = Theme.of(context).scaffoldBackgroundColor;
return Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Colors.transparent, bgColor.withValues(alpha: 0.9), bgColor],
stops: isTv ? const [0.25, 0.78, 1.0] : const [0.5, 0.85, 1.0],
),
),
),
);
},
);
},
),
),
),
),
// Content with responsive alignment
Positioned(
bottom: isTv
? 88
: isLargeScreen
? 80
: 50,
left: 0,
right: isTv
? screenWidth * 0.36
: isLargeScreen
? 200
: 0,
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: isTv
? TvLayoutConstants.horizontalInset
: isLargeScreen
? 40
: 24,
),
child: Align(
alignment: alignLeft ? Alignment.centerLeft : Alignment.center,
child: ConstrainedBox(
constraints: BoxConstraints(
maxWidth: isTv ? TvLayoutConstants.heroContentMaxWidth : double.infinity,
),
child: Column(
crossAxisAlignment: alignLeft ? CrossAxisAlignment.start : CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
// Show logo or name/title
if (heroItem.clearLogoPath != null)
SizedBox(
height: isTv ? TvLayoutConstants.heroLogoHeight : 120,
width: isTv ? TvLayoutConstants.heroLogoWidth : 400,
child: Builder(
builder: (context) {
final dpr = MediaImageHelper.effectiveDevicePixelRatio(context);
final logoUrl = MediaImageHelper.getOptimizedImageUrl(
client: heroClient,
thumbPath: heroItem.clearLogoPath,
maxWidth: isTv ? TvLayoutConstants.heroLogoWidth : 400,
maxHeight: isTv ? TvLayoutConstants.heroLogoHeight : 120,
devicePixelRatio: dpr,
imageType: ImageType.logo,
);
// Content with responsive alignment
Positioned(
bottom: isTv
? 88
: isLargeScreen
? 80
: 50,
left: 0,
right: isTv
? screenWidth * 0.36
: isLargeScreen
? 200
: 0,
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: isTv
? TvLayoutConstants.horizontalInset
: isLargeScreen
? 40
: 24,
),
child: Align(
alignment: alignLeft ? Alignment.centerLeft : Alignment.center,
child: ConstrainedBox(
constraints: BoxConstraints(
maxWidth: isTv ? TvLayoutConstants.heroContentMaxWidth : double.infinity,
),
child: Column(
crossAxisAlignment: alignLeft ? CrossAxisAlignment.start : CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
// Show logo or name/title
if (heroItem.clearLogoPath != null)
SizedBox(
height: heroLogoHeight,
width: heroLogoWidth,
child: Builder(
builder: (context) {
final dpr = MediaImageHelper.effectiveDevicePixelRatio(context);
final logoUrl = MediaImageHelper.getOptimizedImageUrl(
client: heroClient,
thumbPath: heroItem.clearLogoPath,
maxWidth: heroLogoWidth,
maxHeight: heroLogoHeight,
devicePixelRatio: dpr,
imageType: ImageType.logo,
);
return blurArtwork(
CachedNetworkImage(
imageUrl: logoUrl,
cacheManager: PlexImageCacheManager.instance,
filterQuality: FilterQuality.medium,
fit: BoxFit.contain,
memCacheWidth: ((isTv ? TvLayoutConstants.heroLogoWidth : 400) * dpr)
.clamp(200, isTv ? 1000 : 800)
.round(),
alignment: alignLeft ? Alignment.bottomLeft : Alignment.bottomCenter,
placeholder: (context, url) => const SizedBox.shrink(),
errorBuilder: (context, error, stackTrace) {
// Fallback to text if logo fails to load
final theme = Theme.of(context);
final colorScheme = theme.colorScheme;
return Align(
alignment: alignLeft ? Alignment.centerLeft : Alignment.center,
child: Text(
return blurArtwork(
CachedNetworkImage(
imageUrl: logoUrl,
cacheManager: PlexImageCacheManager.instance,
filterQuality: FilterQuality.medium,
fit: BoxFit.contain,
memCacheWidth: (heroLogoWidth * dpr).clamp(200, isTv ? 1000 : 800).round(),
alignment: alignLeft ? Alignment.bottomLeft : Alignment.bottomCenter,
placeholder: (context, url) => const SizedBox.shrink(),
errorBuilder: (context, error, stackTrace) {
// Fallback to text if logo fails to load
return FittingTitleText(
showName,
style: theme.textTheme.displaySmall?.copyWith(
color: colorScheme.onSurface,
fontWeight: FontWeight.bold,
fontSize: isTv ? 52 : null,
shadows: [
Shadow(color: colorScheme.surface.withValues(alpha: 0.8), blurRadius: 8),
],
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: heroTitleStyle,
textAlign: alignLeft ? TextAlign.left : TextAlign.center,
),
);
},
alignment: alignLeft ? Alignment.centerLeft : Alignment.center,
);
},
),
sigma: 10,
clip: false,
);
},
),
)
else
SizedBox(
height: heroLogoHeight,
width: heroLogoWidth,
child: FittingTitleText(
showName,
style: heroTitleStyle,
textAlign: alignLeft ? TextAlign.left : TextAlign.center,
alignment: alignLeft ? Alignment.centerLeft : Alignment.center,
),
),
// Metadata as dot-separated text with content type
if (heroItem.year != null || heroItem.contentRating != null || heroItem.rating != null) ...[
const SizedBox(height: 16),
Text(
[
contentTypeLabel,
if (heroItem.rating != null) '★ ${formatRating(heroItem.rating!)}',
if (heroItem.contentRating != null) formatContentRating(heroItem.contentRating!),
if (heroItem.year != null) heroItem.year.toString(),
].join(' • '),
style: TextStyle(
color: Colors.white,
fontSize: isTv ? 18 : 14,
fontWeight: FontWeight.w600,
),
textAlign: alignLeft ? TextAlign.left : TextAlign.center,
),
],
// On small screens: show button before summary
if (!alignLeft) ...[const SizedBox(height: 20), _buildSmartPlayButton(heroItem)],
// Summary with episode info (Apple TV style)
if (heroItem.summary != null && !shouldHideSpoiler) ...[
const SizedBox(height: 12),
RichText(
maxLines: isTv ? 3 : 2,
overflow: TextOverflow.ellipsis,
textAlign: alignLeft ? TextAlign.left : TextAlign.center,
text: TextSpan(
style: TextStyle(
color: alignLeft
? Colors.white.withValues(alpha: 0.7)
: colorScheme.onSurface.withValues(alpha: 0.7),
fontSize: isTv ? 18 : 14,
height: isTv ? 1.45 : 1.4,
),
children: [
if (isEpisode && heroItem.parentIndex != null && heroItem.index != null)
TextSpan(
text: 'S${heroItem.parentIndex}, E${heroItem.index}: ',
style: TextStyle(
fontWeight: FontWeight.bold,
color: alignLeft ? Colors.white : colorScheme.onSurface,
),
),
TextSpan(
text: heroItem.summary?.isNotEmpty == true
? heroItem.summary!
: t.messages.noDescriptionAvailable,
),
sigma: 10,
clip: false,
);
},
],
),
),
)
else
Text(
showName,
style: theme.textTheme.displaySmall?.copyWith(
color: colorScheme.onSurface,
fontWeight: FontWeight.bold,
fontSize: isTv ? 52 : null,
shadows: [Shadow(color: colorScheme.surface.withValues(alpha: 0.8), blurRadius: 8)],
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: alignLeft ? TextAlign.left : TextAlign.center,
),
// Metadata as dot-separated text with content type
if (heroItem.year != null || heroItem.contentRating != null || heroItem.rating != null) ...[
const SizedBox(height: 16),
Text(
[
contentTypeLabel,
if (heroItem.rating != null) '★ ${formatRating(heroItem.rating!)}',
if (heroItem.contentRating != null) formatContentRating(heroItem.contentRating!),
if (heroItem.year != null) heroItem.year.toString(),
].join(' • '),
style: TextStyle(
color: Colors.white,
fontSize: isTv ? 18 : 14,
fontWeight: FontWeight.w600,
),
textAlign: alignLeft ? TextAlign.left : TextAlign.center,
),
],
// On small screens: show button before summary
if (!alignLeft) ...[const SizedBox(height: 20), _buildSmartPlayButton(heroItem)],
// Summary with episode info (Apple TV style)
if (heroItem.summary != null && !shouldHideSpoiler) ...[
const SizedBox(height: 12),
RichText(
maxLines: isTv ? 3 : 2,
overflow: TextOverflow.ellipsis,
textAlign: alignLeft ? TextAlign.left : TextAlign.center,
text: TextSpan(
] else if (shouldHideSpoiler &&
isEpisode &&
heroItem.parentIndex != null &&
heroItem.index != null) ...[
const SizedBox(height: 12),
Text(
'S${heroItem.parentIndex}, E${heroItem.index}: ${heroItem.title}',
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: alignLeft ? TextAlign.left : TextAlign.center,
style: TextStyle(
color: alignLeft
? Colors.white.withValues(alpha: 0.7)
@@ -1941,52 +2055,19 @@ class _DiscoverScreenState extends State<DiscoverScreen>
fontSize: isTv ? 18 : 14,
height: isTv ? 1.45 : 1.4,
),
children: [
if (isEpisode && heroItem.parentIndex != null && heroItem.index != null)
TextSpan(
text: 'S${heroItem.parentIndex}, E${heroItem.index}: ',
style: TextStyle(
fontWeight: FontWeight.bold,
color: alignLeft ? Colors.white : colorScheme.onSurface,
),
),
TextSpan(
text: heroItem.summary?.isNotEmpty == true
? heroItem.summary!
: t.messages.noDescriptionAvailable,
),
],
),
),
] else if (shouldHideSpoiler &&
isEpisode &&
heroItem.parentIndex != null &&
heroItem.index != null) ...[
const SizedBox(height: 12),
Text(
'S${heroItem.parentIndex}, E${heroItem.index}: ${heroItem.title}',
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: alignLeft ? TextAlign.left : TextAlign.center,
style: TextStyle(
color: alignLeft
? Colors.white.withValues(alpha: 0.7)
: colorScheme.onSurface.withValues(alpha: 0.7),
fontSize: isTv ? 18 : 14,
height: isTv ? 1.45 : 1.4,
),
),
],
],
// On large screens: show button after summary
if (alignLeft) ...[SizedBox(height: isTv ? 28 : 20), _buildSmartPlayButton(heroItem)],
],
// On large screens: show button after summary
if (alignLeft) ...[SizedBox(height: isTv ? 28 : 20), _buildSmartPlayButton(heroItem)],
],
),
),
),
),
),
),
],
],
),
),
),
);
+2 -2
View File
@@ -233,7 +233,7 @@ class DownloadsScreenState extends State<DownloadsScreen>
},
onCancel: downloadProvider.cancelDownload,
onDelete: downloadProvider.deleteDownload,
onNavigateLeft: () => MainScreenFocusScope.of(context)?.focusSidebar(),
onNavigateLeft: () => MainScreenFocusScope.of(context, listen: false)?.focusSidebar(),
onBack: focusTabBar,
suppressAutoFocus: suppressAutoFocus,
);
@@ -299,7 +299,7 @@ class _DownloadsGridContentState extends State<_DownloadsGridContent> {
/// Navigate focus to the sidebar
void _navigateToSidebar() {
MainScreenFocusScope.of(context)?.focusSidebar();
MainScreenFocusScope.of(context, listen: false)?.focusSidebar();
}
@override
+29 -26
View File
@@ -228,34 +228,37 @@ class _SyncRuleTileState extends State<_SyncRuleTile> {
borderRadius: 12,
onSelect: () => _onTap(context),
onNavigateRight: () => _switchFocusNode.requestFocus(),
child: ListTile(
dense: true,
visualDensity: const VisualDensity(vertical: -3),
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(12))),
leading: Icon(_leadingIcon(), color: rule.enabled ? Colors.teal : null, size: 20),
title: Text(title, maxLines: 1, overflow: TextOverflow.ellipsis),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(_subtitle(), maxLines: 1, overflow: TextOverflow.ellipsis),
Text(serverLine, maxLines: 1, overflow: TextOverflow.ellipsis),
],
),
trailing: FocusableWrapper(
focusNode: _switchFocusNode,
disableScale: true,
useBackgroundFocus: true,
descendantsAreFocusable: false,
borderRadius: 20,
onSelect: () => downloadProvider.setSyncRuleEnabled(rule.globalKey, !rule.enabled),
onNavigateLeft: () => _rowFocusNode.requestFocus(),
child: Switch(
value: rule.enabled,
onChanged: (value) => downloadProvider.setSyncRuleEnabled(rule.globalKey, value),
child: Material(
type: MaterialType.transparency,
child: ListTile(
dense: true,
visualDensity: const VisualDensity(vertical: -3),
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(12))),
leading: Icon(_leadingIcon(), color: rule.enabled ? Colors.teal : null, size: 20),
title: Text(title, maxLines: 1, overflow: TextOverflow.ellipsis),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(_subtitle(), maxLines: 1, overflow: TextOverflow.ellipsis),
Text(serverLine, maxLines: 1, overflow: TextOverflow.ellipsis),
],
),
trailing: FocusableWrapper(
focusNode: _switchFocusNode,
disableScale: true,
useBackgroundFocus: true,
descendantsAreFocusable: false,
borderRadius: 20,
onSelect: () => downloadProvider.setSyncRuleEnabled(rule.globalKey, !rule.enabled),
onNavigateLeft: () => _rowFocusNode.requestFocus(),
child: Switch(
value: rule.enabled,
onChanged: (value) => downloadProvider.setSyncRuleEnabled(rule.globalKey, value),
),
),
onTap: () => _onTap(context),
),
onTap: () => _onTap(context),
),
),
),
+10 -4
View File
@@ -6,6 +6,8 @@ import '../media/media_item.dart';
import '../media/media_playlist.dart';
import '../mixins/grid_focus_node_mixin.dart';
import '../services/settings_service.dart';
import '../utils/platform_detector.dart';
import '../widgets/ios_status_bar_tap_scroll_to_top.dart';
import '../widgets/settings_builder.dart';
import '../utils/grid_size_calculator.dart';
import '../widgets/focusable_media_card.dart';
@@ -90,11 +92,11 @@ mixin FocusableDetailScreenMixin<T extends StatefulWidget> on State<T>, GridFocu
/// Wrap [slivers] in the standard detail-screen scaffold — PopScope that
/// defers to [handleBackNavigation], plus a Scaffold with a CustomScrollView
/// bound to [scrollController]. Callers build the slivers themselves
/// bound as the primary scroll view. Callers build the slivers themselves
/// (typically `[appBar, ...header, ...buildStateSlivers(), grid]`).
Widget buildDetailScaffold({required List<Widget> slivers}) {
return PopScope(
canPop: false,
canPop: PlatformDetector.isHandheldIOS(context),
onPopInvokedWithResult: (didPop, result) {
if (BackKeyCoordinator.consumeIfHandled()) return;
if (didPop) return;
@@ -103,8 +105,12 @@ mixin FocusableDetailScreenMixin<T extends StatefulWidget> on State<T>, GridFocu
Navigator.pop(context);
}
},
child: Scaffold(
body: CustomScrollView(controller: scrollController, slivers: slivers),
child: PrimaryScrollController(
controller: scrollController,
child: IosStatusBarTapScrollToTop(
controller: scrollController,
child: Scaffold(body: CustomScrollView(primary: true, slivers: slivers)),
),
),
);
}
+124 -114
View File
@@ -12,8 +12,10 @@ import '../services/settings_service.dart';
import '../widgets/settings_builder.dart';
import '../utils/app_logger.dart';
import '../utils/grid_size_calculator.dart';
import '../utils/platform_detector.dart';
import '../utils/provider_extensions.dart';
import '../widgets/focusable_media_card.dart';
import '../widgets/ios_status_bar_tap_scroll_to_top.dart';
import '../widgets/media_grid_delegate.dart';
import '../widgets/desktop_app_bar.dart';
import '../widgets/loading_indicator_box.dart';
@@ -475,7 +477,7 @@ class _HubDetailScreenState extends State<HubDetailScreen>
@override
Widget build(BuildContext context) {
return PopScope(
canPop: false,
canPop: PlatformDetector.isHandheldIOS(context),
onPopInvokedWithResult: (didPop, _) {
if (BackKeyCoordinator.consumeIfHandled()) return;
if (didPop) return;
@@ -484,127 +486,135 @@ class _HubDetailScreenState extends State<HubDetailScreen>
Navigator.pop(context);
}
},
child: OverlaySheetHost(
child: Scaffold(
key: _overlayChildKey,
body: CustomScrollView(
controller: scrollController,
clipBehavior: Clip.none,
slivers: [
CustomAppBar(title: Text(widget.hub.title), pinned: true, actions: buildFocusableAppBarActions()),
if (_errorMessage != null)
SliverErrorState(message: _errorMessage!, onRetry: _loadMoreItems)
else if (_filteredItems.isEmpty && _isLoading)
LoadingIndicatorBox.sliver
else if (_filteredItems.isEmpty)
SliverFillRemaining(child: Center(child: Text(t.hubDetail.noItemsFound)))
else
SettingsBuilder(
prefs: const [
SettingsService.viewMode,
SettingsService.episodePosterMode,
SettingsService.libraryDensity,
],
builder: (context) {
final svc = SettingsService.instanceOrNull!;
final isListMode = svc.read(SettingsService.viewMode) == ViewMode.list;
final episodePosterMode = svc.read(SettingsService.episodePosterMode);
final libraryDensity = svc.read(SettingsService.libraryDensity);
child: PrimaryScrollController(
controller: scrollController,
child: IosStatusBarTapScrollToTop(
controller: scrollController,
child: OverlaySheetHost(
child: Scaffold(
key: _overlayChildKey,
body: CustomScrollView(
primary: true,
clipBehavior: Clip.none,
slivers: [
CustomAppBar(title: Text(widget.hub.title), pinned: true, actions: buildFocusableAppBarActions()),
if (_errorMessage != null)
SliverErrorState(message: _errorMessage!, onRetry: _loadMoreItems)
else if (_filteredItems.isEmpty && _isLoading)
LoadingIndicatorBox.sliver
else if (_filteredItems.isEmpty)
SliverFillRemaining(child: Center(child: Text(t.hubDetail.noItemsFound)))
else
SettingsBuilder(
prefs: const [
SettingsService.viewMode,
SettingsService.episodePosterMode,
SettingsService.libraryDensity,
],
builder: (context) {
final svc = SettingsService.instanceOrNull!;
final isListMode = svc.read(SettingsService.viewMode) == ViewMode.list;
final episodePosterMode = svc.read(SettingsService.episodePosterMode);
final libraryDensity = svc.read(SettingsService.libraryDensity);
// Determine hub content type for layout decisions
final hasEpisodes = _filteredItems.any((item) => item.usesWideAspectRatio(episodePosterMode));
final hasNonEpisodes = _filteredItems.any((item) => !item.usesWideAspectRatio(episodePosterMode));
// Determine hub content type for layout decisions
final hasEpisodes = _filteredItems.any((item) => item.usesWideAspectRatio(episodePosterMode));
final hasNonEpisodes = _filteredItems.any(
(item) => !item.usesWideAspectRatio(episodePosterMode),
);
// Mixed hub = has both episodes AND non-episodes
final isMixedHub = hasEpisodes && hasNonEpisodes;
// Mixed hub = has both episodes AND non-episodes
final isMixedHub = hasEpisodes && hasNonEpisodes;
// Episode-only = all items are episodes with thumbnails
final isEpisodeOnlyHub = hasEpisodes && !hasNonEpisodes;
// Episode-only = all items are episodes with thumbnails
final isEpisodeOnlyHub = hasEpisodes && !hasNonEpisodes;
// Use 16:9 for episode-only hubs OR mixed hubs (with episode thumbnail mode)
final useWideLayout =
episodePosterMode == EpisodePosterMode.episodeThumbnail && (isEpisodeOnlyHub || isMixedHub);
// Use 16:9 for episode-only hubs OR mixed hubs (with episode thumbnail mode)
final useWideLayout =
episodePosterMode == EpisodePosterMode.episodeThumbnail && (isEpisodeOnlyHub || isMixedHub);
if (isListMode) {
return SliverPadding(
padding: const EdgeInsets.all(8),
sliver: SliverList.builder(
itemCount: _filteredItems.length,
itemBuilder: (context, index) {
final item = _filteredItems[index];
final focusNode = _focusNodeForIndex(index);
if (isListMode) {
return SliverPadding(
padding: const EdgeInsets.all(8),
sliver: SliverList.builder(
itemCount: _filteredItems.length,
itemBuilder: (context, index) {
final item = _filteredItems[index];
final focusNode = _focusNodeForIndex(index);
return FocusableMediaCard(
focusNode: focusNode,
item: item,
disableScale: true,
onRefresh: _handleItemRefresh,
onRemoveFromContinueWatching: widget.isInContinueWatching
? _handleRemoveFromContinueWatching
: null,
isInContinueWatching: widget.isInContinueWatching,
onNavigateUp: index == 0 ? navigateToAppBar : null,
onBack: handleBackFromContent,
onFocusChange: (hasFocus) => trackGridItemFocus(index, hasFocus),
mixedHubContext: isMixedHub,
);
},
),
);
}
return SliverPadding(
padding: const EdgeInsets.all(8),
sliver: SliverLayoutBuilder(
builder: (context, constraints) {
final maxExtent = GridSizeCalculator.getMaxCrossAxisExtentWithPadding(
context,
libraryDensity,
16,
);
final columnCount = GridSizeCalculator.getColumnCount(
constraints.crossAxisExtent,
useWideLayout ? maxExtent * 1.8 : maxExtent,
);
return SliverGrid(
gridDelegate: MediaGridDelegate.createDelegate(
context: context,
density: libraryDensity,
usePaddingAware: true,
horizontalPadding: 16,
useWideAspectRatio: useWideLayout,
return FocusableMediaCard(
focusNode: focusNode,
item: item,
disableScale: true,
onRefresh: _handleItemRefresh,
onRemoveFromContinueWatching: widget.isInContinueWatching
? _handleRemoveFromContinueWatching
: null,
isInContinueWatching: widget.isInContinueWatching,
onNavigateUp: index == 0 ? navigateToAppBar : null,
onBack: handleBackFromContent,
onFocusChange: (hasFocus) => trackGridItemFocus(index, hasFocus),
mixedHubContext: isMixedHub,
);
},
),
delegate: SliverChildBuilderDelegate((context, index) {
final item = _filteredItems[index];
final focusNode = _focusNodeForIndex(index);
final isFirstRow = GridSizeCalculator.isFirstRow(index, columnCount);
final isFirstColumn = GridSizeCalculator.isFirstColumn(index, columnCount);
return FocusableMediaCard(
focusNode: focusNode,
item: item,
onRefresh: _handleItemRefresh,
onRemoveFromContinueWatching: widget.isInContinueWatching
? _handleRemoveFromContinueWatching
: null,
isInContinueWatching: widget.isInContinueWatching,
onNavigateUp: isFirstRow ? navigateToAppBar : null,
onNavigateLeft: isFirstColumn ? () {} : null,
onBack: handleBackFromContent,
onFocusChange: (hasFocus) => trackGridItemFocus(index, hasFocus),
mixedHubContext: isMixedHub,
);
}, childCount: _filteredItems.length),
);
},
),
);
},
),
if (_filteredItems.isNotEmpty && (_isLoadingMore || _continuationErrorMessage != null))
_buildContinuationStatusSliver(),
],
}
return SliverPadding(
padding: const EdgeInsets.all(8),
sliver: SliverLayoutBuilder(
builder: (context, constraints) {
final maxExtent = GridSizeCalculator.getMaxCrossAxisExtentWithPadding(
context,
libraryDensity,
16,
);
final columnCount = GridSizeCalculator.getColumnCount(
constraints.crossAxisExtent,
useWideLayout ? maxExtent * 1.8 : maxExtent,
);
return SliverGrid(
gridDelegate: MediaGridDelegate.createDelegate(
context: context,
density: libraryDensity,
usePaddingAware: true,
horizontalPadding: 16,
useWideAspectRatio: useWideLayout,
),
delegate: SliverChildBuilderDelegate((context, index) {
final item = _filteredItems[index];
final focusNode = _focusNodeForIndex(index);
final isFirstRow = GridSizeCalculator.isFirstRow(index, columnCount);
final isFirstColumn = GridSizeCalculator.isFirstColumn(index, columnCount);
return FocusableMediaCard(
focusNode: focusNode,
item: item,
onRefresh: _handleItemRefresh,
onRemoveFromContinueWatching: widget.isInContinueWatching
? _handleRemoveFromContinueWatching
: null,
isInContinueWatching: widget.isInContinueWatching,
onNavigateUp: isFirstRow ? navigateToAppBar : null,
onNavigateLeft: isFirstColumn ? () {} : null,
onBack: handleBackFromContent,
onFocusChange: (hasFocus) => trackGridItemFocus(index, hasFocus),
mixedHubContext: isMixedHub,
);
}, childCount: _filteredItems.length),
);
},
),
);
},
),
if (_filteredItems.isNotEmpty && (_isLoadingMore || _continuationErrorMessage != null))
_buildContinuationStatusSliver(),
],
),
),
),
),
),
+61 -58
View File
@@ -5,6 +5,7 @@ import 'package:flutter/services.dart';
import '../../focus/key_event_utils.dart';
import '../../media/library_first_character.dart';
import '../../widgets/clickable_cursor.dart';
import 'alpha_jump_helper.dart';
/// Vertical strip of letters for jumping through sorted library items.
@@ -209,72 +210,74 @@ class _AlphaJumpBarState extends State<AlphaJumpBar> {
final currentLetter = _nearestDisplayed(widget.currentLetter);
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTapDown: (details) {
final idx = _letterIndexFromDy(details.localPosition.dy, constraints.maxHeight);
setState(() => _highlightedIndex = idx);
_jumpToLetter(_displayed[idx]);
},
onVerticalDragUpdate: (details) {
final idx = _letterIndexFromDy(details.localPosition.dy, constraints.maxHeight);
if (idx != _highlightedIndex) {
return ClickableCursor(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTapDown: (details) {
final idx = _letterIndexFromDy(details.localPosition.dy, constraints.maxHeight);
setState(() => _highlightedIndex = idx);
_jumpToLetter(_displayed[idx]);
}
},
child: Container(
width: 28,
decoration: BoxDecoration(
color: colorScheme.surface.withValues(alpha: 0.7),
borderRadius: const BorderRadius.all(Radius.circular(14)),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: List.generate(_displayed.length, (i) {
final letter = _displayed[i];
final isCurrent = letter == currentLetter && !_hasFocus;
final isHighlighted = _hasFocus && i == _highlightedIndex;
},
onVerticalDragUpdate: (details) {
final idx = _letterIndexFromDy(details.localPosition.dy, constraints.maxHeight);
if (idx != _highlightedIndex) {
setState(() => _highlightedIndex = idx);
_jumpToLetter(_displayed[idx]);
}
},
child: Container(
width: 28,
decoration: BoxDecoration(
color: colorScheme.surface.withValues(alpha: 0.7),
borderRadius: const BorderRadius.all(Radius.circular(14)),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: List.generate(_displayed.length, (i) {
final letter = _displayed[i];
final isCurrent = letter == currentLetter && !_hasFocus;
final isHighlighted = _hasFocus && i == _highlightedIndex;
BoxDecoration? decoration;
if (isHighlighted) {
decoration = BoxDecoration(color: colorScheme.primary, shape: BoxShape.circle);
} else if (isCurrent) {
decoration = BoxDecoration(
color: colorScheme.primary.withValues(alpha: 0.3),
shape: BoxShape.circle,
);
}
BoxDecoration? decoration;
if (isHighlighted) {
decoration = BoxDecoration(color: colorScheme.primary, shape: BoxShape.circle);
} else if (isCurrent) {
decoration = BoxDecoration(
color: colorScheme.primary.withValues(alpha: 0.3),
shape: BoxShape.circle,
);
}
Color letterColor;
if (isHighlighted) {
letterColor = colorScheme.onPrimary;
} else if (isCurrent) {
letterColor = colorScheme.primary;
} else {
letterColor = colorScheme.onSurface;
}
Color letterColor;
if (isHighlighted) {
letterColor = colorScheme.onPrimary;
} else if (isCurrent) {
letterColor = colorScheme.primary;
} else {
letterColor = colorScheme.onSurface;
}
return SizedBox(
height: constraints.maxHeight / _displayed.length,
child: Center(
child: Container(
width: 22,
height: 22,
decoration: decoration,
alignment: Alignment.center,
child: Text(
letter,
style: TextStyle(
fontSize: 10,
fontWeight: (isCurrent || isHighlighted) ? FontWeight.bold : FontWeight.normal,
color: letterColor,
return SizedBox(
height: constraints.maxHeight / _displayed.length,
child: Center(
child: Container(
width: 22,
height: 22,
decoration: decoration,
alignment: Alignment.center,
child: Text(
letter,
style: TextStyle(
fontSize: 10,
fontWeight: (isCurrent || isHighlighted) ? FontWeight.bold : FontWeight.normal,
color: letterColor,
),
),
),
),
),
);
}),
);
}),
),
),
),
);
+20 -17
View File
@@ -176,23 +176,26 @@ class _AlphaScrollHandleState extends State<AlphaScrollHandle> with SingleTicker
Positioned(
right: 0,
top: handleTop - _touchTargetVerticalPadding,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onVerticalDragStart: _onDragStart,
onVerticalDragUpdate: _onDragUpdate,
onVerticalDragEnd: _onDragEnd,
child: SizedBox(
width: _touchTargetWidth,
height: _handleHeight + _touchTargetVerticalPadding * 2,
child: Align(
alignment: Alignment.centerRight,
child: Container(
margin: const EdgeInsets.only(right: 2),
width: _handleWidth,
height: _handleHeight,
decoration: BoxDecoration(
color: colorScheme.onSurface.withValues(alpha: 0.5),
borderRadius: const BorderRadius.all(Radius.circular(_handleRadius)),
child: MouseRegion(
cursor: SystemMouseCursors.resizeUpDown,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onVerticalDragStart: _onDragStart,
onVerticalDragUpdate: _onDragUpdate,
onVerticalDragEnd: _onDragEnd,
child: SizedBox(
width: _touchTargetWidth,
height: _handleHeight + _touchTargetVerticalPadding * 2,
child: Align(
alignment: Alignment.centerRight,
child: Container(
margin: const EdgeInsets.only(right: 2),
width: _handleWidth,
height: _handleHeight,
decoration: BoxDecoration(
color: colorScheme.onSurface.withValues(alpha: 0.5),
borderRadius: const BorderRadius.all(Radius.circular(_handleRadius)),
),
),
),
),
+79 -74
View File
@@ -1022,7 +1022,8 @@ class _LibrariesScreenState extends State<LibrariesScreen>
? allLibraries.where((lib) => lib.globalKey == _selectedLibraryGlobalKey).firstOrNull
: null;
final showMobileTabsRow = selectedLibrary != null && !PlatformDetector.shouldUseSideNavigation(context);
final useSideNavigation = PlatformDetector.shouldUseSideNavigation(context);
final showMobileTabsRow = selectedLibrary != null && !useSideNavigation;
final currentTabIndex = _visibleTabs.isEmpty ? 0 : tabController.index.clamp(0, _visibleTabs.length - 1).toInt();
final currentTabType = _visibleTabs.isEmpty ? null : _visibleTabs[currentTabIndex];
final useTvRecommendedBackdrop = PlatformDetector.isTV() && currentTabType == LibraryTabType.recommended;
@@ -1133,36 +1134,48 @@ class _LibrariesScreenState extends State<LibrariesScreen>
),
);
} else if (selectedLibrary != null) {
Widget buildTabs() {
Widget buildTab(int index) {
final tabContent = _buildTabContent(
_visibleTabs[index],
library: selectedLibrary,
isActive: tabController.index == index,
tabIndex: index,
);
if (useTvRecommendedBackdrop) return tabContent;
return ClipRect(child: tabContent);
}
Widget buildTabs({bool activeOnly = false}) {
if (activeOnly) return buildTab(currentTabIndex);
final children = [for (int i = 0; i < _visibleTabs.length; i++) buildTab(i)];
return TabBarView(
key: ValueKey(_selectedLibraryGlobalKey),
controller: tabController,
// Disable swipe on desktop - trackpad scrolling triggers accidental tab switches
// Disable swipe on desktop/TV - trackpad and d-pad scroll actions can trigger accidental tab switches.
// See: https://github.com/flutter/flutter/issues/11132
physics: PlatformDetector.isDesktop(context) ? const NeverScrollableScrollPhysics() : null,
physics: useSideNavigation ? const NeverScrollableScrollPhysics() : null,
// Wrap each tab in ClipRect so horizontal overflow (e.g. hub rows
// with Clip.none) doesn't bleed into adjacent tabs during swipe transitions.
children: [
for (int i = 0; i < _visibleTabs.length; i++)
ClipRect(
child: _buildTabContent(
_visibleTabs[i],
library: selectedLibrary,
isActive: tabController.index == i,
tabIndex: i,
),
),
],
children: children,
);
}
if (useTvRecommendedBackdrop) {
body = Stack(
fit: StackFit.expand,
children: [
buildTabs(),
Positioned(top: 0, left: 0, right: 0, child: ExcludeFocusTraversal(child: buildTransparentTvTopBar())),
],
body = Focus(
canRequestFocus: false,
skipTraversal: true,
onKeyEvent: (_, event) => event.logicalKey.isDpadDirection ? KeyEventResult.handled : KeyEventResult.ignored,
child: Stack(
fit: StackFit.expand,
clipBehavior: Clip.none,
children: [
buildTabs(activeOnly: true),
Positioned(top: 0, left: 0, right: 0, child: ExcludeFocusTraversal(child: buildTransparentTvTopBar())),
],
),
);
} else {
body = NestedScrollView(
@@ -1416,9 +1429,6 @@ class _LibraryManagementSheetState extends State<_LibraryManagementSheet> {
void _reorderLibraries(int oldIndex, int newIndex) {
setState(() {
if (newIndex > oldIndex) {
newIndex -= 1;
}
final library = _tempLibraries.removeAt(oldIndex);
_tempLibraries.insert(newIndex, library);
});
@@ -1560,7 +1570,7 @@ class _LibraryManagementSheetState extends State<_LibraryManagementSheet> {
return ReorderableListView.builder(
scrollController: _dialogScrollController,
onReorder: _reorderLibraries,
onReorderItem: _reorderLibraries,
itemCount: _tempLibraries.length,
padding: const EdgeInsets.symmetric(vertical: 8),
buildDefaultDragHandles: false,
@@ -1590,7 +1600,7 @@ class _LibraryManagementSheetState extends State<_LibraryManagementSheet> {
return ReorderableListView.builder(
scrollController: scrollController,
onReorder: _reorderLibraries,
onReorderItem: _reorderLibraries,
itemCount: _tempLibraries.length,
padding: const EdgeInsets.symmetric(vertical: 8),
buildDefaultDragHandles: false,
@@ -1641,58 +1651,53 @@ class _LibraryManagementSheetState extends State<_LibraryManagementSheet> {
return Opacity(
key: ValueKey(library.globalKey),
opacity: isHidden ? 0.5 : 1.0,
child: Container(
decoration: BoxDecoration(color: tileColor),
child: ListTile(
leading: Row(
mainAxisSize: MainAxisSize.min,
children: [
ReorderableDragStartListener(
index: index,
child: AppIcon(
isMoving ? Symbols.swap_vert_rounded : Symbols.drag_indicator_rounded,
fill: 1,
color: isMoving ? colorScheme.primary : IconTheme.of(context).color?.withValues(alpha: 0.5),
),
child: ListTile(
tileColor: tileColor,
leading: Row(
mainAxisSize: MainAxisSize.min,
children: [
ReorderableDragStartListener(
index: index,
child: AppIcon(
isMoving ? Symbols.swap_vert_rounded : Symbols.drag_indicator_rounded,
fill: 1,
color: isMoving ? colorScheme.primary : IconTheme.of(context).color?.withValues(alpha: 0.5),
),
const SizedBox(width: 8),
AppIcon(ContentTypeHelper.getLibraryIcon(library.kind.id), fill: 1),
],
),
title: Text(library.title),
subtitle: showServerName
? Text(
library.serverName!,
style: TextStyle(
fontSize: 11,
color: Theme.of(context).textTheme.bodySmall?.color?.withValues(alpha: 0.6),
),
)
: null,
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
decoration: FocusTheme.focusBackgroundDecoration(
isFocused: isVisibilityButtonFocused,
borderRadius: 20,
),
child: IconButton(
icon: AppIcon(isHidden ? Symbols.visibility_off_rounded : Symbols.visibility_rounded, fill: 1),
tooltip: isHidden ? t.libraries.showLibrary : t.libraries.hideLibrary,
onPressed: () => widget.onToggleVisibility(library),
),
const SizedBox(width: 8),
AppIcon(ContentTypeHelper.getLibraryIcon(library.kind.id), fill: 1),
],
),
title: Text(library.title),
subtitle: showServerName
? Text(
library.serverName!,
style: TextStyle(
fontSize: 11,
color: Theme.of(context).textTheme.bodySmall?.color?.withValues(alpha: 0.6),
),
)
: null,
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
decoration: FocusTheme.focusBackgroundDecoration(isFocused: isVisibilityButtonFocused, borderRadius: 20),
child: IconButton(
icon: AppIcon(isHidden ? Symbols.visibility_off_rounded : Symbols.visibility_rounded, fill: 1),
tooltip: isHidden ? t.libraries.showLibrary : t.libraries.hideLibrary,
onPressed: () => widget.onToggleVisibility(library),
),
Container(
decoration: FocusTheme.focusBackgroundDecoration(isFocused: isOptionsButtonFocused, borderRadius: 20),
child: IconButton(
icon: const AppIcon(Symbols.more_vert_rounded, fill: 1),
tooltip: t.libraries.libraryOptions,
onPressed: () => _showLibraryMenuBottomSheet(context, library),
),
),
Container(
decoration: FocusTheme.focusBackgroundDecoration(isFocused: isOptionsButtonFocused, borderRadius: 20),
child: IconButton(
icon: const AppIcon(Symbols.more_vert_rounded, fill: 1),
tooltip: t.libraries.libraryOptions,
onPressed: () => _showLibraryMenuBottomSheet(context, library),
),
],
),
),
],
),
),
);
@@ -954,7 +954,7 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<MediaItem, LibraryBrows
/// Navigate focus to the sidebar
void _navigateToSidebar() {
MainScreenFocusScope.of(context)?.focusSidebar();
MainScreenFocusScope.of(context, listen: false)?.focusSidebar();
}
/// Navigate focus to the alpha jump bar
@@ -38,7 +38,7 @@ class LibraryCollectionsTab extends BaseLibraryTab<MediaItem> {
class _LibraryCollectionsTabState extends BaseLibraryTabState<MediaItem, LibraryCollectionsTab>
with LibraryTabFocusMixin<LibraryCollectionsTab>, PaginatedItemLoader<MediaItem, LibraryCollectionsTab> {
static const int _pageSize = 200;
static const int _pageSize = 36;
@override
String get focusNodeDebugLabel => 'collections_first_item';
@@ -176,7 +176,7 @@ class _LibraryCollectionsTabState extends BaseLibraryTabState<MediaItem, Library
}
void _navigateToSidebar() {
MainScreenFocusScope.of(context)?.focusSidebar();
MainScreenFocusScope.of(context, listen: false)?.focusSidebar();
}
@override
@@ -178,7 +178,7 @@ class _LibraryPlaylistsTabState extends BaseLibraryTabState<MediaPlaylist, Libra
}
void _navigateToSidebar() {
MainScreenFocusScope.of(context)?.focusSidebar();
MainScreenFocusScope.of(context, listen: false)?.focusSidebar();
}
@override
@@ -245,7 +245,7 @@ class _LibraryRecommendedTabState extends BaseLibraryTabState<MediaHub, LibraryR
/// Navigate focus to the sidebar
void _navigateToSidebar() {
MainScreenFocusScope.of(context)?.focusSidebar();
MainScreenFocusScope.of(context, listen: false)?.focusSidebar();
}
// Extra top padding for focus decoration (scale + border extends beyond item bounds)
@@ -256,7 +256,10 @@ class _LibraryRecommendedTabState extends BaseLibraryTabState<MediaHub, LibraryR
_ensureHubKeys(items.length);
if (PlatformDetector.isTV()) {
return _buildTvContent(items);
return SettingsBuilder(
prefs: const [SettingsService.hideSpoilers, SettingsService.libraryDensity, SettingsService.episodePosterMode],
builder: (context) => _buildTvContent(items),
);
}
return CustomScrollView(
@@ -296,26 +299,57 @@ class _LibraryRecommendedTabState extends BaseLibraryTabState<MediaHub, LibraryR
final spotlight = _effectiveSpotlightItem;
final size = MediaQuery.sizeOf(context);
final theme = Theme.of(context);
final svc = SettingsService.instanceOrNull!;
final client = context.tryGetMediaClientForServer(spotlight?.serverId ?? widget.library.serverId);
final spotlightTop = (size.height * 0.1).clamp(96.0, 150.0).toDouble();
final spotlightBottom = (size.height * 0.53).clamp(180.0, 900.0).toDouble();
final spotlightLeft = (24 * TvLayoutConstants.scaleForSize(size)).clamp(18.0, 40.0).toDouble();
final scale = TvLayoutConstants.scaleForSize(size);
final sidebarBleed = MainScreenFocusScope.sideNavigationBleedOf(
context,
alwaysKeepSidebarOpen: svc.read(SettingsService.alwaysKeepSidebarOpen),
);
final railSize = MainScreenFocusScope.foregroundSizeOf(context);
final fullBleedWidth = MainScreenFocusScope.fullBleedWidthOf(context);
final foregroundLeft = MainScreenFocusScope.foregroundLeftOf(context);
final railHeight = tvHubs.isEmpty
? 0.0
: TvBrowseRailLayout.estimateHeight(
size: railSize,
hubs: tvHubs,
density: svc.read(SettingsService.libraryDensity),
episodePosterMode: svc.read(SettingsService.episodePosterMode),
tallPosterScale: TvBrowseRailLayout.compactTallPosterScale,
);
final spotlightTop = (size.height * 0.075).clamp(64.0 * scale, 120.0 * scale).toDouble();
final minimumSpotlightBottom = railHeight + (8 * scale);
final baseSpotlightBottom = (size.height * 0.48).clamp(160.0, 820.0).toDouble();
final desiredSpotlightBottom = minimumSpotlightBottom > baseSpotlightBottom
? minimumSpotlightBottom
: baseSpotlightBottom;
final maxSpotlightBottom = (size.height - spotlightTop - (96 * scale)).clamp(0.0, double.infinity).toDouble();
final spotlightBottom = desiredSpotlightBottom > maxSpotlightBottom ? maxSpotlightBottom : desiredSpotlightBottom;
final spotlightLeft = (24 * scale).clamp(18.0, 40.0).toDouble();
return Material(
color: theme.scaffoldBackgroundColor,
child: SizedBox.expand(
child: Stack(
fit: StackFit.expand,
clipBehavior: Clip.none,
children: [
TvSpotlightBackground(
item: spotlight,
client: client,
hideSpoilers: context.settingsRead(SettingsService.hideSpoilers),
contentTop: spotlightTop,
contentBottom: spotlightBottom,
contentLeft: spotlightLeft,
compact: true,
showPrimaryAction: false,
Positioned(
top: 0,
bottom: 0,
left: -foregroundLeft,
width: fullBleedWidth,
child: TvSpotlightBackground(
item: spotlight,
client: client,
hideSpoilers: svc.read(SettingsService.hideSpoilers),
contentTop: spotlightTop,
contentBottom: spotlightBottom,
contentLeft: spotlightLeft + foregroundLeft,
compact: true,
showPrimaryAction: false,
),
),
if (tvHubs.isNotEmpty)
Positioned(
@@ -333,6 +367,8 @@ class _LibraryRecommendedTabState extends BaseLibraryTabState<MediaHub, LibraryR
onNavigateUp: widget.onNavigateToChrome ?? widget.onBack,
onNavigateToSidebar: _navigateToSidebar,
onBack: widget.onBack,
tallPosterScale: TvBrowseRailLayout.compactTallPosterScale,
backgroundBleedLeft: sidebarBleed,
),
),
],
+29 -7
View File
@@ -13,6 +13,7 @@ import '../../services/image_cache_service.dart';
import '../../utils/app_logger.dart';
import '../../utils/formatters.dart';
import '../../widgets/app_icon.dart';
import '../../widgets/collapsible_text.dart';
import '../../widgets/overlay_sheet.dart';
import '../../widgets/optimized_media_image.dart' show blurArtwork;
import 'livetv_recording_actions.dart';
@@ -86,8 +87,10 @@ class _ProgramDetailsSheetContent extends StatefulWidget {
class _ProgramDetailsSheetContentState extends State<_ProgramDetailsSheetContent> with MountedSetStateMixin {
final List<FocusNode> _focusNodes = [];
final FocusNode _summaryFocusNode = FocusNode(debugLabel: 'program_sheet_summary');
MediaSubscription? _existingSubscription;
bool _checkedMapping = false;
bool _summaryOverflows = false;
bool get _canRecord {
final client = widget.client;
@@ -112,6 +115,7 @@ class _ProgramDetailsSheetContentState extends State<_ProgramDetailsSheetContent
for (final node in _focusNodes) {
node.dispose();
}
_summaryFocusNode.dispose();
super.dispose();
}
@@ -155,6 +159,11 @@ class _ProgramDetailsSheetContentState extends State<_ProgramDetailsSheetContent
void _closeSheet() => OverlaySheetController.closeAdaptive(context);
void _handleSummaryOverflowChanged(bool overflows) {
if (_summaryOverflows == overflows) return;
setStateIfMounted(() => _summaryOverflows = overflows);
}
List<_SheetAction> _buildActions() {
final program = widget.program;
final client = widget.client;
@@ -214,7 +223,7 @@ class _ProgramDetailsSheetContentState extends State<_ProgramDetailsSheetContent
return actions;
}
Widget _buildButton(_SheetAction action, int index, int total) {
Widget _buildButton(_SheetAction action, int index, int total, {VoidCallback? onNavigateUp}) {
final node = _focusNodes[index];
final child = action.style == _ActionStyle.filled
? FilledButton.icon(
@@ -235,6 +244,7 @@ class _ProgramDetailsSheetContentState extends State<_ProgramDetailsSheetContent
onPressed: action.onPressed,
onNavigateLeft: index > 0 ? () => _focusButton(index - 1) : null,
onNavigateRight: index < total - 1 ? () => _focusButton(index + 1) : null,
onNavigateUp: onNavigateUp,
onBack: _closeSheet,
child: child,
);
@@ -247,14 +257,24 @@ class _ProgramDetailsSheetContentState extends State<_ProgramDetailsSheetContent
final channel = widget.channel;
final actions = _buildActions();
_ensureFocusNodes(actions.length);
final summary = program.summary;
final hasSummary = summary != null && summary.isNotEmpty;
final canFocusSummary = hasSummary && _summaryOverflows;
final buttons = <Widget>[];
for (var i = 0; i < actions.length; i++) {
if (i > 0) buttons.add(const SizedBox(width: 8));
buttons.add(_buildButton(actions[i], i, actions.length));
buttons.add(
_buildButton(
actions[i],
i,
actions.length,
onNavigateUp: canFocusSummary ? () => _summaryFocusNode.requestFocus() : null,
),
);
}
return Padding(
return SingleChildScrollView(
padding: const EdgeInsets.all(20),
child: Column(
mainAxisSize: MainAxisSize.min,
@@ -311,13 +331,15 @@ class _ProgramDetailsSheetContentState extends State<_ProgramDetailsSheetContent
].join(' · '),
style: theme.textTheme.bodySmall?.copyWith(color: theme.colorScheme.onSurfaceVariant),
),
if (program.summary != null && program.summary!.isNotEmpty) ...[
if (hasSummary) ...[
const SizedBox(height: 12),
Text(
program.summary!,
CollapsibleText(
text: summary,
style: theme.textTheme.bodyMedium,
maxLines: 4,
overflow: TextOverflow.ellipsis,
focusNode: _summaryFocusNode,
onOverflowChanged: _handleSummaryOverflowChanged,
onNavigateDown: buttons.isNotEmpty ? () => _focusButton(0) : null,
),
],
],
+43 -48
View File
@@ -194,9 +194,6 @@ class _ReorderFavoritesSheetState extends State<ReorderFavoritesSheet> {
void _onReorder(int oldIndex, int newIndex) {
setState(() {
if (newIndex > oldIndex) {
newIndex -= 1;
}
final item = _tempFavorites.removeAt(oldIndex);
_tempFavorites.insert(newIndex, item);
});
@@ -233,7 +230,7 @@ class _ReorderFavoritesSheetState extends State<ReorderFavoritesSheet> {
onKeyEvent: _handleKeyEvent,
child: ReorderableListView.builder(
scrollController: _scrollController,
onReorder: _onReorder,
onReorderItem: _onReorder,
itemCount: _tempFavorites.length,
padding: const EdgeInsets.symmetric(vertical: 8),
buildDefaultDragHandles: false,
@@ -284,53 +281,51 @@ class _ReorderFavoritesSheetState extends State<ReorderFavoritesSheet> {
final displayName = channel?.displayName ?? fav.title ?? fav.id;
final channelNumber = channel?.number ?? fav.vcn;
return Container(
return ListTile(
key: key,
decoration: BoxDecoration(color: tileColor),
child: ListTile(
leading: Row(
mainAxisSize: MainAxisSize.min,
children: [
ReorderableDragStartListener(
index: index,
child: AppIcon(
isMoving ? Symbols.swap_vert_rounded : Symbols.drag_indicator_rounded,
fill: 1,
color: isMoving ? colorScheme.primary : IconTheme.of(context).color?.withValues(alpha: 0.5),
),
tileColor: tileColor,
leading: Row(
mainAxisSize: MainAxisSize.min,
children: [
ReorderableDragStartListener(
index: index,
child: AppIcon(
isMoving ? Symbols.swap_vert_rounded : Symbols.drag_indicator_rounded,
fill: 1,
color: isMoving ? colorScheme.primary : IconTheme.of(context).color?.withValues(alpha: 0.5),
),
const SizedBox(width: 8),
SizedBox(
width: 40,
height: 40,
child: channel?.thumb != null && client != null
? OptimizedMediaImage.thumb(
client: client,
imagePath: channel!.thumb,
width: 40,
height: 40,
fit: BoxFit.contain,
)
: Center(child: AppIcon(Symbols.live_tv_rounded, fill: 1, color: colorScheme.onSurfaceVariant)),
),
],
),
title: Text(displayName, maxLines: 1, overflow: TextOverflow.ellipsis),
subtitle: channelNumber != null
? Text(
channelNumber,
style: TextStyle(
fontSize: 11,
color: Theme.of(context).textTheme.bodySmall?.color?.withValues(alpha: 0.6),
),
)
: null,
trailing: Container(
decoration: FocusTheme.focusBackgroundDecoration(isFocused: isRemoveButtonFocused, borderRadius: 20),
child: IconButton(
icon: const AppIcon(Symbols.close_rounded, fill: 1, size: 20),
onPressed: () => _removeItem(index),
),
const SizedBox(width: 8),
SizedBox(
width: 40,
height: 40,
child: channel?.thumb != null && client != null
? OptimizedMediaImage.thumb(
client: client,
imagePath: channel!.thumb,
width: 40,
height: 40,
fit: BoxFit.contain,
)
: Center(child: AppIcon(Symbols.live_tv_rounded, fill: 1, color: colorScheme.onSurfaceVariant)),
),
],
),
title: Text(displayName, maxLines: 1, overflow: TextOverflow.ellipsis),
subtitle: channelNumber != null
? Text(
channelNumber,
style: TextStyle(
fontSize: 11,
color: Theme.of(context).textTheme.bodySmall?.color?.withValues(alpha: 0.6),
),
)
: null,
trailing: Container(
decoration: FocusTheme.focusBackgroundDecoration(isFocused: isRemoveButtonFocused, borderRadius: 20),
child: IconButton(
icon: const AppIcon(Symbols.close_rounded, fill: 1, size: 20),
onPressed: () => _removeItem(index),
),
),
);
+38 -18
View File
@@ -23,6 +23,7 @@ import '../../../utils/live_tv_matching.dart';
import '../../../utils/media_image_helper.dart';
import '../../../utils/live_tv_player_navigation.dart';
import '../../../widgets/app_icon.dart';
import '../../../widgets/clickable_cursor.dart';
import '../../../widgets/overlay_sheet.dart';
import '../../../widgets/optimized_media_image.dart';
import '../program_details_sheet.dart';
@@ -308,19 +309,34 @@ class GuideTabState extends State<GuideTab> with MountedSetStateMixin {
try {
final grabs = await client.liveTv.fetchScheduledRecordings();
for (final grab in grabs) {
if (!_isActiveScheduledGrab(grab)) continue;
final program = grab.program;
if (program == null) continue;
keys.addAll(_recordingKeysForProgram(program, fallbackServerId: serverId));
_addRecordingKeysForGrab(grab, serverId: serverId, keys: keys);
}
} catch (e) {
appLogger.d('Failed to load scheduled recordings for $serverId', error: e);
}
try {
final rules = await client.liveTv.fetchRecordingRules(includeGrabs: true, includeStorage: false);
for (final rule in rules) {
for (final grab in rule.grabOperations) {
_addRecordingKeysForGrab(grab, serverId: serverId, keys: keys);
}
}
} catch (e) {
appLogger.d('Failed to load active recording grabs for $serverId', error: e);
}
}
void _addRecordingKeysForGrab(MediaGrabOperation grab, {required String serverId, required Set<String> keys}) {
if (!_isActiveScheduledGrab(grab)) return;
final program = grab.program;
if (program == null) return;
keys.addAll(_recordingKeysForProgram(program, fallbackServerId: serverId));
}
bool _isActiveScheduledGrab(MediaGrabOperation grab) {
final status = grab.status?.toLowerCase();
return status == null || status.isEmpty || status == 'scheduled' || status == 'grabbing';
final status = grab.status?.trim().toLowerCase();
return status == null || status.isEmpty || status == 'scheduled' || status == 'grabbing' || status == 'recording';
}
bool _isRecordingScheduled(LiveTvProgram program) {
@@ -990,18 +1006,20 @@ class GuideTabState extends State<GuideTab> with MountedSetStateMixin {
_timeNavFocusWrap(
index: 1,
theme: theme,
child: GestureDetector(
key: _dayPickerKey,
onTap: _showDayPicker,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(dayLabel, style: theme.textTheme.labelLarge),
const SizedBox(width: 2),
AppIcon(Symbols.arrow_drop_down_rounded, size: 18, color: theme.colorScheme.onSurface),
],
child: ClickableCursor(
child: GestureDetector(
key: _dayPickerKey,
onTap: _showDayPicker,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(dayLabel, style: theme.textTheme.labelLarge),
const SizedBox(width: 2),
AppIcon(Symbols.arrow_drop_down_rounded, size: 18, color: theme.colorScheme.onSurface),
],
),
),
),
),
@@ -1276,6 +1294,7 @@ class GuideTabState extends State<GuideTab> with MountedSetStateMixin {
side: isFocused ? BorderSide(color: theme.colorScheme.primary, width: 2) : BorderSide.none,
),
child: InkWell(
mouseCursor: SystemMouseCursors.click,
canRequestFocus: false,
onTap: () => _showProgramDetails(channel, program),
child: Container(
@@ -1432,6 +1451,7 @@ class _ChannelCellState extends State<_ChannelCell> {
final showAction = _hovered || widget.isFocused;
return MouseRegion(
cursor: SystemMouseCursors.click,
onEnter: (_) => setState(() => _hovered = true),
onExit: (_) => setState(() => _hovered = false),
child: GestureDetector(

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