Compare commits

...
78 Commits
Author SHA1 Message Date
github-actions[bot] 8f24bd478a chore: bump version to 1.21.3 2026-02-26 03:32:43 +00:00
edde746 a32422bb5e chore: remove unused formatRelativeTime 2026-02-26 04:30:48 +01:00
edde746 e25fb4c10f fix: ExoPlayer resume position lost on tunneling change 2026-02-26 04:19:17 +01:00
edde746 5740d93a35 fix: download from homepage failing 2026-02-26 03:41:27 +01:00
edde746 98776b40f5 fix: show sync controls as compact top bar
close #548
2026-02-26 03:41:19 +01:00
edde746 3418241c04 fix: disable tunneling for FFmpeg-only audio codecs 2026-02-26 02:14:22 +01:00
edde746 659b59d450 fix: remove companion remote connection history 2026-02-26 01:08:46 +01:00
edde746 acf91107ad fix: split combined recently added hubs by library
closes #552
2026-02-26 00:30:23 +01:00
edde746 3279bc7578 fix: sanitize dots in download filenames
close #556
2026-02-26 00:02:14 +01:00
edde746 383351d769 fix: detect invalid tokens and prevent startup hangs
close #553
2026-02-25 23:59:19 +01:00
edde746 0f4920cc18 fix: reduce ExoPlayer buffer limits
close #546
2026-02-25 23:43:43 +01:00
edde746 3460fa8b32 fix: download retry failing with metadata cache miss
close #555
2026-02-25 23:25:10 +01:00
edde746 bf3f5282f2 fix: skip intro button staying on screen
close #550
2026-02-25 23:03:07 +01:00
edde746 c480e44e0e fix: skeleton card visibility and layout 2026-02-25 22:54:15 +01:00
edde746 728c4854a5 feat: sparse-map pagination for library browse 2026-02-25 18:14:48 +01:00
edde746 6188d21c3d perf: limit concurrent image transcode requests 2026-02-25 17:01:43 +01:00
edde746 88d7e2d319 feat: add audio passthrough toggle for desktop 2026-02-25 16:38:58 +01:00
edde746 fc5fcbb0db fix: google tv virtual remote dpad 2026-02-25 16:13:53 +01:00
edde746 93f693c5c4 fix: macos folder picker entitlement 2026-02-25 15:59:06 +01:00
edde746andGitHub aa6a5ec234 docs: update HDR platform support info 2026-02-25 15:18:39 +01:00
github-actions[bot] 4f4192b261 chore: update cask to 1.21.2 2026-02-25 09:03:19 +00:00
github-actions[bot] cb6da03c10 chore: bump version to 1.21.2 2026-02-25 08:24:36 +00:00
edde746 b193a23524 fix: video stuck on still frame after long pause
close #536
2026-02-25 08:17:14 +01:00
edde746 cb39945a9d fix: watch together clock drift
close #534
2026-02-25 07:50:17 +01:00
edde746 45e792e3ab fix: ESC exits fullscreen without closing video player
close #533
2026-02-25 07:17:24 +01:00
edde746 50660013cc fix: restore tap/click handling in folder tree view 2026-02-24 23:54:42 +01:00
edde746 e0489b68d5 fix: use theme colors in video control sheets for light mode support 2026-02-24 23:40:08 +01:00
edde746 af41d937c3 fix: remove DVR recording features (plex pass)
close #530
2026-02-24 23:13:38 +01:00
edde746 238391b886 fix: appcast single item with release notes 2026-02-24 18:07:32 +01:00
edde746 1eec3d280b fix: WinSparkle platform filtering and version display 2026-02-24 17:42:41 +01:00
github-actions[bot] 8ed45e309c chore: bump version to 1.21.1 2026-02-24 16:06:25 +00:00
edde746 2f488bd395 fix: disable ambient lighting in picture-in-picture mode
closes #528
2026-02-24 17:05:41 +01:00
edde746 d40890c344 fix: restore long press on seasons and episodes 2026-02-24 17:02:12 +01:00
github-actions[bot] de5566fb14 chore: update cask to 1.21.0 2026-02-24 13:30:45 +00:00
github-actions[bot] 9e8bb9909d chore: bump version to 1.21.0 2026-02-24 13:13:38 +00:00
edde746 eea98e0cc9 fix: pass version to installer, silent update, launch after install 2026-02-24 14:05:46 +01:00
edde746 6af3a2974e fix: CRLF in windows signature metadata, use generic os 2026-02-24 13:59:44 +01:00
edde746 da64c69724 fix: inline EdDSA pubkey as resource string 2026-02-24 13:56:38 +01:00
edde746 d044ae902c fix: CRLF in base64 key on windows CI 2026-02-24 13:30:15 +01:00
edde746 350102e3cb fix: write raw key to avoid PEM indentation issue 2026-02-24 12:50:46 +01:00
edde746 6674ee3551 fix: lightweight windows EdDSA signing in CI 2026-02-24 12:30:56 +01:00
edde746 eda7f6515e fix: override auto_updater_windows to fork with WinSparkle 0.9.2 2026-02-24 12:11:46 +01:00
edde746 145ff88ccf fix: use dart-lang/setup-dart for windows signing 2026-02-24 12:00:47 +01:00
edde746 070c8e336d feat: switch to auto_updater fork with WinSparkle 0.9.2 EdDSA 2026-02-24 11:57:34 +01:00
edde746 78049c981b fix: black screen when closing manage libraries sheet 2026-02-24 11:05:55 +01:00
edde746 490066318c fix: CI secrets condition in workflow 2026-02-24 10:16:39 +01:00
edde746 4083837c3b feat: still watching prompt on sleep timer expiry 2026-02-24 10:08:50 +01:00
edde746 3fc1540f41 feat: make companion remote dialog use focusablebutton 2026-02-24 04:56:33 +01:00
edde746 403df31907 feat: native auto-update
close #521
2026-02-24 04:04:02 +01:00
edde746 d1d5b808bb fix: reduce widget tree depth 2026-02-24 02:40:04 +01:00
edde746 9528b8f61a feat: multi-IP QR code for companion remote 2026-02-24 02:31:24 +01:00
edde746 2276750704 fix: memory-aware buffer limits 2026-02-24 00:56:09 +01:00
edde746 a1a030a130 fix: create render context before file load 2026-02-24 00:07:09 +01:00
edde746 3d9c6b203f fix: isolated EGL context for mpv rendering 2026-02-23 18:20:08 +01:00
edde746 e23f472d78 refactor: centralize globalKey construction via buildGlobalKey() 2026-02-23 17:53:20 +01:00
edde746 ef2c464dd4 fix: GL proc address detection 2026-02-23 17:48:42 +01:00
edde746 778ac50116 perf: fast offline startup
close #511
2026-02-23 14:09:13 +01:00
edde746 8f50da4a75 fix: resolve all dart analyze warnings
- Migrate RadioListTile to RadioGroup API (Flutter 3.32+)
- Guard BuildContext usage across async gaps
- Use const BorderRadius.all / EdgeInsets.all constructors
- Extract nested ternaries into helpers
- Prefer .first over [0], ??= over if-null assignment
- Prefix unused FocusNode params with _
- Add library directive for dangling doc comments
2026-02-23 13:50:56 +01:00
edde746 8918bdc93e fix: add OverlaySheetHost to desktop/TV navigation path 2026-02-23 13:11:11 +01:00
edde746 a599920ab4 fix: overlay sheet theme and scope on mobile 2026-02-23 13:00:42 +01:00
edde746 4095cc27e1 perf: reduce redundant metadata API requests 2026-02-23 11:43:42 +01:00
edde746 1eb88e23f5 perf: cache-first metadata fetching for playback 2026-02-23 10:51:25 +01:00
edde746 edbe2a06be refactor: deduplicate sheet, key handler, and service patterns 2026-02-23 10:25:57 +01:00
github-actions[bot] e9307c87f0 chore: update cask to 1.20.0 2026-02-23 08:08:52 +00:00
edde746 964b89aa67 fix(windows): release gamepad handles on window blur 2026-02-23 08:05:55 +01:00
edde746 3670383fde fix(desktop): profile switch on every window focus
close #517
2026-02-23 06:36:49 +01:00
github-actions[bot] 1855549ccb chore: bump version to 1.20.0 2026-02-23 04:48:18 +00:00
edde746 26ff55e005 fix(android): auto buffer size to prevent OOM 2026-02-23 05:42:04 +01:00
edde746 6916b386eb fix(android): SurfaceControl crash on player dispose 2026-02-23 05:28:10 +01:00
edde746 1860a1cea6 feat: dpadnavigation for folder tree view
close #513
2026-02-23 03:42:07 +01:00
edde746 7802beb41b feat: play/shuffle folder contents
close #514
2026-02-23 02:19:57 +01:00
edde746 4eb55885f7 feat: metadata editing
close #338
2026-02-22 17:56:13 +01:00
edde746 03fc1c1109 fix: auto-focus first content item on settings screens in dpad mode 2026-02-22 15:58:10 +01:00
edde746 d709d638c7 fix: use dpad controls for settings dialogs in keyboard nav mode 2026-02-22 15:20:16 +01:00
edde746 7f8d4c7946 fix: dpad focus for dialogs and buttons 2026-02-22 14:50:59 +01:00
edde746 1536feb034 fix: dpad focus on pushed screens
close #510
2026-02-22 11:46:47 +01:00
edde746 83c0cce7f3 fix: ignore gamepad input when window is unfocused
close #509
2026-02-22 10:29:52 +01:00
edde746 389a4dcc25 fix: android debug info path 2026-02-22 05:42:30 +01:00
159 changed files with 8297 additions and 4597 deletions
+149 -8
View File
@@ -217,11 +217,19 @@ jobs:
APP_PATH="build/macos/Build/Products/Release/Plezy.app"
# Sign all frameworks and dylibs first (inside-out signing)
find "$APP_PATH/Contents/Frameworks" -name "*.framework" -o -name "*.dylib" | while read framework; do
echo "Signing: $framework"
codesign --force --sign "$IDENTITY" --timestamp --options runtime "$framework"
done
# Deep sign everything inside-out: executables, dylibs, XPC services, app bundles, frameworks
find "$APP_PATH/Contents/Frameworks" \( -name "*.xpc" -o -name "*.app" -o -name "*.framework" -o -name "*.dylib" \) -print0 \
| sort -zr \
| while IFS= read -r -d '' item; do
echo "Signing: $item"
codesign --force --sign "$IDENTITY" --timestamp --options runtime "$item"
done
# Sign any remaining bare executables (e.g. Sparkle's Autoupdate)
find "$APP_PATH/Contents/Frameworks" -type f -perm +111 ! -name "*.dylib" ! -path "*/Headers/*" ! -path "*/Modules/*" -print0 \
| while IFS= read -r -d '' exe; do
codesign --force --sign "$IDENTITY" --timestamp --options runtime "$exe" 2>/dev/null || true
done
# Sign the app bundle itself
echo "Signing app bundle: $APP_PATH"
@@ -269,16 +277,37 @@ jobs:
ln -s /Applications dmg-staging/Applications
hdiutil create -format ULMO -srcfolder dmg-staging -volname "Plezy" plezy-macos.dmg
- name: Sign DMG for Sparkle (EdDSA)
if: env.SPARKLE_PRIVATE_KEY != ''
env:
SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY }}
run: |
printf -- "-----BEGIN ED25519 PRIVATE KEY-----\n%s\n-----END ED25519 PRIVATE KEY-----\n" "$SPARKLE_PRIVATE_KEY" > ed25519_key.pem
OUTPUT=$(dart run auto_updater:sign_update plezy-macos.dmg ed25519_key.pem)
rm ed25519_key.pem
# Extract edSignature value from output like: sparkle:edSignature="..." length="..."
SIGNATURE=$(echo "$OUTPUT" | grep -o 'edSignature="[^"]*"' | sed 's/edSignature="//;s/"//')
echo "MACOS_ED_SIGNATURE=$SIGNATURE" >> $GITHUB_ENV
echo "MACOS_DMG_SIZE=$(stat -f%z plezy-macos.dmg)" >> $GITHUB_ENV
- name: Attest macOS DMG
uses: actions/attest-build-provenance@v2
with:
subject-path: plezy-macos.dmg
- name: Write macOS signature metadata
run: |
echo "${{ env.MACOS_ED_SIGNATURE }}" > macos-ed-signature.txt
echo "${{ env.MACOS_DMG_SIZE }}" > macos-dmg-size.txt
- name: Upload macOS DMG
uses: actions/upload-artifact@v4
with:
name: macos-dmg
path: plezy-macos.dmg
path: |
plezy-macos.dmg
macos-ed-signature.txt
macos-dmg-size.txt
build-windows-x64:
runs-on: windows-latest
@@ -361,6 +390,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Dart
uses: dart-lang/setup-dart@v1
- name: Download x64 build
uses: actions/download-artifact@v4
with:
@@ -373,8 +405,34 @@ jobs:
name: windows-arm64-build
path: build-arm64
- name: Read version from pubspec
id: version
shell: pwsh
run: |
$v = (Select-String -Path pubspec.yaml -Pattern '^version:\s*(\S+)').Matches[0].Groups[1].Value -replace '\+.*'
echo "version=$v" >> $env:GITHUB_OUTPUT
- name: Build installer and portables
run: .\windows\build-installer.ps1 -X64BuildDir "build-x64" -Arm64BuildDir "build-arm64"
run: .\windows\build-installer.ps1 -X64BuildDir "build-x64" -Arm64BuildDir "build-arm64" -Version "${{ steps.version.outputs.version }}"
- name: Sign installer for WinSparkle (EdDSA)
if: env.SPARKLE_PRIVATE_KEY != ''
env:
SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY }}
shell: pwsh
run: |
mkdir _signer | Out-Null
@{name="signer"; environment=@{sdk=">=3.0.0 <4.0.0"}; dependencies=@{cryptography="^2.7.0"}} | ConvertTo-Json -Depth 3 | Out-File _signer/pubspec.yaml
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/edde746/auto_updater/main/packages/auto_updater/bin/sign_update.dart" -OutFile _signer/sign.dart
Push-Location _signer
dart pub get
Set-Content -Path ed25519_key.pem -Value $env:SPARKLE_PRIVATE_KEY -Encoding ascii -NoNewline
$output = dart run sign.dart ../plezy-windows-installer.exe ed25519_key.pem
Pop-Location
Remove-Item _signer -Recurse -Force
$sig = [regex]::Match($output, 'edSignature="([^"]*)"').Groups[1].Value
Set-Content -Path win-ed-signature.txt -Value $sig -Encoding ascii -NoNewline
Set-Content -Path win-installer-size.txt -Value (Get-Item plezy-windows-installer.exe).Length.ToString() -Encoding ascii -NoNewline
- name: Attest Windows artifacts
uses: actions/attest-build-provenance@v2
@@ -400,7 +458,10 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: windows-installer
path: plezy-windows-installer.exe
path: |
plezy-windows-installer.exe
win-ed-signature.txt
win-installer-size.txt
build-linux-x64:
runs-on: ubuntu-latest
@@ -634,6 +695,11 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: pubspec.yaml
sparse-checkout-cone-mode: false
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
@@ -642,6 +708,80 @@ jobs:
- name: Display structure of downloaded files
run: ls -R artifacts
- name: Read version from pubspec.yaml
id: version
run: |
VERSION=$(grep '^version:' pubspec.yaml | sed 's/version: //' | sed 's/+.*//')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Generate appcast.xml
run: |
VERSION="${{ steps.version.outputs.version }}"
# Read macOS signature metadata (may be empty if secrets not configured)
MACOS_ED_SIG=""
MACOS_DMG_SIZE="0"
if [ -f artifacts/macos-dmg/macos-ed-signature.txt ]; then
MACOS_ED_SIG=$(cat artifacts/macos-dmg/macos-ed-signature.txt)
fi
if [ -f artifacts/macos-dmg/macos-dmg-size.txt ]; then
MACOS_DMG_SIZE=$(cat artifacts/macos-dmg/macos-dmg-size.txt)
fi
# Read Windows signature metadata (may be empty if secrets not configured)
WIN_ED_SIG=""
WIN_INSTALLER_SIZE="0"
if [ -f artifacts/windows-installer/win-ed-signature.txt ]; then
WIN_ED_SIG=$(cat artifacts/windows-installer/win-ed-signature.txt)
fi
if [ -f artifacts/windows-installer/win-installer-size.txt ]; then
WIN_INSTALLER_SIZE=$(cat artifacts/windows-installer/win-installer-size.txt)
fi
cat > appcast.xml << XMLEOF
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
<channel>
<title>Plezy Updates</title>
<item>
<title>Version ${VERSION}</title>
<sparkle:version>${VERSION}</sparkle:version>
<sparkle:releaseNotesLink>https://gh-html.edde746.dev/edde746/plezy/${VERSION}</sparkle:releaseNotesLink>
XMLEOF
# macOS enclosure
if [ -n "$MACOS_ED_SIG" ]; then
cat >> appcast.xml << XMLEOF
<enclosure url="https://github.com/edde746/plezy/releases/download/${VERSION}/plezy-macos.dmg"
length="${MACOS_DMG_SIZE}" type="application/octet-stream"
sparkle:edSignature="${MACOS_ED_SIG}"
sparkle:os="macos" />
XMLEOF
fi
# Windows enclosure
if [ -n "$WIN_ED_SIG" ]; then
cat >> appcast.xml << XMLEOF
<enclosure url="https://github.com/edde746/plezy/releases/download/${VERSION}/plezy-windows-installer.exe"
length="${WIN_INSTALLER_SIZE}" type="application/octet-stream"
sparkle:edSignature="${WIN_ED_SIG}"
sparkle:installerArguments="/SILENT /SP-"
sparkle:os="windows" />
XMLEOF
fi
cat >> appcast.xml << 'XMLEOF'
</item>
</channel>
</rss>
XMLEOF
# Clean up leading whitespace from heredoc indentation
sed -i 's/^ //' appcast.xml
echo "Generated appcast.xml:"
cat appcast.xml
- name: Create Release
uses: softprops/action-gh-release@v1
with:
@@ -656,6 +796,7 @@ jobs:
artifacts/windows-installer/plezy-windows-installer.exe
artifacts/linux-x64/*
artifacts/linux-arm64/*
appcast.xml
draft: true
prerelease: false
generate_release_notes: true
+2 -2
View File
@@ -1,6 +1,6 @@
cask "plezy" do
version "1.18.2"
sha256 "83739e8c298e19eefc1e54b1c3d054da99ad03874dbf07e069fcad0f5f264fb6"
version "1.21.2"
sha256 "65dd027f58b92e9c41601b11b9603a4ba76b15947913164398577fb476021b8b"
url "https://github.com/edde746/plezy/releases/download/#{version}/plezy-macos.dmg"
name "Plezy"
+1 -1
View File
@@ -41,7 +41,7 @@ A modern Plex client for desktop and mobile. Built with Flutter for native perfo
### 🎬 Playback
- Wide codec support (HEVC, AV1, VP9, and more)
- HDR and Dolby Vision (iOS, macOS, Windows)
- HDR and Dolby Vision (not Linux)
- Full ASS/SSA subtitle support
- Audio and subtitle preferences synced with Plex profile
- Progress sync and resume
@@ -9,6 +9,8 @@ import android.app.PictureInPictureParams
import android.content.Context
import android.content.res.Configuration
import android.util.Rational
import android.view.KeyEvent
import android.view.ViewGroup
import androidx.core.content.FileProvider
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.android.RenderMode
@@ -25,6 +27,7 @@ class MainActivity : FlutterActivity() {
private val PIP_CHANNEL = "app.plezy/pip"
private val EXTERNAL_PLAYER_CHANNEL = "app.plezy/external_player"
private var watchNextPlugin: WatchNextPlugin? = null
private var cachedFlutterView: android.view.View? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@@ -39,6 +42,37 @@ class MainActivity : FlutterActivity() {
handleWatchNextIntent(intent)
}
override fun dispatchKeyEvent(event: KeyEvent): Boolean {
// Ensure FlutterView has focus for DPAD events so they reach Flutter's
// key event system. Without this, Android's native focus navigation can
// consume DPAD direction events (especially from the Google TV virtual
// remote) before they reach Flutter.
when (event.keyCode) {
KeyEvent.KEYCODE_DPAD_UP,
KeyEvent.KEYCODE_DPAD_DOWN,
KeyEvent.KEYCODE_DPAD_LEFT,
KeyEvent.KEYCODE_DPAD_RIGHT,
KeyEvent.KEYCODE_DPAD_CENTER -> {
val fv = cachedFlutterView ?: findFlutterView(window.decorView)?.also { cachedFlutterView = it }
if (fv != null && !fv.hasFocus()) {
fv.requestFocus()
}
}
}
return super.dispatchKeyEvent(event)
}
private fun findFlutterView(view: android.view.View): android.view.View? {
if (view.javaClass.name.contains("FlutterView")) return view
if (view is ViewGroup) {
for (i in 0 until view.childCount) {
val found = findFlutterView(view.getChildAt(i))
if (found != null) return found
}
}
return null
}
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
// Handle Watch Next deep link when app is already running
@@ -1,7 +1,10 @@
package com.edde746.plezy.exoplayer
import android.app.Activity
import android.app.ActivityManager
import android.content.ComponentCallbacks2
import android.content.Context
import android.content.res.Configuration
import android.graphics.Color
import android.graphics.PixelFormat
import android.hardware.display.DisplayManager
@@ -87,6 +90,8 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
private var overlayLayoutListener: ViewTreeObserver.OnGlobalLayoutListener? = null
private var exoPlayer: ExoPlayer? = null
private var trackSelector: DefaultTrackSelector? = null
private var tunnelingDisabledForCodec: Boolean = false
private var pendingStartPositionMs: Long = 0L
var delegate: ExoPlayerDelegate? = null
var isInitialized: Boolean = false
private set
@@ -102,6 +107,9 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
private var hasAudioFocus: Boolean = false
private var wasPlayingBeforeFocusLoss: Boolean = false
// Memory pressure detection
private var memoryCallback: ComponentCallbacks2? = null
// Track state for event emission
private var lastPosition: Long = 0
private var lastDuration: Long = 0
@@ -146,6 +154,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
private fun ensureFlutterOverlayOnTop() {
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
contentView.post {
if (!isInitialized) return@post
var flutterContainer: ViewGroup? = null
for (i in 0 until contentView.childCount) {
@@ -338,13 +347,34 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
val wrappedRenderersFactory = AssRenderersFactory(handler, renderersFactory)
// Compute memory-aware buffer limits to prevent CCodec OOM crashes
val activityManager = activity.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
val memoryInfo = ActivityManager.MemoryInfo()
activityManager.getMemoryInfo(memoryInfo)
val availableMB = memoryInfo.availMem / (1024 * 1024)
val targetBufferBytes = if (bufferSizeBytes != null && bufferSizeBytes > 0) {
bufferSizeBytes
} else {
// Scale buffer to available memory to reduce hardware decoder pressure
when {
availableMB <= 512 -> 30 * 1024 * 1024
availableMB <= 1024 -> 50 * 1024 * 1024
availableMB <= 2048 -> 60 * 1024 * 1024
else -> 130 * 1024 * 1024
}
}
val loadControl = DefaultLoadControl.Builder().apply {
if (bufferSizeBytes != null && bufferSizeBytes > 0) {
setTargetBufferBytes(bufferSizeBytes)
setPrioritizeTimeOverSizeThresholds(false)
Log.d(TAG, "Buffer byte limit set to ${bufferSizeBytes / 1024 / 1024}MB")
setTargetBufferBytes(targetBufferBytes)
setPrioritizeTimeOverSizeThresholds(false)
if (availableMB <= 2048) {
setBufferDurationsMs(15_000, 50_000, 2_500, 5_000)
} else {
setBufferDurationsMs(30_000, 60_000, 2_500, 5_000)
}
}.build()
Log.d(TAG, "Buffer: ${targetBufferBytes / 1024 / 1024}MB limit, available=${availableMB}MB")
exoPlayer = ExoPlayer.Builder(activity)
.setTrackSelector(trackSelector!!)
@@ -378,6 +408,22 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
}
}
// Register memory pressure listener to detect impending OOM
memoryCallback = object : ComponentCallbacks2 {
override fun onTrimMemory(level: Int) {
if (level >= ComponentCallbacks2.TRIM_MEMORY_RUNNING_CRITICAL) {
Log.w(TAG, "TRIM_MEMORY level $level - critical memory pressure")
delegate?.onEvent("memory-pressure", mapOf("level" to "critical"))
}
}
override fun onConfigurationChanged(newConfig: Configuration) {}
override fun onLowMemory() {
Log.w(TAG, "onLowMemory - system-wide memory pressure")
delegate?.onEvent("memory-pressure", mapOf("level" to "critical"))
}
}
activity.registerComponentCallbacks(memoryCallback)
// Start position update loop
startPositionUpdates()
@@ -475,6 +521,16 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
delegate?.onPropertyChange("paused-for-cache", true)
}
Player.STATE_READY -> {
// Restore start position if it was lost during track reselection
// (e.g. tunneling state change in onTracksChanged triggers renderer teardown)
if (pendingStartPositionMs > 0L) {
val currentPos = exoPlayer?.currentPosition ?: 0L
if (currentPos < 1000L) {
Log.w(TAG, "Position lost during init (at ${currentPos}ms, expected ${pendingStartPositionMs}ms) — restoring")
exoPlayer?.seekTo(pendingStartPositionMs)
}
pendingStartPositionMs = 0L
}
delegate?.onPropertyChange("paused-for-cache", false)
delegate?.onEvent("playback-restart", null)
emitTrackList()
@@ -488,6 +544,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
override fun onTracksChanged(tracks: Tracks) {
Log.d(TAG, "onTracksChanged")
evaluateAudioCodecForTunneling()
emitTrackList()
}
@@ -672,6 +729,69 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
delegate?.onPropertyChange("track-list", trackList)
}
// Tunneling control — disabled when audio codec has no hardware decoder (requires FFmpeg)
private fun hasHardwareAudioDecoder(mimeType: String): Boolean {
try {
val codecList = android.media.MediaCodecList(android.media.MediaCodecList.REGULAR_CODECS)
for (info in codecList.codecInfos) {
if (info.isEncoder) continue
for (type in info.supportedTypes) {
if (type.equals(mimeType, ignoreCase = true)) {
val name = info.name
if (!name.startsWith("OMX.google.") &&
!name.startsWith("c2.android.") &&
!name.contains(".sw.") &&
!name.startsWith("c2.ffmpeg.")) {
Log.d(TAG, "Found hardware audio decoder for $mimeType: $name")
return true
}
}
}
}
} catch (e: Exception) {
Log.w(TAG, "Failed to query audio decoders for $mimeType: ${e.message}")
}
Log.d(TAG, "No hardware audio decoder for $mimeType — FFmpeg will handle it")
return false
}
private fun updateTunnelingState() {
val selector = trackSelector ?: return
val player = exoPlayer ?: return
val currentSpeed = player.playbackParameters.speed
val shouldTunnel = (currentSpeed == 1f) && !tunnelingDisabledForCodec
val currentTunneling = selector.parameters.tunnelingEnabled
if (shouldTunnel == currentTunneling) return // No change needed
Log.d(TAG, "updateTunnelingState: tunneling $currentTunneling -> $shouldTunnel")
selector.setParameters(
selector.buildUponParameters()
.setTunnelingEnabled(shouldTunnel)
)
// Track reselection from setParameters() can reset position during initial load.
// Restore the pending start position if it hasn't been consumed yet.
if (pendingStartPositionMs > 0L) {
player.seekTo(pendingStartPositionMs)
}
}
private fun evaluateAudioCodecForTunneling() {
val player = exoPlayer ?: return
val selectedAudioGroup = player.currentTracks.groups.firstOrNull {
it.type == C.TRACK_TYPE_AUDIO && it.isSelected
} ?: return
val format = selectedAudioGroup.mediaTrackGroup.getFormat(0)
val mimeType = format.sampleMimeType ?: return
val newDisabled = !hasHardwareAudioDecoder(mimeType)
if (newDisabled != tunnelingDisabledForCodec) {
tunnelingDisabledForCodec = newDisabled
Log.i(TAG, "Audio codec ${format.codecs} ($mimeType): tunneling ${if (newDisabled) "DISABLED" else "enabled"}")
updateTunnelingState()
}
}
// Public API
fun open(uri: String, headers: Map<String, String>?, startPositionMs: Long, autoPlay: Boolean, isLive: Boolean = false) {
@@ -680,6 +800,8 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
currentMediaUri = uri
currentHeaders = headers
externalSubtitles.clear()
tunnelingDisabledForCodec = false
pendingStartPositionMs = startPositionMs
if (isLive) {
// Live MKV streams lack Cues (seek index). FLAG_DISABLE_SEEK_FOR_CUES tells
@@ -757,14 +879,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
fun setPlaybackSpeed(speed: Float) {
val clampedSpeed = speed.coerceIn(0.25f, 4f)
exoPlayer?.setPlaybackSpeed(clampedSpeed)
// Disable tunneling when speed != 1.0 — tunneled playback bypasses
// ExoPlayer's audio processors, silently ignoring speed changes.
trackSelector?.setParameters(
trackSelector!!.buildUponParameters()
.setTunnelingEnabled(clampedSpeed == 1f)
)
updateTunnelingState()
delegate?.onPropertyChange("speed", speed.toDouble())
}
@@ -781,9 +896,23 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
val audioGroups = player.currentTracks.groups.filter { it.type == C.TRACK_TYPE_AUDIO }
if (trackIndex >= 0 && trackIndex < audioGroups.size) {
val group = audioGroups[trackIndex]
// Pre-evaluate the new track's codec for tunneling before applying the override,
// so tunneling state is set correctly in the same parameter update.
val format = group.mediaTrackGroup.getFormat(0)
val mimeType = format.sampleMimeType
if (mimeType != null) {
tunnelingDisabledForCodec = !hasHardwareAudioDecoder(mimeType)
Log.i(TAG, "Audio track switch to ${format.codecs} ($mimeType): tunneling ${if (tunnelingDisabledForCodec) "DISABLED" else "enabled"}")
}
val currentSpeed = player.playbackParameters.speed
val shouldTunnel = (currentSpeed == 1f) && !tunnelingDisabledForCodec
selector.parameters = selector.buildUponParameters()
.setOverrideForType(TrackSelectionOverride(group.mediaTrackGroup, 0))
.setTrackTypeDisabled(C.TRACK_TYPE_AUDIO, false)
.setTunnelingEnabled(shouldTunnel)
.build()
delegate?.onPropertyChange("aid", trackId)
@@ -1263,6 +1392,11 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
abandonAudioFocus()
audioManager = null
memoryCallback?.let { activity.unregisterComponentCallbacks(it) }
memoryCallback = null
tunnelingDisabledForCodec = false
pendingStartPositionMs = 0L
exoPlayer?.clearVideoSurface()
exoPlayer?.removeListener(this)
exoPlayer?.release()
@@ -1275,14 +1409,19 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
contentView.viewTreeObserver.removeOnGlobalLayoutListener(listener)
}
overlayLayoutListener = null
// Post view removal to next frame to avoid SurfaceControl race on render thread
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
// Remove SurfaceView from container synchronously — triggers
// onDetachedFromWindow which properly unregisters PositionUpdateListener
// and releases SurfaceControl before the render thread can access it.
val container = surfaceContainer
val subtitle = subtitleView
surfaceView?.let { container?.removeView(it) }
subtitleView?.let { container?.removeView(it) }
// Defer empty container removal (plain FrameLayout, no SurfaceControl)
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
contentView.post {
container?.let { contentView.removeView(it) }
subtitle?.let { contentView.removeView(it) }
}
surfaceContainer = null
surfaceView = null
@@ -1,6 +1,8 @@
package com.edde746.plezy.exoplayer
import android.app.Activity
import android.app.ActivityManager
import android.content.Context
import android.net.Uri
import android.util.Log
import com.edde746.plezy.mpv.MpvPlayerCore
@@ -30,6 +32,7 @@ class ExoPlayerPlugin : FlutterPlugin, MethodChannel.MethodCallHandler,
private var activity: Activity? = null
private var activityBinding: ActivityPluginBinding? = null
private val nameToId = mutableMapOf<String, Int>()
private var configuredBufferSizeBytes: Int? = null
// FlutterPlugin
@@ -119,6 +122,10 @@ class ExoPlayerPlugin : FlutterPlugin, MethodChannel.MethodCallHandler,
)
"getStats" -> handleGetStats(result)
"getPlayerType" -> result.success(if (usingMpvFallback) "mpv" else "exoplayer")
"getHeapSize" -> {
val am = activity?.getSystemService(Context.ACTIVITY_SERVICE) as? ActivityManager
result.success(am?.largeMemoryClass ?: 0)
}
"setSubtitleStyle" -> handleSetSubtitleStyle(call, result)
"observeProperty" -> handleObserveProperty(call, result)
else -> result.notImplemented()
@@ -139,6 +146,7 @@ class ExoPlayerPlugin : FlutterPlugin, MethodChannel.MethodCallHandler,
}
val bufferSizeBytes = call.argument<Int>("bufferSizeBytes")
configuredBufferSizeBytes = bufferSizeBytes
currentActivity.runOnUiThread {
try {
@@ -592,6 +600,13 @@ class ExoPlayerPlugin : FlutterPlugin, MethodChannel.MethodCallHandler,
mpvCore?.setProperty("vo", "gpu")
mpvCore?.setProperty("ao", "audiotrack")
// Forward user's buffer config to MPV fallback
configuredBufferSizeBytes?.let { bytes ->
if (bytes > 0) {
mpvCore?.setProperty("demuxer-max-bytes", bytes.toString())
}
}
// Setup property observers
mpvCore?.observeProperty("time-pos", "double")
mpvCore?.observeProperty("duration", "double")
@@ -135,6 +135,7 @@ class MpvPlayerCore(private val activity: Activity) :
private fun ensureFlutterOverlayOnTop() {
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
contentView.post {
if (!isInitialized) return@post
var flutterContainer: ViewGroup? = null
// First pass: look for FlutterView by name (debug builds)
@@ -717,15 +718,20 @@ class MpvPlayerCore(private val activity: Activity) :
MPVLib.removeObserver(this)
MPVLib.removeLogObserver(this)
surfaceView?.holder?.removeCallback(this)
overlayLayoutListener?.let { listener ->
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
contentView.viewTreeObserver.removeOnGlobalLayoutListener(listener)
}
overlayLayoutListener = null
// Post view removal to next frame to avoid SurfaceControl race on render thread
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
// Remove SurfaceView synchronously (keep callback so surfaceDestroyed
// fires → MPVLib.detachSurface()), then remove callback after.
val container = surfaceContainer
surfaceView?.let { container?.removeView(it) }
surfaceView?.holder?.removeCallback(this)
// Defer empty container removal (plain FrameLayout, no SurfaceControl)
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
contentView.post {
container?.let { contentView.removeView(it) }
}
+1 -1
View File
@@ -19,7 +19,7 @@ platform :android do
UI.user_error!("Could not extract version from pubspec.yaml")
end
debug_info_dir = "../build/debug-info/#{version_name}+#{version_code}"
debug_info_dir = "./build/debug-info/#{version_name}+#{version_code}"
# Build the Flutter app
sh("cd #{ENV['PWD']}/.. && flutter build appbundle --dart-define=ENABLE_IN_APP_REVIEW=true --obfuscate --split-debug-info=#{debug_info_dir}/aab")
File diff suppressed because one or more lines are too long
+3 -2
View File
@@ -7,6 +7,7 @@ import 'package:path/path.dart' as p;
import 'tables.dart';
import '../models/download_models.dart';
import '../utils/app_logger.dart';
import '../utils/global_key_utils.dart';
part 'app_database.g.dart';
@@ -99,7 +100,7 @@ class AppDatabase extends _$AppDatabase {
required int duration,
required bool shouldMarkWatched,
}) async {
final globalKey = '$serverId:$ratingKey';
final globalKey = buildGlobalKey(serverId, ratingKey);
final now = DateTime.now().millisecondsSinceEpoch;
// Check for existing progress entry
@@ -144,7 +145,7 @@ class AppDatabase extends _$AppDatabase {
required String ratingKey,
required String actionType, // 'watched' or 'unwatched'
}) async {
final globalKey = '$serverId:$ratingKey';
final globalKey = buildGlobalKey(serverId, ratingKey);
final now = DateTime.now().millisecondsSinceEpoch;
// Remove conflicting actions (opposite action type and progress)
+2 -1
View File
@@ -29,8 +29,9 @@ class FocusTheme {
BuildContext context, {
required bool isFocused,
double borderRadius = defaultBorderRadius,
Color? color,
}) {
final focusColor = getFocusBorderColor(context);
final focusColor = color ?? getFocusBorderColor(context);
return BoxDecoration(
borderRadius: BorderRadius.circular(borderRadius),
+95
View File
@@ -0,0 +1,95 @@
import 'package:flutter/material.dart';
import 'focus_theme.dart';
import 'focusable_wrapper.dart';
import 'input_mode_tracker.dart';
/// A focusable button wrapper for D-pad navigation on TV.
///
/// Wraps any button widget with [FocusableWrapper] and adds a white overlay
/// + contrasting border when focused. Tracks focus state internally so callers
/// don't need manual state management.
///
/// ```dart
/// FocusableButton(
/// autofocus: true,
/// onPressed: _doSomething,
/// child: FilledButton.icon(
/// onPressed: _doSomething,
/// icon: Icon(Symbols.add_rounded),
/// label: Text('Create'),
/// ),
/// )
/// ```
class FocusableButton extends StatefulWidget {
final Widget child;
final VoidCallback? onPressed;
final bool autofocus;
final FocusNode? focusNode;
/// Navigation callbacks for explicit focus control (e.g. horizontal button rows).
final VoidCallback? onNavigateUp;
final VoidCallback? onNavigateDown;
final VoidCallback? onNavigateLeft;
final VoidCallback? onNavigateRight;
final VoidCallback? onBack;
/// Whether to scroll the widget into view when focused.
final bool autoScroll;
/// Whether to use background color instead of border for focus indicator.
final bool useBackgroundFocus;
const FocusableButton({
super.key,
required this.child,
this.onPressed,
this.autofocus = false,
this.focusNode,
this.onNavigateUp,
this.onNavigateDown,
this.onNavigateLeft,
this.onNavigateRight,
this.onBack,
this.autoScroll = true,
this.useBackgroundFocus = false,
});
@override
State<FocusableButton> createState() => _FocusableButtonState();
}
class _FocusableButtonState extends State<FocusableButton> {
bool _isFocused = false;
@override
Widget build(BuildContext context) {
final isKeyboard = InputModeTracker.isKeyboardMode(context);
final showFocus = _isFocused && isKeyboard;
final duration = FocusTheme.getAnimationDuration(context);
// In dpad mode: focused = full opacity, unfocused = dimmed
final opacity = isKeyboard && !_isFocused ? 0.6 : 1.0;
return FocusableWrapper(
autofocus: widget.autofocus,
focusNode: widget.focusNode,
disableScale: true,
borderRadius: 100,
useBackgroundFocus: widget.useBackgroundFocus,
descendantsAreFocusable: false,
onFocusChange: (f) => setState(() => _isFocused = f),
autoScroll: widget.autoScroll,
onSelect: widget.onPressed,
onNavigateUp: widget.onNavigateUp,
onNavigateDown: widget.onNavigateDown,
onNavigateLeft: widget.onNavigateLeft,
onNavigateRight: widget.onNavigateRight,
onBack: widget.onBack,
child: AnimatedOpacity(
opacity: showFocus ? 1.0 : opacity,
duration: duration,
child: widget.child,
),
);
}
}
+23 -1
View File
@@ -33,6 +33,9 @@ class FocusableWrapper extends StatefulWidget {
/// Called when the user presses UP and there's no focusable item above.
final VoidCallback? onNavigateUp;
/// Called when the user presses DOWN and there's no focusable item below.
final VoidCallback? onNavigateDown;
/// Called when the user presses LEFT and there's no focusable item to the left.
final VoidCallback? onNavigateLeft;
@@ -83,10 +86,19 @@ class FocusableWrapper extends StatefulWidget {
/// Useful for video controls where outline doesn't look good.
final bool useBackgroundFocus;
/// Custom color for the focus border. Only used when [useBackgroundFocus] is false.
/// Useful for filled buttons where the default primary border blends in.
final Color? focusColor;
/// Whether to disable the scale animation on focus.
/// Useful for elements like sliders where scaling looks odd.
final bool disableScale;
/// Whether descendants can receive focus.
/// Set to false when the child widget has its own Focus (e.g. buttons)
/// that would compete with this wrapper's focus handling.
final bool descendantsAreFocusable;
const FocusableWrapper({
super.key,
required this.child,
@@ -94,6 +106,7 @@ class FocusableWrapper extends StatefulWidget {
this.onLongPress,
this.onFocusChange,
this.onNavigateUp,
this.onNavigateDown,
this.onNavigateLeft,
this.onNavigateRight,
this.onBack,
@@ -109,7 +122,9 @@ class FocusableWrapper extends StatefulWidget {
this.enableLongPress = false,
this.longPressDuration = const Duration(milliseconds: 500),
this.useBackgroundFocus = false,
this.focusColor,
this.disableScale = false,
this.descendantsAreFocusable = true,
});
@override
@@ -367,6 +382,12 @@ class _FocusableWrapperState extends State<FocusableWrapper> with SingleTickerPr
return KeyEventResult.handled;
}
// DOWN arrow - if callback provided, navigate down
if (key == LogicalKeyboardKey.arrowDown && widget.onNavigateDown != null) {
widget.onNavigateDown!();
return KeyEventResult.handled;
}
// 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) {
@@ -398,11 +419,12 @@ class _FocusableWrapperState extends State<FocusableWrapper> with SingleTickerPr
// Choose decoration based on useBackgroundFocus
final decoration = widget.useBackgroundFocus
? FocusTheme.focusBackgroundDecoration(isFocused: showFocus, borderRadius: widget.borderRadius)
: FocusTheme.focusDecoration(context, isFocused: showFocus, borderRadius: widget.borderRadius);
: FocusTheme.focusDecoration(context, isFocused: showFocus, borderRadius: widget.borderRadius, color: widget.focusColor);
Widget result = Focus(
focusNode: _focusNode,
autofocus: widget.autofocus,
descendantsAreFocusable: widget.descendantsAreFocusable,
onFocusChange: _handleFocusChange,
onKeyEvent: _handleKeyEvent,
child: AnimatedBuilder(
+56
View File
@@ -83,6 +83,62 @@ KeyEventResult handleBackKeyNavigation<T>(BuildContext context, KeyEvent event,
return handleBackKeyAction(event, () => Navigator.pop(context, result));
}
/// Creates a [FocusOnKeyEventCallback] that dispatches d-pad / arrow keys to
/// the provided directional callbacks.
///
/// Each callback is optional. Directions without a callback are ignored
/// (passed through to the framework). Directions mapped to a callback
/// automatically return [KeyEventResult.handled].
///
/// Only [KeyDownEvent] and [KeyRepeatEvent] are handled (via [isActionable]).
///
/// ```dart
/// Focus(
/// onKeyEvent: dpadKeyHandler(
/// onUp: () => _focusAppBar(),
/// onDown: () => _focusContent(),
/// onLeft: () => _navigateToSidebar(),
/// onSelect: () => _play(),
/// ),
/// child: ...
/// )
/// ```
FocusOnKeyEventCallback dpadKeyHandler({
VoidCallback? onUp,
VoidCallback? onDown,
VoidCallback? onLeft,
VoidCallback? onRight,
VoidCallback? onSelect,
}) {
return (FocusNode _, KeyEvent event) {
if (!event.isActionable) return KeyEventResult.ignored;
final key = event.logicalKey;
if (key.isUpKey && onUp != null) {
onUp();
return KeyEventResult.handled;
}
if (key.isDownKey && onDown != null) {
onDown();
return KeyEventResult.handled;
}
if (key.isLeftKey && onLeft != null) {
onLeft();
return KeyEventResult.handled;
}
if (key.isRightKey && onRight != null) {
onRight();
return KeyEventResult.handled;
}
if (key.isSelectKey && onSelect != null) {
onSelect();
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
};
}
/// Navigator observer that automatically suppresses stray back KeyUp events
/// after any route pop caused by a back key press.
///
+70 -23
View File
@@ -1,7 +1,7 @@
{
"app": {
"title": "Plezy"
},
},
"auth": {
"signInWithPlex": "Mit Plex anmelden",
"showQRCode": "QR-Code anzeigen",
@@ -126,6 +126,8 @@
"hardwareDecodingDescription": "Hardwarebeschleunigung verwenden, sofern verfügbar",
"bufferSize": "Puffergröße",
"bufferSizeMB": "${size}MB",
"bufferSizeAuto": "Auto (Empfohlen)",
"bufferSizeWarning": "Ihr Gerät hat ${heap}MB Speicher. Ein ${size}MB-Puffer kann Wiedergabeprobleme verursachen.",
"subtitleStyling": "Untertitel-Stil",
"subtitleStylingDescription": "Aussehen von Untertiteln anpassen",
"smallSkipDuration": "Kleine Sprungdauer",
@@ -303,6 +305,9 @@
"timerActive": "Schlaftimer aktiv",
"playbackWillPauseIn": "Wiedergabe wird in ${duration} pausiert",
"sleepTimerCompleted": "Schlaftimer abgelaufen – Wiedergabe pausiert",
"stillWatching": "Schaust du noch?",
"pausingIn": "Pause in ${seconds}s",
"continueWatching": "Weiter",
"autoPlayNext": "Nächstes automatisch abspielen",
"playNext": "Nächstes abspielen",
"playButton": "Wiedergeben",
@@ -550,29 +555,17 @@
"title": "Live-TV",
"channels": "Kanäle",
"guide": "Programmführer",
"recordings": "Aufnahmen",
"subscriptions": "Aufnahmeregeln",
"scheduled": "Geplant",
"noChannels": "Keine Kanäle verfügbar",
"noDvr": "Kein DVR auf einem Server konfiguriert",
"tuneFailed": "Kanal konnte nicht eingestellt werden",
"loading": "Kanäle werden geladen...",
"nowPlaying": "Läuft gerade",
"record": "Aufnehmen",
"recordSeries": "Serie aufnehmen",
"cancelRecording": "Aufnahme abbrechen",
"deleteSubscription": "Aufnahmeregel löschen",
"deleteSubscriptionConfirm": "Möchten Sie diese Aufnahmeregel wirklich löschen?",
"subscriptionDeleted": "Aufnahmeregel gelöscht",
"noPrograms": "Keine Programmdaten verfügbar",
"noRecordings": "Keine Aufnahmen geplant",
"noSubscriptions": "Keine Aufnahmeregeln",
"channelNumber": "Kanal ${number}",
"live": "LIVE",
"hd": "HD",
"premiere": "NEU",
"reloadGuide": "Programmführer neu laden",
"guideReloaded": "Programmdaten neu geladen",
"allChannels": "Alle Kanäle",
"now": "Jetzt",
"today": "Heute",
@@ -739,11 +732,8 @@
"minimize": "Minimieren"
},
"pairing": {
"recent": "Zuletzt",
"scan": "Scannen",
"manual": "Manuell",
"recentConnections": "Letzte Verbindungen",
"quickReconnect": "Schnell mit zuvor gekoppelten Geräten verbinden",
"pairWithDesktop": "Mit Desktop koppeln",
"enterSessionDetails": "Gib die Sitzungsdetails ein, die auf deinem Desktop-Gerät angezeigt werden",
"hostAddressHint": "192.168.1.100:48632",
@@ -757,11 +747,7 @@
"cameraPermissionRequired": "Kameraberechtigung wird zum Scannen von QR-Codes benötigt.\nBitte erteile den Kamerazugriff in den Geräteeinstellungen.",
"cameraError": "Kamera konnte nicht gestartet werden: ${error}",
"scanInstruction": "Richte deine Kamera auf den QR-Code auf deinem Desktop",
"noRecentConnections": "Keine letzten Verbindungen",
"connectUsingManual": "Verbinde dich über die manuelle Eingabe, um loszulegen",
"invalidQrCode": "Ungültiges QR-Code-Format",
"removeRecentConnection": "Letzte Verbindung entfernen",
"removeConfirm": "\"${name}\" aus den letzten Verbindungen entfernen?",
"validationHostRequired": "Bitte Host-Adresse eingeben",
"validationHostFormat": "Format muss IP:Port sein (z.B. 192.168.1.100:48632)",
"validationSessionIdRequired": "Bitte Sitzungs-ID eingeben",
@@ -770,8 +756,7 @@
"validationPinLength": "PIN muss 6 Ziffern haben",
"connectionTimedOut": "Zeitüberschreitung. Bitte Sitzungs-ID und PIN überprüfen.",
"sessionNotFound": "Sitzung nicht gefunden. Bitte Zugangsdaten überprüfen.",
"failedToConnect": "Verbindung fehlgeschlagen: ${error}",
"failedToLoadRecent": "Letzte Sitzungen konnten nicht geladen werden: ${error}"
"failedToConnect": "Verbindung fehlgeschlagen: ${error}"
},
"remote": {
"disconnectConfirm": "Möchtest du die Verbindung zur Fernsteuerungssitzung trennen?",
@@ -813,7 +798,8 @@
"subtitleSync": "Untertitel-Synchronisation",
"hdr": "HDR",
"audioOutput": "Audioausgabe",
"performanceOverlay": "Leistungsanzeige"
"performanceOverlay": "Leistungsanzeige",
"audioPassthrough": "Audio-Durchleitung"
},
"externalPlayer": {
"title": "Externer Player",
@@ -831,5 +817,66 @@
"launchFailed": "Externer Player konnte nicht geöffnet werden",
"appNotInstalled": "${name} ist nicht installiert",
"playInExternalPlayer": "In externem Player abspielen"
},
"metadataEdit": {
"editMetadata": "Bearbeiten...",
"screenTitle": "Metadaten bearbeiten",
"basicInfo": "Grundlegende Infos",
"artwork": "Artwork",
"advancedSettings": "Erweiterte Einstellungen",
"title": "Titel",
"sortTitle": "Sortiertitel",
"originalTitle": "Originaltitel",
"releaseDate": "Erscheinungsdatum",
"contentRating": "Altersfreigabe",
"studio": "Studio",
"tagline": "Tagline",
"summary": "Zusammenfassung",
"poster": "Poster",
"background": "Hintergrund",
"selectPoster": "Poster auswählen",
"selectBackground": "Hintergrund auswählen",
"fromUrl": "Von URL",
"uploadFile": "Datei hochladen",
"enterImageUrl": "Bild-URL eingeben",
"imageUrl": "Bild-URL",
"metadataUpdated": "Metadaten aktualisiert",
"metadataUpdateFailed": "Metadaten konnten nicht aktualisiert werden",
"artworkUpdated": "Artwork aktualisiert",
"artworkUpdateFailed": "Artwork konnte nicht aktualisiert werden",
"noArtworkAvailable": "Kein Artwork verfügbar",
"notSet": "Nicht festgelegt",
"libraryDefault": "Bibliotheksstandard",
"accountDefault": "Kontostandard",
"seriesDefault": "Serienstandard",
"episodeSorting": "Episodensortierung",
"oldestFirst": "Älteste zuerst",
"newestFirst": "Neueste zuerst",
"keep": "Behalten",
"allEpisodes": "Alle Episoden",
"latestEpisodes": "${count} neueste Episoden",
"latestEpisode": "Neueste Episode",
"episodesAddedPastDays": "Episoden der letzten ${count} Tage",
"deleteAfterPlaying": "Episoden nach Wiedergabe löschen",
"never": "Nie",
"afterADay": "Nach einem Tag",
"afterAWeek": "Nach einer Woche",
"afterAMonth": "Nach einem Monat",
"onNextRefresh": "Bei nächster Aktualisierung",
"seasons": "Staffeln",
"show": "Anzeigen",
"hide": "Ausblenden",
"episodeOrdering": "Episodenreihenfolge",
"tmdbAiring": "The Movie Database (Ausgestrahlt)",
"tvdbAiring": "TheTVDB (Ausgestrahlt)",
"tvdbAbsolute": "TheTVDB (Absolut)",
"metadataLanguage": "Metadaten-Sprache",
"useOriginalTitle": "Originaltitel verwenden",
"preferredAudioLanguage": "Bevorzugte Audiosprache",
"preferredSubtitleLanguage": "Bevorzugte Untertitelsprache",
"subtitleMode": "Automatische Untertitelauswahl",
"manuallySelected": "Manuell ausgewählt",
"shownWithForeignAudio": "Bei fremdsprachigem Audio anzeigen",
"alwaysEnabled": "Immer aktiviert"
}
}
+69 -22
View File
@@ -126,6 +126,8 @@
"hardwareDecodingDescription": "Use hardware acceleration when available",
"bufferSize": "Buffer Size",
"bufferSizeMB": "${size}MB",
"bufferSizeAuto": "Auto (Recommended)",
"bufferSizeWarning": "Your device has ${heap}MB of memory. A ${size}MB buffer may cause playback issues.",
"subtitleStyling": "Subtitle Styling",
"subtitleStylingDescription": "Customize subtitle appearance",
"smallSkipDuration": "Small Skip Duration",
@@ -303,6 +305,9 @@
"timerActive": "Timer Active",
"playbackWillPauseIn": "Playback will pause in ${duration}",
"sleepTimerCompleted": "Sleep timer completed - playback paused",
"stillWatching": "Still watching?",
"pausingIn": "Pausing in ${seconds}s",
"continueWatching": "Continue",
"autoPlayNext": "Auto-Play Next",
"playNext": "Play Next",
"playButton": "Play",
@@ -550,29 +555,17 @@
"title": "Live TV",
"channels": "Channels",
"guide": "Guide",
"recordings": "Recordings",
"subscriptions": "Subscriptions",
"scheduled": "Scheduled",
"noChannels": "No channels available",
"noDvr": "No DVR configured on any server",
"tuneFailed": "Failed to tune channel",
"loading": "Loading channels...",
"nowPlaying": "Now Playing",
"record": "Record",
"recordSeries": "Record Series",
"cancelRecording": "Cancel Recording",
"deleteSubscription": "Delete Recording Rule",
"deleteSubscriptionConfirm": "Are you sure you want to delete this recording rule?",
"subscriptionDeleted": "Recording rule deleted",
"noPrograms": "No program data available",
"noRecordings": "No recordings scheduled",
"noSubscriptions": "No recording rules",
"channelNumber": "Ch. ${number}",
"live": "LIVE",
"hd": "HD",
"premiere": "NEW",
"reloadGuide": "Reload Guide",
"guideReloaded": "Guide data reloaded",
"allChannels": "All Channels",
"now": "Now",
"today": "Today",
@@ -739,11 +732,8 @@
"minimize": "Minimize"
},
"pairing": {
"recent": "Recent",
"scan": "Scan",
"manual": "Manual",
"recentConnections": "Recent Connections",
"quickReconnect": "Quickly reconnect to previously paired devices",
"pairWithDesktop": "Pair with Desktop",
"enterSessionDetails": "Enter the session details shown on your desktop device",
"hostAddressHint": "192.168.1.100:48632",
@@ -757,11 +747,7 @@
"cameraPermissionRequired": "Camera permission is required to scan QR codes.\nPlease grant camera access in your device settings.",
"cameraError": "Could not start camera: ${error}",
"scanInstruction": "Point your camera at the QR code shown on your desktop",
"noRecentConnections": "No recent connections",
"connectUsingManual": "Connect to a device using Manual entry to get started",
"invalidQrCode": "Invalid QR code format",
"removeRecentConnection": "Remove Recent Connection",
"removeConfirm": "Remove \"${name}\" from recent connections?",
"validationHostRequired": "Please enter host address",
"validationHostFormat": "Format must be IP:port (e.g., 192.168.1.100:48632)",
"validationSessionIdRequired": "Please enter a session ID",
@@ -770,8 +756,7 @@
"validationPinLength": "PIN must be 6 digits",
"connectionTimedOut": "Connection timed out. Please check the session ID and PIN.",
"sessionNotFound": "Could not find the session. Please check your credentials.",
"failedToConnect": "Failed to connect: ${error}",
"failedToLoadRecent": "Failed to load recent sessions: ${error}"
"failedToConnect": "Failed to connect: ${error}"
},
"remote": {
"disconnectConfirm": "Do you want to disconnect from the remote session?",
@@ -813,7 +798,8 @@
"subtitleSync": "Subtitle Sync",
"hdr": "HDR",
"audioOutput": "Audio Output",
"performanceOverlay": "Performance Overlay"
"performanceOverlay": "Performance Overlay",
"audioPassthrough": "Audio Passthrough"
},
"externalPlayer": {
"title": "External Player",
@@ -831,5 +817,66 @@
"launchFailed": "Failed to open external player",
"appNotInstalled": "${name} is not installed",
"playInExternalPlayer": "Play in External Player"
},
"metadataEdit": {
"editMetadata": "Edit...",
"screenTitle": "Edit Metadata",
"basicInfo": "Basic Info",
"artwork": "Artwork",
"advancedSettings": "Advanced Settings",
"title": "Title",
"sortTitle": "Sort Title",
"originalTitle": "Original Title",
"releaseDate": "Release Date",
"contentRating": "Content Rating",
"studio": "Studio",
"tagline": "Tagline",
"summary": "Summary",
"poster": "Poster",
"background": "Background",
"selectPoster": "Select Poster",
"selectBackground": "Select Background",
"fromUrl": "From URL",
"uploadFile": "Upload File",
"enterImageUrl": "Enter image URL",
"imageUrl": "Image URL",
"metadataUpdated": "Metadata updated",
"metadataUpdateFailed": "Failed to update metadata",
"artworkUpdated": "Artwork updated",
"artworkUpdateFailed": "Failed to update artwork",
"noArtworkAvailable": "No artwork available",
"notSet": "Not set",
"libraryDefault": "Library default",
"accountDefault": "Account default",
"seriesDefault": "Series default",
"episodeSorting": "Episode Sorting",
"oldestFirst": "Oldest first",
"newestFirst": "Newest first",
"keep": "Keep",
"allEpisodes": "All episodes",
"latestEpisodes": "${count} latest episodes",
"latestEpisode": "Latest episode",
"episodesAddedPastDays": "Episodes added in the past ${count} days",
"deleteAfterPlaying": "Delete Episodes After Playing",
"never": "Never",
"afterADay": "After a day",
"afterAWeek": "After a week",
"afterAMonth": "After a month",
"onNextRefresh": "On next refresh",
"seasons": "Seasons",
"show": "Show",
"hide": "Hide",
"episodeOrdering": "Episode Ordering",
"tmdbAiring": "The Movie Database (Aired)",
"tvdbAiring": "TheTVDB (Aired)",
"tvdbAbsolute": "TheTVDB (Absolute)",
"metadataLanguage": "Metadata Language",
"useOriginalTitle": "Use Original Title",
"preferredAudioLanguage": "Preferred Audio Language",
"preferredSubtitleLanguage": "Preferred Subtitle Language",
"subtitleMode": "Auto-Select Subtitle Mode",
"manuallySelected": "Manually selected",
"shownWithForeignAudio": "Shown with foreign audio",
"alwaysEnabled": "Always enabled"
}
}
+70 -23
View File
@@ -1,7 +1,7 @@
{
"app": {
"title": "Plezy"
},
},
"auth": {
"signInWithPlex": "Inicia sesión con Plex",
"showQRCode": "Mostrar código QR",
@@ -126,6 +126,8 @@
"hardwareDecodingDescription": "Usar aceleración por hardware cuando esté disponible",
"bufferSize": "Tamaño del Buffer",
"bufferSizeMB": "${size}MB",
"bufferSizeAuto": "Auto (Recomendado)",
"bufferSizeWarning": "Tu dispositivo tiene ${heap}MB de memoria. Un búfer de ${size}MB puede causar problemas de reproducción.",
"subtitleStyling": "Estilo de Subtítulos",
"subtitleStylingDescription": "Personalizar la apariencia de los subtítulos",
"smallSkipDuration": "Salto pequeño",
@@ -303,6 +305,9 @@
"timerActive": "Temporizador Activo",
"playbackWillPauseIn": "La reproducción se pausará en ${duration}",
"sleepTimerCompleted": "Temporizador completado - reproducción pausada",
"stillWatching": "¿Sigues viendo?",
"pausingIn": "Pausa en ${seconds}s",
"continueWatching": "Continuar",
"autoPlayNext": "Reproducir siguiente automáticamente",
"playNext": "Reproducir siguiente",
"playButton": "Reproducir",
@@ -550,29 +555,17 @@
"title": "TV en vivo",
"channels": "Canales",
"guide": "Guía",
"recordings": "Grabaciones",
"subscriptions": "Reglas de grabación",
"scheduled": "Programadas",
"noChannels": "No hay canales disponibles",
"noDvr": "No hay DVR configurado en ningún servidor",
"tuneFailed": "Error al sintonizar el canal",
"loading": "Cargando canales...",
"nowPlaying": "Reproduciendo ahora",
"record": "Grabar",
"recordSeries": "Grabar serie",
"cancelRecording": "Cancelar grabación",
"deleteSubscription": "Eliminar regla de grabación",
"deleteSubscriptionConfirm": "¿Estás seguro de que quieres eliminar esta regla de grabación?",
"subscriptionDeleted": "Regla de grabación eliminada",
"noPrograms": "No hay datos de programación disponibles",
"noRecordings": "No hay grabaciones programadas",
"noSubscriptions": "No hay reglas de grabación",
"channelNumber": "Canal ${number}",
"live": "EN VIVO",
"hd": "HD",
"premiere": "NUEVO",
"reloadGuide": "Recargar guía",
"guideReloaded": "Datos de la guía recargados",
"allChannels": "Todos los canales",
"now": "Ahora",
"today": "Hoy",
@@ -739,11 +732,8 @@
"minimize": "Minimizar"
},
"pairing": {
"recent": "Recientes",
"scan": "Escanear",
"manual": "Manual",
"recentConnections": "Conexiones recientes",
"quickReconnect": "Reconectar rápidamente con dispositivos emparejados anteriormente",
"pairWithDesktop": "Emparejar con escritorio",
"enterSessionDetails": "Introduce los datos de la sesión que aparecen en tu dispositivo de escritorio",
"hostAddressHint": "192.168.1.100:48632",
@@ -757,11 +747,7 @@
"cameraPermissionRequired": "Se necesita permiso de cámara para escanear códigos QR.\nPor favor, concede acceso a la cámara en los ajustes de tu dispositivo.",
"cameraError": "No se pudo iniciar la cámara: ${error}",
"scanInstruction": "Apunta tu cámara al código QR que aparece en tu escritorio",
"noRecentConnections": "No hay conexiones recientes",
"connectUsingManual": "Conéctate a un dispositivo usando la entrada manual para empezar",
"invalidQrCode": "Formato de código QR no válido",
"removeRecentConnection": "Eliminar conexión reciente",
"removeConfirm": "¿Eliminar \"${name}\" de las conexiones recientes?",
"validationHostRequired": "Por favor, introduce la dirección del host",
"validationHostFormat": "El formato debe ser IP:puerto (ej., 192.168.1.100:48632)",
"validationSessionIdRequired": "Por favor, introduce un ID de sesión",
@@ -770,8 +756,7 @@
"validationPinLength": "El PIN debe tener 6 dígitos",
"connectionTimedOut": "Tiempo de conexión agotado. Verifica el ID de sesión y el PIN.",
"sessionNotFound": "No se encontró la sesión. Verifica tus credenciales.",
"failedToConnect": "Error al conectar: ${error}",
"failedToLoadRecent": "Error al cargar sesiones recientes: ${error}"
"failedToConnect": "Error al conectar: ${error}"
},
"remote": {
"disconnectConfirm": "¿Quieres desconectarte de la sesión remota?",
@@ -813,7 +798,8 @@
"subtitleSync": "Sincronización de subtítulos",
"hdr": "HDR",
"audioOutput": "Salida de audio",
"performanceOverlay": "Indicador de rendimiento"
"performanceOverlay": "Indicador de rendimiento",
"audioPassthrough": "Audio Passthrough"
},
"externalPlayer": {
"title": "Reproductor externo",
@@ -831,5 +817,66 @@
"launchFailed": "No se pudo abrir el reproductor externo",
"appNotInstalled": "${name} no está instalado",
"playInExternalPlayer": "Reproducir en reproductor externo"
},
"metadataEdit": {
"editMetadata": "Editar...",
"screenTitle": "Editar metadatos",
"basicInfo": "Información básica",
"artwork": "Artwork",
"advancedSettings": "Ajustes avanzados",
"title": "Título",
"sortTitle": "Título de ordenación",
"originalTitle": "Título original",
"releaseDate": "Fecha de estreno",
"contentRating": "Clasificación de contenido",
"studio": "Estudio",
"tagline": "Eslogan",
"summary": "Resumen",
"poster": "Póster",
"background": "Fondo",
"selectPoster": "Seleccionar póster",
"selectBackground": "Seleccionar fondo",
"fromUrl": "Desde URL",
"uploadFile": "Subir archivo",
"enterImageUrl": "Introducir URL de imagen",
"imageUrl": "URL de imagen",
"metadataUpdated": "Metadatos actualizados",
"metadataUpdateFailed": "Error al actualizar los metadatos",
"artworkUpdated": "Artwork actualizado",
"artworkUpdateFailed": "Error al actualizar el artwork",
"noArtworkAvailable": "No hay artwork disponible",
"notSet": "No establecido",
"libraryDefault": "Predeterminado de biblioteca",
"accountDefault": "Predeterminado de cuenta",
"seriesDefault": "Predeterminado de serie",
"episodeSorting": "Orden de episodios",
"oldestFirst": "Más antiguos primero",
"newestFirst": "Más recientes primero",
"keep": "Conservar",
"allEpisodes": "Todos los episodios",
"latestEpisodes": "${count} episodios más recientes",
"latestEpisode": "Episodio más reciente",
"episodesAddedPastDays": "Episodios añadidos en los últimos ${count} días",
"deleteAfterPlaying": "Eliminar episodios después de reproducir",
"never": "Nunca",
"afterADay": "Después de un día",
"afterAWeek": "Después de una semana",
"afterAMonth": "Después de un mes",
"onNextRefresh": "En la próxima actualización",
"seasons": "Temporadas",
"show": "Mostrar",
"hide": "Ocultar",
"episodeOrdering": "Orden de episodios",
"tmdbAiring": "The Movie Database (Emisión)",
"tvdbAiring": "TheTVDB (Emisión)",
"tvdbAbsolute": "TheTVDB (Absoluto)",
"metadataLanguage": "Idioma de metadatos",
"useOriginalTitle": "Usar título original",
"preferredAudioLanguage": "Idioma de audio preferido",
"preferredSubtitleLanguage": "Idioma de subtítulos preferido",
"subtitleMode": "Selección automática de subtítulos",
"manuallySelected": "Seleccionado manualmente",
"shownWithForeignAudio": "Mostrar con audio extranjero",
"alwaysEnabled": "Siempre activado"
}
}
+70 -23
View File
@@ -1,7 +1,7 @@
{
"app": {
"title": "Plezy"
},
},
"auth": {
"signInWithPlex": "S'inscrire avec Plex",
"showQRCode": "Afficher le QR Code",
@@ -126,6 +126,8 @@
"hardwareDecodingDescription": "Utilisez l'accélération matérielle lorsqu'elle est disponible.",
"bufferSize": "Taille du Buffer",
"bufferSizeMB": "${size}MB",
"bufferSizeAuto": "Auto (Recommandé)",
"bufferSizeWarning": "Votre appareil dispose de ${heap}MB de mémoire. Un tampon de ${size}MB peut causer des problèmes de lecture.",
"subtitleStyling": "Stylisation des sous-titres",
"subtitleStylingDescription": "Personnaliser l'apparence des sous-titres",
"smallSkipDuration": "Small Skip Duration",
@@ -303,6 +305,9 @@
"timerActive": "Minuterie active",
"playbackWillPauseIn": "La lecture sera mise en pause dans ${duration}",
"sleepTimerCompleted": "Minuterie de mise en veille terminée - lecture en pause",
"stillWatching": "Toujours en train de regarder ?",
"pausingIn": "Pause dans ${seconds}s",
"continueWatching": "Continuer",
"autoPlayNext": "Lecture automatique suivante",
"playNext": "Lire l'épisode suivant",
"playButton": "Lire",
@@ -550,29 +555,17 @@
"title": "TV en direct",
"channels": "Chaînes",
"guide": "Guide",
"recordings": "Enregistrements",
"subscriptions": "Règles d'enregistrement",
"scheduled": "Programmés",
"noChannels": "Aucune chaîne disponible",
"noDvr": "Aucun DVR configuré sur les serveurs",
"tuneFailed": "Impossible de syntoniser la chaîne",
"loading": "Chargement des chaînes...",
"nowPlaying": "En cours de lecture",
"record": "Enregistrer",
"recordSeries": "Enregistrer la série",
"cancelRecording": "Annuler l'enregistrement",
"deleteSubscription": "Supprimer la règle d'enregistrement",
"deleteSubscriptionConfirm": "Voulez-vous vraiment supprimer cette règle d'enregistrement ?",
"subscriptionDeleted": "Règle d'enregistrement supprimée",
"noPrograms": "Aucune donnée de programme disponible",
"noRecordings": "Aucun enregistrement programmé",
"noSubscriptions": "Aucune règle d'enregistrement",
"channelNumber": "Ch. ${number}",
"live": "EN DIRECT",
"hd": "HD",
"premiere": "NOUVEAU",
"reloadGuide": "Recharger le guide",
"guideReloaded": "Données du guide rechargées",
"allChannels": "Toutes les chaînes",
"now": "Maintenant",
"today": "Aujourd'hui",
@@ -739,11 +732,8 @@
"minimize": "Réduire"
},
"pairing": {
"recent": "Récents",
"scan": "Scanner",
"manual": "Manuel",
"recentConnections": "Connexions récentes",
"quickReconnect": "Reconnexion rapide aux appareils précédemment jumelés",
"pairWithDesktop": "Jumeler avec un bureau",
"enterSessionDetails": "Saisissez les détails de la session affichés sur votre appareil de bureau",
"hostAddressHint": "192.168.1.100:48632",
@@ -757,11 +747,7 @@
"cameraPermissionRequired": "L'autorisation de la caméra est requise pour scanner les QR codes.\nVeuillez accorder l'accès à la caméra dans les paramètres de votre appareil.",
"cameraError": "Impossible de démarrer la caméra : ${error}",
"scanInstruction": "Pointez votre caméra vers le QR code affiché sur votre bureau",
"noRecentConnections": "Aucune connexion récente",
"connectUsingManual": "Connectez-vous à un appareil via la saisie manuelle pour commencer",
"invalidQrCode": "Format de QR code invalide",
"removeRecentConnection": "Supprimer la connexion récente",
"removeConfirm": "Supprimer \"${name}\" des connexions récentes ?",
"validationHostRequired": "Veuillez saisir l'adresse de l'hôte",
"validationHostFormat": "Le format doit être IP:port (ex : 192.168.1.100:48632)",
"validationSessionIdRequired": "Veuillez saisir un ID de session",
@@ -770,8 +756,7 @@
"validationPinLength": "Le PIN doit contenir 6 chiffres",
"connectionTimedOut": "Délai de connexion expiré. Veuillez vérifier l'ID de session et le PIN.",
"sessionNotFound": "Session introuvable. Veuillez vérifier vos identifiants.",
"failedToConnect": "Échec de la connexion : ${error}",
"failedToLoadRecent": "Échec du chargement des sessions récentes : ${error}"
"failedToConnect": "Échec de la connexion : ${error}"
},
"remote": {
"disconnectConfirm": "Voulez-vous vous déconnecter de la session distante ?",
@@ -813,7 +798,8 @@
"subtitleSync": "Synchronisation des sous-titres",
"hdr": "HDR",
"audioOutput": "Sortie audio",
"performanceOverlay": "Superposition de performance"
"performanceOverlay": "Superposition de performance",
"audioPassthrough": "Audio Pass-Through"
},
"externalPlayer": {
"title": "Lecteur externe",
@@ -831,5 +817,66 @@
"launchFailed": "Impossible d'ouvrir le lecteur externe",
"appNotInstalled": "${name} n'est pas installé",
"playInExternalPlayer": "Lire dans un lecteur externe"
},
"metadataEdit": {
"editMetadata": "Modifier...",
"screenTitle": "Modifier les métadonnées",
"basicInfo": "Informations de base",
"artwork": "Artwork",
"advancedSettings": "Paramètres avancés",
"title": "Titre",
"sortTitle": "Titre de tri",
"originalTitle": "Titre original",
"releaseDate": "Date de sortie",
"contentRating": "Classification",
"studio": "Studio",
"tagline": "Slogan",
"summary": "Résumé",
"poster": "Affiche",
"background": "Arrière-plan",
"selectPoster": "Sélectionner l'affiche",
"selectBackground": "Sélectionner l'arrière-plan",
"fromUrl": "Depuis une URL",
"uploadFile": "Importer un fichier",
"enterImageUrl": "Entrer l'URL de l'image",
"imageUrl": "URL de l'image",
"metadataUpdated": "Métadonnées mises à jour",
"metadataUpdateFailed": "Échec de la mise à jour des métadonnées",
"artworkUpdated": "Artwork mis à jour",
"artworkUpdateFailed": "Échec de la mise à jour de l'artwork",
"noArtworkAvailable": "Aucun artwork disponible",
"notSet": "Non défini",
"libraryDefault": "Par défaut de la bibliothèque",
"accountDefault": "Par défaut du compte",
"seriesDefault": "Par défaut de la série",
"episodeSorting": "Tri des épisodes",
"oldestFirst": "Plus anciens en premier",
"newestFirst": "Plus récents en premier",
"keep": "Conserver",
"allEpisodes": "Tous les épisodes",
"latestEpisodes": "${count} derniers épisodes",
"latestEpisode": "Dernier épisode",
"episodesAddedPastDays": "Épisodes ajoutés ces ${count} derniers jours",
"deleteAfterPlaying": "Supprimer les épisodes après lecture",
"never": "Jamais",
"afterADay": "Après un jour",
"afterAWeek": "Après une semaine",
"afterAMonth": "Après un mois",
"onNextRefresh": "Au prochain rafraîchissement",
"seasons": "Saisons",
"show": "Afficher",
"hide": "Masquer",
"episodeOrdering": "Ordre des épisodes",
"tmdbAiring": "The Movie Database (Diffusion)",
"tvdbAiring": "TheTVDB (Diffusion)",
"tvdbAbsolute": "TheTVDB (Absolu)",
"metadataLanguage": "Langue des métadonnées",
"useOriginalTitle": "Utiliser le titre original",
"preferredAudioLanguage": "Langue audio préférée",
"preferredSubtitleLanguage": "Langue de sous-titres préférée",
"subtitleMode": "Sélection automatique des sous-titres",
"manuallySelected": "Sélectionné manuellement",
"shownWithForeignAudio": "Affichés avec audio étranger",
"alwaysEnabled": "Toujours activé"
}
}
+70 -23
View File
@@ -1,7 +1,7 @@
{
"app": {
"title": "Plezy"
},
},
"auth": {
"signInWithPlex": "Accedi con Plex",
"showQRCode": "Mostra QR Code",
@@ -126,6 +126,8 @@
"hardwareDecodingDescription": "Utilizza l'accelerazione hardware quando disponibile",
"bufferSize": "Dimensione buffer",
"bufferSizeMB": "${size}MB",
"bufferSizeAuto": "Auto (Consigliato)",
"bufferSizeWarning": "Il tuo dispositivo ha ${heap}MB di memoria. Un buffer di ${size}MB potrebbe causare problemi di riproduzione.",
"subtitleStyling": "Stile sottotitoli",
"subtitleStylingDescription": "Personalizza l'aspetto dei sottotitoli",
"smallSkipDuration": "Durata skip breve",
@@ -303,6 +305,9 @@
"timerActive": "Timer attivo",
"playbackWillPauseIn": "La riproduzione si interromperà tra ${duration}",
"sleepTimerCompleted": "Timer di spegnimento completato - riproduzione in pausa",
"stillWatching": "Stai ancora guardando?",
"pausingIn": "Pausa tra ${seconds}s",
"continueWatching": "Continua",
"autoPlayNext": "Riproduzione automatica successivo",
"playNext": "Riproduci successivo",
"playButton": "Riproduci",
@@ -550,29 +555,17 @@
"title": "TV in diretta",
"channels": "Canali",
"guide": "Guida",
"recordings": "Registrazioni",
"subscriptions": "Regole di registrazione",
"scheduled": "Programmati",
"noChannels": "Nessun canale disponibile",
"noDvr": "Nessun DVR configurato su nessun server",
"tuneFailed": "Impossibile sintonizzare il canale",
"loading": "Caricamento canali...",
"nowPlaying": "In riproduzione",
"record": "Registra",
"recordSeries": "Registra serie",
"cancelRecording": "Annulla registrazione",
"deleteSubscription": "Elimina regola di registrazione",
"deleteSubscriptionConfirm": "Sei sicuro di voler eliminare questa regola di registrazione?",
"subscriptionDeleted": "Regola di registrazione eliminata",
"noPrograms": "Nessun dato di programma disponibile",
"noRecordings": "Nessuna registrazione programmata",
"noSubscriptions": "Nessuna regola di registrazione",
"channelNumber": "Canale ${number}",
"live": "IN DIRETTA",
"hd": "HD",
"premiere": "NUOVO",
"reloadGuide": "Ricarica guida",
"guideReloaded": "Dati della guida ricaricati",
"allChannels": "Tutti i canali",
"now": "Ora",
"today": "Oggi",
@@ -739,11 +732,8 @@
"minimize": "Riduci"
},
"pairing": {
"recent": "Recenti",
"scan": "Scansiona",
"manual": "Manuale",
"recentConnections": "Connessioni recenti",
"quickReconnect": "Riconnettiti rapidamente ai dispositivi associati in precedenza",
"pairWithDesktop": "Associa con desktop",
"enterSessionDetails": "Inserisci i dettagli della sessione mostrati sul tuo dispositivo desktop",
"hostAddressHint": "192.168.1.100:48632",
@@ -757,11 +747,7 @@
"cameraPermissionRequired": "L'autorizzazione della fotocamera è necessaria per scansionare i QR code.\nConcedi l'accesso alla fotocamera nelle impostazioni del dispositivo.",
"cameraError": "Impossibile avviare la fotocamera: ${error}",
"scanInstruction": "Punta la fotocamera verso il QR code mostrato sul tuo desktop",
"noRecentConnections": "Nessuna connessione recente",
"connectUsingManual": "Connettiti a un dispositivo tramite inserimento manuale per iniziare",
"invalidQrCode": "Formato QR code non valido",
"removeRecentConnection": "Rimuovi connessione recente",
"removeConfirm": "Rimuovere \"${name}\" dalle connessioni recenti?",
"validationHostRequired": "Inserisci l'indirizzo host",
"validationHostFormat": "Il formato deve essere IP:porta (es. 192.168.1.100:48632)",
"validationSessionIdRequired": "Inserisci un ID sessione",
@@ -770,8 +756,7 @@
"validationPinLength": "Il PIN deve essere di 6 cifre",
"connectionTimedOut": "Connessione scaduta. Verifica l'ID sessione e il PIN.",
"sessionNotFound": "Sessione non trovata. Verifica le tue credenziali.",
"failedToConnect": "Connessione fallita: ${error}",
"failedToLoadRecent": "Impossibile caricare le sessioni recenti: ${error}"
"failedToConnect": "Connessione fallita: ${error}"
},
"remote": {
"disconnectConfirm": "Vuoi disconnetterti dalla sessione remota?",
@@ -813,7 +798,8 @@
"subtitleSync": "Sincronizzazione sottotitoli",
"hdr": "HDR",
"audioOutput": "Uscita audio",
"performanceOverlay": "Overlay prestazioni"
"performanceOverlay": "Overlay prestazioni",
"audioPassthrough": "Audio Passthrough"
},
"externalPlayer": {
"title": "Lettore esterno",
@@ -831,5 +817,66 @@
"launchFailed": "Impossibile aprire il lettore esterno",
"appNotInstalled": "${name} non è installato",
"playInExternalPlayer": "Riproduci in lettore esterno"
},
"metadataEdit": {
"editMetadata": "Modifica...",
"screenTitle": "Modifica metadati",
"basicInfo": "Informazioni di base",
"artwork": "Artwork",
"advancedSettings": "Impostazioni avanzate",
"title": "Titolo",
"sortTitle": "Titolo di ordinamento",
"originalTitle": "Titolo originale",
"releaseDate": "Data di uscita",
"contentRating": "Classificazione",
"studio": "Studio",
"tagline": "Tagline",
"summary": "Trama",
"poster": "Poster",
"background": "Sfondo",
"selectPoster": "Seleziona poster",
"selectBackground": "Seleziona sfondo",
"fromUrl": "Da URL",
"uploadFile": "Carica file",
"enterImageUrl": "Inserisci URL immagine",
"imageUrl": "URL immagine",
"metadataUpdated": "Metadati aggiornati",
"metadataUpdateFailed": "Aggiornamento metadati non riuscito",
"artworkUpdated": "Artwork aggiornato",
"artworkUpdateFailed": "Aggiornamento artwork non riuscito",
"noArtworkAvailable": "Nessun artwork disponibile",
"notSet": "Non impostato",
"libraryDefault": "Predefinito libreria",
"accountDefault": "Predefinito account",
"seriesDefault": "Predefinito serie",
"episodeSorting": "Ordinamento episodi",
"oldestFirst": "Più vecchi prima",
"newestFirst": "Più recenti prima",
"keep": "Conserva",
"allEpisodes": "Tutti gli episodi",
"latestEpisodes": "${count} episodi più recenti",
"latestEpisode": "Episodio più recente",
"episodesAddedPastDays": "Episodi aggiunti negli ultimi ${count} giorni",
"deleteAfterPlaying": "Elimina episodi dopo la riproduzione",
"never": "Mai",
"afterADay": "Dopo un giorno",
"afterAWeek": "Dopo una settimana",
"afterAMonth": "Dopo un mese",
"onNextRefresh": "Al prossimo aggiornamento",
"seasons": "Stagioni",
"show": "Mostra",
"hide": "Nascondi",
"episodeOrdering": "Ordine episodi",
"tmdbAiring": "The Movie Database (In onda)",
"tvdbAiring": "TheTVDB (In onda)",
"tvdbAbsolute": "TheTVDB (Assoluto)",
"metadataLanguage": "Lingua metadati",
"useOriginalTitle": "Usa titolo originale",
"preferredAudioLanguage": "Lingua audio preferita",
"preferredSubtitleLanguage": "Lingua sottotitoli preferita",
"subtitleMode": "Selezione automatica sottotitoli",
"manuallySelected": "Selezionato manualmente",
"shownWithForeignAudio": "Mostrati con audio straniero",
"alwaysEnabled": "Sempre attivo"
}
}
+70 -23
View File
@@ -1,7 +1,7 @@
{
"app": {
"title": "Plezy"
},
},
"auth": {
"signInWithPlex": "Plex 계정으로 로그인",
"showQRCode": "QR 코드",
@@ -126,6 +126,8 @@
"hardwareDecodingDescription": "가능한 경우 하드웨어 가속을 사용합니다",
"bufferSize": "버퍼 크기",
"bufferSizeMB": "${size}MB",
"bufferSizeAuto": "자동 (권장)",
"bufferSizeWarning": "기기 메모리가 ${heap}MB입니다. ${size}MB 버퍼는 재생 문제를 일으킬 수 있습니다.",
"subtitleStyling": "자막 스타일",
"subtitleStylingDescription": "자막의 외형을 사용자 설정",
"smallSkipDuration": "짧은 건너뛰기 시간",
@@ -303,6 +305,9 @@
"timerActive": "타이머 활성화됨",
"playbackWillPauseIn": "재생이 ${duration} 후에 일시 중지 됩니다",
"sleepTimerCompleted": "수면 타이머 완료됨 - 재생이 일시 중지되었습니다",
"stillWatching": "아직 시청 중이신가요?",
"pausingIn": "${seconds}초 후 일시 정지",
"continueWatching": "계속",
"autoPlayNext": "다음 자동 재생",
"playNext": "다음 재생",
"playButton": "재생",
@@ -550,29 +555,17 @@
"title": "실시간 TV",
"channels": "채널",
"guide": "편성표",
"recordings": "녹화",
"subscriptions": "녹화 규칙",
"scheduled": "예약됨",
"noChannels": "사용 가능한 채널이 없습니다",
"noDvr": "서버에 DVR이 구성되어 있지 않습니다",
"tuneFailed": "채널 튜닝에 실패했습니다",
"loading": "채널 로딩 중...",
"nowPlaying": "현재 재생 중",
"record": "녹화",
"recordSeries": "시리즈 녹화",
"cancelRecording": "녹화 취소",
"deleteSubscription": "녹화 규칙 삭제",
"deleteSubscriptionConfirm": "이 녹화 규칙을 삭제하시겠습니까?",
"subscriptionDeleted": "녹화 규칙이 삭제되었습니다",
"noPrograms": "프로그램 데이터가 없습니다",
"noRecordings": "예약된 녹화가 없습니다",
"noSubscriptions": "녹화 규칙이 없습니다",
"channelNumber": "채널 ${number}",
"live": "실시간",
"hd": "HD",
"premiere": "신규",
"reloadGuide": "편성표 새로고침",
"guideReloaded": "편성표 데이터가 새로고침되었습니다",
"allChannels": "전체 채널",
"now": "지금",
"today": "오늘",
@@ -739,11 +732,8 @@
"minimize": "최소화"
},
"pairing": {
"recent": "최근",
"scan": "스캔",
"manual": "수동",
"recentConnections": "최근 연결",
"quickReconnect": "이전에 페어링한 기기에 빠르게 재연결",
"pairWithDesktop": "데스크톱과 페어링",
"enterSessionDetails": "데스크톱 기기에 표시된 세션 정보를 입력하세요",
"hostAddressHint": "192.168.1.100:48632",
@@ -757,11 +747,7 @@
"cameraPermissionRequired": "QR 코드를 스캔하려면 카메라 권한이 필요합니다.\n기기 설정에서 카메라 접근을 허용해 주세요.",
"cameraError": "카메라를 시작할 수 없습니다: ${error}",
"scanInstruction": "데스크톱에 표시된 QR 코드에 카메라를 향하세요",
"noRecentConnections": "최근 연결 없음",
"connectUsingManual": "수동 입력으로 기기에 연결하여 시작하세요",
"invalidQrCode": "유효하지 않은 QR 코드 형식",
"removeRecentConnection": "최근 연결 삭제",
"removeConfirm": "\"${name}\"을(를) 최근 연결에서 삭제하시겠습니까?",
"validationHostRequired": "호스트 주소를 입력하세요",
"validationHostFormat": "IP:포트 형식이어야 합니다 (예: 192.168.1.100:48632)",
"validationSessionIdRequired": "세션 ID를 입력하세요",
@@ -770,8 +756,7 @@
"validationPinLength": "PIN은 6자리여야 합니다",
"connectionTimedOut": "연결 시간이 초과되었습니다. 세션 ID와 PIN을 확인하세요.",
"sessionNotFound": "세션을 찾을 수 없습니다. 자격 증명을 확인하세요.",
"failedToConnect": "연결 실패: ${error}",
"failedToLoadRecent": "최근 세션 로드 실패: ${error}"
"failedToConnect": "연결 실패: ${error}"
},
"remote": {
"disconnectConfirm": "원격 세션 연결을 해제하시겠습니까?",
@@ -813,7 +798,8 @@
"subtitleSync": "자막 동기화",
"hdr": "HDR",
"audioOutput": "오디오 출력",
"performanceOverlay": "성능 오버레이"
"performanceOverlay": "성능 오버레이",
"audioPassthrough": "오디오 패스스루"
},
"externalPlayer": {
"title": "외부 플레이어",
@@ -831,5 +817,66 @@
"launchFailed": "외부 플레이어를 열 수 없습니다",
"appNotInstalled": "${name}이(가) 설치되어 있지 않습니다",
"playInExternalPlayer": "외부 플레이어에서 재생"
},
"metadataEdit": {
"editMetadata": "편집...",
"screenTitle": "메타데이터 편집",
"basicInfo": "기본 정보",
"artwork": "아트워크",
"advancedSettings": "고급 설정",
"title": "제목",
"sortTitle": "정렬 제목",
"originalTitle": "원제",
"releaseDate": "출시일",
"contentRating": "콘텐츠 등급",
"studio": "스튜디오",
"tagline": "태그라인",
"summary": "줄거리",
"poster": "포스터",
"background": "배경",
"selectPoster": "포스터 선택",
"selectBackground": "배경 선택",
"fromUrl": "URL에서",
"uploadFile": "파일 업로드",
"enterImageUrl": "이미지 URL 입력",
"imageUrl": "이미지 URL",
"metadataUpdated": "메타데이터가 업데이트되었습니다",
"metadataUpdateFailed": "메타데이터 업데이트 실패",
"artworkUpdated": "아트워크가 업데이트되었습니다",
"artworkUpdateFailed": "아트워크 업데이트 실패",
"noArtworkAvailable": "사용 가능한 아트워크 없음",
"notSet": "설정되지 않음",
"libraryDefault": "라이브러리 기본값",
"accountDefault": "계정 기본값",
"seriesDefault": "시리즈 기본값",
"episodeSorting": "에피소드 정렬",
"oldestFirst": "오래된 순",
"newestFirst": "최신 순",
"keep": "유지",
"allEpisodes": "모든 에피소드",
"latestEpisodes": "최신 에피소드 ${count}개",
"latestEpisode": "최신 에피소드",
"episodesAddedPastDays": "최근 ${count}일 내 추가된 에피소드",
"deleteAfterPlaying": "재생 후 에피소드 삭제",
"never": "안 함",
"afterADay": "하루 후",
"afterAWeek": "일주일 후",
"afterAMonth": "한 달 후",
"onNextRefresh": "다음 새로고침 시",
"seasons": "시즌",
"show": "표시",
"hide": "숨기기",
"episodeOrdering": "에피소드 순서",
"tmdbAiring": "The Movie Database (방영순)",
"tvdbAiring": "TheTVDB (방영순)",
"tvdbAbsolute": "TheTVDB (절대순)",
"metadataLanguage": "메타데이터 언어",
"useOriginalTitle": "원제 사용",
"preferredAudioLanguage": "선호 오디오 언어",
"preferredSubtitleLanguage": "선호 자막 언어",
"subtitleMode": "자막 자동 선택 모드",
"manuallySelected": "수동 선택",
"shownWithForeignAudio": "외국어 오디오 시 표시",
"alwaysEnabled": "항상 활성화"
}
}
+70 -23
View File
@@ -1,7 +1,7 @@
{
"app": {
"title": "Plezy"
},
},
"auth": {
"signInWithPlex": "Inloggen met Plex",
"showQRCode": "Toon QR-code",
@@ -126,6 +126,8 @@
"hardwareDecodingDescription": "Gebruik hardware versnelling indien beschikbaar",
"bufferSize": "Buffer grootte",
"bufferSizeMB": "${size}MB",
"bufferSizeAuto": "Auto (Aanbevolen)",
"bufferSizeWarning": "Je apparaat heeft ${heap}MB geheugen. Een buffer van ${size}MB kan afspeelproblemen veroorzaken.",
"subtitleStyling": "Ondertitel opmaak",
"subtitleStylingDescription": "Pas ondertitel uiterlijk aan",
"smallSkipDuration": "Korte skip duur",
@@ -303,6 +305,9 @@
"timerActive": "Timer actief",
"playbackWillPauseIn": "Afspelen wordt gepauzeerd over ${duration}",
"sleepTimerCompleted": "Slaaptimer voltooid - afspelen gepauzeerd",
"stillWatching": "Kijk je nog?",
"pausingIn": "Pauze over ${seconds}s",
"continueWatching": "Doorgaan",
"autoPlayNext": "Automatisch volgende afspelen",
"playNext": "Volgende afspelen",
"playButton": "Afspelen",
@@ -550,29 +555,17 @@
"title": "Live TV",
"channels": "Zenders",
"guide": "Gids",
"recordings": "Opnames",
"subscriptions": "Opnameregels",
"scheduled": "Gepland",
"noChannels": "Geen zenders beschikbaar",
"noDvr": "Geen DVR geconfigureerd op een server",
"tuneFailed": "Kan zender niet afstemmen",
"loading": "Zenders laden...",
"nowPlaying": "Nu aan het afspelen",
"record": "Opnemen",
"recordSeries": "Serie opnemen",
"cancelRecording": "Opname annuleren",
"deleteSubscription": "Opnameregel verwijderen",
"deleteSubscriptionConfirm": "Weet je zeker dat je deze opnameregel wilt verwijderen?",
"subscriptionDeleted": "Opnameregel verwijderd",
"noPrograms": "Geen programmagegevens beschikbaar",
"noRecordings": "Geen opnames gepland",
"noSubscriptions": "Geen opnameregels",
"channelNumber": "Kanaal ${number}",
"live": "LIVE",
"hd": "HD",
"premiere": "NIEUW",
"reloadGuide": "Gids herladen",
"guideReloaded": "Gidsgegevens herladen",
"allChannels": "Alle zenders",
"now": "Nu",
"today": "Vandaag",
@@ -739,11 +732,8 @@
"minimize": "Minimaliseren"
},
"pairing": {
"recent": "Recent",
"scan": "Scannen",
"manual": "Handmatig",
"recentConnections": "Recente verbindingen",
"quickReconnect": "Snel opnieuw verbinden met eerder gekoppelde apparaten",
"pairWithDesktop": "Koppelen met desktop",
"enterSessionDetails": "Voer de sessiegegevens in die op je desktop-apparaat worden getoond",
"hostAddressHint": "192.168.1.100:48632",
@@ -757,11 +747,7 @@
"cameraPermissionRequired": "Cameratoestemming is vereist om QR-codes te scannen.\nGeef cameratoegang in je apparaatinstellingen.",
"cameraError": "Kan camera niet starten: ${error}",
"scanInstruction": "Richt je camera op de QR-code die op je desktop wordt getoond",
"noRecentConnections": "Geen recente verbindingen",
"connectUsingManual": "Verbind met een apparaat via Handmatige invoer om te beginnen",
"invalidQrCode": "Ongeldig QR-codeformaat",
"removeRecentConnection": "Recente verbinding verwijderen",
"removeConfirm": "\"${name}\" verwijderen uit recente verbindingen?",
"validationHostRequired": "Voer een hostadres in",
"validationHostFormat": "Formaat moet IP:poort zijn (bijv. 192.168.1.100:48632)",
"validationSessionIdRequired": "Voer een sessie-ID in",
@@ -770,8 +756,7 @@
"validationPinLength": "PIN moet 6 cijfers zijn",
"connectionTimedOut": "Verbinding verlopen. Controleer de sessie-ID en PIN.",
"sessionNotFound": "Kan de sessie niet vinden. Controleer je gegevens.",
"failedToConnect": "Verbinden mislukt: ${error}",
"failedToLoadRecent": "Kan recente sessies niet laden: ${error}"
"failedToConnect": "Verbinden mislukt: ${error}"
},
"remote": {
"disconnectConfirm": "Wil je de verbinding met de externe sessie verbreken?",
@@ -813,7 +798,8 @@
"subtitleSync": "Ondertitel synchronisatie",
"hdr": "HDR",
"audioOutput": "Audio-uitvoer",
"performanceOverlay": "Prestatie-overlay"
"performanceOverlay": "Prestatie-overlay",
"audioPassthrough": "Audio-doorvoer"
},
"externalPlayer": {
"title": "Externe speler",
@@ -831,5 +817,66 @@
"launchFailed": "Kan externe speler niet openen",
"appNotInstalled": "${name} is niet geïnstalleerd",
"playInExternalPlayer": "Afspelen in externe speler"
},
"metadataEdit": {
"editMetadata": "Bewerken...",
"screenTitle": "Metadata bewerken",
"basicInfo": "Basisinformatie",
"artwork": "Artwork",
"advancedSettings": "Geavanceerde instellingen",
"title": "Titel",
"sortTitle": "Sorteertitel",
"originalTitle": "Oorspronkelijke titel",
"releaseDate": "Releasedatum",
"contentRating": "Leeftijdsclassificatie",
"studio": "Studio",
"tagline": "Tagline",
"summary": "Samenvatting",
"poster": "Poster",
"background": "Achtergrond",
"selectPoster": "Poster selecteren",
"selectBackground": "Achtergrond selecteren",
"fromUrl": "Vanaf URL",
"uploadFile": "Bestand uploaden",
"enterImageUrl": "Voer afbeeldings-URL in",
"imageUrl": "Afbeeldings-URL",
"metadataUpdated": "Metadata bijgewerkt",
"metadataUpdateFailed": "Metadata bijwerken mislukt",
"artworkUpdated": "Artwork bijgewerkt",
"artworkUpdateFailed": "Artwork bijwerken mislukt",
"noArtworkAvailable": "Geen artwork beschikbaar",
"notSet": "Niet ingesteld",
"libraryDefault": "Bibliotheekstandaard",
"accountDefault": "Accountstandaard",
"seriesDefault": "Seriestandaard",
"episodeSorting": "Afleveringen sorteren",
"oldestFirst": "Oudste eerst",
"newestFirst": "Nieuwste eerst",
"keep": "Bewaren",
"allEpisodes": "Alle afleveringen",
"latestEpisodes": "${count} nieuwste afleveringen",
"latestEpisode": "Nieuwste aflevering",
"episodesAddedPastDays": "Afleveringen toegevoegd in de afgelopen ${count} dagen",
"deleteAfterPlaying": "Afleveringen verwijderen na afspelen",
"never": "Nooit",
"afterADay": "Na een dag",
"afterAWeek": "Na een week",
"afterAMonth": "Na een maand",
"onNextRefresh": "Bij volgende verversing",
"seasons": "Seizoenen",
"show": "Tonen",
"hide": "Verbergen",
"episodeOrdering": "Afleveringsvolgorde",
"tmdbAiring": "The Movie Database (Uitgezonden)",
"tvdbAiring": "TheTVDB (Uitgezonden)",
"tvdbAbsolute": "TheTVDB (Absoluut)",
"metadataLanguage": "Metadatataal",
"useOriginalTitle": "Oorspronkelijke titel gebruiken",
"preferredAudioLanguage": "Voorkeurstaal audio",
"preferredSubtitleLanguage": "Voorkeurstaal ondertiteling",
"subtitleMode": "Automatische ondertitelselectie",
"manuallySelected": "Handmatig geselecteerd",
"shownWithForeignAudio": "Weergeven bij anderstalig geluid",
"alwaysEnabled": "Altijd ingeschakeld"
}
}
+2 -2
View File
@@ -4,9 +4,9 @@
/// To regenerate, run: `dart run slang`
///
/// Locales: 9
/// Strings: 6705 (745 per locale)
/// Strings: 7173 (797 per locale)
///
/// Built on 2026-02-20 at 23:08 UTC
/// Built on 2026-02-24 at 21:50 UTC
// coverage:ignore-file
// ignore_for_file: type=lint, unused_import
+142 -42
View File
@@ -74,6 +74,7 @@ class TranslationsDe with BaseTranslations<AppLocale, Translations> implements T
@override late final _TranslationsCompanionRemoteDe companionRemote = _TranslationsCompanionRemoteDe._(_root);
@override late final _TranslationsVideoSettingsDe videoSettings = _TranslationsVideoSettingsDe._(_root);
@override late final _TranslationsExternalPlayerDe externalPlayer = _TranslationsExternalPlayerDe._(_root);
@override late final _TranslationsMetadataEditDe metadataEdit = _TranslationsMetadataEditDe._(_root);
}
// Path: app
@@ -244,6 +245,8 @@ class _TranslationsSettingsDe implements TranslationsSettingsEn {
@override String get hardwareDecodingDescription => 'Hardwarebeschleunigung verwenden, sofern verfügbar';
@override String get bufferSize => 'Puffergröße';
@override String bufferSizeMB({required Object size}) => '${size}MB';
@override String get bufferSizeAuto => 'Auto (Empfohlen)';
@override String bufferSizeWarning({required Object heap, required Object size}) => 'Ihr Gerät hat ${heap}MB Speicher. Ein ${size}MB-Puffer kann Wiedergabeprobleme verursachen.';
@override String get subtitleStyling => 'Untertitel-Stil';
@override String get subtitleStylingDescription => 'Aussehen von Untertiteln anpassen';
@override String get smallSkipDuration => 'Kleine Sprungdauer';
@@ -457,6 +460,9 @@ class _TranslationsVideoControlsDe implements TranslationsVideoControlsEn {
@override String get timerActive => 'Schlaftimer aktiv';
@override String playbackWillPauseIn({required Object duration}) => 'Wiedergabe wird in ${duration} pausiert';
@override String get sleepTimerCompleted => 'Schlaftimer abgelaufen – Wiedergabe pausiert';
@override String get stillWatching => 'Schaust du noch?';
@override String pausingIn({required Object seconds}) => 'Pause in ${seconds}s';
@override String get continueWatching => 'Weiter';
@override String get autoPlayNext => 'Nächstes automatisch abspielen';
@override String get playNext => 'Nächstes abspielen';
@override String get playButton => 'Wiedergeben';
@@ -791,29 +797,17 @@ class _TranslationsLiveTvDe implements TranslationsLiveTvEn {
@override String get title => 'Live-TV';
@override String get channels => 'Kanäle';
@override String get guide => 'Programmführer';
@override String get recordings => 'Aufnahmen';
@override String get subscriptions => 'Aufnahmeregeln';
@override String get scheduled => 'Geplant';
@override String get noChannels => 'Keine Kanäle verfügbar';
@override String get noDvr => 'Kein DVR auf einem Server konfiguriert';
@override String get tuneFailed => 'Kanal konnte nicht eingestellt werden';
@override String get loading => 'Kanäle werden geladen...';
@override String get nowPlaying => 'Läuft gerade';
@override String get record => 'Aufnehmen';
@override String get recordSeries => 'Serie aufnehmen';
@override String get cancelRecording => 'Aufnahme abbrechen';
@override String get deleteSubscription => 'Aufnahmeregel löschen';
@override String get deleteSubscriptionConfirm => 'Möchten Sie diese Aufnahmeregel wirklich löschen?';
@override String get subscriptionDeleted => 'Aufnahmeregel gelöscht';
@override String get noPrograms => 'Keine Programmdaten verfügbar';
@override String get noRecordings => 'Keine Aufnahmen geplant';
@override String get noSubscriptions => 'Keine Aufnahmeregeln';
@override String channelNumber({required Object number}) => 'Kanal ${number}';
@override String get live => 'LIVE';
@override String get hd => 'HD';
@override String get premiere => 'NEU';
@override String get reloadGuide => 'Programmführer neu laden';
@override String get guideReloaded => 'Programmdaten neu geladen';
@override String get allChannels => 'Alle Kanäle';
@override String get now => 'Jetzt';
@override String get today => 'Heute';
@@ -1024,6 +1018,7 @@ class _TranslationsVideoSettingsDe implements TranslationsVideoSettingsEn {
@override String get hdr => 'HDR';
@override String get audioOutput => 'Audioausgabe';
@override String get performanceOverlay => 'Leistungsanzeige';
@override String get audioPassthrough => 'Audio-Durchleitung';
}
// Path: externalPlayer
@@ -1050,6 +1045,74 @@ class _TranslationsExternalPlayerDe implements TranslationsExternalPlayerEn {
@override String get playInExternalPlayer => 'In externem Player abspielen';
}
// Path: metadataEdit
class _TranslationsMetadataEditDe implements TranslationsMetadataEditEn {
_TranslationsMetadataEditDe._(this._root);
final TranslationsDe _root; // ignore: unused_field
// Translations
@override String get editMetadata => 'Bearbeiten...';
@override String get screenTitle => 'Metadaten bearbeiten';
@override String get basicInfo => 'Grundlegende Infos';
@override String get artwork => 'Artwork';
@override String get advancedSettings => 'Erweiterte Einstellungen';
@override String get title => 'Titel';
@override String get sortTitle => 'Sortiertitel';
@override String get originalTitle => 'Originaltitel';
@override String get releaseDate => 'Erscheinungsdatum';
@override String get contentRating => 'Altersfreigabe';
@override String get studio => 'Studio';
@override String get tagline => 'Tagline';
@override String get summary => 'Zusammenfassung';
@override String get poster => 'Poster';
@override String get background => 'Hintergrund';
@override String get selectPoster => 'Poster auswählen';
@override String get selectBackground => 'Hintergrund auswählen';
@override String get fromUrl => 'Von URL';
@override String get uploadFile => 'Datei hochladen';
@override String get enterImageUrl => 'Bild-URL eingeben';
@override String get imageUrl => 'Bild-URL';
@override String get metadataUpdated => 'Metadaten aktualisiert';
@override String get metadataUpdateFailed => 'Metadaten konnten nicht aktualisiert werden';
@override String get artworkUpdated => 'Artwork aktualisiert';
@override String get artworkUpdateFailed => 'Artwork konnte nicht aktualisiert werden';
@override String get noArtworkAvailable => 'Kein Artwork verfügbar';
@override String get notSet => 'Nicht festgelegt';
@override String get libraryDefault => 'Bibliotheksstandard';
@override String get accountDefault => 'Kontostandard';
@override String get seriesDefault => 'Serienstandard';
@override String get episodeSorting => 'Episodensortierung';
@override String get oldestFirst => 'Älteste zuerst';
@override String get newestFirst => 'Neueste zuerst';
@override String get keep => 'Behalten';
@override String get allEpisodes => 'Alle Episoden';
@override String latestEpisodes({required Object count}) => '${count} neueste Episoden';
@override String get latestEpisode => 'Neueste Episode';
@override String episodesAddedPastDays({required Object count}) => 'Episoden der letzten ${count} Tage';
@override String get deleteAfterPlaying => 'Episoden nach Wiedergabe löschen';
@override String get never => 'Nie';
@override String get afterADay => 'Nach einem Tag';
@override String get afterAWeek => 'Nach einer Woche';
@override String get afterAMonth => 'Nach einem Monat';
@override String get onNextRefresh => 'Bei nächster Aktualisierung';
@override String get seasons => 'Staffeln';
@override String get show => 'Anzeigen';
@override String get hide => 'Ausblenden';
@override String get episodeOrdering => 'Episodenreihenfolge';
@override String get tmdbAiring => 'The Movie Database (Ausgestrahlt)';
@override String get tvdbAiring => 'TheTVDB (Ausgestrahlt)';
@override String get tvdbAbsolute => 'TheTVDB (Absolut)';
@override String get metadataLanguage => 'Metadaten-Sprache';
@override String get useOriginalTitle => 'Originaltitel verwenden';
@override String get preferredAudioLanguage => 'Bevorzugte Audiosprache';
@override String get preferredSubtitleLanguage => 'Bevorzugte Untertitelsprache';
@override String get subtitleMode => 'Automatische Untertitelauswahl';
@override String get manuallySelected => 'Manuell ausgewählt';
@override String get shownWithForeignAudio => 'Bei fremdsprachigem Audio anzeigen';
@override String get alwaysEnabled => 'Immer aktiviert';
}
// Path: hotkeys.actions
class _TranslationsHotkeysActionsDe implements TranslationsHotkeysActionsEn {
_TranslationsHotkeysActionsDe._(this._root);
@@ -1151,11 +1214,8 @@ class _TranslationsCompanionRemotePairingDe implements TranslationsCompanionRemo
final TranslationsDe _root; // ignore: unused_field
// Translations
@override String get recent => 'Zuletzt';
@override String get scan => 'Scannen';
@override String get manual => 'Manuell';
@override String get recentConnections => 'Letzte Verbindungen';
@override String get quickReconnect => 'Schnell mit zuvor gekoppelten Geräten verbinden';
@override String get pairWithDesktop => 'Mit Desktop koppeln';
@override String get enterSessionDetails => 'Gib die Sitzungsdetails ein, die auf deinem Desktop-Gerät angezeigt werden';
@override String get hostAddressHint => '192.168.1.100:48632';
@@ -1169,11 +1229,7 @@ class _TranslationsCompanionRemotePairingDe implements TranslationsCompanionRemo
@override String get cameraPermissionRequired => 'Kameraberechtigung wird zum Scannen von QR-Codes benötigt.\nBitte erteile den Kamerazugriff in den Geräteeinstellungen.';
@override String cameraError({required Object error}) => 'Kamera konnte nicht gestartet werden: ${error}';
@override String get scanInstruction => 'Richte deine Kamera auf den QR-Code auf deinem Desktop';
@override String get noRecentConnections => 'Keine letzten Verbindungen';
@override String get connectUsingManual => 'Verbinde dich über die manuelle Eingabe, um loszulegen';
@override String get invalidQrCode => 'Ungültiges QR-Code-Format';
@override String get removeRecentConnection => 'Letzte Verbindung entfernen';
@override String removeConfirm({required Object name}) => '"${name}" aus den letzten Verbindungen entfernen?';
@override String get validationHostRequired => 'Bitte Host-Adresse eingeben';
@override String get validationHostFormat => 'Format muss IP:Port sein (z.B. 192.168.1.100:48632)';
@override String get validationSessionIdRequired => 'Bitte Sitzungs-ID eingeben';
@@ -1183,7 +1239,6 @@ class _TranslationsCompanionRemotePairingDe implements TranslationsCompanionRemo
@override String get connectionTimedOut => 'Zeitüberschreitung. Bitte Sitzungs-ID und PIN überprüfen.';
@override String get sessionNotFound => 'Sitzung nicht gefunden. Bitte Zugangsdaten überprüfen.';
@override String failedToConnect({required Object error}) => 'Verbindung fehlgeschlagen: ${error}';
@override String failedToLoadRecent({required Object error}) => 'Letzte Sitzungen konnten nicht geladen werden: ${error}';
}
// Path: companionRemote.remote
@@ -1348,6 +1403,8 @@ extension on TranslationsDe {
'settings.hardwareDecodingDescription' => 'Hardwarebeschleunigung verwenden, sofern verfügbar',
'settings.bufferSize' => 'Puffergröße',
'settings.bufferSizeMB' => ({required Object size}) => '${size}MB',
'settings.bufferSizeAuto' => 'Auto (Empfohlen)',
'settings.bufferSizeWarning' => ({required Object heap, required Object size}) => 'Ihr Gerät hat ${heap}MB Speicher. Ein ${size}MB-Puffer kann Wiedergabeprobleme verursachen.',
'settings.subtitleStyling' => 'Untertitel-Stil',
'settings.subtitleStylingDescription' => 'Aussehen von Untertiteln anpassen',
'settings.smallSkipDuration' => 'Kleine Sprungdauer',
@@ -1507,6 +1564,9 @@ extension on TranslationsDe {
'videoControls.timerActive' => 'Schlaftimer aktiv',
'videoControls.playbackWillPauseIn' => ({required Object duration}) => 'Wiedergabe wird in ${duration} pausiert',
'videoControls.sleepTimerCompleted' => 'Schlaftimer abgelaufen – Wiedergabe pausiert',
'videoControls.stillWatching' => 'Schaust du noch?',
'videoControls.pausingIn' => ({required Object seconds}) => 'Pause in ${seconds}s',
'videoControls.continueWatching' => 'Weiter',
'videoControls.autoPlayNext' => 'Nächstes automatisch abspielen',
'videoControls.playNext' => 'Nächstes abspielen',
'videoControls.playButton' => 'Wiedergeben',
@@ -1718,34 +1778,20 @@ extension on TranslationsDe {
'liveTv.title' => 'Live-TV',
'liveTv.channels' => 'Kanäle',
'liveTv.guide' => 'Programmführer',
'liveTv.recordings' => 'Aufnahmen',
'liveTv.subscriptions' => 'Aufnahmeregeln',
'liveTv.scheduled' => 'Geplant',
'liveTv.noChannels' => 'Keine Kanäle verfügbar',
'liveTv.noDvr' => 'Kein DVR auf einem Server konfiguriert',
'liveTv.tuneFailed' => 'Kanal konnte nicht eingestellt werden',
'liveTv.loading' => 'Kanäle werden geladen...',
'liveTv.nowPlaying' => 'Läuft gerade',
'liveTv.record' => 'Aufnehmen',
'liveTv.recordSeries' => 'Serie aufnehmen',
'liveTv.cancelRecording' => 'Aufnahme abbrechen',
'liveTv.deleteSubscription' => 'Aufnahmeregel löschen',
'liveTv.deleteSubscriptionConfirm' => 'Möchten Sie diese Aufnahmeregel wirklich löschen?',
'liveTv.subscriptionDeleted' => 'Aufnahmeregel gelöscht',
'liveTv.noPrograms' => 'Keine Programmdaten verfügbar',
'liveTv.noRecordings' => 'Keine Aufnahmen geplant',
'liveTv.noSubscriptions' => 'Keine Aufnahmeregeln',
'liveTv.channelNumber' => ({required Object number}) => 'Kanal ${number}',
'liveTv.live' => 'LIVE',
'liveTv.hd' => 'HD',
'liveTv.premiere' => 'NEU',
'liveTv.reloadGuide' => 'Programmführer neu laden',
'liveTv.guideReloaded' => 'Programmdaten neu geladen',
'liveTv.allChannels' => 'Alle Kanäle',
'liveTv.now' => 'Jetzt',
'liveTv.today' => 'Heute',
_ => null,
} ?? switch (path) {
'liveTv.midnight' => 'Mitternacht',
'liveTv.overnight' => 'Nacht',
'liveTv.morning' => 'Morgen',
@@ -1753,6 +1799,8 @@ extension on TranslationsDe {
'liveTv.evening' => 'Abend',
'liveTv.lateNight' => 'Spätnacht',
'liveTv.whatsOn' => 'Jetzt im TV',
_ => null,
} ?? switch (path) {
'liveTv.watchChannel' => 'Kanal ansehen',
'downloads.title' => 'Downloads',
'downloads.manage' => 'Verwalten',
@@ -1894,11 +1942,8 @@ extension on TranslationsDe {
'companionRemote.session.copyToClipboard' => 'In Zwischenablage kopieren',
'companionRemote.session.newSession' => 'Neue Sitzung',
'companionRemote.session.minimize' => 'Minimieren',
'companionRemote.pairing.recent' => 'Zuletzt',
'companionRemote.pairing.scan' => 'Scannen',
'companionRemote.pairing.manual' => 'Manuell',
'companionRemote.pairing.recentConnections' => 'Letzte Verbindungen',
'companionRemote.pairing.quickReconnect' => 'Schnell mit zuvor gekoppelten Geräten verbinden',
'companionRemote.pairing.pairWithDesktop' => 'Mit Desktop koppeln',
'companionRemote.pairing.enterSessionDetails' => 'Gib die Sitzungsdetails ein, die auf deinem Desktop-Gerät angezeigt werden',
'companionRemote.pairing.hostAddressHint' => '192.168.1.100:48632',
@@ -1912,11 +1957,7 @@ extension on TranslationsDe {
'companionRemote.pairing.cameraPermissionRequired' => 'Kameraberechtigung wird zum Scannen von QR-Codes benötigt.\nBitte erteile den Kamerazugriff in den Geräteeinstellungen.',
'companionRemote.pairing.cameraError' => ({required Object error}) => 'Kamera konnte nicht gestartet werden: ${error}',
'companionRemote.pairing.scanInstruction' => 'Richte deine Kamera auf den QR-Code auf deinem Desktop',
'companionRemote.pairing.noRecentConnections' => 'Keine letzten Verbindungen',
'companionRemote.pairing.connectUsingManual' => 'Verbinde dich über die manuelle Eingabe, um loszulegen',
'companionRemote.pairing.invalidQrCode' => 'Ungültiges QR-Code-Format',
'companionRemote.pairing.removeRecentConnection' => 'Letzte Verbindung entfernen',
'companionRemote.pairing.removeConfirm' => ({required Object name}) => '"${name}" aus den letzten Verbindungen entfernen?',
'companionRemote.pairing.validationHostRequired' => 'Bitte Host-Adresse eingeben',
'companionRemote.pairing.validationHostFormat' => 'Format muss IP:Port sein (z.B. 192.168.1.100:48632)',
'companionRemote.pairing.validationSessionIdRequired' => 'Bitte Sitzungs-ID eingeben',
@@ -1926,7 +1967,6 @@ extension on TranslationsDe {
'companionRemote.pairing.connectionTimedOut' => 'Zeitüberschreitung. Bitte Sitzungs-ID und PIN überprüfen.',
'companionRemote.pairing.sessionNotFound' => 'Sitzung nicht gefunden. Bitte Zugangsdaten überprüfen.',
'companionRemote.pairing.failedToConnect' => ({required Object error}) => 'Verbindung fehlgeschlagen: ${error}',
'companionRemote.pairing.failedToLoadRecent' => ({required Object error}) => 'Letzte Sitzungen konnten nicht geladen werden: ${error}',
'companionRemote.remote.disconnectConfirm' => 'Möchtest du die Verbindung zur Fernsteuerungssitzung trennen?',
'companionRemote.remote.reconnecting' => 'Verbindung wird wiederhergestellt...',
'companionRemote.remote.attemptOf' => ({required Object current}) => 'Versuch ${current} von 5',
@@ -1964,6 +2004,7 @@ extension on TranslationsDe {
'videoSettings.hdr' => 'HDR',
'videoSettings.audioOutput' => 'Audioausgabe',
'videoSettings.performanceOverlay' => 'Leistungsanzeige',
'videoSettings.audioPassthrough' => 'Audio-Durchleitung',
'externalPlayer.title' => 'Externer Player',
'externalPlayer.useExternalPlayer' => 'Externen Player verwenden',
'externalPlayer.useExternalPlayerDescription' => 'Videos in einer externen App statt im integrierten Player öffnen',
@@ -1979,6 +2020,65 @@ extension on TranslationsDe {
'externalPlayer.launchFailed' => 'Externer Player konnte nicht geöffnet werden',
'externalPlayer.appNotInstalled' => ({required Object name}) => '${name} ist nicht installiert',
'externalPlayer.playInExternalPlayer' => 'In externem Player abspielen',
'metadataEdit.editMetadata' => 'Bearbeiten...',
'metadataEdit.screenTitle' => 'Metadaten bearbeiten',
'metadataEdit.basicInfo' => 'Grundlegende Infos',
'metadataEdit.artwork' => 'Artwork',
'metadataEdit.advancedSettings' => 'Erweiterte Einstellungen',
'metadataEdit.title' => 'Titel',
'metadataEdit.sortTitle' => 'Sortiertitel',
'metadataEdit.originalTitle' => 'Originaltitel',
'metadataEdit.releaseDate' => 'Erscheinungsdatum',
'metadataEdit.contentRating' => 'Altersfreigabe',
'metadataEdit.studio' => 'Studio',
'metadataEdit.tagline' => 'Tagline',
'metadataEdit.summary' => 'Zusammenfassung',
'metadataEdit.poster' => 'Poster',
'metadataEdit.background' => 'Hintergrund',
'metadataEdit.selectPoster' => 'Poster auswählen',
'metadataEdit.selectBackground' => 'Hintergrund auswählen',
'metadataEdit.fromUrl' => 'Von URL',
'metadataEdit.uploadFile' => 'Datei hochladen',
'metadataEdit.enterImageUrl' => 'Bild-URL eingeben',
'metadataEdit.imageUrl' => 'Bild-URL',
'metadataEdit.metadataUpdated' => 'Metadaten aktualisiert',
'metadataEdit.metadataUpdateFailed' => 'Metadaten konnten nicht aktualisiert werden',
'metadataEdit.artworkUpdated' => 'Artwork aktualisiert',
'metadataEdit.artworkUpdateFailed' => 'Artwork konnte nicht aktualisiert werden',
'metadataEdit.noArtworkAvailable' => 'Kein Artwork verfügbar',
'metadataEdit.notSet' => 'Nicht festgelegt',
'metadataEdit.libraryDefault' => 'Bibliotheksstandard',
'metadataEdit.accountDefault' => 'Kontostandard',
'metadataEdit.seriesDefault' => 'Serienstandard',
'metadataEdit.episodeSorting' => 'Episodensortierung',
'metadataEdit.oldestFirst' => 'Älteste zuerst',
'metadataEdit.newestFirst' => 'Neueste zuerst',
'metadataEdit.keep' => 'Behalten',
'metadataEdit.allEpisodes' => 'Alle Episoden',
'metadataEdit.latestEpisodes' => ({required Object count}) => '${count} neueste Episoden',
'metadataEdit.latestEpisode' => 'Neueste Episode',
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Episoden der letzten ${count} Tage',
'metadataEdit.deleteAfterPlaying' => 'Episoden nach Wiedergabe löschen',
'metadataEdit.never' => 'Nie',
'metadataEdit.afterADay' => 'Nach einem Tag',
'metadataEdit.afterAWeek' => 'Nach einer Woche',
'metadataEdit.afterAMonth' => 'Nach einem Monat',
'metadataEdit.onNextRefresh' => 'Bei nächster Aktualisierung',
'metadataEdit.seasons' => 'Staffeln',
'metadataEdit.show' => 'Anzeigen',
'metadataEdit.hide' => 'Ausblenden',
'metadataEdit.episodeOrdering' => 'Episodenreihenfolge',
'metadataEdit.tmdbAiring' => 'The Movie Database (Ausgestrahlt)',
'metadataEdit.tvdbAiring' => 'TheTVDB (Ausgestrahlt)',
'metadataEdit.tvdbAbsolute' => 'TheTVDB (Absolut)',
'metadataEdit.metadataLanguage' => 'Metadaten-Sprache',
'metadataEdit.useOriginalTitle' => 'Originaltitel verwenden',
'metadataEdit.preferredAudioLanguage' => 'Bevorzugte Audiosprache',
'metadataEdit.preferredSubtitleLanguage' => 'Bevorzugte Untertitelsprache',
'metadataEdit.subtitleMode' => 'Automatische Untertitelauswahl',
'metadataEdit.manuallySelected' => 'Manuell ausgewählt',
'metadataEdit.shownWithForeignAudio' => 'Bei fremdsprachigem Audio anzeigen',
'metadataEdit.alwaysEnabled' => 'Immer aktiviert',
_ => null,
};
}
+272 -81
View File
@@ -77,6 +77,7 @@ class Translations with BaseTranslations<AppLocale, Translations> {
late final TranslationsCompanionRemoteEn companionRemote = TranslationsCompanionRemoteEn._(_root);
late final TranslationsVideoSettingsEn videoSettings = TranslationsVideoSettingsEn._(_root);
late final TranslationsExternalPlayerEn externalPlayer = TranslationsExternalPlayerEn._(_root);
late final TranslationsMetadataEditEn metadataEdit = TranslationsMetadataEditEn._(_root);
}
// Path: app
@@ -480,6 +481,12 @@ class TranslationsSettingsEn {
/// en: '${size}MB'
String bufferSizeMB({required Object size}) => '${size}MB';
/// en: 'Auto (Recommended)'
String get bufferSizeAuto => 'Auto (Recommended)';
/// en: 'Your device has ${heap}MB of memory. A ${size}MB buffer may cause playback issues.'
String bufferSizeWarning({required Object heap, required Object size}) => 'Your device has ${heap}MB of memory. A ${size}MB buffer may cause playback issues.';
/// en: 'Subtitle Styling'
String get subtitleStyling => 'Subtitle Styling';
@@ -974,6 +981,15 @@ class TranslationsVideoControlsEn {
/// en: 'Sleep timer completed - playback paused'
String get sleepTimerCompleted => 'Sleep timer completed - playback paused';
/// en: 'Still watching?'
String get stillWatching => 'Still watching?';
/// en: 'Pausing in ${seconds}s'
String pausingIn({required Object seconds}) => 'Pausing in ${seconds}s';
/// en: 'Continue'
String get continueWatching => 'Continue';
/// en: 'Auto-Play Next'
String get autoPlayNext => 'Auto-Play Next';
@@ -1702,15 +1718,6 @@ class TranslationsLiveTvEn {
/// en: 'Guide'
String get guide => 'Guide';
/// en: 'Recordings'
String get recordings => 'Recordings';
/// en: 'Subscriptions'
String get subscriptions => 'Subscriptions';
/// en: 'Scheduled'
String get scheduled => 'Scheduled';
/// en: 'No channels available'
String get noChannels => 'No channels available';
@@ -1726,33 +1733,9 @@ class TranslationsLiveTvEn {
/// en: 'Now Playing'
String get nowPlaying => 'Now Playing';
/// en: 'Record'
String get record => 'Record';
/// en: 'Record Series'
String get recordSeries => 'Record Series';
/// en: 'Cancel Recording'
String get cancelRecording => 'Cancel Recording';
/// en: 'Delete Recording Rule'
String get deleteSubscription => 'Delete Recording Rule';
/// en: 'Are you sure you want to delete this recording rule?'
String get deleteSubscriptionConfirm => 'Are you sure you want to delete this recording rule?';
/// en: 'Recording rule deleted'
String get subscriptionDeleted => 'Recording rule deleted';
/// en: 'No program data available'
String get noPrograms => 'No program data available';
/// en: 'No recordings scheduled'
String get noRecordings => 'No recordings scheduled';
/// en: 'No recording rules'
String get noSubscriptions => 'No recording rules';
/// en: 'Ch. ${number}'
String channelNumber({required Object number}) => 'Ch. ${number}';
@@ -1768,9 +1751,6 @@ class TranslationsLiveTvEn {
/// en: 'Reload Guide'
String get reloadGuide => 'Reload Guide';
/// en: 'Guide data reloaded'
String get guideReloaded => 'Guide data reloaded';
/// en: 'All Channels'
String get allChannels => 'All Channels';
@@ -2269,6 +2249,9 @@ class TranslationsVideoSettingsEn {
/// en: 'Performance Overlay'
String get performanceOverlay => 'Performance Overlay';
/// en: 'Audio Passthrough'
String get audioPassthrough => 'Audio Passthrough';
}
// Path: externalPlayer
@@ -2325,6 +2308,192 @@ class TranslationsExternalPlayerEn {
String get playInExternalPlayer => 'Play in External Player';
}
// Path: metadataEdit
class TranslationsMetadataEditEn {
TranslationsMetadataEditEn._(this._root);
final Translations _root; // ignore: unused_field
// Translations
/// en: 'Edit...'
String get editMetadata => 'Edit...';
/// en: 'Edit Metadata'
String get screenTitle => 'Edit Metadata';
/// en: 'Basic Info'
String get basicInfo => 'Basic Info';
/// en: 'Artwork'
String get artwork => 'Artwork';
/// en: 'Advanced Settings'
String get advancedSettings => 'Advanced Settings';
/// en: 'Title'
String get title => 'Title';
/// en: 'Sort Title'
String get sortTitle => 'Sort Title';
/// en: 'Original Title'
String get originalTitle => 'Original Title';
/// en: 'Release Date'
String get releaseDate => 'Release Date';
/// en: 'Content Rating'
String get contentRating => 'Content Rating';
/// en: 'Studio'
String get studio => 'Studio';
/// en: 'Tagline'
String get tagline => 'Tagline';
/// en: 'Summary'
String get summary => 'Summary';
/// en: 'Poster'
String get poster => 'Poster';
/// en: 'Background'
String get background => 'Background';
/// en: 'Select Poster'
String get selectPoster => 'Select Poster';
/// en: 'Select Background'
String get selectBackground => 'Select Background';
/// en: 'From URL'
String get fromUrl => 'From URL';
/// en: 'Upload File'
String get uploadFile => 'Upload File';
/// en: 'Enter image URL'
String get enterImageUrl => 'Enter image URL';
/// en: 'Image URL'
String get imageUrl => 'Image URL';
/// en: 'Metadata updated'
String get metadataUpdated => 'Metadata updated';
/// en: 'Failed to update metadata'
String get metadataUpdateFailed => 'Failed to update metadata';
/// en: 'Artwork updated'
String get artworkUpdated => 'Artwork updated';
/// en: 'Failed to update artwork'
String get artworkUpdateFailed => 'Failed to update artwork';
/// en: 'No artwork available'
String get noArtworkAvailable => 'No artwork available';
/// en: 'Not set'
String get notSet => 'Not set';
/// en: 'Library default'
String get libraryDefault => 'Library default';
/// en: 'Account default'
String get accountDefault => 'Account default';
/// en: 'Series default'
String get seriesDefault => 'Series default';
/// en: 'Episode Sorting'
String get episodeSorting => 'Episode Sorting';
/// en: 'Oldest first'
String get oldestFirst => 'Oldest first';
/// en: 'Newest first'
String get newestFirst => 'Newest first';
/// en: 'Keep'
String get keep => 'Keep';
/// en: 'All episodes'
String get allEpisodes => 'All episodes';
/// en: '${count} latest episodes'
String latestEpisodes({required Object count}) => '${count} latest episodes';
/// en: 'Latest episode'
String get latestEpisode => 'Latest episode';
/// en: 'Episodes added in the past ${count} days'
String episodesAddedPastDays({required Object count}) => 'Episodes added in the past ${count} days';
/// en: 'Delete Episodes After Playing'
String get deleteAfterPlaying => 'Delete Episodes After Playing';
/// en: 'Never'
String get never => 'Never';
/// en: 'After a day'
String get afterADay => 'After a day';
/// en: 'After a week'
String get afterAWeek => 'After a week';
/// en: 'After a month'
String get afterAMonth => 'After a month';
/// en: 'On next refresh'
String get onNextRefresh => 'On next refresh';
/// en: 'Seasons'
String get seasons => 'Seasons';
/// en: 'Show'
String get show => 'Show';
/// en: 'Hide'
String get hide => 'Hide';
/// en: 'Episode Ordering'
String get episodeOrdering => 'Episode Ordering';
/// en: 'The Movie Database (Aired)'
String get tmdbAiring => 'The Movie Database (Aired)';
/// en: 'TheTVDB (Aired)'
String get tvdbAiring => 'TheTVDB (Aired)';
/// en: 'TheTVDB (Absolute)'
String get tvdbAbsolute => 'TheTVDB (Absolute)';
/// en: 'Metadata Language'
String get metadataLanguage => 'Metadata Language';
/// en: 'Use Original Title'
String get useOriginalTitle => 'Use Original Title';
/// en: 'Preferred Audio Language'
String get preferredAudioLanguage => 'Preferred Audio Language';
/// en: 'Preferred Subtitle Language'
String get preferredSubtitleLanguage => 'Preferred Subtitle Language';
/// en: 'Auto-Select Subtitle Mode'
String get subtitleMode => 'Auto-Select Subtitle Mode';
/// en: 'Manually selected'
String get manuallySelected => 'Manually selected';
/// en: 'Shown with foreign audio'
String get shownWithForeignAudio => 'Shown with foreign audio';
/// en: 'Always enabled'
String get alwaysEnabled => 'Always enabled';
}
// Path: hotkeys.actions
class TranslationsHotkeysActionsEn {
TranslationsHotkeysActionsEn._(this._root);
@@ -2525,21 +2694,12 @@ class TranslationsCompanionRemotePairingEn {
// Translations
/// en: 'Recent'
String get recent => 'Recent';
/// en: 'Scan'
String get scan => 'Scan';
/// en: 'Manual'
String get manual => 'Manual';
/// en: 'Recent Connections'
String get recentConnections => 'Recent Connections';
/// en: 'Quickly reconnect to previously paired devices'
String get quickReconnect => 'Quickly reconnect to previously paired devices';
/// en: 'Pair with Desktop'
String get pairWithDesktop => 'Pair with Desktop';
@@ -2579,21 +2739,9 @@ class TranslationsCompanionRemotePairingEn {
/// en: 'Point your camera at the QR code shown on your desktop'
String get scanInstruction => 'Point your camera at the QR code shown on your desktop';
/// en: 'No recent connections'
String get noRecentConnections => 'No recent connections';
/// en: 'Connect to a device using Manual entry to get started'
String get connectUsingManual => 'Connect to a device using Manual entry to get started';
/// en: 'Invalid QR code format'
String get invalidQrCode => 'Invalid QR code format';
/// en: 'Remove Recent Connection'
String get removeRecentConnection => 'Remove Recent Connection';
/// en: 'Remove "${name}" from recent connections?'
String removeConfirm({required Object name}) => 'Remove "${name}" from recent connections?';
/// en: 'Please enter host address'
String get validationHostRequired => 'Please enter host address';
@@ -2621,8 +2769,6 @@ class TranslationsCompanionRemotePairingEn {
/// en: 'Failed to connect: ${error}'
String failedToConnect({required Object error}) => 'Failed to connect: ${error}';
/// en: 'Failed to load recent sessions: ${error}'
String failedToLoadRecent({required Object error}) => 'Failed to load recent sessions: ${error}';
}
// Path: companionRemote.remote
@@ -2845,6 +2991,8 @@ extension on Translations {
'settings.hardwareDecodingDescription' => 'Use hardware acceleration when available',
'settings.bufferSize' => 'Buffer Size',
'settings.bufferSizeMB' => ({required Object size}) => '${size}MB',
'settings.bufferSizeAuto' => 'Auto (Recommended)',
'settings.bufferSizeWarning' => ({required Object heap, required Object size}) => 'Your device has ${heap}MB of memory. A ${size}MB buffer may cause playback issues.',
'settings.subtitleStyling' => 'Subtitle Styling',
'settings.subtitleStylingDescription' => 'Customize subtitle appearance',
'settings.smallSkipDuration' => 'Small Skip Duration',
@@ -3004,6 +3152,9 @@ extension on Translations {
'videoControls.timerActive' => 'Timer Active',
'videoControls.playbackWillPauseIn' => ({required Object duration}) => 'Playback will pause in ${duration}',
'videoControls.sleepTimerCompleted' => 'Sleep timer completed - playback paused',
'videoControls.stillWatching' => 'Still watching?',
'videoControls.pausingIn' => ({required Object seconds}) => 'Pausing in ${seconds}s',
'videoControls.continueWatching' => 'Continue',
'videoControls.autoPlayNext' => 'Auto-Play Next',
'videoControls.playNext' => 'Play Next',
'videoControls.playButton' => 'Play',
@@ -3215,34 +3366,20 @@ extension on Translations {
'liveTv.title' => 'Live TV',
'liveTv.channels' => 'Channels',
'liveTv.guide' => 'Guide',
'liveTv.recordings' => 'Recordings',
'liveTv.subscriptions' => 'Subscriptions',
'liveTv.scheduled' => 'Scheduled',
'liveTv.noChannels' => 'No channels available',
'liveTv.noDvr' => 'No DVR configured on any server',
'liveTv.tuneFailed' => 'Failed to tune channel',
'liveTv.loading' => 'Loading channels...',
'liveTv.nowPlaying' => 'Now Playing',
'liveTv.record' => 'Record',
'liveTv.recordSeries' => 'Record Series',
'liveTv.cancelRecording' => 'Cancel Recording',
'liveTv.deleteSubscription' => 'Delete Recording Rule',
'liveTv.deleteSubscriptionConfirm' => 'Are you sure you want to delete this recording rule?',
'liveTv.subscriptionDeleted' => 'Recording rule deleted',
'liveTv.noPrograms' => 'No program data available',
'liveTv.noRecordings' => 'No recordings scheduled',
'liveTv.noSubscriptions' => 'No recording rules',
'liveTv.channelNumber' => ({required Object number}) => 'Ch. ${number}',
'liveTv.live' => 'LIVE',
'liveTv.hd' => 'HD',
'liveTv.premiere' => 'NEW',
'liveTv.reloadGuide' => 'Reload Guide',
'liveTv.guideReloaded' => 'Guide data reloaded',
'liveTv.allChannels' => 'All Channels',
'liveTv.now' => 'Now',
'liveTv.today' => 'Today',
_ => null,
} ?? switch (path) {
'liveTv.midnight' => 'Midnight',
'liveTv.overnight' => 'Overnight',
'liveTv.morning' => 'Morning',
@@ -3250,6 +3387,8 @@ extension on Translations {
'liveTv.evening' => 'Evening',
'liveTv.lateNight' => 'Late Night',
'liveTv.whatsOn' => 'What\'s On',
_ => null,
} ?? switch (path) {
'liveTv.watchChannel' => 'Watch Channel',
'collections.title' => 'Collections',
'collections.collection' => 'Collection',
@@ -3391,11 +3530,8 @@ extension on Translations {
'companionRemote.session.copyToClipboard' => 'Copy to clipboard',
'companionRemote.session.newSession' => 'New Session',
'companionRemote.session.minimize' => 'Minimize',
'companionRemote.pairing.recent' => 'Recent',
'companionRemote.pairing.scan' => 'Scan',
'companionRemote.pairing.manual' => 'Manual',
'companionRemote.pairing.recentConnections' => 'Recent Connections',
'companionRemote.pairing.quickReconnect' => 'Quickly reconnect to previously paired devices',
'companionRemote.pairing.pairWithDesktop' => 'Pair with Desktop',
'companionRemote.pairing.enterSessionDetails' => 'Enter the session details shown on your desktop device',
'companionRemote.pairing.hostAddressHint' => '192.168.1.100:48632',
@@ -3409,11 +3545,7 @@ extension on Translations {
'companionRemote.pairing.cameraPermissionRequired' => 'Camera permission is required to scan QR codes.\nPlease grant camera access in your device settings.',
'companionRemote.pairing.cameraError' => ({required Object error}) => 'Could not start camera: ${error}',
'companionRemote.pairing.scanInstruction' => 'Point your camera at the QR code shown on your desktop',
'companionRemote.pairing.noRecentConnections' => 'No recent connections',
'companionRemote.pairing.connectUsingManual' => 'Connect to a device using Manual entry to get started',
'companionRemote.pairing.invalidQrCode' => 'Invalid QR code format',
'companionRemote.pairing.removeRecentConnection' => 'Remove Recent Connection',
'companionRemote.pairing.removeConfirm' => ({required Object name}) => 'Remove "${name}" from recent connections?',
'companionRemote.pairing.validationHostRequired' => 'Please enter host address',
'companionRemote.pairing.validationHostFormat' => 'Format must be IP:port (e.g., 192.168.1.100:48632)',
'companionRemote.pairing.validationSessionIdRequired' => 'Please enter a session ID',
@@ -3423,7 +3555,6 @@ extension on Translations {
'companionRemote.pairing.connectionTimedOut' => 'Connection timed out. Please check the session ID and PIN.',
'companionRemote.pairing.sessionNotFound' => 'Could not find the session. Please check your credentials.',
'companionRemote.pairing.failedToConnect' => ({required Object error}) => 'Failed to connect: ${error}',
'companionRemote.pairing.failedToLoadRecent' => ({required Object error}) => 'Failed to load recent sessions: ${error}',
'companionRemote.remote.disconnectConfirm' => 'Do you want to disconnect from the remote session?',
'companionRemote.remote.reconnecting' => 'Reconnecting...',
'companionRemote.remote.attemptOf' => ({required Object current}) => 'Attempt ${current} of 5',
@@ -3461,6 +3592,7 @@ extension on Translations {
'videoSettings.hdr' => 'HDR',
'videoSettings.audioOutput' => 'Audio Output',
'videoSettings.performanceOverlay' => 'Performance Overlay',
'videoSettings.audioPassthrough' => 'Audio Passthrough',
'externalPlayer.title' => 'External Player',
'externalPlayer.useExternalPlayer' => 'Use External Player',
'externalPlayer.useExternalPlayerDescription' => 'Open videos in an external app instead of the built-in player',
@@ -3476,6 +3608,65 @@ extension on Translations {
'externalPlayer.launchFailed' => 'Failed to open external player',
'externalPlayer.appNotInstalled' => ({required Object name}) => '${name} is not installed',
'externalPlayer.playInExternalPlayer' => 'Play in External Player',
'metadataEdit.editMetadata' => 'Edit...',
'metadataEdit.screenTitle' => 'Edit Metadata',
'metadataEdit.basicInfo' => 'Basic Info',
'metadataEdit.artwork' => 'Artwork',
'metadataEdit.advancedSettings' => 'Advanced Settings',
'metadataEdit.title' => 'Title',
'metadataEdit.sortTitle' => 'Sort Title',
'metadataEdit.originalTitle' => 'Original Title',
'metadataEdit.releaseDate' => 'Release Date',
'metadataEdit.contentRating' => 'Content Rating',
'metadataEdit.studio' => 'Studio',
'metadataEdit.tagline' => 'Tagline',
'metadataEdit.summary' => 'Summary',
'metadataEdit.poster' => 'Poster',
'metadataEdit.background' => 'Background',
'metadataEdit.selectPoster' => 'Select Poster',
'metadataEdit.selectBackground' => 'Select Background',
'metadataEdit.fromUrl' => 'From URL',
'metadataEdit.uploadFile' => 'Upload File',
'metadataEdit.enterImageUrl' => 'Enter image URL',
'metadataEdit.imageUrl' => 'Image URL',
'metadataEdit.metadataUpdated' => 'Metadata updated',
'metadataEdit.metadataUpdateFailed' => 'Failed to update metadata',
'metadataEdit.artworkUpdated' => 'Artwork updated',
'metadataEdit.artworkUpdateFailed' => 'Failed to update artwork',
'metadataEdit.noArtworkAvailable' => 'No artwork available',
'metadataEdit.notSet' => 'Not set',
'metadataEdit.libraryDefault' => 'Library default',
'metadataEdit.accountDefault' => 'Account default',
'metadataEdit.seriesDefault' => 'Series default',
'metadataEdit.episodeSorting' => 'Episode Sorting',
'metadataEdit.oldestFirst' => 'Oldest first',
'metadataEdit.newestFirst' => 'Newest first',
'metadataEdit.keep' => 'Keep',
'metadataEdit.allEpisodes' => 'All episodes',
'metadataEdit.latestEpisodes' => ({required Object count}) => '${count} latest episodes',
'metadataEdit.latestEpisode' => 'Latest episode',
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Episodes added in the past ${count} days',
'metadataEdit.deleteAfterPlaying' => 'Delete Episodes After Playing',
'metadataEdit.never' => 'Never',
'metadataEdit.afterADay' => 'After a day',
'metadataEdit.afterAWeek' => 'After a week',
'metadataEdit.afterAMonth' => 'After a month',
'metadataEdit.onNextRefresh' => 'On next refresh',
'metadataEdit.seasons' => 'Seasons',
'metadataEdit.show' => 'Show',
'metadataEdit.hide' => 'Hide',
'metadataEdit.episodeOrdering' => 'Episode Ordering',
'metadataEdit.tmdbAiring' => 'The Movie Database (Aired)',
'metadataEdit.tvdbAiring' => 'TheTVDB (Aired)',
'metadataEdit.tvdbAbsolute' => 'TheTVDB (Absolute)',
'metadataEdit.metadataLanguage' => 'Metadata Language',
'metadataEdit.useOriginalTitle' => 'Use Original Title',
'metadataEdit.preferredAudioLanguage' => 'Preferred Audio Language',
'metadataEdit.preferredSubtitleLanguage' => 'Preferred Subtitle Language',
'metadataEdit.subtitleMode' => 'Auto-Select Subtitle Mode',
'metadataEdit.manuallySelected' => 'Manually selected',
'metadataEdit.shownWithForeignAudio' => 'Shown with foreign audio',
'metadataEdit.alwaysEnabled' => 'Always enabled',
_ => null,
};
}
+142 -42
View File
@@ -74,6 +74,7 @@ class TranslationsEs with BaseTranslations<AppLocale, Translations> implements T
@override late final _TranslationsCompanionRemoteEs companionRemote = _TranslationsCompanionRemoteEs._(_root);
@override late final _TranslationsVideoSettingsEs videoSettings = _TranslationsVideoSettingsEs._(_root);
@override late final _TranslationsExternalPlayerEs externalPlayer = _TranslationsExternalPlayerEs._(_root);
@override late final _TranslationsMetadataEditEs metadataEdit = _TranslationsMetadataEditEs._(_root);
}
// Path: app
@@ -244,6 +245,8 @@ class _TranslationsSettingsEs implements TranslationsSettingsEn {
@override String get hardwareDecodingDescription => 'Usar aceleración por hardware cuando esté disponible';
@override String get bufferSize => 'Tamaño del Buffer';
@override String bufferSizeMB({required Object size}) => '${size}MB';
@override String get bufferSizeAuto => 'Auto (Recomendado)';
@override String bufferSizeWarning({required Object heap, required Object size}) => 'Tu dispositivo tiene ${heap}MB de memoria. Un búfer de ${size}MB puede causar problemas de reproducción.';
@override String get subtitleStyling => 'Estilo de Subtítulos';
@override String get subtitleStylingDescription => 'Personalizar la apariencia de los subtítulos';
@override String get smallSkipDuration => 'Salto pequeño';
@@ -457,6 +460,9 @@ class _TranslationsVideoControlsEs implements TranslationsVideoControlsEn {
@override String get timerActive => 'Temporizador Activo';
@override String playbackWillPauseIn({required Object duration}) => 'La reproducción se pausará en ${duration}';
@override String get sleepTimerCompleted => 'Temporizador completado - reproducción pausada';
@override String get stillWatching => '¿Sigues viendo?';
@override String pausingIn({required Object seconds}) => 'Pausa en ${seconds}s';
@override String get continueWatching => 'Continuar';
@override String get autoPlayNext => 'Reproducir siguiente automáticamente';
@override String get playNext => 'Reproducir siguiente';
@override String get playButton => 'Reproducir';
@@ -791,29 +797,17 @@ class _TranslationsLiveTvEs implements TranslationsLiveTvEn {
@override String get title => 'TV en vivo';
@override String get channels => 'Canales';
@override String get guide => 'Guía';
@override String get recordings => 'Grabaciones';
@override String get subscriptions => 'Reglas de grabación';
@override String get scheduled => 'Programadas';
@override String get noChannels => 'No hay canales disponibles';
@override String get noDvr => 'No hay DVR configurado en ningún servidor';
@override String get tuneFailed => 'Error al sintonizar el canal';
@override String get loading => 'Cargando canales...';
@override String get nowPlaying => 'Reproduciendo ahora';
@override String get record => 'Grabar';
@override String get recordSeries => 'Grabar serie';
@override String get cancelRecording => 'Cancelar grabación';
@override String get deleteSubscription => 'Eliminar regla de grabación';
@override String get deleteSubscriptionConfirm => '¿Estás seguro de que quieres eliminar esta regla de grabación?';
@override String get subscriptionDeleted => 'Regla de grabación eliminada';
@override String get noPrograms => 'No hay datos de programación disponibles';
@override String get noRecordings => 'No hay grabaciones programadas';
@override String get noSubscriptions => 'No hay reglas de grabación';
@override String channelNumber({required Object number}) => 'Canal ${number}';
@override String get live => 'EN VIVO';
@override String get hd => 'HD';
@override String get premiere => 'NUEVO';
@override String get reloadGuide => 'Recargar guía';
@override String get guideReloaded => 'Datos de la guía recargados';
@override String get allChannels => 'Todos los canales';
@override String get now => 'Ahora';
@override String get today => 'Hoy';
@@ -1024,6 +1018,7 @@ class _TranslationsVideoSettingsEs implements TranslationsVideoSettingsEn {
@override String get hdr => 'HDR';
@override String get audioOutput => 'Salida de audio';
@override String get performanceOverlay => 'Indicador de rendimiento';
@override String get audioPassthrough => 'Audio Passthrough';
}
// Path: externalPlayer
@@ -1050,6 +1045,74 @@ class _TranslationsExternalPlayerEs implements TranslationsExternalPlayerEn {
@override String get playInExternalPlayer => 'Reproducir en reproductor externo';
}
// Path: metadataEdit
class _TranslationsMetadataEditEs implements TranslationsMetadataEditEn {
_TranslationsMetadataEditEs._(this._root);
final TranslationsEs _root; // ignore: unused_field
// Translations
@override String get editMetadata => 'Editar...';
@override String get screenTitle => 'Editar metadatos';
@override String get basicInfo => 'Información básica';
@override String get artwork => 'Artwork';
@override String get advancedSettings => 'Ajustes avanzados';
@override String get title => 'Título';
@override String get sortTitle => 'Título de ordenación';
@override String get originalTitle => 'Título original';
@override String get releaseDate => 'Fecha de estreno';
@override String get contentRating => 'Clasificación de contenido';
@override String get studio => 'Estudio';
@override String get tagline => 'Eslogan';
@override String get summary => 'Resumen';
@override String get poster => 'Póster';
@override String get background => 'Fondo';
@override String get selectPoster => 'Seleccionar póster';
@override String get selectBackground => 'Seleccionar fondo';
@override String get fromUrl => 'Desde URL';
@override String get uploadFile => 'Subir archivo';
@override String get enterImageUrl => 'Introducir URL de imagen';
@override String get imageUrl => 'URL de imagen';
@override String get metadataUpdated => 'Metadatos actualizados';
@override String get metadataUpdateFailed => 'Error al actualizar los metadatos';
@override String get artworkUpdated => 'Artwork actualizado';
@override String get artworkUpdateFailed => 'Error al actualizar el artwork';
@override String get noArtworkAvailable => 'No hay artwork disponible';
@override String get notSet => 'No establecido';
@override String get libraryDefault => 'Predeterminado de biblioteca';
@override String get accountDefault => 'Predeterminado de cuenta';
@override String get seriesDefault => 'Predeterminado de serie';
@override String get episodeSorting => 'Orden de episodios';
@override String get oldestFirst => 'Más antiguos primero';
@override String get newestFirst => 'Más recientes primero';
@override String get keep => 'Conservar';
@override String get allEpisodes => 'Todos los episodios';
@override String latestEpisodes({required Object count}) => '${count} episodios más recientes';
@override String get latestEpisode => 'Episodio más reciente';
@override String episodesAddedPastDays({required Object count}) => 'Episodios añadidos en los últimos ${count} días';
@override String get deleteAfterPlaying => 'Eliminar episodios después de reproducir';
@override String get never => 'Nunca';
@override String get afterADay => 'Después de un día';
@override String get afterAWeek => 'Después de una semana';
@override String get afterAMonth => 'Después de un mes';
@override String get onNextRefresh => 'En la próxima actualización';
@override String get seasons => 'Temporadas';
@override String get show => 'Mostrar';
@override String get hide => 'Ocultar';
@override String get episodeOrdering => 'Orden de episodios';
@override String get tmdbAiring => 'The Movie Database (Emisión)';
@override String get tvdbAiring => 'TheTVDB (Emisión)';
@override String get tvdbAbsolute => 'TheTVDB (Absoluto)';
@override String get metadataLanguage => 'Idioma de metadatos';
@override String get useOriginalTitle => 'Usar título original';
@override String get preferredAudioLanguage => 'Idioma de audio preferido';
@override String get preferredSubtitleLanguage => 'Idioma de subtítulos preferido';
@override String get subtitleMode => 'Selección automática de subtítulos';
@override String get manuallySelected => 'Seleccionado manualmente';
@override String get shownWithForeignAudio => 'Mostrar con audio extranjero';
@override String get alwaysEnabled => 'Siempre activado';
}
// Path: hotkeys.actions
class _TranslationsHotkeysActionsEs implements TranslationsHotkeysActionsEn {
_TranslationsHotkeysActionsEs._(this._root);
@@ -1151,11 +1214,8 @@ class _TranslationsCompanionRemotePairingEs implements TranslationsCompanionRemo
final TranslationsEs _root; // ignore: unused_field
// Translations
@override String get recent => 'Recientes';
@override String get scan => 'Escanear';
@override String get manual => 'Manual';
@override String get recentConnections => 'Conexiones recientes';
@override String get quickReconnect => 'Reconectar rápidamente con dispositivos emparejados anteriormente';
@override String get pairWithDesktop => 'Emparejar con escritorio';
@override String get enterSessionDetails => 'Introduce los datos de la sesión que aparecen en tu dispositivo de escritorio';
@override String get hostAddressHint => '192.168.1.100:48632';
@@ -1169,11 +1229,7 @@ class _TranslationsCompanionRemotePairingEs implements TranslationsCompanionRemo
@override String get cameraPermissionRequired => 'Se necesita permiso de cámara para escanear códigos QR.\nPor favor, concede acceso a la cámara en los ajustes de tu dispositivo.';
@override String cameraError({required Object error}) => 'No se pudo iniciar la cámara: ${error}';
@override String get scanInstruction => 'Apunta tu cámara al código QR que aparece en tu escritorio';
@override String get noRecentConnections => 'No hay conexiones recientes';
@override String get connectUsingManual => 'Conéctate a un dispositivo usando la entrada manual para empezar';
@override String get invalidQrCode => 'Formato de código QR no válido';
@override String get removeRecentConnection => 'Eliminar conexión reciente';
@override String removeConfirm({required Object name}) => '¿Eliminar "${name}" de las conexiones recientes?';
@override String get validationHostRequired => 'Por favor, introduce la dirección del host';
@override String get validationHostFormat => 'El formato debe ser IP:puerto (ej., 192.168.1.100:48632)';
@override String get validationSessionIdRequired => 'Por favor, introduce un ID de sesión';
@@ -1183,7 +1239,6 @@ class _TranslationsCompanionRemotePairingEs implements TranslationsCompanionRemo
@override String get connectionTimedOut => 'Tiempo de conexión agotado. Verifica el ID de sesión y el PIN.';
@override String get sessionNotFound => 'No se encontró la sesión. Verifica tus credenciales.';
@override String failedToConnect({required Object error}) => 'Error al conectar: ${error}';
@override String failedToLoadRecent({required Object error}) => 'Error al cargar sesiones recientes: ${error}';
}
// Path: companionRemote.remote
@@ -1348,6 +1403,8 @@ extension on TranslationsEs {
'settings.hardwareDecodingDescription' => 'Usar aceleración por hardware cuando esté disponible',
'settings.bufferSize' => 'Tamaño del Buffer',
'settings.bufferSizeMB' => ({required Object size}) => '${size}MB',
'settings.bufferSizeAuto' => 'Auto (Recomendado)',
'settings.bufferSizeWarning' => ({required Object heap, required Object size}) => 'Tu dispositivo tiene ${heap}MB de memoria. Un búfer de ${size}MB puede causar problemas de reproducción.',
'settings.subtitleStyling' => 'Estilo de Subtítulos',
'settings.subtitleStylingDescription' => 'Personalizar la apariencia de los subtítulos',
'settings.smallSkipDuration' => 'Salto pequeño',
@@ -1507,6 +1564,9 @@ extension on TranslationsEs {
'videoControls.timerActive' => 'Temporizador Activo',
'videoControls.playbackWillPauseIn' => ({required Object duration}) => 'La reproducción se pausará en ${duration}',
'videoControls.sleepTimerCompleted' => 'Temporizador completado - reproducción pausada',
'videoControls.stillWatching' => '¿Sigues viendo?',
'videoControls.pausingIn' => ({required Object seconds}) => 'Pausa en ${seconds}s',
'videoControls.continueWatching' => 'Continuar',
'videoControls.autoPlayNext' => 'Reproducir siguiente automáticamente',
'videoControls.playNext' => 'Reproducir siguiente',
'videoControls.playButton' => 'Reproducir',
@@ -1718,34 +1778,20 @@ extension on TranslationsEs {
'liveTv.title' => 'TV en vivo',
'liveTv.channels' => 'Canales',
'liveTv.guide' => 'Guía',
'liveTv.recordings' => 'Grabaciones',
'liveTv.subscriptions' => 'Reglas de grabación',
'liveTv.scheduled' => 'Programadas',
'liveTv.noChannels' => 'No hay canales disponibles',
'liveTv.noDvr' => 'No hay DVR configurado en ningún servidor',
'liveTv.tuneFailed' => 'Error al sintonizar el canal',
'liveTv.loading' => 'Cargando canales...',
'liveTv.nowPlaying' => 'Reproduciendo ahora',
'liveTv.record' => 'Grabar',
'liveTv.recordSeries' => 'Grabar serie',
'liveTv.cancelRecording' => 'Cancelar grabación',
'liveTv.deleteSubscription' => 'Eliminar regla de grabación',
'liveTv.deleteSubscriptionConfirm' => '¿Estás seguro de que quieres eliminar esta regla de grabación?',
'liveTv.subscriptionDeleted' => 'Regla de grabación eliminada',
'liveTv.noPrograms' => 'No hay datos de programación disponibles',
'liveTv.noRecordings' => 'No hay grabaciones programadas',
'liveTv.noSubscriptions' => 'No hay reglas de grabación',
'liveTv.channelNumber' => ({required Object number}) => 'Canal ${number}',
'liveTv.live' => 'EN VIVO',
'liveTv.hd' => 'HD',
'liveTv.premiere' => 'NUEVO',
'liveTv.reloadGuide' => 'Recargar guía',
'liveTv.guideReloaded' => 'Datos de la guía recargados',
'liveTv.allChannels' => 'Todos los canales',
'liveTv.now' => 'Ahora',
'liveTv.today' => 'Hoy',
_ => null,
} ?? switch (path) {
'liveTv.midnight' => 'Medianoche',
'liveTv.overnight' => 'Madrugada',
'liveTv.morning' => 'Mañana',
@@ -1753,6 +1799,8 @@ extension on TranslationsEs {
'liveTv.evening' => 'Noche',
'liveTv.lateNight' => 'Trasnoche',
'liveTv.whatsOn' => 'En emisión',
_ => null,
} ?? switch (path) {
'liveTv.watchChannel' => 'Ver canal',
'collections.title' => 'Colecciones',
'collections.collection' => 'Colección',
@@ -1894,11 +1942,8 @@ extension on TranslationsEs {
'companionRemote.session.copyToClipboard' => 'Copiar al portapapeles',
'companionRemote.session.newSession' => 'Nueva sesión',
'companionRemote.session.minimize' => 'Minimizar',
'companionRemote.pairing.recent' => 'Recientes',
'companionRemote.pairing.scan' => 'Escanear',
'companionRemote.pairing.manual' => 'Manual',
'companionRemote.pairing.recentConnections' => 'Conexiones recientes',
'companionRemote.pairing.quickReconnect' => 'Reconectar rápidamente con dispositivos emparejados anteriormente',
'companionRemote.pairing.pairWithDesktop' => 'Emparejar con escritorio',
'companionRemote.pairing.enterSessionDetails' => 'Introduce los datos de la sesión que aparecen en tu dispositivo de escritorio',
'companionRemote.pairing.hostAddressHint' => '192.168.1.100:48632',
@@ -1912,11 +1957,7 @@ extension on TranslationsEs {
'companionRemote.pairing.cameraPermissionRequired' => 'Se necesita permiso de cámara para escanear códigos QR.\nPor favor, concede acceso a la cámara en los ajustes de tu dispositivo.',
'companionRemote.pairing.cameraError' => ({required Object error}) => 'No se pudo iniciar la cámara: ${error}',
'companionRemote.pairing.scanInstruction' => 'Apunta tu cámara al código QR que aparece en tu escritorio',
'companionRemote.pairing.noRecentConnections' => 'No hay conexiones recientes',
'companionRemote.pairing.connectUsingManual' => 'Conéctate a un dispositivo usando la entrada manual para empezar',
'companionRemote.pairing.invalidQrCode' => 'Formato de código QR no válido',
'companionRemote.pairing.removeRecentConnection' => 'Eliminar conexión reciente',
'companionRemote.pairing.removeConfirm' => ({required Object name}) => '¿Eliminar "${name}" de las conexiones recientes?',
'companionRemote.pairing.validationHostRequired' => 'Por favor, introduce la dirección del host',
'companionRemote.pairing.validationHostFormat' => 'El formato debe ser IP:puerto (ej., 192.168.1.100:48632)',
'companionRemote.pairing.validationSessionIdRequired' => 'Por favor, introduce un ID de sesión',
@@ -1926,7 +1967,6 @@ extension on TranslationsEs {
'companionRemote.pairing.connectionTimedOut' => 'Tiempo de conexión agotado. Verifica el ID de sesión y el PIN.',
'companionRemote.pairing.sessionNotFound' => 'No se encontró la sesión. Verifica tus credenciales.',
'companionRemote.pairing.failedToConnect' => ({required Object error}) => 'Error al conectar: ${error}',
'companionRemote.pairing.failedToLoadRecent' => ({required Object error}) => 'Error al cargar sesiones recientes: ${error}',
'companionRemote.remote.disconnectConfirm' => '¿Quieres desconectarte de la sesión remota?',
'companionRemote.remote.reconnecting' => 'Reconectando...',
'companionRemote.remote.attemptOf' => ({required Object current}) => 'Intento ${current} de 5',
@@ -1964,6 +2004,7 @@ extension on TranslationsEs {
'videoSettings.hdr' => 'HDR',
'videoSettings.audioOutput' => 'Salida de audio',
'videoSettings.performanceOverlay' => 'Indicador de rendimiento',
'videoSettings.audioPassthrough' => 'Audio Passthrough',
'externalPlayer.title' => 'Reproductor externo',
'externalPlayer.useExternalPlayer' => 'Usar reproductor externo',
'externalPlayer.useExternalPlayerDescription' => 'Abrir vídeos en una app externa en lugar del reproductor integrado',
@@ -1979,6 +2020,65 @@ extension on TranslationsEs {
'externalPlayer.launchFailed' => 'No se pudo abrir el reproductor externo',
'externalPlayer.appNotInstalled' => ({required Object name}) => '${name} no está instalado',
'externalPlayer.playInExternalPlayer' => 'Reproducir en reproductor externo',
'metadataEdit.editMetadata' => 'Editar...',
'metadataEdit.screenTitle' => 'Editar metadatos',
'metadataEdit.basicInfo' => 'Información básica',
'metadataEdit.artwork' => 'Artwork',
'metadataEdit.advancedSettings' => 'Ajustes avanzados',
'metadataEdit.title' => 'Título',
'metadataEdit.sortTitle' => 'Título de ordenación',
'metadataEdit.originalTitle' => 'Título original',
'metadataEdit.releaseDate' => 'Fecha de estreno',
'metadataEdit.contentRating' => 'Clasificación de contenido',
'metadataEdit.studio' => 'Estudio',
'metadataEdit.tagline' => 'Eslogan',
'metadataEdit.summary' => 'Resumen',
'metadataEdit.poster' => 'Póster',
'metadataEdit.background' => 'Fondo',
'metadataEdit.selectPoster' => 'Seleccionar póster',
'metadataEdit.selectBackground' => 'Seleccionar fondo',
'metadataEdit.fromUrl' => 'Desde URL',
'metadataEdit.uploadFile' => 'Subir archivo',
'metadataEdit.enterImageUrl' => 'Introducir URL de imagen',
'metadataEdit.imageUrl' => 'URL de imagen',
'metadataEdit.metadataUpdated' => 'Metadatos actualizados',
'metadataEdit.metadataUpdateFailed' => 'Error al actualizar los metadatos',
'metadataEdit.artworkUpdated' => 'Artwork actualizado',
'metadataEdit.artworkUpdateFailed' => 'Error al actualizar el artwork',
'metadataEdit.noArtworkAvailable' => 'No hay artwork disponible',
'metadataEdit.notSet' => 'No establecido',
'metadataEdit.libraryDefault' => 'Predeterminado de biblioteca',
'metadataEdit.accountDefault' => 'Predeterminado de cuenta',
'metadataEdit.seriesDefault' => 'Predeterminado de serie',
'metadataEdit.episodeSorting' => 'Orden de episodios',
'metadataEdit.oldestFirst' => 'Más antiguos primero',
'metadataEdit.newestFirst' => 'Más recientes primero',
'metadataEdit.keep' => 'Conservar',
'metadataEdit.allEpisodes' => 'Todos los episodios',
'metadataEdit.latestEpisodes' => ({required Object count}) => '${count} episodios más recientes',
'metadataEdit.latestEpisode' => 'Episodio más reciente',
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Episodios añadidos en los últimos ${count} días',
'metadataEdit.deleteAfterPlaying' => 'Eliminar episodios después de reproducir',
'metadataEdit.never' => 'Nunca',
'metadataEdit.afterADay' => 'Después de un día',
'metadataEdit.afterAWeek' => 'Después de una semana',
'metadataEdit.afterAMonth' => 'Después de un mes',
'metadataEdit.onNextRefresh' => 'En la próxima actualización',
'metadataEdit.seasons' => 'Temporadas',
'metadataEdit.show' => 'Mostrar',
'metadataEdit.hide' => 'Ocultar',
'metadataEdit.episodeOrdering' => 'Orden de episodios',
'metadataEdit.tmdbAiring' => 'The Movie Database (Emisión)',
'metadataEdit.tvdbAiring' => 'TheTVDB (Emisión)',
'metadataEdit.tvdbAbsolute' => 'TheTVDB (Absoluto)',
'metadataEdit.metadataLanguage' => 'Idioma de metadatos',
'metadataEdit.useOriginalTitle' => 'Usar título original',
'metadataEdit.preferredAudioLanguage' => 'Idioma de audio preferido',
'metadataEdit.preferredSubtitleLanguage' => 'Idioma de subtítulos preferido',
'metadataEdit.subtitleMode' => 'Selección automática de subtítulos',
'metadataEdit.manuallySelected' => 'Seleccionado manualmente',
'metadataEdit.shownWithForeignAudio' => 'Mostrar con audio extranjero',
'metadataEdit.alwaysEnabled' => 'Siempre activado',
_ => null,
};
}
+142 -42
View File
@@ -74,6 +74,7 @@ class TranslationsFr with BaseTranslations<AppLocale, Translations> implements T
@override late final _TranslationsCompanionRemoteFr companionRemote = _TranslationsCompanionRemoteFr._(_root);
@override late final _TranslationsVideoSettingsFr videoSettings = _TranslationsVideoSettingsFr._(_root);
@override late final _TranslationsExternalPlayerFr externalPlayer = _TranslationsExternalPlayerFr._(_root);
@override late final _TranslationsMetadataEditFr metadataEdit = _TranslationsMetadataEditFr._(_root);
}
// Path: app
@@ -244,6 +245,8 @@ class _TranslationsSettingsFr implements TranslationsSettingsEn {
@override String get hardwareDecodingDescription => 'Utilisez l\'accélération matérielle lorsqu\'elle est disponible.';
@override String get bufferSize => 'Taille du Buffer';
@override String bufferSizeMB({required Object size}) => '${size}MB';
@override String get bufferSizeAuto => 'Auto (Recommandé)';
@override String bufferSizeWarning({required Object heap, required Object size}) => 'Votre appareil dispose de ${heap}MB de mémoire. Un tampon de ${size}MB peut causer des problèmes de lecture.';
@override String get subtitleStyling => 'Stylisation des sous-titres';
@override String get subtitleStylingDescription => 'Personnaliser l\'apparence des sous-titres';
@override String get smallSkipDuration => 'Small Skip Duration';
@@ -457,6 +460,9 @@ class _TranslationsVideoControlsFr implements TranslationsVideoControlsEn {
@override String get timerActive => 'Minuterie active';
@override String playbackWillPauseIn({required Object duration}) => 'La lecture sera mise en pause dans ${duration}';
@override String get sleepTimerCompleted => 'Minuterie de mise en veille terminée - lecture en pause';
@override String get stillWatching => 'Toujours en train de regarder ?';
@override String pausingIn({required Object seconds}) => 'Pause dans ${seconds}s';
@override String get continueWatching => 'Continuer';
@override String get autoPlayNext => 'Lecture automatique suivante';
@override String get playNext => 'Lire l\'épisode suivant';
@override String get playButton => 'Lire';
@@ -791,29 +797,17 @@ class _TranslationsLiveTvFr implements TranslationsLiveTvEn {
@override String get title => 'TV en direct';
@override String get channels => 'Chaînes';
@override String get guide => 'Guide';
@override String get recordings => 'Enregistrements';
@override String get subscriptions => 'Règles d\'enregistrement';
@override String get scheduled => 'Programmés';
@override String get noChannels => 'Aucune chaîne disponible';
@override String get noDvr => 'Aucun DVR configuré sur les serveurs';
@override String get tuneFailed => 'Impossible de syntoniser la chaîne';
@override String get loading => 'Chargement des chaînes...';
@override String get nowPlaying => 'En cours de lecture';
@override String get record => 'Enregistrer';
@override String get recordSeries => 'Enregistrer la série';
@override String get cancelRecording => 'Annuler l\'enregistrement';
@override String get deleteSubscription => 'Supprimer la règle d\'enregistrement';
@override String get deleteSubscriptionConfirm => 'Voulez-vous vraiment supprimer cette règle d\'enregistrement ?';
@override String get subscriptionDeleted => 'Règle d\'enregistrement supprimée';
@override String get noPrograms => 'Aucune donnée de programme disponible';
@override String get noRecordings => 'Aucun enregistrement programmé';
@override String get noSubscriptions => 'Aucune règle d\'enregistrement';
@override String channelNumber({required Object number}) => 'Ch. ${number}';
@override String get live => 'EN DIRECT';
@override String get hd => 'HD';
@override String get premiere => 'NOUVEAU';
@override String get reloadGuide => 'Recharger le guide';
@override String get guideReloaded => 'Données du guide rechargées';
@override String get allChannels => 'Toutes les chaînes';
@override String get now => 'Maintenant';
@override String get today => 'Aujourd\'hui';
@@ -1024,6 +1018,7 @@ class _TranslationsVideoSettingsFr implements TranslationsVideoSettingsEn {
@override String get hdr => 'HDR';
@override String get audioOutput => 'Sortie audio';
@override String get performanceOverlay => 'Superposition de performance';
@override String get audioPassthrough => 'Audio Pass-Through';
}
// Path: externalPlayer
@@ -1050,6 +1045,74 @@ class _TranslationsExternalPlayerFr implements TranslationsExternalPlayerEn {
@override String get playInExternalPlayer => 'Lire dans un lecteur externe';
}
// Path: metadataEdit
class _TranslationsMetadataEditFr implements TranslationsMetadataEditEn {
_TranslationsMetadataEditFr._(this._root);
final TranslationsFr _root; // ignore: unused_field
// Translations
@override String get editMetadata => 'Modifier...';
@override String get screenTitle => 'Modifier les métadonnées';
@override String get basicInfo => 'Informations de base';
@override String get artwork => 'Artwork';
@override String get advancedSettings => 'Paramètres avancés';
@override String get title => 'Titre';
@override String get sortTitle => 'Titre de tri';
@override String get originalTitle => 'Titre original';
@override String get releaseDate => 'Date de sortie';
@override String get contentRating => 'Classification';
@override String get studio => 'Studio';
@override String get tagline => 'Slogan';
@override String get summary => 'Résumé';
@override String get poster => 'Affiche';
@override String get background => 'Arrière-plan';
@override String get selectPoster => 'Sélectionner l\'affiche';
@override String get selectBackground => 'Sélectionner l\'arrière-plan';
@override String get fromUrl => 'Depuis une URL';
@override String get uploadFile => 'Importer un fichier';
@override String get enterImageUrl => 'Entrer l\'URL de l\'image';
@override String get imageUrl => 'URL de l\'image';
@override String get metadataUpdated => 'Métadonnées mises à jour';
@override String get metadataUpdateFailed => 'Échec de la mise à jour des métadonnées';
@override String get artworkUpdated => 'Artwork mis à jour';
@override String get artworkUpdateFailed => 'Échec de la mise à jour de l\'artwork';
@override String get noArtworkAvailable => 'Aucun artwork disponible';
@override String get notSet => 'Non défini';
@override String get libraryDefault => 'Par défaut de la bibliothèque';
@override String get accountDefault => 'Par défaut du compte';
@override String get seriesDefault => 'Par défaut de la série';
@override String get episodeSorting => 'Tri des épisodes';
@override String get oldestFirst => 'Plus anciens en premier';
@override String get newestFirst => 'Plus récents en premier';
@override String get keep => 'Conserver';
@override String get allEpisodes => 'Tous les épisodes';
@override String latestEpisodes({required Object count}) => '${count} derniers épisodes';
@override String get latestEpisode => 'Dernier épisode';
@override String episodesAddedPastDays({required Object count}) => 'Épisodes ajoutés ces ${count} derniers jours';
@override String get deleteAfterPlaying => 'Supprimer les épisodes après lecture';
@override String get never => 'Jamais';
@override String get afterADay => 'Après un jour';
@override String get afterAWeek => 'Après une semaine';
@override String get afterAMonth => 'Après un mois';
@override String get onNextRefresh => 'Au prochain rafraîchissement';
@override String get seasons => 'Saisons';
@override String get show => 'Afficher';
@override String get hide => 'Masquer';
@override String get episodeOrdering => 'Ordre des épisodes';
@override String get tmdbAiring => 'The Movie Database (Diffusion)';
@override String get tvdbAiring => 'TheTVDB (Diffusion)';
@override String get tvdbAbsolute => 'TheTVDB (Absolu)';
@override String get metadataLanguage => 'Langue des métadonnées';
@override String get useOriginalTitle => 'Utiliser le titre original';
@override String get preferredAudioLanguage => 'Langue audio préférée';
@override String get preferredSubtitleLanguage => 'Langue de sous-titres préférée';
@override String get subtitleMode => 'Sélection automatique des sous-titres';
@override String get manuallySelected => 'Sélectionné manuellement';
@override String get shownWithForeignAudio => 'Affichés avec audio étranger';
@override String get alwaysEnabled => 'Toujours activé';
}
// Path: hotkeys.actions
class _TranslationsHotkeysActionsFr implements TranslationsHotkeysActionsEn {
_TranslationsHotkeysActionsFr._(this._root);
@@ -1151,11 +1214,8 @@ class _TranslationsCompanionRemotePairingFr implements TranslationsCompanionRemo
final TranslationsFr _root; // ignore: unused_field
// Translations
@override String get recent => 'Récents';
@override String get scan => 'Scanner';
@override String get manual => 'Manuel';
@override String get recentConnections => 'Connexions récentes';
@override String get quickReconnect => 'Reconnexion rapide aux appareils précédemment jumelés';
@override String get pairWithDesktop => 'Jumeler avec un bureau';
@override String get enterSessionDetails => 'Saisissez les détails de la session affichés sur votre appareil de bureau';
@override String get hostAddressHint => '192.168.1.100:48632';
@@ -1169,11 +1229,7 @@ class _TranslationsCompanionRemotePairingFr implements TranslationsCompanionRemo
@override String get cameraPermissionRequired => 'L\'autorisation de la caméra est requise pour scanner les QR codes.\nVeuillez accorder l\'accès à la caméra dans les paramètres de votre appareil.';
@override String cameraError({required Object error}) => 'Impossible de démarrer la caméra : ${error}';
@override String get scanInstruction => 'Pointez votre caméra vers le QR code affiché sur votre bureau';
@override String get noRecentConnections => 'Aucune connexion récente';
@override String get connectUsingManual => 'Connectez-vous à un appareil via la saisie manuelle pour commencer';
@override String get invalidQrCode => 'Format de QR code invalide';
@override String get removeRecentConnection => 'Supprimer la connexion récente';
@override String removeConfirm({required Object name}) => 'Supprimer "${name}" des connexions récentes ?';
@override String get validationHostRequired => 'Veuillez saisir l\'adresse de l\'hôte';
@override String get validationHostFormat => 'Le format doit être IP:port (ex : 192.168.1.100:48632)';
@override String get validationSessionIdRequired => 'Veuillez saisir un ID de session';
@@ -1183,7 +1239,6 @@ class _TranslationsCompanionRemotePairingFr implements TranslationsCompanionRemo
@override String get connectionTimedOut => 'Délai de connexion expiré. Veuillez vérifier l\'ID de session et le PIN.';
@override String get sessionNotFound => 'Session introuvable. Veuillez vérifier vos identifiants.';
@override String failedToConnect({required Object error}) => 'Échec de la connexion : ${error}';
@override String failedToLoadRecent({required Object error}) => 'Échec du chargement des sessions récentes : ${error}';
}
// Path: companionRemote.remote
@@ -1348,6 +1403,8 @@ extension on TranslationsFr {
'settings.hardwareDecodingDescription' => 'Utilisez l\'accélération matérielle lorsqu\'elle est disponible.',
'settings.bufferSize' => 'Taille du Buffer',
'settings.bufferSizeMB' => ({required Object size}) => '${size}MB',
'settings.bufferSizeAuto' => 'Auto (Recommandé)',
'settings.bufferSizeWarning' => ({required Object heap, required Object size}) => 'Votre appareil dispose de ${heap}MB de mémoire. Un tampon de ${size}MB peut causer des problèmes de lecture.',
'settings.subtitleStyling' => 'Stylisation des sous-titres',
'settings.subtitleStylingDescription' => 'Personnaliser l\'apparence des sous-titres',
'settings.smallSkipDuration' => 'Small Skip Duration',
@@ -1507,6 +1564,9 @@ extension on TranslationsFr {
'videoControls.timerActive' => 'Minuterie active',
'videoControls.playbackWillPauseIn' => ({required Object duration}) => 'La lecture sera mise en pause dans ${duration}',
'videoControls.sleepTimerCompleted' => 'Minuterie de mise en veille terminée - lecture en pause',
'videoControls.stillWatching' => 'Toujours en train de regarder ?',
'videoControls.pausingIn' => ({required Object seconds}) => 'Pause dans ${seconds}s',
'videoControls.continueWatching' => 'Continuer',
'videoControls.autoPlayNext' => 'Lecture automatique suivante',
'videoControls.playNext' => 'Lire l\'épisode suivant',
'videoControls.playButton' => 'Lire',
@@ -1718,34 +1778,20 @@ extension on TranslationsFr {
'liveTv.title' => 'TV en direct',
'liveTv.channels' => 'Chaînes',
'liveTv.guide' => 'Guide',
'liveTv.recordings' => 'Enregistrements',
'liveTv.subscriptions' => 'Règles d\'enregistrement',
'liveTv.scheduled' => 'Programmés',
'liveTv.noChannels' => 'Aucune chaîne disponible',
'liveTv.noDvr' => 'Aucun DVR configuré sur les serveurs',
'liveTv.tuneFailed' => 'Impossible de syntoniser la chaîne',
'liveTv.loading' => 'Chargement des chaînes...',
'liveTv.nowPlaying' => 'En cours de lecture',
'liveTv.record' => 'Enregistrer',
'liveTv.recordSeries' => 'Enregistrer la série',
'liveTv.cancelRecording' => 'Annuler l\'enregistrement',
'liveTv.deleteSubscription' => 'Supprimer la règle d\'enregistrement',
'liveTv.deleteSubscriptionConfirm' => 'Voulez-vous vraiment supprimer cette règle d\'enregistrement ?',
'liveTv.subscriptionDeleted' => 'Règle d\'enregistrement supprimée',
'liveTv.noPrograms' => 'Aucune donnée de programme disponible',
'liveTv.noRecordings' => 'Aucun enregistrement programmé',
'liveTv.noSubscriptions' => 'Aucune règle d\'enregistrement',
'liveTv.channelNumber' => ({required Object number}) => 'Ch. ${number}',
'liveTv.live' => 'EN DIRECT',
'liveTv.hd' => 'HD',
'liveTv.premiere' => 'NOUVEAU',
'liveTv.reloadGuide' => 'Recharger le guide',
'liveTv.guideReloaded' => 'Données du guide rechargées',
'liveTv.allChannels' => 'Toutes les chaînes',
'liveTv.now' => 'Maintenant',
'liveTv.today' => 'Aujourd\'hui',
_ => null,
} ?? switch (path) {
'liveTv.midnight' => 'Minuit',
'liveTv.overnight' => 'Nuit',
'liveTv.morning' => 'Matin',
@@ -1753,6 +1799,8 @@ extension on TranslationsFr {
'liveTv.evening' => 'Soirée',
'liveTv.lateNight' => 'Nuit tardive',
'liveTv.whatsOn' => 'En ce moment',
_ => null,
} ?? switch (path) {
'liveTv.watchChannel' => 'Regarder la chaîne',
'collections.title' => 'Collections',
'collections.collection' => 'Collection',
@@ -1894,11 +1942,8 @@ extension on TranslationsFr {
'companionRemote.session.copyToClipboard' => 'Copier dans le presse-papiers',
'companionRemote.session.newSession' => 'Nouvelle session',
'companionRemote.session.minimize' => 'Réduire',
'companionRemote.pairing.recent' => 'Récents',
'companionRemote.pairing.scan' => 'Scanner',
'companionRemote.pairing.manual' => 'Manuel',
'companionRemote.pairing.recentConnections' => 'Connexions récentes',
'companionRemote.pairing.quickReconnect' => 'Reconnexion rapide aux appareils précédemment jumelés',
'companionRemote.pairing.pairWithDesktop' => 'Jumeler avec un bureau',
'companionRemote.pairing.enterSessionDetails' => 'Saisissez les détails de la session affichés sur votre appareil de bureau',
'companionRemote.pairing.hostAddressHint' => '192.168.1.100:48632',
@@ -1912,11 +1957,7 @@ extension on TranslationsFr {
'companionRemote.pairing.cameraPermissionRequired' => 'L\'autorisation de la caméra est requise pour scanner les QR codes.\nVeuillez accorder l\'accès à la caméra dans les paramètres de votre appareil.',
'companionRemote.pairing.cameraError' => ({required Object error}) => 'Impossible de démarrer la caméra : ${error}',
'companionRemote.pairing.scanInstruction' => 'Pointez votre caméra vers le QR code affiché sur votre bureau',
'companionRemote.pairing.noRecentConnections' => 'Aucune connexion récente',
'companionRemote.pairing.connectUsingManual' => 'Connectez-vous à un appareil via la saisie manuelle pour commencer',
'companionRemote.pairing.invalidQrCode' => 'Format de QR code invalide',
'companionRemote.pairing.removeRecentConnection' => 'Supprimer la connexion récente',
'companionRemote.pairing.removeConfirm' => ({required Object name}) => 'Supprimer "${name}" des connexions récentes ?',
'companionRemote.pairing.validationHostRequired' => 'Veuillez saisir l\'adresse de l\'hôte',
'companionRemote.pairing.validationHostFormat' => 'Le format doit être IP:port (ex : 192.168.1.100:48632)',
'companionRemote.pairing.validationSessionIdRequired' => 'Veuillez saisir un ID de session',
@@ -1926,7 +1967,6 @@ extension on TranslationsFr {
'companionRemote.pairing.connectionTimedOut' => 'Délai de connexion expiré. Veuillez vérifier l\'ID de session et le PIN.',
'companionRemote.pairing.sessionNotFound' => 'Session introuvable. Veuillez vérifier vos identifiants.',
'companionRemote.pairing.failedToConnect' => ({required Object error}) => 'Échec de la connexion : ${error}',
'companionRemote.pairing.failedToLoadRecent' => ({required Object error}) => 'Échec du chargement des sessions récentes : ${error}',
'companionRemote.remote.disconnectConfirm' => 'Voulez-vous vous déconnecter de la session distante ?',
'companionRemote.remote.reconnecting' => 'Reconnexion...',
'companionRemote.remote.attemptOf' => ({required Object current}) => 'Tentative ${current} sur 5',
@@ -1964,6 +2004,7 @@ extension on TranslationsFr {
'videoSettings.hdr' => 'HDR',
'videoSettings.audioOutput' => 'Sortie audio',
'videoSettings.performanceOverlay' => 'Superposition de performance',
'videoSettings.audioPassthrough' => 'Audio Pass-Through',
'externalPlayer.title' => 'Lecteur externe',
'externalPlayer.useExternalPlayer' => 'Utiliser un lecteur externe',
'externalPlayer.useExternalPlayerDescription' => 'Ouvrir les vidéos dans une application externe au lieu du lecteur intégré',
@@ -1979,6 +2020,65 @@ extension on TranslationsFr {
'externalPlayer.launchFailed' => 'Impossible d\'ouvrir le lecteur externe',
'externalPlayer.appNotInstalled' => ({required Object name}) => '${name} n\'est pas installé',
'externalPlayer.playInExternalPlayer' => 'Lire dans un lecteur externe',
'metadataEdit.editMetadata' => 'Modifier...',
'metadataEdit.screenTitle' => 'Modifier les métadonnées',
'metadataEdit.basicInfo' => 'Informations de base',
'metadataEdit.artwork' => 'Artwork',
'metadataEdit.advancedSettings' => 'Paramètres avancés',
'metadataEdit.title' => 'Titre',
'metadataEdit.sortTitle' => 'Titre de tri',
'metadataEdit.originalTitle' => 'Titre original',
'metadataEdit.releaseDate' => 'Date de sortie',
'metadataEdit.contentRating' => 'Classification',
'metadataEdit.studio' => 'Studio',
'metadataEdit.tagline' => 'Slogan',
'metadataEdit.summary' => 'Résumé',
'metadataEdit.poster' => 'Affiche',
'metadataEdit.background' => 'Arrière-plan',
'metadataEdit.selectPoster' => 'Sélectionner l\'affiche',
'metadataEdit.selectBackground' => 'Sélectionner l\'arrière-plan',
'metadataEdit.fromUrl' => 'Depuis une URL',
'metadataEdit.uploadFile' => 'Importer un fichier',
'metadataEdit.enterImageUrl' => 'Entrer l\'URL de l\'image',
'metadataEdit.imageUrl' => 'URL de l\'image',
'metadataEdit.metadataUpdated' => 'Métadonnées mises à jour',
'metadataEdit.metadataUpdateFailed' => 'Échec de la mise à jour des métadonnées',
'metadataEdit.artworkUpdated' => 'Artwork mis à jour',
'metadataEdit.artworkUpdateFailed' => 'Échec de la mise à jour de l\'artwork',
'metadataEdit.noArtworkAvailable' => 'Aucun artwork disponible',
'metadataEdit.notSet' => 'Non défini',
'metadataEdit.libraryDefault' => 'Par défaut de la bibliothèque',
'metadataEdit.accountDefault' => 'Par défaut du compte',
'metadataEdit.seriesDefault' => 'Par défaut de la série',
'metadataEdit.episodeSorting' => 'Tri des épisodes',
'metadataEdit.oldestFirst' => 'Plus anciens en premier',
'metadataEdit.newestFirst' => 'Plus récents en premier',
'metadataEdit.keep' => 'Conserver',
'metadataEdit.allEpisodes' => 'Tous les épisodes',
'metadataEdit.latestEpisodes' => ({required Object count}) => '${count} derniers épisodes',
'metadataEdit.latestEpisode' => 'Dernier épisode',
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Épisodes ajoutés ces ${count} derniers jours',
'metadataEdit.deleteAfterPlaying' => 'Supprimer les épisodes après lecture',
'metadataEdit.never' => 'Jamais',
'metadataEdit.afterADay' => 'Après un jour',
'metadataEdit.afterAWeek' => 'Après une semaine',
'metadataEdit.afterAMonth' => 'Après un mois',
'metadataEdit.onNextRefresh' => 'Au prochain rafraîchissement',
'metadataEdit.seasons' => 'Saisons',
'metadataEdit.show' => 'Afficher',
'metadataEdit.hide' => 'Masquer',
'metadataEdit.episodeOrdering' => 'Ordre des épisodes',
'metadataEdit.tmdbAiring' => 'The Movie Database (Diffusion)',
'metadataEdit.tvdbAiring' => 'TheTVDB (Diffusion)',
'metadataEdit.tvdbAbsolute' => 'TheTVDB (Absolu)',
'metadataEdit.metadataLanguage' => 'Langue des métadonnées',
'metadataEdit.useOriginalTitle' => 'Utiliser le titre original',
'metadataEdit.preferredAudioLanguage' => 'Langue audio préférée',
'metadataEdit.preferredSubtitleLanguage' => 'Langue de sous-titres préférée',
'metadataEdit.subtitleMode' => 'Sélection automatique des sous-titres',
'metadataEdit.manuallySelected' => 'Sélectionné manuellement',
'metadataEdit.shownWithForeignAudio' => 'Affichés avec audio étranger',
'metadataEdit.alwaysEnabled' => 'Toujours activé',
_ => null,
};
}
+142 -42
View File
@@ -74,6 +74,7 @@ class TranslationsIt with BaseTranslations<AppLocale, Translations> implements T
@override late final _TranslationsCompanionRemoteIt companionRemote = _TranslationsCompanionRemoteIt._(_root);
@override late final _TranslationsVideoSettingsIt videoSettings = _TranslationsVideoSettingsIt._(_root);
@override late final _TranslationsExternalPlayerIt externalPlayer = _TranslationsExternalPlayerIt._(_root);
@override late final _TranslationsMetadataEditIt metadataEdit = _TranslationsMetadataEditIt._(_root);
}
// Path: app
@@ -244,6 +245,8 @@ class _TranslationsSettingsIt implements TranslationsSettingsEn {
@override String get hardwareDecodingDescription => 'Utilizza l\'accelerazione hardware quando disponibile';
@override String get bufferSize => 'Dimensione buffer';
@override String bufferSizeMB({required Object size}) => '${size}MB';
@override String get bufferSizeAuto => 'Auto (Consigliato)';
@override String bufferSizeWarning({required Object heap, required Object size}) => 'Il tuo dispositivo ha ${heap}MB di memoria. Un buffer di ${size}MB potrebbe causare problemi di riproduzione.';
@override String get subtitleStyling => 'Stile sottotitoli';
@override String get subtitleStylingDescription => 'Personalizza l\'aspetto dei sottotitoli';
@override String get smallSkipDuration => 'Durata skip breve';
@@ -457,6 +460,9 @@ class _TranslationsVideoControlsIt implements TranslationsVideoControlsEn {
@override String get timerActive => 'Timer attivo';
@override String playbackWillPauseIn({required Object duration}) => 'La riproduzione si interromperà tra ${duration}';
@override String get sleepTimerCompleted => 'Timer di spegnimento completato - riproduzione in pausa';
@override String get stillWatching => 'Stai ancora guardando?';
@override String pausingIn({required Object seconds}) => 'Pausa tra ${seconds}s';
@override String get continueWatching => 'Continua';
@override String get autoPlayNext => 'Riproduzione automatica successivo';
@override String get playNext => 'Riproduci successivo';
@override String get playButton => 'Riproduci';
@@ -791,29 +797,17 @@ class _TranslationsLiveTvIt implements TranslationsLiveTvEn {
@override String get title => 'TV in diretta';
@override String get channels => 'Canali';
@override String get guide => 'Guida';
@override String get recordings => 'Registrazioni';
@override String get subscriptions => 'Regole di registrazione';
@override String get scheduled => 'Programmati';
@override String get noChannels => 'Nessun canale disponibile';
@override String get noDvr => 'Nessun DVR configurato su nessun server';
@override String get tuneFailed => 'Impossibile sintonizzare il canale';
@override String get loading => 'Caricamento canali...';
@override String get nowPlaying => 'In riproduzione';
@override String get record => 'Registra';
@override String get recordSeries => 'Registra serie';
@override String get cancelRecording => 'Annulla registrazione';
@override String get deleteSubscription => 'Elimina regola di registrazione';
@override String get deleteSubscriptionConfirm => 'Sei sicuro di voler eliminare questa regola di registrazione?';
@override String get subscriptionDeleted => 'Regola di registrazione eliminata';
@override String get noPrograms => 'Nessun dato di programma disponibile';
@override String get noRecordings => 'Nessuna registrazione programmata';
@override String get noSubscriptions => 'Nessuna regola di registrazione';
@override String channelNumber({required Object number}) => 'Canale ${number}';
@override String get live => 'IN DIRETTA';
@override String get hd => 'HD';
@override String get premiere => 'NUOVO';
@override String get reloadGuide => 'Ricarica guida';
@override String get guideReloaded => 'Dati della guida ricaricati';
@override String get allChannels => 'Tutti i canali';
@override String get now => 'Ora';
@override String get today => 'Oggi';
@@ -1024,6 +1018,7 @@ class _TranslationsVideoSettingsIt implements TranslationsVideoSettingsEn {
@override String get hdr => 'HDR';
@override String get audioOutput => 'Uscita audio';
@override String get performanceOverlay => 'Overlay prestazioni';
@override String get audioPassthrough => 'Audio Passthrough';
}
// Path: externalPlayer
@@ -1050,6 +1045,74 @@ class _TranslationsExternalPlayerIt implements TranslationsExternalPlayerEn {
@override String get playInExternalPlayer => 'Riproduci in lettore esterno';
}
// Path: metadataEdit
class _TranslationsMetadataEditIt implements TranslationsMetadataEditEn {
_TranslationsMetadataEditIt._(this._root);
final TranslationsIt _root; // ignore: unused_field
// Translations
@override String get editMetadata => 'Modifica...';
@override String get screenTitle => 'Modifica metadati';
@override String get basicInfo => 'Informazioni di base';
@override String get artwork => 'Artwork';
@override String get advancedSettings => 'Impostazioni avanzate';
@override String get title => 'Titolo';
@override String get sortTitle => 'Titolo di ordinamento';
@override String get originalTitle => 'Titolo originale';
@override String get releaseDate => 'Data di uscita';
@override String get contentRating => 'Classificazione';
@override String get studio => 'Studio';
@override String get tagline => 'Tagline';
@override String get summary => 'Trama';
@override String get poster => 'Poster';
@override String get background => 'Sfondo';
@override String get selectPoster => 'Seleziona poster';
@override String get selectBackground => 'Seleziona sfondo';
@override String get fromUrl => 'Da URL';
@override String get uploadFile => 'Carica file';
@override String get enterImageUrl => 'Inserisci URL immagine';
@override String get imageUrl => 'URL immagine';
@override String get metadataUpdated => 'Metadati aggiornati';
@override String get metadataUpdateFailed => 'Aggiornamento metadati non riuscito';
@override String get artworkUpdated => 'Artwork aggiornato';
@override String get artworkUpdateFailed => 'Aggiornamento artwork non riuscito';
@override String get noArtworkAvailable => 'Nessun artwork disponibile';
@override String get notSet => 'Non impostato';
@override String get libraryDefault => 'Predefinito libreria';
@override String get accountDefault => 'Predefinito account';
@override String get seriesDefault => 'Predefinito serie';
@override String get episodeSorting => 'Ordinamento episodi';
@override String get oldestFirst => 'Più vecchi prima';
@override String get newestFirst => 'Più recenti prima';
@override String get keep => 'Conserva';
@override String get allEpisodes => 'Tutti gli episodi';
@override String latestEpisodes({required Object count}) => '${count} episodi più recenti';
@override String get latestEpisode => 'Episodio più recente';
@override String episodesAddedPastDays({required Object count}) => 'Episodi aggiunti negli ultimi ${count} giorni';
@override String get deleteAfterPlaying => 'Elimina episodi dopo la riproduzione';
@override String get never => 'Mai';
@override String get afterADay => 'Dopo un giorno';
@override String get afterAWeek => 'Dopo una settimana';
@override String get afterAMonth => 'Dopo un mese';
@override String get onNextRefresh => 'Al prossimo aggiornamento';
@override String get seasons => 'Stagioni';
@override String get show => 'Mostra';
@override String get hide => 'Nascondi';
@override String get episodeOrdering => 'Ordine episodi';
@override String get tmdbAiring => 'The Movie Database (In onda)';
@override String get tvdbAiring => 'TheTVDB (In onda)';
@override String get tvdbAbsolute => 'TheTVDB (Assoluto)';
@override String get metadataLanguage => 'Lingua metadati';
@override String get useOriginalTitle => 'Usa titolo originale';
@override String get preferredAudioLanguage => 'Lingua audio preferita';
@override String get preferredSubtitleLanguage => 'Lingua sottotitoli preferita';
@override String get subtitleMode => 'Selezione automatica sottotitoli';
@override String get manuallySelected => 'Selezionato manualmente';
@override String get shownWithForeignAudio => 'Mostrati con audio straniero';
@override String get alwaysEnabled => 'Sempre attivo';
}
// Path: hotkeys.actions
class _TranslationsHotkeysActionsIt implements TranslationsHotkeysActionsEn {
_TranslationsHotkeysActionsIt._(this._root);
@@ -1151,11 +1214,8 @@ class _TranslationsCompanionRemotePairingIt implements TranslationsCompanionRemo
final TranslationsIt _root; // ignore: unused_field
// Translations
@override String get recent => 'Recenti';
@override String get scan => 'Scansiona';
@override String get manual => 'Manuale';
@override String get recentConnections => 'Connessioni recenti';
@override String get quickReconnect => 'Riconnettiti rapidamente ai dispositivi associati in precedenza';
@override String get pairWithDesktop => 'Associa con desktop';
@override String get enterSessionDetails => 'Inserisci i dettagli della sessione mostrati sul tuo dispositivo desktop';
@override String get hostAddressHint => '192.168.1.100:48632';
@@ -1169,11 +1229,7 @@ class _TranslationsCompanionRemotePairingIt implements TranslationsCompanionRemo
@override String get cameraPermissionRequired => 'L\'autorizzazione della fotocamera è necessaria per scansionare i QR code.\nConcedi l\'accesso alla fotocamera nelle impostazioni del dispositivo.';
@override String cameraError({required Object error}) => 'Impossibile avviare la fotocamera: ${error}';
@override String get scanInstruction => 'Punta la fotocamera verso il QR code mostrato sul tuo desktop';
@override String get noRecentConnections => 'Nessuna connessione recente';
@override String get connectUsingManual => 'Connettiti a un dispositivo tramite inserimento manuale per iniziare';
@override String get invalidQrCode => 'Formato QR code non valido';
@override String get removeRecentConnection => 'Rimuovi connessione recente';
@override String removeConfirm({required Object name}) => 'Rimuovere "${name}" dalle connessioni recenti?';
@override String get validationHostRequired => 'Inserisci l\'indirizzo host';
@override String get validationHostFormat => 'Il formato deve essere IP:porta (es. 192.168.1.100:48632)';
@override String get validationSessionIdRequired => 'Inserisci un ID sessione';
@@ -1183,7 +1239,6 @@ class _TranslationsCompanionRemotePairingIt implements TranslationsCompanionRemo
@override String get connectionTimedOut => 'Connessione scaduta. Verifica l\'ID sessione e il PIN.';
@override String get sessionNotFound => 'Sessione non trovata. Verifica le tue credenziali.';
@override String failedToConnect({required Object error}) => 'Connessione fallita: ${error}';
@override String failedToLoadRecent({required Object error}) => 'Impossibile caricare le sessioni recenti: ${error}';
}
// Path: companionRemote.remote
@@ -1348,6 +1403,8 @@ extension on TranslationsIt {
'settings.hardwareDecodingDescription' => 'Utilizza l\'accelerazione hardware quando disponibile',
'settings.bufferSize' => 'Dimensione buffer',
'settings.bufferSizeMB' => ({required Object size}) => '${size}MB',
'settings.bufferSizeAuto' => 'Auto (Consigliato)',
'settings.bufferSizeWarning' => ({required Object heap, required Object size}) => 'Il tuo dispositivo ha ${heap}MB di memoria. Un buffer di ${size}MB potrebbe causare problemi di riproduzione.',
'settings.subtitleStyling' => 'Stile sottotitoli',
'settings.subtitleStylingDescription' => 'Personalizza l\'aspetto dei sottotitoli',
'settings.smallSkipDuration' => 'Durata skip breve',
@@ -1507,6 +1564,9 @@ extension on TranslationsIt {
'videoControls.timerActive' => 'Timer attivo',
'videoControls.playbackWillPauseIn' => ({required Object duration}) => 'La riproduzione si interromperà tra ${duration}',
'videoControls.sleepTimerCompleted' => 'Timer di spegnimento completato - riproduzione in pausa',
'videoControls.stillWatching' => 'Stai ancora guardando?',
'videoControls.pausingIn' => ({required Object seconds}) => 'Pausa tra ${seconds}s',
'videoControls.continueWatching' => 'Continua',
'videoControls.autoPlayNext' => 'Riproduzione automatica successivo',
'videoControls.playNext' => 'Riproduci successivo',
'videoControls.playButton' => 'Riproduci',
@@ -1718,34 +1778,20 @@ extension on TranslationsIt {
'liveTv.title' => 'TV in diretta',
'liveTv.channels' => 'Canali',
'liveTv.guide' => 'Guida',
'liveTv.recordings' => 'Registrazioni',
'liveTv.subscriptions' => 'Regole di registrazione',
'liveTv.scheduled' => 'Programmati',
'liveTv.noChannels' => 'Nessun canale disponibile',
'liveTv.noDvr' => 'Nessun DVR configurato su nessun server',
'liveTv.tuneFailed' => 'Impossibile sintonizzare il canale',
'liveTv.loading' => 'Caricamento canali...',
'liveTv.nowPlaying' => 'In riproduzione',
'liveTv.record' => 'Registra',
'liveTv.recordSeries' => 'Registra serie',
'liveTv.cancelRecording' => 'Annulla registrazione',
'liveTv.deleteSubscription' => 'Elimina regola di registrazione',
'liveTv.deleteSubscriptionConfirm' => 'Sei sicuro di voler eliminare questa regola di registrazione?',
'liveTv.subscriptionDeleted' => 'Regola di registrazione eliminata',
'liveTv.noPrograms' => 'Nessun dato di programma disponibile',
'liveTv.noRecordings' => 'Nessuna registrazione programmata',
'liveTv.noSubscriptions' => 'Nessuna regola di registrazione',
'liveTv.channelNumber' => ({required Object number}) => 'Canale ${number}',
'liveTv.live' => 'IN DIRETTA',
'liveTv.hd' => 'HD',
'liveTv.premiere' => 'NUOVO',
'liveTv.reloadGuide' => 'Ricarica guida',
'liveTv.guideReloaded' => 'Dati della guida ricaricati',
'liveTv.allChannels' => 'Tutti i canali',
'liveTv.now' => 'Ora',
'liveTv.today' => 'Oggi',
_ => null,
} ?? switch (path) {
'liveTv.midnight' => 'Mezzanotte',
'liveTv.overnight' => 'Notte',
'liveTv.morning' => 'Mattina',
@@ -1753,6 +1799,8 @@ extension on TranslationsIt {
'liveTv.evening' => 'Sera',
'liveTv.lateNight' => 'Notte tarda',
'liveTv.whatsOn' => 'In onda ora',
_ => null,
} ?? switch (path) {
'liveTv.watchChannel' => 'Guarda canale',
'downloads.title' => 'Download',
'downloads.manage' => 'Gestisci',
@@ -1894,11 +1942,8 @@ extension on TranslationsIt {
'companionRemote.session.copyToClipboard' => 'Copia negli appunti',
'companionRemote.session.newSession' => 'Nuova sessione',
'companionRemote.session.minimize' => 'Riduci',
'companionRemote.pairing.recent' => 'Recenti',
'companionRemote.pairing.scan' => 'Scansiona',
'companionRemote.pairing.manual' => 'Manuale',
'companionRemote.pairing.recentConnections' => 'Connessioni recenti',
'companionRemote.pairing.quickReconnect' => 'Riconnettiti rapidamente ai dispositivi associati in precedenza',
'companionRemote.pairing.pairWithDesktop' => 'Associa con desktop',
'companionRemote.pairing.enterSessionDetails' => 'Inserisci i dettagli della sessione mostrati sul tuo dispositivo desktop',
'companionRemote.pairing.hostAddressHint' => '192.168.1.100:48632',
@@ -1912,11 +1957,7 @@ extension on TranslationsIt {
'companionRemote.pairing.cameraPermissionRequired' => 'L\'autorizzazione della fotocamera è necessaria per scansionare i QR code.\nConcedi l\'accesso alla fotocamera nelle impostazioni del dispositivo.',
'companionRemote.pairing.cameraError' => ({required Object error}) => 'Impossibile avviare la fotocamera: ${error}',
'companionRemote.pairing.scanInstruction' => 'Punta la fotocamera verso il QR code mostrato sul tuo desktop',
'companionRemote.pairing.noRecentConnections' => 'Nessuna connessione recente',
'companionRemote.pairing.connectUsingManual' => 'Connettiti a un dispositivo tramite inserimento manuale per iniziare',
'companionRemote.pairing.invalidQrCode' => 'Formato QR code non valido',
'companionRemote.pairing.removeRecentConnection' => 'Rimuovi connessione recente',
'companionRemote.pairing.removeConfirm' => ({required Object name}) => 'Rimuovere "${name}" dalle connessioni recenti?',
'companionRemote.pairing.validationHostRequired' => 'Inserisci l\'indirizzo host',
'companionRemote.pairing.validationHostFormat' => 'Il formato deve essere IP:porta (es. 192.168.1.100:48632)',
'companionRemote.pairing.validationSessionIdRequired' => 'Inserisci un ID sessione',
@@ -1926,7 +1967,6 @@ extension on TranslationsIt {
'companionRemote.pairing.connectionTimedOut' => 'Connessione scaduta. Verifica l\'ID sessione e il PIN.',
'companionRemote.pairing.sessionNotFound' => 'Sessione non trovata. Verifica le tue credenziali.',
'companionRemote.pairing.failedToConnect' => ({required Object error}) => 'Connessione fallita: ${error}',
'companionRemote.pairing.failedToLoadRecent' => ({required Object error}) => 'Impossibile caricare le sessioni recenti: ${error}',
'companionRemote.remote.disconnectConfirm' => 'Vuoi disconnetterti dalla sessione remota?',
'companionRemote.remote.reconnecting' => 'Riconnessione...',
'companionRemote.remote.attemptOf' => ({required Object current}) => 'Tentativo ${current} di 5',
@@ -1964,6 +2004,7 @@ extension on TranslationsIt {
'videoSettings.hdr' => 'HDR',
'videoSettings.audioOutput' => 'Uscita audio',
'videoSettings.performanceOverlay' => 'Overlay prestazioni',
'videoSettings.audioPassthrough' => 'Audio Passthrough',
'externalPlayer.title' => 'Lettore esterno',
'externalPlayer.useExternalPlayer' => 'Usa lettore esterno',
'externalPlayer.useExternalPlayerDescription' => 'Apri i video in un\'app esterna invece del lettore integrato',
@@ -1979,6 +2020,65 @@ extension on TranslationsIt {
'externalPlayer.launchFailed' => 'Impossibile aprire il lettore esterno',
'externalPlayer.appNotInstalled' => ({required Object name}) => '${name} non è installato',
'externalPlayer.playInExternalPlayer' => 'Riproduci in lettore esterno',
'metadataEdit.editMetadata' => 'Modifica...',
'metadataEdit.screenTitle' => 'Modifica metadati',
'metadataEdit.basicInfo' => 'Informazioni di base',
'metadataEdit.artwork' => 'Artwork',
'metadataEdit.advancedSettings' => 'Impostazioni avanzate',
'metadataEdit.title' => 'Titolo',
'metadataEdit.sortTitle' => 'Titolo di ordinamento',
'metadataEdit.originalTitle' => 'Titolo originale',
'metadataEdit.releaseDate' => 'Data di uscita',
'metadataEdit.contentRating' => 'Classificazione',
'metadataEdit.studio' => 'Studio',
'metadataEdit.tagline' => 'Tagline',
'metadataEdit.summary' => 'Trama',
'metadataEdit.poster' => 'Poster',
'metadataEdit.background' => 'Sfondo',
'metadataEdit.selectPoster' => 'Seleziona poster',
'metadataEdit.selectBackground' => 'Seleziona sfondo',
'metadataEdit.fromUrl' => 'Da URL',
'metadataEdit.uploadFile' => 'Carica file',
'metadataEdit.enterImageUrl' => 'Inserisci URL immagine',
'metadataEdit.imageUrl' => 'URL immagine',
'metadataEdit.metadataUpdated' => 'Metadati aggiornati',
'metadataEdit.metadataUpdateFailed' => 'Aggiornamento metadati non riuscito',
'metadataEdit.artworkUpdated' => 'Artwork aggiornato',
'metadataEdit.artworkUpdateFailed' => 'Aggiornamento artwork non riuscito',
'metadataEdit.noArtworkAvailable' => 'Nessun artwork disponibile',
'metadataEdit.notSet' => 'Non impostato',
'metadataEdit.libraryDefault' => 'Predefinito libreria',
'metadataEdit.accountDefault' => 'Predefinito account',
'metadataEdit.seriesDefault' => 'Predefinito serie',
'metadataEdit.episodeSorting' => 'Ordinamento episodi',
'metadataEdit.oldestFirst' => 'Più vecchi prima',
'metadataEdit.newestFirst' => 'Più recenti prima',
'metadataEdit.keep' => 'Conserva',
'metadataEdit.allEpisodes' => 'Tutti gli episodi',
'metadataEdit.latestEpisodes' => ({required Object count}) => '${count} episodi più recenti',
'metadataEdit.latestEpisode' => 'Episodio più recente',
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Episodi aggiunti negli ultimi ${count} giorni',
'metadataEdit.deleteAfterPlaying' => 'Elimina episodi dopo la riproduzione',
'metadataEdit.never' => 'Mai',
'metadataEdit.afterADay' => 'Dopo un giorno',
'metadataEdit.afterAWeek' => 'Dopo una settimana',
'metadataEdit.afterAMonth' => 'Dopo un mese',
'metadataEdit.onNextRefresh' => 'Al prossimo aggiornamento',
'metadataEdit.seasons' => 'Stagioni',
'metadataEdit.show' => 'Mostra',
'metadataEdit.hide' => 'Nascondi',
'metadataEdit.episodeOrdering' => 'Ordine episodi',
'metadataEdit.tmdbAiring' => 'The Movie Database (In onda)',
'metadataEdit.tvdbAiring' => 'TheTVDB (In onda)',
'metadataEdit.tvdbAbsolute' => 'TheTVDB (Assoluto)',
'metadataEdit.metadataLanguage' => 'Lingua metadati',
'metadataEdit.useOriginalTitle' => 'Usa titolo originale',
'metadataEdit.preferredAudioLanguage' => 'Lingua audio preferita',
'metadataEdit.preferredSubtitleLanguage' => 'Lingua sottotitoli preferita',
'metadataEdit.subtitleMode' => 'Selezione automatica sottotitoli',
'metadataEdit.manuallySelected' => 'Selezionato manualmente',
'metadataEdit.shownWithForeignAudio' => 'Mostrati con audio straniero',
'metadataEdit.alwaysEnabled' => 'Sempre attivo',
_ => null,
};
}
+142 -42
View File
@@ -74,6 +74,7 @@ class TranslationsKo with BaseTranslations<AppLocale, Translations> implements T
@override late final _TranslationsCompanionRemoteKo companionRemote = _TranslationsCompanionRemoteKo._(_root);
@override late final _TranslationsVideoSettingsKo videoSettings = _TranslationsVideoSettingsKo._(_root);
@override late final _TranslationsExternalPlayerKo externalPlayer = _TranslationsExternalPlayerKo._(_root);
@override late final _TranslationsMetadataEditKo metadataEdit = _TranslationsMetadataEditKo._(_root);
}
// Path: app
@@ -244,6 +245,8 @@ class _TranslationsSettingsKo implements TranslationsSettingsEn {
@override String get hardwareDecodingDescription => '가능한 경우 하드웨어 가속을 사용합니다';
@override String get bufferSize => '버퍼 크기';
@override String bufferSizeMB({required Object size}) => '${size}MB';
@override String get bufferSizeAuto => '자동 (권장)';
@override String bufferSizeWarning({required Object heap, required Object size}) => '기기 메모리가 ${heap}MB입니다. ${size}MB 버퍼는 재생 문제를 일으킬 수 있습니다.';
@override String get subtitleStyling => '자막 스타일';
@override String get subtitleStylingDescription => '자막의 외형을 사용자 설정';
@override String get smallSkipDuration => '짧은 건너뛰기 시간';
@@ -457,6 +460,9 @@ class _TranslationsVideoControlsKo implements TranslationsVideoControlsEn {
@override String get timerActive => '타이머 활성화됨';
@override String playbackWillPauseIn({required Object duration}) => '재생이 ${duration} 후에 일시 중지 됩니다';
@override String get sleepTimerCompleted => '수면 타이머 완료됨 - 재생이 일시 중지되었습니다';
@override String get stillWatching => '아직 시청 중이신가요?';
@override String pausingIn({required Object seconds}) => '${seconds}초 후 일시 정지';
@override String get continueWatching => '계속';
@override String get autoPlayNext => '다음 자동 재생';
@override String get playNext => '다음 재생';
@override String get playButton => '재생';
@@ -791,29 +797,17 @@ class _TranslationsLiveTvKo implements TranslationsLiveTvEn {
@override String get title => '실시간 TV';
@override String get channels => '채널';
@override String get guide => '편성표';
@override String get recordings => '녹화';
@override String get subscriptions => '녹화 규칙';
@override String get scheduled => '예약됨';
@override String get noChannels => '사용 가능한 채널이 없습니다';
@override String get noDvr => '서버에 DVR이 구성되어 있지 않습니다';
@override String get tuneFailed => '채널 튜닝에 실패했습니다';
@override String get loading => '채널 로딩 중...';
@override String get nowPlaying => '현재 재생 중';
@override String get record => '녹화';
@override String get recordSeries => '시리즈 녹화';
@override String get cancelRecording => '녹화 취소';
@override String get deleteSubscription => '녹화 규칙 삭제';
@override String get deleteSubscriptionConfirm => '이 녹화 규칙을 삭제하시겠습니까?';
@override String get subscriptionDeleted => '녹화 규칙이 삭제되었습니다';
@override String get noPrograms => '프로그램 데이터가 없습니다';
@override String get noRecordings => '예약된 녹화가 없습니다';
@override String get noSubscriptions => '녹화 규칙이 없습니다';
@override String channelNumber({required Object number}) => '채널 ${number}';
@override String get live => '실시간';
@override String get hd => 'HD';
@override String get premiere => '신규';
@override String get reloadGuide => '편성표 새로고침';
@override String get guideReloaded => '편성표 데이터가 새로고침되었습니다';
@override String get allChannels => '전체 채널';
@override String get now => '지금';
@override String get today => '오늘';
@@ -1024,6 +1018,7 @@ class _TranslationsVideoSettingsKo implements TranslationsVideoSettingsEn {
@override String get hdr => 'HDR';
@override String get audioOutput => '오디오 출력';
@override String get performanceOverlay => '성능 오버레이';
@override String get audioPassthrough => '오디오 패스스루';
}
// Path: externalPlayer
@@ -1050,6 +1045,74 @@ class _TranslationsExternalPlayerKo implements TranslationsExternalPlayerEn {
@override String get playInExternalPlayer => '외부 플레이어에서 재생';
}
// Path: metadataEdit
class _TranslationsMetadataEditKo implements TranslationsMetadataEditEn {
_TranslationsMetadataEditKo._(this._root);
final TranslationsKo _root; // ignore: unused_field
// Translations
@override String get editMetadata => '편집...';
@override String get screenTitle => '메타데이터 편집';
@override String get basicInfo => '기본 정보';
@override String get artwork => '아트워크';
@override String get advancedSettings => '고급 설정';
@override String get title => '제목';
@override String get sortTitle => '정렬 제목';
@override String get originalTitle => '원제';
@override String get releaseDate => '출시일';
@override String get contentRating => '콘텐츠 등급';
@override String get studio => '스튜디오';
@override String get tagline => '태그라인';
@override String get summary => '줄거리';
@override String get poster => '포스터';
@override String get background => '배경';
@override String get selectPoster => '포스터 선택';
@override String get selectBackground => '배경 선택';
@override String get fromUrl => 'URL에서';
@override String get uploadFile => '파일 업로드';
@override String get enterImageUrl => '이미지 URL 입력';
@override String get imageUrl => '이미지 URL';
@override String get metadataUpdated => '메타데이터가 업데이트되었습니다';
@override String get metadataUpdateFailed => '메타데이터 업데이트 실패';
@override String get artworkUpdated => '아트워크가 업데이트되었습니다';
@override String get artworkUpdateFailed => '아트워크 업데이트 실패';
@override String get noArtworkAvailable => '사용 가능한 아트워크 없음';
@override String get notSet => '설정되지 않음';
@override String get libraryDefault => '라이브러리 기본값';
@override String get accountDefault => '계정 기본값';
@override String get seriesDefault => '시리즈 기본값';
@override String get episodeSorting => '에피소드 정렬';
@override String get oldestFirst => '오래된 순';
@override String get newestFirst => '최신 순';
@override String get keep => '유지';
@override String get allEpisodes => '모든 에피소드';
@override String latestEpisodes({required Object count}) => '최신 에피소드 ${count}개';
@override String get latestEpisode => '최신 에피소드';
@override String episodesAddedPastDays({required Object count}) => '최근 ${count}일 내 추가된 에피소드';
@override String get deleteAfterPlaying => '재생 후 에피소드 삭제';
@override String get never => '안 함';
@override String get afterADay => '하루 후';
@override String get afterAWeek => '일주일 후';
@override String get afterAMonth => '한 달 후';
@override String get onNextRefresh => '다음 새로고침 시';
@override String get seasons => '시즌';
@override String get show => '표시';
@override String get hide => '숨기기';
@override String get episodeOrdering => '에피소드 순서';
@override String get tmdbAiring => 'The Movie Database (방영순)';
@override String get tvdbAiring => 'TheTVDB (방영순)';
@override String get tvdbAbsolute => 'TheTVDB (절대순)';
@override String get metadataLanguage => '메타데이터 언어';
@override String get useOriginalTitle => '원제 사용';
@override String get preferredAudioLanguage => '선호 오디오 언어';
@override String get preferredSubtitleLanguage => '선호 자막 언어';
@override String get subtitleMode => '자막 자동 선택 모드';
@override String get manuallySelected => '수동 선택';
@override String get shownWithForeignAudio => '외국어 오디오 시 표시';
@override String get alwaysEnabled => '항상 활성화';
}
// Path: hotkeys.actions
class _TranslationsHotkeysActionsKo implements TranslationsHotkeysActionsEn {
_TranslationsHotkeysActionsKo._(this._root);
@@ -1151,11 +1214,8 @@ class _TranslationsCompanionRemotePairingKo implements TranslationsCompanionRemo
final TranslationsKo _root; // ignore: unused_field
// Translations
@override String get recent => '최근';
@override String get scan => '스캔';
@override String get manual => '수동';
@override String get recentConnections => '최근 연결';
@override String get quickReconnect => '이전에 페어링한 기기에 빠르게 재연결';
@override String get pairWithDesktop => '데스크톱과 페어링';
@override String get enterSessionDetails => '데스크톱 기기에 표시된 세션 정보를 입력하세요';
@override String get hostAddressHint => '192.168.1.100:48632';
@@ -1169,11 +1229,7 @@ class _TranslationsCompanionRemotePairingKo implements TranslationsCompanionRemo
@override String get cameraPermissionRequired => 'QR 코드를 스캔하려면 카메라 권한이 필요합니다.\n기기 설정에서 카메라 접근을 허용해 주세요.';
@override String cameraError({required Object error}) => '카메라를 시작할 수 없습니다: ${error}';
@override String get scanInstruction => '데스크톱에 표시된 QR 코드에 카메라를 향하세요';
@override String get noRecentConnections => '최근 연결 없음';
@override String get connectUsingManual => '수동 입력으로 기기에 연결하여 시작하세요';
@override String get invalidQrCode => '유효하지 않은 QR 코드 형식';
@override String get removeRecentConnection => '최근 연결 삭제';
@override String removeConfirm({required Object name}) => '"${name}"을(를) 최근 연결에서 삭제하시겠습니까?';
@override String get validationHostRequired => '호스트 주소를 입력하세요';
@override String get validationHostFormat => 'IP:포트 형식이어야 합니다 (예: 192.168.1.100:48632)';
@override String get validationSessionIdRequired => '세션 ID를 입력하세요';
@@ -1183,7 +1239,6 @@ class _TranslationsCompanionRemotePairingKo implements TranslationsCompanionRemo
@override String get connectionTimedOut => '연결 시간이 초과되었습니다. 세션 ID와 PIN을 확인하세요.';
@override String get sessionNotFound => '세션을 찾을 수 없습니다. 자격 증명을 확인하세요.';
@override String failedToConnect({required Object error}) => '연결 실패: ${error}';
@override String failedToLoadRecent({required Object error}) => '최근 세션 로드 실패: ${error}';
}
// Path: companionRemote.remote
@@ -1348,6 +1403,8 @@ extension on TranslationsKo {
'settings.hardwareDecodingDescription' => '가능한 경우 하드웨어 가속을 사용합니다',
'settings.bufferSize' => '버퍼 크기',
'settings.bufferSizeMB' => ({required Object size}) => '${size}MB',
'settings.bufferSizeAuto' => '자동 (권장)',
'settings.bufferSizeWarning' => ({required Object heap, required Object size}) => '기기 메모리가 ${heap}MB입니다. ${size}MB 버퍼는 재생 문제를 일으킬 수 있습니다.',
'settings.subtitleStyling' => '자막 스타일',
'settings.subtitleStylingDescription' => '자막의 외형을 사용자 설정',
'settings.smallSkipDuration' => '짧은 건너뛰기 시간',
@@ -1507,6 +1564,9 @@ extension on TranslationsKo {
'videoControls.timerActive' => '타이머 활성화됨',
'videoControls.playbackWillPauseIn' => ({required Object duration}) => '재생이 ${duration} 후에 일시 중지 됩니다',
'videoControls.sleepTimerCompleted' => '수면 타이머 완료됨 - 재생이 일시 중지되었습니다',
'videoControls.stillWatching' => '아직 시청 중이신가요?',
'videoControls.pausingIn' => ({required Object seconds}) => '${seconds}초 후 일시 정지',
'videoControls.continueWatching' => '계속',
'videoControls.autoPlayNext' => '다음 자동 재생',
'videoControls.playNext' => '다음 재생',
'videoControls.playButton' => '재생',
@@ -1718,34 +1778,20 @@ extension on TranslationsKo {
'liveTv.title' => '실시간 TV',
'liveTv.channels' => '채널',
'liveTv.guide' => '편성표',
'liveTv.recordings' => '녹화',
'liveTv.subscriptions' => '녹화 규칙',
'liveTv.scheduled' => '예약됨',
'liveTv.noChannels' => '사용 가능한 채널이 없습니다',
'liveTv.noDvr' => '서버에 DVR이 구성되어 있지 않습니다',
'liveTv.tuneFailed' => '채널 튜닝에 실패했습니다',
'liveTv.loading' => '채널 로딩 중...',
'liveTv.nowPlaying' => '현재 재생 중',
'liveTv.record' => '녹화',
'liveTv.recordSeries' => '시리즈 녹화',
'liveTv.cancelRecording' => '녹화 취소',
'liveTv.deleteSubscription' => '녹화 규칙 삭제',
'liveTv.deleteSubscriptionConfirm' => '이 녹화 규칙을 삭제하시겠습니까?',
'liveTv.subscriptionDeleted' => '녹화 규칙이 삭제되었습니다',
'liveTv.noPrograms' => '프로그램 데이터가 없습니다',
'liveTv.noRecordings' => '예약된 녹화가 없습니다',
'liveTv.noSubscriptions' => '녹화 규칙이 없습니다',
'liveTv.channelNumber' => ({required Object number}) => '채널 ${number}',
'liveTv.live' => '실시간',
'liveTv.hd' => 'HD',
'liveTv.premiere' => '신규',
'liveTv.reloadGuide' => '편성표 새로고침',
'liveTv.guideReloaded' => '편성표 데이터가 새로고침되었습니다',
'liveTv.allChannels' => '전체 채널',
'liveTv.now' => '지금',
'liveTv.today' => '오늘',
_ => null,
} ?? switch (path) {
'liveTv.midnight' => '자정',
'liveTv.overnight' => '심야',
'liveTv.morning' => '아침',
@@ -1753,6 +1799,8 @@ extension on TranslationsKo {
'liveTv.evening' => '저녁',
'liveTv.lateNight' => '심야 방송',
'liveTv.whatsOn' => '지금 방송 중',
_ => null,
} ?? switch (path) {
'liveTv.watchChannel' => '채널 시청',
'collections.title' => '컬렉션',
'collections.collection' => '컬렉션',
@@ -1894,11 +1942,8 @@ extension on TranslationsKo {
'companionRemote.session.copyToClipboard' => '클립보드에 복사',
'companionRemote.session.newSession' => '새 세션',
'companionRemote.session.minimize' => '최소화',
'companionRemote.pairing.recent' => '최근',
'companionRemote.pairing.scan' => '스캔',
'companionRemote.pairing.manual' => '수동',
'companionRemote.pairing.recentConnections' => '최근 연결',
'companionRemote.pairing.quickReconnect' => '이전에 페어링한 기기에 빠르게 재연결',
'companionRemote.pairing.pairWithDesktop' => '데스크톱과 페어링',
'companionRemote.pairing.enterSessionDetails' => '데스크톱 기기에 표시된 세션 정보를 입력하세요',
'companionRemote.pairing.hostAddressHint' => '192.168.1.100:48632',
@@ -1912,11 +1957,7 @@ extension on TranslationsKo {
'companionRemote.pairing.cameraPermissionRequired' => 'QR 코드를 스캔하려면 카메라 권한이 필요합니다.\n기기 설정에서 카메라 접근을 허용해 주세요.',
'companionRemote.pairing.cameraError' => ({required Object error}) => '카메라를 시작할 수 없습니다: ${error}',
'companionRemote.pairing.scanInstruction' => '데스크톱에 표시된 QR 코드에 카메라를 향하세요',
'companionRemote.pairing.noRecentConnections' => '최근 연결 없음',
'companionRemote.pairing.connectUsingManual' => '수동 입력으로 기기에 연결하여 시작하세요',
'companionRemote.pairing.invalidQrCode' => '유효하지 않은 QR 코드 형식',
'companionRemote.pairing.removeRecentConnection' => '최근 연결 삭제',
'companionRemote.pairing.removeConfirm' => ({required Object name}) => '"${name}"을(를) 최근 연결에서 삭제하시겠습니까?',
'companionRemote.pairing.validationHostRequired' => '호스트 주소를 입력하세요',
'companionRemote.pairing.validationHostFormat' => 'IP:포트 형식이어야 합니다 (예: 192.168.1.100:48632)',
'companionRemote.pairing.validationSessionIdRequired' => '세션 ID를 입력하세요',
@@ -1926,7 +1967,6 @@ extension on TranslationsKo {
'companionRemote.pairing.connectionTimedOut' => '연결 시간이 초과되었습니다. 세션 ID와 PIN을 확인하세요.',
'companionRemote.pairing.sessionNotFound' => '세션을 찾을 수 없습니다. 자격 증명을 확인하세요.',
'companionRemote.pairing.failedToConnect' => ({required Object error}) => '연결 실패: ${error}',
'companionRemote.pairing.failedToLoadRecent' => ({required Object error}) => '최근 세션 로드 실패: ${error}',
'companionRemote.remote.disconnectConfirm' => '원격 세션 연결을 해제하시겠습니까?',
'companionRemote.remote.reconnecting' => '재연결 중...',
'companionRemote.remote.attemptOf' => ({required Object current}) => '${current}/5 시도 중',
@@ -1964,6 +2004,7 @@ extension on TranslationsKo {
'videoSettings.hdr' => 'HDR',
'videoSettings.audioOutput' => '오디오 출력',
'videoSettings.performanceOverlay' => '성능 오버레이',
'videoSettings.audioPassthrough' => '오디오 패스스루',
'externalPlayer.title' => '외부 플레이어',
'externalPlayer.useExternalPlayer' => '외부 플레이어 사용',
'externalPlayer.useExternalPlayerDescription' => '내장 플레이어 대신 외부 앱에서 동영상 열기',
@@ -1979,6 +2020,65 @@ extension on TranslationsKo {
'externalPlayer.launchFailed' => '외부 플레이어를 열 수 없습니다',
'externalPlayer.appNotInstalled' => ({required Object name}) => '${name}이(가) 설치되어 있지 않습니다',
'externalPlayer.playInExternalPlayer' => '외부 플레이어에서 재생',
'metadataEdit.editMetadata' => '편집...',
'metadataEdit.screenTitle' => '메타데이터 편집',
'metadataEdit.basicInfo' => '기본 정보',
'metadataEdit.artwork' => '아트워크',
'metadataEdit.advancedSettings' => '고급 설정',
'metadataEdit.title' => '제목',
'metadataEdit.sortTitle' => '정렬 제목',
'metadataEdit.originalTitle' => '원제',
'metadataEdit.releaseDate' => '출시일',
'metadataEdit.contentRating' => '콘텐츠 등급',
'metadataEdit.studio' => '스튜디오',
'metadataEdit.tagline' => '태그라인',
'metadataEdit.summary' => '줄거리',
'metadataEdit.poster' => '포스터',
'metadataEdit.background' => '배경',
'metadataEdit.selectPoster' => '포스터 선택',
'metadataEdit.selectBackground' => '배경 선택',
'metadataEdit.fromUrl' => 'URL에서',
'metadataEdit.uploadFile' => '파일 업로드',
'metadataEdit.enterImageUrl' => '이미지 URL 입력',
'metadataEdit.imageUrl' => '이미지 URL',
'metadataEdit.metadataUpdated' => '메타데이터가 업데이트되었습니다',
'metadataEdit.metadataUpdateFailed' => '메타데이터 업데이트 실패',
'metadataEdit.artworkUpdated' => '아트워크가 업데이트되었습니다',
'metadataEdit.artworkUpdateFailed' => '아트워크 업데이트 실패',
'metadataEdit.noArtworkAvailable' => '사용 가능한 아트워크 없음',
'metadataEdit.notSet' => '설정되지 않음',
'metadataEdit.libraryDefault' => '라이브러리 기본값',
'metadataEdit.accountDefault' => '계정 기본값',
'metadataEdit.seriesDefault' => '시리즈 기본값',
'metadataEdit.episodeSorting' => '에피소드 정렬',
'metadataEdit.oldestFirst' => '오래된 순',
'metadataEdit.newestFirst' => '최신 순',
'metadataEdit.keep' => '유지',
'metadataEdit.allEpisodes' => '모든 에피소드',
'metadataEdit.latestEpisodes' => ({required Object count}) => '최신 에피소드 ${count}개',
'metadataEdit.latestEpisode' => '최신 에피소드',
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => '최근 ${count}일 내 추가된 에피소드',
'metadataEdit.deleteAfterPlaying' => '재생 후 에피소드 삭제',
'metadataEdit.never' => '안 함',
'metadataEdit.afterADay' => '하루 후',
'metadataEdit.afterAWeek' => '일주일 후',
'metadataEdit.afterAMonth' => '한 달 후',
'metadataEdit.onNextRefresh' => '다음 새로고침 시',
'metadataEdit.seasons' => '시즌',
'metadataEdit.show' => '표시',
'metadataEdit.hide' => '숨기기',
'metadataEdit.episodeOrdering' => '에피소드 순서',
'metadataEdit.tmdbAiring' => 'The Movie Database (방영순)',
'metadataEdit.tvdbAiring' => 'TheTVDB (방영순)',
'metadataEdit.tvdbAbsolute' => 'TheTVDB (절대순)',
'metadataEdit.metadataLanguage' => '메타데이터 언어',
'metadataEdit.useOriginalTitle' => '원제 사용',
'metadataEdit.preferredAudioLanguage' => '선호 오디오 언어',
'metadataEdit.preferredSubtitleLanguage' => '선호 자막 언어',
'metadataEdit.subtitleMode' => '자막 자동 선택 모드',
'metadataEdit.manuallySelected' => '수동 선택',
'metadataEdit.shownWithForeignAudio' => '외국어 오디오 시 표시',
'metadataEdit.alwaysEnabled' => '항상 활성화',
_ => null,
};
}
+142 -42
View File
@@ -74,6 +74,7 @@ class TranslationsNl with BaseTranslations<AppLocale, Translations> implements T
@override late final _TranslationsCompanionRemoteNl companionRemote = _TranslationsCompanionRemoteNl._(_root);
@override late final _TranslationsVideoSettingsNl videoSettings = _TranslationsVideoSettingsNl._(_root);
@override late final _TranslationsExternalPlayerNl externalPlayer = _TranslationsExternalPlayerNl._(_root);
@override late final _TranslationsMetadataEditNl metadataEdit = _TranslationsMetadataEditNl._(_root);
}
// Path: app
@@ -244,6 +245,8 @@ class _TranslationsSettingsNl implements TranslationsSettingsEn {
@override String get hardwareDecodingDescription => 'Gebruik hardware versnelling indien beschikbaar';
@override String get bufferSize => 'Buffer grootte';
@override String bufferSizeMB({required Object size}) => '${size}MB';
@override String get bufferSizeAuto => 'Auto (Aanbevolen)';
@override String bufferSizeWarning({required Object heap, required Object size}) => 'Je apparaat heeft ${heap}MB geheugen. Een buffer van ${size}MB kan afspeelproblemen veroorzaken.';
@override String get subtitleStyling => 'Ondertitel opmaak';
@override String get subtitleStylingDescription => 'Pas ondertitel uiterlijk aan';
@override String get smallSkipDuration => 'Korte skip duur';
@@ -457,6 +460,9 @@ class _TranslationsVideoControlsNl implements TranslationsVideoControlsEn {
@override String get timerActive => 'Timer actief';
@override String playbackWillPauseIn({required Object duration}) => 'Afspelen wordt gepauzeerd over ${duration}';
@override String get sleepTimerCompleted => 'Slaaptimer voltooid - afspelen gepauzeerd';
@override String get stillWatching => 'Kijk je nog?';
@override String pausingIn({required Object seconds}) => 'Pauze over ${seconds}s';
@override String get continueWatching => 'Doorgaan';
@override String get autoPlayNext => 'Automatisch volgende afspelen';
@override String get playNext => 'Volgende afspelen';
@override String get playButton => 'Afspelen';
@@ -791,29 +797,17 @@ class _TranslationsLiveTvNl implements TranslationsLiveTvEn {
@override String get title => 'Live TV';
@override String get channels => 'Zenders';
@override String get guide => 'Gids';
@override String get recordings => 'Opnames';
@override String get subscriptions => 'Opnameregels';
@override String get scheduled => 'Gepland';
@override String get noChannels => 'Geen zenders beschikbaar';
@override String get noDvr => 'Geen DVR geconfigureerd op een server';
@override String get tuneFailed => 'Kan zender niet afstemmen';
@override String get loading => 'Zenders laden...';
@override String get nowPlaying => 'Nu aan het afspelen';
@override String get record => 'Opnemen';
@override String get recordSeries => 'Serie opnemen';
@override String get cancelRecording => 'Opname annuleren';
@override String get deleteSubscription => 'Opnameregel verwijderen';
@override String get deleteSubscriptionConfirm => 'Weet je zeker dat je deze opnameregel wilt verwijderen?';
@override String get subscriptionDeleted => 'Opnameregel verwijderd';
@override String get noPrograms => 'Geen programmagegevens beschikbaar';
@override String get noRecordings => 'Geen opnames gepland';
@override String get noSubscriptions => 'Geen opnameregels';
@override String channelNumber({required Object number}) => 'Kanaal ${number}';
@override String get live => 'LIVE';
@override String get hd => 'HD';
@override String get premiere => 'NIEUW';
@override String get reloadGuide => 'Gids herladen';
@override String get guideReloaded => 'Gidsgegevens herladen';
@override String get allChannels => 'Alle zenders';
@override String get now => 'Nu';
@override String get today => 'Vandaag';
@@ -1024,6 +1018,7 @@ class _TranslationsVideoSettingsNl implements TranslationsVideoSettingsEn {
@override String get hdr => 'HDR';
@override String get audioOutput => 'Audio-uitvoer';
@override String get performanceOverlay => 'Prestatie-overlay';
@override String get audioPassthrough => 'Audio-doorvoer';
}
// Path: externalPlayer
@@ -1050,6 +1045,74 @@ class _TranslationsExternalPlayerNl implements TranslationsExternalPlayerEn {
@override String get playInExternalPlayer => 'Afspelen in externe speler';
}
// Path: metadataEdit
class _TranslationsMetadataEditNl implements TranslationsMetadataEditEn {
_TranslationsMetadataEditNl._(this._root);
final TranslationsNl _root; // ignore: unused_field
// Translations
@override String get editMetadata => 'Bewerken...';
@override String get screenTitle => 'Metadata bewerken';
@override String get basicInfo => 'Basisinformatie';
@override String get artwork => 'Artwork';
@override String get advancedSettings => 'Geavanceerde instellingen';
@override String get title => 'Titel';
@override String get sortTitle => 'Sorteertitel';
@override String get originalTitle => 'Oorspronkelijke titel';
@override String get releaseDate => 'Releasedatum';
@override String get contentRating => 'Leeftijdsclassificatie';
@override String get studio => 'Studio';
@override String get tagline => 'Tagline';
@override String get summary => 'Samenvatting';
@override String get poster => 'Poster';
@override String get background => 'Achtergrond';
@override String get selectPoster => 'Poster selecteren';
@override String get selectBackground => 'Achtergrond selecteren';
@override String get fromUrl => 'Vanaf URL';
@override String get uploadFile => 'Bestand uploaden';
@override String get enterImageUrl => 'Voer afbeeldings-URL in';
@override String get imageUrl => 'Afbeeldings-URL';
@override String get metadataUpdated => 'Metadata bijgewerkt';
@override String get metadataUpdateFailed => 'Metadata bijwerken mislukt';
@override String get artworkUpdated => 'Artwork bijgewerkt';
@override String get artworkUpdateFailed => 'Artwork bijwerken mislukt';
@override String get noArtworkAvailable => 'Geen artwork beschikbaar';
@override String get notSet => 'Niet ingesteld';
@override String get libraryDefault => 'Bibliotheekstandaard';
@override String get accountDefault => 'Accountstandaard';
@override String get seriesDefault => 'Seriestandaard';
@override String get episodeSorting => 'Afleveringen sorteren';
@override String get oldestFirst => 'Oudste eerst';
@override String get newestFirst => 'Nieuwste eerst';
@override String get keep => 'Bewaren';
@override String get allEpisodes => 'Alle afleveringen';
@override String latestEpisodes({required Object count}) => '${count} nieuwste afleveringen';
@override String get latestEpisode => 'Nieuwste aflevering';
@override String episodesAddedPastDays({required Object count}) => 'Afleveringen toegevoegd in de afgelopen ${count} dagen';
@override String get deleteAfterPlaying => 'Afleveringen verwijderen na afspelen';
@override String get never => 'Nooit';
@override String get afterADay => 'Na een dag';
@override String get afterAWeek => 'Na een week';
@override String get afterAMonth => 'Na een maand';
@override String get onNextRefresh => 'Bij volgende verversing';
@override String get seasons => 'Seizoenen';
@override String get show => 'Tonen';
@override String get hide => 'Verbergen';
@override String get episodeOrdering => 'Afleveringsvolgorde';
@override String get tmdbAiring => 'The Movie Database (Uitgezonden)';
@override String get tvdbAiring => 'TheTVDB (Uitgezonden)';
@override String get tvdbAbsolute => 'TheTVDB (Absoluut)';
@override String get metadataLanguage => 'Metadatataal';
@override String get useOriginalTitle => 'Oorspronkelijke titel gebruiken';
@override String get preferredAudioLanguage => 'Voorkeurstaal audio';
@override String get preferredSubtitleLanguage => 'Voorkeurstaal ondertiteling';
@override String get subtitleMode => 'Automatische ondertitelselectie';
@override String get manuallySelected => 'Handmatig geselecteerd';
@override String get shownWithForeignAudio => 'Weergeven bij anderstalig geluid';
@override String get alwaysEnabled => 'Altijd ingeschakeld';
}
// Path: hotkeys.actions
class _TranslationsHotkeysActionsNl implements TranslationsHotkeysActionsEn {
_TranslationsHotkeysActionsNl._(this._root);
@@ -1151,11 +1214,8 @@ class _TranslationsCompanionRemotePairingNl implements TranslationsCompanionRemo
final TranslationsNl _root; // ignore: unused_field
// Translations
@override String get recent => 'Recent';
@override String get scan => 'Scannen';
@override String get manual => 'Handmatig';
@override String get recentConnections => 'Recente verbindingen';
@override String get quickReconnect => 'Snel opnieuw verbinden met eerder gekoppelde apparaten';
@override String get pairWithDesktop => 'Koppelen met desktop';
@override String get enterSessionDetails => 'Voer de sessiegegevens in die op je desktop-apparaat worden getoond';
@override String get hostAddressHint => '192.168.1.100:48632';
@@ -1169,11 +1229,7 @@ class _TranslationsCompanionRemotePairingNl implements TranslationsCompanionRemo
@override String get cameraPermissionRequired => 'Cameratoestemming is vereist om QR-codes te scannen.\nGeef cameratoegang in je apparaatinstellingen.';
@override String cameraError({required Object error}) => 'Kan camera niet starten: ${error}';
@override String get scanInstruction => 'Richt je camera op de QR-code die op je desktop wordt getoond';
@override String get noRecentConnections => 'Geen recente verbindingen';
@override String get connectUsingManual => 'Verbind met een apparaat via Handmatige invoer om te beginnen';
@override String get invalidQrCode => 'Ongeldig QR-codeformaat';
@override String get removeRecentConnection => 'Recente verbinding verwijderen';
@override String removeConfirm({required Object name}) => '"${name}" verwijderen uit recente verbindingen?';
@override String get validationHostRequired => 'Voer een hostadres in';
@override String get validationHostFormat => 'Formaat moet IP:poort zijn (bijv. 192.168.1.100:48632)';
@override String get validationSessionIdRequired => 'Voer een sessie-ID in';
@@ -1183,7 +1239,6 @@ class _TranslationsCompanionRemotePairingNl implements TranslationsCompanionRemo
@override String get connectionTimedOut => 'Verbinding verlopen. Controleer de sessie-ID en PIN.';
@override String get sessionNotFound => 'Kan de sessie niet vinden. Controleer je gegevens.';
@override String failedToConnect({required Object error}) => 'Verbinden mislukt: ${error}';
@override String failedToLoadRecent({required Object error}) => 'Kan recente sessies niet laden: ${error}';
}
// Path: companionRemote.remote
@@ -1348,6 +1403,8 @@ extension on TranslationsNl {
'settings.hardwareDecodingDescription' => 'Gebruik hardware versnelling indien beschikbaar',
'settings.bufferSize' => 'Buffer grootte',
'settings.bufferSizeMB' => ({required Object size}) => '${size}MB',
'settings.bufferSizeAuto' => 'Auto (Aanbevolen)',
'settings.bufferSizeWarning' => ({required Object heap, required Object size}) => 'Je apparaat heeft ${heap}MB geheugen. Een buffer van ${size}MB kan afspeelproblemen veroorzaken.',
'settings.subtitleStyling' => 'Ondertitel opmaak',
'settings.subtitleStylingDescription' => 'Pas ondertitel uiterlijk aan',
'settings.smallSkipDuration' => 'Korte skip duur',
@@ -1507,6 +1564,9 @@ extension on TranslationsNl {
'videoControls.timerActive' => 'Timer actief',
'videoControls.playbackWillPauseIn' => ({required Object duration}) => 'Afspelen wordt gepauzeerd over ${duration}',
'videoControls.sleepTimerCompleted' => 'Slaaptimer voltooid - afspelen gepauzeerd',
'videoControls.stillWatching' => 'Kijk je nog?',
'videoControls.pausingIn' => ({required Object seconds}) => 'Pauze over ${seconds}s',
'videoControls.continueWatching' => 'Doorgaan',
'videoControls.autoPlayNext' => 'Automatisch volgende afspelen',
'videoControls.playNext' => 'Volgende afspelen',
'videoControls.playButton' => 'Afspelen',
@@ -1718,34 +1778,20 @@ extension on TranslationsNl {
'liveTv.title' => 'Live TV',
'liveTv.channels' => 'Zenders',
'liveTv.guide' => 'Gids',
'liveTv.recordings' => 'Opnames',
'liveTv.subscriptions' => 'Opnameregels',
'liveTv.scheduled' => 'Gepland',
'liveTv.noChannels' => 'Geen zenders beschikbaar',
'liveTv.noDvr' => 'Geen DVR geconfigureerd op een server',
'liveTv.tuneFailed' => 'Kan zender niet afstemmen',
'liveTv.loading' => 'Zenders laden...',
'liveTv.nowPlaying' => 'Nu aan het afspelen',
'liveTv.record' => 'Opnemen',
'liveTv.recordSeries' => 'Serie opnemen',
'liveTv.cancelRecording' => 'Opname annuleren',
'liveTv.deleteSubscription' => 'Opnameregel verwijderen',
'liveTv.deleteSubscriptionConfirm' => 'Weet je zeker dat je deze opnameregel wilt verwijderen?',
'liveTv.subscriptionDeleted' => 'Opnameregel verwijderd',
'liveTv.noPrograms' => 'Geen programmagegevens beschikbaar',
'liveTv.noRecordings' => 'Geen opnames gepland',
'liveTv.noSubscriptions' => 'Geen opnameregels',
'liveTv.channelNumber' => ({required Object number}) => 'Kanaal ${number}',
'liveTv.live' => 'LIVE',
'liveTv.hd' => 'HD',
'liveTv.premiere' => 'NIEUW',
'liveTv.reloadGuide' => 'Gids herladen',
'liveTv.guideReloaded' => 'Gidsgegevens herladen',
'liveTv.allChannels' => 'Alle zenders',
'liveTv.now' => 'Nu',
'liveTv.today' => 'Vandaag',
_ => null,
} ?? switch (path) {
'liveTv.midnight' => 'Middernacht',
'liveTv.overnight' => 'Nacht',
'liveTv.morning' => 'Ochtend',
@@ -1753,6 +1799,8 @@ extension on TranslationsNl {
'liveTv.evening' => 'Avond',
'liveTv.lateNight' => 'Late avond',
'liveTv.whatsOn' => 'Nu op TV',
_ => null,
} ?? switch (path) {
'liveTv.watchChannel' => 'Kanaal bekijken',
'downloads.title' => 'Downloads',
'downloads.manage' => 'Beheren',
@@ -1894,11 +1942,8 @@ extension on TranslationsNl {
'companionRemote.session.copyToClipboard' => 'Kopieer naar klembord',
'companionRemote.session.newSession' => 'Nieuwe sessie',
'companionRemote.session.minimize' => 'Minimaliseren',
'companionRemote.pairing.recent' => 'Recent',
'companionRemote.pairing.scan' => 'Scannen',
'companionRemote.pairing.manual' => 'Handmatig',
'companionRemote.pairing.recentConnections' => 'Recente verbindingen',
'companionRemote.pairing.quickReconnect' => 'Snel opnieuw verbinden met eerder gekoppelde apparaten',
'companionRemote.pairing.pairWithDesktop' => 'Koppelen met desktop',
'companionRemote.pairing.enterSessionDetails' => 'Voer de sessiegegevens in die op je desktop-apparaat worden getoond',
'companionRemote.pairing.hostAddressHint' => '192.168.1.100:48632',
@@ -1912,11 +1957,7 @@ extension on TranslationsNl {
'companionRemote.pairing.cameraPermissionRequired' => 'Cameratoestemming is vereist om QR-codes te scannen.\nGeef cameratoegang in je apparaatinstellingen.',
'companionRemote.pairing.cameraError' => ({required Object error}) => 'Kan camera niet starten: ${error}',
'companionRemote.pairing.scanInstruction' => 'Richt je camera op de QR-code die op je desktop wordt getoond',
'companionRemote.pairing.noRecentConnections' => 'Geen recente verbindingen',
'companionRemote.pairing.connectUsingManual' => 'Verbind met een apparaat via Handmatige invoer om te beginnen',
'companionRemote.pairing.invalidQrCode' => 'Ongeldig QR-codeformaat',
'companionRemote.pairing.removeRecentConnection' => 'Recente verbinding verwijderen',
'companionRemote.pairing.removeConfirm' => ({required Object name}) => '"${name}" verwijderen uit recente verbindingen?',
'companionRemote.pairing.validationHostRequired' => 'Voer een hostadres in',
'companionRemote.pairing.validationHostFormat' => 'Formaat moet IP:poort zijn (bijv. 192.168.1.100:48632)',
'companionRemote.pairing.validationSessionIdRequired' => 'Voer een sessie-ID in',
@@ -1926,7 +1967,6 @@ extension on TranslationsNl {
'companionRemote.pairing.connectionTimedOut' => 'Verbinding verlopen. Controleer de sessie-ID en PIN.',
'companionRemote.pairing.sessionNotFound' => 'Kan de sessie niet vinden. Controleer je gegevens.',
'companionRemote.pairing.failedToConnect' => ({required Object error}) => 'Verbinden mislukt: ${error}',
'companionRemote.pairing.failedToLoadRecent' => ({required Object error}) => 'Kan recente sessies niet laden: ${error}',
'companionRemote.remote.disconnectConfirm' => 'Wil je de verbinding met de externe sessie verbreken?',
'companionRemote.remote.reconnecting' => 'Opnieuw verbinden...',
'companionRemote.remote.attemptOf' => ({required Object current}) => 'Poging ${current} van 5',
@@ -1964,6 +2004,7 @@ extension on TranslationsNl {
'videoSettings.hdr' => 'HDR',
'videoSettings.audioOutput' => 'Audio-uitvoer',
'videoSettings.performanceOverlay' => 'Prestatie-overlay',
'videoSettings.audioPassthrough' => 'Audio-doorvoer',
'externalPlayer.title' => 'Externe speler',
'externalPlayer.useExternalPlayer' => 'Externe speler gebruiken',
'externalPlayer.useExternalPlayerDescription' => 'Open video\'s in een externe app in plaats van de ingebouwde speler',
@@ -1979,6 +2020,65 @@ extension on TranslationsNl {
'externalPlayer.launchFailed' => 'Kan externe speler niet openen',
'externalPlayer.appNotInstalled' => ({required Object name}) => '${name} is niet geïnstalleerd',
'externalPlayer.playInExternalPlayer' => 'Afspelen in externe speler',
'metadataEdit.editMetadata' => 'Bewerken...',
'metadataEdit.screenTitle' => 'Metadata bewerken',
'metadataEdit.basicInfo' => 'Basisinformatie',
'metadataEdit.artwork' => 'Artwork',
'metadataEdit.advancedSettings' => 'Geavanceerde instellingen',
'metadataEdit.title' => 'Titel',
'metadataEdit.sortTitle' => 'Sorteertitel',
'metadataEdit.originalTitle' => 'Oorspronkelijke titel',
'metadataEdit.releaseDate' => 'Releasedatum',
'metadataEdit.contentRating' => 'Leeftijdsclassificatie',
'metadataEdit.studio' => 'Studio',
'metadataEdit.tagline' => 'Tagline',
'metadataEdit.summary' => 'Samenvatting',
'metadataEdit.poster' => 'Poster',
'metadataEdit.background' => 'Achtergrond',
'metadataEdit.selectPoster' => 'Poster selecteren',
'metadataEdit.selectBackground' => 'Achtergrond selecteren',
'metadataEdit.fromUrl' => 'Vanaf URL',
'metadataEdit.uploadFile' => 'Bestand uploaden',
'metadataEdit.enterImageUrl' => 'Voer afbeeldings-URL in',
'metadataEdit.imageUrl' => 'Afbeeldings-URL',
'metadataEdit.metadataUpdated' => 'Metadata bijgewerkt',
'metadataEdit.metadataUpdateFailed' => 'Metadata bijwerken mislukt',
'metadataEdit.artworkUpdated' => 'Artwork bijgewerkt',
'metadataEdit.artworkUpdateFailed' => 'Artwork bijwerken mislukt',
'metadataEdit.noArtworkAvailable' => 'Geen artwork beschikbaar',
'metadataEdit.notSet' => 'Niet ingesteld',
'metadataEdit.libraryDefault' => 'Bibliotheekstandaard',
'metadataEdit.accountDefault' => 'Accountstandaard',
'metadataEdit.seriesDefault' => 'Seriestandaard',
'metadataEdit.episodeSorting' => 'Afleveringen sorteren',
'metadataEdit.oldestFirst' => 'Oudste eerst',
'metadataEdit.newestFirst' => 'Nieuwste eerst',
'metadataEdit.keep' => 'Bewaren',
'metadataEdit.allEpisodes' => 'Alle afleveringen',
'metadataEdit.latestEpisodes' => ({required Object count}) => '${count} nieuwste afleveringen',
'metadataEdit.latestEpisode' => 'Nieuwste aflevering',
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Afleveringen toegevoegd in de afgelopen ${count} dagen',
'metadataEdit.deleteAfterPlaying' => 'Afleveringen verwijderen na afspelen',
'metadataEdit.never' => 'Nooit',
'metadataEdit.afterADay' => 'Na een dag',
'metadataEdit.afterAWeek' => 'Na een week',
'metadataEdit.afterAMonth' => 'Na een maand',
'metadataEdit.onNextRefresh' => 'Bij volgende verversing',
'metadataEdit.seasons' => 'Seizoenen',
'metadataEdit.show' => 'Tonen',
'metadataEdit.hide' => 'Verbergen',
'metadataEdit.episodeOrdering' => 'Afleveringsvolgorde',
'metadataEdit.tmdbAiring' => 'The Movie Database (Uitgezonden)',
'metadataEdit.tvdbAiring' => 'TheTVDB (Uitgezonden)',
'metadataEdit.tvdbAbsolute' => 'TheTVDB (Absoluut)',
'metadataEdit.metadataLanguage' => 'Metadatataal',
'metadataEdit.useOriginalTitle' => 'Oorspronkelijke titel gebruiken',
'metadataEdit.preferredAudioLanguage' => 'Voorkeurstaal audio',
'metadataEdit.preferredSubtitleLanguage' => 'Voorkeurstaal ondertiteling',
'metadataEdit.subtitleMode' => 'Automatische ondertitelselectie',
'metadataEdit.manuallySelected' => 'Handmatig geselecteerd',
'metadataEdit.shownWithForeignAudio' => 'Weergeven bij anderstalig geluid',
'metadataEdit.alwaysEnabled' => 'Altijd ingeschakeld',
_ => null,
};
}
+142 -42
View File
@@ -74,6 +74,7 @@ class TranslationsSv with BaseTranslations<AppLocale, Translations> implements T
@override late final _TranslationsCompanionRemoteSv companionRemote = _TranslationsCompanionRemoteSv._(_root);
@override late final _TranslationsVideoSettingsSv videoSettings = _TranslationsVideoSettingsSv._(_root);
@override late final _TranslationsExternalPlayerSv externalPlayer = _TranslationsExternalPlayerSv._(_root);
@override late final _TranslationsMetadataEditSv metadataEdit = _TranslationsMetadataEditSv._(_root);
}
// Path: app
@@ -244,6 +245,8 @@ class _TranslationsSettingsSv implements TranslationsSettingsEn {
@override String get hardwareDecodingDescription => 'Använd hårdvaruacceleration när tillgängligt';
@override String get bufferSize => 'Bufferstorlek';
@override String bufferSizeMB({required Object size}) => '${size}MB';
@override String get bufferSizeAuto => 'Auto (Rekommenderat)';
@override String bufferSizeWarning({required Object heap, required Object size}) => 'Din enhet har ${heap}MB minne. En buffert på ${size}MB kan orsaka uppspelningsproblem.';
@override String get subtitleStyling => 'Undertext-styling';
@override String get subtitleStylingDescription => 'Anpassa undertextutseende';
@override String get smallSkipDuration => 'Kort hoppvaraktighet';
@@ -457,6 +460,9 @@ class _TranslationsVideoControlsSv implements TranslationsVideoControlsEn {
@override String get timerActive => 'Timer aktiv';
@override String playbackWillPauseIn({required Object duration}) => 'Uppspelningen pausas om ${duration}';
@override String get sleepTimerCompleted => 'Sovtimer slutförd - uppspelning pausad';
@override String get stillWatching => 'Tittar du fortfarande?';
@override String pausingIn({required Object seconds}) => 'Pausar om ${seconds}s';
@override String get continueWatching => 'Fortsätt';
@override String get autoPlayNext => 'Spela nästa automatiskt';
@override String get playNext => 'Spela nästa';
@override String get playButton => 'Spela';
@@ -791,29 +797,17 @@ class _TranslationsLiveTvSv implements TranslationsLiveTvEn {
@override String get title => 'Live-TV';
@override String get channels => 'Kanaler';
@override String get guide => 'Programguide';
@override String get recordings => 'Inspelningar';
@override String get subscriptions => 'Inspelningsregler';
@override String get scheduled => 'Schemalagda';
@override String get noChannels => 'Inga kanaler tillgängliga';
@override String get noDvr => 'Ingen DVR konfigurerad på någon server';
@override String get tuneFailed => 'Kunde inte ställa in kanalen';
@override String get loading => 'Laddar kanaler...';
@override String get nowPlaying => 'Spelas nu';
@override String get record => 'Spela in';
@override String get recordSeries => 'Spela in serie';
@override String get cancelRecording => 'Avbryt inspelning';
@override String get deleteSubscription => 'Ta bort inspelningsregel';
@override String get deleteSubscriptionConfirm => 'Är du säker på att du vill ta bort denna inspelningsregel?';
@override String get subscriptionDeleted => 'Inspelningsregel borttagen';
@override String get noPrograms => 'Ingen programdata tillgänglig';
@override String get noRecordings => 'Inga inspelningar schemalagda';
@override String get noSubscriptions => 'Inga inspelningsregler';
@override String channelNumber({required Object number}) => 'Kanal ${number}';
@override String get live => 'LIVE';
@override String get hd => 'HD';
@override String get premiere => 'NY';
@override String get reloadGuide => 'Ladda om programguide';
@override String get guideReloaded => 'Programdata omladdad';
@override String get allChannels => 'Alla kanaler';
@override String get now => 'Nu';
@override String get today => 'Idag';
@@ -1024,6 +1018,7 @@ class _TranslationsVideoSettingsSv implements TranslationsVideoSettingsEn {
@override String get hdr => 'HDR';
@override String get audioOutput => 'Ljudutgång';
@override String get performanceOverlay => 'Prestandaöverlägg';
@override String get audioPassthrough => 'Ljudgenomkoppling';
}
// Path: externalPlayer
@@ -1050,6 +1045,74 @@ class _TranslationsExternalPlayerSv implements TranslationsExternalPlayerEn {
@override String get playInExternalPlayer => 'Spela i extern spelare';
}
// Path: metadataEdit
class _TranslationsMetadataEditSv implements TranslationsMetadataEditEn {
_TranslationsMetadataEditSv._(this._root);
final TranslationsSv _root; // ignore: unused_field
// Translations
@override String get editMetadata => 'Redigera...';
@override String get screenTitle => 'Redigera metadata';
@override String get basicInfo => 'Grundläggande info';
@override String get artwork => 'Artwork';
@override String get advancedSettings => 'Avancerade inställningar';
@override String get title => 'Titel';
@override String get sortTitle => 'Sorteringstitel';
@override String get originalTitle => 'Originaltitel';
@override String get releaseDate => 'Utgivningsdatum';
@override String get contentRating => 'Åldersgräns';
@override String get studio => 'Studio';
@override String get tagline => 'Tagline';
@override String get summary => 'Sammanfattning';
@override String get poster => 'Poster';
@override String get background => 'Bakgrund';
@override String get selectPoster => 'Välj poster';
@override String get selectBackground => 'Välj bakgrund';
@override String get fromUrl => 'Från URL';
@override String get uploadFile => 'Ladda upp fil';
@override String get enterImageUrl => 'Ange bild-URL';
@override String get imageUrl => 'Bild-URL';
@override String get metadataUpdated => 'Metadata uppdaterad';
@override String get metadataUpdateFailed => 'Kunde inte uppdatera metadata';
@override String get artworkUpdated => 'Artwork uppdaterad';
@override String get artworkUpdateFailed => 'Kunde inte uppdatera artwork';
@override String get noArtworkAvailable => 'Ingen artwork tillgänglig';
@override String get notSet => 'Inte angiven';
@override String get libraryDefault => 'Biblioteksstandard';
@override String get accountDefault => 'Kontostandard';
@override String get seriesDefault => 'Seriestandard';
@override String get episodeSorting => 'Avsnittsortering';
@override String get oldestFirst => 'Äldst först';
@override String get newestFirst => 'Nyast först';
@override String get keep => 'Behåll';
@override String get allEpisodes => 'Alla avsnitt';
@override String latestEpisodes({required Object count}) => '${count} senaste avsnitten';
@override String get latestEpisode => 'Senaste avsnittet';
@override String episodesAddedPastDays({required Object count}) => 'Avsnitt tillagda de senaste ${count} dagarna';
@override String get deleteAfterPlaying => 'Ta bort avsnitt efter uppspelning';
@override String get never => 'Aldrig';
@override String get afterADay => 'Efter en dag';
@override String get afterAWeek => 'Efter en vecka';
@override String get afterAMonth => 'Efter en månad';
@override String get onNextRefresh => 'Vid nästa uppdatering';
@override String get seasons => 'Säsonger';
@override String get show => 'Visa';
@override String get hide => 'Dölj';
@override String get episodeOrdering => 'Avsnittsordning';
@override String get tmdbAiring => 'The Movie Database (Sändning)';
@override String get tvdbAiring => 'TheTVDB (Sändning)';
@override String get tvdbAbsolute => 'TheTVDB (Absolut)';
@override String get metadataLanguage => 'Metadataspråk';
@override String get useOriginalTitle => 'Använd originaltitel';
@override String get preferredAudioLanguage => 'Föredraget ljudspråk';
@override String get preferredSubtitleLanguage => 'Föredraget undertextspråk';
@override String get subtitleMode => 'Automatiskt val av undertexter';
@override String get manuallySelected => 'Manuellt vald';
@override String get shownWithForeignAudio => 'Visas vid främmande ljud';
@override String get alwaysEnabled => 'Alltid aktiverad';
}
// Path: hotkeys.actions
class _TranslationsHotkeysActionsSv implements TranslationsHotkeysActionsEn {
_TranslationsHotkeysActionsSv._(this._root);
@@ -1151,11 +1214,8 @@ class _TranslationsCompanionRemotePairingSv implements TranslationsCompanionRemo
final TranslationsSv _root; // ignore: unused_field
// Translations
@override String get recent => 'Senaste';
@override String get scan => 'Skanna';
@override String get manual => 'Manuell';
@override String get recentConnections => 'Senaste anslutningar';
@override String get quickReconnect => 'Återanslut snabbt till tidigare parkopplade enheter';
@override String get pairWithDesktop => 'Parkoppla med dator';
@override String get enterSessionDetails => 'Ange sessionsuppgifterna som visas på din datorenhet';
@override String get hostAddressHint => '192.168.1.100:48632';
@@ -1169,11 +1229,7 @@ class _TranslationsCompanionRemotePairingSv implements TranslationsCompanionRemo
@override String get cameraPermissionRequired => 'Kamerabehörighet krävs för att skanna QR-koder.\nVänligen ge kameraåtkomst i enhetsinställningarna.';
@override String cameraError({required Object error}) => 'Kunde inte starta kameran: ${error}';
@override String get scanInstruction => 'Rikta kameran mot QR-koden som visas på din dator';
@override String get noRecentConnections => 'Inga senaste anslutningar';
@override String get connectUsingManual => 'Anslut till en enhet via Manuell inmatning för att komma igång';
@override String get invalidQrCode => 'Ogiltigt QR-kodformat';
@override String get removeRecentConnection => 'Ta bort senaste anslutning';
@override String removeConfirm({required Object name}) => 'Ta bort "${name}" från senaste anslutningar?';
@override String get validationHostRequired => 'Ange en värdadress';
@override String get validationHostFormat => 'Format måste vara IP:port (t.ex. 192.168.1.100:48632)';
@override String get validationSessionIdRequired => 'Ange ett sessions-ID';
@@ -1183,7 +1239,6 @@ class _TranslationsCompanionRemotePairingSv implements TranslationsCompanionRemo
@override String get connectionTimedOut => 'Anslutningen tog för lång tid. Kontrollera sessions-ID och PIN.';
@override String get sessionNotFound => 'Kunde inte hitta sessionen. Kontrollera dina uppgifter.';
@override String failedToConnect({required Object error}) => 'Kunde inte ansluta: ${error}';
@override String failedToLoadRecent({required Object error}) => 'Kunde inte ladda senaste sessioner: ${error}';
}
// Path: companionRemote.remote
@@ -1348,6 +1403,8 @@ extension on TranslationsSv {
'settings.hardwareDecodingDescription' => 'Använd hårdvaruacceleration när tillgängligt',
'settings.bufferSize' => 'Bufferstorlek',
'settings.bufferSizeMB' => ({required Object size}) => '${size}MB',
'settings.bufferSizeAuto' => 'Auto (Rekommenderat)',
'settings.bufferSizeWarning' => ({required Object heap, required Object size}) => 'Din enhet har ${heap}MB minne. En buffert på ${size}MB kan orsaka uppspelningsproblem.',
'settings.subtitleStyling' => 'Undertext-styling',
'settings.subtitleStylingDescription' => 'Anpassa undertextutseende',
'settings.smallSkipDuration' => 'Kort hoppvaraktighet',
@@ -1507,6 +1564,9 @@ extension on TranslationsSv {
'videoControls.timerActive' => 'Timer aktiv',
'videoControls.playbackWillPauseIn' => ({required Object duration}) => 'Uppspelningen pausas om ${duration}',
'videoControls.sleepTimerCompleted' => 'Sovtimer slutförd - uppspelning pausad',
'videoControls.stillWatching' => 'Tittar du fortfarande?',
'videoControls.pausingIn' => ({required Object seconds}) => 'Pausar om ${seconds}s',
'videoControls.continueWatching' => 'Fortsätt',
'videoControls.autoPlayNext' => 'Spela nästa automatiskt',
'videoControls.playNext' => 'Spela nästa',
'videoControls.playButton' => 'Spela',
@@ -1718,34 +1778,20 @@ extension on TranslationsSv {
'liveTv.title' => 'Live-TV',
'liveTv.channels' => 'Kanaler',
'liveTv.guide' => 'Programguide',
'liveTv.recordings' => 'Inspelningar',
'liveTv.subscriptions' => 'Inspelningsregler',
'liveTv.scheduled' => 'Schemalagda',
'liveTv.noChannels' => 'Inga kanaler tillgängliga',
'liveTv.noDvr' => 'Ingen DVR konfigurerad på någon server',
'liveTv.tuneFailed' => 'Kunde inte ställa in kanalen',
'liveTv.loading' => 'Laddar kanaler...',
'liveTv.nowPlaying' => 'Spelas nu',
'liveTv.record' => 'Spela in',
'liveTv.recordSeries' => 'Spela in serie',
'liveTv.cancelRecording' => 'Avbryt inspelning',
'liveTv.deleteSubscription' => 'Ta bort inspelningsregel',
'liveTv.deleteSubscriptionConfirm' => 'Är du säker på att du vill ta bort denna inspelningsregel?',
'liveTv.subscriptionDeleted' => 'Inspelningsregel borttagen',
'liveTv.noPrograms' => 'Ingen programdata tillgänglig',
'liveTv.noRecordings' => 'Inga inspelningar schemalagda',
'liveTv.noSubscriptions' => 'Inga inspelningsregler',
'liveTv.channelNumber' => ({required Object number}) => 'Kanal ${number}',
'liveTv.live' => 'LIVE',
'liveTv.hd' => 'HD',
'liveTv.premiere' => 'NY',
'liveTv.reloadGuide' => 'Ladda om programguide',
'liveTv.guideReloaded' => 'Programdata omladdad',
'liveTv.allChannels' => 'Alla kanaler',
'liveTv.now' => 'Nu',
'liveTv.today' => 'Idag',
_ => null,
} ?? switch (path) {
'liveTv.midnight' => 'Midnatt',
'liveTv.overnight' => 'Natt',
'liveTv.morning' => 'Morgon',
@@ -1753,6 +1799,8 @@ extension on TranslationsSv {
'liveTv.evening' => 'Kväll',
'liveTv.lateNight' => 'Sen kväll',
'liveTv.whatsOn' => 'På TV nu',
_ => null,
} ?? switch (path) {
'liveTv.watchChannel' => 'Titta på kanal',
'downloads.title' => 'Nedladdningar',
'downloads.manage' => 'Hantera',
@@ -1894,11 +1942,8 @@ extension on TranslationsSv {
'companionRemote.session.copyToClipboard' => 'Kopiera till urklipp',
'companionRemote.session.newSession' => 'Ny session',
'companionRemote.session.minimize' => 'Minimera',
'companionRemote.pairing.recent' => 'Senaste',
'companionRemote.pairing.scan' => 'Skanna',
'companionRemote.pairing.manual' => 'Manuell',
'companionRemote.pairing.recentConnections' => 'Senaste anslutningar',
'companionRemote.pairing.quickReconnect' => 'Återanslut snabbt till tidigare parkopplade enheter',
'companionRemote.pairing.pairWithDesktop' => 'Parkoppla med dator',
'companionRemote.pairing.enterSessionDetails' => 'Ange sessionsuppgifterna som visas på din datorenhet',
'companionRemote.pairing.hostAddressHint' => '192.168.1.100:48632',
@@ -1912,11 +1957,7 @@ extension on TranslationsSv {
'companionRemote.pairing.cameraPermissionRequired' => 'Kamerabehörighet krävs för att skanna QR-koder.\nVänligen ge kameraåtkomst i enhetsinställningarna.',
'companionRemote.pairing.cameraError' => ({required Object error}) => 'Kunde inte starta kameran: ${error}',
'companionRemote.pairing.scanInstruction' => 'Rikta kameran mot QR-koden som visas på din dator',
'companionRemote.pairing.noRecentConnections' => 'Inga senaste anslutningar',
'companionRemote.pairing.connectUsingManual' => 'Anslut till en enhet via Manuell inmatning för att komma igång',
'companionRemote.pairing.invalidQrCode' => 'Ogiltigt QR-kodformat',
'companionRemote.pairing.removeRecentConnection' => 'Ta bort senaste anslutning',
'companionRemote.pairing.removeConfirm' => ({required Object name}) => 'Ta bort "${name}" från senaste anslutningar?',
'companionRemote.pairing.validationHostRequired' => 'Ange en värdadress',
'companionRemote.pairing.validationHostFormat' => 'Format måste vara IP:port (t.ex. 192.168.1.100:48632)',
'companionRemote.pairing.validationSessionIdRequired' => 'Ange ett sessions-ID',
@@ -1926,7 +1967,6 @@ extension on TranslationsSv {
'companionRemote.pairing.connectionTimedOut' => 'Anslutningen tog för lång tid. Kontrollera sessions-ID och PIN.',
'companionRemote.pairing.sessionNotFound' => 'Kunde inte hitta sessionen. Kontrollera dina uppgifter.',
'companionRemote.pairing.failedToConnect' => ({required Object error}) => 'Kunde inte ansluta: ${error}',
'companionRemote.pairing.failedToLoadRecent' => ({required Object error}) => 'Kunde inte ladda senaste sessioner: ${error}',
'companionRemote.remote.disconnectConfirm' => 'Vill du koppla från fjärrsessionen?',
'companionRemote.remote.reconnecting' => 'Återansluter...',
'companionRemote.remote.attemptOf' => ({required Object current}) => 'Försök ${current} av 5',
@@ -1964,6 +2004,7 @@ extension on TranslationsSv {
'videoSettings.hdr' => 'HDR',
'videoSettings.audioOutput' => 'Ljudutgång',
'videoSettings.performanceOverlay' => 'Prestandaöverlägg',
'videoSettings.audioPassthrough' => 'Ljudgenomkoppling',
'externalPlayer.title' => 'Extern spelare',
'externalPlayer.useExternalPlayer' => 'Använd extern spelare',
'externalPlayer.useExternalPlayerDescription' => 'Öppna videor i en extern app istället för den inbyggda spelaren',
@@ -1979,6 +2020,65 @@ extension on TranslationsSv {
'externalPlayer.launchFailed' => 'Kunde inte öppna extern spelare',
'externalPlayer.appNotInstalled' => ({required Object name}) => '${name} är inte installerad',
'externalPlayer.playInExternalPlayer' => 'Spela i extern spelare',
'metadataEdit.editMetadata' => 'Redigera...',
'metadataEdit.screenTitle' => 'Redigera metadata',
'metadataEdit.basicInfo' => 'Grundläggande info',
'metadataEdit.artwork' => 'Artwork',
'metadataEdit.advancedSettings' => 'Avancerade inställningar',
'metadataEdit.title' => 'Titel',
'metadataEdit.sortTitle' => 'Sorteringstitel',
'metadataEdit.originalTitle' => 'Originaltitel',
'metadataEdit.releaseDate' => 'Utgivningsdatum',
'metadataEdit.contentRating' => 'Åldersgräns',
'metadataEdit.studio' => 'Studio',
'metadataEdit.tagline' => 'Tagline',
'metadataEdit.summary' => 'Sammanfattning',
'metadataEdit.poster' => 'Poster',
'metadataEdit.background' => 'Bakgrund',
'metadataEdit.selectPoster' => 'Välj poster',
'metadataEdit.selectBackground' => 'Välj bakgrund',
'metadataEdit.fromUrl' => 'Från URL',
'metadataEdit.uploadFile' => 'Ladda upp fil',
'metadataEdit.enterImageUrl' => 'Ange bild-URL',
'metadataEdit.imageUrl' => 'Bild-URL',
'metadataEdit.metadataUpdated' => 'Metadata uppdaterad',
'metadataEdit.metadataUpdateFailed' => 'Kunde inte uppdatera metadata',
'metadataEdit.artworkUpdated' => 'Artwork uppdaterad',
'metadataEdit.artworkUpdateFailed' => 'Kunde inte uppdatera artwork',
'metadataEdit.noArtworkAvailable' => 'Ingen artwork tillgänglig',
'metadataEdit.notSet' => 'Inte angiven',
'metadataEdit.libraryDefault' => 'Biblioteksstandard',
'metadataEdit.accountDefault' => 'Kontostandard',
'metadataEdit.seriesDefault' => 'Seriestandard',
'metadataEdit.episodeSorting' => 'Avsnittsortering',
'metadataEdit.oldestFirst' => 'Äldst först',
'metadataEdit.newestFirst' => 'Nyast först',
'metadataEdit.keep' => 'Behåll',
'metadataEdit.allEpisodes' => 'Alla avsnitt',
'metadataEdit.latestEpisodes' => ({required Object count}) => '${count} senaste avsnitten',
'metadataEdit.latestEpisode' => 'Senaste avsnittet',
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => 'Avsnitt tillagda de senaste ${count} dagarna',
'metadataEdit.deleteAfterPlaying' => 'Ta bort avsnitt efter uppspelning',
'metadataEdit.never' => 'Aldrig',
'metadataEdit.afterADay' => 'Efter en dag',
'metadataEdit.afterAWeek' => 'Efter en vecka',
'metadataEdit.afterAMonth' => 'Efter en månad',
'metadataEdit.onNextRefresh' => 'Vid nästa uppdatering',
'metadataEdit.seasons' => 'Säsonger',
'metadataEdit.show' => 'Visa',
'metadataEdit.hide' => 'Dölj',
'metadataEdit.episodeOrdering' => 'Avsnittsordning',
'metadataEdit.tmdbAiring' => 'The Movie Database (Sändning)',
'metadataEdit.tvdbAiring' => 'TheTVDB (Sändning)',
'metadataEdit.tvdbAbsolute' => 'TheTVDB (Absolut)',
'metadataEdit.metadataLanguage' => 'Metadataspråk',
'metadataEdit.useOriginalTitle' => 'Använd originaltitel',
'metadataEdit.preferredAudioLanguage' => 'Föredraget ljudspråk',
'metadataEdit.preferredSubtitleLanguage' => 'Föredraget undertextspråk',
'metadataEdit.subtitleMode' => 'Automatiskt val av undertexter',
'metadataEdit.manuallySelected' => 'Manuellt vald',
'metadataEdit.shownWithForeignAudio' => 'Visas vid främmande ljud',
'metadataEdit.alwaysEnabled' => 'Alltid aktiverad',
_ => null,
};
}
+142 -42
View File
@@ -74,6 +74,7 @@ class TranslationsZh with BaseTranslations<AppLocale, Translations> implements T
@override late final _TranslationsCompanionRemoteZh companionRemote = _TranslationsCompanionRemoteZh._(_root);
@override late final _TranslationsVideoSettingsZh videoSettings = _TranslationsVideoSettingsZh._(_root);
@override late final _TranslationsExternalPlayerZh externalPlayer = _TranslationsExternalPlayerZh._(_root);
@override late final _TranslationsMetadataEditZh metadataEdit = _TranslationsMetadataEditZh._(_root);
}
// Path: app
@@ -244,6 +245,8 @@ class _TranslationsSettingsZh implements TranslationsSettingsEn {
@override String get hardwareDecodingDescription => '如果可用,使用硬件加速';
@override String get bufferSize => '缓冲区大小';
@override String bufferSizeMB({required Object size}) => '${size}MB';
@override String get bufferSizeAuto => '自动(推荐)';
@override String bufferSizeWarning({required Object heap, required Object size}) => '您的设备有 ${heap}MB 内存。${size}MB 的缓冲区可能导致播放问题。';
@override String get subtitleStyling => '字幕样式';
@override String get subtitleStylingDescription => '调整字幕外观';
@override String get smallSkipDuration => '短跳过时长';
@@ -457,6 +460,9 @@ class _TranslationsVideoControlsZh implements TranslationsVideoControlsEn {
@override String get timerActive => '定时器已激活';
@override String playbackWillPauseIn({required Object duration}) => '播放将在 ${duration} 后暂停';
@override String get sleepTimerCompleted => '睡眠定时器已完成 - 播放已暂停';
@override String get stillWatching => '还在看吗?';
@override String pausingIn({required Object seconds}) => '${seconds}秒后暂停';
@override String get continueWatching => '继续';
@override String get autoPlayNext => '自动播放下一集';
@override String get playNext => '播放下一集';
@override String get playButton => '播放';
@@ -791,29 +797,17 @@ class _TranslationsLiveTvZh implements TranslationsLiveTvEn {
@override String get title => '电视直播';
@override String get channels => '频道';
@override String get guide => '节目指南';
@override String get recordings => '录制';
@override String get subscriptions => '录制规则';
@override String get scheduled => '已计划';
@override String get noChannels => '没有可用的频道';
@override String get noDvr => '没有服务器配置了DVR';
@override String get tuneFailed => '无法调谐频道';
@override String get loading => '正在加载频道...';
@override String get nowPlaying => '正在播放';
@override String get record => '录制';
@override String get recordSeries => '录制系列';
@override String get cancelRecording => '取消录制';
@override String get deleteSubscription => '删除录制规则';
@override String get deleteSubscriptionConfirm => '确定要删除此录制规则吗?';
@override String get subscriptionDeleted => '录制规则已删除';
@override String get noPrograms => '没有可用的节目数据';
@override String get noRecordings => '没有计划的录制';
@override String get noSubscriptions => '没有录制规则';
@override String channelNumber({required Object number}) => '频道 ${number}';
@override String get live => '直播';
@override String get hd => '高清';
@override String get premiere => '新';
@override String get reloadGuide => '重新加载节目指南';
@override String get guideReloaded => '节目指南已重新加载';
@override String get allChannels => '所有频道';
@override String get now => '现在';
@override String get today => '今天';
@@ -1024,6 +1018,7 @@ class _TranslationsVideoSettingsZh implements TranslationsVideoSettingsEn {
@override String get hdr => 'HDR';
@override String get audioOutput => '音频输出';
@override String get performanceOverlay => '性能监控';
@override String get audioPassthrough => '音频直通';
}
// Path: externalPlayer
@@ -1050,6 +1045,74 @@ class _TranslationsExternalPlayerZh implements TranslationsExternalPlayerEn {
@override String get playInExternalPlayer => '在外部播放器中播放';
}
// Path: metadataEdit
class _TranslationsMetadataEditZh implements TranslationsMetadataEditEn {
_TranslationsMetadataEditZh._(this._root);
final TranslationsZh _root; // ignore: unused_field
// Translations
@override String get editMetadata => '编辑...';
@override String get screenTitle => '编辑元数据';
@override String get basicInfo => '基本信息';
@override String get artwork => '封面图片';
@override String get advancedSettings => '高级设置';
@override String get title => '标题';
@override String get sortTitle => '排序标题';
@override String get originalTitle => '原始标题';
@override String get releaseDate => '上映日期';
@override String get contentRating => '内容分级';
@override String get studio => '制片厂';
@override String get tagline => '标语';
@override String get summary => '简介';
@override String get poster => '海报';
@override String get background => '背景';
@override String get selectPoster => '选择海报';
@override String get selectBackground => '选择背景';
@override String get fromUrl => '从 URL';
@override String get uploadFile => '上传文件';
@override String get enterImageUrl => '输入图片 URL';
@override String get imageUrl => '图片 URL';
@override String get metadataUpdated => '元数据已更新';
@override String get metadataUpdateFailed => '元数据更新失败';
@override String get artworkUpdated => '封面图片已更新';
@override String get artworkUpdateFailed => '封面图片更新失败';
@override String get noArtworkAvailable => '没有可用的封面图片';
@override String get notSet => '未设置';
@override String get libraryDefault => '媒体库默认';
@override String get accountDefault => '账户默认';
@override String get seriesDefault => '剧集默认';
@override String get episodeSorting => '剧集排序';
@override String get oldestFirst => '最旧优先';
@override String get newestFirst => '最新优先';
@override String get keep => '保留';
@override String get allEpisodes => '所有剧集';
@override String latestEpisodes({required Object count}) => '最新 ${count} 集';
@override String get latestEpisode => '最新一集';
@override String episodesAddedPastDays({required Object count}) => '过去 ${count} 天内添加的剧集';
@override String get deleteAfterPlaying => '播放后删除剧集';
@override String get never => '从不';
@override String get afterADay => '一天后';
@override String get afterAWeek => '一周后';
@override String get afterAMonth => '一个月后';
@override String get onNextRefresh => '下次刷新时';
@override String get seasons => '季';
@override String get show => '显示';
@override String get hide => '隐藏';
@override String get episodeOrdering => '剧集排列顺序';
@override String get tmdbAiring => 'The Movie Database(播出顺序)';
@override String get tvdbAiring => 'TheTVDB(播出顺序)';
@override String get tvdbAbsolute => 'TheTVDB(绝对顺序)';
@override String get metadataLanguage => '元数据语言';
@override String get useOriginalTitle => '使用原始标题';
@override String get preferredAudioLanguage => '首选音频语言';
@override String get preferredSubtitleLanguage => '首选字幕语言';
@override String get subtitleMode => '自动选择字幕模式';
@override String get manuallySelected => '手动选择';
@override String get shownWithForeignAudio => '外语音频时显示';
@override String get alwaysEnabled => '始终启用';
}
// Path: hotkeys.actions
class _TranslationsHotkeysActionsZh implements TranslationsHotkeysActionsEn {
_TranslationsHotkeysActionsZh._(this._root);
@@ -1151,11 +1214,8 @@ class _TranslationsCompanionRemotePairingZh implements TranslationsCompanionRemo
final TranslationsZh _root; // ignore: unused_field
// Translations
@override String get recent => '最近';
@override String get scan => '扫描';
@override String get manual => '手动';
@override String get recentConnections => '最近连接';
@override String get quickReconnect => '快速重新连接之前配对的设备';
@override String get pairWithDesktop => '与桌面配对';
@override String get enterSessionDetails => '输入桌面设备上显示的会话信息';
@override String get hostAddressHint => '192.168.1.100:48632';
@@ -1169,11 +1229,7 @@ class _TranslationsCompanionRemotePairingZh implements TranslationsCompanionRemo
@override String get cameraPermissionRequired => '扫描 QR 码需要相机权限。\n请在设备设置中授予相机访问权限。';
@override String cameraError({required Object error}) => '无法启动相机:${error}';
@override String get scanInstruction => '将相机对准桌面上显示的 QR 码';
@override String get noRecentConnections => '没有最近的连接';
@override String get connectUsingManual => '使用手动输入连接设备以开始使用';
@override String get invalidQrCode => '无效的 QR 码格式';
@override String get removeRecentConnection => '删除最近连接';
@override String removeConfirm({required Object name}) => '确定要从最近连接中删除 "${name}" 吗?';
@override String get validationHostRequired => '请输入主机地址';
@override String get validationHostFormat => '格式必须为 IP:端口(例如 192.168.1.100:48632)';
@override String get validationSessionIdRequired => '请输入会话 ID';
@@ -1183,7 +1239,6 @@ class _TranslationsCompanionRemotePairingZh implements TranslationsCompanionRemo
@override String get connectionTimedOut => '连接超时。请检查会话 ID 和 PIN。';
@override String get sessionNotFound => '找不到会话。请检查您的凭据。';
@override String failedToConnect({required Object error}) => '连接失败:${error}';
@override String failedToLoadRecent({required Object error}) => '加载最近会话失败:${error}';
}
// Path: companionRemote.remote
@@ -1348,6 +1403,8 @@ extension on TranslationsZh {
'settings.hardwareDecodingDescription' => '如果可用,使用硬件加速',
'settings.bufferSize' => '缓冲区大小',
'settings.bufferSizeMB' => ({required Object size}) => '${size}MB',
'settings.bufferSizeAuto' => '自动(推荐)',
'settings.bufferSizeWarning' => ({required Object heap, required Object size}) => '您的设备有 ${heap}MB 内存。${size}MB 的缓冲区可能导致播放问题。',
'settings.subtitleStyling' => '字幕样式',
'settings.subtitleStylingDescription' => '调整字幕外观',
'settings.smallSkipDuration' => '短跳过时长',
@@ -1507,6 +1564,9 @@ extension on TranslationsZh {
'videoControls.timerActive' => '定时器已激活',
'videoControls.playbackWillPauseIn' => ({required Object duration}) => '播放将在 ${duration} 后暂停',
'videoControls.sleepTimerCompleted' => '睡眠定时器已完成 - 播放已暂停',
'videoControls.stillWatching' => '还在看吗?',
'videoControls.pausingIn' => ({required Object seconds}) => '${seconds}秒后暂停',
'videoControls.continueWatching' => '继续',
'videoControls.autoPlayNext' => '自动播放下一集',
'videoControls.playNext' => '播放下一集',
'videoControls.playButton' => '播放',
@@ -1718,34 +1778,20 @@ extension on TranslationsZh {
'liveTv.title' => '电视直播',
'liveTv.channels' => '频道',
'liveTv.guide' => '节目指南',
'liveTv.recordings' => '录制',
'liveTv.subscriptions' => '录制规则',
'liveTv.scheduled' => '已计划',
'liveTv.noChannels' => '没有可用的频道',
'liveTv.noDvr' => '没有服务器配置了DVR',
'liveTv.tuneFailed' => '无法调谐频道',
'liveTv.loading' => '正在加载频道...',
'liveTv.nowPlaying' => '正在播放',
'liveTv.record' => '录制',
'liveTv.recordSeries' => '录制系列',
'liveTv.cancelRecording' => '取消录制',
'liveTv.deleteSubscription' => '删除录制规则',
'liveTv.deleteSubscriptionConfirm' => '确定要删除此录制规则吗?',
'liveTv.subscriptionDeleted' => '录制规则已删除',
'liveTv.noPrograms' => '没有可用的节目数据',
'liveTv.noRecordings' => '没有计划的录制',
'liveTv.noSubscriptions' => '没有录制规则',
'liveTv.channelNumber' => ({required Object number}) => '频道 ${number}',
'liveTv.live' => '直播',
'liveTv.hd' => '高清',
'liveTv.premiere' => '新',
'liveTv.reloadGuide' => '重新加载节目指南',
'liveTv.guideReloaded' => '节目指南已重新加载',
'liveTv.allChannels' => '所有频道',
'liveTv.now' => '现在',
'liveTv.today' => '今天',
_ => null,
} ?? switch (path) {
'liveTv.midnight' => '午夜',
'liveTv.overnight' => '凌晨',
'liveTv.morning' => '上午',
@@ -1753,6 +1799,8 @@ extension on TranslationsZh {
'liveTv.evening' => '晚上',
'liveTv.lateNight' => '深夜',
'liveTv.whatsOn' => '正在播出',
_ => null,
} ?? switch (path) {
'liveTv.watchChannel' => '观看频道',
'downloads.title' => '下载',
'downloads.manage' => '管理',
@@ -1894,11 +1942,8 @@ extension on TranslationsZh {
'companionRemote.session.copyToClipboard' => '复制到剪贴板',
'companionRemote.session.newSession' => '新建会话',
'companionRemote.session.minimize' => '最小化',
'companionRemote.pairing.recent' => '最近',
'companionRemote.pairing.scan' => '扫描',
'companionRemote.pairing.manual' => '手动',
'companionRemote.pairing.recentConnections' => '最近连接',
'companionRemote.pairing.quickReconnect' => '快速重新连接之前配对的设备',
'companionRemote.pairing.pairWithDesktop' => '与桌面配对',
'companionRemote.pairing.enterSessionDetails' => '输入桌面设备上显示的会话信息',
'companionRemote.pairing.hostAddressHint' => '192.168.1.100:48632',
@@ -1912,11 +1957,7 @@ extension on TranslationsZh {
'companionRemote.pairing.cameraPermissionRequired' => '扫描 QR 码需要相机权限。\n请在设备设置中授予相机访问权限。',
'companionRemote.pairing.cameraError' => ({required Object error}) => '无法启动相机:${error}',
'companionRemote.pairing.scanInstruction' => '将相机对准桌面上显示的 QR 码',
'companionRemote.pairing.noRecentConnections' => '没有最近的连接',
'companionRemote.pairing.connectUsingManual' => '使用手动输入连接设备以开始使用',
'companionRemote.pairing.invalidQrCode' => '无效的 QR 码格式',
'companionRemote.pairing.removeRecentConnection' => '删除最近连接',
'companionRemote.pairing.removeConfirm' => ({required Object name}) => '确定要从最近连接中删除 "${name}" 吗?',
'companionRemote.pairing.validationHostRequired' => '请输入主机地址',
'companionRemote.pairing.validationHostFormat' => '格式必须为 IP:端口(例如 192.168.1.100:48632)',
'companionRemote.pairing.validationSessionIdRequired' => '请输入会话 ID',
@@ -1926,7 +1967,6 @@ extension on TranslationsZh {
'companionRemote.pairing.connectionTimedOut' => '连接超时。请检查会话 ID 和 PIN。',
'companionRemote.pairing.sessionNotFound' => '找不到会话。请检查您的凭据。',
'companionRemote.pairing.failedToConnect' => ({required Object error}) => '连接失败:${error}',
'companionRemote.pairing.failedToLoadRecent' => ({required Object error}) => '加载最近会话失败:${error}',
'companionRemote.remote.disconnectConfirm' => '是否要断开远程会话的连接?',
'companionRemote.remote.reconnecting' => '重新连接中...',
'companionRemote.remote.attemptOf' => ({required Object current}) => '第 ${current} 次尝试,共 5 次',
@@ -1964,6 +2004,7 @@ extension on TranslationsZh {
'videoSettings.hdr' => 'HDR',
'videoSettings.audioOutput' => '音频输出',
'videoSettings.performanceOverlay' => '性能监控',
'videoSettings.audioPassthrough' => '音频直通',
'externalPlayer.title' => '外部播放器',
'externalPlayer.useExternalPlayer' => '使用外部播放器',
'externalPlayer.useExternalPlayerDescription' => '在外部应用中打开视频,而不是使用内置播放器',
@@ -1979,6 +2020,65 @@ extension on TranslationsZh {
'externalPlayer.launchFailed' => '无法打开外部播放器',
'externalPlayer.appNotInstalled' => ({required Object name}) => '${name} 未安装',
'externalPlayer.playInExternalPlayer' => '在外部播放器中播放',
'metadataEdit.editMetadata' => '编辑...',
'metadataEdit.screenTitle' => '编辑元数据',
'metadataEdit.basicInfo' => '基本信息',
'metadataEdit.artwork' => '封面图片',
'metadataEdit.advancedSettings' => '高级设置',
'metadataEdit.title' => '标题',
'metadataEdit.sortTitle' => '排序标题',
'metadataEdit.originalTitle' => '原始标题',
'metadataEdit.releaseDate' => '上映日期',
'metadataEdit.contentRating' => '内容分级',
'metadataEdit.studio' => '制片厂',
'metadataEdit.tagline' => '标语',
'metadataEdit.summary' => '简介',
'metadataEdit.poster' => '海报',
'metadataEdit.background' => '背景',
'metadataEdit.selectPoster' => '选择海报',
'metadataEdit.selectBackground' => '选择背景',
'metadataEdit.fromUrl' => '从 URL',
'metadataEdit.uploadFile' => '上传文件',
'metadataEdit.enterImageUrl' => '输入图片 URL',
'metadataEdit.imageUrl' => '图片 URL',
'metadataEdit.metadataUpdated' => '元数据已更新',
'metadataEdit.metadataUpdateFailed' => '元数据更新失败',
'metadataEdit.artworkUpdated' => '封面图片已更新',
'metadataEdit.artworkUpdateFailed' => '封面图片更新失败',
'metadataEdit.noArtworkAvailable' => '没有可用的封面图片',
'metadataEdit.notSet' => '未设置',
'metadataEdit.libraryDefault' => '媒体库默认',
'metadataEdit.accountDefault' => '账户默认',
'metadataEdit.seriesDefault' => '剧集默认',
'metadataEdit.episodeSorting' => '剧集排序',
'metadataEdit.oldestFirst' => '最旧优先',
'metadataEdit.newestFirst' => '最新优先',
'metadataEdit.keep' => '保留',
'metadataEdit.allEpisodes' => '所有剧集',
'metadataEdit.latestEpisodes' => ({required Object count}) => '最新 ${count} 集',
'metadataEdit.latestEpisode' => '最新一集',
'metadataEdit.episodesAddedPastDays' => ({required Object count}) => '过去 ${count} 天内添加的剧集',
'metadataEdit.deleteAfterPlaying' => '播放后删除剧集',
'metadataEdit.never' => '从不',
'metadataEdit.afterADay' => '一天后',
'metadataEdit.afterAWeek' => '一周后',
'metadataEdit.afterAMonth' => '一个月后',
'metadataEdit.onNextRefresh' => '下次刷新时',
'metadataEdit.seasons' => '季',
'metadataEdit.show' => '显示',
'metadataEdit.hide' => '隐藏',
'metadataEdit.episodeOrdering' => '剧集排列顺序',
'metadataEdit.tmdbAiring' => 'The Movie Database(播出顺序)',
'metadataEdit.tvdbAiring' => 'TheTVDB(播出顺序)',
'metadataEdit.tvdbAbsolute' => 'TheTVDB(绝对顺序)',
'metadataEdit.metadataLanguage' => '元数据语言',
'metadataEdit.useOriginalTitle' => '使用原始标题',
'metadataEdit.preferredAudioLanguage' => '首选音频语言',
'metadataEdit.preferredSubtitleLanguage' => '首选字幕语言',
'metadataEdit.subtitleMode' => '自动选择字幕模式',
'metadataEdit.manuallySelected' => '手动选择',
'metadataEdit.shownWithForeignAudio' => '外语音频时显示',
'metadataEdit.alwaysEnabled' => '始终启用',
_ => null,
};
}
+70 -23
View File
@@ -1,7 +1,7 @@
{
"app": {
"title": "Plezy"
},
},
"auth": {
"signInWithPlex": "Logga in med Plex",
"showQRCode": "Visa QR-kod",
@@ -126,6 +126,8 @@
"hardwareDecodingDescription": "Använd hårdvaruacceleration när tillgängligt",
"bufferSize": "Bufferstorlek",
"bufferSizeMB": "${size}MB",
"bufferSizeAuto": "Auto (Rekommenderat)",
"bufferSizeWarning": "Din enhet har ${heap}MB minne. En buffert på ${size}MB kan orsaka uppspelningsproblem.",
"subtitleStyling": "Undertext-styling",
"subtitleStylingDescription": "Anpassa undertextutseende",
"smallSkipDuration": "Kort hoppvaraktighet",
@@ -303,6 +305,9 @@
"timerActive": "Timer aktiv",
"playbackWillPauseIn": "Uppspelningen pausas om ${duration}",
"sleepTimerCompleted": "Sovtimer slutförd - uppspelning pausad",
"stillWatching": "Tittar du fortfarande?",
"pausingIn": "Pausar om ${seconds}s",
"continueWatching": "Fortsätt",
"autoPlayNext": "Spela nästa automatiskt",
"playNext": "Spela nästa",
"playButton": "Spela",
@@ -550,29 +555,17 @@
"title": "Live-TV",
"channels": "Kanaler",
"guide": "Programguide",
"recordings": "Inspelningar",
"subscriptions": "Inspelningsregler",
"scheduled": "Schemalagda",
"noChannels": "Inga kanaler tillgängliga",
"noDvr": "Ingen DVR konfigurerad på någon server",
"tuneFailed": "Kunde inte ställa in kanalen",
"loading": "Laddar kanaler...",
"nowPlaying": "Spelas nu",
"record": "Spela in",
"recordSeries": "Spela in serie",
"cancelRecording": "Avbryt inspelning",
"deleteSubscription": "Ta bort inspelningsregel",
"deleteSubscriptionConfirm": "Är du säker på att du vill ta bort denna inspelningsregel?",
"subscriptionDeleted": "Inspelningsregel borttagen",
"noPrograms": "Ingen programdata tillgänglig",
"noRecordings": "Inga inspelningar schemalagda",
"noSubscriptions": "Inga inspelningsregler",
"channelNumber": "Kanal ${number}",
"live": "LIVE",
"hd": "HD",
"premiere": "NY",
"reloadGuide": "Ladda om programguide",
"guideReloaded": "Programdata omladdad",
"allChannels": "Alla kanaler",
"now": "Nu",
"today": "Idag",
@@ -739,11 +732,8 @@
"minimize": "Minimera"
},
"pairing": {
"recent": "Senaste",
"scan": "Skanna",
"manual": "Manuell",
"recentConnections": "Senaste anslutningar",
"quickReconnect": "Återanslut snabbt till tidigare parkopplade enheter",
"pairWithDesktop": "Parkoppla med dator",
"enterSessionDetails": "Ange sessionsuppgifterna som visas på din datorenhet",
"hostAddressHint": "192.168.1.100:48632",
@@ -757,11 +747,7 @@
"cameraPermissionRequired": "Kamerabehörighet krävs för att skanna QR-koder.\nVänligen ge kameraåtkomst i enhetsinställningarna.",
"cameraError": "Kunde inte starta kameran: ${error}",
"scanInstruction": "Rikta kameran mot QR-koden som visas på din dator",
"noRecentConnections": "Inga senaste anslutningar",
"connectUsingManual": "Anslut till en enhet via Manuell inmatning för att komma igång",
"invalidQrCode": "Ogiltigt QR-kodformat",
"removeRecentConnection": "Ta bort senaste anslutning",
"removeConfirm": "Ta bort \"${name}\" från senaste anslutningar?",
"validationHostRequired": "Ange en värdadress",
"validationHostFormat": "Format måste vara IP:port (t.ex. 192.168.1.100:48632)",
"validationSessionIdRequired": "Ange ett sessions-ID",
@@ -770,8 +756,7 @@
"validationPinLength": "PIN måste vara 6 siffror",
"connectionTimedOut": "Anslutningen tog för lång tid. Kontrollera sessions-ID och PIN.",
"sessionNotFound": "Kunde inte hitta sessionen. Kontrollera dina uppgifter.",
"failedToConnect": "Kunde inte ansluta: ${error}",
"failedToLoadRecent": "Kunde inte ladda senaste sessioner: ${error}"
"failedToConnect": "Kunde inte ansluta: ${error}"
},
"remote": {
"disconnectConfirm": "Vill du koppla från fjärrsessionen?",
@@ -813,7 +798,8 @@
"subtitleSync": "Undertextsynkronisering",
"hdr": "HDR",
"audioOutput": "Ljudutgång",
"performanceOverlay": "Prestandaöverlägg"
"performanceOverlay": "Prestandaöverlägg",
"audioPassthrough": "Ljudgenomkoppling"
},
"externalPlayer": {
"title": "Extern spelare",
@@ -831,5 +817,66 @@
"launchFailed": "Kunde inte öppna extern spelare",
"appNotInstalled": "${name} är inte installerad",
"playInExternalPlayer": "Spela i extern spelare"
},
"metadataEdit": {
"editMetadata": "Redigera...",
"screenTitle": "Redigera metadata",
"basicInfo": "Grundläggande info",
"artwork": "Artwork",
"advancedSettings": "Avancerade inställningar",
"title": "Titel",
"sortTitle": "Sorteringstitel",
"originalTitle": "Originaltitel",
"releaseDate": "Utgivningsdatum",
"contentRating": "Åldersgräns",
"studio": "Studio",
"tagline": "Tagline",
"summary": "Sammanfattning",
"poster": "Poster",
"background": "Bakgrund",
"selectPoster": "Välj poster",
"selectBackground": "Välj bakgrund",
"fromUrl": "Från URL",
"uploadFile": "Ladda upp fil",
"enterImageUrl": "Ange bild-URL",
"imageUrl": "Bild-URL",
"metadataUpdated": "Metadata uppdaterad",
"metadataUpdateFailed": "Kunde inte uppdatera metadata",
"artworkUpdated": "Artwork uppdaterad",
"artworkUpdateFailed": "Kunde inte uppdatera artwork",
"noArtworkAvailable": "Ingen artwork tillgänglig",
"notSet": "Inte angiven",
"libraryDefault": "Biblioteksstandard",
"accountDefault": "Kontostandard",
"seriesDefault": "Seriestandard",
"episodeSorting": "Avsnittsortering",
"oldestFirst": "Äldst först",
"newestFirst": "Nyast först",
"keep": "Behåll",
"allEpisodes": "Alla avsnitt",
"latestEpisodes": "${count} senaste avsnitten",
"latestEpisode": "Senaste avsnittet",
"episodesAddedPastDays": "Avsnitt tillagda de senaste ${count} dagarna",
"deleteAfterPlaying": "Ta bort avsnitt efter uppspelning",
"never": "Aldrig",
"afterADay": "Efter en dag",
"afterAWeek": "Efter en vecka",
"afterAMonth": "Efter en månad",
"onNextRefresh": "Vid nästa uppdatering",
"seasons": "Säsonger",
"show": "Visa",
"hide": "Dölj",
"episodeOrdering": "Avsnittsordning",
"tmdbAiring": "The Movie Database (Sändning)",
"tvdbAiring": "TheTVDB (Sändning)",
"tvdbAbsolute": "TheTVDB (Absolut)",
"metadataLanguage": "Metadataspråk",
"useOriginalTitle": "Använd originaltitel",
"preferredAudioLanguage": "Föredraget ljudspråk",
"preferredSubtitleLanguage": "Föredraget undertextspråk",
"subtitleMode": "Automatiskt val av undertexter",
"manuallySelected": "Manuellt vald",
"shownWithForeignAudio": "Visas vid främmande ljud",
"alwaysEnabled": "Alltid aktiverad"
}
}
+70 -23
View File
@@ -1,7 +1,7 @@
{
"app": {
"title": "Plezy"
},
},
"auth": {
"signInWithPlex": "使用 Plex 登录",
"showQRCode": "显示二维码",
@@ -126,6 +126,8 @@
"hardwareDecodingDescription": "如果可用,使用硬件加速",
"bufferSize": "缓冲区大小",
"bufferSizeMB": "${size}MB",
"bufferSizeAuto": "自动(推荐)",
"bufferSizeWarning": "您的设备有 ${heap}MB 内存。${size}MB 的缓冲区可能导致播放问题。",
"subtitleStyling": "字幕样式",
"subtitleStylingDescription": "调整字幕外观",
"smallSkipDuration": "短跳过时长",
@@ -303,6 +305,9 @@
"timerActive": "定时器已激活",
"playbackWillPauseIn": "播放将在 ${duration} 后暂停",
"sleepTimerCompleted": "睡眠定时器已完成 - 播放已暂停",
"stillWatching": "还在看吗?",
"pausingIn": "${seconds}秒后暂停",
"continueWatching": "继续",
"autoPlayNext": "自动播放下一集",
"playNext": "播放下一集",
"playButton": "播放",
@@ -550,29 +555,17 @@
"title": "电视直播",
"channels": "频道",
"guide": "节目指南",
"recordings": "录制",
"subscriptions": "录制规则",
"scheduled": "已计划",
"noChannels": "没有可用的频道",
"noDvr": "没有服务器配置了DVR",
"tuneFailed": "无法调谐频道",
"loading": "正在加载频道...",
"nowPlaying": "正在播放",
"record": "录制",
"recordSeries": "录制系列",
"cancelRecording": "取消录制",
"deleteSubscription": "删除录制规则",
"deleteSubscriptionConfirm": "确定要删除此录制规则吗?",
"subscriptionDeleted": "录制规则已删除",
"noPrograms": "没有可用的节目数据",
"noRecordings": "没有计划的录制",
"noSubscriptions": "没有录制规则",
"channelNumber": "频道 ${number}",
"live": "直播",
"hd": "高清",
"premiere": "新",
"reloadGuide": "重新加载节目指南",
"guideReloaded": "节目指南已重新加载",
"allChannels": "所有频道",
"now": "现在",
"today": "今天",
@@ -739,11 +732,8 @@
"minimize": "最小化"
},
"pairing": {
"recent": "最近",
"scan": "扫描",
"manual": "手动",
"recentConnections": "最近连接",
"quickReconnect": "快速重新连接之前配对的设备",
"pairWithDesktop": "与桌面配对",
"enterSessionDetails": "输入桌面设备上显示的会话信息",
"hostAddressHint": "192.168.1.100:48632",
@@ -757,11 +747,7 @@
"cameraPermissionRequired": "扫描 QR 码需要相机权限。\n请在设备设置中授予相机访问权限。",
"cameraError": "无法启动相机:${error}",
"scanInstruction": "将相机对准桌面上显示的 QR 码",
"noRecentConnections": "没有最近的连接",
"connectUsingManual": "使用手动输入连接设备以开始使用",
"invalidQrCode": "无效的 QR 码格式",
"removeRecentConnection": "删除最近连接",
"removeConfirm": "确定要从最近连接中删除 \"${name}\" 吗?",
"validationHostRequired": "请输入主机地址",
"validationHostFormat": "格式必须为 IP:端口(例如 192.168.1.100:48632)",
"validationSessionIdRequired": "请输入会话 ID",
@@ -770,8 +756,7 @@
"validationPinLength": "PIN 必须为6位数字",
"connectionTimedOut": "连接超时。请检查会话 ID 和 PIN。",
"sessionNotFound": "找不到会话。请检查您的凭据。",
"failedToConnect": "连接失败:${error}",
"failedToLoadRecent": "加载最近会话失败:${error}"
"failedToConnect": "连接失败:${error}"
},
"remote": {
"disconnectConfirm": "是否要断开远程会话的连接?",
@@ -813,7 +798,8 @@
"subtitleSync": "字幕同步",
"hdr": "HDR",
"audioOutput": "音频输出",
"performanceOverlay": "性能监控"
"performanceOverlay": "性能监控",
"audioPassthrough": "音频直通"
},
"externalPlayer": {
"title": "外部播放器",
@@ -831,5 +817,66 @@
"launchFailed": "无法打开外部播放器",
"appNotInstalled": "${name} 未安装",
"playInExternalPlayer": "在外部播放器中播放"
},
"metadataEdit": {
"editMetadata": "编辑...",
"screenTitle": "编辑元数据",
"basicInfo": "基本信息",
"artwork": "封面图片",
"advancedSettings": "高级设置",
"title": "标题",
"sortTitle": "排序标题",
"originalTitle": "原始标题",
"releaseDate": "上映日期",
"contentRating": "内容分级",
"studio": "制片厂",
"tagline": "标语",
"summary": "简介",
"poster": "海报",
"background": "背景",
"selectPoster": "选择海报",
"selectBackground": "选择背景",
"fromUrl": "从 URL",
"uploadFile": "上传文件",
"enterImageUrl": "输入图片 URL",
"imageUrl": "图片 URL",
"metadataUpdated": "元数据已更新",
"metadataUpdateFailed": "元数据更新失败",
"artworkUpdated": "封面图片已更新",
"artworkUpdateFailed": "封面图片更新失败",
"noArtworkAvailable": "没有可用的封面图片",
"notSet": "未设置",
"libraryDefault": "媒体库默认",
"accountDefault": "账户默认",
"seriesDefault": "剧集默认",
"episodeSorting": "剧集排序",
"oldestFirst": "最旧优先",
"newestFirst": "最新优先",
"keep": "保留",
"allEpisodes": "所有剧集",
"latestEpisodes": "最新 ${count} 集",
"latestEpisode": "最新一集",
"episodesAddedPastDays": "过去 ${count} 天内添加的剧集",
"deleteAfterPlaying": "播放后删除剧集",
"never": "从不",
"afterADay": "一天后",
"afterAWeek": "一周后",
"afterAMonth": "一个月后",
"onNextRefresh": "下次刷新时",
"seasons": "季",
"show": "显示",
"hide": "隐藏",
"episodeOrdering": "剧集排列顺序",
"tmdbAiring": "The Movie Database(播出顺序)",
"tvdbAiring": "TheTVDB(播出顺序)",
"tvdbAbsolute": "TheTVDB(绝对顺序)",
"metadataLanguage": "元数据语言",
"useOriginalTitle": "使用原始标题",
"preferredAudioLanguage": "首选音频语言",
"preferredSubtitleLanguage": "首选字幕语言",
"subtitleMode": "自动选择字幕模式",
"manuallySelected": "手动选择",
"shownWithForeignAudio": "外语音频时显示",
"alwaysEnabled": "始终启用"
}
}
+36 -5
View File
@@ -24,8 +24,8 @@ import 'providers/playback_state_provider.dart';
import 'providers/download_provider.dart';
import 'providers/offline_mode_provider.dart';
import 'providers/offline_watch_provider.dart';
import 'providers/shader_provider.dart';
import 'providers/companion_remote_provider.dart';
import 'providers/shader_provider.dart';
import 'watch_together/watch_together.dart';
import 'services/multi_server_manager.dart';
import 'services/offline_watch_sync_service.dart';
@@ -36,6 +36,7 @@ import 'services/server_registry.dart';
import 'services/download_manager_service.dart';
import 'services/pip_service.dart';
import 'services/download_storage_service.dart';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'services/plex_api_cache.dart';
import 'database/app_database.dart';
import 'utils/app_logger.dart';
@@ -78,7 +79,8 @@ void main() async {
await initializeDateFormatting(savedLocale.languageCode, null);
// Configure image cache for large libraries
PaintingBinding.instance.imageCache.maximumSizeBytes = 200 << 20; // 200MB
PaintingBinding.instance.imageCache.maximumSize = 2000; // default 1000
PaintingBinding.instance.imageCache.maximumSizeBytes = 300 << 20; // 300MB
// Initialize services in parallel where possible
final futures = <Future<void>>[];
@@ -310,8 +312,8 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
ChangeNotifierProvider(create: (context) => LibrariesProvider()),
ChangeNotifierProvider(create: (context) => PlaybackStateProvider()),
ChangeNotifierProvider(create: (context) => WatchTogetherProvider()),
ChangeNotifierProvider(create: (context) => ShaderProvider()),
ChangeNotifierProvider(create: (context) => CompanionRemoteProvider()),
ChangeNotifierProvider(create: (context) => ShaderProvider()),
],
child: Consumer<ThemeProvider>(
builder: (context, themeProvider, child) {
@@ -376,8 +378,26 @@ class _SetupScreenState extends State<SetupScreen> {
final storage = await StorageService.getInstance();
final registry = ServerRegistry(storage);
// Refresh servers from API to get updated connection info (IPs may change)
await registry.refreshServersFromApi();
// Check network connectivity early to fast-path airplane mode.
// Timeout guards against connectivity_plus hanging on some Android TV devices after force-close.
final connectivityResult = await Connectivity()
.checkConnectivity()
.timeout(const Duration(seconds: 3), onTimeout: () => [ConnectivityResult.other]);
final hasNetwork = !connectivityResult.contains(ConnectivityResult.none);
if (hasNetwork) {
// Refresh servers from API to get updated connection info (IPs may change).
// If the stored token is invalid (e.g. after removing a Plex profile PIN),
// redirect to AuthScreen so the user can re-authenticate.
final refreshResult = await registry.refreshServersFromApi();
if (refreshResult == ServerRefreshResult.authError) {
await storage.clearCredentials();
if (mounted) {
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => const AuthScreen()));
}
return;
}
}
// Load all configured servers
final servers = await registry.getServers();
@@ -391,6 +411,17 @@ class _SetupScreenState extends State<SetupScreen> {
if (!mounted) return;
// No network — skip connection attempts and go straight to offline mode
if (!hasNetwork) {
await context.read<DownloadProvider>().ensureInitialized();
if (!mounted) return;
Navigator.pushReplacement(
context,
MaterialPageRoute(builder: (context) => const MainScreen(isOfflineMode: true)),
);
return;
}
try {
final result = await ServerConnectionOrchestrator.connectAndInitialize(
servers: servers,
+9 -25
View File
@@ -1,6 +1,7 @@
import 'dart:async';
import 'package:flutter/material.dart';
import '../utils/deletion_notifier.dart';
import 'event_aware.dart';
/// Mixin for screens that need to react to deletion events.
///
@@ -56,31 +57,14 @@ mixin DeletionAware<T extends StatefulWidget> on State<T> {
@override
void initState() {
super.initState();
_subscribeToDeletions();
}
void _subscribeToDeletions() {
_deletionSubscription = DeletionNotifier().stream.listen((event) {
if (!mounted) return;
final serverId = deletionServerId;
if (serverId != null && event.serverId != serverId) return;
final globalKeys = deletionGlobalKeys;
if (globalKeys != null) {
if (event.affectsAnyGlobalKey(globalKeys)) {
onDeletionEvent(event);
}
return;
}
final ratingKeys = deletionRatingKeys;
// If keys is null, receive all events
// Otherwise, filter to events that affect our keys
if (ratingKeys == null || event.affectsAnyOf(ratingKeys)) {
onDeletionEvent(event);
}
});
_deletionSubscription = subscribeToHierarchicalEvents<DeletionEvent>(
notifier: DeletionNotifier(),
mounted: () => mounted,
serverId: () => deletionServerId,
globalKeys: () => deletionGlobalKeys,
ratingKeys: () => deletionRatingKeys,
onEvent: onDeletionEvent,
);
}
@override
+36
View File
@@ -0,0 +1,36 @@
import 'dart:async';
import '../utils/base_notifier.dart';
import '../utils/hierarchical_event_mixin.dart';
/// Creates a filtered stream subscription for hierarchical events.
///
/// Used internally by [DeletionAware] and [WatchStateAware] to avoid
/// duplicating the subscription and filtering logic.
StreamSubscription<E> subscribeToHierarchicalEvents<E extends HierarchicalEventMixin>({
required BaseNotifier<E> notifier,
required bool Function() mounted,
required String? Function() serverId,
required Set<String>? Function() globalKeys,
required Set<String>? Function() ratingKeys,
required void Function(E event) onEvent,
}) {
return notifier.stream.listen((event) {
if (!mounted()) return;
final sid = serverId();
if (sid != null && event.serverId != sid) return;
final gk = globalKeys();
if (gk != null) {
if (event.affectsAnyGlobalKey(gk)) {
onEvent(event);
}
return;
}
final rk = ratingKeys();
if (rk == null || event.affectsAnyOf(rk)) {
onEvent(event);
}
});
}
+9 -25
View File
@@ -1,6 +1,7 @@
import 'dart:async';
import 'package:flutter/material.dart';
import '../utils/watch_state_notifier.dart';
import 'event_aware.dart';
/// Mixin for screens that need to react to watch state changes.
///
@@ -55,31 +56,14 @@ mixin WatchStateAware<T extends StatefulWidget> on State<T> {
@override
void initState() {
super.initState();
_subscribeToWatchState();
}
void _subscribeToWatchState() {
_watchStateSubscription = WatchStateNotifier().stream.listen((event) {
if (!mounted) return;
final serverId = watchStateServerId;
if (serverId != null && event.serverId != serverId) return;
final globalKeys = watchedGlobalKeys;
if (globalKeys != null) {
if (event.affectsAnyGlobalKey(globalKeys)) {
onWatchStateChanged(event);
}
return;
}
final keys = watchedRatingKeys;
// If keys is null, receive all events
// Otherwise, filter to events that affect our keys
if (keys == null || event.affectsAnyOf(keys)) {
onWatchStateChanged(event);
}
});
_watchStateSubscription = subscribeToHierarchicalEvents<WatchStateEvent>(
notifier: WatchStateNotifier(),
mounted: () => mounted,
serverId: () => watchStateServerId,
globalKeys: () => watchedGlobalKeys,
ratingKeys: () => watchedRatingKeys,
onEvent: onWatchStateChanged,
);
}
@override
@@ -1,52 +0,0 @@
import 'package:json_annotation/json_annotation.dart';
part 'recent_remote_session.g.dart';
/// Recent Companion Remote session for quick reconnection
@JsonSerializable()
class RecentRemoteSession {
final String sessionId;
final String pin;
final String deviceName;
final String platform;
final DateTime lastConnected;
final String? hostAddress; // Format: "ip:port"
RecentRemoteSession({
required this.sessionId,
required this.pin,
required this.deviceName,
required this.platform,
required this.lastConnected,
this.hostAddress,
});
factory RecentRemoteSession.fromJson(Map<String, dynamic> json) => _$RecentRemoteSessionFromJson(json);
Map<String, dynamic> toJson() => _$RecentRemoteSessionToJson(this);
/// Create from QR code data (format: "ip|port|sessionId|pin")
factory RecentRemoteSession.fromQrData(String qrData) {
final parts = qrData.split('|');
if (parts.length < 4) {
throw FormatException('Invalid QR code format - expected ip|port|sessionId|pin');
}
final ip = parts.first;
final port = parts[1];
final sessionId = parts[2];
final pin = parts[3];
return RecentRemoteSession(
sessionId: sessionId,
pin: pin,
deviceName: 'Unknown Device',
platform: 'unknown',
lastConnected: DateTime.now(),
hostAddress: '$ip:$port',
);
}
@override
String toString() => '$deviceName ($platform) - Last: ${lastConnected.toLocal()}';
}
@@ -1,25 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'recent_remote_session.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
RecentRemoteSession _$RecentRemoteSessionFromJson(Map<String, dynamic> json) => RecentRemoteSession(
sessionId: json['sessionId'] as String,
pin: json['pin'] as String,
deviceName: json['deviceName'] as String,
platform: json['platform'] as String,
lastConnected: DateTime.parse(json['lastConnected'] as String),
hostAddress: json['hostAddress'] as String?,
);
Map<String, dynamic> _$RecentRemoteSessionToJson(RecentRemoteSession instance) => <String, dynamic>{
'sessionId': instance.sessionId,
'pin': instance.pin,
'deviceName': instance.deviceName,
'platform': instance.platform,
'lastConnected': instance.lastConnected.toIso8601String(),
'hostAddress': instance.hostAddress,
};
@@ -1,86 +0,0 @@
/// Represents an upcoming scheduled recording from the DVR
class ScheduledRecording {
final String? key;
final String? ratingKey;
final String? guid;
final String title;
final String? summary;
final String? type;
final int? beginsAt;
final int? endsAt;
final String? grandparentTitle;
final String? parentTitle;
final int? index;
final int? parentIndex;
final String? thumb;
final String? art;
final String? channelIdentifier;
final String? channelCallSign;
final String? subscriptionID;
final String? status;
ScheduledRecording({
this.key,
this.ratingKey,
this.guid,
required this.title,
this.summary,
this.type,
this.beginsAt,
this.endsAt,
this.grandparentTitle,
this.parentTitle,
this.index,
this.parentIndex,
this.thumb,
this.art,
this.channelIdentifier,
this.channelCallSign,
this.subscriptionID,
this.status,
});
factory ScheduledRecording.fromJson(Map<String, dynamic> json) {
return ScheduledRecording(
key: json['key'] as String?,
ratingKey: json['ratingKey'] as String?,
guid: json['guid'] as String?,
title: json['title'] as String? ?? 'Unknown',
summary: json['summary'] as String?,
type: json['type'] as String?,
beginsAt: (json['beginsAt'] as num?)?.toInt(),
endsAt: (json['endsAt'] as num?)?.toInt(),
grandparentTitle: json['grandparentTitle'] as String?,
parentTitle: json['parentTitle'] as String?,
index: (json['index'] as num?)?.toInt(),
parentIndex: (json['parentIndex'] as num?)?.toInt(),
thumb: json['thumb'] as String?,
art: json['art'] as String?,
channelIdentifier: json['channelIdentifier'] as String?,
channelCallSign: json['channelCallSign'] as String?,
subscriptionID: json['subscriptionID'] as String?,
status: json['status'] as String?,
);
}
/// Start time as DateTime
DateTime? get startTime => beginsAt != null ? DateTime.fromMillisecondsSinceEpoch(beginsAt! * 1000) : null;
/// End time as DateTime
DateTime? get endTime => endsAt != null ? DateTime.fromMillisecondsSinceEpoch(endsAt! * 1000) : null;
/// Duration in minutes
int get durationMinutes {
if (beginsAt == null || endsAt == null) return 0;
return ((endsAt! - beginsAt!) / 60).round();
}
/// Display title including series info for episodes
String get displayTitle {
if (grandparentTitle != null && index != null) {
final seasonEpisode = parentIndex != null ? 'S${parentIndex}E$index' : 'E$index';
return '$grandparentTitle - $seasonEpisode - $title';
}
return title;
}
}
-119
View File
@@ -1,119 +0,0 @@
/// Represents a DVR recording subscription (recording rule)
class LiveTvSubscription {
final String key;
final String? ratingKey;
final String? guid;
final String title;
final String? summary;
final String? type;
final String? thumb;
final String? art;
final int? targetLibrarySectionID;
final int? targetSectionID;
final int? createdAt;
final List<SubscriptionSetting> settings;
// Multi-server support
final String? serverId;
LiveTvSubscription({
required this.key,
this.ratingKey,
this.guid,
required this.title,
this.summary,
this.type,
this.thumb,
this.art,
this.targetLibrarySectionID,
this.targetSectionID,
this.createdAt,
this.settings = const [],
this.serverId,
});
factory LiveTvSubscription.fromJson(Map<String, dynamic> json) {
final settingsList = <SubscriptionSetting>[];
if (json['Setting'] != null) {
for (final item in json['Setting'] as List) {
try {
settingsList.add(SubscriptionSetting.fromJson(item as Map<String, dynamic>));
} catch (_) {}
}
}
return LiveTvSubscription(
key: json['key'] as String? ?? '',
ratingKey: json['ratingKey'] as String?,
guid: json['guid'] as String?,
title: json['title'] as String? ?? 'Unknown',
summary: json['summary'] as String?,
type: json['type'] as String?,
thumb: json['thumb'] as String?,
art: json['art'] as String?,
targetLibrarySectionID: (json['targetLibrarySectionID'] as num?)?.toInt(),
targetSectionID: (json['targetSectionID'] as num?)?.toInt(),
createdAt: (json['createdAt'] as num?)?.toInt(),
settings: settingsList,
);
}
/// Creation time as DateTime
DateTime? get createdAtTime => createdAt != null ? DateTime.fromMillisecondsSinceEpoch(createdAt! * 1000) : null;
}
/// Represents a setting within a DVR subscription
class SubscriptionSetting {
final String id;
final String? label;
final String? summary;
final String type; // e.g., "bool", "enum", "int"
final String? value;
final String? defaultValue;
final bool? hidden;
final bool? advanced;
final List<SubscriptionSettingOption>? enumValues;
SubscriptionSetting({
required this.id,
this.label,
this.summary,
required this.type,
this.value,
this.defaultValue,
this.hidden,
this.advanced,
this.enumValues,
});
factory SubscriptionSetting.fromJson(Map<String, dynamic> json) {
List<SubscriptionSettingOption>? options;
if (json['enumValues'] != null) {
final parts = (json['enumValues'] as String).split('|');
options = parts.map((part) {
final kv = part.split(':');
return SubscriptionSettingOption(value: kv.first, label: kv.length > 1 ? kv[1] : kv.first);
}).toList();
}
return SubscriptionSetting(
id: json['id'] as String? ?? '',
label: json['label'] as String?,
summary: json['summary'] as String?,
type: json['type'] as String? ?? 'text',
value: json['value']?.toString(),
defaultValue: json['default']?.toString(),
hidden: json['hidden'] == true || json['hidden'] == 1,
advanced: json['advanced'] == true || json['advanced'] == 1,
enumValues: options,
);
}
}
/// Represents an option in an enum-type subscription setting
class SubscriptionSettingOption {
final String value;
final String label;
SubscriptionSettingOption({required this.value, required this.label});
}
+2 -1
View File
@@ -1,6 +1,7 @@
import 'package:json_annotation/json_annotation.dart';
import 'mixins/multi_server_fields.dart';
import '../utils/global_key_utils.dart';
part 'plex_library.g.dart';
@@ -26,7 +27,7 @@ class PlexLibrary with MultiServerFields {
final String? serverName;
/// Global unique identifier across all servers (serverId:key)
String get globalKey => serverId != null ? '$serverId:$key' : key;
String get globalKey => serverId != null ? buildGlobalKey(serverId!, key) : key;
PlexLibrary({
required this.key,
+1 -1
View File
@@ -173,7 +173,7 @@ class PlexMarker {
bool containsPosition(Duration position) {
final posMs = position.inMilliseconds;
return posMs >= startTimeOffset && posMs <= endTimeOffset;
return posMs >= startTimeOffset && posMs < endTimeOffset;
}
}
+26 -1
View File
@@ -4,6 +4,7 @@ import '../services/settings_service.dart' show EpisodePosterMode;
import '../widgets/plex_optimized_image.dart' show kBlurArtwork, obfuscateText;
import 'mixins/multi_server_fields.dart';
import 'plex_role.dart';
import '../utils/global_key_utils.dart';
part 'plex_metadata.g.dart';
@@ -33,6 +34,18 @@ enum PlexMediaType {
/// Whether this type can be played directly
bool get isPlayable => isVideo || this == track;
/// Plex API type number for metadata editing endpoints
int get typeNumber => switch (this) {
PlexMediaType.movie => 1,
PlexMediaType.show => 2,
PlexMediaType.season => 3,
PlexMediaType.episode => 4,
PlexMediaType.artist => 8,
PlexMediaType.album => 9,
PlexMediaType.track => 10,
_ => 0,
};
}
@JsonSerializable()
@@ -79,8 +92,11 @@ class PlexMetadata with MultiServerFields {
final int? playlistItemID; // Playlist item ID (for dumb playlists only)
final int? playQueueItemID; // Play queue item ID (unique even for duplicates)
final int? librarySectionID; // Library section ID this item belongs to
final String? librarySectionTitle; // Library section title this item belongs to
final String? ratingImage; // Rating source URI (e.g. rottentomatoes://image.rating.ripe)
final String? audienceRatingImage; // Audience rating source URI
final String? tagline;
final String? originalTitle;
final String? subtype; // Clip subtype: "trailer", "behindTheScenes", "deleted", etc.
final int? extraType; // Numeric extra type identifier
final String? primaryExtraKey; // Points to main trailer (e.g., "/library/metadata/52601")
@@ -97,7 +113,7 @@ class PlexMetadata with MultiServerFields {
final String? clearLogo;
/// Global unique identifier across all servers (serverId:ratingKey)
String get globalKey => serverId != null ? '$serverId:$ratingKey' : ratingKey;
String get globalKey => serverId != null ? buildGlobalKey(serverId!, ratingKey) : ratingKey;
/// Parsed media type enum for type-safe comparisons
PlexMediaType get mediaType {
@@ -159,8 +175,11 @@ class PlexMetadata with MultiServerFields {
this.playlistItemID,
this.playQueueItemID,
this.librarySectionID,
this.librarySectionTitle,
this.ratingImage,
this.audienceRatingImage,
this.tagline,
this.originalTitle,
this.subtype,
this.extraType,
this.primaryExtraKey,
@@ -212,8 +231,11 @@ class PlexMetadata with MultiServerFields {
int? playlistItemID,
int? playQueueItemID,
int? librarySectionID,
String? librarySectionTitle,
String? ratingImage,
String? audienceRatingImage,
String? tagline,
String? originalTitle,
String? subtype,
int? extraType,
String? primaryExtraKey,
@@ -263,8 +285,11 @@ class PlexMetadata with MultiServerFields {
playlistItemID: playlistItemID ?? this.playlistItemID,
playQueueItemID: playQueueItemID ?? this.playQueueItemID,
librarySectionID: librarySectionID ?? this.librarySectionID,
librarySectionTitle: librarySectionTitle ?? this.librarySectionTitle,
ratingImage: ratingImage ?? this.ratingImage,
audienceRatingImage: audienceRatingImage ?? this.audienceRatingImage,
tagline: tagline ?? this.tagline,
originalTitle: originalTitle ?? this.originalTitle,
subtype: subtype ?? this.subtype,
extraType: extraType ?? this.extraType,
primaryExtraKey: primaryExtraKey ?? this.primaryExtraKey,
+6
View File
@@ -48,8 +48,11 @@ PlexMetadata _$PlexMetadataFromJson(Map<String, dynamic> json) => PlexMetadata(
playlistItemID: (json['playlistItemID'] as num?)?.toInt(),
playQueueItemID: (json['playQueueItemID'] as num?)?.toInt(),
librarySectionID: (json['librarySectionID'] as num?)?.toInt(),
librarySectionTitle: json['librarySectionTitle'] as String?,
ratingImage: json['ratingImage'] as String?,
audienceRatingImage: json['audienceRatingImage'] as String?,
tagline: json['tagline'] as String?,
originalTitle: json['originalTitle'] as String?,
subtype: json['subtype'] as String?,
extraType: (json['extraType'] as num?)?.toInt(),
primaryExtraKey: json['primaryExtraKey'] as String?,
@@ -98,8 +101,11 @@ Map<String, dynamic> _$PlexMetadataToJson(PlexMetadata instance) => <String, dyn
'playlistItemID': instance.playlistItemID,
'playQueueItemID': instance.playQueueItemID,
'librarySectionID': instance.librarySectionID,
'librarySectionTitle': instance.librarySectionTitle,
'ratingImage': instance.ratingImage,
'audienceRatingImage': instance.audienceRatingImage,
'tagline': instance.tagline,
'originalTitle': instance.originalTitle,
'subtype': instance.subtype,
'extraType': instance.extraType,
'primaryExtraKey': instance.primaryExtraKey,
+2 -1
View File
@@ -2,6 +2,7 @@ import 'package:json_annotation/json_annotation.dart';
import '../widgets/plex_optimized_image.dart' show kBlurArtwork, obfuscateText;
import 'mixins/multi_server_fields.dart';
import '../utils/global_key_utils.dart';
part 'plex_playlist.g.dart';
@@ -65,7 +66,7 @@ class PlexPlaylist with MultiServerFields {
bool get isEditable => !smart;
/// Get globally unique key across all servers
String get globalKey => serverId != null ? '$serverId:$ratingKey' : ratingKey;
String get globalKey => serverId != null ? buildGlobalKey(serverId!, ratingKey) : ratingKey;
// Properties for MediaCard compatibility with PlexMetadata interface
+17
View File
@@ -36,6 +36,12 @@ class PlayerAndroid extends PlayerBase {
return;
}
if (name == 'memory-pressure') {
// System memory is critically low — playback may be at risk of OOM crash
errorController.add('Low memory — playback may be unstable');
return;
}
// Delegate to base class for common events
super.handlePlayerEvent(name, data);
}
@@ -235,6 +241,17 @@ class PlayerAndroid extends PlayerBase {
}
}
/// Get the device's large heap size in MB (Android only).
/// Returns 0 if unavailable.
static Future<int> getHeapSize() async {
try {
final result = await _methodChannel.invokeMethod<int>('getHeapSize');
return result ?? 0;
} catch (e) {
return 0;
}
}
/// Get the current player type ('exoplayer' or 'mpv' if fallback is active).
Future<String> getPlayerType() async {
checkDisposed();
+1 -1
View File
@@ -112,7 +112,7 @@ abstract class PlayerBase with PlayerStreamControllersMixin implements Player {
void _handleEvent(dynamic event) {
if (_disposed) return;
if (event is List && event.length == 2) {
final name = _propIdToName[event[0] as int];
final name = _propIdToName[event.first as int];
if (name != null) {
handlePropertyChange(name, event[1]);
}
+1 -2
View File
@@ -282,8 +282,7 @@ class PlayerNative extends PlayerBase {
Future<void> updateFrame() async {
checkDisposed();
if (!initialized) return;
// Only iOS and macOS use Metal layer that needs frame updates
if (Platform.isIOS || Platform.isMacOS) {
if (Platform.isIOS || Platform.isMacOS || Platform.isLinux) {
await methodChannel.invokeMethod('updateFrame');
}
}
+1 -1
View File
@@ -58,7 +58,7 @@ class _VideoState extends State<Video> {
@override
Widget build(BuildContext context) {
return Container(
return ColoredBox(
color: _hasFirstFrame ? Colors.transparent : widget.backgroundColor,
child: Stack(
fit: StackFit.expand,
+19 -97
View File
@@ -10,8 +10,6 @@ import '../models/companion_remote/remote_command_type.dart';
import '../models/companion_remote/remote_session.dart';
import '../models/companion_remote/trusted_device.dart';
import '../services/companion_remote/companion_remote_peer_service.dart';
import '../models/companion_remote/recent_remote_session.dart';
import '../services/companion_remote/companion_remote_discovery_service.dart';
import '../services/storage_service.dart';
import '../utils/app_logger.dart';
@@ -21,11 +19,9 @@ typedef DeviceApprovalCallback = Future<bool> Function(RemoteDevice device);
class CompanionRemoteProvider with ChangeNotifier {
RemoteSession? _session;
CompanionRemotePeerService? _peerService;
CompanionRemoteDiscoveryService? _discoveryService;
String _deviceName = 'Unknown Device';
String _platform = 'unknown';
final List<TrustedDevice> _trustedDevices = [];
final List<RecentRemoteSession> _recentSessions = [];
bool _isPlayerActive = false;
static const String _storageKey = 'companion_remote_trusted_devices';
@@ -46,7 +42,6 @@ class CompanionRemoteProvider with ChangeNotifier {
StreamSubscription<void>? _deviceDisconnectedSubscription;
StreamSubscription<RemotePeerError>? _errorSubscription;
StreamSubscription<RemoteSessionStatus>? _statusSubscription;
StreamSubscription<List<RecentRemoteSession>>? _recentSessionsSubscription;
CommandReceivedCallback? onCommandReceived;
DeviceApprovalCallback? onDeviceApprovalRequired;
@@ -61,7 +56,6 @@ class CompanionRemoteProvider with ChangeNotifier {
String? get pin => _session?.pin;
RemoteDevice? get connectedDevice => _session?.connectedDevice;
List<TrustedDevice> get trustedDevices => List.unmodifiable(_trustedDevices);
List<RecentRemoteSession> get recentSessions => List.unmodifiable(_recentSessions);
bool get isPlayerActive => _isPlayerActive;
CompanionRemoteProvider() {
@@ -165,7 +159,7 @@ class CompanionRemoteProvider with ChangeNotifier {
});
}
Future<void> _handleDeviceInfo(RemoteCommand command) async {
void _handleDeviceInfo(RemoteCommand command) {
if (command.data != null) {
final id = command.data!['id'] as String? ?? 'unknown';
final name = command.data!['name'] as String? ?? 'Unknown Device';
@@ -178,9 +172,6 @@ class CompanionRemoteProvider with ChangeNotifier {
_session = _session?.copyWith(connectedDevice: device);
notifyListeners();
// Save to recent sessions now that we have the remote device's real identity
await _addToRecentSessions();
}
}
@@ -205,7 +196,7 @@ class CompanionRemoteProvider with ChangeNotifier {
_statusSubscription = null;
}
Future<({String sessionId, String pin, String address})> createSession() async {
Future<({String sessionId, String pin, List<String> addresses})> createSession() async {
await leaveSession();
appLogger.d('CompanionRemote: Creating session as host');
@@ -225,7 +216,7 @@ class CompanionRemoteProvider with ChangeNotifier {
notifyListeners();
appLogger.d(
'CompanionRemote: Session created - ID: ${result.sessionId}, PIN: ${result.pin}, Address: ${result.address}',
'CompanionRemote: Session created - ID: ${result.sessionId}, PIN: ${result.pin}, Addresses: ${result.addresses}',
);
return result;
@@ -244,13 +235,18 @@ class CompanionRemoteProvider with ChangeNotifier {
}
Future<void> joinSession(String sessionId, String pin, String hostAddress) async {
await joinSessionMulti(sessionId, pin, [hostAddress]);
}
Future<void> joinSessionMulti(String sessionId, String pin, List<String> hostAddresses) async {
await leaveSession();
_lastSessionId = sessionId;
_lastPin = pin;
_lastHostAddress = hostAddress;
// Store first address as fallback for reconnection; will be updated with winner
_lastHostAddress = hostAddresses.first;
appLogger.d('CompanionRemote: Joining session - ID: $sessionId, Host: $hostAddress');
appLogger.d('CompanionRemote: Joining session - ID: $sessionId, Hosts: $hostAddresses');
_peerService = CompanionRemotePeerService();
_setupPeerServiceListeners();
@@ -264,11 +260,18 @@ class CompanionRemoteProvider with ChangeNotifier {
notifyListeners();
try {
await _peerService!.joinSession(sessionId, pin, _deviceName, _platform, hostAddress);
final winner = await _peerService!.joinSessionRacing(
sessionId,
pin,
_deviceName,
_platform,
hostAddresses,
);
_lastHostAddress = winner;
_session = _session?.copyWith(status: RemoteSessionStatus.connected);
notifyListeners();
appLogger.d('CompanionRemote: Successfully joined session');
appLogger.d('CompanionRemote: Successfully joined session via $winner');
} catch (e) {
appLogger.e('CompanionRemote: Failed to join session', error: e);
_session = _session?.copyWith(status: RemoteSessionStatus.error, errorMessage: e.toString());
@@ -458,91 +461,10 @@ class CompanionRemoteProvider with ChangeNotifier {
return storage.prefs.getString(_lastDeviceKey);
}
/// Load recent sessions
Future<void> loadRecentSessions() async {
try {
// Dispose previous discovery service and subscription to avoid leaks
_recentSessionsSubscription?.cancel();
_recentSessionsSubscription = null;
_discoveryService?.dispose();
_discoveryService = CompanionRemoteDiscoveryService();
// Listen for recent sessions updates
_recentSessionsSubscription = _discoveryService!.recentSessions.listen((sessions) {
_recentSessions.clear();
_recentSessions.addAll(sessions);
notifyListeners();
});
// Initial load happens in constructor, just notify
_recentSessions.clear();
_recentSessions.addAll(_discoveryService!.currentSessions);
notifyListeners();
appLogger.d('CompanionRemote: Loaded ${_recentSessions.length} recent sessions');
} catch (e) {
appLogger.e('CompanionRemote: Failed to load recent sessions', error: e);
}
}
/// Add current session to recent list (called after successful connection)
Future<void> _addToRecentSessions() async {
if (_session == null || _session!.sessionId.isEmpty) return;
// For mobile (remote role), save the connected desktop device
// For desktop (host role), this doesn't really apply but save connected mobile device
final deviceToSave = _session!.connectedDevice;
if (deviceToSave == null) {
appLogger.w('CompanionRemote: No connected device to save to recent sessions');
return;
}
final recentSession = RecentRemoteSession(
sessionId: _session!.sessionId,
pin: _session!.pin,
deviceName: deviceToSave.name,
platform: deviceToSave.platform,
lastConnected: DateTime.now(),
hostAddress: _peerService?.hostAddress,
);
if (_discoveryService != null) {
await _discoveryService!.addRecentSession(recentSession);
}
}
/// Connect to a recent session
Future<void> connectToRecentSession(RecentRemoteSession session) async {
if (session.hostAddress == null) {
throw const RemotePeerError(
type: RemotePeerErrorType.invalidSession,
message: 'No host address available for this session. Please scan a new QR code.',
);
}
await joinSession(session.sessionId, session.pin, session.hostAddress!);
}
/// Remove a recent session
Future<void> removeRecentSession(String sessionId) async {
if (_discoveryService != null) {
await _discoveryService!.removeRecentSession(sessionId);
}
}
/// Clear all recent sessions
Future<void> clearRecentSessions() async {
if (_discoveryService != null) {
await _discoveryService!.clearRecentSessions();
}
}
@override
void dispose() {
_reconnectTimer?.cancel();
leaveSession();
_recentSessionsSubscription?.cancel();
_discoveryService?.dispose();
super.dispose();
}
}
+15 -13
View File
@@ -172,7 +172,7 @@ class DownloadProvider extends ChangeNotifier {
// Load show metadata
final showRatingKey = episode.grandparentRatingKey;
if (showRatingKey != null) {
final showGlobalKey = '$serverId:$showRatingKey';
final showGlobalKey = buildGlobalKey(serverId, showRatingKey);
if (!_metadata.containsKey(showGlobalKey)) {
final showMetadata = allMetadata[showGlobalKey];
if (showMetadata != null) {
@@ -187,7 +187,7 @@ class DownloadProvider extends ChangeNotifier {
// Load season metadata
final seasonRatingKey = episode.parentRatingKey;
if (seasonRatingKey != null) {
final seasonGlobalKey = '$serverId:$seasonRatingKey';
final seasonGlobalKey = buildGlobalKey(serverId, seasonRatingKey);
if (!_metadata.containsKey(seasonGlobalKey)) {
final seasonMetadata = allMetadata[seasonGlobalKey];
if (seasonMetadata != null) {
@@ -270,7 +270,7 @@ class DownloadProvider extends ChangeNotifier {
final showRatingKey = meta.grandparentRatingKey;
if (showRatingKey != null && !shows.containsKey(showRatingKey)) {
// Try to get stored show metadata first
final showGlobalKey = '${meta.serverId}:$showRatingKey';
final showGlobalKey = buildGlobalKey(meta.serverId!, showRatingKey);
final storedShow = _metadata[showGlobalKey];
if (storedShow != null && storedShow.type == 'show') {
@@ -384,7 +384,7 @@ class DownloadProvider extends ChangeNotifier {
required List<DownloadProgress> episodes,
required String entityType,
}) {
final globalKey = '$serverId:$ratingKey';
final globalKey = buildGlobalKey(serverId, ratingKey);
// DIAGNOSTIC: Check all sources of episode count
final meta = _metadata[globalKey];
@@ -604,7 +604,7 @@ class DownloadProvider extends ChangeNotifier {
/// For shows and seasons, fetches all child episodes and queues them.
/// Returns the number of items queued.
Future<int> queueDownload(PlexMetadata metadata, PlexClient client) async {
final globalKey = '${metadata.serverId}:${metadata.ratingKey}';
final globalKey = metadata.globalKey;
// Check if downloads are blocked on cellular
if (await DownloadManagerService.shouldBlockDownloadOnCellular()) {
@@ -646,7 +646,7 @@ class DownloadProvider extends ChangeNotifier {
/// Queue a single movie or episode for download
Future<void> _queueSingleDownload(PlexMetadata metadata, PlexClient client) async {
final globalKey = '${metadata.serverId}:${metadata.ratingKey}';
final globalKey = metadata.globalKey;
// Don't re-queue if already downloading or completed
if (_downloads.containsKey(globalKey)) {
@@ -656,8 +656,10 @@ class DownloadProvider extends ChangeNotifier {
}
}
// Fetch full metadata to get year, summary, clearLogo
// The metadata from getChildren() is summarized and missing these fields
// Always fetch full metadata before downloading.
// Hub items may have summary but the cache at /library/metadata/$ratingKey
// won't have the full API response (with Media/Part data needed for video URL)
// unless getMetadataWithImages has been called.
PlexMetadata metadataToStore = metadata;
try {
final fullMetadata = await client.getMetadataWithImages(metadata.ratingKey);
@@ -694,7 +696,7 @@ class DownloadProvider extends ChangeNotifier {
// Fetch and store show metadata if not already stored
final showRatingKey = episode.grandparentRatingKey;
if (showRatingKey != null) {
final showGlobalKey = '$serverId:$showRatingKey';
final showGlobalKey = buildGlobalKey(serverId, showRatingKey);
// Try to use existing metadata (set when queueing an entire show)
PlexMetadata? showMetadata = _metadata[showGlobalKey];
@@ -731,7 +733,7 @@ class DownloadProvider extends ChangeNotifier {
// Fetch and store season metadata if not already stored
final seasonRatingKey = episode.parentRatingKey;
if (seasonRatingKey != null) {
final seasonGlobalKey = '$serverId:$seasonRatingKey';
final seasonGlobalKey = buildGlobalKey(serverId, seasonRatingKey);
PlexMetadata? seasonMetadata = _metadata[seasonGlobalKey];
if (seasonMetadata == null) {
@@ -765,7 +767,7 @@ class DownloadProvider extends ChangeNotifier {
/// Queue all episodes from a TV show for download
Future<int> _queueShowDownload(PlexMetadata show, PlexClient client) async {
final globalKey = '${show.serverId}:${show.ratingKey}';
final globalKey = show.globalKey;
int count = 0;
final seasons = await client.getChildren(show.ratingKey);
@@ -801,7 +803,7 @@ class DownloadProvider extends ChangeNotifier {
/// Queue all episodes from a season for download
Future<int> _queueSeasonDownload(PlexMetadata season, PlexClient client) async {
final globalKey = '${season.serverId}:${season.ratingKey}';
final globalKey = season.globalKey;
int count = 0;
final episodes = await client.getChildren(season.ratingKey);
@@ -880,7 +882,7 @@ class DownloadProvider extends ChangeNotifier {
if (episode.type == 'episode') {
final episodeWithServer = episode.serverId != null ? episode : episode.copyWith(serverId: season.serverId);
final episodeGlobalKey = '${episodeWithServer.serverId}:${episodeWithServer.ratingKey}';
final episodeGlobalKey = episodeWithServer.globalKey;
// Only queue if NOT already downloaded or in progress
final progress = _downloads[episodeGlobalKey];
+3 -1
View File
@@ -28,7 +28,9 @@ class OfflineModeProvider extends ChangeNotifier {
/// Updates network and server connection flags
Future<void> _updateConnectionFlags() async {
final connectivityResult = await Connectivity().checkConnectivity();
final connectivityResult = await Connectivity()
.checkConnectivity()
.timeout(const Duration(seconds: 3), onTimeout: () => [ConnectivityResult.other]);
_hasNetworkConnection = !connectivityResult.contains(ConnectivityResult.none);
_hasServerConnection = _serverManager.onlineServerIds.isNotEmpty;
}
+2 -1
View File
@@ -5,6 +5,7 @@ import '../services/offline_watch_sync_service.dart';
import '../services/plex_api_cache.dart';
import '../utils/watch_state_notifier.dart';
import 'download_provider.dart';
import '../utils/global_key_utils.dart';
/// Provider for offline watch status UI state.
///
@@ -174,7 +175,7 @@ class OfflineWatchProvider extends ChangeNotifier {
required bool isNowWatched,
required WatchStateChangeType changeType,
}) {
final globalKey = '$serverId:$ratingKey';
final globalKey = buildGlobalKey(serverId, ratingKey);
final metadata = _downloadProvider.getMetadata(globalKey);
if (metadata != null) {
WatchStateNotifier().notifyWatched(metadata: metadata, isNowWatched: isNowWatched);
+51 -60
View File
@@ -59,77 +59,68 @@ class SettingsProvider extends ChangeNotifier {
bool get showUnwatchedCount => _showUnwatchedCount;
Future<void> setLibraryDensity(LibraryDensity density) async {
/// Helper to update a setting: ensures init, deduplicates, persists, notifies.
Future<void> _updateSetting<T>({
required T current,
required T value,
required void Function(T) setLocal,
required Future<void> Function(T) persist,
}) async {
if (!_isInitialized) await _initializeSettings();
if (_libraryDensity != density) {
_libraryDensity = density;
await _settingsService!.setLibraryDensity(density);
if (current != value) {
setLocal(value);
await persist(value);
notifyListeners();
}
}
Future<void> setViewMode(ViewMode mode) async {
if (!_isInitialized) await _initializeSettings();
if (_viewMode != mode) {
_viewMode = mode;
await _settingsService!.setViewMode(mode);
notifyListeners();
}
}
Future<void> setLibraryDensity(LibraryDensity density) => _updateSetting(
current: _libraryDensity, value: density,
setLocal: (v) => _libraryDensity = v,
persist: _settingsService!.setLibraryDensity,
);
Future<void> setEpisodePosterMode(EpisodePosterMode mode) async {
if (!_isInitialized) await _initializeSettings();
if (_episodePosterMode != mode) {
_episodePosterMode = mode;
await _settingsService!.setEpisodePosterMode(mode);
notifyListeners();
}
}
Future<void> setViewMode(ViewMode mode) => _updateSetting(
current: _viewMode, value: mode,
setLocal: (v) => _viewMode = v,
persist: _settingsService!.setViewMode,
);
Future<void> setShowHeroSection(bool value) async {
if (!_isInitialized) await _initializeSettings();
if (_showHeroSection != value) {
_showHeroSection = value;
await _settingsService!.setShowHeroSection(value);
notifyListeners();
}
}
Future<void> setEpisodePosterMode(EpisodePosterMode mode) => _updateSetting(
current: _episodePosterMode, value: mode,
setLocal: (v) => _episodePosterMode = v,
persist: _settingsService!.setEpisodePosterMode,
);
Future<void> setUseGlobalHubs(bool value) async {
if (!_isInitialized) await _initializeSettings();
if (_useGlobalHubs != value) {
_useGlobalHubs = value;
await _settingsService!.setUseGlobalHubs(value);
notifyListeners();
}
}
Future<void> setShowHeroSection(bool value) => _updateSetting(
current: _showHeroSection, value: value,
setLocal: (v) => _showHeroSection = v,
persist: _settingsService!.setShowHeroSection,
);
Future<void> setShowServerNameOnHubs(bool value) async {
if (!_isInitialized) await _initializeSettings();
if (_showServerNameOnHubs != value) {
_showServerNameOnHubs = value;
await _settingsService!.setShowServerNameOnHubs(value);
notifyListeners();
}
}
Future<void> setUseGlobalHubs(bool value) => _updateSetting(
current: _useGlobalHubs, value: value,
setLocal: (v) => _useGlobalHubs = v,
persist: _settingsService!.setUseGlobalHubs,
);
Future<void> setAlwaysKeepSidebarOpen(bool value) async {
if (!_isInitialized) await _initializeSettings();
if (_alwaysKeepSidebarOpen != value) {
_alwaysKeepSidebarOpen = value;
await _settingsService!.setAlwaysKeepSidebarOpen(value);
notifyListeners();
}
}
Future<void> setShowServerNameOnHubs(bool value) => _updateSetting(
current: _showServerNameOnHubs, value: value,
setLocal: (v) => _showServerNameOnHubs = v,
persist: _settingsService!.setShowServerNameOnHubs,
);
Future<void> setShowUnwatchedCount(bool value) async {
if (!_isInitialized) await _initializeSettings();
if (_showUnwatchedCount != value) {
_showUnwatchedCount = value;
await _settingsService!.setShowUnwatchedCount(value);
notifyListeners();
}
}
Future<void> setAlwaysKeepSidebarOpen(bool value) => _updateSetting(
current: _alwaysKeepSidebarOpen, value: value,
setLocal: (v) => _alwaysKeepSidebarOpen = v,
persist: _settingsService!.setAlwaysKeepSidebarOpen,
);
Future<void> setShowUnwatchedCount(bool value) => _updateSetting(
current: _showUnwatchedCount, value: value,
setLocal: (v) => _showUnwatchedCount = v,
persist: _settingsService!.setShowUnwatchedCount,
);
String get libraryDensityDisplayName {
switch (_libraryDensity) {
+35 -12
View File
@@ -16,6 +16,7 @@ import '../i18n/strings.g.dart';
import '../theme/mono_tokens.dart';
import '../utils/app_logger.dart';
import '../utils/platform_detector.dart';
import '../focus/focusable_button.dart';
import 'main_screen.dart';
class AuthScreen extends StatefulWidget {
@@ -398,7 +399,7 @@ class _AuthScreenState extends State<AuthScreen> {
children: [
if (isTV) ...[
// On TV: QR is primary, browser is secondary
ElevatedButton(
FocusableButton(
autofocus: true,
onPressed: () {
setState(() {
@@ -406,14 +407,25 @@ class _AuthScreenState extends State<AuthScreen> {
});
_startAuthentication();
},
style: ElevatedButton.styleFrom(padding: const EdgeInsets.symmetric(vertical: 16)),
child: Text(t.auth.showQRCode),
child: ElevatedButton(
onPressed: () {
setState(() {
_useQrFlow = true;
});
_startAuthentication();
},
style: ElevatedButton.styleFrom(padding: const EdgeInsets.symmetric(vertical: 16)),
child: Text(t.auth.showQRCode),
),
),
const SizedBox(height: 12),
OutlinedButton(
FocusableButton(
onPressed: _startAuthentication,
style: OutlinedButton.styleFrom(padding: const EdgeInsets.symmetric(vertical: 16)),
child: Text(t.auth.useBrowser),
child: OutlinedButton(
onPressed: _startAuthentication,
style: OutlinedButton.styleFrom(padding: const EdgeInsets.symmetric(vertical: 16)),
child: Text(t.auth.useBrowser),
),
),
] else ...[
// On other platforms: Browser is primary, QR is secondary
@@ -500,22 +512,33 @@ class _AuthScreenState extends State<AuthScreen> {
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
OutlinedButton(
FocusableButton(
autofocus: true,
onPressed: _retryAuthentication,
style: OutlinedButton.styleFrom(padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 24)),
child: Text(t.common.retry),
child: OutlinedButton(
onPressed: _retryAuthentication,
style: OutlinedButton.styleFrom(padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 24)),
child: Text(t.common.retry),
),
),
const SizedBox(width: 16),
OutlinedButton(
FocusableButton(
onPressed: () {
setState(() {
_useQrFlow = false;
});
_startAuthentication();
},
style: OutlinedButton.styleFrom(padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 24)),
child: Text(t.auth.useBrowser),
child: OutlinedButton(
onPressed: () {
setState(() {
_useQrFlow = false;
});
_startAuthentication();
},
style: OutlinedButton.styleFrom(padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 24)),
child: Text(t.auth.useBrowser),
),
),
],
),
+34 -215
View File
@@ -7,8 +7,6 @@ import 'package:provider/provider.dart';
import '../../i18n/strings.g.dart';
import '../../providers/companion_remote_provider.dart';
import '../../utils/formatters.dart';
import '../../models/companion_remote/recent_remote_session.dart';
import '../../utils/app_logger.dart';
class PairingScreen extends StatefulWidget {
@@ -24,8 +22,6 @@ class _PairingScreenState extends State<PairingScreen> {
final _pinController = TextEditingController();
final _formKey = GlobalKey<FormState>();
bool _isConnecting = false;
String? _connectingSessionId;
bool _isDiscovering = false;
String? _errorMessage;
int _selectedTab = 0;
@@ -35,15 +31,9 @@ class _PairingScreenState extends State<PairingScreen> {
bool get _isMobile => Platform.isAndroid || Platform.isIOS;
// Tab indices shift when scan tab is present
int get _scanTabIndex => _isMobile ? 1 : -1;
int get _manualTabIndex => _isMobile ? 2 : 1;
@override
void initState() {
super.initState();
_loadRecentSessions();
}
// Tab indices: mobile gets Scan (0) + Manual (1), desktop gets Manual (0)
int get _scanTabIndex => _isMobile ? 0 : -1;
int get _manualTabIndex => _isMobile ? 1 : 0;
@override
void dispose() {
@@ -54,51 +44,6 @@ class _PairingScreenState extends State<PairingScreen> {
super.dispose();
}
Future<void> _loadRecentSessions() async {
setState(() {
_isDiscovering = true;
_errorMessage = null;
});
try {
await context.read<CompanionRemoteProvider>().loadRecentSessions();
if (!mounted) return;
setState(() {
_isDiscovering = false;
});
} catch (e) {
appLogger.e('Failed to load recent sessions', error: e);
if (!mounted) return;
setState(() {
_isDiscovering = false;
_errorMessage = t.companionRemote.pairing.failedToLoadRecent(error: e.toString());
});
}
}
Future<void> _connectToRecentSession(RecentRemoteSession session) async {
setState(() {
_isConnecting = true;
_connectingSessionId = session.sessionId;
_errorMessage = null;
});
try {
await context.read<CompanionRemoteProvider>().connectToRecentSession(session);
if (mounted) {
Navigator.of(context).pop();
}
} catch (e) {
appLogger.e('Failed to connect to recent session', error: e);
setState(() {
_isConnecting = false;
_connectingSessionId = null;
_errorMessage = _parseErrorMessage(e.toString());
});
}
}
Future<void> _connect() async {
if (!_formKey.currentState!.validate()) {
return;
@@ -143,23 +88,26 @@ class _PairingScreenState extends State<PairingScreen> {
if (data == _lastScannedCode) return;
_lastScannedCode = data;
// Strip URL wrapper if present (e.g. "https://plezy.app/scan#ip|port|sid|pin")
// Strip URL wrapper if present (e.g. "https://plezy.app/scan#ip1,ip2|port|sid|pin")
final payload = data.contains('#') ? data.split('#').last : data;
final parts = payload.split('|');
if (parts.length == 4) {
final ip = parts.first;
final ipsField = parts.first;
final port = parts[1];
final sessionId = parts[2];
final pin = parts[3];
final hostAddress = '$ip:$port';
// Support comma-separated IPs (multi-NIC) or single IP (legacy)
final ips = ipsField.split(',');
final hostAddresses = ips.map((ip) => '$ip:$port').toList();
_scannerController?.stop();
setState(() {
_errorMessage = null;
_isConnecting = true;
});
// Connect directly instead of going through _connect() which requires Form validation
_connectWithCredentials(sessionId, pin, hostAddress);
_connectWithCredentialsMulti(sessionId, pin, hostAddresses);
} else {
setState(() {
_errorMessage = t.companionRemote.pairing.invalidQrCode;
@@ -167,10 +115,14 @@ class _PairingScreenState extends State<PairingScreen> {
}
}
Future<void> _connectWithCredentials(String sessionId, String pin, String hostAddress) async {
Future<void> _connectWithCredentialsMulti(String sessionId, String pin, List<String> hostAddresses) async {
try {
final provider = context.read<CompanionRemoteProvider>();
await provider.joinSession(sessionId.trim().toUpperCase(), pin.trim(), hostAddress.trim());
await provider.joinSessionMulti(
sessionId.trim().toUpperCase(),
pin.trim(),
hostAddresses.map((a) => a.trim()).toList(),
);
if (mounted) {
Navigator.of(context).pop();
@@ -201,39 +153,30 @@ class _PairingScreenState extends State<PairingScreen> {
return Scaffold(
appBar: AppBar(
title: Text(t.companionRemote.connectToDevice),
actions: [
if (_selectedTab == 0)
IconButton(
icon: const Icon(Icons.refresh),
onPressed: _isDiscovering ? null : _loadRecentSessions,
tooltip: t.common.refresh,
),
],
),
body: Column(
children: [
SegmentedButton<int>(
segments: [
ButtonSegment(value: 0, label: Text(t.companionRemote.pairing.recent), icon: const Icon(Icons.history)),
if (_isMobile)
if (_isMobile)
SegmentedButton<int>(
segments: [
ButtonSegment(
value: _scanTabIndex,
label: Text(t.companionRemote.pairing.scan),
icon: const Icon(Icons.qr_code_scanner),
),
ButtonSegment(
value: _manualTabIndex,
label: Text(t.companionRemote.pairing.manual),
icon: const Icon(Icons.keyboard),
),
],
selected: {_selectedTab},
onSelectionChanged: (Set<int> selection) {
setState(() {
_selectedTab = selection.first;
});
},
),
ButtonSegment(
value: _manualTabIndex,
label: Text(t.companionRemote.pairing.manual),
icon: const Icon(Icons.keyboard),
),
],
selected: {_selectedTab},
onSelectionChanged: (Set<int> selection) {
setState(() {
_selectedTab = selection.first;
});
},
),
Expanded(child: _buildTabContent()),
],
),
@@ -241,8 +184,7 @@ class _PairingScreenState extends State<PairingScreen> {
}
Widget _buildTabContent() {
if (_selectedTab == 0) return _buildDiscoveryTab();
if (_selectedTab == _scanTabIndex) return _buildScanTab();
if (_selectedTab == _scanTabIndex && _isMobile) return _buildScanTab();
return _buildManualEntryTab();
}
@@ -329,129 +271,6 @@ class _PairingScreenState extends State<PairingScreen> {
);
}
Widget _buildDiscoveryTab() {
return Consumer<CompanionRemoteProvider>(
builder: (context, provider, child) {
final sessions = provider.recentSessions;
return SingleChildScrollView(
padding: const EdgeInsets.all(24.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const Icon(Icons.history, size: 64, color: Colors.blue),
const SizedBox(height: 24),
Text(
t.companionRemote.pairing.recentConnections,
style: Theme.of(context).textTheme.headlineMedium,
textAlign: TextAlign.center,
),
const SizedBox(height: 8),
Text(
t.companionRemote.pairing.quickReconnect,
style: Theme.of(context).textTheme.bodyMedium,
textAlign: TextAlign.center,
),
const SizedBox(height: 32),
if (_isDiscovering) ...[
const Center(child: CircularProgressIndicator()),
const SizedBox(height: 16),
Text(t.common.loading, style: Theme.of(context).textTheme.bodyMedium, textAlign: TextAlign.center),
] else if (sessions.isEmpty) ...[
Card(
child: Padding(
padding: const EdgeInsets.all(24.0),
child: Column(
children: [
Icon(Icons.devices_other, size: 48, color: Theme.of(context).colorScheme.outline),
const SizedBox(height: 16),
Text(
t.companionRemote.pairing.noRecentConnections,
style: Theme.of(context).textTheme.titleMedium,
),
const SizedBox(height: 8),
Text(
t.companionRemote.pairing.connectUsingManual,
style: Theme.of(context).textTheme.bodySmall,
textAlign: TextAlign.center,
),
],
),
),
),
] else ...[
...sessions.map((session) {
final isThisConnecting = _isConnecting && _connectingSessionId == session.sessionId;
return Card(
margin: const EdgeInsets.only(bottom: 8),
child: ListTile(
leading: const Icon(Icons.computer, size: 40),
title: Text(session.deviceName),
subtitle: Text(
'${session.platform}\n'
'Session: ${session.sessionId}\n'
'Last used: ${_formatDate(session.lastConnected)}',
),
isThreeLine: true,
trailing: isThisConnecting
? const SizedBox(width: 24, height: 24, child: CircularProgressIndicator(strokeWidth: 2))
: const Icon(Icons.arrow_forward),
onTap: _isConnecting ? null : () => _connectToRecentSession(session),
onLongPress: () => _showRemoveSessionDialog(session),
),
);
}),
],
if (_errorMessage != null) ...[
const SizedBox(height: 16),
Card(
color: Theme.of(context).colorScheme.errorContainer,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Row(
children: [
Icon(Icons.error_outline, color: Theme.of(context).colorScheme.onErrorContainer),
const SizedBox(width: 12),
Expanded(
child: Text(
_errorMessage!,
style: TextStyle(color: Theme.of(context).colorScheme.onErrorContainer),
),
),
],
),
),
),
],
],
),
);
},
);
}
String _formatDate(DateTime date) {
return formatRelativeTime(date);
}
Future<void> _showRemoveSessionDialog(RecentRemoteSession session) async {
final confirmed = await showDialog<bool>(
context: context,
builder: (context) => AlertDialog(
title: Text(t.companionRemote.pairing.removeRecentConnection),
content: Text(t.companionRemote.pairing.removeConfirm(name: session.deviceName)),
actions: [
TextButton(onPressed: () => Navigator.pop(context, false), child: Text(t.common.cancel)),
TextButton(onPressed: () => Navigator.pop(context, true), child: Text(t.common.remove)),
],
),
);
if (confirmed == true && mounted) {
await context.read<CompanionRemoteProvider>().removeRecentSession(session.sessionId);
}
}
Widget _buildManualEntryTab() {
return SingleChildScrollView(
padding: const EdgeInsets.all(24.0),
+214 -352
View File
@@ -5,7 +5,8 @@ import 'package:flutter/material.dart';
import 'package:plezy/widgets/app_icon.dart';
import 'package:material_symbols_icons/symbols.dart';
import 'package:provider/provider.dart';
import '../focus/dpad_navigator.dart';
import '../focus/key_event_utils.dart';
import '../utils/global_key_utils.dart';
import 'package:cached_network_image/cached_network_image.dart';
import '../../services/plex_client.dart';
import '../utils/plex_image_helper.dart';
@@ -81,8 +82,6 @@ class _DiscoverScreenState extends State<DiscoverScreen>
bool _isAutoScrollPaused = false;
HiddenLibrariesProvider? _hiddenLibrariesProvider;
String _toGlobalKey(String ratingKey, String serverId) => '$serverId:$ratingKey';
// WatchStateAware: watch on-deck items and their parent shows/seasons
@override
Set<String>? get watchedRatingKeys {
@@ -106,12 +105,12 @@ class _DiscoverScreenState extends State<DiscoverScreen>
final serverId = item.serverId;
if (serverId == null) return null;
keys.add(_toGlobalKey(item.ratingKey, serverId));
keys.add(buildGlobalKey(serverId, item.ratingKey));
if (item.parentRatingKey != null) {
keys.add(_toGlobalKey(item.parentRatingKey!, serverId));
keys.add(buildGlobalKey(serverId, item.parentRatingKey!));
}
if (item.grandparentRatingKey != null) {
keys.add(_toGlobalKey(item.grandparentRatingKey!, serverId));
keys.add(buildGlobalKey(serverId, item.grandparentRatingKey!));
}
}
return keys;
@@ -155,16 +154,16 @@ class _DiscoverScreenState extends State<DiscoverScreen>
return context.getClientForServer(serverId);
}
/// Update hub keys when hubs list changes
/// Update hub keys when hubs list changes — reuse existing keys to avoid
/// mass deep unmounts (ARM32 stack overflow during finalizeTree).
void _updateHubKeys() {
_hubKeys.clear();
for (int i = 0; i < _hubs.length; i++) {
while (_hubKeys.length < _hubs.length) {
_hubKeys.add(GlobalKey<HubSectionState>());
}
// Create continue watching hub key if needed
if (_onDeck.isNotEmpty) {
_continueWatchingHubKey ??= GlobalKey<HubSectionState>();
if (_hubKeys.length > _hubs.length) {
_hubKeys.removeRange(_hubs.length, _hubKeys.length);
}
_continueWatchingHubKey ??= GlobalKey<HubSectionState>();
}
/// Get all hub states (continue watching + other hubs)
@@ -306,211 +305,69 @@ class _DiscoverScreenState extends State<DiscoverScreen>
}
/// Handle key events for the hero section
KeyEventResult _handleHeroKeyEvent(FocusNode _, KeyEvent event) {
if (!event.isActionable) {
return KeyEventResult.ignored;
}
final key = event.logicalKey;
// DOWN: Move to first hub
if (key.isDownKey) {
late final _handleHeroKeyEvent = dpadKeyHandler(
onDown: () {
final keys = _allHubKeys;
if (keys.isNotEmpty) {
keys.first.currentState?.requestFocusFromMemory();
}
return KeyEventResult.handled;
}
// UP: Move to app bar (refresh button)
if (key.isUpKey) {
_refreshButtonFocusNode.requestFocus();
return KeyEventResult.handled;
}
// LEFT: Navigate hero carousel to previous, or focus sidebar at index 0
if (key.isLeftKey) {
if (keys.isNotEmpty) keys.first.currentState?.requestFocusFromMemory();
},
onUp: () => _refreshButtonFocusNode.requestFocus(),
onLeft: () {
if (_currentHeroIndex > 0) {
_heroController.previousPage(duration: tokens(context).slow, curve: Curves.easeInOut);
} else {
_navigateToSidebar();
}
return KeyEventResult.handled;
}
// RIGHT: Navigate hero carousel to next
if (key.isRightKey) {
},
onRight: () {
if (_currentHeroIndex < _onDeck.length - 1) {
_heroController.nextPage(duration: tokens(context).slow, curve: Curves.easeInOut);
}
return KeyEventResult.handled;
}
// SELECT: Play current hero item
if (key.isSelectKey) {
},
onSelect: () {
if (_onDeck.isNotEmpty && _currentHeroIndex < _onDeck.length) {
navigateToVideoPlayer(context, metadata: _onDeck[_currentHeroIndex]);
}
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
}
},
);
/// Handle key events for the refresh button in app bar
KeyEventResult _handleRefreshKeyEvent(FocusNode _, KeyEvent event) {
if (!event.isActionable) {
return KeyEventResult.ignored;
}
final key = event.logicalKey;
// DOWN: Return to hero/content
if (key.isDownKey) {
_focusContentFromAppBar();
return KeyEventResult.handled;
}
// RIGHT: Move to watch together button
if (key.isRightKey) {
_watchTogetherButtonFocusNode.requestFocus();
return KeyEventResult.handled;
}
// LEFT: Navigate to sidebar
if (key.isLeftKey) {
_navigateToSidebar();
return KeyEventResult.handled;
}
// UP: Block at boundary
if (key.isUpKey) {
return KeyEventResult.handled;
}
// SELECT: Trigger refresh
if (key.isSelectKey) {
_loadContent();
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
}
late final _handleRefreshKeyEvent = dpadKeyHandler(
onDown: _focusContentFromAppBar,
onRight: () => _watchTogetherButtonFocusNode.requestFocus(),
onLeft: _navigateToSidebar,
onUp: () {}, // Block at boundary
onSelect: _loadContent,
);
/// Handle key events for the watch together button in app bar
KeyEventResult _handleWatchTogetherKeyEvent(FocusNode _, KeyEvent event) {
if (!event.isActionable) {
return KeyEventResult.ignored;
}
final key = event.logicalKey;
// DOWN: Return to hero/content
if (key.isDownKey) {
_focusContentFromAppBar();
return KeyEventResult.handled;
}
// LEFT: Move to refresh button
if (key.isLeftKey) {
_refreshButtonFocusNode.requestFocus();
return KeyEventResult.handled;
}
// RIGHT: Move to companion remote button
if (key.isRightKey) {
_companionRemoteButtonFocusNode.requestFocus();
return KeyEventResult.handled;
}
// UP: Block at boundary
if (key.isUpKey) {
return KeyEventResult.handled;
}
// SELECT: Navigate to Watch Together screen
if (key.isSelectKey) {
Navigator.push(context, MaterialPageRoute(builder: (_) => const WatchTogetherScreen()));
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
}
late final _handleWatchTogetherKeyEvent = dpadKeyHandler(
onDown: _focusContentFromAppBar,
onLeft: () => _refreshButtonFocusNode.requestFocus(),
onRight: () => _companionRemoteButtonFocusNode.requestFocus(),
onUp: () {}, // Block at boundary
onSelect: () => Navigator.push(context, MaterialPageRoute(builder: (_) => const WatchTogetherScreen())),
);
/// Handle key events for the companion remote button in app bar
KeyEventResult _handleCompanionRemoteKeyEvent(FocusNode _, KeyEvent event) {
if (!event.isActionable) {
return KeyEventResult.ignored;
}
final key = event.logicalKey;
// DOWN: Return to hero
if (key.isDownKey) {
_heroFocusNode.requestFocus();
return KeyEventResult.handled;
}
// LEFT: Move to watch together button
if (key.isLeftKey) {
_watchTogetherButtonFocusNode.requestFocus();
return KeyEventResult.handled;
}
// RIGHT: Move to user button
if (key.isRightKey) {
_userButtonFocusNode.requestFocus();
return KeyEventResult.handled;
}
// UP: Block at boundary
if (key.isUpKey) {
return KeyEventResult.handled;
}
// SELECT: Show companion remote dialog (host a remote session)
if (key.isSelectKey) {
RemoteSessionDialog.show(context);
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
}
late final _handleCompanionRemoteKeyEvent = dpadKeyHandler(
onDown: () => _heroFocusNode.requestFocus(),
onLeft: () => _watchTogetherButtonFocusNode.requestFocus(),
onRight: () => _userButtonFocusNode.requestFocus(),
onUp: () {}, // Block at boundary
onSelect: () => RemoteSessionDialog.show(context),
);
/// Handle key events for the user button in app bar
KeyEventResult _handleUserKeyEvent(FocusNode _, KeyEvent event) {
if (!event.isActionable) {
return KeyEventResult.ignored;
}
final key = event.logicalKey;
// DOWN: Return to hero/content
if (key.isDownKey) {
_focusContentFromAppBar();
return KeyEventResult.handled;
}
// LEFT: Move to companion remote button
if (key.isLeftKey) {
_companionRemoteButtonFocusNode.requestFocus();
return KeyEventResult.handled;
}
// RIGHT/UP: Block at boundary
if (key.isRightKey || key.isUpKey) {
return KeyEventResult.handled;
}
// SELECT: Show user menu
if (key.isSelectKey) {
late final _handleUserKeyEvent = dpadKeyHandler(
onDown: _focusContentFromAppBar,
onLeft: () => _companionRemoteButtonFocusNode.requestFocus(),
onRight: () {}, // Block at boundary
onUp: () {}, // Block at boundary
onSelect: () {
final userProvider = context.read<UserProfileProvider>();
_showUserMenu(context, userProvider);
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
}
},
);
@override
void dispose() {
@@ -1240,138 +1097,137 @@ class _DiscoverScreenState extends State<DiscoverScreen>
final showServerNameOnHubs = context.watch<SettingsProvider>().showServerNameOnHubs;
final duplicateHubTitles = _getDuplicateHubTitles();
return Scaffold(
body: Stack(
final bottomPadding = MediaQuery.of(context).padding.bottom;
return Material(
color: Theme.of(context).scaffoldBackgroundColor,
child: Stack(
children: [
SafeArea(
top: false,
child: CustomScrollView(
controller: _scrollController,
slivers: [
// Hero Section (Continue Watching) - at top of screen
Consumer<SettingsProvider>(
builder: (context, settingsProvider, child) {
if (_onDeck.isNotEmpty && settingsProvider.showHeroSection) {
return _buildHeroSection();
}
// Add top padding when hero is not shown
return SliverToBoxAdapter(
child: SizedBox(height: kToolbarHeight + MediaQuery.of(context).padding.top + 16),
);
},
CustomScrollView(
controller: _scrollController,
slivers: [
// Hero Section (Continue Watching) - at top of screen
Consumer<SettingsProvider>(
builder: (context, settingsProvider, child) {
if (_onDeck.isNotEmpty && settingsProvider.showHeroSection) {
return _buildHeroSection();
}
// Add top padding when hero is not shown
return SliverToBoxAdapter(
child: SizedBox(height: kToolbarHeight + MediaQuery.of(context).padding.top + 16),
);
},
),
if (_isLoading) const SliverFillRemaining(child: Center(child: CircularProgressIndicator())),
if (_errorMessage != null)
SliverFillRemaining(
child: ErrorStateWidget(
message: _errorMessage!,
icon: Symbols.error_outline_rounded,
onRetry: _loadContent,
),
),
if (_isLoading) const SliverFillRemaining(child: Center(child: CircularProgressIndicator())),
if (_errorMessage != null)
SliverFillRemaining(
child: ErrorStateWidget(
message: _errorMessage!,
icon: Symbols.error_outline_rounded,
onRetry: _loadContent,
if (!_isLoading && _errorMessage == null) ...[
// On Deck / Continue Watching
if (_onDeck.isNotEmpty)
SliverToBoxAdapter(
child: HubSection(
key: _continueWatchingHubKey,
hub: PlexHub(
hubKey: 'continue_watching',
title: t.discover.continueWatching,
type: 'mixed',
hubIdentifier: '_continue_watching_',
size: _onDeck.length,
more: false,
items: _onDeck,
),
icon: Symbols.play_circle_rounded,
onRefresh: updateItem,
onRemoveFromContinueWatching: _refreshContinueWatching,
isInContinueWatching: true,
onVerticalNavigation: (isUp) => _handleVerticalNavigation(0, isUp),
onNavigateUp: _focusTopBoundary,
onNavigateToSidebar: _navigateToSidebar,
),
),
if (!_isLoading && _errorMessage == null) ...[
// On Deck / Continue Watching
if (_onDeck.isNotEmpty)
SliverToBoxAdapter(
child: HubSection(
key: _continueWatchingHubKey,
hub: PlexHub(
hubKey: 'continue_watching',
title: t.discover.continueWatching,
type: 'mixed',
hubIdentifier: '_continue_watching_',
size: _onDeck.length,
more: false,
items: _onDeck,
),
icon: Symbols.play_circle_rounded,
onRefresh: updateItem,
onRemoveFromContinueWatching: _refreshContinueWatching,
isInContinueWatching: true,
onVerticalNavigation: (isUp) => _handleVerticalNavigation(0, isUp),
onNavigateUp: _focusTopBoundary,
onNavigateToSidebar: _navigateToSidebar,
),
// Recommendation Hubs (Trending, Top in Genre, etc.)
for (int i = 0; i < _hubs.length; i++)
SliverToBoxAdapter(
child: HubSection(
key: i < _hubKeys.length ? _hubKeys[i] : null,
hub: _hubs[i],
icon: _getHubIcon(_hubs[i].title),
showServerName: showServerNameOnHubs || duplicateHubTitles.contains(_hubs[i].title),
onRefresh: updateItem,
// Hub index is i + 1 if continue watching exists, otherwise i
onVerticalNavigation: (isUp) => _handleVerticalNavigation(_onDeck.isNotEmpty ? i + 1 : i, isUp),
onNavigateUp: (i == 0 && _onDeck.isEmpty) ? _focusTopBoundary : null,
onNavigateToSidebar: _navigateToSidebar,
),
),
// Recommendation Hubs (Trending, Top in Genre, etc.)
for (int i = 0; i < _hubs.length; i++)
// Show loading skeleton for hubs while they're loading
if (_areHubsLoading && _hubs.isEmpty)
for (int i = 0; i < 3; i++)
SliverToBoxAdapter(
child: HubSection(
key: i < _hubKeys.length ? _hubKeys[i] : null,
hub: _hubs[i],
icon: _getHubIcon(_hubs[i].title),
showServerName: showServerNameOnHubs || duplicateHubTitles.contains(_hubs[i].title),
onRefresh: updateItem,
// Hub index is i + 1 if continue watching exists, otherwise i
onVerticalNavigation: (isUp) => _handleVerticalNavigation(_onDeck.isNotEmpty ? i + 1 : i, isUp),
onNavigateUp: (i == 0 && _onDeck.isEmpty) ? _focusTopBoundary : null,
onNavigateToSidebar: _navigateToSidebar,
),
),
// Show loading skeleton for hubs while they're loading
if (_areHubsLoading && _hubs.isEmpty)
for (int i = 0; i < 3; i++)
SliverToBoxAdapter(
child: Container(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Hub title skeleton
Container(
width: 200,
height: 24,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
borderRadius: const BorderRadius.all(Radius.circular(4)),
),
),
const SizedBox(height: 16),
// Hub items skeleton
SizedBox(
height: 200,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: 5,
itemBuilder: (context, index) {
return Container(
margin: const EdgeInsets.only(right: 12),
width: 140,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
borderRadius: BorderRadius.circular(tokens(context).radiusSm),
),
);
},
),
),
],
),
),
),
if (_onDeck.isEmpty && _hubs.isEmpty && !_areHubsLoading)
SliverFillRemaining(
child: Center(
child: Container(
padding: const EdgeInsets.all(16),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppIcon(Symbols.movie_rounded, fill: 1, size: 64, color: Colors.grey),
SizedBox(height: 16),
Text(t.discover.noContentAvailable),
SizedBox(height: 8),
Text(t.discover.addMediaToLibraries, style: TextStyle(color: Colors.grey)),
// Hub title skeleton
Container(
width: 200,
height: 24,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
borderRadius: const BorderRadius.all(Radius.circular(4)),
),
),
const SizedBox(height: 16),
// Hub items skeleton
SizedBox(
height: 200,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: 5,
itemBuilder: (context, index) {
return Container(
margin: const EdgeInsets.only(right: 12),
width: 140,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
borderRadius: BorderRadius.circular(tokens(context).radiusSm),
),
);
},
),
),
],
),
),
),
const SliverToBoxAdapter(child: SizedBox(height: 24)),
],
if (_onDeck.isEmpty && _hubs.isEmpty && !_areHubsLoading)
SliverFillRemaining(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppIcon(Symbols.movie_rounded, fill: 1, size: 64, color: Colors.grey),
SizedBox(height: 16),
Text(t.discover.noContentAvailable),
SizedBox(height: 8),
Text(t.discover.addMediaToLibraries, style: TextStyle(color: Colors.grey)),
],
),
),
),
SliverToBoxAdapter(child: SizedBox(height: 24 + bottomPadding)),
],
),
],
),
// Overlaid app bar — excluded from default focus traversal so that
// initial/tab-switch focus lands on content (hero/hubs), not the toolbar.
@@ -1582,14 +1438,16 @@ class _DiscoverScreenState extends State<DiscoverScreen>
imageType: ImageType.art,
);
return blurArtwork(CachedNetworkImage(
imageUrl: imageUrl,
fit: BoxFit.cover,
placeholder: (context, url) =>
Container(color: Theme.of(context).colorScheme.surfaceContainerHighest),
errorWidget: (context, url, error) =>
Container(color: Theme.of(context).colorScheme.surfaceContainerHighest),
));
return blurArtwork(
CachedNetworkImage(
imageUrl: imageUrl,
fit: BoxFit.cover,
placeholder: (context, url) =>
Container(color: Theme.of(context).colorScheme.surfaceContainerHighest),
errorWidget: (context, url, error) =>
Container(color: Theme.of(context).colorScheme.surfaceContainerHighest),
),
);
},
),
),
@@ -1650,39 +1508,19 @@ class _DiscoverScreenState extends State<DiscoverScreen>
imageType: ImageType.logo,
);
return blurArtwork(CachedNetworkImage(
imageUrl: logoUrl,
filterQuality: FilterQuality.medium,
fit: BoxFit.contain,
memCacheWidth: (400 * dpr).clamp(200, 800).round(),
alignment: isLargeScreen ? Alignment.bottomLeft : Alignment.bottomCenter,
placeholder: (context, url) => Align(
alignment: isLargeScreen ? Alignment.centerLeft : Alignment.center,
child: Text(
showName,
style: Theme.of(context).textTheme.displaySmall?.copyWith(
color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.3),
fontWeight: FontWeight.bold,
shadows: [
Shadow(
color: Theme.of(context).colorScheme.surface.withValues(alpha: 0.8),
blurRadius: 8,
),
],
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: isLargeScreen ? TextAlign.left : TextAlign.center,
),
),
errorWidget: (context, url, error) {
// Fallback to text if logo fails to load
return Align(
return blurArtwork(
CachedNetworkImage(
imageUrl: logoUrl,
filterQuality: FilterQuality.medium,
fit: BoxFit.contain,
memCacheWidth: (400 * dpr).clamp(200, 800).round(),
alignment: isLargeScreen ? Alignment.bottomLeft : Alignment.bottomCenter,
placeholder: (context, url) => Align(
alignment: isLargeScreen ? Alignment.centerLeft : Alignment.center,
child: Text(
showName,
style: Theme.of(context).textTheme.displaySmall?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.3),
fontWeight: FontWeight.bold,
shadows: [
Shadow(
@@ -1695,9 +1533,33 @@ class _DiscoverScreenState extends State<DiscoverScreen>
overflow: TextOverflow.ellipsis,
textAlign: isLargeScreen ? TextAlign.left : TextAlign.center,
),
);
},
), sigma: 10, clip: false);
),
errorWidget: (context, url, error) {
// Fallback to text if logo fails to load
return Align(
alignment: isLargeScreen ? Alignment.centerLeft : Alignment.center,
child: Text(
showName,
style: Theme.of(context).textTheme.displaySmall?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
fontWeight: FontWeight.bold,
shadows: [
Shadow(
color: Theme.of(context).colorScheme.surface.withValues(alpha: 0.8),
blurRadius: 8,
),
],
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: isLargeScreen ? TextAlign.left : TextAlign.center,
),
);
},
),
sigma: 10,
clip: false,
);
},
),
)
+1 -1
View File
@@ -382,7 +382,7 @@ class _HubDetailScreenState extends State<HubDetailScreen> with Refreshable, Gri
episodePosterMode == EpisodePosterMode.episodeThumbnail && (isEpisodeOnlyHub || isMixedHub);
return SliverPadding(
padding: const EdgeInsets.fromLTRB(8, 8, 8, 8),
padding: const EdgeInsets.all(8),
sliver: SliverLayoutBuilder(
builder: (context, constraints) {
final maxExtent = GridSizeCalculator.getMaxCrossAxisExtentWithPadding(
+113 -44
View File
@@ -1,7 +1,10 @@
import 'package:flutter/material.dart';
import 'package:plezy/widgets/app_icon.dart';
import 'package:material_symbols_icons/symbols.dart';
import '../../focus/focusable_button.dart';
import '../../focus/focusable_wrapper.dart';
import '../../models/plex_metadata.dart';
import '../../i18n/strings.g.dart';
/// Individual item in the folder tree
/// Can be either a folder (expandable) or a file (tappable)
@@ -12,7 +15,11 @@ class FolderTreeItem extends StatelessWidget {
final bool isFolder;
final VoidCallback? onTap;
final VoidCallback? onExpand;
final VoidCallback? onPlayAll;
final VoidCallback? onShuffle;
final bool isLoading;
final FocusNode? focusNode;
final VoidCallback? onNavigateUp;
const FolderTreeItem({
super.key,
@@ -22,7 +29,11 @@ class FolderTreeItem extends StatelessWidget {
this.isFolder = false,
this.onTap,
this.onExpand,
this.onPlayAll,
this.onShuffle,
this.isLoading = false,
this.focusNode,
this.onNavigateUp,
});
IconData _getIcon() {
@@ -61,56 +72,114 @@ class FolderTreeItem extends StatelessWidget {
final indentation = depth * 24.0;
final expandIcon = isExpanded ? Symbols.keyboard_arrow_down_rounded : Symbols.keyboard_arrow_right_rounded;
return InkWell(
onTap: _handleTap,
child: Container(
padding: EdgeInsets.only(left: 16.0 + indentation, right: 16.0, top: 12.0, bottom: 12.0),
child: Row(
children: [
// Expand/collapse icon for folders
if (isFolder)
SizedBox(
width: 24,
child: isLoading
? const SizedBox(width: 16, height: 16, child: CircularProgressIndicator(strokeWidth: 2))
: AppIcon(expandIcon, fill: 1, size: 20),
)
else
const SizedBox(width: 24),
final rowContent = Container(
padding: EdgeInsets.only(left: 16.0 + indentation, right: 8.0, top: 8.0, bottom: 8.0),
child: Row(
children: [
// Expand/collapse icon for folders
if (isFolder)
SizedBox(
width: 24,
child: isLoading
? const SizedBox(width: 16, height: 16, child: CircularProgressIndicator(strokeWidth: 2))
: AppIcon(expandIcon, fill: 1, size: 20),
)
else
const SizedBox(width: 24),
const SizedBox(width: 8),
const SizedBox(width: 8),
// File/folder icon
AppIcon(
_getIcon(),
fill: 1,
size: 20,
color: isFolder
? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.7),
// File/folder icon
AppIcon(
_getIcon(),
fill: 1,
size: 20,
color: isFolder
? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.7),
),
const SizedBox(width: 12),
// Item title
Expanded(
child: Text(
item.title,
style: TextStyle(fontSize: 14, fontWeight: isFolder ? FontWeight.w500 : FontWeight.w400),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
const SizedBox(width: 12),
// Item title
Expanded(
child: Text(
item.title,
style: TextStyle(fontSize: 14, fontWeight: isFolder ? FontWeight.w500 : FontWeight.w400),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
// Additional metadata for files
if (!isFolder && item.year != null)
Text(
item.year.toString(),
style: TextStyle(fontSize: 12, color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.6)),
),
// Additional metadata for files
if (!isFolder && item.year != null)
Text(
item.year.toString(),
style: TextStyle(fontSize: 12, color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.6)),
),
],
),
],
),
);
return Row(
children: [
// Main item row — expand/navigate on select
Expanded(
child: FocusableWrapper(
focusNode: focusNode,
onSelect: _handleTap,
onNavigateUp: onNavigateUp,
useBackgroundFocus: true,
disableScale: true,
descendantsAreFocusable: false,
child: GestureDetector(
onTap: _handleTap,
behavior: HitTestBehavior.opaque,
child: rowContent,
),
),
),
// Play/Shuffle buttons for folders
if (isFolder) ...[
FocusableButton(
useBackgroundFocus: true,
onPressed: onPlayAll,
child: IconButton(
onPressed: onPlayAll,
icon: AppIcon(
Symbols.play_arrow_rounded,
fill: 1,
size: 18,
color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.6),
),
tooltip: t.common.play,
iconSize: 18,
constraints: const BoxConstraints(minWidth: 36, minHeight: 36),
padding: EdgeInsets.zero,
visualDensity: VisualDensity.compact,
),
),
FocusableButton(
useBackgroundFocus: true,
onPressed: onShuffle,
child: IconButton(
onPressed: onShuffle,
icon: AppIcon(
Symbols.shuffle_rounded,
fill: 1,
size: 18,
color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.6),
),
tooltip: t.common.shuffle,
iconSize: 18,
constraints: const BoxConstraints(minWidth: 36, minHeight: 36),
padding: EdgeInsets.zero,
visualDensity: VisualDensity.compact,
),
),
],
],
);
}
}
+34 -2
View File
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:material_symbols_icons/symbols.dart';
import '../../models/plex_metadata.dart';
import '../../services/play_queue_launcher.dart';
import '../../utils/app_logger.dart';
import '../../utils/media_navigation_helper.dart';
import '../../utils/provider_extensions.dart';
@@ -15,8 +16,17 @@ class FolderTreeView extends StatefulWidget {
final String libraryKey;
final String? serverId; // Server this library belongs to
final void Function(String)? onRefresh;
final FocusNode? firstItemFocusNode;
final VoidCallback? onNavigateUp;
const FolderTreeView({super.key, required this.libraryKey, this.serverId, this.onRefresh});
const FolderTreeView({
super.key,
required this.libraryKey,
this.serverId,
this.onRefresh,
this.firstItemFocusNode,
this.onNavigateUp,
});
@override
State<FolderTreeView> createState() => _FolderTreeViewState();
@@ -134,6 +144,18 @@ class _FolderTreeViewState extends State<FolderTreeView> {
await navigateToMediaItem(context, item, onRefresh: widget.onRefresh);
}
Future<void> _handleFolderPlay(PlexMetadata folder) async {
final client = context.getClientForServer(widget.serverId!);
final launcher = PlayQueueLauncher(context: context, client: client, serverId: widget.serverId);
await launcher.launchFromFolder(folderKey: folder.key, shuffle: false);
}
Future<void> _handleFolderShuffle(PlexMetadata folder) async {
final client = context.getClientForServer(widget.serverId!);
final launcher = PlayQueueLauncher(context: context, client: client, serverId: widget.serverId);
await launcher.launchFromFolder(folderKey: folder.key, shuffle: true);
}
bool _isFolder(PlexMetadata item) {
// Folders typically don't have a specific type or might have special indicators
// Check for common folder indicators
@@ -152,6 +174,9 @@ class _FolderTreeViewState extends State<FolderTreeView> {
// Create a unique key path that includes parent hierarchy and index
final itemPath = parentPath.isEmpty ? '$i' : '$parentPath-$i';
// First root item gets the external focus node and navigate-up callback
final isFirstRootItem = depth == 0 && i == 0;
// Add the item itself
widgets.add(
FolderTreeItem(
@@ -163,6 +188,10 @@ class _FolderTreeViewState extends State<FolderTreeView> {
isLoading: isLoading,
onExpand: isFolder ? () => _toggleFolder(item) : null,
onTap: !isFolder ? () => _handleItemTap(item) : null,
onPlayAll: isFolder ? () => _handleFolderPlay(item) : null,
onShuffle: isFolder ? () => _handleFolderShuffle(item) : null,
focusNode: isFirstRootItem ? widget.firstItemFocusNode : null,
onNavigateUp: isFirstRootItem ? widget.onNavigateUp : null,
),
);
@@ -197,7 +226,10 @@ class _FolderTreeViewState extends State<FolderTreeView> {
return RefreshIndicator(
onRefresh: _loadRootFolders,
child: ListView(children: _buildTreeItems(_rootFolders, 0)),
child: ListView(
padding: const EdgeInsets.symmetric(horizontal: 8),
children: _buildTreeItems(_rootFolders, 0),
),
);
}
}
+55 -102
View File
@@ -4,6 +4,7 @@ import 'package:material_symbols_icons/symbols.dart';
import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import 'package:dio/dio.dart';
import '../../focus/focusable_button.dart';
import '../../focus/dpad_navigator.dart';
import '../../focus/focus_theme.dart';
import '../../focus/input_mode_tracker.dart';
@@ -350,61 +351,29 @@ class _LibrariesScreenState extends State<LibrariesScreen>
}
/// Handle key events for the edit button in app bar
KeyEventResult _handleEditKeyEvent(FocusNode _, KeyEvent event) {
if (!event.isActionable) return KeyEventResult.ignored;
final key = event.logicalKey;
if (key.isLeftKey) {
// Navigate back to last tab (Playlists)
getTabChipFocusNode(3).requestFocus();
return KeyEventResult.handled;
}
if (key.isRightKey) {
_refreshButtonFocusNode.requestFocus();
return KeyEventResult.handled;
}
if (key.isDownKey) {
_focusCurrentTab();
return KeyEventResult.handled;
}
if (key.isUpKey) {
return KeyEventResult.handled; // Block at boundary
}
if (key.isSelectKey) {
_showLibraryManagementSheet();
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
}
late final _handleEditKeyEvent = dpadKeyHandler(
onLeft: () => getTabChipFocusNode(3).requestFocus(),
onRight: () => _refreshButtonFocusNode.requestFocus(),
onDown: _focusCurrentTab,
onUp: () {}, // Block at boundary
onSelect: _showLibraryManagementSheet,
);
/// Handle key events for the refresh button in app bar
KeyEventResult _handleRefreshKeyEvent(FocusNode _, KeyEvent event) {
if (!event.isActionable) return KeyEventResult.ignored;
final key = event.logicalKey;
if (key.isLeftKey) {
// Navigate to edit button if libraries exist, else to last tab
late final _handleRefreshKeyEvent = dpadKeyHandler(
onLeft: () {
final librariesProvider = context.read<LibrariesProvider>();
if (librariesProvider.libraries.isNotEmpty) {
_editButtonFocusNode.requestFocus();
} else {
getTabChipFocusNode(3).requestFocus();
}
return KeyEventResult.handled;
}
if (key.isRightKey || key.isUpKey) {
return KeyEventResult.handled; // Block at boundary
}
if (key.isDownKey) {
_focusCurrentTab();
return KeyEventResult.handled;
}
if (key.isSelectKey) {
_refreshCurrentTab();
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
}
},
onRight: () {}, // Block at boundary
onUp: () {}, // Block at boundary
onDown: _focusCurrentTab,
onSelect: _refreshCurrentTab,
);
@override
void dispose() {
@@ -555,7 +524,7 @@ class _LibrariesScreenState extends State<LibrariesScreen>
) async {
while (_hasMoreItems && requestId == _requestId) {
try {
final items = await client.getLibraryContent(
final result = await client.getLibraryContent(
library.key,
start: _currentPage * _pageSize,
size: _pageSize,
@@ -564,7 +533,7 @@ class _LibrariesScreenState extends State<LibrariesScreen>
);
// Tag items with server info for multi-server support
final taggedItems = items
final taggedItems = result.items
.map((item) => item.copyWith(serverId: library.serverId, serverName: library.serverName))
.toList();
@@ -1065,9 +1034,8 @@ class _LibrariesScreenState extends State<LibrariesScreen>
// Compute visible libraries (filtered from all libraries)
final visibleLibraries = allLibraries.where((lib) => !hiddenKeys.contains(lib.globalKey)).toList();
return OverlaySheetHost(
child: Scaffold(
body: ScrollConfiguration(
return Scaffold(
body: ScrollConfiguration(
behavior: ScrollConfiguration.of(context).copyWith(scrollbars: false),
child: CustomScrollView(
controller: _outerScrollController,
@@ -1202,12 +1170,12 @@ class _LibrariesScreenState extends State<LibrariesScreen>
],
),
),
),
);
}
}
class _LibraryManagementSheet extends StatefulWidget {
final bool isDialog;
final List<PlexLibrary> allLibraries;
final Set<String> hiddenLibraryKeys;
@@ -1421,52 +1389,27 @@ class _LibraryManagementSheetState extends State<_LibraryManagementSheet> {
Future<void> _showLibraryMenuBottomSheet(BuildContext outerContext, PlexLibrary library) async {
final menuItems = widget.getLibraryMenuItems(library);
final controller = OverlaySheetController.maybeOf(outerContext);
final String? selected;
if (controller != null) {
selected = await controller.push<String>(
builder: (context) => SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.all(16),
child: Text(library.title, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600)),
final selected = await OverlaySheetController.pushAdaptive<String>(
outerContext,
builder: (context) => SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.all(16),
child: Text(library.title, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600)),
),
...menuItems.indexed.map(
(entry) => ListTile(
leading: AppIcon(entry.$2.icon, fill: 1),
title: Text(entry.$2.label),
onTap: () => OverlaySheetController.popAdaptive(context, entry.$2.value),
),
...menuItems.indexed.map(
(entry) => ListTile(
leading: AppIcon(entry.$2.icon, fill: 1),
title: Text(entry.$2.label),
onTap: () => controller.pop(entry.$2.value),
),
),
],
),
),
],
),
);
} else {
selected = await showModalBottomSheet<String>(
context: outerContext,
builder: (context) => SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.all(16),
child: Text(library.title, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600)),
),
...menuItems.indexed.map(
(entry) => ListTile(
leading: AppIcon(entry.$2.icon, fill: 1),
title: Text(entry.$2.label),
onTap: () => Navigator.pop(context, entry.$2.value),
),
),
],
),
),
);
}
),
);
if (selected != null && mounted) {
// Find the selected item to check if confirmation is needed
@@ -1480,11 +1423,21 @@ class _LibraryManagementSheetState extends State<_LibraryManagementSheet> {
title: Text(selectedItem.confirmationTitle ?? t.dialog.confirmAction),
content: Text(selectedItem.confirmationMessage ?? t.libraries.confirmActionMessage),
actions: [
TextButton(onPressed: () => Navigator.pop(context, false), child: Text(t.common.cancel)),
TextButton(
FocusableButton(
autofocus: true,
onPressed: () => Navigator.pop(context, false),
child: TextButton(
onPressed: () => Navigator.pop(context, false),
child: Text(t.common.cancel),
),
),
FocusableButton(
onPressed: () => Navigator.pop(context, true),
style: selectedItem.isDestructive ? TextButton.styleFrom(foregroundColor: Colors.red) : null,
child: Text(t.common.confirm),
child: TextButton(
onPressed: () => Navigator.pop(context, true),
style: selectedItem.isDestructive ? TextButton.styleFrom(foregroundColor: Colors.red) : null,
child: Text(t.common.confirm),
),
),
],
),
@@ -1572,7 +1525,7 @@ class _LibraryManagementSheetState extends State<_LibraryManagementSheet> {
),
IconButton(
icon: const AppIcon(Symbols.close_rounded, fill: 1),
onPressed: () => Navigator.pop(context),
onPressed: () => OverlaySheetController.popAdaptive(context),
),
],
),
+34 -32
View File
@@ -94,40 +94,41 @@ class _SortBottomSheetState extends State<SortBottomSheet> {
action: widget.onClear != null ? TextButton(onPressed: _handleClear, child: Text(t.common.clear)) : null,
),
Expanded(
child: ListView.builder(
padding: const EdgeInsets.symmetric(vertical: 8),
itemCount: widget.sortOptions.length,
itemBuilder: (context, index) {
final sort = widget.sortOptions[index];
final isSelected = _currentSort?.key == sort.key;
child: RadioGroup<PlexSort>(
groupValue: _currentSort,
onChanged: (value) {
if (value != null) _handleSortSelect(value);
},
child: ListView.builder(
padding: const EdgeInsets.symmetric(vertical: 8),
itemCount: widget.sortOptions.length,
itemBuilder: (context, index) {
final sort = widget.sortOptions[index];
final isSelected = _currentSort?.key == sort.key;
return Focus(
canRequestFocus: false,
skipTraversal: true,
onKeyEvent: (node, event) {
if (!event.isActionable) return KeyEventResult.ignored;
if (!isSelected) return KeyEventResult.ignored;
if (event.logicalKey.isLeftKey) {
_handleDirectionChange(sort, false);
return KeyEventResult.handled;
}
if (event.logicalKey.isRightKey) {
_handleDirectionChange(sort, true);
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
},
child: FocusableRadioListTile<PlexSort>(
focusNode: (widget.selectedSort?.key == sort.key || (widget.selectedSort == null && index == 0))
? _initialFocusNode
: null,
title: Text(sort.title),
value: sort,
groupValue: _currentSort,
onChanged: (value) {
if (value != null) _handleSortSelect(value);
return Focus(
canRequestFocus: false,
skipTraversal: true,
onKeyEvent: (node, event) {
if (!event.isActionable) return KeyEventResult.ignored;
if (!isSelected) return KeyEventResult.ignored;
if (event.logicalKey.isLeftKey) {
_handleDirectionChange(sort, false);
return KeyEventResult.handled;
}
if (event.logicalKey.isRightKey) {
_handleDirectionChange(sort, true);
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
},
secondary: isSelected
child: FocusableRadioListTile<PlexSort>(
focusNode: (widget.selectedSort?.key == sort.key || (widget.selectedSort == null && index == 0))
? _initialFocusNode
: null,
title: Text(sort.title),
value: sort,
secondary: isSelected
? SegmentedButton<bool>(
showSelectedIcon: false,
segments: const [
@@ -146,6 +147,7 @@ class _SortBottomSheetState extends State<SortBottomSheet> {
),
);
},
),
),
),
],
@@ -76,7 +76,8 @@ abstract class BaseLibraryTabState<T, W extends BaseLibraryTab<T>> extends State
// Focus management
bool _hasLoadedData = false;
bool _hasFocused = false;
@protected
bool hasFocused = false;
// Getters for subclasses
List<T> get items => _items;
@@ -122,7 +123,7 @@ abstract class BaseLibraryTabState<T, W extends BaseLibraryTab<T>> extends State
// Reload if library changed
if (oldWidget.library.globalKey != widget.library.globalKey) {
// Reset focus state for new library
_hasFocused = false;
hasFocused = false;
_hasLoadedData = false;
// Immediately clear stale data before async load
_items = [];
@@ -164,8 +165,8 @@ abstract class BaseLibraryTabState<T, W extends BaseLibraryTab<T>> extends State
// Don't auto-focus if suppressed (e.g., when navigating via tab bar)
if (widget.suppressAutoFocus) return;
if (widget.isActive && _hasLoadedData && !_hasFocused && _items.isNotEmpty) {
_hasFocused = true;
if (widget.isActive && _hasLoadedData && !hasFocused && _items.isNotEmpty) {
hasFocused = true;
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) {
focusFirstItem();
+381 -184
View File
@@ -18,6 +18,7 @@ import '../../../widgets/alpha_jump_bar.dart';
import '../../../widgets/alpha_jump_helper.dart';
import '../../../widgets/alpha_scroll_handle.dart';
import '../../../widgets/focusable_media_card.dart';
import '../../../widgets/media_card.dart';
import '../../../widgets/focusable_filter_chip.dart';
import '../../../widgets/media_grid_delegate.dart';
import '../../../widgets/overlay_sheet.dart';
@@ -32,6 +33,7 @@ import '../../../mixins/grid_focus_node_mixin.dart';
import '../../../mixins/item_updatable.dart';
import '../../../mixins/deletion_aware.dart';
import '../../../utils/deletion_notifier.dart';
import '../../../utils/global_key_utils.dart';
import '../../../utils/platform_detector.dart';
import '../../../i18n/strings.g.dart';
import '../../main_screen.dart';
@@ -61,20 +63,20 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
PlexClient get client => getClientForLibrary();
String _toGlobalKey(String ratingKey, {String? serverId}) =>
'${serverId ?? widget.library.serverId ?? ''}:$ratingKey';
buildGlobalKey(serverId ?? widget.library.serverId ?? '', ratingKey);
@override
String? get deletionServerId => widget.library.serverId;
@override
Set<String>? get deletionRatingKeys => items.map((e) => e.ratingKey).toSet();
Set<String>? get deletionRatingKeys => _loadedItems.values.map((e) => e.ratingKey).toSet();
@override
Set<String>? get deletionGlobalKeys {
if (items.isEmpty) return <String>{};
if (_loadedItems.isEmpty) return <String>{};
final keys = <String>{};
for (final item in items) {
for (final item in _loadedItems.values) {
final serverId = item.serverId ?? widget.library.serverId;
if (serverId == null) return null;
keys.add(_toGlobalKey(item.ratingKey, serverId: serverId));
@@ -84,30 +86,30 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
@override
void onDeletionEvent(DeletionEvent event) {
// If we have an item that matches the rating key exactly, then remove it from our list
final index = items.indexWhere((e) => e.ratingKey == event.ratingKey);
if (index != -1) {
// If we have an item that matches the rating key exactly, remove it and rebuild indices
final matchEntry = _loadedItems.entries.where((e) => e.value.ratingKey == event.ratingKey).firstOrNull;
if (matchEntry != null) {
setState(() {
items.removeAt(index);
_removeLoadedItemAndShift(matchEntry.key);
});
return;
}
// If a child item was delete, then update our list to reflect that.
// If a child item was deleted, update our item to reflect that.
// If all children were deleted, remove our item.
// Otherwise, just update the counts.
for (final parentKey in event.parentChain) {
final parentIndex = items.indexWhere((e) => e.ratingKey == parentKey);
if (parentIndex != -1) {
final item = items[parentIndex];
final parentEntry = _loadedItems.entries.where((e) => e.value.ratingKey == parentKey).firstOrNull;
if (parentEntry != null) {
final item = parentEntry.value;
final newLeafCount = (item.leafCount ?? 1) - event.leafCount;
if (newLeafCount <= 0) {
setState(() {
items.removeAt(parentIndex);
_removeLoadedItemAndShift(parentEntry.key);
});
} else {
setState(() {
items[parentIndex] = item.copyWith(leafCount: newLeafCount);
_loadedItems[parentEntry.key] = item.copyWith(leafCount: newLeafCount);
});
}
return;
@@ -115,18 +117,37 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
}
}
/// Remove an item at [index] and shift all higher indices down by 1
void _removeLoadedItemAndShift(int index) {
_loadedItems.remove(index);
// Rebuild map with shifted indices for items above the removed one
final shifted = <int, PlexMetadata>{};
for (final entry in _loadedItems.entries) {
if (entry.key < index) {
shifted[entry.key] = entry.value;
} else {
shifted[entry.key - 1] = entry.value;
}
}
_loadedItems.clear();
_loadedItems.addAll(shifted);
_totalSize = (_totalSize - 1).clamp(0, _totalSize);
}
@override
String get focusNodeDebugLabel => 'browse_first_item';
@override
int get itemCount => items.length;
int get itemCount => _totalSize;
@override
void updateItemInLists(String ratingKey, PlexMetadata updatedMetadata) {
setState(() {
final index = items.indexWhere((item) => item.ratingKey == ratingKey);
if (index != -1) {
items[index] = updatedMetadata;
for (final entry in _loadedItems.entries) {
if (entry.value.ratingKey == ratingKey) {
_loadedItems[entry.key] = updatedMetadata;
break;
}
}
});
}
@@ -161,11 +182,13 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
Timer? _scrollActivityTimer;
// Pagination state
int _currentPage = 0;
bool _hasMoreItems = true;
int _totalSize = 0;
final Map<int, PlexMetadata> _loadedItems = {};
final Set<int> _loadingRanges = {};
CancelToken? _cancelToken;
int _requestId = 0;
static const int _pageSize = 500;
static const int _fetchSize = 200;
Timer? _scrollIdleTimer;
// Focus nodes for filter chips
final FocusNode _groupingChipFocusNode = FocusNode(debugLabel: 'grouping_chip');
@@ -185,6 +208,7 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
void dispose() {
_cancelToken?.cancel();
_scrollActivityTimer?.cancel();
_scrollIdleTimer?.cancel();
_scrollController.removeListener(_onScrollChanged);
_scrollController.dispose();
_groupingChipFocusNode.dispose();
@@ -195,6 +219,18 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
super.dispose();
}
// Override tryFocus to use _loadedItems instead of base class items list
@override
void tryFocus() {
if (widget.suppressAutoFocus) return;
if (widget.isActive && hasLoadedData && !hasFocused && _loadedItems.isNotEmpty) {
hasFocused = true;
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) focusFirstItem();
});
}
}
// Override loadData to use our custom _loadContent
@override
Future<List<PlexMetadata>> loadData() async {
@@ -223,14 +259,27 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
@override
Widget buildContent(List<PlexMetadata> items) => const SizedBox.shrink();
/// Focus the first item in the grid/list (for tab activation)
/// Focus the first item in the grid/list/folder tree (for tab activation)
@override
void focusFirstItem() {
if (items.isNotEmpty) {
// In folder mode, items list is empty — focus the first folder tree item directly
if (_selectedGrouping == 'folders') {
void request() {
if (mounted && !firstItemFocusNode.hasFocus) {
firstItemFocusNode.requestFocus();
}
}
request();
WidgetsBinding.instance.addPostFrameCallback((_) => request());
return;
}
if (_loadedItems.isNotEmpty) {
// Request immediately, then once more on the next frame to handle cases
// where the grid/list attaches after the initial focus attempt.
void request() {
if (mounted && items.isNotEmpty && !firstItemFocusNode.hasFocus) {
if (mounted && _loadedItems.isNotEmpty && !firstItemFocusNode.hasFocus) {
firstItemFocusNode.requestFocus();
}
}
@@ -246,14 +295,7 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
/// Focus the chips bar (for navigating from tab bar to content).
/// Called by libraries screen when pressing DOWN on tab bar.
void focusChipsBar() {
// If in folders mode, no chips to focus - go directly to folder tree
if (_selectedGrouping == 'folders') {
focusFirstItem();
return;
}
// With Stack layout, chips are always visible on top of the grid.
// No need to scroll - just focus the chip.
// Grouping chip is always visible (including in folder mode)
_groupingChipFocusNode.requestFocus();
}
@@ -261,7 +303,8 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
// Cancel any pending request
_cancelToken?.cancel();
_cancelToken = CancelToken();
final currentRequestId = ++_requestId;
// Use a generation counter for the filter/sort loading phase
final generation = ++_requestId;
// Extract context dependencies before async gap - use server-specific client
final client = getClientForLibrary();
@@ -270,8 +313,9 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
isLoading = true;
errorMessage = null;
items = [];
_currentPage = 0;
_hasMoreItems = true;
_totalSize = 0;
_loadedItems.clear();
_loadingRanges.clear();
// Clear filter/sort state while loading to prevent showing stale options
_filters = [];
_sortOptions = [];
@@ -296,8 +340,8 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
final savedSort = storage.getLibrarySort(widget.library.globalKey);
final savedGrouping = storage.getLibraryGrouping(widget.library.globalKey);
// Check if request was cancelled
if (currentRequestId != _requestId) return;
// Check if request was superseded
if (generation != _requestId) return;
if (!mounted) return;
setState(() {
@@ -320,62 +364,64 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
});
// Load items and first characters in parallel
// _loadItems manages its own requestId internally
await Future.wait([_loadItems(), _loadFirstCharacters()]);
} catch (e) {
_handleLoadError(e, currentRequestId);
if (!mounted) return;
setState(() {
errorMessage = _getErrorMessage(e);
isLoading = false;
});
}
}
Future<void> _loadItems({bool loadMore = false}) async {
if (loadMore && isLoading) return;
/// Build the filter params map for API calls
Map<String, String> _buildFilterParams() {
final filterParams = Map<String, String>.from(_selectedFilters);
if (!loadMore) {
_currentPage = 0;
_hasMoreItems = true;
// Add grouping type filter (but not for 'all' or 'folders')
if (_selectedGrouping != 'all' && _selectedGrouping != 'folders') {
final typeId = _getGroupingTypeId();
if (typeId.isNotEmpty) {
filterParams['type'] = typeId;
}
}
if (!_hasMoreItems) return;
// Add sort
if (_selectedSort != null) {
filterParams['sort'] = _selectedSort!.getSortKey(descending: _isSortDescending);
}
final currentRequestId = _requestId;
return filterParams;
}
Future<void> _loadItems() async {
final currentRequestId = ++_requestId;
_cancelToken?.cancel();
_cancelToken = CancelToken();
setState(() {
isLoading = true;
if (!loadMore) {
items = [];
// Increment content version when loading fresh content
// This invalidates the last focused index
gridContentVersion++;
cleanupGridFocusNodes(items.length);
}
items = [];
_totalSize = 0;
_loadedItems.clear();
_loadingRanges.clear();
// Increment content version when loading fresh content
// This invalidates the last focused index
gridContentVersion++;
cleanupGridFocusNodes(0);
});
try {
// Use server-specific client for this library
final client = getClientForLibrary();
// Build filter params
final filterParams = Map<String, String>.from(_selectedFilters);
// Add grouping type filter (but not for 'all' or 'folders')
if (_selectedGrouping != 'all' && _selectedGrouping != 'folders') {
final typeId = _getGroupingTypeId();
if (typeId.isNotEmpty) {
filterParams['type'] = typeId;
}
}
// Add sort
if (_selectedSort != null) {
filterParams['sort'] = _selectedSort!.getSortKey(descending: _isSortDescending);
}
final filterParams = _buildFilterParams();
// Items are automatically tagged with server info by PlexClient
final loadedItems = await client.getLibraryContent(
final result = await client.getLibraryContent(
widget.library.key,
start: _currentPage * _pageSize,
size: _pageSize,
start: 0,
size: _fetchSize,
filters: filterParams,
cancelToken: _cancelToken,
);
@@ -384,33 +430,81 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
if (!mounted) return;
setState(() {
if (loadMore) {
items.addAll(loadedItems);
} else {
items = loadedItems;
_totalSize = result.totalSize;
for (var i = 0; i < result.items.length; i++) {
_loadedItems[i] = result.items[i];
}
_hasMoreItems = loadedItems.length >= _pageSize;
_currentPage++;
isLoading = false;
});
// On initial load (not pagination), mark data as loaded and try to focus
if (!loadMore) {
hasLoadedData = true;
tryFocus();
hasLoadedData = true;
tryFocus();
// Notify parent
if (widget.onDataLoaded != null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
widget.onDataLoaded!();
});
}
// Notify parent
if (widget.onDataLoaded != null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
widget.onDataLoaded!();
});
}
} catch (e) {
_handleLoadError(e, currentRequestId);
}
}
/// Fetch a range of items from the API and store them in the sparse map.
/// After a successful fetch, re-checks for remaining gaps in the visible range.
Future<void> _fetchRange(int start, int size) async {
// Clamp to totalSize
if (start >= _totalSize) return;
final clampedSize = size.clamp(0, _totalSize - start);
if (clampedSize == 0) return;
// Deduplicate: track every index in-flight to prevent overlapping fetches
final indices = List.generate(clampedSize, (i) => start + i);
if (indices.every((i) => _loadingRanges.contains(i) || _loadedItems.containsKey(i))) return;
_loadingRanges.addAll(indices);
final currentRequestId = _requestId;
try {
final client = getClientForLibrary();
final filterParams = _buildFilterParams();
final result = await client.getLibraryContent(
widget.library.key,
start: start,
size: clampedSize,
filters: filterParams,
cancelToken: _cancelToken,
);
if (currentRequestId != _requestId || !mounted) return;
setState(() {
for (var i = 0; i < result.items.length; i++) {
_loadedItems[start + i] = result.items[i];
}
// Update totalSize in case it changed (e.g., items added/removed on server)
if (result.totalSize != _totalSize) {
_totalSize = result.totalSize;
}
});
// Re-check for remaining gaps in the visible range after this fetch
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted && currentRequestId == _requestId) {
_loadVisibleRange();
}
});
} catch (e) {
// Silently ignore fetch errors for background range loads
// (the initial load handles errors with UI feedback)
if (e is DioException && e.type == DioExceptionType.cancel) return;
} finally {
_loadingRanges.removeAll(indices);
}
}
void _handleLoadError(dynamic error, int currentRequestId) {
if (currentRequestId != _requestId) return;
@@ -489,23 +583,25 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
final options = _getGroupingOptions();
return StatefulBuilder(
builder: (context, setSheetState) {
return ListView.builder(
shrinkWrap: true,
itemCount: options.length,
itemBuilder: (context, index) {
final grouping = options[index];
return RadioListTile<String>(
title: Text(_getGroupingLabel(grouping)),
value: grouping,
groupValue: pendingGrouping,
onChanged: (value) {
if (value == null) return;
setSheetState(() {
pendingGrouping = value;
});
},
);
return RadioGroup<String>(
groupValue: pendingGrouping,
onChanged: (value) {
if (value == null) return;
setSheetState(() {
pendingGrouping = value;
});
},
child: ListView.builder(
shrinkWrap: true,
itemCount: options.length,
itemBuilder: (context, index) {
final grouping = options[index];
return RadioListTile<String>(
title: Text(_getGroupingLabel(grouping)),
value: grouping,
);
},
),
);
},
);
@@ -602,9 +698,15 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
/// Navigate focus from chips down to the grid item.
/// Restores focus to the previously focused item if content hasn't changed.
void _navigateToGrid() {
if (items.isEmpty) return;
// In folder mode, firstItemFocusNode is attached to the first folder tree item
if (_selectedGrouping == 'folders') {
firstItemFocusNode.requestFocus();
return;
}
final targetIndex = shouldRestoreGridFocus && lastFocusedGridIndex! < items.length ? lastFocusedGridIndex! : 0;
if (_totalSize == 0) return;
final targetIndex = shouldRestoreGridFocus && lastFocusedGridIndex! < _totalSize && _loadedItems.containsKey(lastFocusedGridIndex!) ? lastFocusedGridIndex! : 0;
// Use firstItemFocusNode for index 0 (matches _buildMediaCardItem)
if (targetIndex == 0) {
@@ -619,10 +721,33 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
/// FocusNode detached), so we target the last-column item in the first
/// visible row — the grid cell closest to the alpha bar.
void _navigateToGridNearScroll() {
if (items.isEmpty || _currentColumnCount < 1) return;
if (_totalSize == 0 || _currentColumnCount < 1) return;
final row = _currentFirstVisibleIndex ~/ _currentColumnCount;
final targetIndex = ((row + 1) * _currentColumnCount - 1).clamp(0, items.length - 1);
var targetIndex = ((row + 1) * _currentColumnCount - 1).clamp(0, _totalSize - 1);
// Find nearest loaded item — skeleton cards have no FocusNode
if (!_loadedItems.containsKey(targetIndex)) {
// Search backwards first (items above are more likely visible)
int? found;
for (var i = targetIndex - 1; i >= 0; i--) {
if (_loadedItems.containsKey(i)) {
found = i;
break;
}
}
// Then search forwards
if (found == null) {
for (var i = targetIndex + 1; i < _totalSize; i++) {
if (_loadedItems.containsKey(i)) {
found = i;
break;
}
}
}
if (found == null) return;
targetIndex = found;
}
if (targetIndex == 0) {
firstItemFocusNode.requestFocus();
@@ -695,11 +820,17 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
}
}
/// Track scroll position to highlight the current letter in the jump bar
/// Track scroll position and trigger debounced range loading.
void _onScrollChanged() {
// Debounced scroll-idle handler: load visible range when scrolling settles
_scrollIdleTimer?.cancel();
_scrollIdleTimer = Timer(const Duration(milliseconds: 200), () {
if (mounted) _loadVisibleRange();
});
if (!_shouldShowAlphaJumpBar || _currentColumnCount < 1) return;
// During a jump animation, skip all processing to avoid flashing.
// During a jump animation, skip alpha bar processing to avoid flashing.
if (_isJumpScrolling) return;
// If pinned from a completed jump, the next scroll event must be
@@ -718,7 +849,8 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
final firstInRow = _itemIndexFromScrollOffset(offset);
// Use the last item in the first visible row so the highlighted letter
// updates as soon as items with a new letter appear in that row.
final lastInRow = (firstInRow + _currentColumnCount - 1).clamp(0, items.length - 1);
final maxIndex = _totalSize > 0 ? _totalSize - 1 : 0;
final lastInRow = (firstInRow + _currentColumnCount - 1).clamp(0, maxIndex);
if (lastInRow != _currentFirstVisibleIndex) {
setState(() => _currentFirstVisibleIndex = lastInRow);
}
@@ -739,7 +871,8 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
// First visible row = (offset + chipsBarHeight - effectiveTopPadding) / rowHeight
final contentOffset = (offset + _chipsBarHeight - _effectiveTopPadding).clamp(0.0, double.infinity);
final row = (contentOffset / rowHeight).floor();
return (row * _currentColumnCount).clamp(0, items.length - 1);
final maxIndex = _totalSize > 0 ? _totalSize - 1 : 0;
return (row * _currentColumnCount).clamp(0, maxIndex);
}
/// Scroll to the item at [targetIndex], loading more pages if necessary.
@@ -751,13 +884,10 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
_isJumpScrolling = true;
_hasJumpPin = true;
setState(() => _currentFirstVisibleIndex = targetIndex);
final clamped = targetIndex.clamp(0, _totalSize > 0 ? _totalSize - 1 : 0);
setState(() => _currentFirstVisibleIndex = clamped);
if (targetIndex < items.length) {
_scrollToItemIndex(targetIndex);
} else {
_loadUntilIndex(targetIndex);
}
_scrollToItemIndex(clamped);
}
/// Scroll the grid so that [index] is visible just below the chips bar
@@ -794,82 +924,67 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
});
}
/// Load pages until [targetIndex] is loaded, then scroll to it
Future<void> _loadUntilIndex(int targetIndex) async {
while (items.length <= targetIndex && _hasMoreItems) {
await _loadItems(loadMore: true);
}
if (mounted) {
_scrollToItemIndex(targetIndex.clamp(0, items.length - 1));
}
}
@override
Widget build(BuildContext context) {
super.build(context); // Required for AutomaticKeepAliveClientMixin
// For folders mode, use FolderTreeView instead of grid/list
if (_selectedGrouping == 'folders') {
return OverlaySheetHost(
child: Column(
children: [
_buildChipsBar(),
Expanded(
child: FolderTreeView(
libraryKey: widget.library.key,
serverId: widget.library.serverId,
onRefresh: updateItem,
),
return Column(
children: [
_buildChipsBar(),
Expanded(
child: FolderTreeView(
libraryKey: widget.library.key,
serverId: widget.library.serverId,
onRefresh: updateItem,
firstItemFocusNode: firstItemFocusNode,
onNavigateUp: () => _groupingChipFocusNode.requestFocus(),
),
],
),
),
],
);
}
// For list/grid modes, use Stack with chips layered on top of grid.
// This allows the grid to use Clip.none for focus decorations while
// the chips bar (with background) covers any overflow at the top.
return OverlaySheetHost(
child: Stack(
children: [
// Grid fills the entire area, with top padding for chips bar
Positioned.fill(child: _buildScrollableContent()),
// Chips bar on top with solid background
Positioned(top: 0, left: 0, right: 0, child: _buildChipsBar()),
// Alpha jump bar / scroll handle on the right edge
if (_shouldShowAlphaJumpBar)
Positioned(
top: _chipsBarHeight,
right: 0,
bottom: 0,
child: _isPhone(context)
? AlphaScrollHandle(
firstCharacters: _firstCharacters,
onJump: _jumpToIndex,
currentLetter: _currentAlphaLetter,
isScrolling: _isScrollActive,
)
: AlphaJumpBar(
firstCharacters: _firstCharacters,
onJump: _jumpToIndex,
currentLetter: _currentAlphaLetter,
focusNode: _alphaJumpBarFocusNode,
onNavigateLeft: _navigateToGridNearScroll,
onBack: _navigateToGridNearScroll,
),
),
],
),
return Stack(
children: [
// Grid fills the entire area, with top padding for chips bar
Positioned.fill(child: _buildScrollableContent()),
// Chips bar on top with solid background
Positioned(top: 0, left: 0, right: 0, child: _buildChipsBar()),
// Alpha jump bar / scroll handle on the right edge
if (_shouldShowAlphaJumpBar)
Positioned(
top: _chipsBarHeight,
right: 0,
bottom: 0,
child: _isPhone(context)
? AlphaScrollHandle(
firstCharacters: _firstCharacters,
onJump: _jumpToIndex,
currentLetter: _currentAlphaLetter,
isScrolling: _isScrollActive,
)
: AlphaJumpBar(
firstCharacters: _firstCharacters,
onJump: _jumpToIndex,
currentLetter: _currentAlphaLetter,
focusNode: _alphaJumpBarFocusNode,
onNavigateLeft: _navigateToGridNearScroll,
onBack: _navigateToGridNearScroll,
),
),
],
);
}
/// Builds the scrollable content (grid/list) with pagination support
/// Builds the scrollable content (grid/list) with scroll-idle loading
Widget _buildScrollableContent() {
return NotificationListener<ScrollNotification>(
onNotification: (notification) {
if (notification.metrics.pixels >= notification.metrics.maxScrollExtent - 300 && _hasMoreItems && !isLoading) {
_loadItems(loadMore: true);
}
// Track scroll activity for phone scroll handle
if (notification is ScrollStartNotification) {
if (!_isScrollActive) setState(() => _isScrollActive = true);
@@ -891,6 +1006,48 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
);
}
/// Determine the visible range and fetch any unloaded items within it.
/// Covers the full visible area plus a buffer of _fetchSize/2 on each side,
/// then finds the first unloaded contiguous block and fetches it.
void _loadVisibleRange() {
if (_totalSize == 0 || _currentColumnCount < 1 || !_scrollController.hasClients) return;
if (_lastCrossAxisExtent <= 0) return;
final offset = _scrollController.offset;
final viewportHeight = _scrollController.position.viewportDimension;
final firstIndex = _itemIndexFromScrollOffset(offset);
// Calculate how many items fit in the viewport
final itemWidth = _lastCrossAxisExtent / _currentColumnCount;
final itemHeight = itemWidth / GridLayoutConstants.posterAspectRatio;
final rowHeight = itemHeight + GridLayoutConstants.mainAxisSpacing;
if (rowHeight <= 0) return;
final visibleRows = (viewportHeight / rowHeight).ceil() + 1;
final visibleCount = visibleRows * _currentColumnCount;
// Expand the visible range by a buffer on each side
final buffer = _fetchSize ~/ 2;
final rangeStart = (firstIndex - buffer).clamp(0, _totalSize);
final rangeEnd = (firstIndex + visibleCount + buffer).clamp(0, _totalSize);
// Find the first and last unloaded indices in the range
int? fetchStart;
int? fetchEnd;
for (var i = rangeStart; i < rangeEnd; i++) {
if (!_loadedItems.containsKey(i) && !_loadingRanges.contains(i)) {
fetchStart ??= i;
fetchEnd = i + 1;
}
}
if (fetchStart == null || fetchEnd == null) return;
final fetchSize = fetchEnd - fetchStart;
if (fetchSize <= 0) return;
_fetchRange(fetchStart, fetchSize);
}
/// Whether the filters chip is visible
bool get _isFiltersChipVisible => _filters.isNotEmpty && _selectedGrouping != 'folders';
@@ -963,11 +1120,11 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
/// Builds content as slivers for the CustomScrollView
List<Widget> _buildContentSlivers() {
if (isLoading && items.isEmpty) {
if (isLoading && _totalSize == 0 && _loadedItems.isEmpty) {
return [const SliverFillRemaining(child: Center(child: CircularProgressIndicator()))];
}
if (errorMessage != null && items.isEmpty) {
if (errorMessage != null && _loadedItems.isEmpty) {
return [
SliverFillRemaining(
child: ErrorStateWidget(
@@ -980,7 +1137,7 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
];
}
if (items.isEmpty) {
if (_totalSize == 0 && !isLoading) {
return [
SliverFillRemaining(
child: EmptyStateWidget(message: t.libraries.thisLibraryIsEmpty, icon: Symbols.folder_open_rounded),
@@ -1008,7 +1165,7 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
/// Builds either a sliver list or sliver grid based on the view mode
Widget _buildItemsSliver(BuildContext context, SettingsProvider settingsProvider) {
final itemCount = items.length + (_hasMoreItems && isLoading ? 1 : 0);
final itemCount = _totalSize;
final isPhone = _isPhone(context);
final topPadding = isPhone ? _gridTopPaddingPhone : _gridTopPadding;
_effectiveTopPadding = topPadding;
@@ -1067,13 +1224,12 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
required bool isFirstColumn,
bool isLastColumn = false,
}) {
if (index >= items.length) {
return const Padding(
padding: EdgeInsets.all(16.0),
child: Center(child: CircularProgressIndicator()),
);
final item = _loadedItems[index];
// Show skeleton placeholder for unloaded items
if (item == null) {
return const _SkeletonCard();
}
final item = items[index];
// Use firstItemFocusNode for index 0 to maintain compatibility with base class
// All other items get managed focus nodes for restoration
@@ -1093,3 +1249,44 @@ class _LibraryBrowseTabState extends BaseLibraryTabState<PlexMetadata, LibraryBr
);
}
}
/// Skeleton placeholder card that matches the poster + title layout of a real media card.
/// Not focusable — dpad focus skips over these.
class _SkeletonCard extends StatelessWidget {
const _SkeletonCard();
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Poster area — matches the Expanded poster in _buildGridCard
Expanded(
child: ClipRRect(
borderRadius: BorderRadius.circular(8),
child: const SkeletonLoader(child: SizedBox.expand()),
),
),
const SizedBox(height: 4),
// Title bar
SkeletonLoader(
borderRadius: BorderRadius.circular(4),
child: const SizedBox(height: 13, width: double.infinity),
),
const SizedBox(height: 3),
// Subtitle bar
FractionallySizedBox(
alignment: Alignment.centerLeft,
widthFactor: 0.6,
child: SkeletonLoader(
borderRadius: BorderRadius.circular(4),
child: const SizedBox(height: 11),
),
),
],
),
);
}
}
@@ -1,408 +0,0 @@
import 'package:flutter/material.dart';
import 'package:material_symbols_icons/symbols.dart';
import 'package:provider/provider.dart';
import '../../focus/focusable_wrapper.dart';
import '../../focus/key_event_utils.dart';
import '../../i18n/strings.g.dart';
import '../../models/livetv_scheduled_recording.dart';
import '../../models/livetv_subscription.dart';
import '../../providers/multi_server_provider.dart';
import '../../utils/app_logger.dart';
import '../../utils/formatters.dart';
import '../../utils/snackbar_helper.dart';
import '../../widgets/app_icon.dart';
import '../../widgets/desktop_app_bar.dart';
/// Screen for managing DVR recording subscriptions and scheduled recordings
class DvrRecordingsScreen extends StatefulWidget {
const DvrRecordingsScreen({super.key});
@override
State<DvrRecordingsScreen> createState() => _DvrRecordingsScreenState();
}
class _DvrRecordingsScreenState extends State<DvrRecordingsScreen> with SingleTickerProviderStateMixin {
late TabController _tabController;
List<LiveTvSubscription> _subscriptions = [];
List<ScheduledRecording> _scheduled = [];
bool _isLoading = true;
String? _error;
@override
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
_loadData();
}
@override
void dispose() {
_tabController.dispose();
super.dispose();
}
Future<void> _loadData() async {
if (!mounted) return;
setState(() {
_isLoading = true;
_error = null;
});
try {
final multiServer = context.read<MultiServerProvider>();
final liveTvServers = multiServer.liveTvServers;
if (liveTvServers.isEmpty) {
setState(() {
_isLoading = false;
_error = t.liveTv.noDvr;
});
return;
}
final allSubscriptions = <LiveTvSubscription>[];
final allScheduled = <ScheduledRecording>[];
for (final serverInfo in liveTvServers) {
final client = multiServer.getClientForServer(serverInfo.serverId);
if (client == null) continue;
final subs = await client.getSubscriptions();
allSubscriptions.addAll(subs);
final scheduled = await client.getScheduledRecordings();
allScheduled.addAll(scheduled);
}
// Sort scheduled by start time
allScheduled.sort((a, b) => (a.beginsAt ?? 0).compareTo(b.beginsAt ?? 0));
if (!mounted) return;
setState(() {
_subscriptions = allSubscriptions;
_scheduled = allScheduled;
_isLoading = false;
});
} catch (e) {
appLogger.e('Failed to load DVR data', error: e);
if (mounted) {
setState(() {
_isLoading = false;
_error = e.toString();
});
}
}
}
Future<void> _deleteSubscription(LiveTvSubscription subscription) async {
final confirmed = await showDialog<bool>(
context: context,
builder: (context) => AlertDialog(
title: Text(t.liveTv.deleteSubscription),
content: Text(t.liveTv.deleteSubscriptionConfirm),
actions: [
TextButton(onPressed: () => Navigator.of(context).pop(false), child: Text(t.common.cancel)),
FilledButton(onPressed: () => Navigator.of(context).pop(true), child: Text(t.common.delete)),
],
),
);
if (confirmed != true || !mounted) return;
final multiServer = context.read<MultiServerProvider>();
final client = subscription.serverId != null ? multiServer.getClientForServer(subscription.serverId!) : null;
if (client != null) {
final success = await client.deleteSubscription(subscription.key);
if (success && mounted) {
showSnackBar(context, t.liveTv.subscriptionDeleted);
await _loadData();
}
}
}
Future<void> _editSubscription(LiveTvSubscription subscription) async {
// Filter to visible settings only
final editableSettings = subscription.settings.where((s) => s.hidden != true).toList();
if (editableSettings.isEmpty) return;
final prefs = <String, String>{};
for (final setting in editableSettings) {
prefs[setting.id] = setting.value ?? setting.defaultValue ?? '';
}
final result = await showDialog<Map<String, String>?>(
context: context,
builder: (dialogContext) =>
_SubscriptionEditDialog(subscription: subscription, settings: editableSettings, initialPrefs: prefs),
);
if (result == null || !mounted) return;
final multiServer = context.read<MultiServerProvider>();
final client = subscription.serverId != null ? multiServer.getClientForServer(subscription.serverId!) : null;
if (client != null) {
final success = await client.editSubscription(subscription.key, result);
if (success) {
await _loadData();
}
}
}
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Focus(
canRequestFocus: false,
onKeyEvent: (_, event) => handleBackKeyNavigation(context, event),
child: Scaffold(
body: NestedScrollView(
headerSliverBuilder: (context, innerBoxIsScrolled) => [
CustomAppBar(
title: Text(t.liveTv.recordings),
pinned: true,
bottom: TabBar(
controller: _tabController,
tabs: [
Tab(text: t.liveTv.subscriptions),
Tab(text: t.liveTv.scheduled),
],
),
),
],
body: _buildRecordingsBody(theme),
),
),
);
}
Widget _buildRecordingsBody(ThemeData theme) {
if (_isLoading) {
return const Center(child: CircularProgressIndicator());
}
if (_error != null) {
return Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(_error!, style: theme.textTheme.bodyLarge),
const SizedBox(height: 16),
FilledButton.icon(
onPressed: _loadData,
icon: const AppIcon(Symbols.refresh_rounded),
label: Text(t.common.retry),
),
],
),
);
}
return TabBarView(controller: _tabController, children: [_buildSubscriptionsTab(theme), _buildScheduledTab(theme)]);
}
Widget _buildSubscriptionsTab(ThemeData theme) {
if (_subscriptions.isEmpty) {
return Center(child: Text(t.liveTv.noSubscriptions));
}
return ListView.builder(
padding: const EdgeInsets.symmetric(vertical: 8),
itemCount: _subscriptions.length,
itemBuilder: (context, index) {
final sub = _subscriptions[index];
return FocusableWrapper(
autofocus: index == 0,
autoScroll: true,
useComfortableZone: true,
onSelect: () => _editSubscription(sub),
onBack: () => Navigator.pop(context),
child: _buildSubscriptionCard(sub, theme),
);
},
);
}
Widget _buildSubscriptionCard(LiveTvSubscription subscription, ThemeData theme) {
return ExcludeFocus(
child: Card(
margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
child: ListTile(
leading: const AppIcon(Symbols.fiber_dvr_rounded, size: 32),
title: Text(subscription.title, maxLines: 1, overflow: TextOverflow.ellipsis),
subtitle: subscription.type != null
? Text(
subscription.type!,
style: theme.textTheme.bodySmall?.copyWith(color: theme.colorScheme.onSurfaceVariant),
)
: null,
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (subscription.settings.isNotEmpty)
IconButton(
icon: const AppIcon(Symbols.settings_rounded),
onPressed: () => _editSubscription(subscription),
),
IconButton(
icon: AppIcon(Symbols.delete_rounded, color: theme.colorScheme.error),
onPressed: () => _deleteSubscription(subscription),
),
],
),
),
),
);
}
Widget _buildScheduledTab(ThemeData theme) {
if (_scheduled.isEmpty) {
return Center(child: Text(t.liveTv.noRecordings));
}
return ListView.builder(
padding: const EdgeInsets.symmetric(vertical: 8),
itemCount: _scheduled.length,
itemBuilder: (context, index) {
final recording = _scheduled[index];
return FocusableWrapper(
autofocus: index == 0,
autoScroll: true,
useComfortableZone: true,
onBack: () => Navigator.pop(context),
child: _buildScheduledCard(recording, theme),
);
},
);
}
Widget _buildScheduledCard(ScheduledRecording recording, ThemeData theme) {
final startTime = recording.startTime;
final timeStr = startTime != null
? '${startTime.month}/${startTime.day} ${startTime.hour.toString().padLeft(2, '0')}:${startTime.minute.toString().padLeft(2, '0')}'
: '';
return ExcludeFocus(
child: Card(
margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
child: ListTile(
leading: const AppIcon(Symbols.fiber_manual_record_rounded, size: 32, color: Colors.red),
title: Text(recording.displayTitle, maxLines: 1, overflow: TextOverflow.ellipsis),
subtitle: Text(
[
if (recording.channelCallSign != null) recording.channelCallSign!,
timeStr,
if (recording.durationMinutes > 0) formatDurationTextual(recording.durationMinutes * 60000),
].join(' · '),
style: theme.textTheme.bodySmall?.copyWith(color: theme.colorScheme.onSurfaceVariant),
),
),
),
);
}
}
/// Dialog for editing subscription settings
class _SubscriptionEditDialog extends StatefulWidget {
final LiveTvSubscription subscription;
final List<SubscriptionSetting> settings;
final Map<String, String> initialPrefs;
const _SubscriptionEditDialog({required this.subscription, required this.settings, required this.initialPrefs});
@override
State<_SubscriptionEditDialog> createState() => _SubscriptionEditDialogState();
}
class _SubscriptionEditDialogState extends State<_SubscriptionEditDialog> {
late Map<String, String> _prefs;
final Map<String, TextEditingController> _textControllers = {};
@override
void initState() {
super.initState();
_prefs = Map.from(widget.initialPrefs);
}
@override
void dispose() {
for (final controller in _textControllers.values) {
controller.dispose();
}
super.dispose();
}
@override
Widget build(BuildContext context) {
return AlertDialog(
title: Text(widget.subscription.title),
content: SizedBox(
width: 400,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: widget.settings.map((setting) {
return _buildSettingRow(setting);
}).toList(),
),
),
),
actions: [
TextButton(onPressed: () => Navigator.of(context).pop(null), child: Text(t.common.cancel)),
FilledButton(onPressed: () => Navigator.of(context).pop(_prefs), child: Text(t.common.save)),
],
);
}
Widget _buildSettingRow(SubscriptionSetting setting) {
final value = _prefs[setting.id] ?? setting.defaultValue ?? '';
if (setting.type == 'bool') {
return SwitchListTile(
title: Text(setting.label ?? setting.id),
subtitle: setting.summary != null ? Text(setting.summary!) : null,
value: value == '1' || value == 'true',
onChanged: (newValue) {
setState(() {
_prefs[setting.id] = newValue ? '1' : '0';
});
},
);
}
if (setting.type == 'enum' && setting.enumValues != null) {
return ListTile(
title: Text(setting.label ?? setting.id),
subtitle: setting.summary != null ? Text(setting.summary!) : null,
trailing: DropdownButton<String>(
value: setting.enumValues!.any((e) => e.value == value) ? value : null,
items: setting.enumValues!.map((option) {
return DropdownMenuItem(value: option.value, child: Text(option.label));
}).toList(),
onChanged: (newValue) {
if (newValue != null) {
setState(() {
_prefs[setting.id] = newValue;
});
}
},
),
);
}
// Default: text field
final controller = _textControllers.putIfAbsent(setting.id, () => TextEditingController(text: value));
return ListTile(
title: Text(setting.label ?? setting.id),
subtitle: TextField(
controller: controller,
onChanged: (newValue) {
_prefs[setting.id] = newValue;
},
),
);
}
}
-52
View File
@@ -13,7 +13,6 @@ import '../../utils/app_logger.dart';
import '../../utils/platform_detector.dart';
import '../../widgets/app_icon.dart';
import '../../widgets/focusable_tab_chip.dart';
import 'dvr_recordings_screen.dart';
import 'tabs/guide_tab.dart';
import 'tabs/whats_on_tab.dart';
@@ -34,9 +33,7 @@ class _LiveTvScreenState extends State<LiveTvScreen>
// App bar action button focus
final _refreshButtonFocusNode = FocusNode(debugLabel: 'RefreshButton');
final _dvrButtonFocusNode = FocusNode(debugLabel: 'DvrButton');
bool _isRefreshFocused = false;
bool _isDvrFocused = false;
List<LiveTvChannel> _channels = [];
bool _isLoading = true;
@@ -51,7 +48,6 @@ class _LiveTvScreenState extends State<LiveTvScreen>
suppressAutoFocus = true;
initTabNavigation();
_refreshButtonFocusNode.addListener(_onRefreshFocusChange);
_dvrButtonFocusNode.addListener(_onDvrFocusChange);
_loadChannels();
}
@@ -61,8 +57,6 @@ class _LiveTvScreenState extends State<LiveTvScreen>
_whatsOnTabFocusNode.dispose();
_refreshButtonFocusNode.removeListener(_onRefreshFocusChange);
_refreshButtonFocusNode.dispose();
_dvrButtonFocusNode.removeListener(_onDvrFocusChange);
_dvrButtonFocusNode.dispose();
disposeTabNavigation();
super.dispose();
}
@@ -71,10 +65,6 @@ class _LiveTvScreenState extends State<LiveTvScreen>
if (mounted) setState(() => _isRefreshFocused = _refreshButtonFocusNode.hasFocus);
}
void _onDvrFocusChange() {
if (mounted) setState(() => _isDvrFocused = _dvrButtonFocusNode.hasFocus);
}
@override
void onTabChanged() {
if (!tabController.indexIsChanging) {
@@ -204,10 +194,6 @@ class _LiveTvScreenState extends State<LiveTvScreen>
}
}
void _openRecordings() {
Navigator.of(context).push(MaterialPageRoute(builder: (_) => const DvrRecordingsScreen()));
}
void _focusCurrentTab() {
if (tabController.index == 0) {
_guideTabKey.currentState?.focusContent();
@@ -235,7 +221,6 @@ class _LiveTvScreenState extends State<LiveTvScreen>
return KeyEventResult.handled;
}
if (key.isRightKey) {
_dvrButtonFocusNode.requestFocus();
return KeyEventResult.handled;
}
if (key.isDownKey) {
@@ -252,28 +237,6 @@ class _LiveTvScreenState extends State<LiveTvScreen>
return KeyEventResult.ignored;
}
KeyEventResult _handleDvrKeyEvent(FocusNode _, KeyEvent event) {
if (!event.isActionable) return KeyEventResult.ignored;
final key = event.logicalKey;
if (key.isLeftKey) {
_refreshButtonFocusNode.requestFocus();
return KeyEventResult.handled;
}
if (key.isRightKey || key.isUpKey) {
return KeyEventResult.handled;
}
if (key.isDownKey) {
_focusCurrentTab();
return KeyEventResult.handled;
}
if (key.isSelectKey) {
_openRecordings();
return KeyEventResult.handled;
}
return KeyEventResult.ignored;
}
// ---------------------------------------------------------------------------
// Tab chips
// ---------------------------------------------------------------------------
@@ -355,21 +318,6 @@ class _LiveTvScreenState extends State<LiveTvScreen>
),
),
),
Focus(
focusNode: _dvrButtonFocusNode,
onKeyEvent: _handleDvrKeyEvent,
child: Container(
decoration: BoxDecoration(
color: _isDvrFocused ? Colors.white.withValues(alpha: 0.2) : Colors.transparent,
borderRadius: const BorderRadius.all(Radius.circular(20)),
),
child: IconButton(
icon: const AppIcon(Symbols.fiber_dvr_rounded),
tooltip: t.liveTv.recordings,
onPressed: _openRecordings,
),
),
),
],
),
body: _buildLiveTvBody(theme, useSideNav),
+17 -78
View File
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:material_symbols_icons/symbols.dart';
import '../../focus/focusable_wrapper.dart';
import '../../focus/focusable_button.dart';
import '../../i18n/strings.g.dart';
import '../../models/livetv_channel.dart';
import '../../models/livetv_program.dart';
@@ -18,31 +18,17 @@ void showProgramDetailsSheet(
required String? posterUrl,
required VoidCallback? onTuneChannel,
}) {
final controller = OverlaySheetController.maybeOf(context);
if (controller != null) {
controller.show(
builder: (sheetContext) {
return _ProgramDetailsSheetContent(
program: program,
channel: channel,
posterUrl: posterUrl,
onTuneChannel: onTuneChannel,
);
},
);
} else {
showModalBottomSheet(
context: context,
builder: (sheetContext) {
return _ProgramDetailsSheetContent(
program: program,
channel: channel,
posterUrl: posterUrl,
onTuneChannel: onTuneChannel,
);
},
);
}
OverlaySheetController.showAdaptive(
context,
builder: (sheetContext) {
return _ProgramDetailsSheetContent(
program: program,
channel: channel,
posterUrl: posterUrl,
onTuneChannel: onTuneChannel,
);
},
);
}
class _ProgramDetailsSheetContent extends StatefulWidget {
@@ -82,8 +68,6 @@ class _ProgramDetailsSheetContentState extends State<_ProgramDetailsSheetContent
void _buildButtonFocusNodes() {
int count = 0;
if (widget.program.isCurrentlyAiring && widget.onTuneChannel != null) count++;
// TODO: Implement recording
// count++; // Record button
if (!widget.program.isCurrentlyAiring && widget.onTuneChannel != null) count++;
for (int i = 0; i < count; i++) {
@@ -107,30 +91,20 @@ class _ProgramDetailsSheetContentState extends State<_ProgramDetailsSheetContent
final buttons = <Widget>[];
int buttonIndex = 0;
void closeSheet() {
final controller = OverlaySheetController.maybeOf(context);
if (controller != null) {
controller.close();
} else {
Navigator.of(context).pop();
}
}
void closeSheet() => OverlaySheetController.closeAdaptive(context);
if (program.isCurrentlyAiring && widget.onTuneChannel != null) {
final idx = buttonIndex;
buttons.add(
FocusableWrapper(
FocusableButton(
focusNode: _buttonFocusNodes[idx],
onSelect: () {
onPressed: () {
closeSheet();
widget.onTuneChannel!();
},
onNavigateLeft: idx > 0 ? () => _focusButton(idx - 1) : null,
onNavigateRight: idx < _buttonFocusNodes.length - 1 ? () => _focusButton(idx + 1) : null,
onBack: closeSheet,
borderRadius: 100,
useBackgroundFocus: true,
disableScale: true,
child: FilledButton.icon(
style: FilledButton.styleFrom(tapTargetSize: MaterialTapTargetSize.shrinkWrap),
onPressed: () {
@@ -145,54 +119,19 @@ class _ProgramDetailsSheetContentState extends State<_ProgramDetailsSheetContent
buttonIndex++;
}
// TODO: Implement recording
// if (program.isCurrentlyAiring && widget.onTuneChannel != null) {
// buttons.add(const SizedBox(width: 8));
// }
// // Record button
// {
// final idx = buttonIndex;
// buttons.add(
// FocusableWrapper(
// focusNode: _buttonFocusNodes[idx],
// onSelect: () {
// Navigator.of(context).pop();
// },
// onNavigateLeft: idx > 0 ? () => _focusButton(idx - 1) : null,
// onNavigateRight: idx < _buttonFocusNodes.length - 1 ? () => _focusButton(idx + 1) : null,
// onBack: () => Navigator.of(context).pop(),
// borderRadius: 100,
// useBackgroundFocus: true,
// disableScale: true,
// child: OutlinedButton.icon(
// style: OutlinedButton.styleFrom(tapTargetSize: MaterialTapTargetSize.shrinkWrap),
// onPressed: () {
// Navigator.of(context).pop();
// },
// icon: const AppIcon(Symbols.fiber_manual_record_rounded),
// label: Text(t.liveTv.record),
// ),
// ),
// );
// buttonIndex++;
// }
if (!program.isCurrentlyAiring && widget.onTuneChannel != null) {
buttons.add(const SizedBox(width: 8));
final idx = buttonIndex;
buttons.add(
FocusableWrapper(
FocusableButton(
focusNode: _buttonFocusNodes[idx],
onSelect: () {
onPressed: () {
closeSheet();
widget.onTuneChannel!();
},
onNavigateLeft: idx > 0 ? () => _focusButton(idx - 1) : null,
onNavigateRight: idx < _buttonFocusNodes.length - 1 ? () => _focusButton(idx + 1) : null,
onBack: closeSheet,
borderRadius: 100,
useBackgroundFocus: true,
disableScale: true,
child: OutlinedButton.icon(
style: OutlinedButton.styleFrom(tapTargetSize: MaterialTapTargetSize.shrinkWrap),
onPressed: () {
+145 -106
View File
@@ -10,12 +10,14 @@ import '../../services/plex_client.dart';
import '../i18n/strings.g.dart';
import '../services/update_service.dart';
import '../utils/app_logger.dart';
import '../focus/focusable_button.dart';
import '../utils/dialogs.dart';
import '../utils/provider_extensions.dart';
import '../utils/platform_detector.dart';
import '../utils/video_player_navigation.dart';
import '../main.dart';
import '../mixins/refreshable.dart';
import '../widgets/overlay_sheet.dart';
import '../mixins/tab_visibility_aware.dart';
import '../navigation/navigation_tabs.dart';
import '../providers/multi_server_provider.dart';
@@ -193,6 +195,12 @@ class _MainScreenState extends State<MainScreen> with RouteAware, WindowListener
if (!mounted) return;
// Native updater (Sparkle/WinSparkle) handles everything — skip Flutter dialog
if (UpdateService.useNativeUpdater) {
await UpdateService.checkForUpdatesNative(inBackground: true);
return;
}
try {
final updateInfo = await UpdateService.checkForUpdatesOnStartup();
@@ -226,27 +234,36 @@ class _MainScreenState extends State<MainScreen> with RouteAware, WindowListener
],
),
actions: [
TextButton(
FocusableButton(
autofocus: true,
onPressed: () => Navigator.pop(dialogContext),
style: TextButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 14),
shape: const StadiumBorder(),
child: TextButton(
onPressed: () => Navigator.pop(dialogContext),
style: TextButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 14),
shape: const StadiumBorder(),
),
child: Text(t.common.later),
),
child: Text(t.common.later),
),
TextButton(
FocusableButton(
onPressed: () async {
await UpdateService.skipVersion(updateInfo['latestVersion']);
if (dialogContext.mounted) Navigator.pop(dialogContext);
},
style: TextButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 14),
shape: const StadiumBorder(),
child: TextButton(
onPressed: () async {
await UpdateService.skipVersion(updateInfo['latestVersion']);
if (dialogContext.mounted) Navigator.pop(dialogContext);
},
style: TextButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 14),
shape: const StadiumBorder(),
),
child: Text(t.update.skipVersion),
),
child: Text(t.update.skipVersion),
),
FilledButton(
FocusableButton(
onPressed: () async {
final url = Uri.parse(updateInfo['releaseUrl']);
if (await canLaunchUrl(url)) {
@@ -254,7 +271,16 @@ class _MainScreenState extends State<MainScreen> with RouteAware, WindowListener
}
if (dialogContext.mounted) Navigator.pop(dialogContext);
},
child: Text(t.update.viewRelease),
child: FilledButton(
onPressed: () async {
final url = Uri.parse(updateInfo['releaseUrl']);
if (await canLaunchUrl(url)) {
await launchUrl(url, mode: LaunchMode.externalApplication);
}
if (dialogContext.mounted) Navigator.pop(dialogContext);
},
child: Text(t.update.viewRelease),
),
),
],
);
@@ -505,7 +531,12 @@ class _MainScreenState extends State<MainScreen> with RouteAware, WindowListener
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.resumed && !_isOffline && !_isShowingProfileSelection) {
_showProfileSelectionOnResume();
// Only show profile selection on resume for mobile platforms.
// On desktop, "resumed" fires on every window focus gain (alt-tab, click),
// which is too frequent — the initial prompt on startup is sufficient.
if (Platform.isAndroid || Platform.isIOS) {
_showProfileSelectionOnResume();
}
}
}
@@ -957,6 +988,10 @@ class _MainScreenState extends State<MainScreen> with RouteAware, WindowListener
Widget build(BuildContext context) {
final useSideNav = PlatformDetector.shouldUseSideNavigation(context);
return _buildContent(context, useSideNav);
}
Widget _buildContent(BuildContext context, bool useSideNav) {
if (useSideNav) {
return Consumer<SettingsProvider>(
builder: (context, settingsProvider, child) {
@@ -965,62 +1000,64 @@ class _MainScreenState extends State<MainScreen> with RouteAware, WindowListener
? SideNavigationRailState.expandedWidth
: SideNavigationRailState.collapsedWidth;
return PopScope(
canPop: false, // Prevent system back from popping on Android TV
// ignore: no-empty-block - required callback, back navigation handled by _handleBackKey
onPopInvokedWithResult: (didPop, result) {},
child: Focus(
onKeyEvent: (node, event) => _handleBackKey(event),
child: MainScreenFocusScope(
focusSidebar: _focusSidebar,
focusContent: _focusContent,
isSidebarFocused: _isSidebarFocused,
child: SideNavigationScope(
child: Stack(
children: [
// Content with animated left padding based on sidebar state
Positioned.fill(
child: AnimatedPadding(
duration: const Duration(milliseconds: 200),
curve: Curves.easeOutCubic,
padding: EdgeInsets.only(left: contentLeftPadding),
return OverlaySheetHost(
child: PopScope(
canPop: false, // Prevent system back from popping on Android TV
// ignore: no-empty-block - required callback, back navigation handled by _handleBackKey
onPopInvokedWithResult: (didPop, result) {},
child: Focus(
onKeyEvent: (node, event) => _handleBackKey(event),
child: MainScreenFocusScope(
focusSidebar: _focusSidebar,
focusContent: _focusContent,
isSidebarFocused: _isSidebarFocused,
child: SideNavigationScope(
child: Stack(
children: [
// Content with animated left padding based on sidebar state
Positioned.fill(
child: AnimatedPadding(
duration: const Duration(milliseconds: 200),
curve: Curves.easeOutCubic,
padding: EdgeInsets.only(left: contentLeftPadding),
child: FocusScope(
node: _contentFocusScope,
// No autofocus - we control focus programmatically to prevent
// autofocus from stealing focus back after setState() rebuilds
child: IndexedStack(index: _currentIndex, children: _screens),
),
),
),
// Sidebar overlays content when expanded (unless always expanded)
Positioned(
top: 0,
bottom: 0,
left: 0,
child: FocusScope(
node: _contentFocusScope,
// No autofocus - we control focus programmatically to prevent
// autofocus from stealing focus back after setState() rebuilds
child: IndexedStack(index: _currentIndex, children: _screens),
node: _sidebarFocusScope,
child: SideNavigationRail(
key: _sideNavKey,
selectedIndex: _currentIndex,
selectedLibraryKey: _selectedLibraryGlobalKey,
isOfflineMode: _isOffline,
isSidebarFocused: _isSidebarFocused,
alwaysExpanded: alwaysExpanded,
isReconnecting: _isReconnecting,
onDestinationSelected: (index) {
_selectTab(index);
_focusContent();
},
onLibrarySelected: (key) {
_selectLibrary(key);
_focusContent();
},
onNavigateToContent: _focusContent,
onReconnect: _triggerReconnect,
),
),
),
),
// Sidebar overlays content when expanded (unless always expanded)
Positioned(
top: 0,
bottom: 0,
left: 0,
child: FocusScope(
node: _sidebarFocusScope,
child: SideNavigationRail(
key: _sideNavKey,
selectedIndex: _currentIndex,
selectedLibraryKey: _selectedLibraryGlobalKey,
isOfflineMode: _isOffline,
isSidebarFocused: _isSidebarFocused,
alwaysExpanded: alwaysExpanded,
isReconnecting: _isReconnecting,
onDestinationSelected: (index) {
_selectTab(index);
_focusContent();
},
onLibrarySelected: (key) {
_selectLibrary(key);
_focusContent();
},
onNavigateToContent: _focusContent,
onReconnect: _triggerReconnect,
),
),
),
],
],
),
),
),
),
@@ -1030,53 +1067,55 @@ class _MainScreenState extends State<MainScreen> with RouteAware, WindowListener
);
}
return Scaffold(
body: IndexedStack(index: _currentIndex, children: _screens),
bottomNavigationBar: Column(
mainAxisSize: MainAxisSize.min,
children: [
// Reconnect bar when offline
if (_isOffline)
Material(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
child: InkWell(
onTap: _isReconnecting ? null : _triggerReconnect,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (_isReconnecting)
SizedBox(
width: 16,
height: 16,
child: CircularProgressIndicator(
strokeWidth: 2,
return OverlaySheetHost(
child: Scaffold(
body: IndexedStack(index: _currentIndex, children: _screens),
bottomNavigationBar: Column(
mainAxisSize: MainAxisSize.min,
children: [
// Reconnect bar when offline
if (_isOffline)
Material(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
child: InkWell(
onTap: _isReconnecting ? null : _triggerReconnect,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (_isReconnecting)
SizedBox(
width: 16,
height: 16,
child: CircularProgressIndicator(
strokeWidth: 2,
color: Theme.of(context).colorScheme.primary,
),
)
else
Icon(Symbols.wifi_rounded, size: 18, color: Theme.of(context).colorScheme.primary),
const SizedBox(width: 8),
Text(
t.common.reconnect,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Theme.of(context).colorScheme.primary,
),
)
else
Icon(Symbols.wifi_rounded, size: 18, color: Theme.of(context).colorScheme.primary),
const SizedBox(width: 8),
Text(
t.common.reconnect,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Theme.of(context).colorScheme.primary,
),
),
],
],
),
),
),
),
NavigationBar(
selectedIndex: _currentIndex,
onDestinationSelected: _selectTab,
destinations: _buildNavDestinations(_isOffline),
),
NavigationBar(
selectedIndex: _currentIndex,
onDestinationSelected: _selectTab,
destinations: _buildNavDestinations(_isOffline),
),
],
],
),
),
);
}
+52 -17
View File
@@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart';
import '../utils/global_key_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter/services.dart';
@@ -24,6 +25,7 @@ import '../utils/plex_image_helper.dart';
import '../../services/plex_client.dart';
import '../services/plex_api_cache.dart';
import '../models/plex_metadata.dart';
import '../models/plex_video_playback_data.dart';
import '../utils/content_utils.dart';
import '../utils/rating_utils.dart';
import '../models/download_models.dart';
@@ -47,6 +49,7 @@ import '../mixins/watch_state_aware.dart';
import '../mixins/deletion_aware.dart';
import '../utils/watch_state_notifier.dart';
import '../utils/deletion_notifier.dart';
import 'metadata_edit_screen.dart';
import 'season_detail_screen.dart';
class MediaDetailScreen extends StatefulWidget {
@@ -64,6 +67,7 @@ class _MediaDetailScreenState extends State<MediaDetailScreen> with WatchStateAw
bool _isLoadingSeasons = false;
PlexMetadata? _fullMetadata;
PlexMetadata? _onDeckEpisode;
PlexVideoPlaybackData? _playbackData;
bool _isLoadingMetadata = true;
List<PlexMetadata>? _extras;
late final ScrollController _scrollController;
@@ -103,7 +107,7 @@ class _MediaDetailScreenState extends State<MediaDetailScreen> with WatchStateAw
final _seasonsSectionKey = GlobalKey();
String _toGlobalKey(String ratingKey, {String? serverId}) =>
'${serverId ?? widget.metadata.serverId ?? ''}:$ratingKey';
buildGlobalKey(serverId ?? widget.metadata.serverId ?? '', ratingKey);
// WatchStateAware: watch the show/movie and all season ratingKeys
@override
@@ -359,6 +363,7 @@ class _MediaDetailScreenState extends State<MediaDetailScreen> with WatchStateAw
metadata: metadata,
isOffline: widget.isOffline,
onRefresh: _loadFullMetadata,
playbackData: _playbackData,
);
}
}
@@ -420,7 +425,7 @@ class _MediaDetailScreenState extends State<MediaDetailScreen> with WatchStateAw
if (!widget.isOffline)
Consumer<DownloadProvider>(
builder: (context, downloadProvider, _) {
final globalKey = '${metadata.serverId}:${metadata.ratingKey}';
final globalKey = metadata.globalKey;
final progress = downloadProvider.getProgress(globalKey);
final isQueueing = downloadProvider.isQueueing(globalKey);
@@ -703,6 +708,25 @@ class _MediaDetailScreenState extends State<MediaDetailScreen> with WatchStateAw
iconSize: 20,
style: IconButton.styleFrom(minimumSize: const Size(48, 48), maximumSize: const Size(48, 48)),
),
// Edit metadata button (hidden in offline mode)
if (!widget.isOffline) ...[
const SizedBox(width: 12),
IconButton.filledTonal(
onPressed: () async {
final result = await Navigator.push(
context,
MaterialPageRoute(builder: (context) => MetadataEditScreen(metadata: metadata)),
);
if (result == true && mounted) {
_loadFullMetadata();
}
},
icon: const AppIcon(Symbols.edit_rounded, fill: 1),
tooltip: t.metadataEdit.editMetadata,
iconSize: 20,
style: IconButton.styleFrom(minimumSize: const Size(48, 48), maximumSize: const Size(48, 48)),
),
],
],
),
);
@@ -828,9 +852,7 @@ class _MediaDetailScreenState extends State<MediaDetailScreen> with WatchStateAw
const SizedBox(width: 4),
Text(
hasRating
? (starValue == starValue.truncateToDouble()
? '${starValue.toInt()}'
: starValue.toStringAsFixed(1))
? formatRating(starValue)
: t.mediaMenu.rate,
style: TextStyle(
color: Theme.of(context).colorScheme.onSecondaryContainer,
@@ -946,6 +968,7 @@ class _MediaDetailScreenState extends State<MediaDetailScreen> with WatchStateAw
final result = await client.getMetadataWithImagesAndOnDeck(widget.metadata.ratingKey);
final metadata = result['metadata'] as PlexMetadata?;
final onDeckEpisode = result['onDeckEpisode'] as PlexMetadata?;
final playbackData = result['playbackData'] as PlexVideoPlaybackData?;
if (!mounted) return;
@@ -963,6 +986,7 @@ class _MediaDetailScreenState extends State<MediaDetailScreen> with WatchStateAw
setState(() {
_fullMetadata = metadataWithServerId;
_onDeckEpisode = onDeckWithServerId;
_playbackData = playbackData;
_isLoadingMetadata = false;
});
@@ -2039,7 +2063,7 @@ class _MediaDetailScreenState extends State<MediaDetailScreen> with WatchStateAw
duration: const Duration(milliseconds: 150),
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
borderRadius: const BorderRadius.all(Radius.circular(8)),
border: Border.all(
color: showFocus
? Theme.of(context).colorScheme.primary.withValues(alpha: 0.5)
@@ -2047,16 +2071,18 @@ class _MediaDetailScreenState extends State<MediaDetailScreen> with WatchStateAw
width: 2,
),
),
child: isTv
? Text(
metadata.summary!,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(height: 1.6),
)
: CollapsibleText(
text: metadata.summary!,
maxLines: isMobile ? 6 : 4,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(height: 1.6),
),
child: () {
final summaryStyle =
Theme.of(context).textTheme.bodyLarge?.copyWith(height: 1.6);
if (isTv) {
return Text(metadata.summary!, style: summaryStyle);
}
return CollapsibleText(
text: metadata.summary!,
maxLines: isMobile ? 6 : 4,
style: summaryStyle,
);
}(),
);
},
),
@@ -2438,9 +2464,14 @@ class _SeasonCard extends StatefulWidget {
class _SeasonCardState extends State<_SeasonCard> {
final _contextMenuKey = GlobalKey<MediaContextMenuState>();
Offset? _tapPosition;
void _storeTapPosition(TapDownDetails details) {
_tapPosition = details.globalPosition;
}
void _showContextMenu() {
_contextMenuKey.currentState?.showContextMenu(context);
_contextMenuKey.currentState?.showContextMenu(context, position: _tapPosition);
}
@override
@@ -2465,6 +2496,10 @@ class _SeasonCardState extends State<_SeasonCard> {
hint: "Tap to view ${widget.season.title}",
child: InkWell(
onTap: widget.onTap,
onTapDown: _storeTapPosition,
onLongPress: _showContextMenu,
onSecondaryTapDown: _storeTapPosition,
onSecondaryTap: _showContextMenu,
child: Padding(
padding: const EdgeInsets.all(12),
child: Row(
+729
View File
@@ -0,0 +1,729 @@
import 'package:flutter/material.dart';
import 'package:material_symbols_icons/symbols.dart';
import '../focus/focusable_button.dart';
import '../i18n/strings.g.dart';
import '../models/plex_metadata.dart';
import '../services/plex_client.dart';
import '../utils/dialogs.dart';
import '../utils/language_codes.dart';
import '../utils/provider_extensions.dart';
import '../utils/snackbar_helper.dart';
import '../widgets/app_icon.dart';
import '../widgets/artwork_picker_dialog.dart';
import '../widgets/focusable_list_tile.dart';
import '../widgets/focused_scroll_scaffold.dart';
import '../widgets/plex_optimized_image.dart';
class MetadataEditScreen extends StatefulWidget {
final PlexMetadata metadata;
const MetadataEditScreen({super.key, required this.metadata});
@override
State<MetadataEditScreen> createState() => _MetadataEditScreenState();
}
class _MetadataEditScreenState extends State<MetadataEditScreen> {
late PlexClient _client;
PlexMetadata? _fullMetadata;
bool _isLoading = true;
bool _isSaving = false;
// Text field values
String? _title;
String? _titleSort;
String? _originalTitle;
String? _originallyAvailableAt;
String? _contentRating;
String? _studio;
String? _tagline;
String? _summary;
// Original values for change detection
String? _origTitle;
String? _origTitleSort;
String? _origOriginalTitle;
String? _origOriginallyAvailableAt;
String? _origContentRating;
String? _origStudio;
String? _origTagline;
String? _origSummary;
// Advanced prefs (loaded from metadata JSON)
final Map<String, String> _currentPrefs = {};
bool get _hasChanges =>
_title != _origTitle ||
_titleSort != _origTitleSort ||
_originalTitle != _origOriginalTitle ||
_originallyAvailableAt != _origOriginallyAvailableAt ||
_contentRating != _origContentRating ||
_studio != _origStudio ||
_tagline != _origTagline ||
_summary != _origSummary;
PlexMediaType get _mediaType => widget.metadata.mediaType;
@override
void initState() {
super.initState();
_client = context.getClientWithFallback(widget.metadata.serverId);
_loadMetadata();
}
Future<void> _loadMetadata() async {
try {
// If the passed metadata already has full fields (e.g., from detail screen),
// use it directly instead of re-fetching. We check both summary and
// librarySectionID since the edit screen needs both for display and save.
if (widget.metadata.summary != null && widget.metadata.librarySectionID != null) {
_fullMetadata = widget.metadata;
_initFieldsFromMetadata(widget.metadata);
setState(() => _isLoading = false);
return;
}
final meta = await _client.getMetadataWithImages(widget.metadata.ratingKey);
if (!mounted) return;
if (meta != null) {
_fullMetadata = meta;
_initFieldsFromMetadata(meta);
} else {
_initFieldsFromMetadata(widget.metadata);
}
setState(() => _isLoading = false);
} catch (e) {
if (!mounted) return;
_initFieldsFromMetadata(widget.metadata);
setState(() => _isLoading = false);
}
}
void _initFieldsFromMetadata(PlexMetadata meta) {
_title = meta.title;
_titleSort = meta.titleSort ?? '';
_originalTitle = meta.originalTitle ?? '';
_originallyAvailableAt = meta.originallyAvailableAt ?? '';
_contentRating = meta.contentRating ?? '';
_studio = meta.studio ?? '';
_tagline = meta.tagline ?? '';
_summary = meta.summary ?? '';
_origTitle = _title;
_origTitleSort = _titleSort;
_origOriginalTitle = _originalTitle;
_origOriginallyAvailableAt = _originallyAvailableAt;
_origContentRating = _contentRating;
_origStudio = _studio;
_origTagline = _tagline;
_origSummary = _summary;
}
Future<void> _save() async {
if (!_hasChanges || _isSaving) return;
final sectionId = _fullMetadata?.librarySectionID ?? widget.metadata.librarySectionID;
if (sectionId == null) {
if (mounted) showErrorSnackBar(context, t.metadataEdit.metadataUpdateFailed);
return;
}
setState(() => _isSaving = true);
final success = await _client.updateMetadata(
sectionId: sectionId,
ratingKey: widget.metadata.ratingKey,
typeNumber: _mediaType.typeNumber,
title: _title != _origTitle ? _title : null,
titleSort: _titleSort != _origTitleSort ? _titleSort : null,
originalTitle: _originalTitle != _origOriginalTitle ? _originalTitle : null,
originallyAvailableAt: _originallyAvailableAt != _origOriginallyAvailableAt ? _originallyAvailableAt : null,
contentRating: _contentRating != _origContentRating ? _contentRating : null,
studio: _studio != _origStudio ? _studio : null,
tagline: _tagline != _origTagline ? _tagline : null,
summary: _summary != _origSummary ? _summary : null,
);
if (!mounted) return;
setState(() => _isSaving = false);
if (success) {
showSuccessSnackBar(context, t.metadataEdit.metadataUpdated);
Navigator.pop(context, true);
} else {
showErrorSnackBar(context, t.metadataEdit.metadataUpdateFailed);
}
}
Future<void> _editTextField({
required String title,
required String label,
required String? currentValue,
required ValueChanged<String> onChanged,
bool multiline = false,
}) async {
final String? result;
if (multiline) {
result = await showMultilineTextInputDialog(
context,
title: title,
labelText: label,
initialValue: currentValue,
);
} else {
result = await showTextInputDialog(
context,
title: title,
labelText: label,
hintText: '',
initialValue: currentValue,
);
}
if (result != null && mounted) {
final value = result;
setState(() => onChanged(value));
}
}
Future<void> _editDate() async {
DateTime initial = DateTime.now();
if (_originallyAvailableAt != null && _originallyAvailableAt!.isNotEmpty) {
final parsed = DateTime.tryParse(_originallyAvailableAt!);
if (parsed != null) initial = parsed;
}
final picked = await showDatePicker(
context: context,
initialDate: initial,
firstDate: DateTime(1800),
lastDate: DateTime(2200),
);
if (picked != null && mounted) {
setState(() {
_originallyAvailableAt =
'${picked.year}-${picked.month.toString().padLeft(2, '0')}-${picked.day.toString().padLeft(2, '0')}';
});
}
}
Future<void> _openArtworkPicker(String element) async {
final result = await showDialog<bool>(
context: context,
builder: (context) => ArtworkPickerDialog(
client: _client,
ratingKey: widget.metadata.ratingKey,
element: element,
),
);
if (result == true && mounted) {
// Reload metadata to get updated artwork paths
_loadMetadata();
}
}
Future<void> _showAdvancedSettingDialog({
required String title,
required String prefKey,
required List<({String value, String label})> options,
}) async {
// Determine current value from metadata or default
final currentValue = _currentPrefs[prefKey] ?? _getMetadataPrefValue(prefKey);
final result = await showDialog<String>(
context: context,
builder: (dialogContext) {
String? selected = currentValue;
return StatefulBuilder(
builder: (context, setDialogState) {
return AlertDialog(
title: Text(title),
content: SizedBox(
width: double.maxFinite,
child: RadioGroup<String>(
groupValue: selected,
onChanged: (val) {
setDialogState(() => selected = val);
Navigator.pop(dialogContext, val);
},
child: ListView(
shrinkWrap: true,
children: options.map((option) {
return FocusableRadioListTile<String>(
title: Text(option.label),
value: option.value,
);
}).toList(),
),
),
),
actions: [
FocusableButton(
autofocus: true,
onPressed: () => Navigator.pop(dialogContext),
child: TextButton(
onPressed: () => Navigator.pop(dialogContext),
child: Text(t.common.cancel),
),
),
],
);
},
);
},
);
if (result != null && mounted) {
setState(() => _currentPrefs[prefKey] = result);
await _client.updateMetadataPrefs(widget.metadata.ratingKey, {prefKey: result});
}
}
String _getMetadataPrefValue(String key) {
// These prefs appear as keys on the raw metadata JSON when non-default.
// Since we use typed models, we check known fields.
final meta = _fullMetadata ?? widget.metadata;
switch (key) {
case 'audioLanguage':
return meta.audioLanguage ?? '';
case 'subtitleLanguage':
return meta.subtitleLanguage ?? '';
default:
return '';
}
}
String _getDisplayValueForPref(String prefKey, List<({String value, String label})> options) {
final val = _currentPrefs[prefKey] ?? _getMetadataPrefValue(prefKey);
for (final option in options) {
if (option.value == val) return option.label;
}
return options.first.label;
}
// ===== Field visibility =====
bool get _showSortTitle => _mediaType != PlexMediaType.season;
bool get _showOriginalTitle => _mediaType == PlexMediaType.movie || _mediaType == PlexMediaType.show;
bool get _showReleaseDate => _mediaType != PlexMediaType.season;
bool get _showContentRating => _mediaType != PlexMediaType.season;
bool get _showStudio => _mediaType == PlexMediaType.movie || _mediaType == PlexMediaType.show;
bool get _showTagline => _mediaType == PlexMediaType.movie || _mediaType == PlexMediaType.show;
bool get _showBackground =>
_mediaType == PlexMediaType.movie || _mediaType == PlexMediaType.show || _mediaType == PlexMediaType.episode;
bool get _showAdvanced => _mediaType != PlexMediaType.episode;
@override
Widget build(BuildContext context) {
if (_isLoading) {
return FocusedScrollScaffold(
title: Text(t.metadataEdit.screenTitle),
slivers: [const SliverFillRemaining(child: Center(child: CircularProgressIndicator()))],
);
}
return FocusedScrollScaffold(
title: Text(t.metadataEdit.screenTitle),
actions: [
if (_isSaving)
const Padding(
padding: EdgeInsets.all(12),
child: SizedBox(width: 24, height: 24, child: CircularProgressIndicator(strokeWidth: 2)),
)
else
IconButton(
onPressed: _hasChanges ? _save : null,
icon: const AppIcon(Symbols.check_rounded, fill: 1),
),
],
slivers: [
SliverPadding(
padding: const EdgeInsets.all(16),
sliver: SliverList(
delegate: SliverChildListDelegate([
_buildBasicInfoCard(),
const SizedBox(height: 16),
_buildArtworkCard(),
if (_showAdvanced) ...[
const SizedBox(height: 16),
_buildAdvancedSettingsCard(),
],
]),
),
),
],
);
}
Widget _buildBasicInfoCard() {
return Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(16),
child: Text(
t.metadataEdit.basicInfo,
style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.bold),
),
),
_buildFieldTile(
label: t.metadataEdit.title,
value: _title,
onTap: () => _editTextField(
title: t.metadataEdit.title,
label: t.metadataEdit.title,
currentValue: _title,
onChanged: (v) => _title = v,
),
),
if (_showSortTitle)
_buildFieldTile(
label: t.metadataEdit.sortTitle,
value: _titleSort,
onTap: () => _editTextField(
title: t.metadataEdit.sortTitle,
label: t.metadataEdit.sortTitle,
currentValue: _titleSort,
onChanged: (v) => _titleSort = v,
),
),
if (_showOriginalTitle)
_buildFieldTile(
label: t.metadataEdit.originalTitle,
value: _originalTitle,
onTap: () => _editTextField(
title: t.metadataEdit.originalTitle,
label: t.metadataEdit.originalTitle,
currentValue: _originalTitle,
onChanged: (v) => _originalTitle = v,
),
),
if (_showReleaseDate)
_buildFieldTile(
label: t.metadataEdit.releaseDate,
value: _originallyAvailableAt,
onTap: _editDate,
),
if (_showContentRating)
_buildFieldTile(
label: t.metadataEdit.contentRating,
value: _contentRating,
onTap: () => _editTextField(
title: t.metadataEdit.contentRating,
label: t.metadataEdit.contentRating,
currentValue: _contentRating,
onChanged: (v) => _contentRating = v,
),
),
if (_showStudio)
_buildFieldTile(
label: t.metadataEdit.studio,
value: _studio,
onTap: () => _editTextField(
title: t.metadataEdit.studio,
label: t.metadataEdit.studio,
currentValue: _studio,
onChanged: (v) => _studio = v,
),
),
if (_showTagline)
_buildFieldTile(
label: t.metadataEdit.tagline,
value: _tagline,
onTap: () => _editTextField(
title: t.metadataEdit.tagline,
label: t.metadataEdit.tagline,
currentValue: _tagline,
onChanged: (v) => _tagline = v,
),
),
_buildFieldTile(
label: t.metadataEdit.summary,
value: _summary,
onTap: () => _editTextField(
title: t.metadataEdit.summary,
label: t.metadataEdit.summary,
currentValue: _summary,
onChanged: (v) => _summary = v,
multiline: true,
),
),
],
),
);
}
Widget _buildFieldTile({required String label, String? value, required VoidCallback onTap}) {
final displayValue = (value == null || value.isEmpty) ? t.metadataEdit.notSet : value;
final isNotSet = value == null || value.isEmpty;
return ListTile(
title: Text(label),
subtitle: Text(
displayValue,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: isNotSet ? TextStyle(color: Theme.of(context).colorScheme.onSurfaceVariant.withValues(alpha: 0.5)) : null,
),
trailing: const AppIcon(Symbols.chevron_right_rounded),
onTap: onTap,
);
}
Widget _buildArtworkCard() {
final meta = _fullMetadata ?? widget.metadata;
return Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(16),
child: Text(
t.metadataEdit.artwork,
style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.bold),
),
),
ListTile(
leading: SizedBox(
width: 40,
height: 60,
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(4)),
child: PlexOptimizedImage(
client: _client,
imagePath: meta.thumb,
width: 40,
height: 60,
fit: BoxFit.cover,
),
),
),
title: Text(t.metadataEdit.poster),
trailing: const AppIcon(Symbols.chevron_right_rounded),
onTap: () => _openArtworkPicker('posters'),
),
if (_showBackground)
ListTile(
leading: SizedBox(
width: 80,
height: 45,
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(4)),
child: PlexOptimizedImage(
client: _client,
imagePath: meta.art,
width: 80,
height: 45,
fit: BoxFit.cover,
),
),
),
title: Text(t.metadataEdit.background),
trailing: const AppIcon(Symbols.chevron_right_rounded),
onTap: () => _openArtworkPicker('arts'),
),
],
),
);
}
Widget _buildAdvancedSettingsCard() {
return Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(16),
child: Text(
t.metadataEdit.advancedSettings,
style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.bold),
),
),
if (_mediaType == PlexMediaType.show) ..._buildShowAdvancedSettings(),
if (_mediaType == PlexMediaType.movie) ..._buildMovieAdvancedSettings(),
if (_mediaType == PlexMediaType.season) ..._buildSeasonAdvancedSettings(),
],
),
);
}
List<Widget> _buildShowAdvancedSettings() {
return [
_buildAdvancedTile(
title: t.metadataEdit.episodeSorting,
prefKey: 'episodeSort',
options: [
(value: '-1', label: t.metadataEdit.libraryDefault),
(value: '0', label: t.metadataEdit.oldestFirst),
(value: '1', label: t.metadataEdit.newestFirst),
],
),
_buildAdvancedTile(
title: t.metadataEdit.keep,
prefKey: 'autoDeletionItemPolicyUnwatchedLibrary',
options: [
(value: '0', label: t.metadataEdit.allEpisodes),
(value: '5', label: t.metadataEdit.latestEpisodes(count: '5')),
(value: '3', label: t.metadataEdit.latestEpisodes(count: '3')),
(value: '1', label: t.metadataEdit.latestEpisode),
(value: '-3', label: t.metadataEdit.episodesAddedPastDays(count: '3')),
(value: '-7', label: t.metadataEdit.episodesAddedPastDays(count: '7')),
(value: '-30', label: t.metadataEdit.episodesAddedPastDays(count: '30')),
],
),
_buildAdvancedTile(
title: t.metadataEdit.deleteAfterPlaying,
prefKey: 'autoDeletionItemPolicyWatchedLibrary',
options: [
(value: '0', label: t.metadataEdit.never),
(value: '1', label: t.metadataEdit.afterADay),
(value: '7', label: t.metadataEdit.afterAWeek),
(value: '30', label: t.metadataEdit.afterAMonth),
(value: '100', label: t.metadataEdit.onNextRefresh),
],
),
_buildAdvancedTile(
title: t.metadataEdit.seasons,
prefKey: 'flattenSeasons',
options: [
(value: '-1', label: t.metadataEdit.libraryDefault),
(value: '0', label: t.metadataEdit.show),
(value: '1', label: t.metadataEdit.hide),
],
),
_buildAdvancedTile(
title: t.metadataEdit.episodeOrdering,
prefKey: 'showOrdering',
options: [
(value: '', label: t.metadataEdit.libraryDefault),
(value: 'tmdbAiring', label: t.metadataEdit.tmdbAiring),
(value: 'tvdbAiring', label: t.metadataEdit.tvdbAiring),
(value: 'tvdbAbsolute', label: t.metadataEdit.tvdbAbsolute),
],
),
_buildAdvancedTile(
title: t.metadataEdit.metadataLanguage,
prefKey: 'languageOverride',
options: _metadataLanguageOptions(t.metadataEdit.libraryDefault),
),
_buildAdvancedTile(
title: t.metadataEdit.useOriginalTitle,
prefKey: 'useOriginalTitle',
options: [
(value: '-1', label: t.metadataEdit.libraryDefault),
(value: '0', label: t.common.no),
(value: '1', label: t.common.yes),
],
),
_buildAdvancedTile(
title: t.metadataEdit.preferredAudioLanguage,
prefKey: 'audioLanguage',
options: _audioSubtitleLanguageOptions(t.metadataEdit.accountDefault),
),
_buildAdvancedTile(
title: t.metadataEdit.preferredSubtitleLanguage,
prefKey: 'subtitleLanguage',
options: _audioSubtitleLanguageOptions(t.metadataEdit.accountDefault),
),
_buildAdvancedTile(
title: t.metadataEdit.subtitleMode,
prefKey: 'subtitleMode',
options: [
(value: '-1', label: t.metadataEdit.accountDefault),
(value: '0', label: t.metadataEdit.manuallySelected),
(value: '1', label: t.metadataEdit.shownWithForeignAudio),
(value: '2', label: t.metadataEdit.alwaysEnabled),
],
),
];
}
List<Widget> _buildMovieAdvancedSettings() {
return [
_buildAdvancedTile(
title: t.metadataEdit.metadataLanguage,
prefKey: 'languageOverride',
options: _metadataLanguageOptions(t.metadataEdit.libraryDefault),
),
_buildAdvancedTile(
title: t.metadataEdit.useOriginalTitle,
prefKey: 'useOriginalTitle',
options: [
(value: '-1', label: t.metadataEdit.libraryDefault),
(value: '0', label: t.common.no),
(value: '1', label: t.common.yes),
],
),
];
}
List<Widget> _buildSeasonAdvancedSettings() {
return [
_buildAdvancedTile(
title: t.metadataEdit.preferredAudioLanguage,
prefKey: 'audioLanguage',
options: _audioSubtitleLanguageOptions(t.metadataEdit.seriesDefault),
),
_buildAdvancedTile(
title: t.metadataEdit.preferredSubtitleLanguage,
prefKey: 'subtitleLanguage',
options: _audioSubtitleLanguageOptions(t.metadataEdit.seriesDefault),
),
_buildAdvancedTile(
title: t.metadataEdit.subtitleMode,
prefKey: 'subtitleMode',
options: [
(value: '-1', label: t.metadataEdit.seriesDefault),
(value: '0', label: t.metadataEdit.manuallySelected),
(value: '1', label: t.metadataEdit.shownWithForeignAudio),
(value: '2', label: t.metadataEdit.alwaysEnabled),
],
),
];
}
Widget _buildAdvancedTile({
required String title,
required String prefKey,
required List<({String value, String label})> options,
}) {
return ListTile(
title: Text(title),
subtitle: Text(_getDisplayValueForPref(prefKey, options)),
trailing: const AppIcon(Symbols.chevron_right_rounded),
onTap: () => _showAdvancedSettingDialog(title: title, prefKey: prefKey, options: options),
);
}
}
// ===== Language option lists =====
// Plex locale codes for metadata agent language.
const _plexLocaleCodes = [
'ar-SA', 'bg-BG', 'ca-ES', 'zh-CN', 'zh-HK', 'zh-TW', 'hr-HR', 'cs-CZ',
'da-DK', 'nl-NL', 'en-US', 'en-AU', 'en-CA', 'en-GB', 'et-EE', 'fi-FI',
'fr-FR', 'fr-CA', 'de-DE', 'el-GR', 'he-IL', 'hi-IN', 'hu-HU', 'is-IS',
'id-ID', 'it-IT', 'ja-JP', 'ko-KR', 'lv-LV', 'lt-LT', 'nb-NO', 'fa-IR',
'pl-PL', 'pt-BR', 'pt-PT', 'ro-RO', 'ru-RU', 'sk-SK', 'es-ES', 'es-MX',
'sv-SE', 'th-TH', 'tr-TR', 'uk-UA', 'vi-VN',
];
// Common 2-letter codes shown at the top of audio/subtitle pickers.
const _commonAudioSubtitleCodes = ['en', 'ja', 'fr', 'de', 'it', 'es', 'pt', 'ru', 'ar'];
List<({String value, String label})> _buildLanguageOptions(String defaultLabel, List<String> codes) {
return [
(value: '', label: defaultLabel),
...codes.map((c) => (value: c, label: LanguageCodes.getDisplayName(c))),
];
}
List<({String value, String label})> _metadataLanguageOptions(String defaultLabel) =>
_buildLanguageOptions(defaultLabel, _plexLocaleCodes);
List<({String value, String label})> _audioSubtitleLanguageOptions(String defaultLabel) =>
_buildLanguageOptions(defaultLabel, [..._commonAudioSubtitleCodes, ..._plexLocaleCodes]);
+56 -28
View File
@@ -12,7 +12,7 @@ import '../../widgets/plex_optimized_image.dart';
/// Custom list item widget for playlist items
/// Shows drag handle, poster, title/metadata, duration, and remove button
class PlaylistItemCard extends StatelessWidget {
class PlaylistItemCard extends StatefulWidget {
final PlexMetadata item;
final int index;
final VoidCallback onRemove;
@@ -38,21 +38,37 @@ class PlaylistItemCard extends StatelessWidget {
this.isMoving = false,
});
@override
State<PlaylistItemCard> createState() => _PlaylistItemCardState();
}
class _PlaylistItemCardState extends State<PlaylistItemCard> {
final _contextMenuKey = GlobalKey<MediaContextMenuState>();
Offset? _tapPosition;
void _storeTapPosition(TapDownDetails details) {
_tapPosition = details.globalPosition;
}
void _showContextMenu() {
_contextMenuKey.currentState?.showContextMenu(context, position: _tapPosition);
}
@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
// Determine if row is focused (main content area)
final isRowFocused = isFocused && focusedColumn == 0;
final isRowFocused = widget.isFocused && widget.focusedColumn == 0;
// Focus states for individual elements
final isDragHandleFocused = isFocused && focusedColumn == 1;
final isRemoveButtonFocused = isFocused && focusedColumn == 2;
final isDragHandleFocused = widget.isFocused && widget.focusedColumn == 1;
final isRemoveButtonFocused = widget.isFocused && widget.focusedColumn == 2;
// Determine card styling based on focus/move state
Color? cardColor;
ShapeBorder? cardShape;
if (isMoving) {
if (widget.isMoving) {
cardColor = colorScheme.primaryContainer;
} else if (isRowFocused) {
// Row is focused - use visible border like FocusableWrapper
@@ -64,27 +80,32 @@ class PlaylistItemCard extends StatelessWidget {
}
return MediaContextMenu(
item: item,
onRefresh: onRefresh,
onTap: onTap,
key: _contextMenuKey,
item: widget.item,
onRefresh: widget.onRefresh,
onTap: widget.onTap,
child: Card(
margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
color: cardColor,
shape: cardShape,
child: InkWell(
onTap: onTap,
onTap: widget.onTap,
onTapDown: _storeTapPosition,
onLongPress: _showContextMenu,
onSecondaryTapDown: _storeTapPosition,
onSecondaryTap: _showContextMenu,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
// Drag handle (if reorderable)
// Wrapped in GestureDetector to consume long-press and prevent context menu
if (canReorder)
if (widget.canReorder)
GestureDetector(
// ignore: no-empty-block - consumes long-press to prevent context menu on drag
onLongPress: () {},
child: ReorderableDragStartListener(
index: index,
index: widget.index,
child: Container(
color: Colors.transparent,
height: 90,
@@ -99,9 +120,9 @@ class PlaylistItemCard extends StatelessWidget {
)
: null,
child: AppIcon(
isMoving ? Symbols.swap_vert_rounded : Symbols.drag_indicator_rounded,
widget.isMoving ? Symbols.swap_vert_rounded : Symbols.drag_indicator_rounded,
fill: 1,
color: (isMoving || isDragHandleFocused) ? colorScheme.primary : Colors.grey,
color: (widget.isMoving || isDragHandleFocused) ? colorScheme.primary : Colors.grey,
),
),
),
@@ -121,7 +142,7 @@ class PlaylistItemCard extends StatelessWidget {
children: [
// Title
Text(
item.displayTitle,
widget.item.displayTitle,
style: const TextStyle(fontSize: 15, fontWeight: FontWeight.w500),
maxLines: 1,
overflow: TextOverflow.ellipsis,
@@ -138,10 +159,14 @@ class PlaylistItemCard extends StatelessWidget {
),
// Progress indicator if partially watched
if (item.viewOffset != null && item.duration != null)
if (widget.item.viewOffset != null && widget.item.duration != null)
Padding(
padding: const EdgeInsets.only(top: 6),
child: MediaProgressBar(viewOffset: item.viewOffset!, duration: item.duration!, minHeight: 3),
child: MediaProgressBar(
viewOffset: widget.item.viewOffset!,
duration: widget.item.duration!,
minHeight: 3,
),
),
],
),
@@ -150,8 +175,11 @@ class PlaylistItemCard extends StatelessWidget {
const SizedBox(width: 12),
// Duration
if (item.duration != null)
Text(formatDurationTextual(item.duration!), style: TextStyle(fontSize: 13, color: Colors.grey[400])),
if (widget.item.duration != null)
Text(
formatDurationTextual(widget.item.duration!),
style: TextStyle(fontSize: 13, color: Colors.grey[400]),
),
const SizedBox(width: 8),
@@ -165,7 +193,7 @@ class PlaylistItemCard extends StatelessWidget {
: null,
child: IconButton(
icon: const AppIcon(Symbols.close_rounded, fill: 1, size: 20),
onPressed: onRemove,
onPressed: widget.onRemove,
tooltip: t.playlists.removeItem,
color: isRemoveButtonFocused ? colorScheme.primary : Colors.grey[400],
),
@@ -180,11 +208,11 @@ class PlaylistItemCard extends StatelessWidget {
/// Get the correct PlexClient for this item's server
PlexClient _getClientForItem(BuildContext context) {
return context.getClientForServer(item.serverId!);
return context.getClientForServer(widget.item.serverId!);
}
Widget _buildPosterImage(BuildContext context) {
final posterUrl = item.posterThumb();
final posterUrl = widget.item.posterThumb();
return ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(6)),
child: PlexOptimizedImage.poster(
@@ -209,22 +237,22 @@ class PlaylistItemCard extends StatelessWidget {
}
String _buildSubtitle() {
final itemType = item.type.toLowerCase();
final itemType = widget.item.type.toLowerCase();
if (itemType == 'episode') {
// For episodes, show "S#E# - Episode Title"
final season = item.parentIndex;
final episode = item.index;
final season = widget.item.parentIndex;
final episode = widget.item.index;
if (season != null && episode != null) {
return 'S${season}E$episode${item.displaySubtitle != null ? ' - ${item.displaySubtitle}' : ''}';
return 'S${season}E$episode${widget.item.displaySubtitle != null ? ' - ${widget.item.displaySubtitle}' : ''}';
}
return item.displaySubtitle ?? t.discover.tvShow;
return widget.item.displaySubtitle ?? t.discover.tvShow;
} else if (itemType == 'movie') {
// For movies, show year
return item.year?.toString() ?? t.discover.movie;
return widget.item.year?.toString() ?? t.discover.movie;
}
// Default to type
return item.type;
return widget.item.type;
}
}
+12 -2
View File
@@ -8,6 +8,7 @@ import '../../focus/dpad_navigator.dart';
import '../../focus/focus_theme.dart';
import '../../focus/input_mode_tracker.dart';
import '../../focus/key_event_utils.dart';
import '../../focus/focusable_button.dart';
import '../../i18n/strings.g.dart';
import '../../utils/platform_detector.dart';
import '../../widgets/app_icon.dart';
@@ -100,9 +101,18 @@ class _PinEntryDialogState extends State<PinEntryDialog> with SingleTickerProvid
],
),
actions: [
TextButton(onPressed: _cancel, child: Text(t.common.cancel)),
FocusableButton(
onPressed: _cancel,
child: TextButton(onPressed: _cancel, child: Text(t.common.cancel)),
),
if (!isMobile)
FilledButton(onPressed: () => _pinInputKey.currentState?._trySubmit(), child: Text(t.common.submit)),
FocusableButton(
onPressed: () => _pinInputKey.currentState?._trySubmit(),
child: FilledButton(
onPressed: () => _pinInputKey.currentState?._trySubmit(),
child: Text(t.common.submit),
),
),
],
),
);
+14 -4
View File
@@ -8,6 +8,7 @@ import 'package:provider/provider.dart';
import '../../services/plex_client.dart';
import '../main.dart';
import '../focus/focusable_wrapper.dart';
import '../utils/global_key_utils.dart';
import '../focus/key_event_utils.dart';
import '../focus/dpad_navigator.dart';
import '../focus/input_mode_tracker.dart';
@@ -55,7 +56,7 @@ class _SeasonDetailScreenState extends State<SeasonDetailScreen>
bool _suppressNextBackKeyUp = false;
bool _routeSubscribed = false;
String _toGlobalKey(String ratingKey, {String? serverId}) => '${serverId ?? widget.season.serverId ?? ''}:$ratingKey';
String _toGlobalKey(String ratingKey, {String? serverId}) => buildGlobalKey(serverId ?? widget.season.serverId ?? '', ratingKey);
// WatchStateAware: watch all episode ratingKeys
@override
@@ -270,7 +271,7 @@ class _SeasonDetailScreenState extends State<SeasonDetailScreen>
String? localPosterPath;
if (widget.isOffline && episode.serverId != null) {
final downloadProvider = context.read<DownloadProvider>();
final globalKey = '${episode.serverId}:${episode.ratingKey}';
final globalKey = episode.globalKey;
// Get the artwork reference and convert to local file path
final artworkRef = downloadProvider.getArtworkPaths(globalKey);
localPosterPath = artworkRef?.getLocalPath(DownloadStorageService.instance, episode.serverId!);
@@ -342,9 +343,14 @@ class _EpisodeCard extends StatefulWidget {
class _EpisodeCardState extends State<_EpisodeCard> {
final _contextMenuKey = GlobalKey<MediaContextMenuState>();
Offset? _tapPosition;
void _storeTapPosition(TapDownDetails details) {
_tapPosition = details.globalPosition;
}
void _showContextMenu() {
_contextMenuKey.currentState?.showContextMenu(context);
_contextMenuKey.currentState?.showContextMenu(context, position: _tapPosition);
}
Widget _buildEpisodeMetaRow(BuildContext context) {
@@ -404,6 +410,10 @@ class _EpisodeCardState extends State<_EpisodeCard> {
child: InkWell(
key: Key(widget.episode.ratingKey),
onTap: widget.onTap,
onTapDown: _storeTapPosition,
onLongPress: _showContextMenu,
onSecondaryTapDown: _storeTapPosition,
onSecondaryTap: _showContextMenu,
hoverColor: Theme.of(context).colorScheme.surface.withValues(alpha: 0.05),
child: Container(
decoration: BoxDecoration(
@@ -499,7 +509,7 @@ class _EpisodeCardState extends State<_EpisodeCard> {
// Only show download status in online mode
if (!widget.isOffline && widget.episode.serverId != null) {
final globalKey = '${widget.episode.serverId}:${widget.episode.ratingKey}';
final globalKey = widget.episode.globalKey;
final progress = downloadProvider.getProgress(globalKey);
final isQueueing = downloadProvider.isQueueing(globalKey);
@@ -4,11 +4,11 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:plezy/widgets/app_icon.dart';
import 'package:material_symbols_icons/symbols.dart';
import '../../focus/focusable_button.dart';
import '../../i18n/strings.g.dart';
import '../../models/external_player_models.dart';
import '../../services/settings_service.dart';
import '../../focus/key_event_utils.dart';
import '../../widgets/desktop_app_bar.dart';
import '../../widgets/focused_scroll_scaffold.dart';
class ExternalPlayerScreen extends StatefulWidget {
const ExternalPlayerScreen({super.key});
@@ -46,73 +46,66 @@ class _ExternalPlayerScreenState extends State<ExternalPlayerScreen> {
@override
Widget build(BuildContext context) {
if (_isLoading) {
return Focus(
autofocus: true,
onKeyEvent: (_, event) => handleBackKeyNavigation(context, event),
child: const Scaffold(body: Center(child: CircularProgressIndicator())),
return FocusedScrollScaffold(
title: Text(t.externalPlayer.title),
slivers: [const SliverFillRemaining(child: Center(child: CircularProgressIndicator()))],
);
}
final knownPlayers = KnownPlayers.getForCurrentPlatform();
return Focus(
autofocus: true,
onKeyEvent: (_, event) => handleBackKeyNavigation(context, event),
child: Scaffold(
body: CustomScrollView(
slivers: [
CustomAppBar(title: Text(t.externalPlayer.title), pinned: true),
SliverPadding(
padding: const EdgeInsets.all(16),
sliver: SliverList(
delegate: SliverChildListDelegate([
Card(
child: SwitchListTile(
secondary: const AppIcon(Symbols.open_in_new_rounded, fill: 1),
title: Text(t.externalPlayer.useExternalPlayer),
subtitle: Text(t.externalPlayer.useExternalPlayerDescription),
value: _useExternalPlayer,
onChanged: (value) async {
setState(() => _useExternalPlayer = value);
await _settingsService.setUseExternalPlayer(value);
},
),
),
if (_useExternalPlayer) ...[
const SizedBox(height: 16),
Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(16),
child: Text(
t.externalPlayer.selectPlayer,
style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.bold),
),
),
// Known players
...knownPlayers.map((player) => _buildPlayerTile(player)),
// Custom players
if (_customPlayers.isNotEmpty) const Divider(),
..._customPlayers.map((player) => _buildPlayerTile(player, isCustom: true)),
// Add custom player button
const Divider(),
ListTile(
leading: const AppIcon(Symbols.add_rounded, fill: 1),
title: Text(t.externalPlayer.addCustomPlayer),
onTap: _showAddCustomPlayerDialog,
),
],
),
),
],
]),
return FocusedScrollScaffold(
title: Text(t.externalPlayer.title),
slivers: [
SliverPadding(
padding: const EdgeInsets.all(16),
sliver: SliverList(
delegate: SliverChildListDelegate([
Card(
child: SwitchListTile(
secondary: const AppIcon(Symbols.open_in_new_rounded, fill: 1),
title: Text(t.externalPlayer.useExternalPlayer),
subtitle: Text(t.externalPlayer.useExternalPlayerDescription),
value: _useExternalPlayer,
onChanged: (value) async {
setState(() => _useExternalPlayer = value);
await _settingsService.setUseExternalPlayer(value);
},
),
),
),
],
if (_useExternalPlayer) ...[
const SizedBox(height: 16),
Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(16),
child: Text(
t.externalPlayer.selectPlayer,
style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.bold),
),
),
// Known players
...knownPlayers.map((player) => _buildPlayerTile(player)),
// Custom players
if (_customPlayers.isNotEmpty) const Divider(),
..._customPlayers.map((player) => _buildPlayerTile(player, isCustom: true)),
// Add custom player button
const Divider(),
ListTile(
leading: const AppIcon(Symbols.add_rounded, fill: 1),
title: Text(t.externalPlayer.addCustomPlayer),
onTap: _showAddCustomPlayerDialog,
),
],
),
),
],
]),
),
),
),
],
);
}
@@ -177,6 +170,8 @@ class _ExternalPlayerScreenState extends State<ExternalPlayerScreen> {
Future<void> _showAddCustomPlayerDialog() async {
final nameController = TextEditingController();
final valueController = TextEditingController();
final valueFocusNode = FocusNode();
final saveFocusNode = FocusNode();
var selectedType = CustomPlayerType.command;
final result = await showDialog<bool>(
@@ -209,6 +204,7 @@ class _ExternalPlayerScreenState extends State<ExternalPlayerScreen> {
decoration: InputDecoration(labelText: t.externalPlayer.playerName, hintText: 'My Player'),
autofocus: true,
textInputAction: TextInputAction.next,
onSubmitted: (_) => primaryFocus?.nextFocus(),
),
const SizedBox(height: 16),
SizedBox(
@@ -232,21 +228,34 @@ class _ExternalPlayerScreenState extends State<ExternalPlayerScreen> {
const SizedBox(height: 16),
TextField(
controller: valueController,
focusNode: valueFocusNode,
decoration: InputDecoration(labelText: fieldLabel, hintText: fieldHint),
textInputAction: TextInputAction.done,
onSubmitted: (_) => saveFocusNode.requestFocus(),
),
],
),
),
actions: [
TextButton(onPressed: () => Navigator.pop(context), child: Text(t.common.cancel)),
FilledButton(
FocusableButton(
onPressed: () => Navigator.pop(context),
child: TextButton(onPressed: () => Navigator.pop(context), child: Text(t.common.cancel)),
),
FocusableButton(
focusNode: saveFocusNode,
onPressed: () {
if (nameController.text.isNotEmpty && valueController.text.isNotEmpty) {
Navigator.pop(context, true);
}
},
child: Text(t.common.save),
child: FilledButton(
onPressed: () {
if (nameController.text.isNotEmpty && valueController.text.isNotEmpty) {
Navigator.pop(context, true);
}
},
child: Text(t.common.save),
),
),
],
);
@@ -254,6 +263,9 @@ class _ExternalPlayerScreenState extends State<ExternalPlayerScreen> {
),
);
valueFocusNode.dispose();
saveFocusNode.dispose();
if (result != true) return;
final id = 'custom_${DateTime.now().millisecondsSinceEpoch}';
+54 -54
View File
@@ -6,11 +6,11 @@ import 'package:plezy/widgets/app_icon.dart';
import 'package:material_symbols_icons/symbols.dart';
import 'package:flutter/services.dart';
import 'package:logger/logger.dart';
import '../../focus/focusable_button.dart';
import '../../i18n/strings.g.dart';
import '../../utils/app_logger.dart';
import '../../utils/snackbar_helper.dart';
import '../../focus/key_event_utils.dart';
import '../../widgets/desktop_app_bar.dart';
import '../../widgets/focused_scroll_scaffold.dart';
class LogsScreen extends StatefulWidget {
const LogsScreen({super.key});
@@ -120,7 +120,16 @@ class _LogsScreenState extends State<LogsScreen> {
),
],
),
actions: [TextButton(onPressed: () => Navigator.of(ctx).pop(), child: Text(t.common.close))],
actions: [
FocusableButton(
autofocus: true,
onPressed: () => Navigator.of(ctx).pop(),
child: TextButton(
onPressed: () => Navigator.of(ctx).pop(),
child: Text(t.common.close),
),
),
],
),
);
} catch (_) {
@@ -166,58 +175,49 @@ class _LogsScreenState extends State<LogsScreen> {
@override
Widget build(BuildContext context) {
return Focus(
autofocus: true,
onKeyEvent: (_, event) => handleBackKeyNavigation(context, event),
child: Scaffold(
body: CustomScrollView(
slivers: [
CustomAppBar(
title: Text(t.screens.logs),
pinned: true,
actions: [
IconButton(
icon: const AppIcon(Symbols.refresh_rounded, fill: 1),
onPressed: _loadLogs,
tooltip: t.common.refresh,
),
IconButton(
icon: const AppIcon(Symbols.upload_rounded, fill: 1),
onPressed: _logs.isNotEmpty ? _uploadLogs : null,
tooltip: t.logs.uploadLogs,
),
IconButton(
icon: const AppIcon(Symbols.content_copy_rounded, fill: 1),
onPressed: _logs.isNotEmpty ? _copyAllLogs : null,
tooltip: t.logs.copyLogs,
),
IconButton(
icon: const AppIcon(Symbols.delete_outline_rounded, fill: 1),
onPressed: _logs.isNotEmpty ? _clearLogs : null,
tooltip: t.logs.clearLogs,
),
],
),
if (_logs.isEmpty)
SliverFillRemaining(child: Center(child: Text(t.messages.noLogsAvailable)))
else
SliverPadding(
padding: const EdgeInsets.all(8),
sliver: SliverList(
delegate: SliverChildBuilderDelegate((context, index) {
final log = _logs[index];
return _LogEntryCard(
log: log,
formatTime: _formatTime,
levelColor: _getLevelColor(log.level),
levelIcon: _getLevelIcon(log.level),
);
}, childCount: _logs.length),
),
),
],
return FocusedScrollScaffold(
title: Text(t.screens.logs),
actions: [
IconButton(
icon: const AppIcon(Symbols.refresh_rounded, fill: 1),
onPressed: _loadLogs,
tooltip: t.common.refresh,
),
),
IconButton(
icon: const AppIcon(Symbols.upload_rounded, fill: 1),
onPressed: _logs.isNotEmpty ? _uploadLogs : null,
tooltip: t.logs.uploadLogs,
),
IconButton(
icon: const AppIcon(Symbols.content_copy_rounded, fill: 1),
onPressed: _logs.isNotEmpty ? _copyAllLogs : null,
tooltip: t.logs.copyLogs,
),
IconButton(
icon: const AppIcon(Symbols.delete_outline_rounded, fill: 1),
onPressed: _logs.isNotEmpty ? _clearLogs : null,
tooltip: t.logs.clearLogs,
),
],
slivers: [
if (_logs.isEmpty)
SliverFillRemaining(child: Center(child: Text(t.messages.noLogsAvailable)))
else
SliverPadding(
padding: const EdgeInsets.all(8),
sliver: SliverList(
delegate: SliverChildBuilderDelegate((context, index) {
final log = _logs[index];
return _LogEntryCard(
log: log,
formatTime: _formatTime,
levelColor: _getLevelColor(log.level),
levelIcon: _getLevelIcon(log.level),
);
}, childCount: _logs.length),
),
),
],
);
}
}
+50 -36
View File
@@ -3,11 +3,11 @@ import 'package:plezy/widgets/app_icon.dart';
import 'package:material_symbols_icons/symbols.dart';
import '../../i18n/strings.g.dart';
import '../../models/mpv_config_models.dart';
import '../../focus/focusable_button.dart';
import '../../utils/dialogs.dart';
import '../../utils/snackbar_helper.dart';
import '../../services/settings_service.dart';
import '../../focus/key_event_utils.dart';
import '../../widgets/desktop_app_bar.dart';
import '../../widgets/focused_scroll_scaffold.dart';
class MpvConfigScreen extends StatefulWidget {
const MpvConfigScreen({super.key});
@@ -111,15 +111,25 @@ class _MpvConfigScreenState extends State<MpvConfigScreen> {
],
),
actions: [
TextButton(onPressed: () => Navigator.pop(context, false), child: Text(t.common.cancel)),
TextButton(
FocusableButton(
onPressed: () => Navigator.pop(context, false),
child: TextButton(onPressed: () => Navigator.pop(context, false), child: Text(t.common.cancel)),
),
FocusableButton(
focusNode: saveFocusNode,
onPressed: () {
if (keyController.text.isNotEmpty && valueController.text.isNotEmpty) {
Navigator.pop(context, true);
}
},
child: Text(t.common.save),
child: TextButton(
onPressed: () {
if (keyController.text.isNotEmpty && valueController.text.isNotEmpty) {
Navigator.pop(context, true);
}
},
child: Text(t.common.save),
),
),
],
),
@@ -164,6 +174,7 @@ class _MpvConfigScreenState extends State<MpvConfigScreen> {
if (_entries.isEmpty) return;
final nameController = TextEditingController();
final saveFocusNode = FocusNode();
final result = await showDialog<bool>(
context: context,
@@ -173,21 +184,36 @@ class _MpvConfigScreenState extends State<MpvConfigScreen> {
controller: nameController,
decoration: InputDecoration(labelText: t.mpvConfig.presetName, hintText: t.mpvConfig.presetNameHint),
autofocus: true,
textInputAction: TextInputAction.done,
onSubmitted: (_) => saveFocusNode.requestFocus(),
),
actions: [
TextButton(onPressed: () => Navigator.pop(context, false), child: Text(t.common.cancel)),
TextButton(
FocusableButton(
onPressed: () => Navigator.pop(context, false),
child: TextButton(onPressed: () => Navigator.pop(context, false), child: Text(t.common.cancel)),
),
FocusableButton(
focusNode: saveFocusNode,
onPressed: () {
if (nameController.text.isNotEmpty) {
Navigator.pop(context, true);
}
},
child: Text(t.common.save),
child: FilledButton(
onPressed: () {
if (nameController.text.isNotEmpty) {
Navigator.pop(context, true);
}
},
child: Text(t.common.save),
),
),
],
),
);
saveFocusNode.dispose();
if (result == true) {
await _settingsService.saveMpvPreset(nameController.text.trim(), _entries);
if (!mounted) return;
@@ -236,35 +262,23 @@ class _MpvConfigScreenState extends State<MpvConfigScreen> {
@override
Widget build(BuildContext context) {
if (_isLoading) {
return Focus(
autofocus: true,
onKeyEvent: (_, event) => handleBackKeyNavigation(context, event),
child: const Scaffold(body: Center(child: CircularProgressIndicator())),
);
}
return Focus(
autofocus: true,
onKeyEvent: (_, event) => handleBackKeyNavigation(context, event),
child: Scaffold(
body: CustomScrollView(
slivers: [
CustomAppBar(title: Text(t.screens.mpvConfig), pinned: true),
SliverPadding(
padding: const EdgeInsets.all(16),
sliver: SliverList(
delegate: SliverChildListDelegate([
_buildPresetsCard(),
const SizedBox(height: 16),
_buildEntriesCard(),
const SizedBox(height: 24),
]),
return FocusedScrollScaffold(
title: Text(t.screens.mpvConfig),
slivers: _isLoading
? [const SliverFillRemaining(child: Center(child: CircularProgressIndicator()))]
: [
SliverPadding(
padding: const EdgeInsets.all(16),
sliver: SliverList(
delegate: SliverChildListDelegate([
_buildPresetsCard(),
const SizedBox(height: 16),
_buildEntriesCard(),
const SizedBox(height: 24),
]),
),
),
),
],
),
),
],
);
}
+102 -64
View File
@@ -9,6 +9,7 @@ import '../../models/hotkey_model.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../focus/focus_memory_tracker.dart';
import '../../focus/input_mode_tracker.dart';
import '../../i18n/strings.g.dart';
@@ -21,11 +22,13 @@ import '../../providers/settings_provider.dart';
import '../../providers/theme_provider.dart';
import '../../providers/user_profile_provider.dart';
import '../../services/keyboard_shortcuts_service.dart';
import '../../mpv/player/player_android.dart';
import '../../services/settings_service.dart' as settings;
import '../../services/update_service.dart';
import '../../utils/snackbar_helper.dart';
import '../../utils/platform_detector.dart';
import '../../widgets/desktop_app_bar.dart';
import '../../widgets/focused_scroll_scaffold.dart';
import '../../widgets/tv_number_spinner.dart';
import 'hotkey_recorder_widget.dart';
import '../../providers/companion_remote_provider.dart';
@@ -103,7 +106,7 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
bool _enableDebugLogging = false;
bool _enableHardwareDecoding = true;
int _bufferSize = 128;
int _bufferSize = 0;
int _seekTimeSmall = 10;
int _seekTimeLarge = 30;
int _sleepTimerDuration = 30;
@@ -211,7 +214,7 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
onKeyEvent: _handleKeyEvent,
child: CustomScrollView(
slivers: [
CustomAppBar(title: Text(t.settings.title), pinned: true),
ExcludeFocus(child: CustomAppBar(title: Text(t.settings.title), pinned: true)),
SliverPadding(
padding: const EdgeInsets.all(16),
sliver: SliverList(
@@ -484,7 +487,7 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
focusNode: _focusTracker.get(_kBufferSize),
leading: const AppIcon(Symbols.memory_rounded, fill: 1),
title: Text(t.settings.bufferSize),
subtitle: Text(t.settings.bufferSizeMB(size: _bufferSize.toString())),
subtitle: Text(_bufferSize == 0 ? t.settings.bufferSizeAuto : t.settings.bufferSizeMB(size: _bufferSize.toString())),
trailing: const AppIcon(Symbols.chevron_right_rounded, fill: 1),
onTap: () => _showBufferSizeDialog(),
),
@@ -928,6 +931,31 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
}
Widget _buildUpdateSection() {
// Native updater: simple tile that triggers Sparkle/WinSparkle native dialog
if (UpdateService.useNativeUpdater) {
return Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(16),
child: Text(
t.settings.updates,
style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.bold),
),
),
ListTile(
focusNode: _focusTracker.get(_kCheckForUpdates),
leading: const AppIcon(Symbols.system_update_rounded, fill: 1),
title: Text(t.settings.checkForUpdates),
trailing: const AppIcon(Symbols.chevron_right_rounded, fill: 1),
onTap: () => UpdateService.checkForUpdatesNative(inBackground: false),
),
],
),
);
}
final hasUpdate = _updateInfo != null && _updateInfo!['hasUpdate'] == true;
return Card(
@@ -1055,7 +1083,7 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
}
void _showBufferSizeDialog() {
final options = [64, 128, 256, 512, 1024];
final options = [0, 64, 128, 256, 512, 1024];
showDialog(
context: context,
@@ -1070,13 +1098,19 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
_bufferSize == size ? Symbols.radio_button_checked_rounded : Symbols.radio_button_unchecked_rounded,
fill: 1,
),
title: Text('${size}MB'),
onTap: () {
title: Text(size == 0 ? t.settings.bufferSizeAuto : '${size}MB'),
onTap: () async {
setState(() {
_bufferSize = size;
_settingsService.setBufferSize(size);
});
Navigator.pop(context);
if (Platform.isAndroid && size > 0) {
final heapMB = await PlayerAndroid.getHeapSize();
if (heapMB > 0 && size > heapMB ~/ 4 && mounted) {
showAppSnackBar(this.context, t.settings.bufferSizeWarning(heap: heapMB.toString(), size: size.toString()));
}
}
},
);
}).toList(),
@@ -1099,9 +1133,9 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
required int currentValue,
required Future<void> Function(int value) onSave,
}) {
final isTV = PlatformDetector.isTV();
final useDpadControls = InputModeTracker.isKeyboardMode(context);
if (isTV) {
if (useDpadControls) {
_showNumericInputDialogTV(
title: title,
suffixText: suffixText,
@@ -1408,7 +1442,11 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
title: Text(t.settings.clearCache),
content: Text(t.settings.clearCacheDescription),
actions: [
TextButton(onPressed: () => Navigator.pop(context), child: Text(t.common.cancel)),
TextButton(
autofocus: true,
onPressed: () => Navigator.pop(context),
child: Text(t.common.cancel),
),
TextButton(
onPressed: () async {
final navigator = Navigator.of(context);
@@ -1434,7 +1472,11 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
title: Text(t.settings.resetSettings),
content: Text(t.settings.resetSettingsDescription),
actions: [
TextButton(onPressed: () => Navigator.pop(context), child: Text(t.common.cancel)),
TextButton(
autofocus: true,
onPressed: () => Navigator.pop(context),
child: Text(t.common.cancel),
),
TextButton(
onPressed: () async {
final navigator = Navigator.of(context);
@@ -1443,7 +1485,6 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
if (mounted) {
navigator.pop();
showSuccessSnackBar(this.context, t.settings.resetSettingsSuccess);
// Reload settings
_loadSettings();
}
},
@@ -1581,7 +1622,11 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
],
),
actions: [
TextButton(onPressed: () => Navigator.pop(context), child: Text(t.common.close)),
TextButton(
autofocus: true,
onPressed: () => Navigator.pop(context),
child: Text(t.common.close),
),
FilledButton(
onPressed: () async {
final url = Uri.parse(_updateInfo!['releaseUrl']);
@@ -1742,61 +1787,54 @@ class _KeyboardShortcutsScreenState extends State<_KeyboardShortcutsScreen> {
@override
Widget build(BuildContext context) {
if (_isLoading) {
return const Scaffold(body: Center(child: CircularProgressIndicator()));
}
return FocusedScrollScaffold(
title: Text(t.settings.keyboardShortcuts),
actions: [
TextButton(
onPressed: () async {
await widget.keyboardService.resetToDefaults();
await _loadHotkeys();
if (mounted) {
showSuccessSnackBar(this.context, t.settings.shortcutsReset);
}
},
child: Text(t.common.reset),
),
],
slivers: _isLoading
? [const SliverFillRemaining(child: Center(child: CircularProgressIndicator()))]
: [
SliverPadding(
padding: const EdgeInsets.all(16),
sliver: SliverList(
delegate: SliverChildBuilderDelegate((context, index) {
final actions = _hotkeys.keys.toList();
final action = actions[index];
final hotkey = _hotkeys[action]!;
return Scaffold(
body: CustomScrollView(
slivers: [
CustomAppBar(
title: Text(t.settings.keyboardShortcuts),
pinned: true,
actions: [
TextButton(
onPressed: () async {
await widget.keyboardService.resetToDefaults();
await _loadHotkeys();
if (mounted) {
showSuccessSnackBar(this.context, t.settings.shortcutsReset);
}
},
child: Text(t.common.reset),
return Card(
margin: const EdgeInsets.only(bottom: 8),
child: ListTile(
title: Text(widget.keyboardService.getActionDisplayName(action)),
subtitle: Text(action),
trailing: Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
decoration: BoxDecoration(
border: Border.fromBorderSide(BorderSide(color: Theme.of(context).dividerColor)),
borderRadius: const BorderRadius.all(Radius.circular(6)),
),
child: Text(
widget.keyboardService.formatHotkey(hotkey),
style: const TextStyle(fontFamily: 'monospace'),
),
),
onTap: () => _editHotkey(action, hotkey),
),
);
}, childCount: _hotkeys.length),
),
),
],
),
SliverPadding(
padding: const EdgeInsets.all(16),
sliver: SliverList(
delegate: SliverChildBuilderDelegate((context, index) {
final actions = _hotkeys.keys.toList();
final action = actions[index];
final hotkey = _hotkeys[action]!;
return Card(
margin: const EdgeInsets.only(bottom: 8),
child: ListTile(
title: Text(widget.keyboardService.getActionDisplayName(action)),
subtitle: Text(action),
trailing: Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
decoration: BoxDecoration(
border: Border.fromBorderSide(BorderSide(color: Theme.of(context).dividerColor)),
borderRadius: const BorderRadius.all(Radius.circular(6)),
),
child: Text(
widget.keyboardService.formatHotkey(hotkey),
style: const TextStyle(fontFamily: 'monospace'),
),
),
onTap: () => _editHotkey(action, hotkey),
),
);
}, childCount: _hotkeys.length),
),
),
],
),
);
}
@@ -2,11 +2,11 @@ import 'package:flutter/material.dart';
import 'package:plezy/widgets/app_icon.dart';
import 'package:material_symbols_icons/symbols.dart';
import 'package:flex_color_picker/flex_color_picker.dart';
import '../../focus/focusable_button.dart';
import '../../i18n/strings.g.dart';
import '../../services/settings_service.dart';
import '../../utils/platform_detector.dart';
import '../../focus/key_event_utils.dart';
import '../../widgets/desktop_app_bar.dart';
import '../../focus/input_mode_tracker.dart';
import '../../widgets/focused_scroll_scaffold.dart';
import '../../widgets/tv_color_picker.dart';
import '../../widgets/tv_number_spinner.dart';
@@ -198,14 +198,23 @@ class _SubtitleStylingScreenState extends State<SubtitleStylingScreen> {
],
),
actions: [
TextButton(onPressed: () => Navigator.pop(dialogContext), child: Text(t.common.cancel)),
TextButton(
FocusableButton(
onPressed: () => Navigator.pop(dialogContext),
child: TextButton(onPressed: () => Navigator.pop(dialogContext), child: Text(t.common.cancel)),
),
FocusableButton(
focusNode: saveFocusNode,
onPressed: () {
onSave(spinnerValue);
Navigator.pop(dialogContext);
},
child: Text(t.common.save),
child: TextButton(
onPressed: () {
onSave(spinnerValue);
Navigator.pop(dialogContext);
},
child: Text(t.common.save),
),
),
],
);
@@ -263,14 +272,23 @@ class _SubtitleStylingScreenState extends State<SubtitleStylingScreen> {
onConfirm: () => saveFocusNode.requestFocus(),
),
actions: [
TextButton(onPressed: () => Navigator.pop(dialogContext), child: Text(t.common.cancel)),
TextButton(
FocusableButton(
onPressed: () => Navigator.pop(dialogContext),
child: TextButton(onPressed: () => Navigator.pop(dialogContext), child: Text(t.common.cancel)),
),
FocusableButton(
focusNode: saveFocusNode,
onPressed: () {
onColorSelected(_colorToHex(pickerColor));
Navigator.pop(dialogContext);
},
child: Text(t.common.save),
child: TextButton(
onPressed: () {
onColorSelected(_colorToHex(pickerColor));
Navigator.pop(dialogContext);
},
child: Text(t.common.save),
),
),
],
);
@@ -282,32 +300,24 @@ class _SubtitleStylingScreenState extends State<SubtitleStylingScreen> {
@override
Widget build(BuildContext context) {
if (_isLoading) {
return Focus(
autofocus: true,
onKeyEvent: (_, event) => handleBackKeyNavigation(context, event),
child: const Scaffold(body: Center(child: CircularProgressIndicator())),
);
}
return Focus(
autofocus: true,
onKeyEvent: (_, event) => handleBackKeyNavigation(context, event),
child: Scaffold(
body: CustomScrollView(
slivers: [
CustomAppBar(title: Text(t.screens.subtitleStyling), pinned: true),
SliverPadding(
padding: const EdgeInsets.all(16),
sliver: SliverList(delegate: SliverChildListDelegate([_buildStylingCard(), const SizedBox(height: 24)])),
),
],
),
),
return FocusedScrollScaffold(
title: Text(t.screens.subtitleStyling),
slivers: _isLoading
? [const SliverFillRemaining(child: Center(child: CircularProgressIndicator()))]
: [
SliverPadding(
padding: const EdgeInsets.all(16),
sliver: SliverList(
delegate: SliverChildListDelegate([_buildStylingCard(), const SizedBox(height: 24)]),
),
),
],
);
}
Widget _buildStylingCard() {
final useDpadControls = InputModeTracker.isKeyboardMode(context);
return Card(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -320,7 +330,7 @@ class _SubtitleStylingScreenState extends State<SubtitleStylingScreen> {
),
),
// Font Size Slider
if (PlatformDetector.isTV())
if (useDpadControls)
ListTile(
title: Text(t.subtitlingStyling.fontSize),
trailing: Text('$_fontSize'),
@@ -353,7 +363,7 @@ class _SubtitleStylingScreenState extends State<SubtitleStylingScreen> {
),
const Divider(),
// Subtitle Position Slider
if (PlatformDetector.isTV())
if (useDpadControls)
ListTile(
title: Text(t.subtitlingStyling.position),
trailing: Text(() {
@@ -406,7 +416,7 @@ class _SubtitleStylingScreenState extends State<SubtitleStylingScreen> {
_settingsService.setSubtitleTextColor(color);
}
if (PlatformDetector.isTV()) {
if (useDpadControls) {
_showTvColorPicker(t.subtitlingStyling.textColor, _textColor, onColorSelected);
} else {
_showColorPicker(t.subtitlingStyling.textColor, _textColor, onColorSelected);
@@ -415,7 +425,7 @@ class _SubtitleStylingScreenState extends State<SubtitleStylingScreen> {
),
const Divider(),
// Border Size Slider
if (PlatformDetector.isTV())
if (useDpadControls)
ListTile(
title: Text(t.subtitlingStyling.borderSize),
trailing: Text('$_borderSize'),
@@ -458,7 +468,7 @@ class _SubtitleStylingScreenState extends State<SubtitleStylingScreen> {
_settingsService.setSubtitleBorderColor(color);
}
if (PlatformDetector.isTV()) {
if (useDpadControls) {
_showTvColorPicker(t.subtitlingStyling.borderColor, _borderColor, onColorSelected);
} else {
_showColorPicker(t.subtitlingStyling.borderColor, _borderColor, onColorSelected);
@@ -467,7 +477,7 @@ class _SubtitleStylingScreenState extends State<SubtitleStylingScreen> {
),
const Divider(),
// Background Opacity Slider
if (PlatformDetector.isTV())
if (useDpadControls)
ListTile(
title: Text(t.subtitlingStyling.backgroundOpacity),
trailing: Text('$_backgroundOpacity%'),
@@ -513,7 +523,7 @@ class _SubtitleStylingScreenState extends State<SubtitleStylingScreen> {
_settingsService.setSubtitleBackgroundColor(color);
}
if (PlatformDetector.isTV()) {
if (useDpadControls) {
_showTvColorPicker(t.subtitlingStyling.backgroundColor, _backgroundColor, onColorSelected);
} else {
_showColorPicker(t.subtitlingStyling.backgroundColor, _backgroundColor, onColorSelected);
+359 -182
View File
@@ -18,6 +18,7 @@ import '../models/livetv_channel.dart';
import '../services/plex_api_cache.dart';
import '../models/plex_media_version.dart';
import '../models/plex_metadata.dart';
import '../models/plex_video_playback_data.dart';
import '../utils/content_utils.dart';
import '../models/plex_media_info.dart';
import '../providers/download_provider.dart';
@@ -57,7 +58,7 @@ import '../utils/plex_url_helper.dart';
import '../utils/video_player_navigation.dart';
import '../widgets/overlay_sheet.dart';
import '../widgets/video_controls/video_controls.dart';
import '../focus/focusable_wrapper.dart';
import '../focus/focusable_button.dart';
import '../focus/input_mode_tracker.dart';
import '../focus/dpad_navigator.dart';
import '../focus/key_event_utils.dart';
@@ -71,6 +72,7 @@ class VideoPlayerScreen extends StatefulWidget {
final SubtitleTrack? preferredSubtitleTrack;
final int selectedMediaIndex;
final bool isOffline;
final PlexVideoPlaybackData? playbackData;
// Live TV fields
final bool isLive;
@@ -90,6 +92,7 @@ class VideoPlayerScreen extends StatefulWidget {
this.preferredSubtitleTrack,
this.selectedMediaIndex = 0,
this.isOffline = false,
this.playbackData,
this.isLive = false,
this.liveChannelName,
this.liveStreamUrl,
@@ -157,10 +160,20 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
late final FocusNode _playNextCancelFocusNode;
late final FocusNode _playNextConfirmFocusNode;
// "Still watching?" prompt (sleep timer)
bool _showStillWatchingPrompt = false;
int _stillWatchingCountdown = 30;
Timer? _stillWatchingTimer;
late final FocusNode _stillWatchingPauseFocusNode;
late final FocusNode _stillWatchingContinueFocusNode;
// Screen-level focus node: persists across loading/initialized phases so
// key events never escape the video player route.
late final FocusNode _screenFocusNode;
// Cached setting: when false on Windows/Linux, ESC should not exit the player
bool _videoPlayerNavigationEnabled = false;
// App lifecycle state tracking
bool _wasPlayingBeforeInactive = false;
@@ -218,6 +231,10 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
_playNextCancelFocusNode = FocusNode(debugLabel: 'PlayNextCancel');
_playNextConfirmFocusNode = FocusNode(debugLabel: 'PlayNextConfirm');
// Initialize "Still watching?" dialog focus nodes
_stillWatchingPauseFocusNode = FocusNode(debugLabel: 'StillWatchingPause');
_stillWatchingContinueFocusNode = FocusNode(debugLabel: 'StillWatchingContinue');
// Screen-level focus node that wraps the entire build output.
// Ensures a single stable focus target across loading → initialized phases.
_screenFocusNode = FocusNode(debugLabel: 'VideoPlayerScreen');
@@ -262,9 +279,9 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
// Wire companion remote playback callbacks
_setupCompanionRemoteCallbacks();
// Exit the player when the sleep timer completes so the device can auto-lock
_sleepTimerSubscription = SleepTimerService().onCompleted.listen((_) {
if (mounted) _handleBackButton();
// Show "Still watching?" prompt when sleep timer fires
_sleepTimerSubscription = SleepTimerService().onPrompt.listen((_) {
if (mounted) _showStillWatchingDialog();
});
// Initialize player asynchronously with buffer size from settings
@@ -379,8 +396,8 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
try {
// Load buffer size from settings
final settingsService = await SettingsService.getInstance();
_videoPlayerNavigationEnabled = settingsService.getVideoPlayerNavigationEnabled();
final bufferSizeMB = settingsService.getBufferSize();
final bufferSizeBytes = bufferSizeMB * 1024 * 1024;
final enableHardwareDecoding = settingsService.getEnableHardwareDecoding();
final debugLoggingEnabled = settingsService.getEnableDebugLogging();
final useExoPlayer = settingsService.getUseExoPlayer();
@@ -389,7 +406,10 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
player = Player(useExoPlayer: useExoPlayer);
await player!.setProperty('sub-ass', 'yes'); // Enable libass
await player!.setProperty('demuxer-max-bytes', bufferSizeBytes.toString());
if (bufferSizeMB > 0) {
final bufferSizeBytes = bufferSizeMB * 1024 * 1024;
await player!.setProperty('demuxer-max-bytes', bufferSizeBytes.toString());
}
await player!.setProperty('msg-level', debugLoggingEnabled ? 'all=debug' : 'all=error');
await player!.setLogLevel(debugLoggingEnabled ? 'v' : 'warn');
await player!.setProperty('hwdec', _getHwdecValue(enableHardwareDecoding));
@@ -413,6 +433,13 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
await player!.setProperty('audio-exclusive', 'yes');
}
// Audio passthrough (desktop only - sends bitstream to receiver)
if (Platform.isWindows || Platform.isMacOS || Platform.isLinux) {
if (settingsService.getAudioPassthrough()) {
await player!.setAudioPassthrough(true);
}
}
// HDR is controlled via custom hdr-enabled property on iOS/macOS/Windows
if (Platform.isIOS || Platform.isMacOS || Platform.isWindows) {
final enableHDR = settingsService.getEnableHDR();
@@ -458,6 +485,12 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
_isPlayerInitialized = true;
});
// Restart sleep timer if we're starting a new playback session
final p = player;
if (p != null) {
SleepTimerService().restartIfNeeded(() => p.pause());
}
// Enable wakelock to prevent screen from turning off during playback
WakelockPlus.enable();
appLogger.d('Wakelock enabled for video playback');
@@ -928,6 +961,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
metadata: widget.metadata,
selectedMediaIndex: widget.selectedMediaIndex,
preferOffline: true, // Use downloaded file if available
playbackData: widget.playbackData,
);
}
@@ -945,7 +979,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
// since the user may have watched further since downloading.
Duration? resumePosition;
if (widget.isOffline) {
final globalKey = '${widget.metadata.serverId}:${widget.metadata.ratingKey}';
final globalKey = widget.metadata.globalKey;
final localOffset = await offlineWatchService!.getLocalViewOffset(globalKey);
if (localOffset != null && localOffset > 0) {
resumePosition = Duration(milliseconds: localOffset);
@@ -1097,7 +1131,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
// Debug: log metadata info
appLogger.d('Offline playback - serverId: ${widget.metadata.serverId}, ratingKey: ${widget.metadata.ratingKey}');
final globalKey = '${widget.metadata.serverId}:${widget.metadata.ratingKey}';
final globalKey = widget.metadata.globalKey;
appLogger.d('Looking up video with globalKey: $globalKey');
final videoPath = await downloadProvider.getVideoFilePath(globalKey);
@@ -1131,7 +1165,13 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
final isInPip = _videoPIPManager!.isPipActive.value;
// Only handle exit - entry is handled by onBeforeEnterPip callback
if (!isInPip) {
final restoreAmbient = _videoFilterManager!.hadAmbientLightingBeforePip;
_videoFilterManager!.exitPipMode();
// Restore ambient lighting if it was active before PiP
if (restoreAmbient) {
_videoFilterManager!.clearPipAmbientLightingFlag();
_restoreAmbientLighting();
}
}
}
@@ -1151,6 +1191,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
/// Restore ambient lighting from persisted setting
Future<void> _restoreAmbientLighting() async {
final shaderProvider = context.read<ShaderProvider>();
final settings = await SettingsService.getInstance();
if (!settings.getAmbientLighting()) return;
@@ -1171,7 +1212,6 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
final outputAspect = playerSize.width / playerSize.height;
// Clear shaders — ambient lighting and shaders are mutually exclusive
final shaderProvider = context.read<ShaderProvider>();
if (shaderProvider.isShaderEnabled) {
await _shaderService!.applyPreset(ShaderPreset.none);
shaderProvider.setCurrentPreset(ShaderPreset.none);
@@ -1206,6 +1246,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
Future<void> _toggleAmbientLighting() async {
final ambientLighting = _ambientLightingService;
if (ambientLighting == null || !ambientLighting.isSupported) return;
final shaderProvider = context.read<ShaderProvider>();
if (ambientLighting.isEnabled) {
await ambientLighting.disable();
@@ -1226,7 +1267,6 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
final outputAspect = playerSize.width / playerSize.height;
// Clear shaders — ambient lighting and shaders are mutually exclusive
final shaderProvider = context.read<ShaderProvider>();
if (shaderProvider.isShaderEnabled) {
await _shaderService!.applyPreset(ShaderPreset.none);
shaderProvider.setCurrentPreset(ShaderPreset.none);
@@ -1242,7 +1282,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
final settings = await SettingsService.getInstance();
settings.setAmbientLighting(ambientLighting.isEnabled);
setState(() {});
if (mounted) setState(() {});
}
/// Toggle between contain and cover modes only (for pinch gesture)
@@ -1564,6 +1604,11 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
_videoPIPManager?.onBeforeEnterPip = null;
_videoFilterManager?.dispose();
// Mark sleep timer for restart if truly exiting (not episode transition)
if (!_isReplacingWithVideo) {
SleepTimerService().markNeedsRestart();
}
// Cancel stream subscriptions
_playingSubscription?.cancel();
_completedSubscription?.cancel();
@@ -1579,10 +1624,17 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
// Cancel auto-play timer
_autoPlayTimer?.cancel();
// Cancel still watching timer
_stillWatchingTimer?.cancel();
// Dispose Play Next dialog focus nodes
_playNextCancelFocusNode.dispose();
_playNextConfirmFocusNode.dispose();
// Dispose "Still watching?" dialog focus nodes
_stillWatchingPauseFocusNode.dispose();
_stillWatchingContinueFocusNode.dispose();
// Dispose screen-level focus node
_screenFocusNode.removeListener(_onScreenFocusChanged);
_screenFocusNode.dispose();
@@ -1653,6 +1705,10 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
// Toggle wakelock based on playback state
if (isPlaying) {
WakelockPlus.enable();
// Force a texture refresh on resume to unstick stale frames
// (Linux/macOS texture registrars can miss frame-available
// notifications after extended pause periods)
player?.updateFrame();
} else {
WakelockPlus.disable();
}
@@ -1672,7 +1728,11 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
}
void _onVideoCompleted(bool completed) async {
if (completed && _nextEpisode != null && !_showPlayNextDialog && !_completionTriggered) {
if (completed &&
_nextEpisode != null &&
!_showPlayNextDialog &&
!_showStillWatchingPrompt &&
!_completionTriggered) {
_completionTriggered = true;
// Capture keyboard mode before async gap
@@ -1737,6 +1797,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
// Cancel auto-play timer if running
_autoPlayTimer?.cancel();
_dismissStillWatching();
// Notify Watch Together of episode change before navigating
_notifyWatchTogetherMediaChange(metadata: _nextEpisode);
@@ -1928,6 +1989,73 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
});
}
// -- "Still watching?" prompt --
void _showStillWatchingDialog() {
// Don't show if auto-play dialog is already visible
if (_showPlayNextDialog) return;
final isKeyboardMode = PlatformDetector.isTV() && InputModeTracker.isKeyboardMode(context);
setState(() {
_showStillWatchingPrompt = true;
_stillWatchingCountdown = 30;
});
if (isKeyboardMode) {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) _stillWatchingContinueFocusNode.requestFocus();
});
}
_stillWatchingTimer?.cancel();
_stillWatchingTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
if (!mounted) {
timer.cancel();
return;
}
setState(() {
_stillWatchingCountdown--;
});
if (_stillWatchingCountdown <= 0) {
timer.cancel();
_onStillWatchingTimeout();
}
});
}
void _onStillWatchingTimeout() {
player?.pause();
setState(() {
_showStillWatchingPrompt = false;
});
}
void _onStillWatchingContinue() {
_stillWatchingTimer?.cancel();
SleepTimerService().restartTimer();
setState(() {
_showStillWatchingPrompt = false;
});
}
void _onStillWatchingPause() {
_stillWatchingTimer?.cancel();
player?.pause();
setState(() {
_showStillWatchingPrompt = false;
});
}
void _dismissStillWatching() {
_stillWatchingTimer?.cancel();
if (_showStillWatchingPrompt) {
setState(() {
_showStillWatchingPrompt = false;
});
}
}
/// Apply track selection using the TrackSelectionService
Future<void> _applyTrackSelection() async {
if (!mounted || player == null) return;
@@ -1950,107 +2078,126 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
);
}
/// Handle audio track changes from the user - save both stream selection and language preference
Future<void> _onAudioTrackChanged(AudioTrack track) async {
final settings = await SettingsService.getInstance();
/// Rating key used for series/movie level language preferences.
String get _preferenceRatingKey {
return widget.metadata.isEpisode
? (widget.metadata.grandparentRatingKey ?? widget.metadata.ratingKey)
: widget.metadata.ratingKey;
}
/// Common guard checks for track change handlers.
/// Returns the part ID if all checks pass, or null if the change should be skipped.
Future<int?> _guardTrackChange() async {
final settings = await SettingsService.getInstance();
if (!settings.getRememberTrackSelections()) return null;
// Only save if remember track selections is enabled
if (!settings.getRememberTrackSelections()) {
return;
}
if (_currentMediaInfo == null) {
appLogger.w('No media info available, cannot save stream selection');
return;
return null;
}
final partId = _currentMediaInfo!.getPartId();
if (partId == null) {
appLogger.w('No part ID available, cannot save stream selection');
return;
}
return partId;
}
final languageCode = track.language;
int? streamID;
/// Save language preference and stream selection to the server.
Future<void> _saveTrackPreferences({
required int partId,
required String trackType,
String? languageCode,
int? streamID,
}) async {
try {
if (!mounted) return;
final client = _getClientForMetadata(context);
final ratingKey = _preferenceRatingKey;
// === Matching by attributes ===
PlexAudioTrack? matched;
final normalizedTrackLang = _iso6391ToPlex6392(track.language);
final futures = <Future>[];
appLogger.d('Normalized media_kit language: ${track.language} -> $normalizedTrackLang');
if (languageCode != null && (trackType == 'subtitle' || languageCode.isNotEmpty)) {
futures.add(
trackType == 'audio'
? client.setMetadataPreferences(ratingKey, audioLanguage: languageCode)
: client.setMetadataPreferences(ratingKey, subtitleLanguage: languageCode),
);
}
if (streamID != null) {
futures.add(
trackType == 'audio'
? client.selectStreams(partId, audioStreamID: streamID, allParts: true)
: client.selectStreams(partId, subtitleStreamID: streamID, allParts: true),
);
}
for (final plexTrack in _currentMediaInfo!.audioTracks) {
final matchLang = plexTrack.languageCode == normalizedTrackLang;
final matchTitle = (track.title == null || track.title!.isEmpty)
await Future.wait(futures);
appLogger.d('Successfully saved $trackType preferences (language + stream)');
} catch (e) {
appLogger.e('Failed to save $trackType preferences', error: e);
}
}
/// Match an mpv track against Plex tracks by language and title.
int? _matchTrackByAttributes<T>({
required String? mpvLanguage,
required String? mpvTitle,
required List<T> plexTracks,
required String? Function(T) getLanguageCode,
required String? Function(T) getDisplayTitle,
required String? Function(T) getTitle,
required int Function(T) getId,
}) {
final normalizedLang = _iso6391ToPlex6392(mpvLanguage);
for (final plexTrack in plexTracks) {
final matchLang = getLanguageCode(plexTrack) == normalizedLang;
final matchTitle = (mpvTitle == null || mpvTitle.isEmpty)
? true
: (plexTrack.displayTitle == track.title || plexTrack.title == track.title);
: (getDisplayTitle(plexTrack) == mpvTitle || getTitle(plexTrack) == mpvTitle);
if (matchLang && matchTitle) {
matched = plexTrack;
appLogger.d('Matched audio by lang/title: streamID ${matched.id}');
break;
return getId(plexTrack);
}
}
return null;
}
if (matched != null) {
streamID = matched.id;
/// Handle audio track changes from the user - save both stream selection and language preference
Future<void> _onAudioTrackChanged(AudioTrack track) async {
final partId = await _guardTrackChange();
if (partId == null) return;
int? streamID = _matchTrackByAttributes(
mpvLanguage: track.language,
mpvTitle: track.title,
plexTracks: _currentMediaInfo!.audioTracks,
getLanguageCode: (t) => t.languageCode,
getDisplayTitle: (t) => t.displayTitle,
getTitle: (t) => t.title,
getId: (t) => t.id,
);
if (streamID != null) {
appLogger.d('Matched audio by lang/title: streamID $streamID');
} else {
// Use property-based matching from track_selection_service
final matchedPlex = findPlexTrackForMpvAudio(track, _currentMediaInfo!.audioTracks);
if (matchedPlex != null) {
streamID = matchedPlex.id;
streamID = matchedPlex?.id;
if (streamID != null) {
appLogger.d('Matched audio by properties: streamID $streamID');
} else {
appLogger.e('Could not match audio track to any Plex track');
}
}
final isEpisode = widget.metadata.isEpisode;
final languagePrefRatingKey = isEpisode
? (widget.metadata.grandparentRatingKey ?? widget.metadata.ratingKey)
: widget.metadata.ratingKey;
try {
if (!mounted) return;
final client = _getClientForMetadata(context);
final futures = <Future>[];
// 1. Language preference (series/movie level)
if (languageCode != null && languageCode.isNotEmpty) {
futures.add(client.setMetadataPreferences(languagePrefRatingKey, audioLanguage: languageCode));
}
// 2. Exact stream selection (part level)
if (streamID != null) {
futures.add(client.selectStreams(partId, audioStreamID: streamID, allParts: true));
}
await Future.wait(futures);
appLogger.d('Successfully saved audio preferences (language + stream)');
} catch (e) {
appLogger.e('Failed to save audio preferences', error: e);
}
await _saveTrackPreferences(partId: partId, trackType: 'audio', languageCode: track.language, streamID: streamID);
}
/// Handle subtitle track changes from the user - save both stream selection and language preference
Future<void> _onSubtitleTrackChanged(SubtitleTrack track) async {
final settings = await SettingsService.getInstance();
// Only save if remember track selections is enabled
if (!settings.getRememberTrackSelections()) {
return;
}
if (_currentMediaInfo == null) {
appLogger.w('No media info available, cannot save stream selection');
return;
}
final partId = _currentMediaInfo!.getPartId();
if (partId == null) {
appLogger.w('No part ID available, cannot save stream selection');
return;
}
final partId = await _guardTrackChange();
if (partId == null) return;
String? languageCode;
int? streamID;
@@ -2062,38 +2209,22 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
} else {
languageCode = track.language;
// === Matching by attributes ===
PlexSubtitleTrack? matched;
final normalizedTrackLang = _iso6391ToPlex6392(track.language);
streamID = _matchTrackByAttributes(
mpvLanguage: track.language,
mpvTitle: track.title,
plexTracks: _currentMediaInfo!.subtitleTracks,
getLanguageCode: (t) => t.languageCode,
getDisplayTitle: (t) => t.displayTitle,
getTitle: (t) => t.title,
getId: (t) => t.id,
);
appLogger.d('Normalized media_kit language: ${track.language} -> $normalizedTrackLang');
for (final plexTrack in _currentMediaInfo!.subtitleTracks) {
final matchLang = plexTrack.languageCode == normalizedTrackLang;
final matchTitle = (track.title == null || track.title!.isEmpty)
? true
: (plexTrack.displayTitle == track.title || plexTrack.title == track.title);
appLogger.d('Comparing with streamID ${plexTrack.id}:');
appLogger.d(' matchLang: $matchLang (${plexTrack.languageCode} == $normalizedTrackLang)');
appLogger.d(' matchTitle: $matchTitle');
if (matchLang && matchTitle) {
matched = plexTrack;
appLogger.d(' ✅ MATCHED!');
break;
}
}
if (matched != null) {
streamID = matched.id;
if (streamID != null) {
appLogger.d('Matched subtitle by lang/title: streamID $streamID');
} else {
// Use property-based matching from track_selection_service
final matchedPlex = findPlexTrackForMpvSubtitle(track, _currentMediaInfo!.subtitleTracks);
if (matchedPlex != null) {
streamID = matchedPlex.id;
streamID = matchedPlex?.id;
if (streamID != null) {
appLogger.d('Matched subtitle by properties: streamID $streamID');
} else {
appLogger.e('Could not match subtitle track to any Plex track');
@@ -2101,36 +2232,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
}
}
// Determine ratingKeys
final isEpisode = widget.metadata.isEpisode;
final languagePrefRatingKey = isEpisode
? (widget.metadata.grandparentRatingKey ?? widget.metadata.ratingKey)
: widget.metadata.ratingKey;
appLogger.i(
'Saving subtitle preference: language=$languageCode (ratingKey: $languagePrefRatingKey), streamID=$streamID (partId: $partId)',
);
try {
if (!mounted) return;
final client = _getClientForMetadata(context);
final futures = <Future>[];
// 1. Save language preference at series/movie level
if (languageCode != null) {
futures.add(client.setMetadataPreferences(languagePrefRatingKey, subtitleLanguage: languageCode));
}
// 2. Save exact stream selection using part ID
if (streamID != null) {
futures.add(client.selectStreams(partId, subtitleStreamID: streamID, allParts: true));
}
await Future.wait(futures);
appLogger.d('Successfully saved subtitle preferences (language + stream)');
} catch (e) {
appLogger.e('Failed to save subtitle preferences', error: e);
}
await _saveTrackPreferences(partId: partId, trackType: 'subtitle', languageCode: languageCode, streamID: streamID);
}
/// Set flag to skip orientation restoration when replacing with another video
@@ -2240,7 +2342,13 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
canRequestFocus: isCurrentRoute,
onKeyEvent: (node, event) {
if (!isCurrentRoute) return KeyEventResult.ignored;
// Back keys always pass through — handled by PopScope (system back
// On Windows/Linux with navigation off, consume ESC so Flutter's
// DismissAction doesn't trigger a route pop. The video controls'
// global key handler manages fullscreen/controls toggle instead.
if (!_videoPlayerNavigationEnabled && (Platform.isWindows || Platform.isLinux) && event.logicalKey.isBackKey) {
return KeyEventResult.handled;
}
// Back keys pass through — handled by PopScope (system back
// gesture) or overlay sheet's onKeyEvent.
if (event.logicalKey.isBackKey) return KeyEventResult.ignored;
// Self-heal: if this node itself has primary focus (no descendant
@@ -2261,9 +2369,8 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
},
child: OverlaySheetHost(
child: Builder(
builder: (sheetContext) => _isPlayerInitialized && player != null
? _buildVideoPlayer(sheetContext)
: _buildLoadingSpinner(),
builder: (sheetContext) =>
_isPlayerInitialized && player != null ? _buildVideoPlayer(sheetContext) : _buildLoadingSpinner(),
),
),
);
@@ -2500,27 +2607,13 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
Row(
children: [
Expanded(
child: FocusableWrapper(
child: FocusableButton(
focusNode: _playNextCancelFocusNode,
onSelect: _cancelAutoPlay,
useBackgroundFocus: true,
onPressed: _cancelAutoPlay,
autoScroll: false,
borderRadius: 20,
onKeyEvent: (node, event) {
if (event is KeyDownEvent) {
// RIGHT arrow moves focus to Play Next button
if (event.logicalKey == LogicalKeyboardKey.arrowRight) {
_playNextConfirmFocusNode.requestFocus();
return KeyEventResult.handled;
}
// Trap focus - consume UP/DOWN to prevent escape
if (event.logicalKey == LogicalKeyboardKey.arrowUp ||
event.logicalKey == LogicalKeyboardKey.arrowDown) {
return KeyEventResult.handled;
}
}
return KeyEventResult.ignored;
},
onNavigateRight: () => _playNextConfirmFocusNode.requestFocus(),
onNavigateUp: () {}, // Trap focus
onNavigateDown: () {}, // Trap focus
child: OutlinedButton(
onPressed: _cancelAutoPlay,
style: OutlinedButton.styleFrom(
@@ -2534,27 +2627,13 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
),
const SizedBox(width: 8),
Expanded(
child: FocusableWrapper(
child: FocusableButton(
focusNode: _playNextConfirmFocusNode,
onSelect: _playNext,
useBackgroundFocus: true,
onPressed: _playNext,
autoScroll: false,
borderRadius: 20,
onKeyEvent: (node, event) {
if (event is KeyDownEvent) {
// LEFT arrow moves focus to Cancel button
if (event.logicalKey == LogicalKeyboardKey.arrowLeft) {
_playNextCancelFocusNode.requestFocus();
return KeyEventResult.handled;
}
// Trap focus - consume UP/DOWN to prevent escape
if (event.logicalKey == LogicalKeyboardKey.arrowUp ||
event.logicalKey == LogicalKeyboardKey.arrowDown) {
return KeyEventResult.handled;
}
}
return KeyEventResult.ignored;
},
onNavigateLeft: () => _playNextCancelFocusNode.requestFocus(),
onNavigateUp: () {}, // Trap focus
onNavigateDown: () {}, // Trap focus
child: FilledButton(
onPressed: _playNext,
style: FilledButton.styleFrom(
@@ -2586,6 +2665,104 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
);
},
),
// "Still watching?" overlay (hidden in PiP mode)
ValueListenableBuilder<bool>(
valueListenable: PipService().isPipActive,
builder: (context, isInPip, child) {
if (isInPip || !_showStillWatchingPrompt) {
return const SizedBox.shrink();
}
return ValueListenableBuilder<bool>(
valueListenable: _controlsVisible,
builder: (context, controlsShown, child) {
return AnimatedPositioned(
duration: const Duration(milliseconds: 200),
curve: Curves.easeInOut,
right: 24,
bottom: controlsShown ? 100 : 24,
child: Container(
width: 320,
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.black.withValues(alpha: 0.9),
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
t.videoControls.stillWatching,
style: TextStyle(
color: Colors.white.withValues(alpha: 0.7),
fontSize: 12,
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 4),
Text(
t.videoControls.pausingIn(seconds: '$_stillWatchingCountdown'),
style: const TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w600),
),
const SizedBox(height: 12),
Row(
children: [
Expanded(
child: FocusableButton(
focusNode: _stillWatchingPauseFocusNode,
onPressed: _onStillWatchingPause,
autoScroll: false,
onNavigateRight: () => _stillWatchingContinueFocusNode.requestFocus(),
onNavigateUp: () {},
onNavigateDown: () {},
child: OutlinedButton(
onPressed: _onStillWatchingPause,
style: OutlinedButton.styleFrom(
foregroundColor: Colors.white,
side: BorderSide(color: Colors.white.withValues(alpha: 0.5)),
padding: const EdgeInsets.symmetric(vertical: 12),
),
child: Text(t.videoControls.pauseButton),
),
),
),
const SizedBox(width: 8),
Expanded(
child: FocusableButton(
focusNode: _stillWatchingContinueFocusNode,
onPressed: _onStillWatchingContinue,
autoScroll: false,
onNavigateLeft: () => _stillWatchingPauseFocusNode.requestFocus(),
onNavigateUp: () {},
onNavigateDown: () {},
child: FilledButton(
onPressed: _onStillWatchingContinue,
style: FilledButton.styleFrom(
backgroundColor: Colors.white,
foregroundColor: Colors.black,
padding: const EdgeInsets.symmetric(vertical: 12),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('$_stillWatchingCountdown'),
const SizedBox(width: 4),
Text(t.videoControls.continueWatching),
],
),
),
),
),
],
),
],
),
),
);
},
);
},
),
// Buffering indicator (also shows during initial load, but not when exiting)
// Hidden in PiP mode
ValueListenableBuilder<bool>(
+1 -3
View File
@@ -38,9 +38,7 @@ class AmbientLightingService {
try {
// Write static shader (only needs to happen once)
if (_shaderPath == null) {
_shaderPath = await _writeShaderToTemp(_generateShader());
}
_shaderPath ??= await _writeShaderToTemp(_generateShader());
if (kDebugMode) {
debugPrint('AmbientLightingService: Shader path: $_shaderPath');
@@ -1,3 +1,4 @@
import 'dart:convert';
import 'package:shared_preferences/shared_preferences.dart';
/// Base class for services that use SharedPreferences singleton pattern.
@@ -33,6 +34,22 @@ abstract class BaseSharedPreferencesService {
return _instances[T] as T;
}
/// Decode a JSON string to a Map with error handling.
///
/// If [legacyStringOk] is true and the value is a plain string (not valid
/// JSON), returns `{'key': jsonString, 'descending': false}` for legacy
/// library sort compatibility.
Map<String, dynamic> decodeJsonStringToMap(String jsonString, {bool legacyStringOk = false}) {
try {
return json.decode(jsonString) as Map<String, dynamic>;
} catch (e) {
if (legacyStringOk) {
return {'key': jsonString, 'descending': false};
}
return {};
}
}
/// Hook for subclass-specific initialization after SharedPreferences is ready.
///
/// Override this method to perform any setup that requires access to
@@ -1,95 +0,0 @@
import 'dart:async';
import 'dart:convert';
import '../../models/companion_remote/recent_remote_session.dart';
import '../../services/storage_service.dart';
import '../../utils/app_logger.dart';
/// Service for managing recent Companion Remote sessions
class CompanionRemoteDiscoveryService {
static const String _storageKey = 'companion_remote_recent_sessions';
static const int _maxRecentSessions = 5;
final _recentSessions = <RecentRemoteSession>[];
final _recentSessionsController = StreamController<List<RecentRemoteSession>>.broadcast();
/// Stream of recent sessions
Stream<List<RecentRemoteSession>> get recentSessions => _recentSessionsController.stream;
/// Get current list of recent sessions
List<RecentRemoteSession> get currentSessions => List.unmodifiable(_recentSessions);
CompanionRemoteDiscoveryService() {
_loadRecentSessions();
}
/// Load recent sessions from storage
Future<void> _loadRecentSessions() async {
try {
final storage = await StorageService.getInstance();
final json = storage.prefs.getString(_storageKey);
if (json != null) {
final List<dynamic> list = jsonDecode(json);
_recentSessions.clear();
_recentSessions.addAll(list.map((e) => RecentRemoteSession.fromJson(e as Map<String, dynamic>)));
// Sort by last connected (most recent first)
_recentSessions.sort((a, b) => b.lastConnected.compareTo(a.lastConnected));
_recentSessionsController.add(currentSessions);
appLogger.d('Loaded ${_recentSessions.length} recent remote sessions');
}
} catch (e) {
appLogger.e('Failed to load recent sessions', error: e);
}
}
/// Save recent sessions to storage
Future<void> _saveRecentSessions() async {
try {
final storage = await StorageService.getInstance();
final json = jsonEncode(_recentSessions.map((e) => e.toJson()).toList());
await storage.prefs.setString(_storageKey, json);
appLogger.d('Saved ${_recentSessions.length} recent remote sessions');
} catch (e) {
appLogger.e('Failed to save recent sessions', error: e);
}
}
/// Add a session to recent list
Future<void> addRecentSession(RecentRemoteSession session) async {
// Remove existing entry for this session ID
_recentSessions.removeWhere((s) => s.sessionId == session.sessionId);
// Add new entry at the beginning
_recentSessions.insert(0, session);
// Limit to max sessions
if (_recentSessions.length > _maxRecentSessions) {
_recentSessions.removeRange(_maxRecentSessions, _recentSessions.length);
}
await _saveRecentSessions();
_recentSessionsController.add(currentSessions);
}
/// Remove a session from recent list
Future<void> removeRecentSession(String sessionId) async {
_recentSessions.removeWhere((s) => s.sessionId == sessionId);
await _saveRecentSessions();
_recentSessionsController.add(currentSessions);
}
/// Clear all recent sessions
Future<void> clearRecentSessions() async {
_recentSessions.clear();
await _saveRecentSessions();
_recentSessionsController.add(currentSessions);
}
/// Dispose resources
Future<void> dispose() async {
await _recentSessionsController.close();
}
}
@@ -86,44 +86,43 @@ class CompanionRemotePeerService {
return List.generate(6, (index) => random.nextInt(10).toString()).join();
}
Future<String> _getLocalIpAddress() async {
Future<List<String>> _getAllLocalIpAddresses() async {
try {
final interfaces = await NetworkInterface.list(type: InternetAddressType.IPv4);
// Prefer WiFi interface, then any non-loopback
final preferred = <String>[];
final others = <String>[];
for (final interface in interfaces) {
// Skip loopback
if (interface.name.toLowerCase().contains('lo')) continue;
for (final addr in interface.addresses) {
if (!addr.isLoopback && addr.type == InternetAddressType.IPv4) {
// Prefer names that suggest WiFi/Ethernet
if (interface.name.toLowerCase().contains('en') ||
interface.name.toLowerCase().contains('wl') ||
interface.name.toLowerCase().contains('eth')) {
return addr.address;
final name = interface.name.toLowerCase();
if (name.contains('en') || name.contains('wl') || name.contains('eth')) {
preferred.add(addr.address);
} else {
others.add(addr.address);
}
}
}
}
// Fallback: return any non-loopback IPv4
for (final interface in interfaces) {
for (final addr in interface.addresses) {
if (!addr.isLoopback && addr.type == InternetAddressType.IPv4) {
return addr.address;
}
}
final all = [...preferred, ...others];
if (all.isEmpty) {
throw const RemotePeerError(type: RemotePeerErrorType.networkError, message: 'No network interface found');
}
throw const RemotePeerError(type: RemotePeerErrorType.networkError, message: 'No network interface found');
return all;
} catch (e) {
appLogger.e('CompanionRemote: Failed to get local IP', error: e);
appLogger.e('CompanionRemote: Failed to get local IPs', error: e);
rethrow;
}
}
Future<({String sessionId, String pin, String address})> createSession(String deviceName, String platform) async {
Future<({String sessionId, String pin, List<String> addresses})> createSession(
String deviceName,
String platform,
) async {
if (_server != null) {
await disconnect();
}
@@ -145,11 +144,12 @@ class CompanionRemotePeerService {
_server = await HttpServer.bind(InternetAddress.anyIPv4, 0);
}
final localIp = await _getLocalIpAddress();
final localIps = await _getAllLocalIpAddresses();
final port = _server!.port;
_hostAddress = '$localIp:$port';
final addresses = localIps.map((ip) => '$ip:$port').toList();
_hostAddress = addresses.first;
appLogger.d('CompanionRemote: Host server started at $_hostAddress');
appLogger.d('CompanionRemote: Host server started, addresses: $addresses');
// Listen for WebSocket connections
_server!.listen((HttpRequest request) async {
@@ -168,7 +168,7 @@ class CompanionRemotePeerService {
_connectionStateController.add(RemoteSessionStatus.connected);
return (sessionId: _sessionId!, pin: _pin!, address: _hostAddress!);
return (sessionId: _sessionId!, pin: _pin!, addresses: addresses);
} catch (e) {
appLogger.e('CompanionRemote: Failed to create server', error: e);
_errorController.add(
@@ -441,6 +441,94 @@ class CompanionRemotePeerService {
);
}
/// Race WebSocket connections to multiple host addresses in parallel.
/// Returns the winning address and sets up a proper managed connection via [joinSession].
Future<String> joinSessionRacing(
String sessionId,
String pin,
String deviceName,
String platform,
List<String> hostAddresses,
) async {
if (hostAddresses.length == 1) {
await joinSession(sessionId, pin, deviceName, platform, hostAddresses.first);
return hostAddresses.first;
}
appLogger.d('CompanionRemote: Racing connections to ${hostAddresses.length} addresses');
final completer = Completer<String>();
final channels = <IOWebSocketChannel>[];
final subs = <StreamSubscription>[];
void cleanup() {
for (final sub in subs) {
sub.cancel();
}
for (final ch in channels) {
try {
ch.sink.close();
} catch (_) {}
}
}
for (final address in hostAddresses) {
try {
final url = 'ws://$address/ws';
final channel = IOWebSocketChannel.connect(Uri.parse(url), connectTimeout: const Duration(seconds: 5));
channels.add(channel);
// Send auth immediately
channel.sink.add(jsonEncode({
'type': 'auth',
'sessionId': sessionId.toUpperCase(),
'pin': pin,
'deviceName': deviceName,
'platform': platform,
}));
final sub = channel.stream.listen(
(data) {
try {
final json = jsonDecode(data as String) as Map<String, dynamic>;
if (json['type'] == 'authSuccess' && !completer.isCompleted) {
appLogger.d('CompanionRemote: Race winner: $address');
completer.complete(address);
}
} catch (_) {}
},
onError: (_) {},
onDone: () {},
);
subs.add(sub);
} catch (e) {
appLogger.d('CompanionRemote: Race candidate $address failed to start: $e');
}
}
if (channels.isEmpty) {
throw const RemotePeerError(
type: RemotePeerErrorType.connectionFailed,
message: 'Failed to connect to any address',
);
}
try {
final winner = await completer.future.timeout(const Duration(seconds: 10));
cleanup();
// Now set up the proper managed connection on the winning address
await joinSession(sessionId, pin, deviceName, platform, winner);
return winner;
} on TimeoutException {
cleanup();
throw const RemotePeerError(
type: RemotePeerErrorType.timeout,
message: 'Timed out connecting to all addresses',
);
}
}
void _startPingTimer() {
_stopPingTimer();
_pingTimer = Timer.periodic(const Duration(seconds: 5), (_) {
+110 -4
View File
@@ -5,6 +5,7 @@ import '../models/plex_hub.dart';
import '../models/plex_library.dart';
import '../models/plex_metadata.dart';
import '../utils/app_logger.dart';
import '../utils/global_key_utils.dart';
import 'multi_server_manager.dart';
import 'plex_auth_service.dart';
@@ -45,7 +46,7 @@ class DataAggregationService {
filteredOnDeck = allOnDeck.where((item) {
final librarySectionId = item.librarySectionID;
if (librarySectionId == null) return true; // Keep if no section ID
final globalKey = '${item.serverId}:$librarySectionId';
final globalKey = buildGlobalKey(item.serverId!, librarySectionId.toString());
return !hiddenLibraryKeys.contains(globalKey);
}).toList();
}
@@ -83,8 +84,13 @@ class DataAggregationService {
return [];
}
// For global hubs, fetch libraries to split "Recently Added" hubs by library
final libraries = useGlobalHubs
? (librariesByServer ?? groupLibrariesByServer(await getLibrariesFromAllServers()))
: librariesByServer;
return useGlobalHubs
? _fetchGlobalHubs(clients, limit: limit, hiddenLibraryKeys: hiddenLibraryKeys)
? _fetchGlobalHubs(clients, limit: limit, hiddenLibraryKeys: hiddenLibraryKeys, librariesByServer: libraries)
: _fetchLibraryHubs(
clients,
limit: limit,
@@ -98,6 +104,7 @@ class DataAggregationService {
Map<String, PlexClient> clients, {
int? limit,
Set<String>? hiddenLibraryKeys,
Map<String, List<PlexLibrary>>? librariesByServer,
}) async {
appLogger.d('Fetching global hubs from ${clients.length} servers');
@@ -118,7 +125,7 @@ class DataAggregationService {
// Build the global key for the item's library section
final librarySectionId = item.librarySectionID;
if (librarySectionId == null) return true; // Keep if no section ID
final globalKey = '$serverId:$librarySectionId';
final globalKey = buildGlobalKey(serverId, librarySectionId.toString());
return !hiddenLibraryKeys.contains(globalKey);
}).toList();
@@ -149,7 +156,9 @@ class DataAggregationService {
});
final results = await Future.wait(hubFutures);
final result = _collectAndLimitResults(results, limit);
// Split "Recently Added" hubs that combine items from multiple libraries
final splitResults = results.map((hubs) => _splitRecentlyAddedHubs(hubs, librariesByServer)).toList();
final result = _collectAndLimitResults(splitResults, limit);
appLogger.i('Fetched ${result.length} global hubs from all servers');
@@ -299,6 +308,103 @@ class DataAggregationService {
return limit != null && limit < all.length ? all.sublist(0, limit) : all;
}
/// Split "Recently Added" hubs that contain items from multiple libraries
/// into separate per-library hubs, matching the official Plex client behavior.
List<PlexHub> _splitRecentlyAddedHubs(
List<PlexHub> hubs,
Map<String, List<PlexLibrary>>? librariesByServer,
) {
final result = <PlexHub>[];
for (final hub in hubs) {
final hubId = hub.hubIdentifier?.toLowerCase() ?? '';
if (!hubId.contains('.recent')) {
result.add(hub);
continue;
}
// Group items by librarySectionID
final groups = <int, List<PlexMetadata>>{};
final ungrouped = <PlexMetadata>[];
for (final item in hub.items) {
final sectionId = item.librarySectionID;
if (sectionId == null) {
ungrouped.add(item);
} else {
groups.putIfAbsent(sectionId, () => []).add(item);
}
}
// Single library (or no groupable items) — keep hub unchanged
if (groups.length <= 1) {
result.add(hub);
continue;
}
// Multiple libraries — create one hub per library
for (final entry in groups.entries) {
final items = entry.value;
final libraryName = _resolveLibraryName(items.first, librariesByServer);
final title = libraryName != null ? 'Recently Added in $libraryName' : hub.title;
result.add(PlexHub(
hubKey: hub.hubKey,
title: title,
type: hub.type,
hubIdentifier: '${hub.hubIdentifier}_${entry.key}',
size: items.length,
more: hub.more,
items: items,
serverId: hub.serverId,
serverName: hub.serverName,
));
}
// Keep ungrouped items in a hub with the original title
if (ungrouped.isNotEmpty) {
result.add(PlexHub(
hubKey: hub.hubKey,
title: hub.title,
type: hub.type,
hubIdentifier: hub.hubIdentifier,
size: ungrouped.length,
more: hub.more,
items: ungrouped,
serverId: hub.serverId,
serverName: hub.serverName,
));
}
}
return result;
}
/// Resolve library name from item metadata or library lookup map.
String? _resolveLibraryName(
PlexMetadata item,
Map<String, List<PlexLibrary>>? librariesByServer,
) {
// Try librarySectionTitle from the item itself (Plex API often includes it)
if (item.librarySectionTitle != null && item.librarySectionTitle!.isNotEmpty) {
return item.librarySectionTitle;
}
// Fall back to library lookup
if (librariesByServer != null && item.serverId != null && item.librarySectionID != null) {
final serverLibraries = librariesByServer[item.serverId];
if (serverLibraries != null) {
for (final lib in serverLibraries) {
if (lib.key == item.librarySectionID.toString()) {
return lib.title;
}
}
}
}
return null;
}
/// Base helper for per-server fan-out operations
///
/// Returns raw results as (serverId, result) tuples.
+41 -14
View File
@@ -430,7 +430,7 @@ class DownloadManagerService {
bool downloadSubtitles = true,
bool downloadArtwork = true,
}) async {
final globalKey = '${metadata.serverId}:${metadata.ratingKey}';
final globalKey = metadata.globalKey;
// Check if already downloading or completed
final existing = await _database.getDownloadedMedia(globalKey);
@@ -451,9 +451,15 @@ class DownloadManagerService {
status: DownloadStatus.queued.index,
);
// Pin the already-cached API response for offline use
// (getMetadataWithImages was already called by download_provider, which cached with chapters/markers)
await _apiCache.pinForOffline(metadata.serverId!, metadata.ratingKey);
// Ensure metadata is in cache before pinning.
// Normally getMetadataWithImages already cached the full API response (with chapters/markers),
// but if the network failed during the provider's fetch, the cache entry may not exist.
final cached = await _apiCache.get(metadata.serverId!, '/library/metadata/${metadata.ratingKey}');
if (cached == null) {
await _cacheMetadataForOffline(metadata.serverId!, metadata.ratingKey, metadata);
} else {
await _apiCache.pinForOffline(metadata.serverId!, metadata.ratingKey);
}
// Add to queue
await _database.addToQueue(
@@ -501,11 +507,31 @@ class DownloadManagerService {
final serverId = parsed.serverId;
final ratingKey = parsed.ratingKey;
final metadata = await _apiCache.getMetadata(serverId, ratingKey);
if (metadata == null) throw Exception('Metadata not found in cache for $globalKey');
var metadata = await _apiCache.getMetadata(serverId, ratingKey);
if (metadata == null) {
// Cache miss — try re-fetching from server (cache may have been cleared between queue and prepare)
appLogger.w('Cache miss for $globalKey, attempting network re-fetch');
try {
final fetched = await client.getMetadataWithImages(ratingKey);
if (fetched != null) metadata = fetched.copyWith(serverId: serverId);
} catch (e) {
appLogger.w('Network re-fetch failed for $globalKey', error: e);
}
if (metadata == null) {
throw Exception('Metadata not found in cache and could not be fetched for $globalKey');
}
}
final playbackData = await client.getVideoPlaybackData(metadata.ratingKey);
if (playbackData.videoUrl == null) throw Exception('Could not get video URL');
var playbackData = await client.getVideoPlaybackData(metadata.ratingKey);
if (playbackData.videoUrl == null) {
// Cache may contain a synthetic entry (from _cacheMetadataForOffline) without
// Media/Part data. Force a fresh network fetch to populate the cache properly.
appLogger.w('No video URL from cache for $globalKey, retrying via network');
final fetched = await client.getMetadataWithImages(ratingKey);
if (fetched != null) metadata = fetched.copyWith(serverId: serverId);
playbackData = await client.getVideoPlaybackData(metadata.ratingKey);
if (playbackData.videoUrl == null) throw Exception('Could not get video URL for $globalKey');
}
final ext = _getExtensionFromUrl(playbackData.videoUrl!) ?? 'mp4';
@@ -1252,12 +1278,13 @@ class DownloadManagerService {
if (metadata == null) {
// Fallback: Try database record
final downloadRecord = await _database.getDownloadedMedia('$serverId:$ratingKey');
final gk = buildGlobalKey(serverId, ratingKey);
final downloadRecord = await _database.getDownloadedMedia(gk);
if (downloadRecord?.videoFilePath != null) {
await _deleteByFilePath(downloadRecord!);
return;
}
appLogger.w('Cannot delete - no metadata for $serverId:$ratingKey');
appLogger.w('Cannot delete - no metadata for $gk');
return;
}
@@ -1433,12 +1460,12 @@ class DownloadManagerService {
}) async {
for (int i = 0; i < episodes.length; i++) {
final episode = episodes[i];
final episodeGlobalKey = '$serverId:${episode.ratingKey}';
final episodeGlobalKey = buildGlobalKey(serverId, episode.ratingKey);
// Emit progress update
_emitDeletionProgress(
DeletionProgress(
globalKey: '$serverId:$parentKey',
globalKey: buildGlobalKey(serverId, parentKey),
itemTitle: parentTitle,
currentItem: i + 1,
totalItems: episodes.length,
@@ -1551,7 +1578,7 @@ class DownloadManagerService {
final otherEpisodes = await _database.getEpisodesBySeason(seasonKey);
// Check if any episodes besides this one
return otherEpisodes.any((e) => e.globalKey != '${episode.serverId}:${episode.ratingKey}');
return otherEpisodes.any((e) => e.globalKey != episode.globalKey);
}
/// Check if show artwork is in use
@@ -1562,7 +1589,7 @@ class DownloadManagerService {
final showEpisodes = await _database.getEpisodesByShow(showKey);
// Check if any episodes belong to this show besides the current item
return showEpisodes.any((item) => item.globalKey != '${metadata.serverId}:${metadata.ratingKey}');
return showEpisodes.any((item) => item.globalKey != metadata.globalKey);
}
/// Find file with any extension
+5 -1
View File
@@ -222,7 +222,11 @@ class DownloadStorageService {
String _sanitizeFileName(String name) {
// Remove invalid filesystem characters: < > : " / \ | ? *
// Also remove leading/trailing whitespace and dots
return name.replaceAll(RegExp(r'[<>:"/\\|?*]'), '').replaceAll(RegExp(r'^\.+|\.+$'), '').trim();
return name
.replaceAll(RegExp(r'[<>:"/\\|?*]'), '')
.replaceAll(RegExp(r'^\.+|\.+$'), '')
.replaceAll('.', '_')
.trim();
}
/// Ensure a directory exists, creating it if necessary
+1 -1
View File
@@ -47,7 +47,7 @@ class ExternalPlayerService {
final player = settings.getSelectedExternalPlayer();
// On Android, always use native intent to avoid url_launcher opening in browser
if (Platform.isAndroid) {
if (Platform.isAndroid && context.mounted) {
return _launchAndroidNative(resolvedUrl, player, context);
}
+45 -1
View File
@@ -5,6 +5,7 @@ import 'package:flutter/scheduler.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:universal_gamepad/universal_gamepad.dart';
import 'package:window_manager/window_manager.dart';
import '../utils/app_logger.dart';
import '../utils/key_event_simulator.dart' as key_sim;
@@ -14,7 +15,7 @@ import '../utils/key_event_simulator.dart' as key_sim;
/// Listens to gamepad events from the `universal_gamepad` package and translates
/// them into focus navigation actions and key events that integrate with the
/// existing keyboard navigation system.
class GamepadService {
class GamepadService with WindowListener {
static GamepadService? _instance;
StreamSubscription<GamepadEvent>? _subscription;
@@ -48,6 +49,9 @@ class GamepadService {
// Track button states to prevent repeated events from button holds
final Set<GamepadButton> _pressedButtons = {};
// Whether the app window is currently focused — ignore gamepad input when false
bool _windowFocused = true;
GamepadService._();
/// Get the singleton instance.
@@ -75,6 +79,10 @@ class GamepadService {
appLogger.e('GamepadService: Error listing gamepads', error: e);
}
// Track window focus so we ignore gamepad input when another app is active
windowManager.addListener(this);
_windowFocused = await windowManager.isFocused();
_subscription?.cancel();
_subscription = Gamepad.instance.events.listen(
_handleGamepadEvent,
@@ -88,9 +96,41 @@ class GamepadService {
_stopDirectionRepeat();
_subscription?.cancel();
_subscription = null;
windowManager.removeListener(this);
Gamepad.instance.dispose();
}
@override
void onWindowFocus() {
_windowFocused = true;
Gamepad.instance.resume();
}
@override
void onWindowBlur() {
_windowFocused = false;
_stopDirectionRepeat();
// Send key-up for any face buttons that are mid-hold so widgets
// waiting for the release (e.g. long-press timers) don't get stuck.
if (_pressedButtons.contains(GamepadButton.a)) {
_simulateKeyUp(LogicalKeyboardKey.enter);
}
if (_pressedButtons.contains(GamepadButton.x)) {
_simulateKeyUp(LogicalKeyboardKey.gameButtonX);
}
_pressedButtons.clear();
// Reset analog stick state so re-focus doesn't inherit stale direction
_leftStickUp = false;
_leftStickDown = false;
_leftStickLeft = false;
_leftStickRight = false;
// Release native device handles so other apps can use the gamepad.
Gamepad.instance.pause();
}
void _handleGamepadEvent(GamepadEvent event) {
switch (event) {
case GamepadConnectionEvent e:
@@ -103,6 +143,8 @@ class GamepadService {
}
void _handleButton(GamepadButtonEvent event) {
if (!_windowFocused) return;
// Switch to keyboard mode on any button press
if (event.pressed) {
onGamepadInput?.call();
@@ -167,6 +209,8 @@ class GamepadService {
}
void _handleAxis(GamepadAxisEvent event) {
if (!_windowFocused) return;
// Switch to keyboard mode on significant axis input
if (event.value.abs() > 0.3) {
onGamepadInput?.call();
+29
View File
@@ -0,0 +1,29 @@
import 'dart:io';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:http/io_client.dart';
/// Custom cache manager for Plex image transcoding with connection limiting.
///
/// Limits concurrent HTTP connections to 6 per host (matching browser HTTP/1.1
/// behavior) to prevent overwhelming the Plex server's transcode pipeline when
/// many posters are visible simultaneously.
class PlexImageCacheManager extends CacheManager with ImageCacheManager {
static const _key = 'plexImageCache';
static final PlexImageCacheManager instance = PlexImageCacheManager._();
PlexImageCacheManager._()
: super(
Config(
_key,
stalePeriod: const Duration(days: 30),
maxNrOfCacheObjects: 5000,
fileService: HttpFileService(
httpClient: IOClient(
HttpClient()..maxConnectionsPerHost = 6,
),
),
),
);
}
+7 -8
View File
@@ -288,7 +288,9 @@ class MultiServerManager {
}
}
/// Test connection health for all servers
/// Test connection health for all servers.
/// Uses [PlexClient.isHealthy] which checks for HTTP 200, so servers with
/// invalid tokens (401) are correctly reported as offline.
Future<void> checkServerHealth() async {
appLogger.d('Checking health for ${_clients.length} servers');
@@ -296,13 +298,10 @@ class MultiServerManager {
final serverId = entry.key;
final client = entry.value;
try {
// Simple ping by fetching server identity
await client.getServerIdentity();
updateServerStatus(serverId, true);
} catch (e) {
appLogger.w('Server $serverId health check failed: $e');
updateServerStatus(serverId, false);
final healthy = await client.isHealthy();
updateServerStatus(serverId, healthy);
if (!healthy) {
appLogger.w('Server $serverId health check failed');
}
});
+37
View File
@@ -177,6 +177,43 @@ class PlayQueueLauncher {
);
}
/// Launch playback from a folder's contents.
Future<PlayQueueResult> launchFromFolder({
required String folderKey,
required bool shuffle,
bool showLoadingIndicator = true,
}) async {
return _executeWithLoading(
showLoading: showLoadingIndicator,
action: shuffle ? t.common.shuffle : t.common.play,
execute: (dismissLoading) async {
final folderUri = await client.buildFolderUri(folderKey);
var playQueue = await client.createPlayQueue(
uri: folderUri,
type: 'video',
shuffle: shuffle ? 1 : 0,
);
if (playQueue != null && (playQueue.items == null || playQueue.items!.isEmpty)) {
final fetchedQueue = await client.getPlayQueue(playQueue.playQueueID);
if (fetchedQueue != null && fetchedQueue.items != null && fetchedQueue.items!.isNotEmpty) {
playQueue = fetchedQueue;
}
}
await dismissLoading();
return _launchFromQueue(
playQueue: playQueue,
ratingKey: folderKey,
serverId: serverId,
serverName: serverName,
);
},
);
}
/// Core method to launch playback from a play queue.
Future<PlayQueueResult> _launchFromQueue({
required PlayQueueResponse? playQueue,
@@ -1,6 +1,7 @@
import 'plex_client.dart';
import '../models/plex_media_info.dart';
import '../models/plex_metadata.dart';
import '../models/plex_video_playback_data.dart';
import '../models/download_models.dart';
import '../mpv/mpv.dart';
import '../utils/app_logger.dart';
@@ -75,10 +76,12 @@ class PlaybackInitializationService {
///
/// Returns a PlaybackInitializationResult with video URL and available versions
/// If [preferOffline] is true and offline content is available, uses local file
/// If [playbackData] is provided, skips the network call to fetch it again.
Future<PlaybackInitializationResult> getPlaybackData({
required PlexMetadata metadata,
required int selectedMediaIndex,
bool preferOffline = false,
PlexVideoPlaybackData? playbackData,
}) async {
try {
// Check for offline content first if preferOffline is enabled
@@ -94,16 +97,17 @@ class PlaybackInitializationService {
// For offline playback, we still need to fetch media info for subtitles
// but use the local file path for video
try {
final playbackData = await client.getVideoPlaybackData(metadata.ratingKey, mediaIndex: selectedMediaIndex);
final data =
playbackData ?? await client.getVideoPlaybackData(metadata.ratingKey, mediaIndex: selectedMediaIndex);
// Build list of external subtitle tracks
final externalSubtitles = _buildExternalSubtitles(playbackData.mediaInfo);
final externalSubtitles = _buildExternalSubtitles(data.mediaInfo);
// Return result with local file path
return PlaybackInitializationResult(
availableVersions: playbackData.availableVersions,
availableVersions: data.availableVersions,
videoUrl: _formatVideoUrl(offlineVideoPath),
mediaInfo: playbackData.mediaInfo,
mediaInfo: data.mediaInfo,
externalSubtitles: externalSubtitles,
isOffline: true,
);
@@ -120,21 +124,22 @@ class PlaybackInitializationService {
}
}
// Fall back to network streaming
final playbackData = await client.getVideoPlaybackData(metadata.ratingKey, mediaIndex: selectedMediaIndex);
// Use pre-parsed data or fall back to network streaming
final data =
playbackData ?? await client.getVideoPlaybackData(metadata.ratingKey, mediaIndex: selectedMediaIndex);
if (!playbackData.hasValidVideoUrl) {
if (!data.hasValidVideoUrl) {
throw PlaybackException(t.messages.fileInfoNotAvailable);
}
// Build list of external subtitle tracks
final externalSubtitles = _buildExternalSubtitles(playbackData.mediaInfo);
final externalSubtitles = _buildExternalSubtitles(data.mediaInfo);
// Return result with available versions and video URL
return PlaybackInitializationResult(
availableVersions: playbackData.availableVersions,
videoUrl: playbackData.videoUrl,
mediaInfo: playbackData.mediaInfo,
availableVersions: data.availableVersions,
videoUrl: data.videoUrl,
mediaInfo: data.mediaInfo,
externalSubtitles: externalSubtitles,
isOffline: false,
);
@@ -43,6 +43,9 @@ class PlaybackProgressTracker {
/// Timer ticks to skip before retrying after failures (exponential backoff).
int _ticksToSkip = 0;
/// Counts timer ticks while paused to send periodic "paused" heartbeats.
int _pausedTickCounter = 0;
PlaybackProgressTracker({
required this.client,
required this.metadata,
@@ -70,6 +73,7 @@ class PlaybackProgressTracker {
_progressTimer = Timer.periodic(updateInterval, (timer) {
if (player.state.playing) {
_pausedTickCounter = 0;
// Skip ticks when backing off after consecutive failures to avoid
// flooding the network with doomed requests during an outage.
if (_ticksToSkip > 0) {
@@ -77,6 +81,18 @@ class PlaybackProgressTracker {
return;
}
_sendProgress('playing');
} else {
// Send periodic "paused" updates to keep the Plex session alive
// (~60s with default 10s interval)
_pausedTickCounter++;
if (_pausedTickCounter >= 6) {
_pausedTickCounter = 0;
if (_ticksToSkip > 0) {
_ticksToSkip--;
return;
}
_sendProgress('paused');
}
}
});
+2 -1
View File
@@ -6,6 +6,7 @@ import 'package:drift/drift.dart';
import '../database/app_database.dart';
import '../models/plex_metadata.dart';
import '../utils/plex_cache_parser.dart';
import '../utils/global_key_utils.dart';
/// Key-value cache for Plex API responses using Drift/SQLite.
/// Stores raw JSON responses keyed by serverId:endpoint format.
@@ -152,7 +153,7 @@ class PlexApiCache {
final json = PlexCacheParser.extractFirstMetadata(data);
if (json == null) continue;
final metadata = PlexMetadata.fromJsonWithImages(json).copyWith(serverId: serverId);
result['$serverId:$ratingKey'] = metadata;
result[buildGlobalKey(serverId, ratingKey)] = metadata;
} catch (_) {
// Skip malformed entries
}
+4 -1
View File
@@ -51,7 +51,10 @@ class PlexAuthService {
static Future<PlexAuthService> create() async {
final storage = await StorageService.getInstance();
final dio = Dio();
final dio = Dio(BaseOptions(
connectTimeout: ConnectionTimeouts.plexTvConnect,
receiveTimeout: ConnectionTimeouts.plexTvReceive,
));
// Get or create client identifier
String? clientIdentifier = storage.getClientIdentifier();
+208 -282
View File
@@ -9,8 +9,6 @@ import '../models/livetv_channel.dart';
import '../models/livetv_dvr.dart';
import '../models/livetv_hub_result.dart';
import '../models/livetv_program.dart';
import '../models/livetv_scheduled_recording.dart';
import '../models/livetv_subscription.dart';
import '../models/plex_config.dart';
import '../models/play_queue_response.dart';
import '../models/plex_file_info.dart';
@@ -34,6 +32,13 @@ import '../utils/plex_url_helper.dart';
import '../utils/watch_state_notifier.dart';
import 'plex_api_cache.dart';
/// Result of a paginated library content fetch
class LibraryContentResult {
final List<PlexMetadata> items;
final int totalSize;
const LibraryContentResult({required this.items, required this.totalSize});
}
/// Process hub JSON response in an isolate.
/// Top-level function so it can be passed to [Isolate.run].
List<PlexHub> _processHubResponse(String jsonStr, String serverId, String? serverName) {
@@ -228,7 +233,7 @@ class PlexClient {
final response = await dio.get('/', options: Options(headers: {'X-Plex-Token': token}));
stopwatch.stop();
final success = response.statusCode == 200 || response.statusCode == 401;
final success = response.statusCode == 200;
return ConnectionTestResult(
success: success,
@@ -366,6 +371,17 @@ class PlexClient {
return response.data;
}
/// Check if the server connection is healthy (reachable AND authenticated).
/// Returns true only if the server responds with HTTP 200.
Future<bool> isHealthy() async {
try {
final response = await _dio.get('/identity');
return response.statusCode == 200;
} catch (e) {
return false;
}
}
/// Get library sections
/// Returns libraries automatically tagged with this client's serverId and serverName
Future<List<PlexLibrary>> getLibraries() async {
@@ -374,7 +390,7 @@ class PlexClient {
}
/// Get library content by section ID
Future<List<PlexMetadata>> getLibraryContent(
Future<LibraryContentResult> getLibraryContent(
String sectionId, {
int? start,
int? size,
@@ -396,7 +412,11 @@ class PlexClient {
cancelToken: cancelToken,
);
return _extractMetadataList(response);
final items = _extractMetadataList(response);
final container = _getMediaContainer(response);
final totalSize = container?['totalSize'] as int? ?? container?['size'] as int? ?? items.length;
return LibraryContentResult(items: items, totalSize: totalSize);
}
/// Parse list of PlexMetadata from a cached response
@@ -432,6 +452,16 @@ class PlexClient {
return 'server://$machineId/com.plexapp.plugins.library/library/metadata/$ratingKey';
}
/// Build a server URI from a folder key for play queue creation.
/// Folder keys are like `/library/sections/1/folder?parent=123`.
Future<String> buildFolderUri(String folderKey) async {
final machineId = config.machineIdentifier ?? await getMachineIdentifier();
if (machineId == null) {
throw Exception('Could not get server machine identifier');
}
return 'server://$machineId/com.plexapp.plugins.library$folderKey';
}
/// Get metadata by rating key with images (includes clearLogo and OnDeck)
/// Uses cache when offline or as fallback on network error
/// Note: OnDeck data is not relevant for offline mode
@@ -450,7 +480,9 @@ class PlexClient {
),
parseCache: (cachedData) {
final metadata = _parseMetadataWithImagesFromCachedResponse(cachedData);
return {'metadata': metadata, 'onDeckEpisode': null};
final firstMetadata = PlexCacheParser.extractFirstMetadata(cachedData);
final playbackData = parseVideoPlaybackDataFromJson(firstMetadata);
return {'metadata': metadata, 'onDeckEpisode': null, 'playbackData': playbackData};
},
parseResponse: (response) {
PlexMetadata? metadata;
@@ -475,10 +507,13 @@ class PlexClient {
}
}
return {'metadata': metadata, 'onDeckEpisode': onDeckEpisode};
// Parse playback data from the same response — zero extra network cost
final playbackData = parseVideoPlaybackDataFromJson(metadataJson);
return {'metadata': metadata, 'onDeckEpisode': onDeckEpisode, 'playbackData': playbackData};
},
) ??
{'metadata': null, 'onDeckEpisode': null};
{'metadata': null, 'onDeckEpisode': null, 'playbackData': null};
}
/// Get metadata by rating key with images (includes clearLogo)
@@ -547,6 +582,27 @@ class PlexClient {
}
}
/// Fetch data with cache checked first, network only on cache miss.
///
/// Use this when fresh data is not critical and prior fetches likely
/// already populated the cache (e.g. playback after visiting detail screen).
Future<T?> _fetchWithCacheFirst<T>({
required String cacheKey,
required Future<Response> Function() networkCall,
required T? Function(dynamic cachedData) parseCache,
required T? Function(Response response) parseResponse,
bool cacheResponse = true,
}) async {
final cached = await _cache.get(serverId, cacheKey);
if (cached != null) return parseCache(cached);
if (_offlineMode) return null;
final response = await networkCall();
if (cacheResponse && response.data != null) {
await _cache.put(serverId, cacheKey, response.data);
}
return parseResponse(response);
}
/// Get first metadata JSON from response data
Map<String, dynamic>? _getFirstMetadataJsonFromData(Map<String, dynamic>? data) =>
PlexCacheParser.extractFirstMetadata(data);
@@ -641,6 +697,23 @@ class PlexClient {
}).toList();
}
/// Parse markers from metadata JSON
List<PlexMarker> _parseMarkers(Map<String, dynamic>? metadataJson) {
if (metadataJson == null || metadataJson['Marker'] == null) {
return [];
}
final markerList = metadataJson['Marker'] as List;
return markerList.map((marker) {
return PlexMarker(
id: marker['id'] as int,
type: marker['type'] as String,
startTimeOffset: marker['startTimeOffset'] as int,
endTimeOffset: marker['endTimeOffset'] as int,
);
}).toList();
}
/// Set per-media language preferences (audio and subtitle)
/// For TV shows, use grandparentRatingKey to set preference for the entire series
/// For movies, use the movie's ratingKey
@@ -859,186 +932,43 @@ class PlexClient {
}
}
/// Get chapters for a media item
Future<List<PlexChapter>> getChapters(String ratingKey) async {
final response = await _dio.get('/library/metadata/$ratingKey', queryParameters: {'includeChapters': 1});
final metadataJson = _getFirstMetadataJson(response);
if (metadataJson != null && metadataJson['Chapter'] != null) {
final chapterList = metadataJson['Chapter'] as List<dynamic>;
return chapterList.map((chapter) {
return PlexChapter(
id: chapter['id'] as int,
index: chapter['index'] as int?,
startTimeOffset: chapter['startTimeOffset'] as int?,
endTimeOffset: chapter['endTimeOffset'] as int?,
title: chapter['tag'] as String?,
thumb: chapter['thumb'] as String?,
);
}).toList();
}
return [];
}
Future<List<PlexMarker>> getMarkers(String ratingKey) async {
final response = await _dio.get('/library/metadata/$ratingKey', queryParameters: {'includeMarkers': 1});
final metadataJson = _getFirstMetadataJson(response);
if (metadataJson != null && metadataJson['Marker'] != null) {
final markerList = metadataJson['Marker'] as List;
return markerList.map((marker) {
return PlexMarker(
id: marker['id'] as int,
type: marker['type'] as String,
startTimeOffset: marker['startTimeOffset'] as int,
endTimeOffset: marker['endTimeOffset'] as int,
);
}).toList();
}
return [];
}
/// Get chapters and markers from cached metadata or fetch if needed
/// Uses same cache key as other metadata methods for consistency
Future<PlaybackExtras> getPlaybackExtras(String ratingKey) async {
// Use same cache key as other metadata methods
final cacheKey = '/library/metadata/$ratingKey';
// If offline mode, return from cache only
if (_offlineMode) {
final cached = await _cache.get(serverId, cacheKey);
if (cached != null) {
return _parsePlaybackExtrasFromCachedResponse(cached);
}
return PlaybackExtras(chapters: [], markers: []);
}
// Online: check cache first (already has chapters/markers from other fetches)
appLogger.d('getPlaybackExtras: serverId=$serverId, cacheKey=$cacheKey');
final cached = await _cache.get(serverId, cacheKey);
if (cached != null) {
final chapters = PlexCacheParser.extractChapters(cached);
appLogger.d('getPlaybackExtras: cache hit, ${chapters?.length ?? 0} chapters');
return _parsePlaybackExtrasFromCachedResponse(cached);
}
appLogger.d('getPlaybackExtras: cache miss');
// Not in cache - fetch and cache
try {
final response = await _dio.get(
'/library/metadata/$ratingKey',
queryParameters: {'includeChapters': 1, 'includeMarkers': 1},
final data = await _fetchWithCacheFirst<Map<String, dynamic>>(
cacheKey: '/library/metadata/$ratingKey',
networkCall: () =>
_dio.get('/library/metadata/$ratingKey', queryParameters: {'includeChapters': 1, 'includeMarkers': 1}),
parseCache: (cached) => cached as Map<String, dynamic>?,
parseResponse: (response) => response.data as Map<String, dynamic>?,
);
// Cache at base endpoint
if (response.data != null) {
await _cache.put(serverId, cacheKey, response.data);
}
return _parsePlaybackExtrasFromResponse(response);
final metadataJson = _getFirstMetadataJsonFromData(data);
return _parsePlaybackExtrasFromMetadataJson(metadataJson);
} catch (e) {
// Network failed
appLogger.w('Network request failed for playback extras', error: e);
appLogger.w('Failed to get playback extras', error: e);
return PlaybackExtras(chapters: [], markers: []);
}
}
/// Parse PlaybackExtras from API response
PlaybackExtras _parsePlaybackExtrasFromResponse(Response response) {
final metadataJson = _getFirstMetadataJson(response);
return _parsePlaybackExtrasFromMetadataJson(metadataJson);
}
/// Parse PlaybackExtras from cached response
PlaybackExtras _parsePlaybackExtrasFromCachedResponse(Map<String, dynamic> cached) {
final metadataJson = PlexCacheParser.extractFirstMetadata(cached);
return _parsePlaybackExtrasFromMetadataJson(metadataJson);
}
/// Parse PlaybackExtras from metadata JSON
PlaybackExtras _parsePlaybackExtrasFromMetadataJson(Map<String, dynamic>? metadataJson) {
final chapters = <PlexChapter>[];
final markers = <PlexMarker>[];
if (metadataJson != null) {
// Parse chapters
if (metadataJson['Chapter'] != null) {
final chapterList = metadataJson['Chapter'] as List<dynamic>;
for (var chapter in chapterList) {
chapters.add(
PlexChapter(
id: chapter['id'] as int,
index: chapter['index'] as int?,
startTimeOffset: chapter['startTimeOffset'] as int?,
endTimeOffset: chapter['endTimeOffset'] as int?,
title: chapter['tag'] as String?,
thumb: chapter['thumb'] as String?,
),
);
}
}
// Parse markers
if (metadataJson['Marker'] != null) {
final markerList = metadataJson['Marker'] as List;
for (var marker in markerList) {
markers.add(
PlexMarker(
id: marker['id'] as int,
type: marker['type'] as String,
startTimeOffset: marker['startTimeOffset'] as int,
endTimeOffset: marker['endTimeOffset'] as int,
),
);
}
}
}
return PlaybackExtras.withChapterFallback(chapters: chapters, markers: markers);
return PlaybackExtras.withChapterFallback(
chapters: _parseChapters(metadataJson),
markers: _parseMarkers(metadataJson),
);
}
/// Get consolidated video playback data (URL, media info, versions, and markers) in a single API call.
/// This is the primary method for playback initialization.
/// Uses cache for offline mode support and network fallback.
Future<PlexVideoPlaybackData> getVideoPlaybackData(String ratingKey, {int mediaIndex = 0}) async {
Map<String, dynamic>? data;
try {
data = await _fetchWithCacheFallback<Map<String, dynamic>>(
cacheKey: '/library/metadata/$ratingKey',
networkCall: () =>
_dio.get('/library/metadata/$ratingKey', queryParameters: {'includeMarkers': 1, 'includeChapters': 1}),
parseCache: (cached) => cached as Map<String, dynamic>?,
parseResponse: (response) => response.data as Map<String, dynamic>?,
);
} catch (_) {
// Gracefully degrade: return empty playback data on total failure
}
final metadataJson = _getFirstMetadataJsonFromData(data);
/// Parse video playback data from raw metadata JSON (no network call).
/// Used by [getVideoPlaybackData] and [getMetadataWithImagesAndOnDeck] to
/// avoid redundant fetches when the response is already available.
PlexVideoPlaybackData parseVideoPlaybackDataFromJson(Map<String, dynamic>? metadataJson, {int mediaIndex = 0}) {
String? videoUrl;
PlexMediaInfo? mediaInfo;
List<PlexMediaVersion> availableVersions = [];
List<PlexMarker> markers = [];
final markers = _parseMarkers(metadataJson);
if (metadataJson != null) {
// Parse markers (for auto-skip functionality)
if (metadataJson['Marker'] != null) {
final markerList = metadataJson['Marker'] as List;
for (var marker in markerList) {
markers.add(
PlexMarker(
id: marker['id'] as int,
type: marker['type'] as String,
startTimeOffset: marker['startTimeOffset'] as int,
endTimeOffset: marker['endTimeOffset'] as int,
),
);
}
}
if (metadataJson['Media'] != null && (metadataJson['Media'] as List).isNotEmpty) {
final mediaList = metadataJson['Media'] as List;
@@ -1085,11 +1015,31 @@ class PlexClient {
);
}
/// Get consolidated video playback data (URL, media info, versions, and markers) in a single API call.
/// This is the primary method for playback initialization.
/// Uses cache for offline mode support and network fallback.
Future<PlexVideoPlaybackData> getVideoPlaybackData(String ratingKey, {int mediaIndex = 0}) async {
Map<String, dynamic>? data;
try {
data = await _fetchWithCacheFirst<Map<String, dynamic>>(
cacheKey: '/library/metadata/$ratingKey',
networkCall: () =>
_dio.get('/library/metadata/$ratingKey', queryParameters: {'includeMarkers': 1, 'includeChapters': 1}),
parseCache: (cached) => cached as Map<String, dynamic>?,
parseResponse: (response) => response.data as Map<String, dynamic>?,
);
} catch (_) {
// Gracefully degrade: return empty playback data on total failure
}
final metadataJson = _getFirstMetadataJsonFromData(data);
return parseVideoPlaybackDataFromJson(metadataJson, mediaIndex: mediaIndex);
}
/// Get file information for a media item
/// Uses cache for offline mode support and network fallback.
Future<PlexFileInfo?> getFileInfo(String ratingKey) async {
try {
final data = await _fetchWithCacheFallback<Map<String, dynamic>>(
final data = await _fetchWithCacheFirst<Map<String, dynamic>>(
cacheKey: '/library/metadata/$ratingKey',
networkCall: () =>
_dio.get('/library/metadata/$ratingKey', queryParameters: {'includeMarkers': 1, 'includeChapters': 1}),
@@ -1565,6 +1515,94 @@ class PlexClient {
);
}
// ============================================================================
// Metadata Editing Methods
// ============================================================================
/// Update metadata fields for a media item
Future<bool> updateMetadata({
required int sectionId,
required String ratingKey,
required int typeNumber,
String? title,
String? titleSort,
String? originalTitle,
String? originallyAvailableAt,
String? contentRating,
String? studio,
String? tagline,
String? summary,
}) {
final queryParams = <String, dynamic>{
'type': typeNumber,
'id': ratingKey,
};
void addField(String name, String? value) {
if (value != null) {
queryParams['$name.value'] = value;
queryParams['$name.locked'] = '1';
}
}
addField('title', title);
addField('titleSort', titleSort);
addField('originalTitle', originalTitle);
addField('originallyAvailableAt', originallyAvailableAt);
addField('contentRating', contentRating);
addField('studio', studio);
addField('tagline', tagline);
addField('summary', summary);
return _wrapBoolApiCall(
() => _dio.put('/library/sections/$sectionId/all', queryParameters: queryParams),
'Failed to update metadata',
);
}
/// Get available artwork (posters or backgrounds) for a media item
Future<List<Map<String, dynamic>>> getAvailableArtwork(String ratingKey, String element) async {
try {
final response = await _dio.get('/library/metadata/$ratingKey/$element');
final container = _getMediaContainer(response);
if (container != null && container['Metadata'] != null) {
return (container['Metadata'] as List).cast<Map<String, dynamic>>();
}
return [];
} catch (e) {
appLogger.e('Failed to get available artwork', error: e);
return [];
}
}
/// Set artwork from a URL (can be a Plex internal path or external URL)
Future<bool> setArtworkFromUrl(String ratingKey, String element, String url) {
return _wrapBoolApiCall(
() => _dio.post('/library/metadata/$ratingKey/$element', queryParameters: {'url': url}),
'Failed to set artwork from URL',
);
}
/// Upload artwork from binary data
Future<bool> uploadArtwork(String ratingKey, String element, List<int> bytes) {
return _wrapBoolApiCall(
() => _dio.post(
'/library/metadata/$ratingKey/$element',
data: bytes,
options: Options(headers: {'Content-Length': bytes.length}),
),
'Failed to upload artwork',
);
}
/// Update per-media advanced preferences
Future<bool> updateMetadataPrefs(String ratingKey, Map<String, String> prefs) {
return _wrapBoolApiCall(
() => _dio.put('/library/metadata/$ratingKey/prefs', queryParameters: prefs),
'Failed to update metadata preferences',
);
}
// ============================================================================
// Collection Methods
// ============================================================================
@@ -2390,11 +2428,6 @@ class PlexClient {
}
}
/// Reload the DVR guide data
Future<bool> reloadGuide(String dvrKey) {
return _wrapBoolApiCall(() => _dio.post('/livetv/dvrs/$dvrKey/reloadGuide'), 'Failed to reload guide');
}
/// Get active live TV sessions
Future<List<PlexMetadata>> getLiveTvSessions() {
return _wrapListApiCall<PlexMetadata>(
@@ -2404,113 +2437,6 @@ class PlexClient {
);
}
/// Get all DVR recording subscriptions
Future<List<LiveTvSubscription>> getSubscriptions() async {
return _wrapListApiCall<LiveTvSubscription>(() => _dio.get('/media/subscriptions'), (response) {
final container = _getMediaContainer(response);
if (container != null && container['MediaSubscription'] != null) {
return (container['MediaSubscription'] as List).map((json) {
final sub = LiveTvSubscription.fromJson(json as Map<String, dynamic>);
return LiveTvSubscription(
key: sub.key,
ratingKey: sub.ratingKey,
guid: sub.guid,
title: sub.title,
summary: sub.summary,
type: sub.type,
thumb: sub.thumb,
art: sub.art,
targetLibrarySectionID: sub.targetLibrarySectionID,
targetSectionID: sub.targetSectionID,
createdAt: sub.createdAt,
settings: sub.settings,
serverId: serverId,
);
}).toList();
}
return [];
}, 'Failed to get subscriptions');
}
/// Create a DVR recording subscription
Future<LiveTvSubscription?> createSubscription({
required String type,
required int targetSectionID,
required int targetLibrarySectionID,
Map<String, String>? prefs,
String? hint,
String? uri,
}) async {
try {
final queryParams = <String, dynamic>{
'type': type,
'targetSectionID': targetSectionID,
'targetLibrarySectionID': targetLibrarySectionID,
};
if (hint != null) queryParams['hint'] = hint;
if (uri != null) queryParams['uri'] = uri;
if (prefs != null) {
for (final entry in prefs.entries) {
queryParams['prefs[${entry.key}]'] = entry.value;
}
}
final response = await _dio.post('/media/subscriptions', queryParameters: queryParams);
final container = _getMediaContainer(response);
if (container != null && container['MediaSubscription'] != null) {
final subs = container['MediaSubscription'] as List;
if (subs.isNotEmpty) {
return LiveTvSubscription.fromJson(subs.first as Map<String, dynamic>);
}
}
return null;
} catch (e) {
appLogger.e('Failed to create subscription', error: e);
return null;
}
}
/// Delete a DVR recording subscription
Future<bool> deleteSubscription(String subscriptionId) {
return _wrapBoolApiCall(() => _dio.delete('/media/subscriptions/$subscriptionId'), 'Failed to delete subscription');
}
/// Edit a DVR recording subscription's preferences
Future<bool> editSubscription(String subscriptionId, Map<String, String> prefs) {
final queryParams = <String, dynamic>{};
for (final entry in prefs.entries) {
queryParams['prefs[${entry.key}]'] = entry.value;
}
return _wrapBoolApiCall(
() => _dio.put('/media/subscriptions/$subscriptionId', queryParameters: queryParams),
'Failed to edit subscription',
);
}
/// Get scheduled DVR recordings
Future<List<ScheduledRecording>> getScheduledRecordings() async {
return _wrapListApiCall<ScheduledRecording>(() => _dio.get('/media/subscriptions/scheduled'), (response) {
final container = _getMediaContainer(response);
if (container != null && container['Metadata'] != null) {
return (container['Metadata'] as List)
.map((json) => ScheduledRecording.fromJson(json as Map<String, dynamic>))
.toList();
}
return [];
}, 'Failed to get scheduled recordings');
}
/// Get subscription template for a program (used for recording setup)
Future<Map<String, dynamic>?> getSubscriptionTemplate(String guid) async {
try {
final response = await _dio.get('/media/subscriptions/template', queryParameters: {'guid': guid});
return _getMediaContainer(response);
} catch (e) {
appLogger.e('Failed to get subscription template', error: e);
return null;
}
}
Future<void> _handleEndpointSwitch(String newBaseUrl) async {
if (config.baseUrl == newBaseUrl) {
return;
+20 -6
View File
@@ -1,9 +1,13 @@
import 'dart:convert';
import 'package:dio/dio.dart';
import '../utils/app_logger.dart';
import 'plex_auth_service.dart';
import 'storage_service.dart';
enum ServerRefreshResult { success, networkError, authError, noToken }
/// Centralized server configuration registry
/// Manages which servers are available and their configurations
class ServerRegistry {
@@ -95,13 +99,15 @@ class ServerRegistry {
appLogger.i('Cleared all servers from registry');
}
/// Refresh servers from Plex API and update storage
/// This updates connection info (IPs, ports) that may have changed
Future<void> refreshServersFromApi() async {
/// Refresh servers from Plex API and update storage.
/// This updates connection info (IPs, ports) that may have changed.
/// Returns [ServerRefreshResult.authError] when the stored token is rejected
/// (e.g. after removing a Plex profile PIN), so the caller can redirect to re-auth.
Future<ServerRefreshResult> refreshServersFromApi() async {
final token = _storage.getPlexToken();
if (token == null || token.isEmpty) {
appLogger.d('No Plex token available, skipping server refresh');
return;
return ServerRefreshResult.noToken;
}
try {
@@ -111,7 +117,7 @@ class ServerRegistry {
if (freshServers.isEmpty) {
appLogger.w('API returned no servers, keeping existing data');
return;
return ServerRefreshResult.success;
}
// Get existing servers to preserve any local-only data
@@ -133,9 +139,17 @@ class ServerRegistry {
await saveServers(updatedServers);
appLogger.i('Refreshed ${updatedServers.length} servers from API');
return ServerRefreshResult.success;
} on DioException catch (e) {
if (e.response?.statusCode == 401) {
appLogger.w('Plex token is invalid (401), re-authentication required');
return ServerRefreshResult.authError;
}
appLogger.w('Failed to refresh servers from API, using cached data', error: e);
return ServerRefreshResult.networkError;
} catch (e, stackTrace) {
appLogger.w('Failed to refresh servers from API, using cached data', error: e, stackTrace: stackTrace);
// Don't rethrow - we can continue with cached servers
return ServerRefreshResult.networkError;
}
}
}
+28 -14
View File
@@ -20,6 +20,7 @@ class SettingsService extends BaseSharedPreferencesService {
static const String _keyThemeMode = 'theme_mode';
static const String _keyEnableDebugLogging = 'enable_debug_logging';
static const String _keyBufferSize = 'buffer_size';
static const String _keyBufferSizeMigratedToAuto = 'buffer_size_migrated_to_auto';
static const String _keyKeyboardShortcuts = 'keyboard_shortcuts';
static const String _keyKeyboardHotkeys = 'keyboard_hotkeys';
static const String _keyEnableHardwareDecoding = 'enable_hardware_decoding';
@@ -76,6 +77,7 @@ class SettingsService extends BaseSharedPreferencesService {
static const String _keyCustomExternalPlayers = 'custom_external_players';
static const String _keyConfirmExitOnBack = 'confirm_exit_on_back';
static const String _keyAmbientLighting = 'ambient_lighting';
static const String _keyAudioPassthrough = 'audio_passthrough';
SettingsService._();
@@ -121,7 +123,14 @@ class SettingsService extends BaseSharedPreferencesService {
}
int getBufferSize() {
return prefs.getInt(_keyBufferSize) ?? 128; // Default 128MB
// One-time migration: reset existing users to Auto.
// SharedPreferences updates in-memory cache synchronously, so the
// unawaited disk-flush futures are safe here (idempotent if re-run).
if (prefs.getBool(_keyBufferSizeMigratedToAuto) != true) {
prefs.remove(_keyBufferSize);
prefs.setBool(_keyBufferSizeMigratedToAuto, true);
}
return prefs.getInt(_keyBufferSize) ?? 0; // 0 = Auto
}
// Hardware Decoding
@@ -422,7 +431,7 @@ class SettingsService extends BaseSharedPreferencesService {
final jsonString = prefs.getString(_keyKeyboardShortcuts);
if (jsonString == null) return getDefaultKeyboardShortcuts();
final decoded = _decodeJsonStringToMap(jsonString);
final decoded = decodeJsonStringToMap(jsonString);
if (decoded.isEmpty) return getDefaultKeyboardShortcuts();
final shortcuts = decoded.map((key, value) => MapEntry(key, value.toString()));
@@ -486,6 +495,7 @@ class SettingsService extends BaseSharedPreferencesService {
return result;
} catch (e) {
appLogger.d('Failed to parse keyboard hotkeys', error: e);
return getDefaultKeyboardHotkeys();
}
}
@@ -796,19 +806,10 @@ class SettingsService extends BaseSharedPreferencesService {
final jsonString = prefs.getString(_keyMediaVersionPreferences);
if (jsonString == null) return {};
final decoded = _decodeJsonStringToMap(jsonString);
final decoded = decodeJsonStringToMap(jsonString);
return decoded.map((key, value) => MapEntry(key, value as int));
}
/// Helper to decode JSON string to Map with error handling
Map<String, dynamic> _decodeJsonStringToMap(String jsonString) {
try {
return json.decode(jsonString) as Map<String, dynamic>;
} catch (e) {
return {};
}
}
// App Locale
Future<void> setAppLocale(AppLocale locale) async {
await prefs.setString(_keyAppLocale, locale.languageCode);
@@ -1072,7 +1073,8 @@ class SettingsService extends BaseSharedPreferencesService {
if (jsonString == null) return KnownPlayers.systemDefault;
try {
return ExternalPlayer.fromJsonString(jsonString);
} catch (_) {
} catch (e) {
appLogger.d('Failed to parse external player', error: e);
return KnownPlayers.systemDefault;
}
}
@@ -1088,7 +1090,8 @@ class SettingsService extends BaseSharedPreferencesService {
try {
final List<dynamic> decoded = json.decode(jsonString);
return decoded.map((e) => ExternalPlayer.fromJson(e as Map<String, dynamic>)).toList();
} catch (_) {
} catch (e) {
appLogger.d('Failed to parse custom external players', error: e);
return [];
}
}
@@ -1127,6 +1130,15 @@ class SettingsService extends BaseSharedPreferencesService {
return prefs.getBool(_keyAmbientLighting) ?? false;
}
// Audio Passthrough
Future<void> setAudioPassthrough(bool enabled) async {
await prefs.setBool(_keyAudioPassthrough, enabled);
}
bool getAudioPassthrough() {
return prefs.getBool(_keyAudioPassthrough) ?? false;
}
// Reset all settings to defaults
Future<void> resetAllSettings() async {
await Future.wait([
@@ -1182,6 +1194,8 @@ class SettingsService extends BaseSharedPreferencesService {
prefs.remove(_keyCustomExternalPlayers),
prefs.remove(_keyConfirmExitOnBack),
prefs.remove(_keyAmbientLighting),
prefs.remove(_keyAudioPassthrough),
prefs.remove(_keyBufferSizeMigratedToAuto),
]);
}
+58 -5
View File
@@ -12,12 +12,18 @@ class SleepTimerService extends ChangeNotifier {
Timer? _timer;
DateTime? _endTime;
Duration? _duration;
Duration? _originalDuration;
VoidCallback? _onTimerComplete;
bool _needsRestart = false;
final StreamController<void> _completedController = StreamController<void>.broadcast();
final StreamController<void> _promptController = StreamController<void>.broadcast();
/// Emits when the sleep timer completes (not when cancelled)
Stream<void> get onCompleted => _completedController.stream;
/// Emits when the timer fires and wants to show a "still watching?" prompt
Stream<void> get onPrompt => _promptController.stream;
/// Whether a timer is currently active
bool get isActive => _timer != null && _timer!.isActive;
@@ -27,6 +33,9 @@ class SleepTimerService extends ChangeNotifier {
/// The original duration of the timer
Duration? get duration => _duration;
/// The user-selected duration (unmodified by extendTimer)
Duration? get originalDuration => _originalDuration;
/// Remaining time on the timer
Duration? get remainingTime {
if (_endTime == null) return null;
@@ -41,6 +50,7 @@ class SleepTimerService extends ChangeNotifier {
// Cancel any existing timer
cancelTimer();
_originalDuration = duration;
_duration = duration;
_endTime = DateTime.now().add(duration);
_onTimerComplete = onComplete;
@@ -52,9 +62,9 @@ class SleepTimerService extends ChangeNotifier {
final remaining = remainingTime;
if (remaining == null || remaining.inSeconds <= 0) {
appLogger.d('Sleep timer completed');
_executeCallback();
cancelTimer();
appLogger.d('Sleep timer completed - showing prompt');
_stopTimerOnly();
_promptController.add(null);
} else {
// Notify listeners to update UI
notifyListeners();
@@ -64,19 +74,51 @@ class SleepTimerService extends ChangeNotifier {
notifyListeners();
}
/// Cancel the active timer
/// Cancel the active timer (user-initiated, clears everything)
void cancelTimer() {
if (_timer != null) {
if (_timer != null || _originalDuration != null) {
appLogger.d('Sleep timer cancelled');
_timer?.cancel();
_timer = null;
_endTime = null;
_duration = null;
_originalDuration = null;
_onTimerComplete = null;
notifyListeners();
}
}
/// Restart the timer with the original user-selected duration
void restartTimer() {
if (_originalDuration != null && _onTimerComplete != null) {
final duration = _originalDuration!;
final callback = _onTimerComplete!;
startTimer(duration, callback);
}
}
/// Execute the completion callback directly (fallback path)
void executeCompletion() {
_executeCallback();
}
/// Mark that the timer should restart when a new playback session begins
/// (e.g. user exited the player and started something new)
void markNeedsRestart() {
if (isActive || _originalDuration != null) {
_needsRestart = true;
}
}
/// Restart the timer if it was marked for restart (new playback session).
/// [onComplete] provides the new callback for the fresh session.
void restartIfNeeded(VoidCallback onComplete) {
if (_needsRestart && _originalDuration != null) {
_needsRestart = false;
startTimer(_originalDuration!, onComplete);
}
}
/// Extend the current timer by the specified duration
void extendTimer(Duration additionalTime) {
if (_endTime != null) {
@@ -87,6 +129,16 @@ class SleepTimerService extends ChangeNotifier {
}
}
/// Stop the periodic timer but preserve _originalDuration and _onTimerComplete
/// for the prompt flow (restart/completion)
void _stopTimerOnly() {
_timer?.cancel();
_timer = null;
_endTime = null;
_duration = null;
notifyListeners();
}
void _executeCallback() {
if (_onTimerComplete != null) {
try {
@@ -102,6 +154,7 @@ class SleepTimerService extends ChangeNotifier {
void dispose() {
_timer?.cancel();
_completedController.close();
_promptController.close();
super.dispose();
}
}

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