Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35fc0334bc | ||
|
|
c6ace690cb | ||
|
|
7a979bed2f | ||
|
|
e46bd71fa7 | ||
|
|
c98010234f | ||
|
|
02e175e4d3 | ||
|
|
013bcfbece | ||
|
|
ebf2d1e516 | ||
|
|
4bce668df6 | ||
|
|
c64c7defc3 | ||
|
|
1629801074 | ||
|
|
cd36e3acb0 | ||
|
|
7001032e51 | ||
|
|
3a0bac4446 | ||
|
|
1c31f0effa | ||
|
|
01e61c590a | ||
|
|
a00e2b78d6 | ||
|
|
b5904bc477 | ||
|
|
47f2afb665 | ||
|
|
3b2e278868 | ||
|
|
8baa84c06f | ||
|
|
92b589213f | ||
|
|
94395feaba | ||
|
|
c372920965 | ||
|
|
5ab6af1b02 | ||
|
|
34252b9ba7 | ||
|
|
8d3f448fdf | ||
|
|
7ebbfb9ef7 | ||
|
|
a008f86ee2 | ||
|
|
5f1c51ff6c | ||
|
|
229d6b24e1 | ||
|
|
9dc0654225 | ||
|
|
36277076bd | ||
|
|
f96ef0740d | ||
|
|
6bee1a6c38 | ||
|
|
0dbba6439d | ||
|
|
7ac888cd46 | ||
|
|
88f4ae9987 | ||
|
|
938291dbf6 | ||
|
|
f5715987fc | ||
|
|
7c0e86c3cf |
@@ -490,13 +490,13 @@ jobs:
|
||||
- name: Cache APT packages
|
||||
uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: clang cmake meson ninja-build pkg-config nasm libgtk-3-dev libevdev-dev liblzma-dev libstdc++-12-dev libasound2-dev libass-dev libfreetype-dev libfontconfig-dev libfribidi-dev libharfbuzz-dev libepoxy-dev libegl-dev libgl-dev libgnutls28-dev libpipewire-0.3-dev libva-dev libvdpau-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxpresent-dev libxkbcommon-dev libpulse-dev libdbus-1-dev libdrm-dev libgbm-dev libwayland-dev wayland-protocols liblcms2-dev ruby ruby-dev rubygems build-essential rpm libarchive-tools imagemagick
|
||||
packages: clang cmake meson ninja-build pkg-config nasm libgtk-3-dev libevdev-dev liblzma-dev libstdc++-12-dev libasound2-dev libass-dev libfreetype-dev libfontconfig-dev libfribidi-dev libharfbuzz-dev libepoxy-dev libegl-dev libgl-dev libgnutls28-dev libpipewire-0.3-dev libva-dev libvdpau-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxpresent-dev libxkbcommon-dev libpulse-dev libdbus-1-dev libdrm-dev libgbm-dev libwayland-dev wayland-protocols liblcms2-dev ruby ruby-dev rubygems build-essential rpm libarchive-tools imagemagick libcurl4-openssl-dev
|
||||
version: 1.1
|
||||
|
||||
- name: Install Linux dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang cmake meson ninja-build pkg-config nasm libgtk-3-dev libevdev-dev liblzma-dev libstdc++-12-dev libasound2-dev libass-dev libfreetype-dev libfontconfig-dev libfribidi-dev libharfbuzz-dev libepoxy-dev libegl-dev libgl-dev libgnutls28-dev libpipewire-0.3-dev libva-dev libvdpau-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxpresent-dev libxkbcommon-dev libpulse-dev libdbus-1-dev libdrm-dev libgbm-dev libwayland-dev wayland-protocols liblcms2-dev ruby ruby-dev rubygems build-essential rpm libarchive-tools imagemagick
|
||||
sudo apt-get install -y clang cmake meson ninja-build pkg-config nasm libgtk-3-dev libevdev-dev liblzma-dev libstdc++-12-dev libasound2-dev libass-dev libfreetype-dev libfontconfig-dev libfribidi-dev libharfbuzz-dev libepoxy-dev libegl-dev libgl-dev libgnutls28-dev libpipewire-0.3-dev libva-dev libvdpau-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxpresent-dev libxkbcommon-dev libpulse-dev libdbus-1-dev libdrm-dev libgbm-dev libwayland-dev wayland-protocols liblcms2-dev ruby ruby-dev rubygems build-essential rpm libarchive-tools imagemagick libcurl4-openssl-dev
|
||||
|
||||
- name: Cache libmpv build
|
||||
id: libmpv-cache
|
||||
@@ -598,13 +598,13 @@ jobs:
|
||||
- name: Cache APT packages
|
||||
uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: clang cmake meson ninja-build pkg-config nasm libgtk-3-dev libevdev-dev liblzma-dev libstdc++-12-dev libasound2-dev libass-dev libfreetype-dev libfontconfig-dev libfribidi-dev libharfbuzz-dev libepoxy-dev libegl-dev libgl-dev libgnutls28-dev libpipewire-0.3-dev libva-dev libvdpau-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxpresent-dev libxkbcommon-dev libpulse-dev libdbus-1-dev libdrm-dev libgbm-dev libwayland-dev wayland-protocols liblcms2-dev ruby ruby-dev rubygems build-essential rpm libarchive-tools imagemagick
|
||||
packages: clang cmake meson ninja-build pkg-config nasm libgtk-3-dev libevdev-dev liblzma-dev libstdc++-12-dev libasound2-dev libass-dev libfreetype-dev libfontconfig-dev libfribidi-dev libharfbuzz-dev libepoxy-dev libegl-dev libgl-dev libgnutls28-dev libpipewire-0.3-dev libva-dev libvdpau-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxpresent-dev libxkbcommon-dev libpulse-dev libdbus-1-dev libdrm-dev libgbm-dev libwayland-dev wayland-protocols liblcms2-dev ruby ruby-dev rubygems build-essential rpm libarchive-tools imagemagick libcurl4-openssl-dev
|
||||
version: 1.1
|
||||
|
||||
- name: Install Linux dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang cmake meson ninja-build pkg-config nasm libgtk-3-dev libevdev-dev liblzma-dev libstdc++-12-dev libasound2-dev libass-dev libfreetype-dev libfontconfig-dev libfribidi-dev libharfbuzz-dev libepoxy-dev libegl-dev libgl-dev libgnutls28-dev libpipewire-0.3-dev libva-dev libvdpau-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxpresent-dev libxkbcommon-dev libpulse-dev libdbus-1-dev libdrm-dev libgbm-dev libwayland-dev wayland-protocols liblcms2-dev ruby ruby-dev rubygems build-essential rpm libarchive-tools imagemagick
|
||||
sudo apt-get install -y clang cmake meson ninja-build pkg-config nasm libgtk-3-dev libevdev-dev liblzma-dev libstdc++-12-dev libasound2-dev libass-dev libfreetype-dev libfontconfig-dev libfribidi-dev libharfbuzz-dev libepoxy-dev libegl-dev libgl-dev libgnutls28-dev libpipewire-0.3-dev libva-dev libvdpau-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxpresent-dev libxkbcommon-dev libpulse-dev libdbus-1-dev libdrm-dev libgbm-dev libwayland-dev wayland-protocols liblcms2-dev ruby ruby-dev rubygems build-essential rpm libarchive-tools imagemagick libcurl4-openssl-dev
|
||||
|
||||
- name: Cache libmpv build
|
||||
id: libmpv-cache
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
cask "plezy" do
|
||||
version "1.22.0"
|
||||
sha256 "94524bb6b7c4779f5416cef7d3a876e081f7ad6e737e828f790e52920b7086f4"
|
||||
version "1.23.0"
|
||||
sha256 "ea9ea175b704cac6555457ae957d1c71c374cbf083d9a006685df0d1d3274c1f"
|
||||
|
||||
url "https://github.com/edde746/plezy/releases/download/#{version}/plezy-macos.dmg"
|
||||
name "Plezy"
|
||||
|
||||
@@ -26,6 +26,10 @@ A modern Plex client for desktop and mobile. Built with Flutter for native perfo
|
||||
brew tap edde746/plezy https://github.com/edde746/plezy
|
||||
brew install --cask plezy
|
||||
```
|
||||
- **WinGet** (Windows):
|
||||
```bash
|
||||
winget install edde746.plezy
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
|
||||
@@ -30,6 +30,13 @@ android {
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
|
||||
if (System.getenv("AMAZON") != null) {
|
||||
versionCode = (flutter.versionCode ?: 0) + 3000
|
||||
ndk {
|
||||
abiFilters += listOf("armeabi-v7a", "arm64-v8a")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
|
||||
@@ -88,6 +88,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
private var trackSelector: DefaultTrackSelector? = null
|
||||
private var tunnelingUserEnabled: Boolean = true
|
||||
private var tunnelingDisabledForCodec: Boolean = false
|
||||
@Volatile private var disposing: Boolean = false
|
||||
private var pendingStartPositionMs: Long = 0L
|
||||
|
||||
// Frame watchdog: detects black screen (audio plays but 0 video frames rendered)
|
||||
@@ -151,9 +152,10 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
}
|
||||
|
||||
private fun ensureFlutterOverlayOnTop() {
|
||||
if (disposing) return
|
||||
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
|
||||
contentView.post {
|
||||
if (!isInitialized) return@post
|
||||
if (disposing || !isInitialized) return@post
|
||||
val container = FlutterOverlayHelper.findFlutterContainer(contentView, surfaceContainer)
|
||||
?: return@post
|
||||
FlutterOverlayHelper.configureFlutterZOrder(contentView, container, zOrderOnTop = false)
|
||||
@@ -183,6 +185,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
}
|
||||
|
||||
tunnelingUserEnabled = tunnelingEnabled
|
||||
disposing = false
|
||||
|
||||
try {
|
||||
audioFocusManager = AudioFocusManager(
|
||||
@@ -405,6 +408,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
|
||||
private val surfaceCallback = object : android.view.SurfaceHolder.Callback {
|
||||
override fun surfaceCreated(holder: android.view.SurfaceHolder) {
|
||||
if (disposing) return
|
||||
emitLog("debug", "surface", "Created")
|
||||
ensureFlutterOverlayOnTop()
|
||||
}
|
||||
@@ -569,6 +573,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
}
|
||||
|
||||
private fun updateSurfaceViewSize(videoWidth: Int, videoHeight: Int, pixelRatio: Float) {
|
||||
if (disposing) return
|
||||
if (videoWidth == 0 || videoHeight == 0) return
|
||||
|
||||
val surface = surfaceView ?: return
|
||||
@@ -1057,7 +1062,9 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
}
|
||||
|
||||
fun setVisible(visible: Boolean) {
|
||||
if (disposing) return
|
||||
activity.runOnUiThread {
|
||||
if (disposing) return@runOnUiThread
|
||||
surfaceContainer?.visibility = if (visible) View.VISIBLE else View.INVISIBLE
|
||||
// subtitleView is inside surfaceContainer, inherits visibility
|
||||
Log.d(TAG, "setVisible($visible)")
|
||||
@@ -1132,10 +1139,13 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
}
|
||||
|
||||
fun onPipModeChanged(isInPipMode: Boolean) {
|
||||
if (disposing) return
|
||||
activity.runOnUiThread {
|
||||
if (disposing) return@runOnUiThread
|
||||
// Force recalculation of surface size based on new container dimensions
|
||||
// Use a slight delay to allow the window to resize first
|
||||
handler.postDelayed({
|
||||
if (disposing) return@postDelayed
|
||||
val videoSize = exoPlayer?.videoSize
|
||||
if (videoSize != null && videoSize.width > 0 && videoSize.height > 0) {
|
||||
updateSurfaceViewSize(videoSize.width, videoSize.height, videoSize.pixelWidthHeightRatio)
|
||||
@@ -1232,10 +1242,13 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
// Cleanup
|
||||
|
||||
fun dispose() {
|
||||
if (disposing) return
|
||||
disposing = true
|
||||
Log.d(TAG, "Disposing")
|
||||
|
||||
stopFrameWatchdog()
|
||||
stopPositionUpdates()
|
||||
handler.removeCallbacksAndMessages(null)
|
||||
frameRateManager?.clearVideoFrameRate()
|
||||
frameRateManager = null
|
||||
audioFocusManager?.release()
|
||||
@@ -1266,10 +1279,10 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
contentView.post {
|
||||
sv?.holder?.removeCallback(cb)
|
||||
container?.let { contentView.removeView(it) }
|
||||
surfaceContainer = null
|
||||
surfaceView = null
|
||||
subtitleView = null
|
||||
}
|
||||
surfaceContainer = null
|
||||
surfaceView = null
|
||||
subtitleView = null
|
||||
|
||||
isInitialized = false
|
||||
Log.d(TAG, "Disposed")
|
||||
|
||||
@@ -62,10 +62,10 @@ class MpvPlayerCore(private val activity: Activity) :
|
||||
private var flutterOverlayApplied = false
|
||||
|
||||
private fun ensureFlutterOverlayOnTop() {
|
||||
if (flutterOverlayApplied) return
|
||||
if (disposing || flutterOverlayApplied) return
|
||||
val contentView = activity.findViewById<ViewGroup>(android.R.id.content)
|
||||
contentView.post {
|
||||
if (!isInitialized) return@post
|
||||
if (disposing || !isInitialized) return@post
|
||||
val container = FlutterOverlayHelper.findFlutterContainer(contentView, surfaceContainer)
|
||||
?: return@post
|
||||
if (contentView.getChildAt(contentView.childCount - 1) == container) {
|
||||
@@ -242,7 +242,7 @@ class MpvPlayerCore(private val activity: Activity) :
|
||||
MPVLib.setOptionString("vd-lavc-film-grain", "cpu")
|
||||
|
||||
// Audio configuration
|
||||
MPVLib.setOptionString("ao", "audiotrack")
|
||||
MPVLib.setOptionString("ao", "audiotrack,opensles")
|
||||
}
|
||||
|
||||
// Audio Focus
|
||||
@@ -446,10 +446,9 @@ class MpvPlayerCore(private val activity: Activity) :
|
||||
}
|
||||
|
||||
fun setVisible(visible: Boolean) {
|
||||
if (disposing) return
|
||||
activity.runOnUiThread {
|
||||
// Set visibility on the container, not the SurfaceView directly.
|
||||
// This allows the SurfaceView surface to be created even when hidden,
|
||||
// which is required with RenderMode.texture (TextureView mode).
|
||||
if (disposing) return@runOnUiThread
|
||||
surfaceContainer?.visibility = if (visible) View.VISIBLE else View.INVISIBLE
|
||||
Log.d(TAG, "setVisible($visible)")
|
||||
}
|
||||
@@ -471,13 +470,17 @@ class MpvPlayerCore(private val activity: Activity) :
|
||||
|
||||
// Cleanup
|
||||
|
||||
fun dispose() {
|
||||
if (disposing) return
|
||||
fun dispose(onComplete: (() -> Unit)? = null) {
|
||||
if (disposing) {
|
||||
onComplete?.invoke()
|
||||
return
|
||||
}
|
||||
disposing = true
|
||||
Log.d(TAG, "Disposing")
|
||||
|
||||
// Shutdown command executor
|
||||
commandExecutor.shutdown()
|
||||
handler.removeCallbacksAndMessages(null)
|
||||
|
||||
// Clean up frame rate and audio focus
|
||||
frameRateManager?.clearVideoFrameRate()
|
||||
@@ -510,15 +513,19 @@ class MpvPlayerCore(private val activity: Activity) :
|
||||
contentView.post {
|
||||
sv?.holder?.removeCallback(this)
|
||||
container?.let { contentView.removeView(it) }
|
||||
surfaceContainer = null
|
||||
surfaceView = null
|
||||
}
|
||||
surfaceContainer = null
|
||||
surfaceView = null
|
||||
pendingSurface = null
|
||||
isInitialized = false
|
||||
|
||||
// Run native destroy on background thread to avoid ANR —
|
||||
// MPVLib.destroy() blocks on pthread_cond_wait while mpv's
|
||||
// internal threads (lua, demux, vo) shut down.
|
||||
// The completion callback is posted to the main thread so the
|
||||
// caller (MpvPlayerPlugin) can defer result.success() until
|
||||
// native resources are fully released, preventing a new mpv
|
||||
// instance from being created while the old one still holds memory.
|
||||
if (nativeReady) {
|
||||
Thread {
|
||||
synchronized(mpvLock) {
|
||||
@@ -531,7 +538,10 @@ class MpvPlayerCore(private val activity: Activity) :
|
||||
}
|
||||
}
|
||||
Log.d(TAG, "Disposed (native)")
|
||||
onComplete?.let { Handler(Looper.getMainLooper()).post(it) }
|
||||
}.start()
|
||||
} else {
|
||||
onComplete?.invoke()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,10 +142,14 @@ class MpvPlayerPlugin : FlutterPlugin, MethodChannel.MethodCallHandler,
|
||||
|
||||
private fun handleDispose(result: MethodChannel.Result) {
|
||||
activity?.runOnUiThread {
|
||||
playerCore?.dispose()
|
||||
playerCore = null
|
||||
Log.d(TAG, "Disposed")
|
||||
result.success(null)
|
||||
playerCore?.dispose {
|
||||
playerCore = null
|
||||
Log.d(TAG, "Disposed")
|
||||
result.success(null)
|
||||
} ?: run {
|
||||
playerCore = null
|
||||
result.success(null)
|
||||
}
|
||||
} ?: result.success(null)
|
||||
}
|
||||
|
||||
|
||||
@@ -22,17 +22,17 @@ platform :android do
|
||||
debug_info_dir = "./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")
|
||||
# sh("cd #{ENV['PWD']}/.. && flutter build appbundle --dart-define=ENABLE_IN_APP_REVIEW=true --obfuscate --split-debug-info=#{debug_info_dir}/aab")
|
||||
|
||||
upload_to_play_store(
|
||||
track: "production",
|
||||
release_status: "completed",
|
||||
version_code: version_code,
|
||||
aab: "../build/app/outputs/bundle/release/app-release.aab"
|
||||
)
|
||||
# upload_to_play_store(
|
||||
# track: "production",
|
||||
# release_status: "completed",
|
||||
# version_code: version_code,
|
||||
# aab: "../build/app/outputs/bundle/release/app-release.aab"
|
||||
# )
|
||||
|
||||
# Build universal APK for Amazon Appstore (doesn't accept AABs, doesn't auto-target by ABI)
|
||||
sh("cd #{ENV['PWD']}/.. && flutter build apk --release --target-platform android-arm,android-arm64 --obfuscate --split-debug-info=#{debug_info_dir}/apk")
|
||||
# Build universal APK for Amazon Appstore (doesn't accept AABs, excludes x86 via env var)
|
||||
sh("cd #{ENV['PWD']}/.. && AMAZON=1 flutter build apk --release --obfuscate --split-debug-info=#{debug_info_dir}/apk")
|
||||
|
||||
upload_to_amazon_appstore(
|
||||
apk_paths: [
|
||||
|
||||
@@ -66,6 +66,11 @@ PODS:
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- PromisesObjC (2.4.0)
|
||||
- Sentry/HybridSDK (8.46.0)
|
||||
- sentry_flutter (8.14.2):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- Sentry/HybridSDK (= 8.46.0)
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
@@ -117,6 +122,7 @@ DEPENDENCIES:
|
||||
- os_media_controls (from `.symlinks/plugins/os_media_controls/ios`)
|
||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`)
|
||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
|
||||
- sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/darwin`)
|
||||
@@ -138,6 +144,7 @@ SPEC REPOS:
|
||||
- MLKitVision
|
||||
- nanopb
|
||||
- PromisesObjC
|
||||
- Sentry
|
||||
- sqlite3
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
@@ -161,6 +168,8 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||
path_provider_foundation:
|
||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||
sentry_flutter:
|
||||
:path: ".symlinks/plugins/sentry_flutter/ios"
|
||||
shared_preferences_foundation:
|
||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||
sqflite_darwin:
|
||||
@@ -198,6 +207,8 @@ SPEC CHECKSUMS:
|
||||
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
||||
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
|
||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||
Sentry: da60d980b197a46db0b35ea12cb8f39af48d8854
|
||||
sentry_flutter: 27892878729f42701297c628eb90e7c6529f3684
|
||||
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
|
||||
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||
sqlite3: 8d708bc63e9f4ce48f0ad9d6269e478c5ced1d9b
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
50DEEA8E23D1B433DE5341D6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2C12D873DE8572579684A82C /* Pods_Runner.framework */; };
|
||||
6A48DFB02EA70C7100C1F7CD /* plezy.icon in Resources */ = {isa = PBXBuildFile; fileRef = 6A48DFAF2EA70C7100C1F7CD /* plezy.icon */; };
|
||||
6A8A46212EDB320D0057B88C /* MPVKit-GPL in Frameworks */ = {isa = PBXBuildFile; productRef = 6A8A46202EDB320D0057B88C /* MPVKit-GPL */; };
|
||||
6A8A46212EDB320D0057B88C /* MPVKit in Frameworks */ = {isa = PBXBuildFile; productRef = 6A8A46202EDB320D0057B88C /* MPVKit */; };
|
||||
6A8A46252EDB370C0057B88C /* MpvPlayerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A8A46232EDB370C0057B88C /* MpvPlayerPlugin.swift */; };
|
||||
6A8A46262EDB370C0057B88C /* MpvPlayerCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A8A46222EDB370C0057B88C /* MpvPlayerCore.swift */; };
|
||||
92F969587D0E464D999910F5 /* MpvPipController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92F969587D0E464D999910F4 /* MpvPipController.swift */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
@@ -57,6 +58,7 @@
|
||||
6A48DFAF2EA70C7100C1F7CD /* plezy.icon */ = {isa = PBXFileReference; lastKnownFileType = folder.iconcomposer.icon; path = plezy.icon; sourceTree = "<group>"; };
|
||||
6A8A46222EDB370C0057B88C /* MpvPlayerCore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MpvPlayerCore.swift; sourceTree = "<group>"; };
|
||||
6A8A46232EDB370C0057B88C /* MpvPlayerPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MpvPlayerPlugin.swift; sourceTree = "<group>"; };
|
||||
92F969587D0E464D999910F4 /* MpvPipController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MpvPipController.swift; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
@@ -86,7 +88,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
50DEEA8E23D1B433DE5341D6 /* Pods_Runner.framework in Frameworks */,
|
||||
6A8A46212EDB320D0057B88C /* MPVKit-GPL in Frameworks */,
|
||||
6A8A46212EDB320D0057B88C /* MPVKit in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -115,6 +117,7 @@
|
||||
children = (
|
||||
6A8A46222EDB370C0057B88C /* MpvPlayerCore.swift */,
|
||||
6A8A46232EDB370C0057B88C /* MpvPlayerPlugin.swift */,
|
||||
92F969587D0E464D999910F4 /* MpvPipController.swift */,
|
||||
);
|
||||
path = MpvPlayer;
|
||||
sourceTree = "<group>";
|
||||
@@ -415,6 +418,7 @@
|
||||
files = (
|
||||
6A8A46252EDB370C0057B88C /* MpvPlayerPlugin.swift in Sources */,
|
||||
6A8A46262EDB370C0057B88C /* MpvPlayerCore.swift in Sources */,
|
||||
92F969587D0E464D999910F5 /* MpvPipController.swift in Sources */,
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
@@ -783,16 +787,16 @@
|
||||
repositoryURL = "https://github.com/edde746/MPVKit";
|
||||
requirement = {
|
||||
kind = revision;
|
||||
revision = 2e887368b44ce1dc9e1649e7757ec62c2564e792;
|
||||
revision = b2179eec26c6ceda339e6c6b512e457341768761;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
6A8A46202EDB320D0057B88C /* MPVKit-GPL */ = {
|
||||
6A8A46202EDB320D0057B88C /* MPVKit */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 6A8A461F2EDB320D0057B88C /* XCRemoteSwiftPackageReference "MPVKit" */;
|
||||
productName = "MPVKit-GPL";
|
||||
productName = "MPVKit";
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/edde746/MPVKit",
|
||||
"state" : {
|
||||
"revision" : "2e887368b44ce1dc9e1649e7757ec62c2564e792"
|
||||
"revision" : "b2179eec26c6ceda339e6c6b512e457341768761"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/edde746/MPVKit",
|
||||
"state" : {
|
||||
"revision" : "2e887368b44ce1dc9e1649e7757ec62c2564e792"
|
||||
"revision" : "b2179eec26c6ceda339e6c6b512e457341768761"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -3,18 +3,11 @@ import UIKit
|
||||
import AVFoundation
|
||||
|
||||
@main
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
|
||||
// Register MPV player plugin
|
||||
if let registrar = self.registrar(forPlugin: "MpvPlayerPlugin") {
|
||||
MpvPlayerPlugin.register(with: registrar)
|
||||
}
|
||||
|
||||
// Configure audio session for media playback
|
||||
do {
|
||||
let session = AVAudioSession.sharedInstance()
|
||||
@@ -28,4 +21,13 @@ import AVFoundation
|
||||
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
|
||||
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
|
||||
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
|
||||
|
||||
// Register MPV player plugin
|
||||
if let registrar = engineBridge.pluginRegistry.registrar(forPlugin: "MpvPlayerPlugin") {
|
||||
MpvPlayerPlugin.register(with: registrar)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
<string>Main</string>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>audio</string>
|
||||
<string>fetch</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
@@ -66,5 +67,26 @@
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIApplicationSceneManifest</key>
|
||||
<dict>
|
||||
<key>UIApplicationSupportsMultipleScenes</key>
|
||||
<false/>
|
||||
<key>UISceneConfigurations</key>
|
||||
<dict>
|
||||
<key>UIWindowSceneSessionRoleApplication</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UISceneClassName</key>
|
||||
<string>UIWindowScene</string>
|
||||
<key>UISceneDelegateClassName</key>
|
||||
<string>FlutterSceneDelegate</string>
|
||||
<key>UISceneConfigurationName</key>
|
||||
<string>flutter</string>
|
||||
<key>UISceneStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -0,0 +1,363 @@
|
||||
import AVKit
|
||||
import UIKit
|
||||
|
||||
/// Delegate to notify the plugin of PiP lifecycle events
|
||||
protocol MpvPipDelegate: AnyObject {
|
||||
/// Called when PiP is about to start (system or app-initiated)
|
||||
func pipWillStart()
|
||||
func pipDidStart()
|
||||
/// Called when PiP stops. `restored` is true if the user pressed maximize (restore UI).
|
||||
func pipDidStop(restored: Bool)
|
||||
func pipDidFailToStart(error: Error?)
|
||||
/// Forward play/pause commands from PiP overlay to mpv
|
||||
func pipSetPlaying(_ playing: Bool)
|
||||
/// Forward skip forward/backward commands from PiP overlay to mpv
|
||||
func pipSkip(byInterval seconds: Double)
|
||||
/// Query whether mpv is currently playing
|
||||
var isPipPlaying: Bool { get }
|
||||
/// Get total duration in seconds
|
||||
var pipDuration: Double { get }
|
||||
}
|
||||
|
||||
/// Encapsulates all iOS Picture-in-Picture logic using AVSampleBufferDisplayLayer.
|
||||
/// Requires iOS 15+ for the ContentSource API; on older versions, `setup()` is a no-op.
|
||||
class MpvPipController: NSObject {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
private var pipController: AVPictureInPictureController?
|
||||
private let sampleBufferLayer = AVSampleBufferDisplayLayer()
|
||||
private var containerView: UIView?
|
||||
weak var delegate: MpvPipDelegate?
|
||||
|
||||
/// Pointer to the sample buffer layer for passing to mpv as `wid`
|
||||
var layerPointer: UnsafeMutableRawPointer {
|
||||
Unmanaged.passUnretained(sampleBufferLayer).toOpaque()
|
||||
}
|
||||
|
||||
// MARK: - Initialization
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
setup()
|
||||
}
|
||||
|
||||
private func setup() {
|
||||
guard #available(iOS 15.0, *) else { return }
|
||||
|
||||
do {
|
||||
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .moviePlayback)
|
||||
try AVAudioSession.sharedInstance().setActive(true)
|
||||
} catch {
|
||||
print("[MpvPipController] Failed to configure audio session: \(error)")
|
||||
}
|
||||
|
||||
// The sample buffer layer must be in a visible view hierarchy for
|
||||
// isPictureInPicturePossible to become true.
|
||||
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
|
||||
let window = windowScene.windows.first(where: { $0.isKeyWindow }) {
|
||||
let view = UIView(frame: window.bounds)
|
||||
view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||
view.clipsToBounds = true
|
||||
view.isUserInteractionEnabled = false
|
||||
sampleBufferLayer.frame = view.bounds
|
||||
view.layer.addSublayer(sampleBufferLayer)
|
||||
window.addSubview(view)
|
||||
containerView = view
|
||||
}
|
||||
|
||||
createPipController()
|
||||
}
|
||||
|
||||
/// Helper that conforms to the iOS 15+ delegate protocols
|
||||
private var delegateHelper: AnyObject?
|
||||
|
||||
private func createPipController() {
|
||||
guard #available(iOS 15.0, *) else { return }
|
||||
let helper = PipDelegateHelper(controller: self)
|
||||
let contentSource = AVPictureInPictureController.ContentSource(
|
||||
sampleBufferDisplayLayer: sampleBufferLayer,
|
||||
playbackDelegate: helper
|
||||
)
|
||||
self.delegateHelper = helper
|
||||
pipController = AVPictureInPictureController(contentSource: contentSource)
|
||||
pipController?.delegate = helper
|
||||
if #available(iOS 14.2, *) {
|
||||
pipController?.canStartPictureInPictureAutomaticallyFromInline = false
|
||||
}
|
||||
}
|
||||
|
||||
/// Enable/disable system auto-PiP (starts PiP automatically on background transition)
|
||||
func setAutoStart(_ enabled: Bool) {
|
||||
guard #available(iOS 14.2, *) else { return }
|
||||
pipController?.canStartPictureInPictureAutomaticallyFromInline = enabled
|
||||
}
|
||||
|
||||
/// Push a black frame to the sample buffer layer so PiP has content
|
||||
/// to display immediately (before vo_pip decodes the first real frame).
|
||||
func pushBlankFrame(width: Int32 = 1920, height: Int32 = 1080) {
|
||||
var pixelBuffer: CVPixelBuffer?
|
||||
let attrs: [String: Any] = [
|
||||
kCVPixelBufferIOSurfacePropertiesKey as String: [:],
|
||||
]
|
||||
let status = CVPixelBufferCreate(
|
||||
kCFAllocatorDefault, Int(width), Int(height),
|
||||
kCVPixelFormatType_32BGRA, attrs as CFDictionary, &pixelBuffer
|
||||
)
|
||||
guard status == kCVReturnSuccess, let pb = pixelBuffer else { return }
|
||||
|
||||
// Fill with black
|
||||
CVPixelBufferLockBaseAddress(pb, [])
|
||||
if let base = CVPixelBufferGetBaseAddress(pb) {
|
||||
memset(base, 0, CVPixelBufferGetDataSize(pb))
|
||||
}
|
||||
CVPixelBufferUnlockBaseAddress(pb, [])
|
||||
|
||||
// Use current timebase time for PTS (if available) so the frame isn't stale
|
||||
let pts: CMTime
|
||||
if let tb = sampleBufferLayer.controlTimebase {
|
||||
pts = CMTimebaseGetTime(tb)
|
||||
} else {
|
||||
pts = CMTime(value: 0, timescale: 30)
|
||||
}
|
||||
|
||||
var timing = CMSampleTimingInfo(
|
||||
duration: CMTime(value: 1, timescale: 30),
|
||||
presentationTimeStamp: pts,
|
||||
decodeTimeStamp: .invalid
|
||||
)
|
||||
|
||||
// Create format description and sample buffer
|
||||
var formatDesc: CMVideoFormatDescription?
|
||||
CMVideoFormatDescriptionCreateForImageBuffer(
|
||||
allocator: kCFAllocatorDefault,
|
||||
imageBuffer: pb,
|
||||
formatDescriptionOut: &formatDesc
|
||||
)
|
||||
guard let fmt = formatDesc else { return }
|
||||
|
||||
var sampleBuffer: CMSampleBuffer?
|
||||
CMSampleBufferCreateReadyWithImageBuffer(
|
||||
allocator: kCFAllocatorDefault,
|
||||
imageBuffer: pb,
|
||||
formatDescription: fmt,
|
||||
sampleTiming: &timing,
|
||||
sampleBufferOut: &sampleBuffer
|
||||
)
|
||||
guard let sb = sampleBuffer else { return }
|
||||
|
||||
// Set DisplayImmediately so it shows regardless of timebase timing
|
||||
if let attachments = CMSampleBufferGetSampleAttachmentsArray(sb, createIfNecessary: true) as? [NSMutableDictionary],
|
||||
let dict = attachments.first {
|
||||
dict[kCMSampleAttachmentKey_DisplayImmediately] = true
|
||||
}
|
||||
|
||||
sampleBufferLayer.enqueue(sb)
|
||||
}
|
||||
|
||||
/// Sync the layer's controlTimebase with the actual playback position.
|
||||
/// This makes the PiP progress bar show the correct time.
|
||||
func syncTimebase(currentTime: Double, isPlaying: Bool) {
|
||||
guard let timebase = sampleBufferLayer.controlTimebase else { return }
|
||||
let cmTime = CMTime(seconds: currentTime, preferredTimescale: 1000)
|
||||
CMTimebaseSetTime(timebase, time: cmTime)
|
||||
CMTimebaseSetRate(timebase, rate: isPlaying ? 1.0 : 0.0)
|
||||
}
|
||||
|
||||
/// Ensure the layer has a timebase and blank frame so the system considers
|
||||
/// PiP possible (required for canStartPictureInPictureAutomaticallyFromInline).
|
||||
func warmLayer(currentTime: Double, isPlaying: Bool) {
|
||||
if sampleBufferLayer.controlTimebase == nil {
|
||||
var timebase: CMTimebase?
|
||||
CMTimebaseCreateWithSourceClock(
|
||||
allocator: kCFAllocatorDefault,
|
||||
sourceClock: CMClockGetHostTimeClock(),
|
||||
timebaseOut: &timebase
|
||||
)
|
||||
if let tb = timebase {
|
||||
sampleBufferLayer.controlTimebase = tb
|
||||
}
|
||||
}
|
||||
syncTimebase(currentTime: currentTime, isPlaying: isPlaying)
|
||||
pushBlankFrame()
|
||||
}
|
||||
|
||||
// MARK: - Public API
|
||||
|
||||
static var isSupported: Bool {
|
||||
guard #available(iOS 15.0, *) else { return false }
|
||||
return AVPictureInPictureController.isPictureInPictureSupported()
|
||||
}
|
||||
|
||||
/// Start PiP. When `waitForFrame` is false (auto-PiP), skips the frame
|
||||
/// readiness check since the scene is about to deactivate.
|
||||
func startPip(waitForFrame: Bool = true, completion: @escaping (Bool) -> Void) {
|
||||
guard let pipController = pipController else {
|
||||
completion(false)
|
||||
return
|
||||
}
|
||||
|
||||
var attempts = 0
|
||||
func tryStart() {
|
||||
let possible = pipController.isPictureInPicturePossible
|
||||
let hasTimebase = sampleBufferLayer.controlTimebase != nil
|
||||
|
||||
let hasFrame: Bool
|
||||
if !waitForFrame {
|
||||
hasFrame = true // Skip frame check for auto-PiP
|
||||
} else if #available(iOS 17.4, *) {
|
||||
hasFrame = sampleBufferLayer.isReadyForDisplay
|
||||
} else {
|
||||
hasFrame = true
|
||||
}
|
||||
|
||||
if possible && hasTimebase && hasFrame {
|
||||
print("[MpvPipController] vo_pip ready after \(attempts) retries, starting PiP")
|
||||
pipController.startPictureInPicture()
|
||||
completion(true)
|
||||
} else if attempts < 40 {
|
||||
attempts += 1
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) { tryStart() }
|
||||
} else {
|
||||
print("[MpvPipController] PiP not ready after \(attempts) retries (possible=\(possible), timebase=\(hasTimebase))")
|
||||
completion(false)
|
||||
}
|
||||
}
|
||||
tryStart()
|
||||
}
|
||||
|
||||
func stopPip() {
|
||||
pipController?.stopPictureInPicture()
|
||||
}
|
||||
|
||||
/// Invalidate the playback state so PiP updates its UI (play/pause button)
|
||||
func invalidatePlaybackState() {
|
||||
pipController?.invalidatePlaybackState()
|
||||
}
|
||||
|
||||
/// Fully tear down PiP — removes the container view from the window and
|
||||
/// destroys the AVPictureInPictureController so the system can no longer
|
||||
/// trigger auto-PiP after the player is disposed.
|
||||
func teardown() {
|
||||
pipController?.stopPictureInPicture()
|
||||
if #available(iOS 14.2, *) {
|
||||
pipController?.canStartPictureInPictureAutomaticallyFromInline = false
|
||||
}
|
||||
pipController = nil
|
||||
delegateHelper = nil
|
||||
sampleBufferLayer.removeFromSuperlayer()
|
||||
containerView?.removeFromSuperview()
|
||||
containerView = nil
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - PiP Delegate Helper (iOS 15+)
|
||||
|
||||
/// Separate class conforming to AVPictureInPictureControllerDelegate and
|
||||
/// AVPictureInPictureSampleBufferPlaybackDelegate since these require iOS 15+
|
||||
/// availability for the ContentSource-based delegate methods.
|
||||
@available(iOS 15.0, *)
|
||||
private class PipDelegateHelper: NSObject, AVPictureInPictureControllerDelegate,
|
||||
AVPictureInPictureSampleBufferPlaybackDelegate
|
||||
{
|
||||
weak var controller: MpvPipController?
|
||||
private var isRestoring = false
|
||||
|
||||
init(controller: MpvPipController) {
|
||||
self.controller = controller
|
||||
super.init()
|
||||
}
|
||||
|
||||
// MARK: - AVPictureInPictureControllerDelegate
|
||||
|
||||
func pictureInPictureControllerWillStartPictureInPicture(
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
) {
|
||||
print("[MpvPipController] PiP will start")
|
||||
controller?.delegate?.pipWillStart()
|
||||
}
|
||||
|
||||
func pictureInPictureControllerDidStartPictureInPicture(
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
) {
|
||||
print("[MpvPipController] PiP did start")
|
||||
controller?.delegate?.pipDidStart()
|
||||
}
|
||||
|
||||
func pictureInPictureControllerDidStopPictureInPicture(
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
) {
|
||||
let restored = isRestoring
|
||||
isRestoring = false
|
||||
print("[MpvPipController] PiP did stop (restored: \(restored))")
|
||||
controller?.delegate?.pipDidStop(restored: restored)
|
||||
}
|
||||
|
||||
func pictureInPictureController(
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
failedToStartPictureInPictureWithError error: Error
|
||||
) {
|
||||
print("[MpvPipController] PiP failed to start: \(error)")
|
||||
controller?.delegate?.pipDidFailToStart(error: error)
|
||||
}
|
||||
|
||||
func pictureInPictureController(
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
restoreUserInterfaceForPictureInPictureStopWithCompletionHandler completionHandler: @escaping (Bool) -> Void
|
||||
) {
|
||||
print("[MpvPipController] PiP restore user interface")
|
||||
isRestoring = true
|
||||
completionHandler(true)
|
||||
}
|
||||
|
||||
func pictureInPictureControllerWillStopPictureInPicture(
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
) {
|
||||
print("[MpvPipController] PiP will stop")
|
||||
}
|
||||
|
||||
// MARK: - AVPictureInPictureSampleBufferPlaybackDelegate
|
||||
|
||||
func pictureInPictureController(
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
setPlaying playing: Bool
|
||||
) {
|
||||
print("[MpvPipController] PiP setPlaying: \(playing)")
|
||||
controller?.delegate?.pipSetPlaying(playing)
|
||||
}
|
||||
|
||||
func pictureInPictureControllerTimeRangeForPlayback(
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
) -> CMTimeRange {
|
||||
let duration = controller?.delegate?.pipDuration ?? 0
|
||||
if duration > 0 {
|
||||
return CMTimeRange(
|
||||
start: .zero,
|
||||
duration: CMTime(seconds: duration, preferredTimescale: 1000)
|
||||
)
|
||||
}
|
||||
return CMTimeRange(start: .zero, duration: CMTime(seconds: 1, preferredTimescale: 1))
|
||||
}
|
||||
|
||||
func pictureInPictureControllerIsPlaybackPaused(
|
||||
_ pictureInPictureController: AVPictureInPictureController
|
||||
) -> Bool {
|
||||
return !(controller?.delegate?.isPipPlaying ?? false)
|
||||
}
|
||||
|
||||
func pictureInPictureController(
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
didTransitionToRenderSize newRenderSize: CMVideoDimensions
|
||||
) {}
|
||||
|
||||
func pictureInPictureController(
|
||||
_ pictureInPictureController: AVPictureInPictureController,
|
||||
skipByInterval skipInterval: CMTime,
|
||||
completion completionHandler: @escaping () -> Void
|
||||
) {
|
||||
let seconds = CMTimeGetSeconds(skipInterval)
|
||||
print("[MpvPipController] PiP skip by \(seconds)s")
|
||||
controller?.delegate?.pipSkip(byInterval: seconds)
|
||||
completionHandler()
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,10 @@ class MpvPlayerCore: NSObject {
|
||||
private(set) var isInitialized = false
|
||||
private var isDisposing = false // Flag to prevent race conditions during disposal
|
||||
|
||||
// PiP state
|
||||
var isPipActive = false
|
||||
var isPipStarting = false // VO switched for PiP, waiting for first frame
|
||||
|
||||
// HDR settings
|
||||
private var hdrEnabled = true // User preference for HDR
|
||||
private var lastSigPeak: Double = 0.0 // Last known sig-peak for re-evaluation
|
||||
@@ -90,9 +94,6 @@ class MpvPlayerCore: NSObject {
|
||||
// Add container view to window (behind Flutter's root view controller)
|
||||
window.insertSubview(container, at: 0)
|
||||
|
||||
print(
|
||||
"[MpvPlayerCore] Metal layer added to window via container view, frame: \(layer.frame)")
|
||||
|
||||
// Initialize MPV with this Metal layer
|
||||
guard setupMpv() else {
|
||||
print("[MpvPlayerCore] Failed to setup MPV")
|
||||
@@ -161,7 +162,6 @@ class MpvPlayerCore: NSObject {
|
||||
// Observe video-params/sig-peak for HDR detection
|
||||
mpv_observe_property(mpv, 0, "video-params/sig-peak", MPV_FORMAT_DOUBLE)
|
||||
|
||||
print("[MpvPlayerCore] MPV initialized successfully")
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -183,6 +183,10 @@ class MpvPlayerCore: NSObject {
|
||||
}
|
||||
|
||||
@objc private func enterBackground() {
|
||||
if isPipActive || isPipStarting {
|
||||
print("[MpvPlayerCore] Entering background - PiP active/starting, keeping video")
|
||||
return
|
||||
}
|
||||
// Disable video output to fix black screen when returning from background
|
||||
print("[MpvPlayerCore] Entering background - disabling video")
|
||||
if mpv != nil {
|
||||
@@ -191,6 +195,11 @@ class MpvPlayerCore: NSObject {
|
||||
}
|
||||
|
||||
@objc private func enterForeground() {
|
||||
// Skip if PiP is active - video is already enabled
|
||||
if isPipActive {
|
||||
print("[MpvPlayerCore] Entering foreground - PiP active, skipping vid restore")
|
||||
return
|
||||
}
|
||||
// Re-enable video output
|
||||
print("[MpvPlayerCore] Entering foreground - enabling video")
|
||||
if mpv != nil {
|
||||
@@ -305,6 +314,98 @@ class MpvPlayerCore: NSObject {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - PiP VO Switching
|
||||
|
||||
/// Switch from gpu-next to vo_pip for PiP rendering.
|
||||
/// vo_pip feeds VideoToolbox CVPixelBuffers to an AVSampleBufferDisplayLayer
|
||||
/// which is required by AVPictureInPictureController.
|
||||
///
|
||||
/// Strategy: disable the video track (`vid=no`) to tear down the active VO,
|
||||
/// then set `wid` and `vo` while no VO is running, then re-enable video.
|
||||
/// This avoids the crash where gpu-next calls `drawableSize` on an
|
||||
/// AVSampleBufferDisplayLayer, and ensures the new VO reads `wid` at init.
|
||||
func switchToPipVO(layerPtr: UnsafeMutableRawPointer) -> Bool {
|
||||
guard let mpv = mpv else { return false }
|
||||
|
||||
print("[MpvPlayerCore] Switching to pip VO for PiP")
|
||||
|
||||
// Detach the Metal layer from the view hierarchy on the main thread BEFORE
|
||||
// vid=no, so the 'vo' thread VO uninit has no UIKit work to do (avoids
|
||||
// "layout engine from background thread" crash).
|
||||
metalLayer?.removeFromSuperlayer()
|
||||
|
||||
// 1. Disable video track — tears down the current VO completely
|
||||
mpv_set_property_string(mpv, "vid", "no")
|
||||
|
||||
// 2. Point wid at the PiP sample-buffer layer (safe — no active VO)
|
||||
var ptr = Int64(Int(bitPattern: layerPtr))
|
||||
mpv_set_property(mpv, "wid", MPV_FORMAT_INT64, &ptr)
|
||||
|
||||
// 3. Set VO to pip (stored, not yet created)
|
||||
mpv_set_property_string(mpv, "vo", "pip")
|
||||
|
||||
// 4. Re-enable video — creates pip VO with our layer as wid
|
||||
mpv_set_property_string(mpv, "vid", "auto")
|
||||
|
||||
print("[MpvPlayerCore] Switched to pip VO successfully")
|
||||
return true
|
||||
}
|
||||
|
||||
/// Switch back from vo_pip to gpu-next VO for normal rendering.
|
||||
/// Same strategy: vid=no → reconfigure → vid=auto.
|
||||
func switchToGpuNextVO() -> Bool {
|
||||
guard let mpv = mpv, let metalLayer = metalLayer else { return false }
|
||||
|
||||
print("[MpvPlayerCore] Switching back to gpu-next VO")
|
||||
|
||||
// 1. Disable video track — tears down pip VO
|
||||
mpv_set_property_string(mpv, "vid", "no")
|
||||
|
||||
// 2. Point wid back at the Metal layer (safe — no active VO)
|
||||
var layer = metalLayer
|
||||
mpv_set_property(mpv, "wid", MPV_FORMAT_INT64, &layer)
|
||||
|
||||
// 3. Restore gpu-next + Vulkan/MoltenVK settings (read at VO creation)
|
||||
mpv_set_property_string(mpv, "gpu-api", "vulkan")
|
||||
mpv_set_property_string(mpv, "gpu-context", "moltenvk")
|
||||
mpv_set_property_string(mpv, "vo", "gpu-next")
|
||||
|
||||
// 4. Re-enable video — creates gpu-next VO with Metal layer as wid
|
||||
mpv_set_property_string(mpv, "vid", "auto")
|
||||
|
||||
// Re-attach the Metal layer to the view hierarchy (was detached in switchToPipVO)
|
||||
if metalLayer.superlayer == nil, let container = containerView {
|
||||
container.layer.addSublayer(metalLayer)
|
||||
}
|
||||
|
||||
print("[MpvPlayerCore] Switched back to gpu-next VO successfully")
|
||||
return true
|
||||
}
|
||||
|
||||
/// Whether mpv is currently paused
|
||||
var isPaused: Bool {
|
||||
guard let mpv = mpv else { return true }
|
||||
var flag: Int32 = 0
|
||||
mpv_get_property(mpv, "pause", MPV_FORMAT_FLAG, &flag)
|
||||
return flag != 0
|
||||
}
|
||||
|
||||
/// Current playback duration in seconds
|
||||
var duration: Double {
|
||||
guard let mpv = mpv else { return 0 }
|
||||
var value: Double = 0
|
||||
mpv_get_property(mpv, "duration", MPV_FORMAT_DOUBLE, &value)
|
||||
return value
|
||||
}
|
||||
|
||||
/// Current playback time in seconds
|
||||
var timePos: Double {
|
||||
guard let mpv = mpv else { return 0 }
|
||||
var value: Double = 0
|
||||
mpv_get_property(mpv, "time-pos", MPV_FORMAT_DOUBLE, &value)
|
||||
return value
|
||||
}
|
||||
|
||||
// MARK: - Visibility
|
||||
|
||||
func setVisible(_ visible: Bool) {
|
||||
@@ -317,7 +418,6 @@ class MpvPlayerCore: NSObject {
|
||||
}
|
||||
|
||||
container.isHidden = !visible
|
||||
print("[MpvPlayerCore] setVisible(\(visible))")
|
||||
}
|
||||
|
||||
func updateFrame(_ frame: CGRect? = nil) {
|
||||
@@ -337,8 +437,6 @@ class MpvPlayerCore: NSObject {
|
||||
width: metalLayer.frame.width * scale,
|
||||
height: metalLayer.frame.height * scale
|
||||
)
|
||||
|
||||
print("[MpvPlayerCore] updateFrame: \(container.frame)")
|
||||
}
|
||||
|
||||
// MARK: - Private Helpers
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
import AVKit
|
||||
|
||||
/// Flutter plugin that bridges MPV player to Dart via method and event channels
|
||||
class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerDelegate {
|
||||
@@ -11,41 +12,47 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
private weak var registrar: FlutterPluginRegistrar?
|
||||
private var nameToId: [String: Int] = [:]
|
||||
|
||||
// PiP
|
||||
private var pipController: MpvPipController?
|
||||
private var pipChannel: FlutterMethodChannel?
|
||||
private var autoPipEnabled = false
|
||||
private var isManualPipRequest = false
|
||||
private var pipTimebaseSyncTimer: Timer?
|
||||
|
||||
// MARK: - FlutterPlugin Registration
|
||||
|
||||
static func register(with registrar: FlutterPluginRegistrar) {
|
||||
// Method channel for commands
|
||||
let methodChannel = FlutterMethodChannel(
|
||||
name: "com.plezy/mpv_player",
|
||||
binaryMessenger: registrar.messenger()
|
||||
)
|
||||
|
||||
// Event channel for state updates
|
||||
let eventChannel = FlutterEventChannel(
|
||||
name: "com.plezy/mpv_player/events",
|
||||
binaryMessenger: registrar.messenger()
|
||||
)
|
||||
let pipChannel = FlutterMethodChannel(
|
||||
name: "app.plezy/pip",
|
||||
binaryMessenger: registrar.messenger()
|
||||
)
|
||||
|
||||
let instance = MpvPlayerPlugin()
|
||||
instance.registrar = registrar
|
||||
instance.pipChannel = pipChannel
|
||||
|
||||
registrar.addMethodCallDelegate(instance, channel: methodChannel)
|
||||
eventChannel.setStreamHandler(instance)
|
||||
|
||||
print("[MpvPlayerPlugin] Registered with Flutter")
|
||||
pipChannel.setMethodCallHandler(instance.handlePipCall)
|
||||
}
|
||||
|
||||
// MARK: - FlutterStreamHandler
|
||||
|
||||
func onListen(withArguments arguments: Any?, eventSink events: @escaping FlutterEventSink) -> FlutterError? {
|
||||
self.eventSink = events
|
||||
print("[MpvPlayerPlugin] Event stream connected")
|
||||
return nil
|
||||
}
|
||||
|
||||
func onCancel(withArguments arguments: Any?) -> FlutterError? {
|
||||
self.eventSink = nil
|
||||
print("[MpvPlayerPlugin] Event stream disconnected")
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -55,39 +62,149 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
switch call.method {
|
||||
case "initialize":
|
||||
handleInitialize(result: result)
|
||||
|
||||
case "dispose":
|
||||
handleDispose(result: result)
|
||||
|
||||
case "setProperty":
|
||||
handleSetProperty(call: call, result: result)
|
||||
|
||||
case "getProperty":
|
||||
handleGetProperty(call: call, result: result)
|
||||
|
||||
case "observeProperty":
|
||||
handleObserveProperty(call: call, result: result)
|
||||
|
||||
case "command":
|
||||
handleCommand(call: call, result: result)
|
||||
|
||||
case "setVisible":
|
||||
handleSetVisible(call: call, result: result)
|
||||
|
||||
case "isInitialized":
|
||||
result(playerCore?.isInitialized ?? false)
|
||||
|
||||
case "updateFrame":
|
||||
handleUpdateFrame(result: result)
|
||||
|
||||
case "setLogLevel":
|
||||
handleSetLogLevel(call: call, result: result)
|
||||
|
||||
default:
|
||||
result(FlutterMethodNotImplemented)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - PiP
|
||||
|
||||
private func ensurePipController() -> MpvPipController {
|
||||
if let existing = pipController { return existing }
|
||||
let controller = MpvPipController()
|
||||
controller.delegate = self
|
||||
pipController = controller
|
||||
return controller
|
||||
}
|
||||
|
||||
private func handlePipCall(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
switch call.method {
|
||||
case "isSupported":
|
||||
result(MpvPipController.isSupported)
|
||||
case "enter":
|
||||
enterPip(manual: true, result: result)
|
||||
case "setAutoPipReady":
|
||||
if let args = call.arguments as? [String: Any], let ready = args["ready"] as? Bool {
|
||||
autoPipEnabled = ready
|
||||
if ready {
|
||||
let pip = ensurePipController()
|
||||
pip.setAutoStart(true)
|
||||
// Warm the layer so the system considers PiP possible
|
||||
if let pc = playerCore {
|
||||
pip.warmLayer(currentTime: pc.timePos, isPlaying: !pc.isPaused)
|
||||
}
|
||||
NotificationCenter.default.removeObserver(self, name: UIScene.didActivateNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(sceneDidActivate), name: UIScene.didActivateNotification, object: nil)
|
||||
} else {
|
||||
pipController?.setAutoStart(false)
|
||||
NotificationCenter.default.removeObserver(self, name: UIScene.didActivateNotification, object: nil)
|
||||
}
|
||||
}
|
||||
result(nil)
|
||||
default:
|
||||
result(FlutterMethodNotImplemented)
|
||||
}
|
||||
}
|
||||
|
||||
/// Switch to PiP VO and prepare the sample buffer layer for PiP display.
|
||||
/// Returns the MpvPipController on success, nil on failure.
|
||||
@discardableResult
|
||||
private func switchToPipAndPrepare() -> MpvPipController? {
|
||||
guard let playerCore = playerCore else { return nil }
|
||||
let pip = ensurePipController()
|
||||
guard playerCore.switchToPipVO(layerPtr: pip.layerPointer) else { return nil }
|
||||
playerCore.isPipStarting = true
|
||||
pip.pushBlankFrame()
|
||||
pip.syncTimebase(currentTime: playerCore.timePos, isPlaying: !playerCore.isPaused)
|
||||
pip.invalidatePlaybackState()
|
||||
return pip
|
||||
}
|
||||
|
||||
/// Manual PiP entry (button press). Auto-PiP is handled by the system via
|
||||
/// canStartPictureInPictureAutomaticallyFromInline + pipWillStart delegate.
|
||||
private func enterPip(manual: Bool, result: FlutterResult? = nil) {
|
||||
guard MpvPipController.isSupported else {
|
||||
result?(["success": false, "errorCode": "ios_version", "errorMessage": "Requires iOS 15.0+"])
|
||||
return
|
||||
}
|
||||
guard playerCore != nil else {
|
||||
result?(["success": false, "errorCode": "failed", "errorMessage": "Player not initialized"])
|
||||
return
|
||||
}
|
||||
guard let pip = switchToPipAndPrepare() else {
|
||||
result?(["success": false, "errorCode": "vo_switch_failed", "errorMessage": "Failed to switch VO"])
|
||||
return
|
||||
}
|
||||
|
||||
isManualPipRequest = manual
|
||||
pip.startPip(waitForFrame: manual) { [weak self] started in
|
||||
if started {
|
||||
result?(["success": true])
|
||||
} else {
|
||||
self?.cleanupPip(notify: false)
|
||||
result?(["success": false, "errorCode": "failed", "errorMessage": "PiP failed to start"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Unified cleanup for all PiP exit paths
|
||||
private func cleanupPip(notify: Bool, pause: Bool = false) {
|
||||
playerCore?.isPipStarting = false
|
||||
playerCore?.isPipActive = false
|
||||
isManualPipRequest = false
|
||||
stopPipTimebaseSync()
|
||||
_ = playerCore?.switchToGpuNextVO()
|
||||
if pause { playerCore?.setProperty("pause", value: "yes") }
|
||||
if notify { pipChannel?.invokeMethod("onPipChanged", arguments: false) }
|
||||
}
|
||||
|
||||
/// Scene became active — re-warm the layer so auto-PiP stays possible
|
||||
@objc private func sceneDidActivate() {
|
||||
if autoPipEnabled, let pip = pipController, let pc = playerCore, !pc.isPipActive {
|
||||
pip.warmLayer(currentTime: pc.timePos, isPlaying: !pc.isPaused)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Timebase Sync
|
||||
|
||||
private func syncPipTimebase() {
|
||||
guard let playerCore = playerCore, let pipController = pipController else { return }
|
||||
pipController.syncTimebase(
|
||||
currentTime: playerCore.timePos,
|
||||
isPlaying: !playerCore.isPaused
|
||||
)
|
||||
}
|
||||
|
||||
private func startPipTimebaseSync() {
|
||||
stopPipTimebaseSync()
|
||||
pipTimebaseSyncTimer = Timer.scheduledTimer(withTimeInterval: 5.0, repeats: true) { [weak self] _ in
|
||||
self?.syncPipTimebase()
|
||||
}
|
||||
}
|
||||
|
||||
private func stopPipTimebaseSync() {
|
||||
pipTimebaseSyncTimer?.invalidate()
|
||||
pipTimebaseSyncTimer = nil
|
||||
}
|
||||
|
||||
// MARK: - Method Handlers
|
||||
|
||||
private func handleInitialize(result: @escaping FlutterResult) {
|
||||
@@ -97,45 +214,40 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
return
|
||||
}
|
||||
|
||||
// Check if already initialized
|
||||
if self.playerCore?.isInitialized == true {
|
||||
print("[MpvPlayerPlugin] Already initialized")
|
||||
result(true)
|
||||
return
|
||||
}
|
||||
|
||||
// Find the key window
|
||||
guard let window = self.findKeyWindow() else {
|
||||
print("[MpvPlayerPlugin] Failed to find key window")
|
||||
result(FlutterError(code: "NO_WINDOW", message: "Could not find key window", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
// Create and initialize player core
|
||||
let core = MpvPlayerCore()
|
||||
core.delegate = self
|
||||
|
||||
guard core.initialize(in: window) else {
|
||||
print("[MpvPlayerPlugin] Failed to initialize MPV")
|
||||
result(FlutterError(code: "MPV_INIT_FAILED", message: "Failed to initialize MPV", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
self.playerCore = core
|
||||
|
||||
// Start hidden
|
||||
core.setVisible(false)
|
||||
|
||||
print("[MpvPlayerPlugin] Initialized successfully")
|
||||
result(true)
|
||||
}
|
||||
}
|
||||
|
||||
private func handleDispose(result: @escaping FlutterResult) {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.playerCore?.dispose()
|
||||
self?.playerCore = nil
|
||||
print("[MpvPlayerPlugin] Disposed")
|
||||
guard let self = self else { result(nil); return }
|
||||
self.pipController?.teardown()
|
||||
self.pipController = nil
|
||||
self.autoPipEnabled = false
|
||||
NotificationCenter.default.removeObserver(self, name: UIScene.didActivateNotification, object: nil)
|
||||
self.stopPipTimebaseSync()
|
||||
self.playerCore?.dispose()
|
||||
self.playerCore = nil
|
||||
result(nil)
|
||||
}
|
||||
}
|
||||
@@ -149,6 +261,12 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
}
|
||||
|
||||
playerCore?.setProperty(name, value: value)
|
||||
|
||||
if name == "pause" {
|
||||
pipController?.invalidatePlaybackState()
|
||||
if playerCore?.isPipActive == true { syncPipTimebase() }
|
||||
}
|
||||
|
||||
result(nil)
|
||||
}
|
||||
|
||||
@@ -158,9 +276,7 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
result(FlutterError(code: "INVALID_ARGS", message: "Missing 'name' argument", details: nil))
|
||||
return
|
||||
}
|
||||
|
||||
let value = playerCore?.getProperty(name)
|
||||
result(value)
|
||||
result(playerCore?.getProperty(name))
|
||||
}
|
||||
|
||||
private func handleObserveProperty(call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
@@ -184,7 +300,6 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
return
|
||||
}
|
||||
|
||||
// Use async command to prevent UI blocking during network operations
|
||||
playerCore?.commandAsync(commandArgs) { commandResult in
|
||||
switch commandResult {
|
||||
case .success:
|
||||
@@ -204,12 +319,7 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.playerCore?.setVisible(visible)
|
||||
|
||||
// Update frame when becoming visible
|
||||
if visible {
|
||||
self?.playerCore?.updateFrame()
|
||||
}
|
||||
|
||||
if visible { self?.playerCore?.updateFrame() }
|
||||
result(nil)
|
||||
}
|
||||
}
|
||||
@@ -234,21 +344,14 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
// MARK: - MpvPlayerDelegate
|
||||
|
||||
func onPropertyChange(name: String, value: Any?) {
|
||||
guard let eventSink = eventSink else { return }
|
||||
|
||||
if let propId = nameToId[name] {
|
||||
eventSink([propId, value as Any])
|
||||
}
|
||||
guard let eventSink = eventSink, let propId = nameToId[name] else { return }
|
||||
eventSink([propId, value as Any])
|
||||
}
|
||||
|
||||
func onEvent(name: String, data: [String: Any]?) {
|
||||
guard let eventSink = eventSink else { return }
|
||||
|
||||
var event: [String: Any] = ["type": "event", "name": name]
|
||||
if let data = data {
|
||||
event["data"] = data
|
||||
}
|
||||
|
||||
if let data = data { event["data"] = data }
|
||||
eventSink(event)
|
||||
}
|
||||
|
||||
@@ -262,3 +365,58 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
return window
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - MpvPipDelegate
|
||||
|
||||
extension MpvPlayerPlugin: MpvPipDelegate {
|
||||
|
||||
func pipWillStart() {
|
||||
// If PiP was system-initiated (not via our enterPip), switch VO now
|
||||
guard let playerCore = playerCore, !playerCore.isPipStarting else { return }
|
||||
print("[MpvPlayerPlugin] System-initiated PiP detected, switching VO")
|
||||
if switchToPipAndPrepare() == nil {
|
||||
print("[MpvPlayerPlugin] VO switch failed for system-initiated PiP")
|
||||
pipController?.stopPip()
|
||||
}
|
||||
}
|
||||
|
||||
func pipDidStart() {
|
||||
playerCore?.isPipStarting = false
|
||||
playerCore?.isPipActive = true
|
||||
pipChannel?.invokeMethod("onPipChanged", arguments: true)
|
||||
syncPipTimebase()
|
||||
startPipTimebaseSync()
|
||||
|
||||
if isManualPipRequest {
|
||||
isManualPipRequest = false
|
||||
UIControl().sendAction(#selector(URLSessionTask.suspend), to: UIApplication.shared, for: nil)
|
||||
}
|
||||
}
|
||||
|
||||
func pipDidStop(restored: Bool) {
|
||||
cleanupPip(notify: true, pause: !restored)
|
||||
}
|
||||
|
||||
func pipDidFailToStart(error: Error?) {
|
||||
cleanupPip(notify: true)
|
||||
}
|
||||
|
||||
func pipSetPlaying(_ playing: Bool) {
|
||||
playerCore?.setProperty("pause", value: playing ? "no" : "yes")
|
||||
pipController?.invalidatePlaybackState()
|
||||
syncPipTimebase()
|
||||
}
|
||||
|
||||
func pipSkip(byInterval seconds: Double) {
|
||||
guard let playerCore = playerCore else { return }
|
||||
let newTime = max(0, playerCore.timePos + seconds)
|
||||
playerCore.command(["seek", String(newTime), "absolute"])
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self] in
|
||||
self?.syncPipTimebase()
|
||||
self?.pipController?.invalidatePlaybackState()
|
||||
}
|
||||
}
|
||||
|
||||
var isPipPlaying: Bool { !(playerCore?.isPaused ?? true) }
|
||||
var pipDuration: Double { playerCore?.duration ?? 0 }
|
||||
}
|
||||
|
||||
+14
-19
@@ -32,6 +32,7 @@
|
||||
"delete": "Löschen",
|
||||
"shuffle": "Zufall",
|
||||
"addTo": "Hinzufügen zu...",
|
||||
"createNew": "Neu erstellen",
|
||||
"remove": "Entfernen",
|
||||
"paste": "Einfügen",
|
||||
"connect": "Verbinden",
|
||||
@@ -41,9 +42,9 @@
|
||||
"resume": "Fortsetzen",
|
||||
"error": "Fehler",
|
||||
"search": "Suche",
|
||||
"home": "Startseite",
|
||||
"home": "Start",
|
||||
"back": "Zurück",
|
||||
"settings": "Einstellungen",
|
||||
"settings": "Optionen",
|
||||
"mute": "Stumm",
|
||||
"ok": "OK",
|
||||
"loading": "Laden...",
|
||||
@@ -63,7 +64,7 @@
|
||||
"licenses": "Lizenzen",
|
||||
"switchProfile": "Profil wechseln",
|
||||
"subtitleStyling": "Untertitel-Stil",
|
||||
"mpvConfig": "MPV-Konfiguration",
|
||||
"mpvConfig": "mpv.conf",
|
||||
"logs": "Protokolle"
|
||||
},
|
||||
"update": {
|
||||
@@ -127,7 +128,7 @@
|
||||
"playerBackend": "Player-Backend",
|
||||
"exoPlayer": "ExoPlayer (Empfohlen)",
|
||||
"exoPlayerDescription": "Android-nativer Player mit besserer Hardware-Unterstützung",
|
||||
"mpv": "MPV",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "Erweiterter Player mit mehr Funktionen und ASS-Untertitel-Unterstützung",
|
||||
"hardwareDecoding": "Hardware-Decodierung",
|
||||
"hardwareDecodingDescription": "Hardwarebeschleunigung verwenden, sofern verfügbar",
|
||||
@@ -151,6 +152,8 @@
|
||||
"keyboardShortcutsDescription": "Tastenkürzel anpassen",
|
||||
"videoPlayerNavigation": "Videoplayer-Navigation",
|
||||
"videoPlayerNavigationDescription": "Pfeiltasten zur Navigation der Videoplayer-Steuerung verwenden",
|
||||
"crashReporting": "Absturzberichte",
|
||||
"crashReportingDescription": "Absturzberichte senden, um die App zu verbessern",
|
||||
"debugLogging": "Debug-Protokollierung",
|
||||
"debugLoggingDescription": "Detaillierte Protokolle zur Fehleranalyse aktivieren",
|
||||
"viewLogs": "Protokolle anzeigen",
|
||||
@@ -335,6 +338,7 @@
|
||||
"settingsButton": "Videoeinstellungen",
|
||||
"audioTrackButton": "Tonspuren",
|
||||
"subtitlesButton": "Untertitel",
|
||||
"tracksButton": "Audio und Untertitel",
|
||||
"chaptersButton": "Kapitel",
|
||||
"versionsButton": "Videoversionen",
|
||||
"pipButton": "Bild-in-Bild Modus",
|
||||
@@ -349,11 +353,14 @@
|
||||
"timelineSlider": "Video-Zeitleiste",
|
||||
"volumeSlider": "Lautstärkepegel",
|
||||
"endsAt": "Endet um ${time}",
|
||||
"pipActive": "Wiedergabe im Bild-in-Bild-Modus",
|
||||
"pipFailed": "Bild-in-Bild konnte nicht gestartet werden",
|
||||
"pipErrors": {
|
||||
"androidVersion": "Erfordert Android 8.0 oder neuer",
|
||||
"iosVersion": "Erfordert iOS 15.0 oder neuer",
|
||||
"permissionDisabled": "Bild-in-Bild-Berechtigung ist deaktiviert. Aktiviere sie unter Einstellungen > Apps > Plezy > Bild-in-Bild",
|
||||
"notSupported": "Dieses Gerät unterstützt den Bild-in-Bild-Modus nicht",
|
||||
"voSwitchFailed": "Videoausgabe für Bild-in-Bild konnte nicht umgeschaltet werden",
|
||||
"failed": "Bild-in-Bild konnte nicht gestartet werden",
|
||||
"unknown": "Ein Fehler ist aufgetreten: ${error}"
|
||||
},
|
||||
@@ -414,19 +421,10 @@
|
||||
"position": "Position"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "MPV-Konfiguration",
|
||||
"title": "mpv-Konfiguration",
|
||||
"description": "Erweiterte Videoplayer-Einstellungen",
|
||||
"properties": "Eigenschaften",
|
||||
"presets": "Voreinstellungen",
|
||||
"noProperties": "Keine Eigenschaften konfiguriert",
|
||||
"noPresets": "Keine gespeicherten Voreinstellungen",
|
||||
"addProperty": "Eigenschaft hinzufügen",
|
||||
"editProperty": "Eigenschaft bearbeiten",
|
||||
"deleteProperty": "Eigenschaft löschen",
|
||||
"propertyKey": "Eigenschaftsschlüssel",
|
||||
"propertyKeyHint": "z.B. hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "Eigenschaftswert",
|
||||
"propertyValueHint": "z.B. auto, 256000000",
|
||||
"saveAsPreset": "Als Voreinstellung speichern...",
|
||||
"presetName": "Name der Voreinstellung",
|
||||
"presetNameHint": "Namen für diese Voreinstellung eingeben",
|
||||
@@ -436,8 +434,7 @@
|
||||
"presetLoaded": "Voreinstellung geladen",
|
||||
"presetDeleted": "Voreinstellung gelöscht",
|
||||
"confirmDeletePreset": "Möchten Sie diese Voreinstellung wirklich löschen?",
|
||||
"confirmDeleteProperty": "Möchten Sie diese Eigenschaft wirklich löschen?",
|
||||
"entriesCount": "${count} Einträge"
|
||||
"configPlaceholder": "gpu-api=vulkan\nhwdec=auto\n# comment"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "Aktion bestätigen"
|
||||
@@ -559,7 +556,7 @@
|
||||
"licensesCount": "${count} Lizenzen"
|
||||
},
|
||||
"navigation": {
|
||||
"libraries": "Mediatheken",
|
||||
"libraries": "Medien",
|
||||
"downloads": "Downloads",
|
||||
"liveTv": "Live-TV"
|
||||
},
|
||||
@@ -629,7 +626,6 @@
|
||||
"itemAdded": "Zur Wiedergabeliste hinzugefügt",
|
||||
"itemRemoved": "Aus Wiedergabeliste entfernt",
|
||||
"selectPlaylist": "Wiedergabeliste auswählen",
|
||||
"createNewPlaylist": "Neue Wiedergabeliste erstellen",
|
||||
"errorCreating": "Wiedergabeliste konnte nicht erstellt werden",
|
||||
"errorDeleting": "Wiedergabeliste konnte nicht gelöscht werden",
|
||||
"errorLoading": "Wiedergabelisten konnten nicht geladen werden",
|
||||
@@ -650,7 +646,6 @@
|
||||
"deleteFailedWithError": "Sammlung konnte nicht gelöscht werden: ${error}",
|
||||
"failedToLoadItems": "Sammlungselemente konnten nicht geladen werden: ${error}",
|
||||
"selectCollection": "Sammlung auswählen",
|
||||
"createNewCollection": "Neue Sammlung erstellen",
|
||||
"collectionName": "Sammlungsname",
|
||||
"enterCollectionName": "Sammlungsnamen eingeben",
|
||||
"addedToCollection": "Zur Sammlung hinzugefügt",
|
||||
|
||||
+11
-16
@@ -32,6 +32,7 @@
|
||||
"delete": "Delete",
|
||||
"shuffle": "Shuffle",
|
||||
"addTo": "Add to...",
|
||||
"createNew": "Create new",
|
||||
"remove": "Remove",
|
||||
"paste": "Paste",
|
||||
"connect": "Connect",
|
||||
@@ -63,7 +64,7 @@
|
||||
"licenses": "Licenses",
|
||||
"switchProfile": "Switch Profile",
|
||||
"subtitleStyling": "Subtitle Styling",
|
||||
"mpvConfig": "MPV Configuration",
|
||||
"mpvConfig": "mpv.conf",
|
||||
"logs": "Logs"
|
||||
},
|
||||
"update": {
|
||||
@@ -127,7 +128,7 @@
|
||||
"playerBackend": "Player Backend",
|
||||
"exoPlayer": "ExoPlayer (Recommended)",
|
||||
"exoPlayerDescription": "Android native player with better hardware support",
|
||||
"mpv": "MPV",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "Advanced player with more features and ASS subtitle support",
|
||||
"hardwareDecoding": "Hardware Decoding",
|
||||
"hardwareDecodingDescription": "Use hardware acceleration when available",
|
||||
@@ -151,6 +152,8 @@
|
||||
"keyboardShortcutsDescription": "Customize keyboard shortcuts",
|
||||
"videoPlayerNavigation": "Video Player Navigation",
|
||||
"videoPlayerNavigationDescription": "Use arrow keys to navigate video player controls",
|
||||
"crashReporting": "Crash Reporting",
|
||||
"crashReportingDescription": "Send crash reports to help improve the app",
|
||||
"debugLogging": "Debug Logging",
|
||||
"debugLoggingDescription": "Enable detailed logging for troubleshooting",
|
||||
"viewLogs": "View Logs",
|
||||
@@ -335,6 +338,7 @@
|
||||
"settingsButton": "Video settings",
|
||||
"audioTrackButton": "Audio tracks",
|
||||
"subtitlesButton": "Subtitles",
|
||||
"tracksButton": "Audio & Subtitles",
|
||||
"chaptersButton": "Chapters",
|
||||
"versionsButton": "Video versions",
|
||||
"pipButton": "Picture-in-Picture mode",
|
||||
@@ -349,11 +353,14 @@
|
||||
"timelineSlider": "Video timeline",
|
||||
"volumeSlider": "Volume level",
|
||||
"endsAt": "Ends at ${time}",
|
||||
"pipActive": "Playing in Picture-in-Picture",
|
||||
"pipFailed": "Picture-in-picture failed to start",
|
||||
"pipErrors": {
|
||||
"androidVersion": "Requires Android 8.0 or newer",
|
||||
"iosVersion": "Requires iOS 15.0 or newer",
|
||||
"permissionDisabled": "Picture-in-picture permission is disabled. Enable it in Settings > Apps > Plezy > Picture-in-picture",
|
||||
"notSupported": "Device doesn't support picture-in-picture mode",
|
||||
"voSwitchFailed": "Failed to switch video output for picture-in-picture",
|
||||
"failed": "Picture-in-picture failed to start",
|
||||
"unknown": "An error occurred: ${error}"
|
||||
},
|
||||
@@ -414,19 +421,10 @@
|
||||
"position": "Position"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "MPV Configuration",
|
||||
"title": "mpv.conf",
|
||||
"description": "Advanced video player settings",
|
||||
"properties": "Properties",
|
||||
"presets": "Presets",
|
||||
"noProperties": "No properties configured",
|
||||
"noPresets": "No saved presets",
|
||||
"addProperty": "Add Property",
|
||||
"editProperty": "Edit Property",
|
||||
"deleteProperty": "Delete Property",
|
||||
"propertyKey": "Property Key",
|
||||
"propertyKeyHint": "e.g., hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "Property Value",
|
||||
"propertyValueHint": "e.g., auto, 256000000",
|
||||
"saveAsPreset": "Save as Preset...",
|
||||
"presetName": "Preset Name",
|
||||
"presetNameHint": "Enter a name for this preset",
|
||||
@@ -436,8 +434,7 @@
|
||||
"presetLoaded": "Preset loaded",
|
||||
"presetDeleted": "Preset deleted",
|
||||
"confirmDeletePreset": "Are you sure you want to delete this preset?",
|
||||
"confirmDeleteProperty": "Are you sure you want to delete this property?",
|
||||
"entriesCount": "${count} entries"
|
||||
"configPlaceholder": "gpu-api=vulkan\nhwdec=auto\n# comment"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "Confirm Action"
|
||||
@@ -602,7 +599,6 @@
|
||||
"deleteFailedWithError": "Failed to delete collection: ${error}",
|
||||
"failedToLoadItems": "Failed to load collection items: ${error}",
|
||||
"selectCollection": "Select Collection",
|
||||
"createNewCollection": "Create New Collection",
|
||||
"collectionName": "Collection Name",
|
||||
"enterCollectionName": "Enter collection name",
|
||||
"addedToCollection": "Added to collection",
|
||||
@@ -634,7 +630,6 @@
|
||||
"itemAdded": "Added to playlist",
|
||||
"itemRemoved": "Removed from playlist",
|
||||
"selectPlaylist": "Select Playlist",
|
||||
"createNewPlaylist": "Create New Playlist",
|
||||
"errorCreating": "Failed to create playlist",
|
||||
"errorDeleting": "Failed to delete playlist",
|
||||
"errorLoading": "Failed to load playlists",
|
||||
|
||||
+12
-17
@@ -32,6 +32,7 @@
|
||||
"delete": "Eliminar",
|
||||
"shuffle": "Aleatorio",
|
||||
"addTo": "Añadir a...",
|
||||
"createNew": "Crear",
|
||||
"remove": "Eliminar",
|
||||
"paste": "Pegar",
|
||||
"connect": "Conectar",
|
||||
@@ -63,7 +64,7 @@
|
||||
"licenses": "Licencias",
|
||||
"switchProfile": "Cambiar Perfil",
|
||||
"subtitleStyling": "Estilo de Subtítulos",
|
||||
"mpvConfig": "Configuración de MPV",
|
||||
"mpvConfig": "mpv.conf",
|
||||
"logs": "Logs"
|
||||
},
|
||||
"update": {
|
||||
@@ -127,7 +128,7 @@
|
||||
"playerBackend": "Reproductor",
|
||||
"exoPlayer": "ExoPlayer (Recomendado)",
|
||||
"exoPlayerDescription": "Reproductor nativo de Android con mejor soporte de hardware",
|
||||
"mpv": "MPV",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "Reproductor avanzado con más funciones y soporte de subtítulos ASS",
|
||||
"hardwareDecoding": "Decodificación por Hardware",
|
||||
"hardwareDecodingDescription": "Usar aceleración por hardware cuando esté disponible",
|
||||
@@ -151,6 +152,8 @@
|
||||
"keyboardShortcutsDescription": "Personalizar los atajos de teclado",
|
||||
"videoPlayerNavigation": "Navegación del Reproductor de Video",
|
||||
"videoPlayerNavigationDescription": "Usar las teclas de flecha para navegar por los controles del reproductor",
|
||||
"crashReporting": "Informes de Errores",
|
||||
"crashReportingDescription": "Enviar informes de errores para mejorar la aplicación",
|
||||
"debugLogging": "Registro de Depuración",
|
||||
"debugLoggingDescription": "Habilitar registros detallados para resolución de problemas",
|
||||
"viewLogs": "Ver Logs",
|
||||
@@ -335,6 +338,7 @@
|
||||
"settingsButton": "Ajustes de video",
|
||||
"audioTrackButton": "Pistas de audio",
|
||||
"subtitlesButton": "Subtítulos",
|
||||
"tracksButton": "Audio y subtítulos",
|
||||
"chaptersButton": "Capítulos",
|
||||
"versionsButton": "Versiones de video",
|
||||
"pipButton": "Modo PiP (Imagen en Imagen)",
|
||||
@@ -349,11 +353,14 @@
|
||||
"timelineSlider": "Línea de tiempo del video",
|
||||
"volumeSlider": "Nivel de volumen",
|
||||
"endsAt": "Termina a las ${time}",
|
||||
"pipActive": "Reproduciendo en Imagen en Imagen",
|
||||
"pipFailed": "Error al iniciar Imagen en Imagen",
|
||||
"pipErrors": {
|
||||
"androidVersion": "Requiere Android 8.0 o más reciente",
|
||||
"iosVersion": "Requiere iOS 15.0 o más reciente",
|
||||
"permissionDisabled": "El permiso de Imagen en Imagen está desactivado. Actívalo en Ajustes > Aplicaciones > Plezy > Imagen en Imagen",
|
||||
"notSupported": "El dispositivo no soporta el modo Imagen en Imagen",
|
||||
"voSwitchFailed": "Error al cambiar la salida de video para Imagen en Imagen",
|
||||
"failed": "Error al iniciar Imagen en Imagen",
|
||||
"unknown": "Ocurrió un error: ${error}"
|
||||
},
|
||||
@@ -414,19 +421,10 @@
|
||||
"position": "Position"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "Configuración de MPV",
|
||||
"title": "Configuración de mpv",
|
||||
"description": "Ajustes avanzados del reproductor de video",
|
||||
"properties": "Propiedades",
|
||||
"presets": "Ajustes preestablecidos",
|
||||
"noProperties": "No hay propiedades configuradas",
|
||||
"noPresets": "No hay ajustes guardados",
|
||||
"addProperty": "Añadir Propiedad",
|
||||
"editProperty": "Editar Propiedad",
|
||||
"deleteProperty": "Eliminar Propiedad",
|
||||
"propertyKey": "Clave de la Propiedad",
|
||||
"propertyKeyHint": "ej., hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "Valor de la Propiedad",
|
||||
"propertyValueHint": "ej., auto, 256000000",
|
||||
"saveAsPreset": "Guardar como Ajuste...",
|
||||
"presetName": "Nombre del Ajuste",
|
||||
"presetNameHint": "Introduce un nombre para este ajuste",
|
||||
@@ -436,8 +434,7 @@
|
||||
"presetLoaded": "Ajuste cargado",
|
||||
"presetDeleted": "Ajuste eliminado",
|
||||
"confirmDeletePreset": "¿Estás seguro de que quieres eliminar este ajuste?",
|
||||
"confirmDeleteProperty": "¿Estás seguro de que quieres eliminar esta propiedad?",
|
||||
"entriesCount": "${count} entradas"
|
||||
"configPlaceholder": "gpu-api=vulkan\nhwdec=auto\n# comment"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "Confirmar Acción"
|
||||
@@ -559,7 +556,7 @@
|
||||
"licensesCount": "${count} licencias"
|
||||
},
|
||||
"navigation": {
|
||||
"libraries": "Bibliotecas",
|
||||
"libraries": "Medios",
|
||||
"downloads": "Descargas",
|
||||
"liveTv": "TV en vivo"
|
||||
},
|
||||
@@ -602,7 +599,6 @@
|
||||
"deleteFailedWithError": "Error al eliminar la colección: ${error}",
|
||||
"failedToLoadItems": "Error al cargar los elementos de la colección: ${error}",
|
||||
"selectCollection": "Seleccionar Colección",
|
||||
"createNewCollection": "Crear Nueva Colección",
|
||||
"collectionName": "Nombre de la Colección",
|
||||
"enterCollectionName": "Introduce el nombre de la colección",
|
||||
"addedToCollection": "Añadido a la colección",
|
||||
@@ -634,7 +630,6 @@
|
||||
"itemAdded": "Añadido a la lista",
|
||||
"itemRemoved": "Eliminado de la lista",
|
||||
"selectPlaylist": "Seleccionar Lista",
|
||||
"createNewPlaylist": "Crear Nueva Lista",
|
||||
"errorCreating": "Error al crear la lista",
|
||||
"errorDeleting": "Error al eliminar la lista",
|
||||
"errorLoading": "Error al cargar las listas",
|
||||
|
||||
+15
-20
@@ -32,6 +32,7 @@
|
||||
"delete": "Supprimer",
|
||||
"shuffle": "Mélanger",
|
||||
"addTo": "Ajouter à...",
|
||||
"createNew": "Créer",
|
||||
"remove": "Supprimer",
|
||||
"paste": "Coller",
|
||||
"connect": "Connecter",
|
||||
@@ -43,7 +44,7 @@
|
||||
"search": "Recherche",
|
||||
"home": "Accueil",
|
||||
"back": "Retour",
|
||||
"settings": "Paramètres",
|
||||
"settings": "Réglages",
|
||||
"mute": "Muet",
|
||||
"ok": "OK",
|
||||
"loading": "Chargement...",
|
||||
@@ -63,7 +64,7 @@
|
||||
"licenses": "Licenses",
|
||||
"switchProfile": "Changer de profil",
|
||||
"subtitleStyling": "Configuration des sous-titres",
|
||||
"mpvConfig": "Configuration MPV",
|
||||
"mpvConfig": "mpv.conf",
|
||||
"logs": "Logs"
|
||||
},
|
||||
"update": {
|
||||
@@ -127,7 +128,7 @@
|
||||
"playerBackend": "Moteur de lecture",
|
||||
"exoPlayer": "ExoPlayer (Recommandé)",
|
||||
"exoPlayerDescription": "Lecteur natif Android avec meilleur support matériel",
|
||||
"mpv": "MPV",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "Lecteur avancé avec plus de fonctionnalités et support des sous-titres ASS",
|
||||
"hardwareDecoding": "Décodage matériel",
|
||||
"hardwareDecodingDescription": "Utilisez l'accélération matérielle lorsqu'elle est disponible.",
|
||||
@@ -151,6 +152,8 @@
|
||||
"keyboardShortcutsDescription": "Personnaliser les raccourcis clavier",
|
||||
"videoPlayerNavigation": "Navigation dans le lecteur vidéo",
|
||||
"videoPlayerNavigationDescription": "Utilisez les touches fléchées pour naviguer dans les commandes du lecteur vidéo.",
|
||||
"crashReporting": "Rapports de plantage",
|
||||
"crashReportingDescription": "Envoyer des rapports de plantage pour améliorer l'application",
|
||||
"debugLogging": "Journalisation de débogage",
|
||||
"debugLoggingDescription": "Activer la journalisation détaillée pour le dépannage",
|
||||
"viewLogs": "Voir les logs",
|
||||
@@ -335,6 +338,7 @@
|
||||
"settingsButton": "Paramètres vidéo",
|
||||
"audioTrackButton": "Pistes audio",
|
||||
"subtitlesButton": "Sous-titres",
|
||||
"tracksButton": "Audio et sous-titres",
|
||||
"chaptersButton": "Chapitres",
|
||||
"versionsButton": "Versions vidéo",
|
||||
"pipButton": "Mode PiP (Picture-in-Picture)",
|
||||
@@ -349,11 +353,14 @@
|
||||
"timelineSlider": "Timeline vidéo",
|
||||
"volumeSlider": "Niveau sonore",
|
||||
"endsAt": "Fin à ${time}",
|
||||
"pipActive": "Lecture en mode image dans l'image",
|
||||
"pipFailed": "Échec du démarrage du mode image dans l'image",
|
||||
"pipErrors": {
|
||||
"androidVersion": "Nécessite Android 8.0 ou plus récent",
|
||||
"iosVersion": "Nécessite iOS 15.0 ou plus récent",
|
||||
"permissionDisabled": "L'autorisation Image dans l'image est désactivée. Activez-la dans Paramètres > Applications > Plezy > Image dans l'image",
|
||||
"notSupported": "Cet appareil ne prend pas en charge le mode image dans l'image",
|
||||
"voSwitchFailed": "Échec du changement de sortie vidéo pour l'image dans l'image",
|
||||
"failed": "Échec du démarrage du mode image dans l'image",
|
||||
"unknown": "Une erreur s'est produite : ${error}"
|
||||
},
|
||||
@@ -414,19 +421,10 @@
|
||||
"position": "Position"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "Configuration MPV",
|
||||
"title": "Configuration mpv",
|
||||
"description": "Paramètres avancés du lecteur vidéo",
|
||||
"properties": "Propriétés",
|
||||
"presets": "Préréglages",
|
||||
"noProperties": "Aucune propriété configurée",
|
||||
"noPresets": "Aucun préréglage enregistré",
|
||||
"addProperty": "Ajouter une propriété",
|
||||
"editProperty": "Modifier la propriété",
|
||||
"deleteProperty": "Supprimer la propriété",
|
||||
"propertyKey": "Clé",
|
||||
"propertyKeyHint": "e.g., hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "Valeur",
|
||||
"propertyValueHint": "e.g., auto, 256000000",
|
||||
"saveAsPreset": "Enregistrer comme préréglage...",
|
||||
"presetName": "Nom du préréglage",
|
||||
"presetNameHint": "Entrez un nom pour ce préréglage",
|
||||
@@ -436,8 +434,7 @@
|
||||
"presetLoaded": "Préréglage chargé",
|
||||
"presetDeleted": "Préréglage supprimé",
|
||||
"confirmDeletePreset": "Êtes-vous sûr de vouloir supprimer ce préréglage ?",
|
||||
"confirmDeleteProperty": "Êtes-vous sûr de vouloir supprimer cette propriété ?",
|
||||
"entriesCount": "${count} entrées"
|
||||
"configPlaceholder": "gpu-api=vulkan\nhwdec=auto\n# comment"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "Confirmer l'action"
|
||||
@@ -559,9 +556,9 @@
|
||||
"licensesCount": "${count} licences"
|
||||
},
|
||||
"navigation": {
|
||||
"libraries": "Bibliothèques",
|
||||
"downloads": "Téléchargements",
|
||||
"liveTv": "TV en direct"
|
||||
"libraries": "Medias",
|
||||
"downloads": "Téléch.",
|
||||
"liveTv": "TV direct"
|
||||
},
|
||||
"liveTv": {
|
||||
"title": "TV en direct",
|
||||
@@ -602,7 +599,6 @@
|
||||
"deleteFailedWithError": "Échec de la suppression de la collection: ${error}",
|
||||
"failedToLoadItems": "Échec du chargement des éléments de la collection: ${error}",
|
||||
"selectCollection": "Sélectionner une collection",
|
||||
"createNewCollection": "Créer une nouvelle collection",
|
||||
"collectionName": "Nom de la collection",
|
||||
"enterCollectionName": "Entrez le nom de la collection",
|
||||
"addedToCollection": "Ajouté à la collection",
|
||||
@@ -634,7 +630,6 @@
|
||||
"itemAdded": "Ajouté à la playlist",
|
||||
"itemRemoved": "Retiré de la playlist",
|
||||
"selectPlaylist": "Select Playlist",
|
||||
"createNewPlaylist": "Créer une nouvelle playlist",
|
||||
"errorCreating": "Échec de la création de playlist",
|
||||
"errorDeleting": "Échec de suppression de playlist",
|
||||
"errorLoading": "Échec de chargement de playlists",
|
||||
|
||||
+13
-18
@@ -32,6 +32,7 @@
|
||||
"delete": "Elimina",
|
||||
"shuffle": "Casuale",
|
||||
"addTo": "Aggiungi a...",
|
||||
"createNew": "Crea",
|
||||
"remove": "Rimuovi",
|
||||
"paste": "Incolla",
|
||||
"connect": "Connetti",
|
||||
@@ -43,7 +44,7 @@
|
||||
"search": "Cerca",
|
||||
"home": "Home",
|
||||
"back": "Indietro",
|
||||
"settings": "Impostazioni",
|
||||
"settings": "Opzioni",
|
||||
"mute": "Muto",
|
||||
"ok": "OK",
|
||||
"loading": "Caricamento...",
|
||||
@@ -63,7 +64,7 @@
|
||||
"licenses": "Licenze",
|
||||
"switchProfile": "Cambia profilo",
|
||||
"subtitleStyling": "Stile sottotitoli",
|
||||
"mpvConfig": "Configurazione MPV",
|
||||
"mpvConfig": "mpv.conf",
|
||||
"logs": "Registro"
|
||||
},
|
||||
"update": {
|
||||
@@ -127,7 +128,7 @@
|
||||
"playerBackend": "Motore di riproduzione",
|
||||
"exoPlayer": "ExoPlayer (Consigliato)",
|
||||
"exoPlayerDescription": "Lettore nativo Android con migliore supporto hardware",
|
||||
"mpv": "MPV",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "Lettore avanzato con più funzionalità e supporto sottotitoli ASS",
|
||||
"hardwareDecoding": "Decodifica Hardware",
|
||||
"hardwareDecodingDescription": "Utilizza l'accelerazione hardware quando disponibile",
|
||||
@@ -151,6 +152,8 @@
|
||||
"keyboardShortcutsDescription": "Personalizza le scorciatoie da tastiera",
|
||||
"videoPlayerNavigation": "Navigazione del lettore video",
|
||||
"videoPlayerNavigationDescription": "Usa i tasti freccia per navigare nei controlli del lettore video",
|
||||
"crashReporting": "Segnalazione errori",
|
||||
"crashReportingDescription": "Invia segnalazioni di errori per migliorare l'app",
|
||||
"debugLogging": "Log di debug",
|
||||
"debugLoggingDescription": "Abilita il logging dettagliato per la risoluzione dei problemi",
|
||||
"viewLogs": "Visualizza log",
|
||||
@@ -335,6 +338,7 @@
|
||||
"settingsButton": "Impostazioni video",
|
||||
"audioTrackButton": "Tracce audio",
|
||||
"subtitlesButton": "Sottotitoli",
|
||||
"tracksButton": "Audio e sottotitoli",
|
||||
"chaptersButton": "Capitoli",
|
||||
"versionsButton": "Versioni video",
|
||||
"pipButton": "Modalità Picture-in-Picture",
|
||||
@@ -349,11 +353,14 @@
|
||||
"timelineSlider": "Timeline video",
|
||||
"volumeSlider": "Livello volume",
|
||||
"endsAt": "Finisce alle ${time}",
|
||||
"pipActive": "Riproduzione in Picture-in-Picture",
|
||||
"pipFailed": "Impossibile avviare la modalità Picture-in-Picture",
|
||||
"pipErrors": {
|
||||
"androidVersion": "Richiede Android 8.0 o versioni successive",
|
||||
"iosVersion": "Richiede iOS 15.0 o versioni successive",
|
||||
"permissionDisabled": "L'autorizzazione Picture-in-Picture è disabilitata. Abilitala in Impostazioni > App > Plezy > Picture-in-Picture",
|
||||
"notSupported": "Questo dispositivo non supporta la modalità Picture-in-Picture",
|
||||
"voSwitchFailed": "Impossibile cambiare l'uscita video per Picture-in-Picture",
|
||||
"failed": "Impossibile avviare la modalità Picture-in-Picture",
|
||||
"unknown": "Si è verificato un errore: ${error}"
|
||||
},
|
||||
@@ -414,19 +421,10 @@
|
||||
"position": "Position"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "Configurazione MPV",
|
||||
"title": "Configurazione mpv",
|
||||
"description": "Impostazioni avanzate del lettore video",
|
||||
"properties": "Proprietà",
|
||||
"presets": "Preset",
|
||||
"noProperties": "Nessuna proprietà configurata",
|
||||
"noPresets": "Nessun preset salvato",
|
||||
"addProperty": "Aggiungi proprietà",
|
||||
"editProperty": "Modifica proprietà",
|
||||
"deleteProperty": "Elimina proprietà",
|
||||
"propertyKey": "Chiave proprietà",
|
||||
"propertyKeyHint": "es. hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "Valore proprietà",
|
||||
"propertyValueHint": "es. auto, 256000000",
|
||||
"saveAsPreset": "Salva come preset...",
|
||||
"presetName": "Nome preset",
|
||||
"presetNameHint": "Inserisci un nome per questo preset",
|
||||
@@ -436,8 +434,7 @@
|
||||
"presetLoaded": "Preset caricato",
|
||||
"presetDeleted": "Preset eliminato",
|
||||
"confirmDeletePreset": "Sei sicuro di voler eliminare questo preset?",
|
||||
"confirmDeleteProperty": "Sei sicuro di voler eliminare questa proprietà?",
|
||||
"entriesCount": "${count} voci"
|
||||
"configPlaceholder": "gpu-api=vulkan\nhwdec=auto\n# comment"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "Conferma azione"
|
||||
@@ -561,7 +558,7 @@
|
||||
"navigation": {
|
||||
"libraries": "Librerie",
|
||||
"downloads": "Download",
|
||||
"liveTv": "TV in diretta"
|
||||
"liveTv": "TV Live"
|
||||
},
|
||||
"liveTv": {
|
||||
"title": "TV in diretta",
|
||||
@@ -629,7 +626,6 @@
|
||||
"itemAdded": "Aggiunto alla playlist",
|
||||
"itemRemoved": "Rimosso dalla playlist",
|
||||
"selectPlaylist": "Seleziona playlist",
|
||||
"createNewPlaylist": "Crea nuova playlist",
|
||||
"errorCreating": "Errore durante la creazione della playlist",
|
||||
"errorDeleting": "Errore durante l'eliminazione della playlist",
|
||||
"errorLoading": "Errore durante il caricamento delle playlist",
|
||||
@@ -650,7 +646,6 @@
|
||||
"deleteFailedWithError": "Impossibile eliminare la raccolta: ${error}",
|
||||
"failedToLoadItems": "Impossibile caricare gli elementi della raccolta: ${error}",
|
||||
"selectCollection": "Seleziona raccolta",
|
||||
"createNewCollection": "Crea nuova raccolta",
|
||||
"collectionName": "Nome raccolta",
|
||||
"enterCollectionName": "Inserisci nome raccolta",
|
||||
"addedToCollection": "Aggiunto alla raccolta",
|
||||
|
||||
+11
-16
@@ -32,6 +32,7 @@
|
||||
"delete": "삭제",
|
||||
"shuffle": "무작위 재생",
|
||||
"addTo": "추가하기...",
|
||||
"createNew": "새로 만들기",
|
||||
"remove": "삭제",
|
||||
"paste": "붙여넣기",
|
||||
"connect": "연결",
|
||||
@@ -63,7 +64,7 @@
|
||||
"licenses": "라이선스",
|
||||
"switchProfile": "프로필 전환",
|
||||
"subtitleStyling": "자막 스타일 설정",
|
||||
"mpvConfig": "MPV 설정",
|
||||
"mpvConfig": "mpv.conf",
|
||||
"logs": "로그"
|
||||
},
|
||||
"update": {
|
||||
@@ -127,7 +128,7 @@
|
||||
"playerBackend": "플레이어 백엔드",
|
||||
"exoPlayer": "ExoPlayer (권장)",
|
||||
"exoPlayerDescription": "더 나은 하드웨어 지원을 제공하는 Android 네이티브 플레이어",
|
||||
"mpv": "MPV",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "더 많은 기능과 ASS 자막을 지원하는 고급 플레이어",
|
||||
"hardwareDecoding": "하드웨어 디코딩",
|
||||
"hardwareDecodingDescription": "가능한 경우 하드웨어 가속을 사용합니다",
|
||||
@@ -151,6 +152,8 @@
|
||||
"keyboardShortcutsDescription": "사용자 정의 키보드 단축키",
|
||||
"videoPlayerNavigation": "비디오 플레이어 탐색",
|
||||
"videoPlayerNavigationDescription": "방향 키를 사용하여 비디오 플레이어 컨트롤 탐색",
|
||||
"crashReporting": "충돌 보고",
|
||||
"crashReportingDescription": "앱 개선을 위해 충돌 보고서 전송",
|
||||
"debugLogging": "디버그 로깅",
|
||||
"debugLoggingDescription": "문제 해결을 위해 상세 로깅 활성화",
|
||||
"viewLogs": "로그 보기",
|
||||
@@ -335,6 +338,7 @@
|
||||
"settingsButton": "동영상 설정",
|
||||
"audioTrackButton": "음원 트랙",
|
||||
"subtitlesButton": "자막",
|
||||
"tracksButton": "오디오 및 자막",
|
||||
"chaptersButton": "챕터",
|
||||
"versionsButton": "동영상 버전",
|
||||
"pipButton": "픽처 인 픽처 모드",
|
||||
@@ -349,11 +353,14 @@
|
||||
"timelineSlider": "타임라인",
|
||||
"volumeSlider": "볼륨 조절",
|
||||
"endsAt": "${time}에 종료",
|
||||
"pipActive": "화면 속 화면으로 재생 중",
|
||||
"pipFailed": "화면 속 화면 모드를 시작할 수 없습니다",
|
||||
"pipErrors": {
|
||||
"androidVersion": "Android 8.0 이상이 필요합니다",
|
||||
"iosVersion": "iOS 15.0 이상이 필요합니다",
|
||||
"permissionDisabled": "화면 속 화면 권한이 비활성화되어 있습니다. 설정 > 앱 > Plezy > 화면 속 화면에서 활성화하세요",
|
||||
"notSupported": "이 기기는 화면 속 화면 모드를 지원하지 않습니다",
|
||||
"voSwitchFailed": "화면 속 화면을 위한 비디오 출력 전환에 실패했습니다",
|
||||
"failed": "화면 속 화면 모드를 시작할 수 없습니다",
|
||||
"unknown": "오류가 발생했습니다: ${error}"
|
||||
},
|
||||
@@ -414,19 +421,10 @@
|
||||
"position": "Position"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "MPV 설정",
|
||||
"title": "mpv 설정",
|
||||
"description": "고급 비디오 플레이어 설정",
|
||||
"properties": "속성",
|
||||
"presets": "사전 설정",
|
||||
"noProperties": "설정된 속성이 없습니다",
|
||||
"noPresets": "저장된 사전 설정이 없습니다",
|
||||
"addProperty": "속성 추가",
|
||||
"editProperty": "속성 편집",
|
||||
"deleteProperty": "속성 삭제",
|
||||
"propertyKey": "속성 키",
|
||||
"propertyKeyHint": "예: hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "속성값",
|
||||
"propertyValueHint": "예: auto, 256000000",
|
||||
"saveAsPreset": "프리셋으로 저장...",
|
||||
"presetName": "프리셋 이름",
|
||||
"presetNameHint": "이 프리셋의 이름을 입력하세요",
|
||||
@@ -436,8 +434,7 @@
|
||||
"presetLoaded": "프리셋이 로드 되었습니다",
|
||||
"presetDeleted": "프리셋이 삭제 되었습니다",
|
||||
"confirmDeletePreset": "이 프리셋을 삭제 하시겠습니까?",
|
||||
"confirmDeleteProperty": "이 속성을 삭제 하시겠습니까?",
|
||||
"entriesCount": "${count} 항목"
|
||||
"configPlaceholder": "gpu-api=vulkan\nhwdec=auto\n# comment"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "확인"
|
||||
@@ -602,7 +599,6 @@
|
||||
"deleteFailedWithError": "컬렉션 삭제 실패: ${error}",
|
||||
"failedToLoadItems": "컬렉션 항목 로드 실패: ${error}",
|
||||
"selectCollection": "컬렉션 선택",
|
||||
"createNewCollection": "새 컬렉션 생성",
|
||||
"collectionName": "컬렉션 이름",
|
||||
"enterCollectionName": "컬렉션 이름 입력",
|
||||
"addedToCollection": "컬렉션에 추가됨",
|
||||
@@ -634,7 +630,6 @@
|
||||
"itemAdded": "재생 목록에 추가 되었습니다",
|
||||
"itemRemoved": "재생 목록에서 제거됨",
|
||||
"selectPlaylist": "재생 목록 선택",
|
||||
"createNewPlaylist": "새 재생 목록 생성",
|
||||
"errorCreating": "재생 목록 생성 실패",
|
||||
"errorDeleting": "재생 목록 삭제 실패",
|
||||
"errorLoading": "재생 목록 로드 실패",
|
||||
|
||||
+13
-18
@@ -32,6 +32,7 @@
|
||||
"delete": "Verwijderen",
|
||||
"shuffle": "Willekeurig",
|
||||
"addTo": "Toevoegen aan...",
|
||||
"createNew": "Nieuw aanmaken",
|
||||
"remove": "Verwijderen",
|
||||
"paste": "Plakken",
|
||||
"connect": "Verbinden",
|
||||
@@ -43,7 +44,7 @@
|
||||
"search": "Zoeken",
|
||||
"home": "Home",
|
||||
"back": "Terug",
|
||||
"settings": "Instellingen",
|
||||
"settings": "Opties",
|
||||
"mute": "Dempen",
|
||||
"ok": "OK",
|
||||
"loading": "Laden...",
|
||||
@@ -63,7 +64,7 @@
|
||||
"licenses": "Licenties",
|
||||
"switchProfile": "Wissel van profiel",
|
||||
"subtitleStyling": "Ondertitel opmaak",
|
||||
"mpvConfig": "MPV-configuratie",
|
||||
"mpvConfig": "mpv.conf",
|
||||
"logs": "Logbestanden"
|
||||
},
|
||||
"update": {
|
||||
@@ -127,7 +128,7 @@
|
||||
"playerBackend": "Speler backend",
|
||||
"exoPlayer": "ExoPlayer (Aanbevolen)",
|
||||
"exoPlayerDescription": "Android-native speler met betere hardware-ondersteuning",
|
||||
"mpv": "MPV",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "Geavanceerde speler met meer functies en ASS-ondertitelondersteuning",
|
||||
"hardwareDecoding": "Hardware decodering",
|
||||
"hardwareDecodingDescription": "Gebruik hardware versnelling indien beschikbaar",
|
||||
@@ -151,6 +152,8 @@
|
||||
"keyboardShortcutsDescription": "Pas toetsenbord sneltoetsen aan",
|
||||
"videoPlayerNavigation": "Videospeler navigatie",
|
||||
"videoPlayerNavigationDescription": "Gebruik pijltjestoetsen om door de videospeler bediening te navigeren",
|
||||
"crashReporting": "Crashrapportage",
|
||||
"crashReportingDescription": "Crashrapporten verzenden om de app te verbeteren",
|
||||
"debugLogging": "Debug logging",
|
||||
"debugLoggingDescription": "Schakel gedetailleerde logging in voor probleemoplossing",
|
||||
"viewLogs": "Bekijk logs",
|
||||
@@ -335,6 +338,7 @@
|
||||
"settingsButton": "Video-instellingen",
|
||||
"audioTrackButton": "Audiosporen",
|
||||
"subtitlesButton": "Ondertitels",
|
||||
"tracksButton": "Audio en ondertitels",
|
||||
"chaptersButton": "Hoofdstukken",
|
||||
"versionsButton": "Videoversies",
|
||||
"pipButton": "Beeld-in-beeld modus",
|
||||
@@ -349,11 +353,14 @@
|
||||
"timelineSlider": "Videotijdlijn",
|
||||
"volumeSlider": "Volumeniveau",
|
||||
"endsAt": "Eindigt om ${time}",
|
||||
"pipActive": "Afspelen in beeld-in-beeld",
|
||||
"pipFailed": "Beeld-in-beeld kon niet worden gestart",
|
||||
"pipErrors": {
|
||||
"androidVersion": "Vereist Android 8.0 of nieuwer",
|
||||
"iosVersion": "Vereist iOS 15.0 of nieuwer",
|
||||
"permissionDisabled": "Beeld-in-beeld toestemming is uitgeschakeld. Schakel deze in via Instellingen > Apps > Plezy > Beeld-in-beeld",
|
||||
"notSupported": "Dit apparaat ondersteunt geen beeld-in-beeld modus",
|
||||
"voSwitchFailed": "Kan video-uitvoer niet wisselen voor beeld-in-beeld",
|
||||
"failed": "Beeld-in-beeld kon niet worden gestart",
|
||||
"unknown": "Er is een fout opgetreden: ${error}"
|
||||
},
|
||||
@@ -414,19 +421,10 @@
|
||||
"position": "Position"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "MPV-configuratie",
|
||||
"title": "mpv-configuratie",
|
||||
"description": "Geavanceerde videospeler-instellingen",
|
||||
"properties": "Eigenschappen",
|
||||
"presets": "Voorinstellingen",
|
||||
"noProperties": "Geen eigenschappen geconfigureerd",
|
||||
"noPresets": "Geen opgeslagen voorinstellingen",
|
||||
"addProperty": "Eigenschap toevoegen",
|
||||
"editProperty": "Eigenschap bewerken",
|
||||
"deleteProperty": "Eigenschap verwijderen",
|
||||
"propertyKey": "Eigenschapssleutel",
|
||||
"propertyKeyHint": "bijv. hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "Eigenschapswaarde",
|
||||
"propertyValueHint": "bijv. auto, 256000000",
|
||||
"saveAsPreset": "Opslaan als voorinstelling...",
|
||||
"presetName": "Naam voorinstelling",
|
||||
"presetNameHint": "Voer een naam in voor deze voorinstelling",
|
||||
@@ -436,8 +434,7 @@
|
||||
"presetLoaded": "Voorinstelling geladen",
|
||||
"presetDeleted": "Voorinstelling verwijderd",
|
||||
"confirmDeletePreset": "Weet je zeker dat je deze voorinstelling wilt verwijderen?",
|
||||
"confirmDeleteProperty": "Weet je zeker dat je deze eigenschap wilt verwijderen?",
|
||||
"entriesCount": "${count} items"
|
||||
"configPlaceholder": "gpu-api=vulkan\nhwdec=auto\n# comment"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "Bevestig actie"
|
||||
@@ -559,7 +556,7 @@
|
||||
"licensesCount": "${count} licenties"
|
||||
},
|
||||
"navigation": {
|
||||
"libraries": "Bibliotheken",
|
||||
"libraries": "Media",
|
||||
"downloads": "Downloads",
|
||||
"liveTv": "Live TV"
|
||||
},
|
||||
@@ -629,7 +626,6 @@
|
||||
"itemAdded": "Toegevoegd aan afspeellijst",
|
||||
"itemRemoved": "Verwijderd uit afspeellijst",
|
||||
"selectPlaylist": "Selecteer afspeellijst",
|
||||
"createNewPlaylist": "Nieuwe afspeellijst maken",
|
||||
"errorCreating": "Fout bij maken afspeellijst",
|
||||
"errorDeleting": "Fout bij verwijderen afspeellijst",
|
||||
"errorLoading": "Fout bij laden afspeellijsten",
|
||||
@@ -650,7 +646,6 @@
|
||||
"deleteFailedWithError": "Collectie verwijderen mislukt: ${error}",
|
||||
"failedToLoadItems": "Collectie-items laden mislukt: ${error}",
|
||||
"selectCollection": "Selecteer collectie",
|
||||
"createNewCollection": "Nieuwe collectie maken",
|
||||
"collectionName": "Collectienaam",
|
||||
"enterCollectionName": "Voer collectienaam in",
|
||||
"addedToCollection": "Toegevoegd aan collectie",
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
/// To regenerate, run: `dart run slang`
|
||||
///
|
||||
/// Locales: 9
|
||||
/// Strings: 7173 (797 per locale)
|
||||
/// Strings: 7182 (798 per locale)
|
||||
///
|
||||
/// Built on 2026-02-24 at 21:50 UTC
|
||||
/// Built on 2026-03-03 at 11:11 UTC
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint, unused_import
|
||||
|
||||
+32
-40
@@ -130,6 +130,7 @@ class _TranslationsCommonDe implements TranslationsCommonEn {
|
||||
@override String get delete => 'Löschen';
|
||||
@override String get shuffle => 'Zufall';
|
||||
@override String get addTo => 'Hinzufügen zu...';
|
||||
@override String get createNew => 'Neu erstellen';
|
||||
@override String get remove => 'Entfernen';
|
||||
@override String get paste => 'Einfügen';
|
||||
@override String get connect => 'Verbinden';
|
||||
@@ -139,9 +140,9 @@ class _TranslationsCommonDe implements TranslationsCommonEn {
|
||||
@override String get resume => 'Fortsetzen';
|
||||
@override String get error => 'Fehler';
|
||||
@override String get search => 'Suche';
|
||||
@override String get home => 'Startseite';
|
||||
@override String get home => 'Start';
|
||||
@override String get back => 'Zurück';
|
||||
@override String get settings => 'Einstellungen';
|
||||
@override String get settings => 'Optionen';
|
||||
@override String get mute => 'Stumm';
|
||||
@override String get ok => 'OK';
|
||||
@override String get loading => 'Laden...';
|
||||
@@ -168,7 +169,7 @@ class _TranslationsScreensDe implements TranslationsScreensEn {
|
||||
@override String get licenses => 'Lizenzen';
|
||||
@override String get switchProfile => 'Profil wechseln';
|
||||
@override String get subtitleStyling => 'Untertitel-Stil';
|
||||
@override String get mpvConfig => 'MPV-Konfiguration';
|
||||
@override String get mpvConfig => 'mpv.conf';
|
||||
@override String get logs => 'Protokolle';
|
||||
}
|
||||
|
||||
@@ -246,7 +247,7 @@ class _TranslationsSettingsDe implements TranslationsSettingsEn {
|
||||
@override String get playerBackend => 'Player-Backend';
|
||||
@override String get exoPlayer => 'ExoPlayer (Empfohlen)';
|
||||
@override String get exoPlayerDescription => 'Android-nativer Player mit besserer Hardware-Unterstützung';
|
||||
@override String get mpv => 'MPV';
|
||||
@override String get mpv => 'mpv';
|
||||
@override String get mpvDescription => 'Erweiterter Player mit mehr Funktionen und ASS-Untertitel-Unterstützung';
|
||||
@override String get hardwareDecoding => 'Hardware-Decodierung';
|
||||
@override String get hardwareDecodingDescription => 'Hardwarebeschleunigung verwenden, sofern verfügbar';
|
||||
@@ -270,6 +271,8 @@ class _TranslationsSettingsDe implements TranslationsSettingsEn {
|
||||
@override String get keyboardShortcutsDescription => 'Tastenkürzel anpassen';
|
||||
@override String get videoPlayerNavigation => 'Videoplayer-Navigation';
|
||||
@override String get videoPlayerNavigationDescription => 'Pfeiltasten zur Navigation der Videoplayer-Steuerung verwenden';
|
||||
@override String get crashReporting => 'Absturzberichte';
|
||||
@override String get crashReportingDescription => 'Absturzberichte senden, um die App zu verbessern';
|
||||
@override String get debugLogging => 'Debug-Protokollierung';
|
||||
@override String get debugLoggingDescription => 'Detaillierte Protokolle zur Fehleranalyse aktivieren';
|
||||
@override String get viewLogs => 'Protokolle anzeigen';
|
||||
@@ -490,6 +493,7 @@ class _TranslationsVideoControlsDe implements TranslationsVideoControlsEn {
|
||||
@override String get settingsButton => 'Videoeinstellungen';
|
||||
@override String get audioTrackButton => 'Tonspuren';
|
||||
@override String get subtitlesButton => 'Untertitel';
|
||||
@override String get tracksButton => 'Audio und Untertitel';
|
||||
@override String get chaptersButton => 'Kapitel';
|
||||
@override String get versionsButton => 'Videoversionen';
|
||||
@override String get pipButton => 'Bild-in-Bild Modus';
|
||||
@@ -504,6 +508,7 @@ class _TranslationsVideoControlsDe implements TranslationsVideoControlsEn {
|
||||
@override String get timelineSlider => 'Video-Zeitleiste';
|
||||
@override String get volumeSlider => 'Lautstärkepegel';
|
||||
@override String endsAt({required Object time}) => 'Endet um ${time}';
|
||||
@override String get pipActive => 'Wiedergabe im Bild-in-Bild-Modus';
|
||||
@override String get pipFailed => 'Bild-in-Bild konnte nicht gestartet werden';
|
||||
@override late final _TranslationsVideoControlsPipErrorsDe pipErrors = _TranslationsVideoControlsPipErrorsDe._(_root);
|
||||
@override String get chapters => 'Kapitel';
|
||||
@@ -591,19 +596,10 @@ class _TranslationsMpvConfigDe implements TranslationsMpvConfigEn {
|
||||
final TranslationsDe _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'MPV-Konfiguration';
|
||||
@override String get title => 'mpv-Konfiguration';
|
||||
@override String get description => 'Erweiterte Videoplayer-Einstellungen';
|
||||
@override String get properties => 'Eigenschaften';
|
||||
@override String get presets => 'Voreinstellungen';
|
||||
@override String get noProperties => 'Keine Eigenschaften konfiguriert';
|
||||
@override String get noPresets => 'Keine gespeicherten Voreinstellungen';
|
||||
@override String get addProperty => 'Eigenschaft hinzufügen';
|
||||
@override String get editProperty => 'Eigenschaft bearbeiten';
|
||||
@override String get deleteProperty => 'Eigenschaft löschen';
|
||||
@override String get propertyKey => 'Eigenschaftsschlüssel';
|
||||
@override String get propertyKeyHint => 'z.B. hwdec, demuxer-max-bytes';
|
||||
@override String get propertyValue => 'Eigenschaftswert';
|
||||
@override String get propertyValueHint => 'z.B. auto, 256000000';
|
||||
@override String get saveAsPreset => 'Als Voreinstellung speichern...';
|
||||
@override String get presetName => 'Name der Voreinstellung';
|
||||
@override String get presetNameHint => 'Namen für diese Voreinstellung eingeben';
|
||||
@@ -613,8 +609,7 @@ class _TranslationsMpvConfigDe implements TranslationsMpvConfigEn {
|
||||
@override String get presetLoaded => 'Voreinstellung geladen';
|
||||
@override String get presetDeleted => 'Voreinstellung gelöscht';
|
||||
@override String get confirmDeletePreset => 'Möchten Sie diese Voreinstellung wirklich löschen?';
|
||||
@override String get confirmDeleteProperty => 'Möchten Sie diese Eigenschaft wirklich löschen?';
|
||||
@override String entriesCount({required Object count}) => '${count} Einträge';
|
||||
@override String get configPlaceholder => 'gpu-api=vulkan\nhwdec=auto\n# comment';
|
||||
}
|
||||
|
||||
// Path: dialog
|
||||
@@ -794,7 +789,7 @@ class _TranslationsNavigationDe implements TranslationsNavigationEn {
|
||||
final TranslationsDe _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get libraries => 'Mediatheken';
|
||||
@override String get libraries => 'Medien';
|
||||
@override String get downloads => 'Downloads';
|
||||
@override String get liveTv => 'Live-TV';
|
||||
}
|
||||
@@ -885,7 +880,6 @@ class _TranslationsPlaylistsDe implements TranslationsPlaylistsEn {
|
||||
@override String get itemAdded => 'Zur Wiedergabeliste hinzugefügt';
|
||||
@override String get itemRemoved => 'Aus Wiedergabeliste entfernt';
|
||||
@override String get selectPlaylist => 'Wiedergabeliste auswählen';
|
||||
@override String get createNewPlaylist => 'Neue Wiedergabeliste erstellen';
|
||||
@override String get errorCreating => 'Wiedergabeliste konnte nicht erstellt werden';
|
||||
@override String get errorDeleting => 'Wiedergabeliste konnte nicht gelöscht werden';
|
||||
@override String get errorLoading => 'Wiedergabelisten konnten nicht geladen werden';
|
||||
@@ -913,7 +907,6 @@ class _TranslationsCollectionsDe implements TranslationsCollectionsEn {
|
||||
@override String deleteFailedWithError({required Object error}) => 'Sammlung konnte nicht gelöscht werden: ${error}';
|
||||
@override String failedToLoadItems({required Object error}) => 'Sammlungselemente konnten nicht geladen werden: ${error}';
|
||||
@override String get selectCollection => 'Sammlung auswählen';
|
||||
@override String get createNewCollection => 'Neue Sammlung erstellen';
|
||||
@override String get collectionName => 'Sammlungsname';
|
||||
@override String get enterCollectionName => 'Sammlungsnamen eingeben';
|
||||
@override String get addedToCollection => 'Zur Sammlung hinzugefügt';
|
||||
@@ -1162,8 +1155,10 @@ class _TranslationsVideoControlsPipErrorsDe implements TranslationsVideoControls
|
||||
|
||||
// Translations
|
||||
@override String get androidVersion => 'Erfordert Android 8.0 oder neuer';
|
||||
@override String get iosVersion => 'Erfordert iOS 15.0 oder neuer';
|
||||
@override String get permissionDisabled => 'Bild-in-Bild-Berechtigung ist deaktiviert. Aktiviere sie unter Einstellungen > Apps > Plezy > Bild-in-Bild';
|
||||
@override String get notSupported => 'Dieses Gerät unterstützt den Bild-in-Bild-Modus nicht';
|
||||
@override String get voSwitchFailed => 'Videoausgabe für Bild-in-Bild konnte nicht umgeschaltet werden';
|
||||
@override String get failed => 'Bild-in-Bild konnte nicht gestartet werden';
|
||||
@override String unknown({required Object error}) => 'Ein Fehler ist aufgetreten: ${error}';
|
||||
}
|
||||
@@ -1328,6 +1323,7 @@ extension on TranslationsDe {
|
||||
'common.delete' => 'Löschen',
|
||||
'common.shuffle' => 'Zufall',
|
||||
'common.addTo' => 'Hinzufügen zu...',
|
||||
'common.createNew' => 'Neu erstellen',
|
||||
'common.remove' => 'Entfernen',
|
||||
'common.paste' => 'Einfügen',
|
||||
'common.connect' => 'Verbinden',
|
||||
@@ -1337,9 +1333,9 @@ extension on TranslationsDe {
|
||||
'common.resume' => 'Fortsetzen',
|
||||
'common.error' => 'Fehler',
|
||||
'common.search' => 'Suche',
|
||||
'common.home' => 'Startseite',
|
||||
'common.home' => 'Start',
|
||||
'common.back' => 'Zurück',
|
||||
'common.settings' => 'Einstellungen',
|
||||
'common.settings' => 'Optionen',
|
||||
'common.mute' => 'Stumm',
|
||||
'common.ok' => 'OK',
|
||||
'common.loading' => 'Laden...',
|
||||
@@ -1357,7 +1353,7 @@ extension on TranslationsDe {
|
||||
'screens.licenses' => 'Lizenzen',
|
||||
'screens.switchProfile' => 'Profil wechseln',
|
||||
'screens.subtitleStyling' => 'Untertitel-Stil',
|
||||
'screens.mpvConfig' => 'MPV-Konfiguration',
|
||||
'screens.mpvConfig' => 'mpv.conf',
|
||||
'screens.logs' => 'Protokolle',
|
||||
'update.available' => 'Update verfügbar',
|
||||
'update.versionAvailable' => ({required Object version}) => 'Version ${version} ist verfügbar',
|
||||
@@ -1417,7 +1413,7 @@ extension on TranslationsDe {
|
||||
'settings.playerBackend' => 'Player-Backend',
|
||||
'settings.exoPlayer' => 'ExoPlayer (Empfohlen)',
|
||||
'settings.exoPlayerDescription' => 'Android-nativer Player mit besserer Hardware-Unterstützung',
|
||||
'settings.mpv' => 'MPV',
|
||||
'settings.mpv' => 'mpv',
|
||||
'settings.mpvDescription' => 'Erweiterter Player mit mehr Funktionen und ASS-Untertitel-Unterstützung',
|
||||
'settings.hardwareDecoding' => 'Hardware-Decodierung',
|
||||
'settings.hardwareDecodingDescription' => 'Hardwarebeschleunigung verwenden, sofern verfügbar',
|
||||
@@ -1441,6 +1437,8 @@ extension on TranslationsDe {
|
||||
'settings.keyboardShortcutsDescription' => 'Tastenkürzel anpassen',
|
||||
'settings.videoPlayerNavigation' => 'Videoplayer-Navigation',
|
||||
'settings.videoPlayerNavigationDescription' => 'Pfeiltasten zur Navigation der Videoplayer-Steuerung verwenden',
|
||||
'settings.crashReporting' => 'Absturzberichte',
|
||||
'settings.crashReportingDescription' => 'Absturzberichte senden, um die App zu verbessern',
|
||||
'settings.debugLogging' => 'Debug-Protokollierung',
|
||||
'settings.debugLoggingDescription' => 'Detaillierte Protokolle zur Fehleranalyse aktivieren',
|
||||
'settings.viewLogs' => 'Protokolle anzeigen',
|
||||
@@ -1487,6 +1485,8 @@ extension on TranslationsDe {
|
||||
'settings.maxVolumePercent' => ({required Object percent}) => '${percent}%',
|
||||
'settings.discordRichPresence' => 'Discord Rich Presence',
|
||||
'settings.discordRichPresenceDescription' => 'Zeige auf Discord, was du gerade schaust',
|
||||
'settings.autoPip' => 'Automatisches Bild-in-Bild',
|
||||
'settings.autoPipDescription' => 'Automatisch Bild-in-Bild aktivieren, wenn die App während der Wiedergabe verlassen wird',
|
||||
'settings.matchContentFrameRate' => 'Inhalts-Bildrate anpassen',
|
||||
'settings.matchContentFrameRateDescription' => 'Bildwiederholfrequenz des Displays an den Videoinhalt anpassen, reduziert Ruckeln und spart Akku',
|
||||
'settings.tunneledPlayback' => 'Tunneled Playback',
|
||||
@@ -1605,6 +1605,7 @@ extension on TranslationsDe {
|
||||
'videoControls.settingsButton' => 'Videoeinstellungen',
|
||||
'videoControls.audioTrackButton' => 'Tonspuren',
|
||||
'videoControls.subtitlesButton' => 'Untertitel',
|
||||
'videoControls.tracksButton' => 'Audio und Untertitel',
|
||||
'videoControls.chaptersButton' => 'Kapitel',
|
||||
'videoControls.versionsButton' => 'Videoversionen',
|
||||
'videoControls.pipButton' => 'Bild-in-Bild Modus',
|
||||
@@ -1619,10 +1620,13 @@ extension on TranslationsDe {
|
||||
'videoControls.timelineSlider' => 'Video-Zeitleiste',
|
||||
'videoControls.volumeSlider' => 'Lautstärkepegel',
|
||||
'videoControls.endsAt' => ({required Object time}) => 'Endet um ${time}',
|
||||
'videoControls.pipActive' => 'Wiedergabe im Bild-in-Bild-Modus',
|
||||
'videoControls.pipFailed' => 'Bild-in-Bild konnte nicht gestartet werden',
|
||||
'videoControls.pipErrors.androidVersion' => 'Erfordert Android 8.0 oder neuer',
|
||||
'videoControls.pipErrors.iosVersion' => 'Erfordert iOS 15.0 oder neuer',
|
||||
'videoControls.pipErrors.permissionDisabled' => 'Bild-in-Bild-Berechtigung ist deaktiviert. Aktiviere sie unter Einstellungen > Apps > Plezy > Bild-in-Bild',
|
||||
'videoControls.pipErrors.notSupported' => 'Dieses Gerät unterstützt den Bild-in-Bild-Modus nicht',
|
||||
'videoControls.pipErrors.voSwitchFailed' => 'Videoausgabe für Bild-in-Bild konnte nicht umgeschaltet werden',
|
||||
'videoControls.pipErrors.failed' => 'Bild-in-Bild konnte nicht gestartet werden',
|
||||
'videoControls.pipErrors.unknown' => ({required Object error}) => 'Ein Fehler ist aufgetreten: ${error}',
|
||||
'videoControls.chapters' => 'Kapitel',
|
||||
@@ -1674,19 +1678,10 @@ extension on TranslationsDe {
|
||||
'subtitlingStyling.backgroundOpacity' => 'Hintergrunddeckkraft',
|
||||
'subtitlingStyling.backgroundColor' => 'Hintergrundfarbe',
|
||||
'subtitlingStyling.position' => 'Position',
|
||||
'mpvConfig.title' => 'MPV-Konfiguration',
|
||||
'mpvConfig.title' => 'mpv-Konfiguration',
|
||||
'mpvConfig.description' => 'Erweiterte Videoplayer-Einstellungen',
|
||||
'mpvConfig.properties' => 'Eigenschaften',
|
||||
'mpvConfig.presets' => 'Voreinstellungen',
|
||||
'mpvConfig.noProperties' => 'Keine Eigenschaften konfiguriert',
|
||||
'mpvConfig.noPresets' => 'Keine gespeicherten Voreinstellungen',
|
||||
'mpvConfig.addProperty' => 'Eigenschaft hinzufügen',
|
||||
'mpvConfig.editProperty' => 'Eigenschaft bearbeiten',
|
||||
'mpvConfig.deleteProperty' => 'Eigenschaft löschen',
|
||||
'mpvConfig.propertyKey' => 'Eigenschaftsschlüssel',
|
||||
'mpvConfig.propertyKeyHint' => 'z.B. hwdec, demuxer-max-bytes',
|
||||
'mpvConfig.propertyValue' => 'Eigenschaftswert',
|
||||
'mpvConfig.propertyValueHint' => 'z.B. auto, 256000000',
|
||||
'mpvConfig.saveAsPreset' => 'Als Voreinstellung speichern...',
|
||||
'mpvConfig.presetName' => 'Name der Voreinstellung',
|
||||
'mpvConfig.presetNameHint' => 'Namen für diese Voreinstellung eingeben',
|
||||
@@ -1696,8 +1691,7 @@ extension on TranslationsDe {
|
||||
'mpvConfig.presetLoaded' => 'Voreinstellung geladen',
|
||||
'mpvConfig.presetDeleted' => 'Voreinstellung gelöscht',
|
||||
'mpvConfig.confirmDeletePreset' => 'Möchten Sie diese Voreinstellung wirklich löschen?',
|
||||
'mpvConfig.confirmDeleteProperty' => 'Möchten Sie diese Eigenschaft wirklich löschen?',
|
||||
'mpvConfig.entriesCount' => ({required Object count}) => '${count} Einträge',
|
||||
'mpvConfig.configPlaceholder' => 'gpu-api=vulkan\nhwdec=auto\n# comment',
|
||||
'dialog.confirmAction' => 'Aktion bestätigen',
|
||||
'discover.title' => 'Entdecken',
|
||||
'discover.switchProfile' => 'Profil wechseln',
|
||||
@@ -1795,7 +1789,7 @@ extension on TranslationsDe {
|
||||
'licenses.license' => 'Lizenz',
|
||||
'licenses.licenseNumber' => ({required Object number}) => 'Lizenz ${number}',
|
||||
'licenses.licensesCount' => ({required Object count}) => '${count} Lizenzen',
|
||||
'navigation.libraries' => 'Mediatheken',
|
||||
'navigation.libraries' => 'Medien',
|
||||
'navigation.downloads' => 'Downloads',
|
||||
'navigation.liveTv' => 'Live-TV',
|
||||
'liveTv.title' => 'Live-TV',
|
||||
@@ -1813,6 +1807,8 @@ extension on TranslationsDe {
|
||||
'liveTv.premiere' => 'NEU',
|
||||
'liveTv.reloadGuide' => 'Programmführer neu laden',
|
||||
'liveTv.allChannels' => 'Alle Kanäle',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'liveTv.now' => 'Jetzt',
|
||||
'liveTv.today' => 'Heute',
|
||||
'liveTv.midnight' => 'Mitternacht',
|
||||
@@ -1822,8 +1818,6 @@ 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',
|
||||
@@ -1861,7 +1855,6 @@ extension on TranslationsDe {
|
||||
'playlists.itemAdded' => 'Zur Wiedergabeliste hinzugefügt',
|
||||
'playlists.itemRemoved' => 'Aus Wiedergabeliste entfernt',
|
||||
'playlists.selectPlaylist' => 'Wiedergabeliste auswählen',
|
||||
'playlists.createNewPlaylist' => 'Neue Wiedergabeliste erstellen',
|
||||
'playlists.errorCreating' => 'Wiedergabeliste konnte nicht erstellt werden',
|
||||
'playlists.errorDeleting' => 'Wiedergabeliste konnte nicht gelöscht werden',
|
||||
'playlists.errorLoading' => 'Wiedergabelisten konnten nicht geladen werden',
|
||||
@@ -1880,7 +1873,6 @@ extension on TranslationsDe {
|
||||
'collections.deleteFailedWithError' => ({required Object error}) => 'Sammlung konnte nicht gelöscht werden: ${error}',
|
||||
'collections.failedToLoadItems' => ({required Object error}) => 'Sammlungselemente konnten nicht geladen werden: ${error}',
|
||||
'collections.selectCollection' => 'Sammlung auswählen',
|
||||
'collections.createNewCollection' => 'Neue Sammlung erstellen',
|
||||
'collections.collectionName' => 'Sammlungsname',
|
||||
'collections.enterCollectionName' => 'Sammlungsnamen eingeben',
|
||||
'collections.addedToCollection' => 'Zur Sammlung hinzugefügt',
|
||||
|
||||
+43
-64
@@ -190,6 +190,9 @@ class TranslationsCommonEn {
|
||||
/// en: 'Add to...'
|
||||
String get addTo => 'Add to...';
|
||||
|
||||
/// en: 'Create new'
|
||||
String get createNew => 'Create new';
|
||||
|
||||
/// en: 'Remove'
|
||||
String get remove => 'Remove';
|
||||
|
||||
@@ -286,8 +289,8 @@ class TranslationsScreensEn {
|
||||
/// en: 'Subtitle Styling'
|
||||
String get subtitleStyling => 'Subtitle Styling';
|
||||
|
||||
/// en: 'MPV Configuration'
|
||||
String get mpvConfig => 'MPV Configuration';
|
||||
/// en: 'mpv.conf'
|
||||
String get mpvConfig => 'mpv.conf';
|
||||
|
||||
/// en: 'Logs'
|
||||
String get logs => 'Logs';
|
||||
@@ -472,7 +475,7 @@ class TranslationsSettingsEn {
|
||||
/// en: 'Hide Spoilers for Unwatched Episodes'
|
||||
String get hideSpoilers => 'Hide Spoilers for Unwatched Episodes';
|
||||
|
||||
/// en: 'Blur thumbnails and hide descriptions for episodes you haven\'t watched yet'
|
||||
/// en: 'Blur thumbnails and hide descriptions for episodes you haven't watched yet'
|
||||
String get hideSpoilersDescription => 'Blur thumbnails and hide descriptions for episodes you haven\'t watched yet';
|
||||
|
||||
/// en: 'Player Backend'
|
||||
@@ -484,8 +487,8 @@ class TranslationsSettingsEn {
|
||||
/// en: 'Android native player with better hardware support'
|
||||
String get exoPlayerDescription => 'Android native player with better hardware support';
|
||||
|
||||
/// en: 'MPV'
|
||||
String get mpv => 'MPV';
|
||||
/// en: 'mpv'
|
||||
String get mpv => 'mpv';
|
||||
|
||||
/// en: 'Advanced player with more features and ASS subtitle support'
|
||||
String get mpvDescription => 'Advanced player with more features and ASS subtitle support';
|
||||
@@ -556,6 +559,12 @@ class TranslationsSettingsEn {
|
||||
/// en: 'Use arrow keys to navigate video player controls'
|
||||
String get videoPlayerNavigationDescription => 'Use arrow keys to navigate video player controls';
|
||||
|
||||
/// en: 'Crash Reporting'
|
||||
String get crashReporting => 'Crash Reporting';
|
||||
|
||||
/// en: 'Send crash reports to help improve the app'
|
||||
String get crashReportingDescription => 'Send crash reports to help improve the app';
|
||||
|
||||
/// en: 'Debug Logging'
|
||||
String get debugLogging => 'Debug Logging';
|
||||
|
||||
@@ -1071,6 +1080,9 @@ class TranslationsVideoControlsEn {
|
||||
/// en: 'Subtitles'
|
||||
String get subtitlesButton => 'Subtitles';
|
||||
|
||||
/// en: 'Audio & Subtitles'
|
||||
String get tracksButton => 'Audio & Subtitles';
|
||||
|
||||
/// en: 'Chapters'
|
||||
String get chaptersButton => 'Chapters';
|
||||
|
||||
@@ -1113,6 +1125,9 @@ class TranslationsVideoControlsEn {
|
||||
/// en: 'Ends at ${time}'
|
||||
String endsAt({required Object time}) => 'Ends at ${time}';
|
||||
|
||||
/// en: 'Playing in Picture-in-Picture'
|
||||
String get pipActive => 'Playing in Picture-in-Picture';
|
||||
|
||||
/// en: 'Picture-in-picture failed to start'
|
||||
String get pipFailed => 'Picture-in-picture failed to start';
|
||||
|
||||
@@ -1301,45 +1316,18 @@ class TranslationsMpvConfigEn {
|
||||
|
||||
// Translations
|
||||
|
||||
/// en: 'MPV Configuration'
|
||||
String get title => 'MPV Configuration';
|
||||
/// en: 'mpv.conf'
|
||||
String get title => 'mpv.conf';
|
||||
|
||||
/// en: 'Advanced video player settings'
|
||||
String get description => 'Advanced video player settings';
|
||||
|
||||
/// en: 'Properties'
|
||||
String get properties => 'Properties';
|
||||
|
||||
/// en: 'Presets'
|
||||
String get presets => 'Presets';
|
||||
|
||||
/// en: 'No properties configured'
|
||||
String get noProperties => 'No properties configured';
|
||||
|
||||
/// en: 'No saved presets'
|
||||
String get noPresets => 'No saved presets';
|
||||
|
||||
/// en: 'Add Property'
|
||||
String get addProperty => 'Add Property';
|
||||
|
||||
/// en: 'Edit Property'
|
||||
String get editProperty => 'Edit Property';
|
||||
|
||||
/// en: 'Delete Property'
|
||||
String get deleteProperty => 'Delete Property';
|
||||
|
||||
/// en: 'Property Key'
|
||||
String get propertyKey => 'Property Key';
|
||||
|
||||
/// en: 'e.g., hwdec, demuxer-max-bytes'
|
||||
String get propertyKeyHint => 'e.g., hwdec, demuxer-max-bytes';
|
||||
|
||||
/// en: 'Property Value'
|
||||
String get propertyValue => 'Property Value';
|
||||
|
||||
/// en: 'e.g., auto, 256000000'
|
||||
String get propertyValueHint => 'e.g., auto, 256000000';
|
||||
|
||||
/// en: 'Save as Preset...'
|
||||
String get saveAsPreset => 'Save as Preset...';
|
||||
|
||||
@@ -1367,11 +1355,8 @@ class TranslationsMpvConfigEn {
|
||||
/// en: 'Are you sure you want to delete this preset?'
|
||||
String get confirmDeletePreset => 'Are you sure you want to delete this preset?';
|
||||
|
||||
/// en: 'Are you sure you want to delete this property?'
|
||||
String get confirmDeleteProperty => 'Are you sure you want to delete this property?';
|
||||
|
||||
/// en: '${count} entries'
|
||||
String entriesCount({required Object count}) => '${count} entries';
|
||||
/// en: 'gpu-api=vulkan hwdec=auto # comment'
|
||||
String get configPlaceholder => 'gpu-api=vulkan\nhwdec=auto\n# comment';
|
||||
}
|
||||
|
||||
// Path: dialog
|
||||
@@ -1862,9 +1847,6 @@ class TranslationsCollectionsEn {
|
||||
/// en: 'Select Collection'
|
||||
String get selectCollection => 'Select Collection';
|
||||
|
||||
/// en: 'Create New Collection'
|
||||
String get createNewCollection => 'Create New Collection';
|
||||
|
||||
/// en: 'Collection Name'
|
||||
String get collectionName => 'Collection Name';
|
||||
|
||||
@@ -1961,9 +1943,6 @@ class TranslationsPlaylistsEn {
|
||||
/// en: 'Select Playlist'
|
||||
String get selectPlaylist => 'Select Playlist';
|
||||
|
||||
/// en: 'Create New Playlist'
|
||||
String get createNewPlaylist => 'Create New Playlist';
|
||||
|
||||
/// en: 'Failed to create playlist'
|
||||
String get errorCreating => 'Failed to create playlist';
|
||||
|
||||
@@ -2610,12 +2589,18 @@ class TranslationsVideoControlsPipErrorsEn {
|
||||
/// en: 'Requires Android 8.0 or newer'
|
||||
String get androidVersion => 'Requires Android 8.0 or newer';
|
||||
|
||||
/// en: 'Requires iOS 15.0 or newer'
|
||||
String get iosVersion => 'Requires iOS 15.0 or newer';
|
||||
|
||||
/// en: 'Picture-in-picture permission is disabled. Enable it in Settings > Apps > Plezy > Picture-in-picture'
|
||||
String get permissionDisabled => 'Picture-in-picture permission is disabled. Enable it in Settings > Apps > Plezy > Picture-in-picture';
|
||||
|
||||
/// en: 'Device doesn't support picture-in-picture mode'
|
||||
String get notSupported => 'Device doesn\'t support picture-in-picture mode';
|
||||
|
||||
/// en: 'Failed to switch video output for picture-in-picture'
|
||||
String get voSwitchFailed => 'Failed to switch video output for picture-in-picture';
|
||||
|
||||
/// en: 'Picture-in-picture failed to start'
|
||||
String get failed => 'Picture-in-picture failed to start';
|
||||
|
||||
@@ -2807,7 +2792,6 @@ class TranslationsCompanionRemotePairingEn {
|
||||
|
||||
/// en: 'Failed to connect: ${error}'
|
||||
String failedToConnect({required Object error}) => 'Failed to connect: ${error}';
|
||||
|
||||
}
|
||||
|
||||
// Path: companionRemote.remote
|
||||
@@ -2942,6 +2926,7 @@ extension on Translations {
|
||||
'common.delete' => 'Delete',
|
||||
'common.shuffle' => 'Shuffle',
|
||||
'common.addTo' => 'Add to...',
|
||||
'common.createNew' => 'Create new',
|
||||
'common.remove' => 'Remove',
|
||||
'common.paste' => 'Paste',
|
||||
'common.connect' => 'Connect',
|
||||
@@ -2971,7 +2956,7 @@ extension on Translations {
|
||||
'screens.licenses' => 'Licenses',
|
||||
'screens.switchProfile' => 'Switch Profile',
|
||||
'screens.subtitleStyling' => 'Subtitle Styling',
|
||||
'screens.mpvConfig' => 'MPV Configuration',
|
||||
'screens.mpvConfig' => 'mpv.conf',
|
||||
'screens.logs' => 'Logs',
|
||||
'update.available' => 'Update Available',
|
||||
'update.versionAvailable' => ({required Object version}) => 'Version ${version} is available',
|
||||
@@ -3031,7 +3016,7 @@ extension on Translations {
|
||||
'settings.playerBackend' => 'Player Backend',
|
||||
'settings.exoPlayer' => 'ExoPlayer (Recommended)',
|
||||
'settings.exoPlayerDescription' => 'Android native player with better hardware support',
|
||||
'settings.mpv' => 'MPV',
|
||||
'settings.mpv' => 'mpv',
|
||||
'settings.mpvDescription' => 'Advanced player with more features and ASS subtitle support',
|
||||
'settings.hardwareDecoding' => 'Hardware Decoding',
|
||||
'settings.hardwareDecodingDescription' => 'Use hardware acceleration when available',
|
||||
@@ -3055,6 +3040,8 @@ extension on Translations {
|
||||
'settings.keyboardShortcutsDescription' => 'Customize keyboard shortcuts',
|
||||
'settings.videoPlayerNavigation' => 'Video Player Navigation',
|
||||
'settings.videoPlayerNavigationDescription' => 'Use arrow keys to navigate video player controls',
|
||||
'settings.crashReporting' => 'Crash Reporting',
|
||||
'settings.crashReportingDescription' => 'Send crash reports to help improve the app',
|
||||
'settings.debugLogging' => 'Debug Logging',
|
||||
'settings.debugLoggingDescription' => 'Enable detailed logging for troubleshooting',
|
||||
'settings.viewLogs' => 'View Logs',
|
||||
@@ -3221,6 +3208,7 @@ extension on Translations {
|
||||
'videoControls.settingsButton' => 'Video settings',
|
||||
'videoControls.audioTrackButton' => 'Audio tracks',
|
||||
'videoControls.subtitlesButton' => 'Subtitles',
|
||||
'videoControls.tracksButton' => 'Audio & Subtitles',
|
||||
'videoControls.chaptersButton' => 'Chapters',
|
||||
'videoControls.versionsButton' => 'Video versions',
|
||||
'videoControls.pipButton' => 'Picture-in-Picture mode',
|
||||
@@ -3235,10 +3223,13 @@ extension on Translations {
|
||||
'videoControls.timelineSlider' => 'Video timeline',
|
||||
'videoControls.volumeSlider' => 'Volume level',
|
||||
'videoControls.endsAt' => ({required Object time}) => 'Ends at ${time}',
|
||||
'videoControls.pipActive' => 'Playing in Picture-in-Picture',
|
||||
'videoControls.pipFailed' => 'Picture-in-picture failed to start',
|
||||
'videoControls.pipErrors.androidVersion' => 'Requires Android 8.0 or newer',
|
||||
'videoControls.pipErrors.iosVersion' => 'Requires iOS 15.0 or newer',
|
||||
'videoControls.pipErrors.permissionDisabled' => 'Picture-in-picture permission is disabled. Enable it in Settings > Apps > Plezy > Picture-in-picture',
|
||||
'videoControls.pipErrors.notSupported' => 'Device doesn\'t support picture-in-picture mode',
|
||||
'videoControls.pipErrors.voSwitchFailed' => 'Failed to switch video output for picture-in-picture',
|
||||
'videoControls.pipErrors.failed' => 'Picture-in-picture failed to start',
|
||||
'videoControls.pipErrors.unknown' => ({required Object error}) => 'An error occurred: ${error}',
|
||||
'videoControls.chapters' => 'Chapters',
|
||||
@@ -3290,19 +3281,10 @@ extension on Translations {
|
||||
'subtitlingStyling.backgroundOpacity' => 'Background Opacity',
|
||||
'subtitlingStyling.backgroundColor' => 'Background Color',
|
||||
'subtitlingStyling.position' => 'Position',
|
||||
'mpvConfig.title' => 'MPV Configuration',
|
||||
'mpvConfig.title' => 'mpv.conf',
|
||||
'mpvConfig.description' => 'Advanced video player settings',
|
||||
'mpvConfig.properties' => 'Properties',
|
||||
'mpvConfig.presets' => 'Presets',
|
||||
'mpvConfig.noProperties' => 'No properties configured',
|
||||
'mpvConfig.noPresets' => 'No saved presets',
|
||||
'mpvConfig.addProperty' => 'Add Property',
|
||||
'mpvConfig.editProperty' => 'Edit Property',
|
||||
'mpvConfig.deleteProperty' => 'Delete Property',
|
||||
'mpvConfig.propertyKey' => 'Property Key',
|
||||
'mpvConfig.propertyKeyHint' => 'e.g., hwdec, demuxer-max-bytes',
|
||||
'mpvConfig.propertyValue' => 'Property Value',
|
||||
'mpvConfig.propertyValueHint' => 'e.g., auto, 256000000',
|
||||
'mpvConfig.saveAsPreset' => 'Save as Preset...',
|
||||
'mpvConfig.presetName' => 'Preset Name',
|
||||
'mpvConfig.presetNameHint' => 'Enter a name for this preset',
|
||||
@@ -3312,8 +3294,7 @@ extension on Translations {
|
||||
'mpvConfig.presetLoaded' => 'Preset loaded',
|
||||
'mpvConfig.presetDeleted' => 'Preset deleted',
|
||||
'mpvConfig.confirmDeletePreset' => 'Are you sure you want to delete this preset?',
|
||||
'mpvConfig.confirmDeleteProperty' => 'Are you sure you want to delete this property?',
|
||||
'mpvConfig.entriesCount' => ({required Object count}) => '${count} entries',
|
||||
'mpvConfig.configPlaceholder' => 'gpu-api=vulkan\nhwdec=auto\n# comment',
|
||||
'dialog.confirmAction' => 'Confirm Action',
|
||||
'discover.title' => 'Discover',
|
||||
'discover.switchProfile' => 'Switch Profile',
|
||||
@@ -3429,6 +3410,8 @@ extension on Translations {
|
||||
'liveTv.premiere' => 'NEW',
|
||||
'liveTv.reloadGuide' => 'Reload Guide',
|
||||
'liveTv.allChannels' => 'All Channels',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'liveTv.now' => 'Now',
|
||||
'liveTv.today' => 'Today',
|
||||
'liveTv.midnight' => 'Midnight',
|
||||
@@ -3438,8 +3421,6 @@ 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',
|
||||
@@ -3452,7 +3433,6 @@ extension on Translations {
|
||||
'collections.deleteFailedWithError' => ({required Object error}) => 'Failed to delete collection: ${error}',
|
||||
'collections.failedToLoadItems' => ({required Object error}) => 'Failed to load collection items: ${error}',
|
||||
'collections.selectCollection' => 'Select Collection',
|
||||
'collections.createNewCollection' => 'Create New Collection',
|
||||
'collections.collectionName' => 'Collection Name',
|
||||
'collections.enterCollectionName' => 'Enter collection name',
|
||||
'collections.addedToCollection' => 'Added to collection',
|
||||
@@ -3482,7 +3462,6 @@ extension on Translations {
|
||||
'playlists.itemAdded' => 'Added to playlist',
|
||||
'playlists.itemRemoved' => 'Removed from playlist',
|
||||
'playlists.selectPlaylist' => 'Select Playlist',
|
||||
'playlists.createNewPlaylist' => 'Create New Playlist',
|
||||
'playlists.errorCreating' => 'Failed to create playlist',
|
||||
'playlists.errorDeleting' => 'Failed to delete playlist',
|
||||
'playlists.errorLoading' => 'Failed to load playlists',
|
||||
|
||||
+28
-36
@@ -130,6 +130,7 @@ class _TranslationsCommonEs implements TranslationsCommonEn {
|
||||
@override String get delete => 'Eliminar';
|
||||
@override String get shuffle => 'Aleatorio';
|
||||
@override String get addTo => 'Añadir a...';
|
||||
@override String get createNew => 'Crear';
|
||||
@override String get remove => 'Eliminar';
|
||||
@override String get paste => 'Pegar';
|
||||
@override String get connect => 'Conectar';
|
||||
@@ -168,7 +169,7 @@ class _TranslationsScreensEs implements TranslationsScreensEn {
|
||||
@override String get licenses => 'Licencias';
|
||||
@override String get switchProfile => 'Cambiar Perfil';
|
||||
@override String get subtitleStyling => 'Estilo de Subtítulos';
|
||||
@override String get mpvConfig => 'Configuración de MPV';
|
||||
@override String get mpvConfig => 'mpv.conf';
|
||||
@override String get logs => 'Logs';
|
||||
}
|
||||
|
||||
@@ -246,7 +247,7 @@ class _TranslationsSettingsEs implements TranslationsSettingsEn {
|
||||
@override String get playerBackend => 'Reproductor';
|
||||
@override String get exoPlayer => 'ExoPlayer (Recomendado)';
|
||||
@override String get exoPlayerDescription => 'Reproductor nativo de Android con mejor soporte de hardware';
|
||||
@override String get mpv => 'MPV';
|
||||
@override String get mpv => 'mpv';
|
||||
@override String get mpvDescription => 'Reproductor avanzado con más funciones y soporte de subtítulos ASS';
|
||||
@override String get hardwareDecoding => 'Decodificación por Hardware';
|
||||
@override String get hardwareDecodingDescription => 'Usar aceleración por hardware cuando esté disponible';
|
||||
@@ -270,6 +271,8 @@ class _TranslationsSettingsEs implements TranslationsSettingsEn {
|
||||
@override String get keyboardShortcutsDescription => 'Personalizar los atajos de teclado';
|
||||
@override String get videoPlayerNavigation => 'Navegación del Reproductor de Video';
|
||||
@override String get videoPlayerNavigationDescription => 'Usar las teclas de flecha para navegar por los controles del reproductor';
|
||||
@override String get crashReporting => 'Informes de Errores';
|
||||
@override String get crashReportingDescription => 'Enviar informes de errores para mejorar la aplicación';
|
||||
@override String get debugLogging => 'Registro de Depuración';
|
||||
@override String get debugLoggingDescription => 'Habilitar registros detallados para resolución de problemas';
|
||||
@override String get viewLogs => 'Ver Logs';
|
||||
@@ -490,6 +493,7 @@ class _TranslationsVideoControlsEs implements TranslationsVideoControlsEn {
|
||||
@override String get settingsButton => 'Ajustes de video';
|
||||
@override String get audioTrackButton => 'Pistas de audio';
|
||||
@override String get subtitlesButton => 'Subtítulos';
|
||||
@override String get tracksButton => 'Audio y subtítulos';
|
||||
@override String get chaptersButton => 'Capítulos';
|
||||
@override String get versionsButton => 'Versiones de video';
|
||||
@override String get pipButton => 'Modo PiP (Imagen en Imagen)';
|
||||
@@ -504,6 +508,7 @@ class _TranslationsVideoControlsEs implements TranslationsVideoControlsEn {
|
||||
@override String get timelineSlider => 'Línea de tiempo del video';
|
||||
@override String get volumeSlider => 'Nivel de volumen';
|
||||
@override String endsAt({required Object time}) => 'Termina a las ${time}';
|
||||
@override String get pipActive => 'Reproduciendo en Imagen en Imagen';
|
||||
@override String get pipFailed => 'Error al iniciar Imagen en Imagen';
|
||||
@override late final _TranslationsVideoControlsPipErrorsEs pipErrors = _TranslationsVideoControlsPipErrorsEs._(_root);
|
||||
@override String get chapters => 'Capítulos';
|
||||
@@ -591,19 +596,10 @@ class _TranslationsMpvConfigEs implements TranslationsMpvConfigEn {
|
||||
final TranslationsEs _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'Configuración de MPV';
|
||||
@override String get title => 'Configuración de mpv';
|
||||
@override String get description => 'Ajustes avanzados del reproductor de video';
|
||||
@override String get properties => 'Propiedades';
|
||||
@override String get presets => 'Ajustes preestablecidos';
|
||||
@override String get noProperties => 'No hay propiedades configuradas';
|
||||
@override String get noPresets => 'No hay ajustes guardados';
|
||||
@override String get addProperty => 'Añadir Propiedad';
|
||||
@override String get editProperty => 'Editar Propiedad';
|
||||
@override String get deleteProperty => 'Eliminar Propiedad';
|
||||
@override String get propertyKey => 'Clave de la Propiedad';
|
||||
@override String get propertyKeyHint => 'ej., hwdec, demuxer-max-bytes';
|
||||
@override String get propertyValue => 'Valor de la Propiedad';
|
||||
@override String get propertyValueHint => 'ej., auto, 256000000';
|
||||
@override String get saveAsPreset => 'Guardar como Ajuste...';
|
||||
@override String get presetName => 'Nombre del Ajuste';
|
||||
@override String get presetNameHint => 'Introduce un nombre para este ajuste';
|
||||
@@ -613,8 +609,7 @@ class _TranslationsMpvConfigEs implements TranslationsMpvConfigEn {
|
||||
@override String get presetLoaded => 'Ajuste cargado';
|
||||
@override String get presetDeleted => 'Ajuste eliminado';
|
||||
@override String get confirmDeletePreset => '¿Estás seguro de que quieres eliminar este ajuste?';
|
||||
@override String get confirmDeleteProperty => '¿Estás seguro de que quieres eliminar esta propiedad?';
|
||||
@override String entriesCount({required Object count}) => '${count} entradas';
|
||||
@override String get configPlaceholder => 'gpu-api=vulkan\nhwdec=auto\n# comment';
|
||||
}
|
||||
|
||||
// Path: dialog
|
||||
@@ -794,7 +789,7 @@ class _TranslationsNavigationEs implements TranslationsNavigationEn {
|
||||
final TranslationsEs _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get libraries => 'Bibliotecas';
|
||||
@override String get libraries => 'Medios';
|
||||
@override String get downloads => 'Descargas';
|
||||
@override String get liveTv => 'TV en vivo';
|
||||
}
|
||||
@@ -851,7 +846,6 @@ class _TranslationsCollectionsEs implements TranslationsCollectionsEn {
|
||||
@override String deleteFailedWithError({required Object error}) => 'Error al eliminar la colección: ${error}';
|
||||
@override String failedToLoadItems({required Object error}) => 'Error al cargar los elementos de la colección: ${error}';
|
||||
@override String get selectCollection => 'Seleccionar Colección';
|
||||
@override String get createNewCollection => 'Crear Nueva Colección';
|
||||
@override String get collectionName => 'Nombre de la Colección';
|
||||
@override String get enterCollectionName => 'Introduce el nombre de la colección';
|
||||
@override String get addedToCollection => 'Añadido a la colección';
|
||||
@@ -890,7 +884,6 @@ class _TranslationsPlaylistsEs implements TranslationsPlaylistsEn {
|
||||
@override String get itemAdded => 'Añadido a la lista';
|
||||
@override String get itemRemoved => 'Eliminado de la lista';
|
||||
@override String get selectPlaylist => 'Seleccionar Lista';
|
||||
@override String get createNewPlaylist => 'Crear Nueva Lista';
|
||||
@override String get errorCreating => 'Error al crear la lista';
|
||||
@override String get errorDeleting => 'Error al eliminar la lista';
|
||||
@override String get errorLoading => 'Error al cargar las listas';
|
||||
@@ -1162,8 +1155,10 @@ class _TranslationsVideoControlsPipErrorsEs implements TranslationsVideoControls
|
||||
|
||||
// Translations
|
||||
@override String get androidVersion => 'Requiere Android 8.0 o más reciente';
|
||||
@override String get iosVersion => 'Requiere iOS 15.0 o más reciente';
|
||||
@override String get permissionDisabled => 'El permiso de Imagen en Imagen está desactivado. Actívalo en Ajustes > Aplicaciones > Plezy > Imagen en Imagen';
|
||||
@override String get notSupported => 'El dispositivo no soporta el modo Imagen en Imagen';
|
||||
@override String get voSwitchFailed => 'Error al cambiar la salida de video para Imagen en Imagen';
|
||||
@override String get failed => 'Error al iniciar Imagen en Imagen';
|
||||
@override String unknown({required Object error}) => 'Ocurrió un error: ${error}';
|
||||
}
|
||||
@@ -1328,6 +1323,7 @@ extension on TranslationsEs {
|
||||
'common.delete' => 'Eliminar',
|
||||
'common.shuffle' => 'Aleatorio',
|
||||
'common.addTo' => 'Añadir a...',
|
||||
'common.createNew' => 'Crear',
|
||||
'common.remove' => 'Eliminar',
|
||||
'common.paste' => 'Pegar',
|
||||
'common.connect' => 'Conectar',
|
||||
@@ -1357,7 +1353,7 @@ extension on TranslationsEs {
|
||||
'screens.licenses' => 'Licencias',
|
||||
'screens.switchProfile' => 'Cambiar Perfil',
|
||||
'screens.subtitleStyling' => 'Estilo de Subtítulos',
|
||||
'screens.mpvConfig' => 'Configuración de MPV',
|
||||
'screens.mpvConfig' => 'mpv.conf',
|
||||
'screens.logs' => 'Logs',
|
||||
'update.available' => 'Actualización disponible',
|
||||
'update.versionAvailable' => ({required Object version}) => 'Versión ${version} disponible',
|
||||
@@ -1417,7 +1413,7 @@ extension on TranslationsEs {
|
||||
'settings.playerBackend' => 'Reproductor',
|
||||
'settings.exoPlayer' => 'ExoPlayer (Recomendado)',
|
||||
'settings.exoPlayerDescription' => 'Reproductor nativo de Android con mejor soporte de hardware',
|
||||
'settings.mpv' => 'MPV',
|
||||
'settings.mpv' => 'mpv',
|
||||
'settings.mpvDescription' => 'Reproductor avanzado con más funciones y soporte de subtítulos ASS',
|
||||
'settings.hardwareDecoding' => 'Decodificación por Hardware',
|
||||
'settings.hardwareDecodingDescription' => 'Usar aceleración por hardware cuando esté disponible',
|
||||
@@ -1441,6 +1437,8 @@ extension on TranslationsEs {
|
||||
'settings.keyboardShortcutsDescription' => 'Personalizar los atajos de teclado',
|
||||
'settings.videoPlayerNavigation' => 'Navegación del Reproductor de Video',
|
||||
'settings.videoPlayerNavigationDescription' => 'Usar las teclas de flecha para navegar por los controles del reproductor',
|
||||
'settings.crashReporting' => 'Informes de Errores',
|
||||
'settings.crashReportingDescription' => 'Enviar informes de errores para mejorar la aplicación',
|
||||
'settings.debugLogging' => 'Registro de Depuración',
|
||||
'settings.debugLoggingDescription' => 'Habilitar registros detallados para resolución de problemas',
|
||||
'settings.viewLogs' => 'Ver Logs',
|
||||
@@ -1487,6 +1485,8 @@ extension on TranslationsEs {
|
||||
'settings.maxVolumePercent' => ({required Object percent}) => '${percent}%',
|
||||
'settings.discordRichPresence' => 'Presencia de Discord',
|
||||
'settings.discordRichPresenceDescription' => 'Mostrar lo que estás viendo en Discord',
|
||||
'settings.autoPip' => 'Imagen en imagen automática',
|
||||
'settings.autoPipDescription' => 'Activar automáticamente imagen en imagen al salir de la app durante la reproducción',
|
||||
'settings.matchContentFrameRate' => 'Ajustar frecuencia de actualización',
|
||||
'settings.matchContentFrameRateDescription' => 'Ajustar la frecuencia de actualización de la pantalla para que coincida con el video, reduciendo tirones y ahorrando batería',
|
||||
'settings.tunneledPlayback' => 'Tunneled Playback',
|
||||
@@ -1605,6 +1605,7 @@ extension on TranslationsEs {
|
||||
'videoControls.settingsButton' => 'Ajustes de video',
|
||||
'videoControls.audioTrackButton' => 'Pistas de audio',
|
||||
'videoControls.subtitlesButton' => 'Subtítulos',
|
||||
'videoControls.tracksButton' => 'Audio y subtítulos',
|
||||
'videoControls.chaptersButton' => 'Capítulos',
|
||||
'videoControls.versionsButton' => 'Versiones de video',
|
||||
'videoControls.pipButton' => 'Modo PiP (Imagen en Imagen)',
|
||||
@@ -1619,10 +1620,13 @@ extension on TranslationsEs {
|
||||
'videoControls.timelineSlider' => 'Línea de tiempo del video',
|
||||
'videoControls.volumeSlider' => 'Nivel de volumen',
|
||||
'videoControls.endsAt' => ({required Object time}) => 'Termina a las ${time}',
|
||||
'videoControls.pipActive' => 'Reproduciendo en Imagen en Imagen',
|
||||
'videoControls.pipFailed' => 'Error al iniciar Imagen en Imagen',
|
||||
'videoControls.pipErrors.androidVersion' => 'Requiere Android 8.0 o más reciente',
|
||||
'videoControls.pipErrors.iosVersion' => 'Requiere iOS 15.0 o más reciente',
|
||||
'videoControls.pipErrors.permissionDisabled' => 'El permiso de Imagen en Imagen está desactivado. Actívalo en Ajustes > Aplicaciones > Plezy > Imagen en Imagen',
|
||||
'videoControls.pipErrors.notSupported' => 'El dispositivo no soporta el modo Imagen en Imagen',
|
||||
'videoControls.pipErrors.voSwitchFailed' => 'Error al cambiar la salida de video para Imagen en Imagen',
|
||||
'videoControls.pipErrors.failed' => 'Error al iniciar Imagen en Imagen',
|
||||
'videoControls.pipErrors.unknown' => ({required Object error}) => 'Ocurrió un error: ${error}',
|
||||
'videoControls.chapters' => 'Capítulos',
|
||||
@@ -1674,19 +1678,10 @@ extension on TranslationsEs {
|
||||
'subtitlingStyling.backgroundOpacity' => 'Opacidad de Fondo',
|
||||
'subtitlingStyling.backgroundColor' => 'Color de Fondo',
|
||||
'subtitlingStyling.position' => 'Position',
|
||||
'mpvConfig.title' => 'Configuración de MPV',
|
||||
'mpvConfig.title' => 'Configuración de mpv',
|
||||
'mpvConfig.description' => 'Ajustes avanzados del reproductor de video',
|
||||
'mpvConfig.properties' => 'Propiedades',
|
||||
'mpvConfig.presets' => 'Ajustes preestablecidos',
|
||||
'mpvConfig.noProperties' => 'No hay propiedades configuradas',
|
||||
'mpvConfig.noPresets' => 'No hay ajustes guardados',
|
||||
'mpvConfig.addProperty' => 'Añadir Propiedad',
|
||||
'mpvConfig.editProperty' => 'Editar Propiedad',
|
||||
'mpvConfig.deleteProperty' => 'Eliminar Propiedad',
|
||||
'mpvConfig.propertyKey' => 'Clave de la Propiedad',
|
||||
'mpvConfig.propertyKeyHint' => 'ej., hwdec, demuxer-max-bytes',
|
||||
'mpvConfig.propertyValue' => 'Valor de la Propiedad',
|
||||
'mpvConfig.propertyValueHint' => 'ej., auto, 256000000',
|
||||
'mpvConfig.saveAsPreset' => 'Guardar como Ajuste...',
|
||||
'mpvConfig.presetName' => 'Nombre del Ajuste',
|
||||
'mpvConfig.presetNameHint' => 'Introduce un nombre para este ajuste',
|
||||
@@ -1696,8 +1691,7 @@ extension on TranslationsEs {
|
||||
'mpvConfig.presetLoaded' => 'Ajuste cargado',
|
||||
'mpvConfig.presetDeleted' => 'Ajuste eliminado',
|
||||
'mpvConfig.confirmDeletePreset' => '¿Estás seguro de que quieres eliminar este ajuste?',
|
||||
'mpvConfig.confirmDeleteProperty' => '¿Estás seguro de que quieres eliminar esta propiedad?',
|
||||
'mpvConfig.entriesCount' => ({required Object count}) => '${count} entradas',
|
||||
'mpvConfig.configPlaceholder' => 'gpu-api=vulkan\nhwdec=auto\n# comment',
|
||||
'dialog.confirmAction' => 'Confirmar Acción',
|
||||
'discover.title' => 'Descubrir',
|
||||
'discover.switchProfile' => 'Cambiar Perfil',
|
||||
@@ -1795,7 +1789,7 @@ extension on TranslationsEs {
|
||||
'licenses.license' => 'Licencia',
|
||||
'licenses.licenseNumber' => ({required Object number}) => 'Licencia ${number}',
|
||||
'licenses.licensesCount' => ({required Object count}) => '${count} licencias',
|
||||
'navigation.libraries' => 'Bibliotecas',
|
||||
'navigation.libraries' => 'Medios',
|
||||
'navigation.downloads' => 'Descargas',
|
||||
'navigation.liveTv' => 'TV en vivo',
|
||||
'liveTv.title' => 'TV en vivo',
|
||||
@@ -1813,6 +1807,8 @@ extension on TranslationsEs {
|
||||
'liveTv.premiere' => 'NUEVO',
|
||||
'liveTv.reloadGuide' => 'Recargar guía',
|
||||
'liveTv.allChannels' => 'Todos los canales',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'liveTv.now' => 'Ahora',
|
||||
'liveTv.today' => 'Hoy',
|
||||
'liveTv.midnight' => 'Medianoche',
|
||||
@@ -1822,8 +1818,6 @@ 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',
|
||||
@@ -1836,7 +1830,6 @@ extension on TranslationsEs {
|
||||
'collections.deleteFailedWithError' => ({required Object error}) => 'Error al eliminar la colección: ${error}',
|
||||
'collections.failedToLoadItems' => ({required Object error}) => 'Error al cargar los elementos de la colección: ${error}',
|
||||
'collections.selectCollection' => 'Seleccionar Colección',
|
||||
'collections.createNewCollection' => 'Crear Nueva Colección',
|
||||
'collections.collectionName' => 'Nombre de la Colección',
|
||||
'collections.enterCollectionName' => 'Introduce el nombre de la colección',
|
||||
'collections.addedToCollection' => 'Añadido a la colección',
|
||||
@@ -1866,7 +1859,6 @@ extension on TranslationsEs {
|
||||
'playlists.itemAdded' => 'Añadido a la lista',
|
||||
'playlists.itemRemoved' => 'Eliminado de la lista',
|
||||
'playlists.selectPlaylist' => 'Seleccionar Lista',
|
||||
'playlists.createNewPlaylist' => 'Crear Nueva Lista',
|
||||
'playlists.errorCreating' => 'Error al crear la lista',
|
||||
'playlists.errorDeleting' => 'Error al eliminar la lista',
|
||||
'playlists.errorLoading' => 'Error al cargar las listas',
|
||||
|
||||
+34
-42
@@ -130,6 +130,7 @@ class _TranslationsCommonFr implements TranslationsCommonEn {
|
||||
@override String get delete => 'Supprimer';
|
||||
@override String get shuffle => 'Mélanger';
|
||||
@override String get addTo => 'Ajouter à...';
|
||||
@override String get createNew => 'Créer';
|
||||
@override String get remove => 'Supprimer';
|
||||
@override String get paste => 'Coller';
|
||||
@override String get connect => 'Connecter';
|
||||
@@ -141,7 +142,7 @@ class _TranslationsCommonFr implements TranslationsCommonEn {
|
||||
@override String get search => 'Recherche';
|
||||
@override String get home => 'Accueil';
|
||||
@override String get back => 'Retour';
|
||||
@override String get settings => 'Paramètres';
|
||||
@override String get settings => 'Réglages';
|
||||
@override String get mute => 'Muet';
|
||||
@override String get ok => 'OK';
|
||||
@override String get loading => 'Chargement...';
|
||||
@@ -168,7 +169,7 @@ class _TranslationsScreensFr implements TranslationsScreensEn {
|
||||
@override String get licenses => 'Licenses';
|
||||
@override String get switchProfile => 'Changer de profil';
|
||||
@override String get subtitleStyling => 'Configuration des sous-titres';
|
||||
@override String get mpvConfig => 'Configuration MPV';
|
||||
@override String get mpvConfig => 'mpv.conf';
|
||||
@override String get logs => 'Logs';
|
||||
}
|
||||
|
||||
@@ -246,7 +247,7 @@ class _TranslationsSettingsFr implements TranslationsSettingsEn {
|
||||
@override String get playerBackend => 'Moteur de lecture';
|
||||
@override String get exoPlayer => 'ExoPlayer (Recommandé)';
|
||||
@override String get exoPlayerDescription => 'Lecteur natif Android avec meilleur support matériel';
|
||||
@override String get mpv => 'MPV';
|
||||
@override String get mpv => 'mpv';
|
||||
@override String get mpvDescription => 'Lecteur avancé avec plus de fonctionnalités et support des sous-titres ASS';
|
||||
@override String get hardwareDecoding => 'Décodage matériel';
|
||||
@override String get hardwareDecodingDescription => 'Utilisez l\'accélération matérielle lorsqu\'elle est disponible.';
|
||||
@@ -270,6 +271,8 @@ class _TranslationsSettingsFr implements TranslationsSettingsEn {
|
||||
@override String get keyboardShortcutsDescription => 'Personnaliser les raccourcis clavier';
|
||||
@override String get videoPlayerNavigation => 'Navigation dans le lecteur vidéo';
|
||||
@override String get videoPlayerNavigationDescription => 'Utilisez les touches fléchées pour naviguer dans les commandes du lecteur vidéo.';
|
||||
@override String get crashReporting => 'Rapports de plantage';
|
||||
@override String get crashReportingDescription => 'Envoyer des rapports de plantage pour améliorer l\'application';
|
||||
@override String get debugLogging => 'Journalisation de débogage';
|
||||
@override String get debugLoggingDescription => 'Activer la journalisation détaillée pour le dépannage';
|
||||
@override String get viewLogs => 'Voir les logs';
|
||||
@@ -490,6 +493,7 @@ class _TranslationsVideoControlsFr implements TranslationsVideoControlsEn {
|
||||
@override String get settingsButton => 'Paramètres vidéo';
|
||||
@override String get audioTrackButton => 'Pistes audio';
|
||||
@override String get subtitlesButton => 'Sous-titres';
|
||||
@override String get tracksButton => 'Audio et sous-titres';
|
||||
@override String get chaptersButton => 'Chapitres';
|
||||
@override String get versionsButton => 'Versions vidéo';
|
||||
@override String get pipButton => 'Mode PiP (Picture-in-Picture)';
|
||||
@@ -504,6 +508,7 @@ class _TranslationsVideoControlsFr implements TranslationsVideoControlsEn {
|
||||
@override String get timelineSlider => 'Timeline vidéo';
|
||||
@override String get volumeSlider => 'Niveau sonore';
|
||||
@override String endsAt({required Object time}) => 'Fin à ${time}';
|
||||
@override String get pipActive => 'Lecture en mode image dans l\'image';
|
||||
@override String get pipFailed => 'Échec du démarrage du mode image dans l\'image';
|
||||
@override late final _TranslationsVideoControlsPipErrorsFr pipErrors = _TranslationsVideoControlsPipErrorsFr._(_root);
|
||||
@override String get chapters => 'Chapitres';
|
||||
@@ -591,19 +596,10 @@ class _TranslationsMpvConfigFr implements TranslationsMpvConfigEn {
|
||||
final TranslationsFr _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'Configuration MPV';
|
||||
@override String get title => 'Configuration mpv';
|
||||
@override String get description => 'Paramètres avancés du lecteur vidéo';
|
||||
@override String get properties => 'Propriétés';
|
||||
@override String get presets => 'Préréglages';
|
||||
@override String get noProperties => 'Aucune propriété configurée';
|
||||
@override String get noPresets => 'Aucun préréglage enregistré';
|
||||
@override String get addProperty => 'Ajouter une propriété';
|
||||
@override String get editProperty => 'Modifier la propriété';
|
||||
@override String get deleteProperty => 'Supprimer la propriété';
|
||||
@override String get propertyKey => 'Clé';
|
||||
@override String get propertyKeyHint => 'e.g., hwdec, demuxer-max-bytes';
|
||||
@override String get propertyValue => 'Valeur';
|
||||
@override String get propertyValueHint => 'e.g., auto, 256000000';
|
||||
@override String get saveAsPreset => 'Enregistrer comme préréglage...';
|
||||
@override String get presetName => 'Nom du préréglage';
|
||||
@override String get presetNameHint => 'Entrez un nom pour ce préréglage';
|
||||
@@ -613,8 +609,7 @@ class _TranslationsMpvConfigFr implements TranslationsMpvConfigEn {
|
||||
@override String get presetLoaded => 'Préréglage chargé';
|
||||
@override String get presetDeleted => 'Préréglage supprimé';
|
||||
@override String get confirmDeletePreset => 'Êtes-vous sûr de vouloir supprimer ce préréglage ?';
|
||||
@override String get confirmDeleteProperty => 'Êtes-vous sûr de vouloir supprimer cette propriété ?';
|
||||
@override String entriesCount({required Object count}) => '${count} entrées';
|
||||
@override String get configPlaceholder => 'gpu-api=vulkan\nhwdec=auto\n# comment';
|
||||
}
|
||||
|
||||
// Path: dialog
|
||||
@@ -794,9 +789,9 @@ class _TranslationsNavigationFr implements TranslationsNavigationEn {
|
||||
final TranslationsFr _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get libraries => 'Bibliothèques';
|
||||
@override String get downloads => 'Téléchargements';
|
||||
@override String get liveTv => 'TV en direct';
|
||||
@override String get libraries => 'Medias';
|
||||
@override String get downloads => 'Téléch.';
|
||||
@override String get liveTv => 'TV direct';
|
||||
}
|
||||
|
||||
// Path: liveTv
|
||||
@@ -851,7 +846,6 @@ class _TranslationsCollectionsFr implements TranslationsCollectionsEn {
|
||||
@override String deleteFailedWithError({required Object error}) => 'Échec de la suppression de la collection: ${error}';
|
||||
@override String failedToLoadItems({required Object error}) => 'Échec du chargement des éléments de la collection: ${error}';
|
||||
@override String get selectCollection => 'Sélectionner une collection';
|
||||
@override String get createNewCollection => 'Créer une nouvelle collection';
|
||||
@override String get collectionName => 'Nom de la collection';
|
||||
@override String get enterCollectionName => 'Entrez le nom de la collection';
|
||||
@override String get addedToCollection => 'Ajouté à la collection';
|
||||
@@ -890,7 +884,6 @@ class _TranslationsPlaylistsFr implements TranslationsPlaylistsEn {
|
||||
@override String get itemAdded => 'Ajouté à la playlist';
|
||||
@override String get itemRemoved => 'Retiré de la playlist';
|
||||
@override String get selectPlaylist => 'Select Playlist';
|
||||
@override String get createNewPlaylist => 'Créer une nouvelle playlist';
|
||||
@override String get errorCreating => 'Échec de la création de playlist';
|
||||
@override String get errorDeleting => 'Échec de suppression de playlist';
|
||||
@override String get errorLoading => 'Échec de chargement de playlists';
|
||||
@@ -1162,8 +1155,10 @@ class _TranslationsVideoControlsPipErrorsFr implements TranslationsVideoControls
|
||||
|
||||
// Translations
|
||||
@override String get androidVersion => 'Nécessite Android 8.0 ou plus récent';
|
||||
@override String get iosVersion => 'Nécessite iOS 15.0 ou plus récent';
|
||||
@override String get permissionDisabled => 'L\'autorisation Image dans l\'image est désactivée. Activez-la dans Paramètres > Applications > Plezy > Image dans l\'image';
|
||||
@override String get notSupported => 'Cet appareil ne prend pas en charge le mode image dans l\'image';
|
||||
@override String get voSwitchFailed => 'Échec du changement de sortie vidéo pour l\'image dans l\'image';
|
||||
@override String get failed => 'Échec du démarrage du mode image dans l\'image';
|
||||
@override String unknown({required Object error}) => 'Une erreur s\'est produite : ${error}';
|
||||
}
|
||||
@@ -1328,6 +1323,7 @@ extension on TranslationsFr {
|
||||
'common.delete' => 'Supprimer',
|
||||
'common.shuffle' => 'Mélanger',
|
||||
'common.addTo' => 'Ajouter à...',
|
||||
'common.createNew' => 'Créer',
|
||||
'common.remove' => 'Supprimer',
|
||||
'common.paste' => 'Coller',
|
||||
'common.connect' => 'Connecter',
|
||||
@@ -1339,7 +1335,7 @@ extension on TranslationsFr {
|
||||
'common.search' => 'Recherche',
|
||||
'common.home' => 'Accueil',
|
||||
'common.back' => 'Retour',
|
||||
'common.settings' => 'Paramètres',
|
||||
'common.settings' => 'Réglages',
|
||||
'common.mute' => 'Muet',
|
||||
'common.ok' => 'OK',
|
||||
'common.loading' => 'Chargement...',
|
||||
@@ -1357,7 +1353,7 @@ extension on TranslationsFr {
|
||||
'screens.licenses' => 'Licenses',
|
||||
'screens.switchProfile' => 'Changer de profil',
|
||||
'screens.subtitleStyling' => 'Configuration des sous-titres',
|
||||
'screens.mpvConfig' => 'Configuration MPV',
|
||||
'screens.mpvConfig' => 'mpv.conf',
|
||||
'screens.logs' => 'Logs',
|
||||
'update.available' => 'Mise à jour disponible',
|
||||
'update.versionAvailable' => ({required Object version}) => 'Version ${version} disponible',
|
||||
@@ -1417,7 +1413,7 @@ extension on TranslationsFr {
|
||||
'settings.playerBackend' => 'Moteur de lecture',
|
||||
'settings.exoPlayer' => 'ExoPlayer (Recommandé)',
|
||||
'settings.exoPlayerDescription' => 'Lecteur natif Android avec meilleur support matériel',
|
||||
'settings.mpv' => 'MPV',
|
||||
'settings.mpv' => 'mpv',
|
||||
'settings.mpvDescription' => 'Lecteur avancé avec plus de fonctionnalités et support des sous-titres ASS',
|
||||
'settings.hardwareDecoding' => 'Décodage matériel',
|
||||
'settings.hardwareDecodingDescription' => 'Utilisez l\'accélération matérielle lorsqu\'elle est disponible.',
|
||||
@@ -1441,6 +1437,8 @@ extension on TranslationsFr {
|
||||
'settings.keyboardShortcutsDescription' => 'Personnaliser les raccourcis clavier',
|
||||
'settings.videoPlayerNavigation' => 'Navigation dans le lecteur vidéo',
|
||||
'settings.videoPlayerNavigationDescription' => 'Utilisez les touches fléchées pour naviguer dans les commandes du lecteur vidéo.',
|
||||
'settings.crashReporting' => 'Rapports de plantage',
|
||||
'settings.crashReportingDescription' => 'Envoyer des rapports de plantage pour améliorer l\'application',
|
||||
'settings.debugLogging' => 'Journalisation de débogage',
|
||||
'settings.debugLoggingDescription' => 'Activer la journalisation détaillée pour le dépannage',
|
||||
'settings.viewLogs' => 'Voir les logs',
|
||||
@@ -1487,6 +1485,8 @@ extension on TranslationsFr {
|
||||
'settings.maxVolumePercent' => ({required Object percent}) => '${percent}%',
|
||||
'settings.discordRichPresence' => 'Discord Rich Presence',
|
||||
'settings.discordRichPresenceDescription' => 'Montrez ce que vous regardez sur Discord',
|
||||
'settings.autoPip' => 'Image dans l\'image automatique',
|
||||
'settings.autoPipDescription' => 'Activer automatiquement l\'image dans l\'image en quittant l\'application pendant la lecture',
|
||||
'settings.matchContentFrameRate' => 'Fréquence d\'images du contenu correspondant',
|
||||
'settings.matchContentFrameRateDescription' => 'Ajustez la fréquence de rafraîchissement de l\'écran en fonction du contenu vidéo, ce qui réduit les saccades et économise la batterie',
|
||||
'settings.tunneledPlayback' => 'Tunneled Playback',
|
||||
@@ -1605,6 +1605,7 @@ extension on TranslationsFr {
|
||||
'videoControls.settingsButton' => 'Paramètres vidéo',
|
||||
'videoControls.audioTrackButton' => 'Pistes audio',
|
||||
'videoControls.subtitlesButton' => 'Sous-titres',
|
||||
'videoControls.tracksButton' => 'Audio et sous-titres',
|
||||
'videoControls.chaptersButton' => 'Chapitres',
|
||||
'videoControls.versionsButton' => 'Versions vidéo',
|
||||
'videoControls.pipButton' => 'Mode PiP (Picture-in-Picture)',
|
||||
@@ -1619,10 +1620,13 @@ extension on TranslationsFr {
|
||||
'videoControls.timelineSlider' => 'Timeline vidéo',
|
||||
'videoControls.volumeSlider' => 'Niveau sonore',
|
||||
'videoControls.endsAt' => ({required Object time}) => 'Fin à ${time}',
|
||||
'videoControls.pipActive' => 'Lecture en mode image dans l\'image',
|
||||
'videoControls.pipFailed' => 'Échec du démarrage du mode image dans l\'image',
|
||||
'videoControls.pipErrors.androidVersion' => 'Nécessite Android 8.0 ou plus récent',
|
||||
'videoControls.pipErrors.iosVersion' => 'Nécessite iOS 15.0 ou plus récent',
|
||||
'videoControls.pipErrors.permissionDisabled' => 'L\'autorisation Image dans l\'image est désactivée. Activez-la dans Paramètres > Applications > Plezy > Image dans l\'image',
|
||||
'videoControls.pipErrors.notSupported' => 'Cet appareil ne prend pas en charge le mode image dans l\'image',
|
||||
'videoControls.pipErrors.voSwitchFailed' => 'Échec du changement de sortie vidéo pour l\'image dans l\'image',
|
||||
'videoControls.pipErrors.failed' => 'Échec du démarrage du mode image dans l\'image',
|
||||
'videoControls.pipErrors.unknown' => ({required Object error}) => 'Une erreur s\'est produite : ${error}',
|
||||
'videoControls.chapters' => 'Chapitres',
|
||||
@@ -1674,19 +1678,10 @@ extension on TranslationsFr {
|
||||
'subtitlingStyling.backgroundOpacity' => 'Opacité d\'arrière-plan',
|
||||
'subtitlingStyling.backgroundColor' => 'Couleur d\'arrière-plan',
|
||||
'subtitlingStyling.position' => 'Position',
|
||||
'mpvConfig.title' => 'Configuration MPV',
|
||||
'mpvConfig.title' => 'Configuration mpv',
|
||||
'mpvConfig.description' => 'Paramètres avancés du lecteur vidéo',
|
||||
'mpvConfig.properties' => 'Propriétés',
|
||||
'mpvConfig.presets' => 'Préréglages',
|
||||
'mpvConfig.noProperties' => 'Aucune propriété configurée',
|
||||
'mpvConfig.noPresets' => 'Aucun préréglage enregistré',
|
||||
'mpvConfig.addProperty' => 'Ajouter une propriété',
|
||||
'mpvConfig.editProperty' => 'Modifier la propriété',
|
||||
'mpvConfig.deleteProperty' => 'Supprimer la propriété',
|
||||
'mpvConfig.propertyKey' => 'Clé',
|
||||
'mpvConfig.propertyKeyHint' => 'e.g., hwdec, demuxer-max-bytes',
|
||||
'mpvConfig.propertyValue' => 'Valeur',
|
||||
'mpvConfig.propertyValueHint' => 'e.g., auto, 256000000',
|
||||
'mpvConfig.saveAsPreset' => 'Enregistrer comme préréglage...',
|
||||
'mpvConfig.presetName' => 'Nom du préréglage',
|
||||
'mpvConfig.presetNameHint' => 'Entrez un nom pour ce préréglage',
|
||||
@@ -1696,8 +1691,7 @@ extension on TranslationsFr {
|
||||
'mpvConfig.presetLoaded' => 'Préréglage chargé',
|
||||
'mpvConfig.presetDeleted' => 'Préréglage supprimé',
|
||||
'mpvConfig.confirmDeletePreset' => 'Êtes-vous sûr de vouloir supprimer ce préréglage ?',
|
||||
'mpvConfig.confirmDeleteProperty' => 'Êtes-vous sûr de vouloir supprimer cette propriété ?',
|
||||
'mpvConfig.entriesCount' => ({required Object count}) => '${count} entrées',
|
||||
'mpvConfig.configPlaceholder' => 'gpu-api=vulkan\nhwdec=auto\n# comment',
|
||||
'dialog.confirmAction' => 'Confirmer l\'action',
|
||||
'discover.title' => 'Découvrez',
|
||||
'discover.switchProfile' => 'Changer de profil',
|
||||
@@ -1795,9 +1789,9 @@ extension on TranslationsFr {
|
||||
'licenses.license' => 'Licence',
|
||||
'licenses.licenseNumber' => ({required Object number}) => 'Licence ${number}',
|
||||
'licenses.licensesCount' => ({required Object count}) => '${count} licences',
|
||||
'navigation.libraries' => 'Bibliothèques',
|
||||
'navigation.downloads' => 'Téléchargements',
|
||||
'navigation.liveTv' => 'TV en direct',
|
||||
'navigation.libraries' => 'Medias',
|
||||
'navigation.downloads' => 'Téléch.',
|
||||
'navigation.liveTv' => 'TV direct',
|
||||
'liveTv.title' => 'TV en direct',
|
||||
'liveTv.channels' => 'Chaînes',
|
||||
'liveTv.guide' => 'Guide',
|
||||
@@ -1813,6 +1807,8 @@ extension on TranslationsFr {
|
||||
'liveTv.premiere' => 'NOUVEAU',
|
||||
'liveTv.reloadGuide' => 'Recharger le guide',
|
||||
'liveTv.allChannels' => 'Toutes les chaînes',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'liveTv.now' => 'Maintenant',
|
||||
'liveTv.today' => 'Aujourd\'hui',
|
||||
'liveTv.midnight' => 'Minuit',
|
||||
@@ -1822,8 +1818,6 @@ 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',
|
||||
@@ -1836,7 +1830,6 @@ extension on TranslationsFr {
|
||||
'collections.deleteFailedWithError' => ({required Object error}) => 'Échec de la suppression de la collection: ${error}',
|
||||
'collections.failedToLoadItems' => ({required Object error}) => 'Échec du chargement des éléments de la collection: ${error}',
|
||||
'collections.selectCollection' => 'Sélectionner une collection',
|
||||
'collections.createNewCollection' => 'Créer une nouvelle collection',
|
||||
'collections.collectionName' => 'Nom de la collection',
|
||||
'collections.enterCollectionName' => 'Entrez le nom de la collection',
|
||||
'collections.addedToCollection' => 'Ajouté à la collection',
|
||||
@@ -1866,7 +1859,6 @@ extension on TranslationsFr {
|
||||
'playlists.itemAdded' => 'Ajouté à la playlist',
|
||||
'playlists.itemRemoved' => 'Retiré de la playlist',
|
||||
'playlists.selectPlaylist' => 'Select Playlist',
|
||||
'playlists.createNewPlaylist' => 'Créer une nouvelle playlist',
|
||||
'playlists.errorCreating' => 'Échec de la création de playlist',
|
||||
'playlists.errorDeleting' => 'Échec de suppression de playlist',
|
||||
'playlists.errorLoading' => 'Échec de chargement de playlists',
|
||||
|
||||
+30
-38
@@ -130,6 +130,7 @@ class _TranslationsCommonIt implements TranslationsCommonEn {
|
||||
@override String get delete => 'Elimina';
|
||||
@override String get shuffle => 'Casuale';
|
||||
@override String get addTo => 'Aggiungi a...';
|
||||
@override String get createNew => 'Crea';
|
||||
@override String get remove => 'Rimuovi';
|
||||
@override String get paste => 'Incolla';
|
||||
@override String get connect => 'Connetti';
|
||||
@@ -141,7 +142,7 @@ class _TranslationsCommonIt implements TranslationsCommonEn {
|
||||
@override String get search => 'Cerca';
|
||||
@override String get home => 'Home';
|
||||
@override String get back => 'Indietro';
|
||||
@override String get settings => 'Impostazioni';
|
||||
@override String get settings => 'Opzioni';
|
||||
@override String get mute => 'Muto';
|
||||
@override String get ok => 'OK';
|
||||
@override String get loading => 'Caricamento...';
|
||||
@@ -168,7 +169,7 @@ class _TranslationsScreensIt implements TranslationsScreensEn {
|
||||
@override String get licenses => 'Licenze';
|
||||
@override String get switchProfile => 'Cambia profilo';
|
||||
@override String get subtitleStyling => 'Stile sottotitoli';
|
||||
@override String get mpvConfig => 'Configurazione MPV';
|
||||
@override String get mpvConfig => 'mpv.conf';
|
||||
@override String get logs => 'Registro';
|
||||
}
|
||||
|
||||
@@ -246,7 +247,7 @@ class _TranslationsSettingsIt implements TranslationsSettingsEn {
|
||||
@override String get playerBackend => 'Motore di riproduzione';
|
||||
@override String get exoPlayer => 'ExoPlayer (Consigliato)';
|
||||
@override String get exoPlayerDescription => 'Lettore nativo Android con migliore supporto hardware';
|
||||
@override String get mpv => 'MPV';
|
||||
@override String get mpv => 'mpv';
|
||||
@override String get mpvDescription => 'Lettore avanzato con più funzionalità e supporto sottotitoli ASS';
|
||||
@override String get hardwareDecoding => 'Decodifica Hardware';
|
||||
@override String get hardwareDecodingDescription => 'Utilizza l\'accelerazione hardware quando disponibile';
|
||||
@@ -270,6 +271,8 @@ class _TranslationsSettingsIt implements TranslationsSettingsEn {
|
||||
@override String get keyboardShortcutsDescription => 'Personalizza le scorciatoie da tastiera';
|
||||
@override String get videoPlayerNavigation => 'Navigazione del lettore video';
|
||||
@override String get videoPlayerNavigationDescription => 'Usa i tasti freccia per navigare nei controlli del lettore video';
|
||||
@override String get crashReporting => 'Segnalazione errori';
|
||||
@override String get crashReportingDescription => 'Invia segnalazioni di errori per migliorare l\'app';
|
||||
@override String get debugLogging => 'Log di debug';
|
||||
@override String get debugLoggingDescription => 'Abilita il logging dettagliato per la risoluzione dei problemi';
|
||||
@override String get viewLogs => 'Visualizza log';
|
||||
@@ -490,6 +493,7 @@ class _TranslationsVideoControlsIt implements TranslationsVideoControlsEn {
|
||||
@override String get settingsButton => 'Impostazioni video';
|
||||
@override String get audioTrackButton => 'Tracce audio';
|
||||
@override String get subtitlesButton => 'Sottotitoli';
|
||||
@override String get tracksButton => 'Audio e sottotitoli';
|
||||
@override String get chaptersButton => 'Capitoli';
|
||||
@override String get versionsButton => 'Versioni video';
|
||||
@override String get pipButton => 'Modalità Picture-in-Picture';
|
||||
@@ -504,6 +508,7 @@ class _TranslationsVideoControlsIt implements TranslationsVideoControlsEn {
|
||||
@override String get timelineSlider => 'Timeline video';
|
||||
@override String get volumeSlider => 'Livello volume';
|
||||
@override String endsAt({required Object time}) => 'Finisce alle ${time}';
|
||||
@override String get pipActive => 'Riproduzione in Picture-in-Picture';
|
||||
@override String get pipFailed => 'Impossibile avviare la modalità Picture-in-Picture';
|
||||
@override late final _TranslationsVideoControlsPipErrorsIt pipErrors = _TranslationsVideoControlsPipErrorsIt._(_root);
|
||||
@override String get chapters => 'Capitoli';
|
||||
@@ -591,19 +596,10 @@ class _TranslationsMpvConfigIt implements TranslationsMpvConfigEn {
|
||||
final TranslationsIt _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'Configurazione MPV';
|
||||
@override String get title => 'Configurazione mpv';
|
||||
@override String get description => 'Impostazioni avanzate del lettore video';
|
||||
@override String get properties => 'Proprietà';
|
||||
@override String get presets => 'Preset';
|
||||
@override String get noProperties => 'Nessuna proprietà configurata';
|
||||
@override String get noPresets => 'Nessun preset salvato';
|
||||
@override String get addProperty => 'Aggiungi proprietà';
|
||||
@override String get editProperty => 'Modifica proprietà';
|
||||
@override String get deleteProperty => 'Elimina proprietà';
|
||||
@override String get propertyKey => 'Chiave proprietà';
|
||||
@override String get propertyKeyHint => 'es. hwdec, demuxer-max-bytes';
|
||||
@override String get propertyValue => 'Valore proprietà';
|
||||
@override String get propertyValueHint => 'es. auto, 256000000';
|
||||
@override String get saveAsPreset => 'Salva come preset...';
|
||||
@override String get presetName => 'Nome preset';
|
||||
@override String get presetNameHint => 'Inserisci un nome per questo preset';
|
||||
@@ -613,8 +609,7 @@ class _TranslationsMpvConfigIt implements TranslationsMpvConfigEn {
|
||||
@override String get presetLoaded => 'Preset caricato';
|
||||
@override String get presetDeleted => 'Preset eliminato';
|
||||
@override String get confirmDeletePreset => 'Sei sicuro di voler eliminare questo preset?';
|
||||
@override String get confirmDeleteProperty => 'Sei sicuro di voler eliminare questa proprietà?';
|
||||
@override String entriesCount({required Object count}) => '${count} voci';
|
||||
@override String get configPlaceholder => 'gpu-api=vulkan\nhwdec=auto\n# comment';
|
||||
}
|
||||
|
||||
// Path: dialog
|
||||
@@ -796,7 +791,7 @@ class _TranslationsNavigationIt implements TranslationsNavigationEn {
|
||||
// Translations
|
||||
@override String get libraries => 'Librerie';
|
||||
@override String get downloads => 'Download';
|
||||
@override String get liveTv => 'TV in diretta';
|
||||
@override String get liveTv => 'TV Live';
|
||||
}
|
||||
|
||||
// Path: liveTv
|
||||
@@ -885,7 +880,6 @@ class _TranslationsPlaylistsIt implements TranslationsPlaylistsEn {
|
||||
@override String get itemAdded => 'Aggiunto alla playlist';
|
||||
@override String get itemRemoved => 'Rimosso dalla playlist';
|
||||
@override String get selectPlaylist => 'Seleziona playlist';
|
||||
@override String get createNewPlaylist => 'Crea nuova playlist';
|
||||
@override String get errorCreating => 'Errore durante la creazione della playlist';
|
||||
@override String get errorDeleting => 'Errore durante l\'eliminazione della playlist';
|
||||
@override String get errorLoading => 'Errore durante il caricamento delle playlist';
|
||||
@@ -913,7 +907,6 @@ class _TranslationsCollectionsIt implements TranslationsCollectionsEn {
|
||||
@override String deleteFailedWithError({required Object error}) => 'Impossibile eliminare la raccolta: ${error}';
|
||||
@override String failedToLoadItems({required Object error}) => 'Impossibile caricare gli elementi della raccolta: ${error}';
|
||||
@override String get selectCollection => 'Seleziona raccolta';
|
||||
@override String get createNewCollection => 'Crea nuova raccolta';
|
||||
@override String get collectionName => 'Nome raccolta';
|
||||
@override String get enterCollectionName => 'Inserisci nome raccolta';
|
||||
@override String get addedToCollection => 'Aggiunto alla raccolta';
|
||||
@@ -1162,8 +1155,10 @@ class _TranslationsVideoControlsPipErrorsIt implements TranslationsVideoControls
|
||||
|
||||
// Translations
|
||||
@override String get androidVersion => 'Richiede Android 8.0 o versioni successive';
|
||||
@override String get iosVersion => 'Richiede iOS 15.0 o versioni successive';
|
||||
@override String get permissionDisabled => 'L\'autorizzazione Picture-in-Picture è disabilitata. Abilitala in Impostazioni > App > Plezy > Picture-in-Picture';
|
||||
@override String get notSupported => 'Questo dispositivo non supporta la modalità Picture-in-Picture';
|
||||
@override String get voSwitchFailed => 'Impossibile cambiare l\'uscita video per Picture-in-Picture';
|
||||
@override String get failed => 'Impossibile avviare la modalità Picture-in-Picture';
|
||||
@override String unknown({required Object error}) => 'Si è verificato un errore: ${error}';
|
||||
}
|
||||
@@ -1328,6 +1323,7 @@ extension on TranslationsIt {
|
||||
'common.delete' => 'Elimina',
|
||||
'common.shuffle' => 'Casuale',
|
||||
'common.addTo' => 'Aggiungi a...',
|
||||
'common.createNew' => 'Crea',
|
||||
'common.remove' => 'Rimuovi',
|
||||
'common.paste' => 'Incolla',
|
||||
'common.connect' => 'Connetti',
|
||||
@@ -1339,7 +1335,7 @@ extension on TranslationsIt {
|
||||
'common.search' => 'Cerca',
|
||||
'common.home' => 'Home',
|
||||
'common.back' => 'Indietro',
|
||||
'common.settings' => 'Impostazioni',
|
||||
'common.settings' => 'Opzioni',
|
||||
'common.mute' => 'Muto',
|
||||
'common.ok' => 'OK',
|
||||
'common.loading' => 'Caricamento...',
|
||||
@@ -1357,7 +1353,7 @@ extension on TranslationsIt {
|
||||
'screens.licenses' => 'Licenze',
|
||||
'screens.switchProfile' => 'Cambia profilo',
|
||||
'screens.subtitleStyling' => 'Stile sottotitoli',
|
||||
'screens.mpvConfig' => 'Configurazione MPV',
|
||||
'screens.mpvConfig' => 'mpv.conf',
|
||||
'screens.logs' => 'Registro',
|
||||
'update.available' => 'Aggiornamento disponibile',
|
||||
'update.versionAvailable' => ({required Object version}) => 'Versione ${version} disponibile',
|
||||
@@ -1417,7 +1413,7 @@ extension on TranslationsIt {
|
||||
'settings.playerBackend' => 'Motore di riproduzione',
|
||||
'settings.exoPlayer' => 'ExoPlayer (Consigliato)',
|
||||
'settings.exoPlayerDescription' => 'Lettore nativo Android con migliore supporto hardware',
|
||||
'settings.mpv' => 'MPV',
|
||||
'settings.mpv' => 'mpv',
|
||||
'settings.mpvDescription' => 'Lettore avanzato con più funzionalità e supporto sottotitoli ASS',
|
||||
'settings.hardwareDecoding' => 'Decodifica Hardware',
|
||||
'settings.hardwareDecodingDescription' => 'Utilizza l\'accelerazione hardware quando disponibile',
|
||||
@@ -1441,6 +1437,8 @@ extension on TranslationsIt {
|
||||
'settings.keyboardShortcutsDescription' => 'Personalizza le scorciatoie da tastiera',
|
||||
'settings.videoPlayerNavigation' => 'Navigazione del lettore video',
|
||||
'settings.videoPlayerNavigationDescription' => 'Usa i tasti freccia per navigare nei controlli del lettore video',
|
||||
'settings.crashReporting' => 'Segnalazione errori',
|
||||
'settings.crashReportingDescription' => 'Invia segnalazioni di errori per migliorare l\'app',
|
||||
'settings.debugLogging' => 'Log di debug',
|
||||
'settings.debugLoggingDescription' => 'Abilita il logging dettagliato per la risoluzione dei problemi',
|
||||
'settings.viewLogs' => 'Visualizza log',
|
||||
@@ -1487,6 +1485,8 @@ extension on TranslationsIt {
|
||||
'settings.maxVolumePercent' => ({required Object percent}) => '${percent}%',
|
||||
'settings.discordRichPresence' => 'Discord Rich Presence',
|
||||
'settings.discordRichPresenceDescription' => 'Mostra su Discord cosa stai guardando',
|
||||
'settings.autoPip' => 'Picture-in-Picture automatico',
|
||||
'settings.autoPipDescription' => 'Attiva automaticamente il picture-in-picture quando si esce dall\'app durante la riproduzione',
|
||||
'settings.matchContentFrameRate' => 'Adatta frequenza fotogrammi',
|
||||
'settings.matchContentFrameRateDescription' => 'Regola la frequenza di aggiornamento del display in base al contenuto video, riducendo i tremolii e risparmiando batteria',
|
||||
'settings.tunneledPlayback' => 'Tunneled Playback',
|
||||
@@ -1605,6 +1605,7 @@ extension on TranslationsIt {
|
||||
'videoControls.settingsButton' => 'Impostazioni video',
|
||||
'videoControls.audioTrackButton' => 'Tracce audio',
|
||||
'videoControls.subtitlesButton' => 'Sottotitoli',
|
||||
'videoControls.tracksButton' => 'Audio e sottotitoli',
|
||||
'videoControls.chaptersButton' => 'Capitoli',
|
||||
'videoControls.versionsButton' => 'Versioni video',
|
||||
'videoControls.pipButton' => 'Modalità Picture-in-Picture',
|
||||
@@ -1619,10 +1620,13 @@ extension on TranslationsIt {
|
||||
'videoControls.timelineSlider' => 'Timeline video',
|
||||
'videoControls.volumeSlider' => 'Livello volume',
|
||||
'videoControls.endsAt' => ({required Object time}) => 'Finisce alle ${time}',
|
||||
'videoControls.pipActive' => 'Riproduzione in Picture-in-Picture',
|
||||
'videoControls.pipFailed' => 'Impossibile avviare la modalità Picture-in-Picture',
|
||||
'videoControls.pipErrors.androidVersion' => 'Richiede Android 8.0 o versioni successive',
|
||||
'videoControls.pipErrors.iosVersion' => 'Richiede iOS 15.0 o versioni successive',
|
||||
'videoControls.pipErrors.permissionDisabled' => 'L\'autorizzazione Picture-in-Picture è disabilitata. Abilitala in Impostazioni > App > Plezy > Picture-in-Picture',
|
||||
'videoControls.pipErrors.notSupported' => 'Questo dispositivo non supporta la modalità Picture-in-Picture',
|
||||
'videoControls.pipErrors.voSwitchFailed' => 'Impossibile cambiare l\'uscita video per Picture-in-Picture',
|
||||
'videoControls.pipErrors.failed' => 'Impossibile avviare la modalità Picture-in-Picture',
|
||||
'videoControls.pipErrors.unknown' => ({required Object error}) => 'Si è verificato un errore: ${error}',
|
||||
'videoControls.chapters' => 'Capitoli',
|
||||
@@ -1674,19 +1678,10 @@ extension on TranslationsIt {
|
||||
'subtitlingStyling.backgroundOpacity' => 'Opacità sfondo',
|
||||
'subtitlingStyling.backgroundColor' => 'Colore sfondo',
|
||||
'subtitlingStyling.position' => 'Position',
|
||||
'mpvConfig.title' => 'Configurazione MPV',
|
||||
'mpvConfig.title' => 'Configurazione mpv',
|
||||
'mpvConfig.description' => 'Impostazioni avanzate del lettore video',
|
||||
'mpvConfig.properties' => 'Proprietà',
|
||||
'mpvConfig.presets' => 'Preset',
|
||||
'mpvConfig.noProperties' => 'Nessuna proprietà configurata',
|
||||
'mpvConfig.noPresets' => 'Nessun preset salvato',
|
||||
'mpvConfig.addProperty' => 'Aggiungi proprietà',
|
||||
'mpvConfig.editProperty' => 'Modifica proprietà',
|
||||
'mpvConfig.deleteProperty' => 'Elimina proprietà',
|
||||
'mpvConfig.propertyKey' => 'Chiave proprietà',
|
||||
'mpvConfig.propertyKeyHint' => 'es. hwdec, demuxer-max-bytes',
|
||||
'mpvConfig.propertyValue' => 'Valore proprietà',
|
||||
'mpvConfig.propertyValueHint' => 'es. auto, 256000000',
|
||||
'mpvConfig.saveAsPreset' => 'Salva come preset...',
|
||||
'mpvConfig.presetName' => 'Nome preset',
|
||||
'mpvConfig.presetNameHint' => 'Inserisci un nome per questo preset',
|
||||
@@ -1696,8 +1691,7 @@ extension on TranslationsIt {
|
||||
'mpvConfig.presetLoaded' => 'Preset caricato',
|
||||
'mpvConfig.presetDeleted' => 'Preset eliminato',
|
||||
'mpvConfig.confirmDeletePreset' => 'Sei sicuro di voler eliminare questo preset?',
|
||||
'mpvConfig.confirmDeleteProperty' => 'Sei sicuro di voler eliminare questa proprietà?',
|
||||
'mpvConfig.entriesCount' => ({required Object count}) => '${count} voci',
|
||||
'mpvConfig.configPlaceholder' => 'gpu-api=vulkan\nhwdec=auto\n# comment',
|
||||
'dialog.confirmAction' => 'Conferma azione',
|
||||
'discover.title' => 'Esplora',
|
||||
'discover.switchProfile' => 'Cambia profilo',
|
||||
@@ -1797,7 +1791,7 @@ extension on TranslationsIt {
|
||||
'licenses.licensesCount' => ({required Object count}) => '${count} licenze',
|
||||
'navigation.libraries' => 'Librerie',
|
||||
'navigation.downloads' => 'Download',
|
||||
'navigation.liveTv' => 'TV in diretta',
|
||||
'navigation.liveTv' => 'TV Live',
|
||||
'liveTv.title' => 'TV in diretta',
|
||||
'liveTv.channels' => 'Canali',
|
||||
'liveTv.guide' => 'Guida',
|
||||
@@ -1813,6 +1807,8 @@ extension on TranslationsIt {
|
||||
'liveTv.premiere' => 'NUOVO',
|
||||
'liveTv.reloadGuide' => 'Ricarica guida',
|
||||
'liveTv.allChannels' => 'Tutti i canali',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'liveTv.now' => 'Ora',
|
||||
'liveTv.today' => 'Oggi',
|
||||
'liveTv.midnight' => 'Mezzanotte',
|
||||
@@ -1822,8 +1818,6 @@ 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',
|
||||
@@ -1861,7 +1855,6 @@ extension on TranslationsIt {
|
||||
'playlists.itemAdded' => 'Aggiunto alla playlist',
|
||||
'playlists.itemRemoved' => 'Rimosso dalla playlist',
|
||||
'playlists.selectPlaylist' => 'Seleziona playlist',
|
||||
'playlists.createNewPlaylist' => 'Crea nuova playlist',
|
||||
'playlists.errorCreating' => 'Errore durante la creazione della playlist',
|
||||
'playlists.errorDeleting' => 'Errore durante l\'eliminazione della playlist',
|
||||
'playlists.errorLoading' => 'Errore durante il caricamento delle playlist',
|
||||
@@ -1880,7 +1873,6 @@ extension on TranslationsIt {
|
||||
'collections.deleteFailedWithError' => ({required Object error}) => 'Impossibile eliminare la raccolta: ${error}',
|
||||
'collections.failedToLoadItems' => ({required Object error}) => 'Impossibile caricare gli elementi della raccolta: ${error}',
|
||||
'collections.selectCollection' => 'Seleziona raccolta',
|
||||
'collections.createNewCollection' => 'Crea nuova raccolta',
|
||||
'collections.collectionName' => 'Nome raccolta',
|
||||
'collections.enterCollectionName' => 'Inserisci nome raccolta',
|
||||
'collections.addedToCollection' => 'Aggiunto alla raccolta',
|
||||
|
||||
+26
-34
@@ -130,6 +130,7 @@ class _TranslationsCommonKo implements TranslationsCommonEn {
|
||||
@override String get delete => '삭제';
|
||||
@override String get shuffle => '무작위 재생';
|
||||
@override String get addTo => '추가하기...';
|
||||
@override String get createNew => '새로 만들기';
|
||||
@override String get remove => '삭제';
|
||||
@override String get paste => '붙여넣기';
|
||||
@override String get connect => '연결';
|
||||
@@ -168,7 +169,7 @@ class _TranslationsScreensKo implements TranslationsScreensEn {
|
||||
@override String get licenses => '라이선스';
|
||||
@override String get switchProfile => '프로필 전환';
|
||||
@override String get subtitleStyling => '자막 스타일 설정';
|
||||
@override String get mpvConfig => 'MPV 설정';
|
||||
@override String get mpvConfig => 'mpv.conf';
|
||||
@override String get logs => '로그';
|
||||
}
|
||||
|
||||
@@ -246,7 +247,7 @@ class _TranslationsSettingsKo implements TranslationsSettingsEn {
|
||||
@override String get playerBackend => '플레이어 백엔드';
|
||||
@override String get exoPlayer => 'ExoPlayer (권장)';
|
||||
@override String get exoPlayerDescription => '더 나은 하드웨어 지원을 제공하는 Android 네이티브 플레이어';
|
||||
@override String get mpv => 'MPV';
|
||||
@override String get mpv => 'mpv';
|
||||
@override String get mpvDescription => '더 많은 기능과 ASS 자막을 지원하는 고급 플레이어';
|
||||
@override String get hardwareDecoding => '하드웨어 디코딩';
|
||||
@override String get hardwareDecodingDescription => '가능한 경우 하드웨어 가속을 사용합니다';
|
||||
@@ -270,6 +271,8 @@ class _TranslationsSettingsKo implements TranslationsSettingsEn {
|
||||
@override String get keyboardShortcutsDescription => '사용자 정의 키보드 단축키';
|
||||
@override String get videoPlayerNavigation => '비디오 플레이어 탐색';
|
||||
@override String get videoPlayerNavigationDescription => '방향 키를 사용하여 비디오 플레이어 컨트롤 탐색';
|
||||
@override String get crashReporting => '충돌 보고';
|
||||
@override String get crashReportingDescription => '앱 개선을 위해 충돌 보고서 전송';
|
||||
@override String get debugLogging => '디버그 로깅';
|
||||
@override String get debugLoggingDescription => '문제 해결을 위해 상세 로깅 활성화';
|
||||
@override String get viewLogs => '로그 보기';
|
||||
@@ -490,6 +493,7 @@ class _TranslationsVideoControlsKo implements TranslationsVideoControlsEn {
|
||||
@override String get settingsButton => '동영상 설정';
|
||||
@override String get audioTrackButton => '음원 트랙';
|
||||
@override String get subtitlesButton => '자막';
|
||||
@override String get tracksButton => '오디오 및 자막';
|
||||
@override String get chaptersButton => '챕터';
|
||||
@override String get versionsButton => '동영상 버전';
|
||||
@override String get pipButton => '픽처 인 픽처 모드';
|
||||
@@ -504,6 +508,7 @@ class _TranslationsVideoControlsKo implements TranslationsVideoControlsEn {
|
||||
@override String get timelineSlider => '타임라인';
|
||||
@override String get volumeSlider => '볼륨 조절';
|
||||
@override String endsAt({required Object time}) => '${time}에 종료';
|
||||
@override String get pipActive => '화면 속 화면으로 재생 중';
|
||||
@override String get pipFailed => '화면 속 화면 모드를 시작할 수 없습니다';
|
||||
@override late final _TranslationsVideoControlsPipErrorsKo pipErrors = _TranslationsVideoControlsPipErrorsKo._(_root);
|
||||
@override String get chapters => '챕터';
|
||||
@@ -591,19 +596,10 @@ class _TranslationsMpvConfigKo implements TranslationsMpvConfigEn {
|
||||
final TranslationsKo _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'MPV 설정';
|
||||
@override String get title => 'mpv 설정';
|
||||
@override String get description => '고급 비디오 플레이어 설정';
|
||||
@override String get properties => '속성';
|
||||
@override String get presets => '사전 설정';
|
||||
@override String get noProperties => '설정된 속성이 없습니다';
|
||||
@override String get noPresets => '저장된 사전 설정이 없습니다';
|
||||
@override String get addProperty => '속성 추가';
|
||||
@override String get editProperty => '속성 편집';
|
||||
@override String get deleteProperty => '속성 삭제';
|
||||
@override String get propertyKey => '속성 키';
|
||||
@override String get propertyKeyHint => '예: hwdec, demuxer-max-bytes';
|
||||
@override String get propertyValue => '속성값';
|
||||
@override String get propertyValueHint => '예: auto, 256000000';
|
||||
@override String get saveAsPreset => '프리셋으로 저장...';
|
||||
@override String get presetName => '프리셋 이름';
|
||||
@override String get presetNameHint => '이 프리셋의 이름을 입력하세요';
|
||||
@@ -613,8 +609,7 @@ class _TranslationsMpvConfigKo implements TranslationsMpvConfigEn {
|
||||
@override String get presetLoaded => '프리셋이 로드 되었습니다';
|
||||
@override String get presetDeleted => '프리셋이 삭제 되었습니다';
|
||||
@override String get confirmDeletePreset => '이 프리셋을 삭제 하시겠습니까?';
|
||||
@override String get confirmDeleteProperty => '이 속성을 삭제 하시겠습니까?';
|
||||
@override String entriesCount({required Object count}) => '${count} 항목';
|
||||
@override String get configPlaceholder => 'gpu-api=vulkan\nhwdec=auto\n# comment';
|
||||
}
|
||||
|
||||
// Path: dialog
|
||||
@@ -851,7 +846,6 @@ class _TranslationsCollectionsKo implements TranslationsCollectionsEn {
|
||||
@override String deleteFailedWithError({required Object error}) => '컬렉션 삭제 실패: ${error}';
|
||||
@override String failedToLoadItems({required Object error}) => '컬렉션 항목 로드 실패: ${error}';
|
||||
@override String get selectCollection => '컬렉션 선택';
|
||||
@override String get createNewCollection => '새 컬렉션 생성';
|
||||
@override String get collectionName => '컬렉션 이름';
|
||||
@override String get enterCollectionName => '컬렉션 이름 입력';
|
||||
@override String get addedToCollection => '컬렉션에 추가됨';
|
||||
@@ -890,7 +884,6 @@ class _TranslationsPlaylistsKo implements TranslationsPlaylistsEn {
|
||||
@override String get itemAdded => '재생 목록에 추가 되었습니다';
|
||||
@override String get itemRemoved => '재생 목록에서 제거됨';
|
||||
@override String get selectPlaylist => '재생 목록 선택';
|
||||
@override String get createNewPlaylist => '새 재생 목록 생성';
|
||||
@override String get errorCreating => '재생 목록 생성 실패';
|
||||
@override String get errorDeleting => '재생 목록 삭제 실패';
|
||||
@override String get errorLoading => '재생 목록 로드 실패';
|
||||
@@ -1162,8 +1155,10 @@ class _TranslationsVideoControlsPipErrorsKo implements TranslationsVideoControls
|
||||
|
||||
// Translations
|
||||
@override String get androidVersion => 'Android 8.0 이상이 필요합니다';
|
||||
@override String get iosVersion => 'iOS 15.0 이상이 필요합니다';
|
||||
@override String get permissionDisabled => '화면 속 화면 권한이 비활성화되어 있습니다. 설정 > 앱 > Plezy > 화면 속 화면에서 활성화하세요';
|
||||
@override String get notSupported => '이 기기는 화면 속 화면 모드를 지원하지 않습니다';
|
||||
@override String get voSwitchFailed => '화면 속 화면을 위한 비디오 출력 전환에 실패했습니다';
|
||||
@override String get failed => '화면 속 화면 모드를 시작할 수 없습니다';
|
||||
@override String unknown({required Object error}) => '오류가 발생했습니다: ${error}';
|
||||
}
|
||||
@@ -1328,6 +1323,7 @@ extension on TranslationsKo {
|
||||
'common.delete' => '삭제',
|
||||
'common.shuffle' => '무작위 재생',
|
||||
'common.addTo' => '추가하기...',
|
||||
'common.createNew' => '새로 만들기',
|
||||
'common.remove' => '삭제',
|
||||
'common.paste' => '붙여넣기',
|
||||
'common.connect' => '연결',
|
||||
@@ -1357,7 +1353,7 @@ extension on TranslationsKo {
|
||||
'screens.licenses' => '라이선스',
|
||||
'screens.switchProfile' => '프로필 전환',
|
||||
'screens.subtitleStyling' => '자막 스타일 설정',
|
||||
'screens.mpvConfig' => 'MPV 설정',
|
||||
'screens.mpvConfig' => 'mpv.conf',
|
||||
'screens.logs' => '로그',
|
||||
'update.available' => '사용 가능한 업데이트',
|
||||
'update.versionAvailable' => ({required Object version}) => '버전 ${version} 출시됨',
|
||||
@@ -1417,7 +1413,7 @@ extension on TranslationsKo {
|
||||
'settings.playerBackend' => '플레이어 백엔드',
|
||||
'settings.exoPlayer' => 'ExoPlayer (권장)',
|
||||
'settings.exoPlayerDescription' => '더 나은 하드웨어 지원을 제공하는 Android 네이티브 플레이어',
|
||||
'settings.mpv' => 'MPV',
|
||||
'settings.mpv' => 'mpv',
|
||||
'settings.mpvDescription' => '더 많은 기능과 ASS 자막을 지원하는 고급 플레이어',
|
||||
'settings.hardwareDecoding' => '하드웨어 디코딩',
|
||||
'settings.hardwareDecodingDescription' => '가능한 경우 하드웨어 가속을 사용합니다',
|
||||
@@ -1441,6 +1437,8 @@ extension on TranslationsKo {
|
||||
'settings.keyboardShortcutsDescription' => '사용자 정의 키보드 단축키',
|
||||
'settings.videoPlayerNavigation' => '비디오 플레이어 탐색',
|
||||
'settings.videoPlayerNavigationDescription' => '방향 키를 사용하여 비디오 플레이어 컨트롤 탐색',
|
||||
'settings.crashReporting' => '충돌 보고',
|
||||
'settings.crashReportingDescription' => '앱 개선을 위해 충돌 보고서 전송',
|
||||
'settings.debugLogging' => '디버그 로깅',
|
||||
'settings.debugLoggingDescription' => '문제 해결을 위해 상세 로깅 활성화',
|
||||
'settings.viewLogs' => '로그 보기',
|
||||
@@ -1487,6 +1485,8 @@ extension on TranslationsKo {
|
||||
'settings.maxVolumePercent' => ({required Object percent}) => '${percent}%',
|
||||
'settings.discordRichPresence' => 'Discord Rich Presence',
|
||||
'settings.discordRichPresenceDescription' => 'Discord에서 시청 중인 콘텐츠 표시',
|
||||
'settings.autoPip' => '자동 PIP 모드',
|
||||
'settings.autoPipDescription' => '재생 중 앱을 나갈 때 자동으로 PIP 모드로 전환',
|
||||
'settings.matchContentFrameRate' => '콘텐츠 프레임 레이트 맞춤',
|
||||
'settings.matchContentFrameRateDescription' => '비디오 콘텐츠에 맞게 디스플레이 주사율을 조정하여 떨림을 줄이고 배터리를 절약합니다',
|
||||
'settings.tunneledPlayback' => 'Tunneled Playback',
|
||||
@@ -1605,6 +1605,7 @@ extension on TranslationsKo {
|
||||
'videoControls.settingsButton' => '동영상 설정',
|
||||
'videoControls.audioTrackButton' => '음원 트랙',
|
||||
'videoControls.subtitlesButton' => '자막',
|
||||
'videoControls.tracksButton' => '오디오 및 자막',
|
||||
'videoControls.chaptersButton' => '챕터',
|
||||
'videoControls.versionsButton' => '동영상 버전',
|
||||
'videoControls.pipButton' => '픽처 인 픽처 모드',
|
||||
@@ -1619,10 +1620,13 @@ extension on TranslationsKo {
|
||||
'videoControls.timelineSlider' => '타임라인',
|
||||
'videoControls.volumeSlider' => '볼륨 조절',
|
||||
'videoControls.endsAt' => ({required Object time}) => '${time}에 종료',
|
||||
'videoControls.pipActive' => '화면 속 화면으로 재생 중',
|
||||
'videoControls.pipFailed' => '화면 속 화면 모드를 시작할 수 없습니다',
|
||||
'videoControls.pipErrors.androidVersion' => 'Android 8.0 이상이 필요합니다',
|
||||
'videoControls.pipErrors.iosVersion' => 'iOS 15.0 이상이 필요합니다',
|
||||
'videoControls.pipErrors.permissionDisabled' => '화면 속 화면 권한이 비활성화되어 있습니다. 설정 > 앱 > Plezy > 화면 속 화면에서 활성화하세요',
|
||||
'videoControls.pipErrors.notSupported' => '이 기기는 화면 속 화면 모드를 지원하지 않습니다',
|
||||
'videoControls.pipErrors.voSwitchFailed' => '화면 속 화면을 위한 비디오 출력 전환에 실패했습니다',
|
||||
'videoControls.pipErrors.failed' => '화면 속 화면 모드를 시작할 수 없습니다',
|
||||
'videoControls.pipErrors.unknown' => ({required Object error}) => '오류가 발생했습니다: ${error}',
|
||||
'videoControls.chapters' => '챕터',
|
||||
@@ -1674,19 +1678,10 @@ extension on TranslationsKo {
|
||||
'subtitlingStyling.backgroundOpacity' => '배경 불투명도',
|
||||
'subtitlingStyling.backgroundColor' => '배경색',
|
||||
'subtitlingStyling.position' => 'Position',
|
||||
'mpvConfig.title' => 'MPV 설정',
|
||||
'mpvConfig.title' => 'mpv 설정',
|
||||
'mpvConfig.description' => '고급 비디오 플레이어 설정',
|
||||
'mpvConfig.properties' => '속성',
|
||||
'mpvConfig.presets' => '사전 설정',
|
||||
'mpvConfig.noProperties' => '설정된 속성이 없습니다',
|
||||
'mpvConfig.noPresets' => '저장된 사전 설정이 없습니다',
|
||||
'mpvConfig.addProperty' => '속성 추가',
|
||||
'mpvConfig.editProperty' => '속성 편집',
|
||||
'mpvConfig.deleteProperty' => '속성 삭제',
|
||||
'mpvConfig.propertyKey' => '속성 키',
|
||||
'mpvConfig.propertyKeyHint' => '예: hwdec, demuxer-max-bytes',
|
||||
'mpvConfig.propertyValue' => '속성값',
|
||||
'mpvConfig.propertyValueHint' => '예: auto, 256000000',
|
||||
'mpvConfig.saveAsPreset' => '프리셋으로 저장...',
|
||||
'mpvConfig.presetName' => '프리셋 이름',
|
||||
'mpvConfig.presetNameHint' => '이 프리셋의 이름을 입력하세요',
|
||||
@@ -1696,8 +1691,7 @@ extension on TranslationsKo {
|
||||
'mpvConfig.presetLoaded' => '프리셋이 로드 되었습니다',
|
||||
'mpvConfig.presetDeleted' => '프리셋이 삭제 되었습니다',
|
||||
'mpvConfig.confirmDeletePreset' => '이 프리셋을 삭제 하시겠습니까?',
|
||||
'mpvConfig.confirmDeleteProperty' => '이 속성을 삭제 하시겠습니까?',
|
||||
'mpvConfig.entriesCount' => ({required Object count}) => '${count} 항목',
|
||||
'mpvConfig.configPlaceholder' => 'gpu-api=vulkan\nhwdec=auto\n# comment',
|
||||
'dialog.confirmAction' => '확인',
|
||||
'discover.title' => '발견',
|
||||
'discover.switchProfile' => '사용자 전환',
|
||||
@@ -1813,6 +1807,8 @@ extension on TranslationsKo {
|
||||
'liveTv.premiere' => '신규',
|
||||
'liveTv.reloadGuide' => '편성표 새로고침',
|
||||
'liveTv.allChannels' => '전체 채널',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'liveTv.now' => '지금',
|
||||
'liveTv.today' => '오늘',
|
||||
'liveTv.midnight' => '자정',
|
||||
@@ -1822,8 +1818,6 @@ extension on TranslationsKo {
|
||||
'liveTv.evening' => '저녁',
|
||||
'liveTv.lateNight' => '심야 방송',
|
||||
'liveTv.whatsOn' => '지금 방송 중',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'liveTv.watchChannel' => '채널 시청',
|
||||
'collections.title' => '컬렉션',
|
||||
'collections.collection' => '컬렉션',
|
||||
@@ -1836,7 +1830,6 @@ extension on TranslationsKo {
|
||||
'collections.deleteFailedWithError' => ({required Object error}) => '컬렉션 삭제 실패: ${error}',
|
||||
'collections.failedToLoadItems' => ({required Object error}) => '컬렉션 항목 로드 실패: ${error}',
|
||||
'collections.selectCollection' => '컬렉션 선택',
|
||||
'collections.createNewCollection' => '새 컬렉션 생성',
|
||||
'collections.collectionName' => '컬렉션 이름',
|
||||
'collections.enterCollectionName' => '컬렉션 이름 입력',
|
||||
'collections.addedToCollection' => '컬렉션에 추가됨',
|
||||
@@ -1866,7 +1859,6 @@ extension on TranslationsKo {
|
||||
'playlists.itemAdded' => '재생 목록에 추가 되었습니다',
|
||||
'playlists.itemRemoved' => '재생 목록에서 제거됨',
|
||||
'playlists.selectPlaylist' => '재생 목록 선택',
|
||||
'playlists.createNewPlaylist' => '새 재생 목록 생성',
|
||||
'playlists.errorCreating' => '재생 목록 생성 실패',
|
||||
'playlists.errorDeleting' => '재생 목록 삭제 실패',
|
||||
'playlists.errorLoading' => '재생 목록 로드 실패',
|
||||
|
||||
+30
-38
@@ -130,6 +130,7 @@ class _TranslationsCommonNl implements TranslationsCommonEn {
|
||||
@override String get delete => 'Verwijderen';
|
||||
@override String get shuffle => 'Willekeurig';
|
||||
@override String get addTo => 'Toevoegen aan...';
|
||||
@override String get createNew => 'Nieuw aanmaken';
|
||||
@override String get remove => 'Verwijderen';
|
||||
@override String get paste => 'Plakken';
|
||||
@override String get connect => 'Verbinden';
|
||||
@@ -141,7 +142,7 @@ class _TranslationsCommonNl implements TranslationsCommonEn {
|
||||
@override String get search => 'Zoeken';
|
||||
@override String get home => 'Home';
|
||||
@override String get back => 'Terug';
|
||||
@override String get settings => 'Instellingen';
|
||||
@override String get settings => 'Opties';
|
||||
@override String get mute => 'Dempen';
|
||||
@override String get ok => 'OK';
|
||||
@override String get loading => 'Laden...';
|
||||
@@ -168,7 +169,7 @@ class _TranslationsScreensNl implements TranslationsScreensEn {
|
||||
@override String get licenses => 'Licenties';
|
||||
@override String get switchProfile => 'Wissel van profiel';
|
||||
@override String get subtitleStyling => 'Ondertitel opmaak';
|
||||
@override String get mpvConfig => 'MPV-configuratie';
|
||||
@override String get mpvConfig => 'mpv.conf';
|
||||
@override String get logs => 'Logbestanden';
|
||||
}
|
||||
|
||||
@@ -246,7 +247,7 @@ class _TranslationsSettingsNl implements TranslationsSettingsEn {
|
||||
@override String get playerBackend => 'Speler backend';
|
||||
@override String get exoPlayer => 'ExoPlayer (Aanbevolen)';
|
||||
@override String get exoPlayerDescription => 'Android-native speler met betere hardware-ondersteuning';
|
||||
@override String get mpv => 'MPV';
|
||||
@override String get mpv => 'mpv';
|
||||
@override String get mpvDescription => 'Geavanceerde speler met meer functies en ASS-ondertitelondersteuning';
|
||||
@override String get hardwareDecoding => 'Hardware decodering';
|
||||
@override String get hardwareDecodingDescription => 'Gebruik hardware versnelling indien beschikbaar';
|
||||
@@ -270,6 +271,8 @@ class _TranslationsSettingsNl implements TranslationsSettingsEn {
|
||||
@override String get keyboardShortcutsDescription => 'Pas toetsenbord sneltoetsen aan';
|
||||
@override String get videoPlayerNavigation => 'Videospeler navigatie';
|
||||
@override String get videoPlayerNavigationDescription => 'Gebruik pijltjestoetsen om door de videospeler bediening te navigeren';
|
||||
@override String get crashReporting => 'Crashrapportage';
|
||||
@override String get crashReportingDescription => 'Crashrapporten verzenden om de app te verbeteren';
|
||||
@override String get debugLogging => 'Debug logging';
|
||||
@override String get debugLoggingDescription => 'Schakel gedetailleerde logging in voor probleemoplossing';
|
||||
@override String get viewLogs => 'Bekijk logs';
|
||||
@@ -490,6 +493,7 @@ class _TranslationsVideoControlsNl implements TranslationsVideoControlsEn {
|
||||
@override String get settingsButton => 'Video-instellingen';
|
||||
@override String get audioTrackButton => 'Audiosporen';
|
||||
@override String get subtitlesButton => 'Ondertitels';
|
||||
@override String get tracksButton => 'Audio en ondertitels';
|
||||
@override String get chaptersButton => 'Hoofdstukken';
|
||||
@override String get versionsButton => 'Videoversies';
|
||||
@override String get pipButton => 'Beeld-in-beeld modus';
|
||||
@@ -504,6 +508,7 @@ class _TranslationsVideoControlsNl implements TranslationsVideoControlsEn {
|
||||
@override String get timelineSlider => 'Videotijdlijn';
|
||||
@override String get volumeSlider => 'Volumeniveau';
|
||||
@override String endsAt({required Object time}) => 'Eindigt om ${time}';
|
||||
@override String get pipActive => 'Afspelen in beeld-in-beeld';
|
||||
@override String get pipFailed => 'Beeld-in-beeld kon niet worden gestart';
|
||||
@override late final _TranslationsVideoControlsPipErrorsNl pipErrors = _TranslationsVideoControlsPipErrorsNl._(_root);
|
||||
@override String get chapters => 'Hoofdstukken';
|
||||
@@ -591,19 +596,10 @@ class _TranslationsMpvConfigNl implements TranslationsMpvConfigEn {
|
||||
final TranslationsNl _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'MPV-configuratie';
|
||||
@override String get title => 'mpv-configuratie';
|
||||
@override String get description => 'Geavanceerde videospeler-instellingen';
|
||||
@override String get properties => 'Eigenschappen';
|
||||
@override String get presets => 'Voorinstellingen';
|
||||
@override String get noProperties => 'Geen eigenschappen geconfigureerd';
|
||||
@override String get noPresets => 'Geen opgeslagen voorinstellingen';
|
||||
@override String get addProperty => 'Eigenschap toevoegen';
|
||||
@override String get editProperty => 'Eigenschap bewerken';
|
||||
@override String get deleteProperty => 'Eigenschap verwijderen';
|
||||
@override String get propertyKey => 'Eigenschapssleutel';
|
||||
@override String get propertyKeyHint => 'bijv. hwdec, demuxer-max-bytes';
|
||||
@override String get propertyValue => 'Eigenschapswaarde';
|
||||
@override String get propertyValueHint => 'bijv. auto, 256000000';
|
||||
@override String get saveAsPreset => 'Opslaan als voorinstelling...';
|
||||
@override String get presetName => 'Naam voorinstelling';
|
||||
@override String get presetNameHint => 'Voer een naam in voor deze voorinstelling';
|
||||
@@ -613,8 +609,7 @@ class _TranslationsMpvConfigNl implements TranslationsMpvConfigEn {
|
||||
@override String get presetLoaded => 'Voorinstelling geladen';
|
||||
@override String get presetDeleted => 'Voorinstelling verwijderd';
|
||||
@override String get confirmDeletePreset => 'Weet je zeker dat je deze voorinstelling wilt verwijderen?';
|
||||
@override String get confirmDeleteProperty => 'Weet je zeker dat je deze eigenschap wilt verwijderen?';
|
||||
@override String entriesCount({required Object count}) => '${count} items';
|
||||
@override String get configPlaceholder => 'gpu-api=vulkan\nhwdec=auto\n# comment';
|
||||
}
|
||||
|
||||
// Path: dialog
|
||||
@@ -794,7 +789,7 @@ class _TranslationsNavigationNl implements TranslationsNavigationEn {
|
||||
final TranslationsNl _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get libraries => 'Bibliotheken';
|
||||
@override String get libraries => 'Media';
|
||||
@override String get downloads => 'Downloads';
|
||||
@override String get liveTv => 'Live TV';
|
||||
}
|
||||
@@ -885,7 +880,6 @@ class _TranslationsPlaylistsNl implements TranslationsPlaylistsEn {
|
||||
@override String get itemAdded => 'Toegevoegd aan afspeellijst';
|
||||
@override String get itemRemoved => 'Verwijderd uit afspeellijst';
|
||||
@override String get selectPlaylist => 'Selecteer afspeellijst';
|
||||
@override String get createNewPlaylist => 'Nieuwe afspeellijst maken';
|
||||
@override String get errorCreating => 'Fout bij maken afspeellijst';
|
||||
@override String get errorDeleting => 'Fout bij verwijderen afspeellijst';
|
||||
@override String get errorLoading => 'Fout bij laden afspeellijsten';
|
||||
@@ -913,7 +907,6 @@ class _TranslationsCollectionsNl implements TranslationsCollectionsEn {
|
||||
@override String deleteFailedWithError({required Object error}) => 'Collectie verwijderen mislukt: ${error}';
|
||||
@override String failedToLoadItems({required Object error}) => 'Collectie-items laden mislukt: ${error}';
|
||||
@override String get selectCollection => 'Selecteer collectie';
|
||||
@override String get createNewCollection => 'Nieuwe collectie maken';
|
||||
@override String get collectionName => 'Collectienaam';
|
||||
@override String get enterCollectionName => 'Voer collectienaam in';
|
||||
@override String get addedToCollection => 'Toegevoegd aan collectie';
|
||||
@@ -1162,8 +1155,10 @@ class _TranslationsVideoControlsPipErrorsNl implements TranslationsVideoControls
|
||||
|
||||
// Translations
|
||||
@override String get androidVersion => 'Vereist Android 8.0 of nieuwer';
|
||||
@override String get iosVersion => 'Vereist iOS 15.0 of nieuwer';
|
||||
@override String get permissionDisabled => 'Beeld-in-beeld toestemming is uitgeschakeld. Schakel deze in via Instellingen > Apps > Plezy > Beeld-in-beeld';
|
||||
@override String get notSupported => 'Dit apparaat ondersteunt geen beeld-in-beeld modus';
|
||||
@override String get voSwitchFailed => 'Kan video-uitvoer niet wisselen voor beeld-in-beeld';
|
||||
@override String get failed => 'Beeld-in-beeld kon niet worden gestart';
|
||||
@override String unknown({required Object error}) => 'Er is een fout opgetreden: ${error}';
|
||||
}
|
||||
@@ -1328,6 +1323,7 @@ extension on TranslationsNl {
|
||||
'common.delete' => 'Verwijderen',
|
||||
'common.shuffle' => 'Willekeurig',
|
||||
'common.addTo' => 'Toevoegen aan...',
|
||||
'common.createNew' => 'Nieuw aanmaken',
|
||||
'common.remove' => 'Verwijderen',
|
||||
'common.paste' => 'Plakken',
|
||||
'common.connect' => 'Verbinden',
|
||||
@@ -1339,7 +1335,7 @@ extension on TranslationsNl {
|
||||
'common.search' => 'Zoeken',
|
||||
'common.home' => 'Home',
|
||||
'common.back' => 'Terug',
|
||||
'common.settings' => 'Instellingen',
|
||||
'common.settings' => 'Opties',
|
||||
'common.mute' => 'Dempen',
|
||||
'common.ok' => 'OK',
|
||||
'common.loading' => 'Laden...',
|
||||
@@ -1357,7 +1353,7 @@ extension on TranslationsNl {
|
||||
'screens.licenses' => 'Licenties',
|
||||
'screens.switchProfile' => 'Wissel van profiel',
|
||||
'screens.subtitleStyling' => 'Ondertitel opmaak',
|
||||
'screens.mpvConfig' => 'MPV-configuratie',
|
||||
'screens.mpvConfig' => 'mpv.conf',
|
||||
'screens.logs' => 'Logbestanden',
|
||||
'update.available' => 'Update beschikbaar',
|
||||
'update.versionAvailable' => ({required Object version}) => 'Versie ${version} is beschikbaar',
|
||||
@@ -1417,7 +1413,7 @@ extension on TranslationsNl {
|
||||
'settings.playerBackend' => 'Speler backend',
|
||||
'settings.exoPlayer' => 'ExoPlayer (Aanbevolen)',
|
||||
'settings.exoPlayerDescription' => 'Android-native speler met betere hardware-ondersteuning',
|
||||
'settings.mpv' => 'MPV',
|
||||
'settings.mpv' => 'mpv',
|
||||
'settings.mpvDescription' => 'Geavanceerde speler met meer functies en ASS-ondertitelondersteuning',
|
||||
'settings.hardwareDecoding' => 'Hardware decodering',
|
||||
'settings.hardwareDecodingDescription' => 'Gebruik hardware versnelling indien beschikbaar',
|
||||
@@ -1441,6 +1437,8 @@ extension on TranslationsNl {
|
||||
'settings.keyboardShortcutsDescription' => 'Pas toetsenbord sneltoetsen aan',
|
||||
'settings.videoPlayerNavigation' => 'Videospeler navigatie',
|
||||
'settings.videoPlayerNavigationDescription' => 'Gebruik pijltjestoetsen om door de videospeler bediening te navigeren',
|
||||
'settings.crashReporting' => 'Crashrapportage',
|
||||
'settings.crashReportingDescription' => 'Crashrapporten verzenden om de app te verbeteren',
|
||||
'settings.debugLogging' => 'Debug logging',
|
||||
'settings.debugLoggingDescription' => 'Schakel gedetailleerde logging in voor probleemoplossing',
|
||||
'settings.viewLogs' => 'Bekijk logs',
|
||||
@@ -1487,6 +1485,8 @@ extension on TranslationsNl {
|
||||
'settings.maxVolumePercent' => ({required Object percent}) => '${percent}%',
|
||||
'settings.discordRichPresence' => 'Discord Rich Presence',
|
||||
'settings.discordRichPresenceDescription' => 'Toon op Discord wat je aan het kijken bent',
|
||||
'settings.autoPip' => 'Automatische beeld-in-beeld',
|
||||
'settings.autoPipDescription' => 'Automatisch beeld-in-beeld activeren bij het verlaten van de app tijdens afspelen',
|
||||
'settings.matchContentFrameRate' => 'Inhoudsframesnelheid afstemmen',
|
||||
'settings.matchContentFrameRateDescription' => 'Pas de schermverversingssnelheid aan op de video-inhoud, vermindert haperingen en bespaart batterij',
|
||||
'settings.tunneledPlayback' => 'Tunneled Playback',
|
||||
@@ -1605,6 +1605,7 @@ extension on TranslationsNl {
|
||||
'videoControls.settingsButton' => 'Video-instellingen',
|
||||
'videoControls.audioTrackButton' => 'Audiosporen',
|
||||
'videoControls.subtitlesButton' => 'Ondertitels',
|
||||
'videoControls.tracksButton' => 'Audio en ondertitels',
|
||||
'videoControls.chaptersButton' => 'Hoofdstukken',
|
||||
'videoControls.versionsButton' => 'Videoversies',
|
||||
'videoControls.pipButton' => 'Beeld-in-beeld modus',
|
||||
@@ -1619,10 +1620,13 @@ extension on TranslationsNl {
|
||||
'videoControls.timelineSlider' => 'Videotijdlijn',
|
||||
'videoControls.volumeSlider' => 'Volumeniveau',
|
||||
'videoControls.endsAt' => ({required Object time}) => 'Eindigt om ${time}',
|
||||
'videoControls.pipActive' => 'Afspelen in beeld-in-beeld',
|
||||
'videoControls.pipFailed' => 'Beeld-in-beeld kon niet worden gestart',
|
||||
'videoControls.pipErrors.androidVersion' => 'Vereist Android 8.0 of nieuwer',
|
||||
'videoControls.pipErrors.iosVersion' => 'Vereist iOS 15.0 of nieuwer',
|
||||
'videoControls.pipErrors.permissionDisabled' => 'Beeld-in-beeld toestemming is uitgeschakeld. Schakel deze in via Instellingen > Apps > Plezy > Beeld-in-beeld',
|
||||
'videoControls.pipErrors.notSupported' => 'Dit apparaat ondersteunt geen beeld-in-beeld modus',
|
||||
'videoControls.pipErrors.voSwitchFailed' => 'Kan video-uitvoer niet wisselen voor beeld-in-beeld',
|
||||
'videoControls.pipErrors.failed' => 'Beeld-in-beeld kon niet worden gestart',
|
||||
'videoControls.pipErrors.unknown' => ({required Object error}) => 'Er is een fout opgetreden: ${error}',
|
||||
'videoControls.chapters' => 'Hoofdstukken',
|
||||
@@ -1674,19 +1678,10 @@ extension on TranslationsNl {
|
||||
'subtitlingStyling.backgroundOpacity' => 'Achtergrond transparantie',
|
||||
'subtitlingStyling.backgroundColor' => 'Achtergrondkleur',
|
||||
'subtitlingStyling.position' => 'Position',
|
||||
'mpvConfig.title' => 'MPV-configuratie',
|
||||
'mpvConfig.title' => 'mpv-configuratie',
|
||||
'mpvConfig.description' => 'Geavanceerde videospeler-instellingen',
|
||||
'mpvConfig.properties' => 'Eigenschappen',
|
||||
'mpvConfig.presets' => 'Voorinstellingen',
|
||||
'mpvConfig.noProperties' => 'Geen eigenschappen geconfigureerd',
|
||||
'mpvConfig.noPresets' => 'Geen opgeslagen voorinstellingen',
|
||||
'mpvConfig.addProperty' => 'Eigenschap toevoegen',
|
||||
'mpvConfig.editProperty' => 'Eigenschap bewerken',
|
||||
'mpvConfig.deleteProperty' => 'Eigenschap verwijderen',
|
||||
'mpvConfig.propertyKey' => 'Eigenschapssleutel',
|
||||
'mpvConfig.propertyKeyHint' => 'bijv. hwdec, demuxer-max-bytes',
|
||||
'mpvConfig.propertyValue' => 'Eigenschapswaarde',
|
||||
'mpvConfig.propertyValueHint' => 'bijv. auto, 256000000',
|
||||
'mpvConfig.saveAsPreset' => 'Opslaan als voorinstelling...',
|
||||
'mpvConfig.presetName' => 'Naam voorinstelling',
|
||||
'mpvConfig.presetNameHint' => 'Voer een naam in voor deze voorinstelling',
|
||||
@@ -1696,8 +1691,7 @@ extension on TranslationsNl {
|
||||
'mpvConfig.presetLoaded' => 'Voorinstelling geladen',
|
||||
'mpvConfig.presetDeleted' => 'Voorinstelling verwijderd',
|
||||
'mpvConfig.confirmDeletePreset' => 'Weet je zeker dat je deze voorinstelling wilt verwijderen?',
|
||||
'mpvConfig.confirmDeleteProperty' => 'Weet je zeker dat je deze eigenschap wilt verwijderen?',
|
||||
'mpvConfig.entriesCount' => ({required Object count}) => '${count} items',
|
||||
'mpvConfig.configPlaceholder' => 'gpu-api=vulkan\nhwdec=auto\n# comment',
|
||||
'dialog.confirmAction' => 'Bevestig actie',
|
||||
'discover.title' => 'Ontdekken',
|
||||
'discover.switchProfile' => 'Wissel van profiel',
|
||||
@@ -1795,7 +1789,7 @@ extension on TranslationsNl {
|
||||
'licenses.license' => 'Licentie',
|
||||
'licenses.licenseNumber' => ({required Object number}) => 'Licentie ${number}',
|
||||
'licenses.licensesCount' => ({required Object count}) => '${count} licenties',
|
||||
'navigation.libraries' => 'Bibliotheken',
|
||||
'navigation.libraries' => 'Media',
|
||||
'navigation.downloads' => 'Downloads',
|
||||
'navigation.liveTv' => 'Live TV',
|
||||
'liveTv.title' => 'Live TV',
|
||||
@@ -1813,6 +1807,8 @@ extension on TranslationsNl {
|
||||
'liveTv.premiere' => 'NIEUW',
|
||||
'liveTv.reloadGuide' => 'Gids herladen',
|
||||
'liveTv.allChannels' => 'Alle zenders',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'liveTv.now' => 'Nu',
|
||||
'liveTv.today' => 'Vandaag',
|
||||
'liveTv.midnight' => 'Middernacht',
|
||||
@@ -1822,8 +1818,6 @@ 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',
|
||||
@@ -1861,7 +1855,6 @@ extension on TranslationsNl {
|
||||
'playlists.itemAdded' => 'Toegevoegd aan afspeellijst',
|
||||
'playlists.itemRemoved' => 'Verwijderd uit afspeellijst',
|
||||
'playlists.selectPlaylist' => 'Selecteer afspeellijst',
|
||||
'playlists.createNewPlaylist' => 'Nieuwe afspeellijst maken',
|
||||
'playlists.errorCreating' => 'Fout bij maken afspeellijst',
|
||||
'playlists.errorDeleting' => 'Fout bij verwijderen afspeellijst',
|
||||
'playlists.errorLoading' => 'Fout bij laden afspeellijsten',
|
||||
@@ -1880,7 +1873,6 @@ extension on TranslationsNl {
|
||||
'collections.deleteFailedWithError' => ({required Object error}) => 'Collectie verwijderen mislukt: ${error}',
|
||||
'collections.failedToLoadItems' => ({required Object error}) => 'Collectie-items laden mislukt: ${error}',
|
||||
'collections.selectCollection' => 'Selecteer collectie',
|
||||
'collections.createNewCollection' => 'Nieuwe collectie maken',
|
||||
'collections.collectionName' => 'Collectienaam',
|
||||
'collections.enterCollectionName' => 'Voer collectienaam in',
|
||||
'collections.addedToCollection' => 'Toegevoegd aan collectie',
|
||||
|
||||
+30
-38
@@ -130,6 +130,7 @@ class _TranslationsCommonSv implements TranslationsCommonEn {
|
||||
@override String get delete => 'Ta bort';
|
||||
@override String get shuffle => 'Blanda';
|
||||
@override String get addTo => 'Lägg till i...';
|
||||
@override String get createNew => 'Skapa ny';
|
||||
@override String get remove => 'Ta bort';
|
||||
@override String get paste => 'Klistra in';
|
||||
@override String get connect => 'Anslut';
|
||||
@@ -141,7 +142,7 @@ class _TranslationsCommonSv implements TranslationsCommonEn {
|
||||
@override String get search => 'Sök';
|
||||
@override String get home => 'Hem';
|
||||
@override String get back => 'Tillbaka';
|
||||
@override String get settings => 'Inställningar';
|
||||
@override String get settings => 'Mer';
|
||||
@override String get mute => 'Ljud av';
|
||||
@override String get ok => 'OK';
|
||||
@override String get loading => 'Laddar...';
|
||||
@@ -168,7 +169,7 @@ class _TranslationsScreensSv implements TranslationsScreensEn {
|
||||
@override String get licenses => 'Licenser';
|
||||
@override String get switchProfile => 'Byt profil';
|
||||
@override String get subtitleStyling => 'Undertext-styling';
|
||||
@override String get mpvConfig => 'MPV-konfiguration';
|
||||
@override String get mpvConfig => 'mpv.conf';
|
||||
@override String get logs => 'Loggar';
|
||||
}
|
||||
|
||||
@@ -246,7 +247,7 @@ class _TranslationsSettingsSv implements TranslationsSettingsEn {
|
||||
@override String get playerBackend => 'Spelarmotor';
|
||||
@override String get exoPlayer => 'ExoPlayer (Rekommenderad)';
|
||||
@override String get exoPlayerDescription => 'Android-nativ spelare med bättre hårdvarustöd';
|
||||
@override String get mpv => 'MPV';
|
||||
@override String get mpv => 'mpv';
|
||||
@override String get mpvDescription => 'Avancerad spelare med fler funktioner och ASS-undertextstöd';
|
||||
@override String get hardwareDecoding => 'Hårdvaruavkodning';
|
||||
@override String get hardwareDecodingDescription => 'Använd hårdvaruacceleration när tillgängligt';
|
||||
@@ -270,6 +271,8 @@ class _TranslationsSettingsSv implements TranslationsSettingsEn {
|
||||
@override String get keyboardShortcutsDescription => 'Anpassa tangentbordsgenvägar';
|
||||
@override String get videoPlayerNavigation => 'Navigering i videospelaren';
|
||||
@override String get videoPlayerNavigationDescription => 'Använd piltangenter för att navigera videospelarens kontroller';
|
||||
@override String get crashReporting => 'Kraschrapportering';
|
||||
@override String get crashReportingDescription => 'Skicka kraschrapporter för att förbättra appen';
|
||||
@override String get debugLogging => 'Felsökningsloggning';
|
||||
@override String get debugLoggingDescription => 'Aktivera detaljerad loggning för felsökning';
|
||||
@override String get viewLogs => 'Visa loggar';
|
||||
@@ -490,6 +493,7 @@ class _TranslationsVideoControlsSv implements TranslationsVideoControlsEn {
|
||||
@override String get settingsButton => 'Videoinställningar';
|
||||
@override String get audioTrackButton => 'Ljudspår';
|
||||
@override String get subtitlesButton => 'Undertexter';
|
||||
@override String get tracksButton => 'Ljud och undertexter';
|
||||
@override String get chaptersButton => 'Kapitel';
|
||||
@override String get versionsButton => 'Videoversioner';
|
||||
@override String get pipButton => 'Bild-i-bild läge';
|
||||
@@ -504,6 +508,7 @@ class _TranslationsVideoControlsSv implements TranslationsVideoControlsEn {
|
||||
@override String get timelineSlider => 'Videotidslinje';
|
||||
@override String get volumeSlider => 'Volymnivå';
|
||||
@override String endsAt({required Object time}) => 'Slutar ${time}';
|
||||
@override String get pipActive => 'Spelar i bild-i-bild';
|
||||
@override String get pipFailed => 'Bild-i-bild kunde inte starta';
|
||||
@override late final _TranslationsVideoControlsPipErrorsSv pipErrors = _TranslationsVideoControlsPipErrorsSv._(_root);
|
||||
@override String get chapters => 'Kapitel';
|
||||
@@ -591,19 +596,10 @@ class _TranslationsMpvConfigSv implements TranslationsMpvConfigEn {
|
||||
final TranslationsSv _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'MPV-konfiguration';
|
||||
@override String get title => 'mpv-konfiguration';
|
||||
@override String get description => 'Avancerade videospelares inställningar';
|
||||
@override String get properties => 'Egenskaper';
|
||||
@override String get presets => 'Förval';
|
||||
@override String get noProperties => 'Inga egenskaper konfigurerade';
|
||||
@override String get noPresets => 'Inga sparade förval';
|
||||
@override String get addProperty => 'Lägg till egenskap';
|
||||
@override String get editProperty => 'Redigera egenskap';
|
||||
@override String get deleteProperty => 'Ta bort egenskap';
|
||||
@override String get propertyKey => 'Egenskapsnyckel';
|
||||
@override String get propertyKeyHint => 't.ex. hwdec, demuxer-max-bytes';
|
||||
@override String get propertyValue => 'Egenskapsvärde';
|
||||
@override String get propertyValueHint => 't.ex. auto, 256000000';
|
||||
@override String get saveAsPreset => 'Spara som förval...';
|
||||
@override String get presetName => 'Förvalnamn';
|
||||
@override String get presetNameHint => 'Ange ett namn för detta förval';
|
||||
@@ -613,8 +609,7 @@ class _TranslationsMpvConfigSv implements TranslationsMpvConfigEn {
|
||||
@override String get presetLoaded => 'Förval laddat';
|
||||
@override String get presetDeleted => 'Förval borttaget';
|
||||
@override String get confirmDeletePreset => 'Är du säker på att du vill ta bort detta förval?';
|
||||
@override String get confirmDeleteProperty => 'Är du säker på att du vill ta bort denna egenskap?';
|
||||
@override String entriesCount({required Object count}) => '${count} poster';
|
||||
@override String get configPlaceholder => 'gpu-api=vulkan\nhwdec=auto\n# comment';
|
||||
}
|
||||
|
||||
// Path: dialog
|
||||
@@ -795,7 +790,7 @@ class _TranslationsNavigationSv implements TranslationsNavigationEn {
|
||||
|
||||
// Translations
|
||||
@override String get libraries => 'Bibliotek';
|
||||
@override String get downloads => 'Nedladdningar';
|
||||
@override String get downloads => 'Nerladdat';
|
||||
@override String get liveTv => 'Live-TV';
|
||||
}
|
||||
|
||||
@@ -885,7 +880,6 @@ class _TranslationsPlaylistsSv implements TranslationsPlaylistsEn {
|
||||
@override String get itemAdded => 'Tillagd i spellista';
|
||||
@override String get itemRemoved => 'Borttagen från spellista';
|
||||
@override String get selectPlaylist => 'Välj spellista';
|
||||
@override String get createNewPlaylist => 'Skapa ny spellista';
|
||||
@override String get errorCreating => 'Det gick inte att skapa spellista';
|
||||
@override String get errorDeleting => 'Det gick inte att ta bort spellista';
|
||||
@override String get errorLoading => 'Det gick inte att ladda spellistor';
|
||||
@@ -913,7 +907,6 @@ class _TranslationsCollectionsSv implements TranslationsCollectionsEn {
|
||||
@override String deleteFailedWithError({required Object error}) => 'Det gick inte att ta bort samlingen: ${error}';
|
||||
@override String failedToLoadItems({required Object error}) => 'Det gick inte att läsa in samlingsobjekt: ${error}';
|
||||
@override String get selectCollection => 'Välj samling';
|
||||
@override String get createNewCollection => 'Skapa ny samling';
|
||||
@override String get collectionName => 'Samlingsnamn';
|
||||
@override String get enterCollectionName => 'Ange samlingsnamn';
|
||||
@override String get addedToCollection => 'Tillagd i samling';
|
||||
@@ -1162,8 +1155,10 @@ class _TranslationsVideoControlsPipErrorsSv implements TranslationsVideoControls
|
||||
|
||||
// Translations
|
||||
@override String get androidVersion => 'Kräver Android 8.0 eller nyare';
|
||||
@override String get iosVersion => 'Kräver iOS 15.0 eller nyare';
|
||||
@override String get permissionDisabled => 'Bild-i-bild-behörighet är inaktiverad. Aktivera den i Inställningar > Appar > Plezy > Bild-i-bild';
|
||||
@override String get notSupported => 'Denna enhet stöder inte bild-i-bild-läge';
|
||||
@override String get voSwitchFailed => 'Kunde inte byta videoutgång för bild-i-bild';
|
||||
@override String get failed => 'Bild-i-bild kunde inte starta';
|
||||
@override String unknown({required Object error}) => 'Ett fel uppstod: ${error}';
|
||||
}
|
||||
@@ -1328,6 +1323,7 @@ extension on TranslationsSv {
|
||||
'common.delete' => 'Ta bort',
|
||||
'common.shuffle' => 'Blanda',
|
||||
'common.addTo' => 'Lägg till i...',
|
||||
'common.createNew' => 'Skapa ny',
|
||||
'common.remove' => 'Ta bort',
|
||||
'common.paste' => 'Klistra in',
|
||||
'common.connect' => 'Anslut',
|
||||
@@ -1339,7 +1335,7 @@ extension on TranslationsSv {
|
||||
'common.search' => 'Sök',
|
||||
'common.home' => 'Hem',
|
||||
'common.back' => 'Tillbaka',
|
||||
'common.settings' => 'Inställningar',
|
||||
'common.settings' => 'Mer',
|
||||
'common.mute' => 'Ljud av',
|
||||
'common.ok' => 'OK',
|
||||
'common.loading' => 'Laddar...',
|
||||
@@ -1357,7 +1353,7 @@ extension on TranslationsSv {
|
||||
'screens.licenses' => 'Licenser',
|
||||
'screens.switchProfile' => 'Byt profil',
|
||||
'screens.subtitleStyling' => 'Undertext-styling',
|
||||
'screens.mpvConfig' => 'MPV-konfiguration',
|
||||
'screens.mpvConfig' => 'mpv.conf',
|
||||
'screens.logs' => 'Loggar',
|
||||
'update.available' => 'Uppdatering tillgänglig',
|
||||
'update.versionAvailable' => ({required Object version}) => 'Version ${version} är tillgänglig',
|
||||
@@ -1417,7 +1413,7 @@ extension on TranslationsSv {
|
||||
'settings.playerBackend' => 'Spelarmotor',
|
||||
'settings.exoPlayer' => 'ExoPlayer (Rekommenderad)',
|
||||
'settings.exoPlayerDescription' => 'Android-nativ spelare med bättre hårdvarustöd',
|
||||
'settings.mpv' => 'MPV',
|
||||
'settings.mpv' => 'mpv',
|
||||
'settings.mpvDescription' => 'Avancerad spelare med fler funktioner och ASS-undertextstöd',
|
||||
'settings.hardwareDecoding' => 'Hårdvaruavkodning',
|
||||
'settings.hardwareDecodingDescription' => 'Använd hårdvaruacceleration när tillgängligt',
|
||||
@@ -1441,6 +1437,8 @@ extension on TranslationsSv {
|
||||
'settings.keyboardShortcutsDescription' => 'Anpassa tangentbordsgenvägar',
|
||||
'settings.videoPlayerNavigation' => 'Navigering i videospelaren',
|
||||
'settings.videoPlayerNavigationDescription' => 'Använd piltangenter för att navigera videospelarens kontroller',
|
||||
'settings.crashReporting' => 'Kraschrapportering',
|
||||
'settings.crashReportingDescription' => 'Skicka kraschrapporter för att förbättra appen',
|
||||
'settings.debugLogging' => 'Felsökningsloggning',
|
||||
'settings.debugLoggingDescription' => 'Aktivera detaljerad loggning för felsökning',
|
||||
'settings.viewLogs' => 'Visa loggar',
|
||||
@@ -1487,6 +1485,8 @@ extension on TranslationsSv {
|
||||
'settings.maxVolumePercent' => ({required Object percent}) => '${percent}%',
|
||||
'settings.discordRichPresence' => 'Discord Rich Presence',
|
||||
'settings.discordRichPresenceDescription' => 'Visa vad du tittar på i Discord',
|
||||
'settings.autoPip' => 'Automatisk bild-i-bild',
|
||||
'settings.autoPipDescription' => 'Aktivera bild-i-bild automatiskt när appen lämnas under uppspelning',
|
||||
'settings.matchContentFrameRate' => 'Matcha innehållets bildfrekvens',
|
||||
'settings.matchContentFrameRateDescription' => 'Justera skärmens uppdateringsfrekvens för att matcha videoinnehållet, minskar hackighet och sparar batteri',
|
||||
'settings.tunneledPlayback' => 'Tunneled Playback',
|
||||
@@ -1605,6 +1605,7 @@ extension on TranslationsSv {
|
||||
'videoControls.settingsButton' => 'Videoinställningar',
|
||||
'videoControls.audioTrackButton' => 'Ljudspår',
|
||||
'videoControls.subtitlesButton' => 'Undertexter',
|
||||
'videoControls.tracksButton' => 'Ljud och undertexter',
|
||||
'videoControls.chaptersButton' => 'Kapitel',
|
||||
'videoControls.versionsButton' => 'Videoversioner',
|
||||
'videoControls.pipButton' => 'Bild-i-bild läge',
|
||||
@@ -1619,10 +1620,13 @@ extension on TranslationsSv {
|
||||
'videoControls.timelineSlider' => 'Videotidslinje',
|
||||
'videoControls.volumeSlider' => 'Volymnivå',
|
||||
'videoControls.endsAt' => ({required Object time}) => 'Slutar ${time}',
|
||||
'videoControls.pipActive' => 'Spelar i bild-i-bild',
|
||||
'videoControls.pipFailed' => 'Bild-i-bild kunde inte starta',
|
||||
'videoControls.pipErrors.androidVersion' => 'Kräver Android 8.0 eller nyare',
|
||||
'videoControls.pipErrors.iosVersion' => 'Kräver iOS 15.0 eller nyare',
|
||||
'videoControls.pipErrors.permissionDisabled' => 'Bild-i-bild-behörighet är inaktiverad. Aktivera den i Inställningar > Appar > Plezy > Bild-i-bild',
|
||||
'videoControls.pipErrors.notSupported' => 'Denna enhet stöder inte bild-i-bild-läge',
|
||||
'videoControls.pipErrors.voSwitchFailed' => 'Kunde inte byta videoutgång för bild-i-bild',
|
||||
'videoControls.pipErrors.failed' => 'Bild-i-bild kunde inte starta',
|
||||
'videoControls.pipErrors.unknown' => ({required Object error}) => 'Ett fel uppstod: ${error}',
|
||||
'videoControls.chapters' => 'Kapitel',
|
||||
@@ -1674,19 +1678,10 @@ extension on TranslationsSv {
|
||||
'subtitlingStyling.backgroundOpacity' => 'Bakgrundsopacitet',
|
||||
'subtitlingStyling.backgroundColor' => 'Bakgrundsfärg',
|
||||
'subtitlingStyling.position' => 'Position',
|
||||
'mpvConfig.title' => 'MPV-konfiguration',
|
||||
'mpvConfig.title' => 'mpv-konfiguration',
|
||||
'mpvConfig.description' => 'Avancerade videospelares inställningar',
|
||||
'mpvConfig.properties' => 'Egenskaper',
|
||||
'mpvConfig.presets' => 'Förval',
|
||||
'mpvConfig.noProperties' => 'Inga egenskaper konfigurerade',
|
||||
'mpvConfig.noPresets' => 'Inga sparade förval',
|
||||
'mpvConfig.addProperty' => 'Lägg till egenskap',
|
||||
'mpvConfig.editProperty' => 'Redigera egenskap',
|
||||
'mpvConfig.deleteProperty' => 'Ta bort egenskap',
|
||||
'mpvConfig.propertyKey' => 'Egenskapsnyckel',
|
||||
'mpvConfig.propertyKeyHint' => 't.ex. hwdec, demuxer-max-bytes',
|
||||
'mpvConfig.propertyValue' => 'Egenskapsvärde',
|
||||
'mpvConfig.propertyValueHint' => 't.ex. auto, 256000000',
|
||||
'mpvConfig.saveAsPreset' => 'Spara som förval...',
|
||||
'mpvConfig.presetName' => 'Förvalnamn',
|
||||
'mpvConfig.presetNameHint' => 'Ange ett namn för detta förval',
|
||||
@@ -1696,8 +1691,7 @@ extension on TranslationsSv {
|
||||
'mpvConfig.presetLoaded' => 'Förval laddat',
|
||||
'mpvConfig.presetDeleted' => 'Förval borttaget',
|
||||
'mpvConfig.confirmDeletePreset' => 'Är du säker på att du vill ta bort detta förval?',
|
||||
'mpvConfig.confirmDeleteProperty' => 'Är du säker på att du vill ta bort denna egenskap?',
|
||||
'mpvConfig.entriesCount' => ({required Object count}) => '${count} poster',
|
||||
'mpvConfig.configPlaceholder' => 'gpu-api=vulkan\nhwdec=auto\n# comment',
|
||||
'dialog.confirmAction' => 'Bekräfta åtgärd',
|
||||
'discover.title' => 'Upptäck',
|
||||
'discover.switchProfile' => 'Byt profil',
|
||||
@@ -1796,7 +1790,7 @@ extension on TranslationsSv {
|
||||
'licenses.licenseNumber' => ({required Object number}) => 'Licens ${number}',
|
||||
'licenses.licensesCount' => ({required Object count}) => '${count} licenser',
|
||||
'navigation.libraries' => 'Bibliotek',
|
||||
'navigation.downloads' => 'Nedladdningar',
|
||||
'navigation.downloads' => 'Nerladdat',
|
||||
'navigation.liveTv' => 'Live-TV',
|
||||
'liveTv.title' => 'Live-TV',
|
||||
'liveTv.channels' => 'Kanaler',
|
||||
@@ -1813,6 +1807,8 @@ extension on TranslationsSv {
|
||||
'liveTv.premiere' => 'NY',
|
||||
'liveTv.reloadGuide' => 'Ladda om programguide',
|
||||
'liveTv.allChannels' => 'Alla kanaler',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'liveTv.now' => 'Nu',
|
||||
'liveTv.today' => 'Idag',
|
||||
'liveTv.midnight' => 'Midnatt',
|
||||
@@ -1822,8 +1818,6 @@ 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',
|
||||
@@ -1861,7 +1855,6 @@ extension on TranslationsSv {
|
||||
'playlists.itemAdded' => 'Tillagd i spellista',
|
||||
'playlists.itemRemoved' => 'Borttagen från spellista',
|
||||
'playlists.selectPlaylist' => 'Välj spellista',
|
||||
'playlists.createNewPlaylist' => 'Skapa ny spellista',
|
||||
'playlists.errorCreating' => 'Det gick inte att skapa spellista',
|
||||
'playlists.errorDeleting' => 'Det gick inte att ta bort spellista',
|
||||
'playlists.errorLoading' => 'Det gick inte att ladda spellistor',
|
||||
@@ -1880,7 +1873,6 @@ extension on TranslationsSv {
|
||||
'collections.deleteFailedWithError' => ({required Object error}) => 'Det gick inte att ta bort samlingen: ${error}',
|
||||
'collections.failedToLoadItems' => ({required Object error}) => 'Det gick inte att läsa in samlingsobjekt: ${error}',
|
||||
'collections.selectCollection' => 'Välj samling',
|
||||
'collections.createNewCollection' => 'Skapa ny samling',
|
||||
'collections.collectionName' => 'Samlingsnamn',
|
||||
'collections.enterCollectionName' => 'Ange samlingsnamn',
|
||||
'collections.addedToCollection' => 'Tillagd i samling',
|
||||
|
||||
+26
-34
@@ -130,6 +130,7 @@ class _TranslationsCommonZh implements TranslationsCommonEn {
|
||||
@override String get delete => '删除';
|
||||
@override String get shuffle => '随机播放';
|
||||
@override String get addTo => '添加到...';
|
||||
@override String get createNew => '新建';
|
||||
@override String get remove => '删除';
|
||||
@override String get paste => '粘贴';
|
||||
@override String get connect => '连接';
|
||||
@@ -168,7 +169,7 @@ class _TranslationsScreensZh implements TranslationsScreensEn {
|
||||
@override String get licenses => '许可证';
|
||||
@override String get switchProfile => '切换用户';
|
||||
@override String get subtitleStyling => '字幕样式';
|
||||
@override String get mpvConfig => 'MPV 配置';
|
||||
@override String get mpvConfig => 'mpv.conf';
|
||||
@override String get logs => '日志';
|
||||
}
|
||||
|
||||
@@ -246,7 +247,7 @@ class _TranslationsSettingsZh implements TranslationsSettingsEn {
|
||||
@override String get playerBackend => '播放器引擎';
|
||||
@override String get exoPlayer => 'ExoPlayer(推荐)';
|
||||
@override String get exoPlayerDescription => 'Android 原生播放器,硬件支持更好';
|
||||
@override String get mpv => 'MPV';
|
||||
@override String get mpv => 'mpv';
|
||||
@override String get mpvDescription => '功能更多的高级播放器,支持 ASS 字幕';
|
||||
@override String get hardwareDecoding => '硬件解码';
|
||||
@override String get hardwareDecodingDescription => '如果可用,使用硬件加速';
|
||||
@@ -270,6 +271,8 @@ class _TranslationsSettingsZh implements TranslationsSettingsEn {
|
||||
@override String get keyboardShortcutsDescription => '自定义键盘快捷键';
|
||||
@override String get videoPlayerNavigation => '视频播放器导航';
|
||||
@override String get videoPlayerNavigationDescription => '使用方向键导航视频播放器控件';
|
||||
@override String get crashReporting => '崩溃报告';
|
||||
@override String get crashReportingDescription => '发送崩溃报告以帮助改进应用';
|
||||
@override String get debugLogging => '调试日志';
|
||||
@override String get debugLoggingDescription => '启用详细日志记录以便故障排除';
|
||||
@override String get viewLogs => '查看日志';
|
||||
@@ -490,6 +493,7 @@ class _TranslationsVideoControlsZh implements TranslationsVideoControlsEn {
|
||||
@override String get settingsButton => '视频设置';
|
||||
@override String get audioTrackButton => '音轨';
|
||||
@override String get subtitlesButton => '字幕';
|
||||
@override String get tracksButton => '音频和字幕';
|
||||
@override String get chaptersButton => '章节';
|
||||
@override String get versionsButton => '视频版本';
|
||||
@override String get pipButton => '画中画模式';
|
||||
@@ -504,6 +508,7 @@ class _TranslationsVideoControlsZh implements TranslationsVideoControlsEn {
|
||||
@override String get timelineSlider => '视频时间轴';
|
||||
@override String get volumeSlider => '音量调节';
|
||||
@override String endsAt({required Object time}) => '${time} 结束';
|
||||
@override String get pipActive => '正在画中画模式中播放';
|
||||
@override String get pipFailed => '画中画启动失败';
|
||||
@override late final _TranslationsVideoControlsPipErrorsZh pipErrors = _TranslationsVideoControlsPipErrorsZh._(_root);
|
||||
@override String get chapters => '章节';
|
||||
@@ -591,19 +596,10 @@ class _TranslationsMpvConfigZh implements TranslationsMpvConfigEn {
|
||||
final TranslationsZh _root; // ignore: unused_field
|
||||
|
||||
// Translations
|
||||
@override String get title => 'MPV 配置';
|
||||
@override String get title => 'mpv 配置';
|
||||
@override String get description => '高级视频播放器设置';
|
||||
@override String get properties => '属性';
|
||||
@override String get presets => '预设';
|
||||
@override String get noProperties => '未配置任何属性';
|
||||
@override String get noPresets => '没有保存的预设';
|
||||
@override String get addProperty => '添加属性';
|
||||
@override String get editProperty => '编辑属性';
|
||||
@override String get deleteProperty => '删除属性';
|
||||
@override String get propertyKey => '属性键';
|
||||
@override String get propertyKeyHint => '例如 hwdec, demuxer-max-bytes';
|
||||
@override String get propertyValue => '属性值';
|
||||
@override String get propertyValueHint => '例如 auto, 256000000';
|
||||
@override String get saveAsPreset => '保存为预设...';
|
||||
@override String get presetName => '预设名称';
|
||||
@override String get presetNameHint => '输入此预设的名称';
|
||||
@@ -613,8 +609,7 @@ class _TranslationsMpvConfigZh implements TranslationsMpvConfigEn {
|
||||
@override String get presetLoaded => '预设已加载';
|
||||
@override String get presetDeleted => '预设已删除';
|
||||
@override String get confirmDeletePreset => '确定要删除此预设吗?';
|
||||
@override String get confirmDeleteProperty => '确定要删除此属性吗?';
|
||||
@override String entriesCount({required Object count}) => '${count} 条目';
|
||||
@override String get configPlaceholder => 'gpu-api=vulkan\nhwdec=auto\n# comment';
|
||||
}
|
||||
|
||||
// Path: dialog
|
||||
@@ -885,7 +880,6 @@ class _TranslationsPlaylistsZh implements TranslationsPlaylistsEn {
|
||||
@override String get itemAdded => '已添加到播放列表';
|
||||
@override String get itemRemoved => '已从播放列表中移除';
|
||||
@override String get selectPlaylist => '选择播放列表';
|
||||
@override String get createNewPlaylist => '创建新播放列表';
|
||||
@override String get errorCreating => '创建播放列表失败';
|
||||
@override String get errorDeleting => '删除播放列表失败';
|
||||
@override String get errorLoading => '加载播放列表失败';
|
||||
@@ -913,7 +907,6 @@ class _TranslationsCollectionsZh implements TranslationsCollectionsEn {
|
||||
@override String deleteFailedWithError({required Object error}) => '删除合集失败:${error}';
|
||||
@override String failedToLoadItems({required Object error}) => '加载合集项目失败:${error}';
|
||||
@override String get selectCollection => '选择合集';
|
||||
@override String get createNewCollection => '创建新合集';
|
||||
@override String get collectionName => '合集名称';
|
||||
@override String get enterCollectionName => '输入合集名称';
|
||||
@override String get addedToCollection => '已添加到合集';
|
||||
@@ -1162,8 +1155,10 @@ class _TranslationsVideoControlsPipErrorsZh implements TranslationsVideoControls
|
||||
|
||||
// Translations
|
||||
@override String get androidVersion => '需要 Android 8.0 或更高版本';
|
||||
@override String get iosVersion => '需要 iOS 15.0 或更高版本';
|
||||
@override String get permissionDisabled => '画中画权限已禁用。请在设置 > 应用 > Plezy > 画中画中启用';
|
||||
@override String get notSupported => '此设备不支持画中画模式';
|
||||
@override String get voSwitchFailed => '无法切换画中画的视频输出';
|
||||
@override String get failed => '画中画启动失败';
|
||||
@override String unknown({required Object error}) => '发生错误:${error}';
|
||||
}
|
||||
@@ -1328,6 +1323,7 @@ extension on TranslationsZh {
|
||||
'common.delete' => '删除',
|
||||
'common.shuffle' => '随机播放',
|
||||
'common.addTo' => '添加到...',
|
||||
'common.createNew' => '新建',
|
||||
'common.remove' => '删除',
|
||||
'common.paste' => '粘贴',
|
||||
'common.connect' => '连接',
|
||||
@@ -1357,7 +1353,7 @@ extension on TranslationsZh {
|
||||
'screens.licenses' => '许可证',
|
||||
'screens.switchProfile' => '切换用户',
|
||||
'screens.subtitleStyling' => '字幕样式',
|
||||
'screens.mpvConfig' => 'MPV 配置',
|
||||
'screens.mpvConfig' => 'mpv.conf',
|
||||
'screens.logs' => '日志',
|
||||
'update.available' => '有可用更新',
|
||||
'update.versionAvailable' => ({required Object version}) => '版本 ${version} 已发布',
|
||||
@@ -1417,7 +1413,7 @@ extension on TranslationsZh {
|
||||
'settings.playerBackend' => '播放器引擎',
|
||||
'settings.exoPlayer' => 'ExoPlayer(推荐)',
|
||||
'settings.exoPlayerDescription' => 'Android 原生播放器,硬件支持更好',
|
||||
'settings.mpv' => 'MPV',
|
||||
'settings.mpv' => 'mpv',
|
||||
'settings.mpvDescription' => '功能更多的高级播放器,支持 ASS 字幕',
|
||||
'settings.hardwareDecoding' => '硬件解码',
|
||||
'settings.hardwareDecodingDescription' => '如果可用,使用硬件加速',
|
||||
@@ -1441,6 +1437,8 @@ extension on TranslationsZh {
|
||||
'settings.keyboardShortcutsDescription' => '自定义键盘快捷键',
|
||||
'settings.videoPlayerNavigation' => '视频播放器导航',
|
||||
'settings.videoPlayerNavigationDescription' => '使用方向键导航视频播放器控件',
|
||||
'settings.crashReporting' => '崩溃报告',
|
||||
'settings.crashReportingDescription' => '发送崩溃报告以帮助改进应用',
|
||||
'settings.debugLogging' => '调试日志',
|
||||
'settings.debugLoggingDescription' => '启用详细日志记录以便故障排除',
|
||||
'settings.viewLogs' => '查看日志',
|
||||
@@ -1487,6 +1485,8 @@ extension on TranslationsZh {
|
||||
'settings.maxVolumePercent' => ({required Object percent}) => '${percent}%',
|
||||
'settings.discordRichPresence' => 'Discord 动态状态',
|
||||
'settings.discordRichPresenceDescription' => '在 Discord 上显示您正在观看的内容',
|
||||
'settings.autoPip' => '自动画中画',
|
||||
'settings.autoPipDescription' => '在播放期间离开应用时自动进入画中画模式',
|
||||
'settings.matchContentFrameRate' => '匹配内容帧率',
|
||||
'settings.matchContentFrameRateDescription' => '调整显示刷新率以匹配视频内容,减少画面抖动并节省电量',
|
||||
'settings.tunneledPlayback' => 'Tunneled Playback',
|
||||
@@ -1605,6 +1605,7 @@ extension on TranslationsZh {
|
||||
'videoControls.settingsButton' => '视频设置',
|
||||
'videoControls.audioTrackButton' => '音轨',
|
||||
'videoControls.subtitlesButton' => '字幕',
|
||||
'videoControls.tracksButton' => '音频和字幕',
|
||||
'videoControls.chaptersButton' => '章节',
|
||||
'videoControls.versionsButton' => '视频版本',
|
||||
'videoControls.pipButton' => '画中画模式',
|
||||
@@ -1619,10 +1620,13 @@ extension on TranslationsZh {
|
||||
'videoControls.timelineSlider' => '视频时间轴',
|
||||
'videoControls.volumeSlider' => '音量调节',
|
||||
'videoControls.endsAt' => ({required Object time}) => '${time} 结束',
|
||||
'videoControls.pipActive' => '正在画中画模式中播放',
|
||||
'videoControls.pipFailed' => '画中画启动失败',
|
||||
'videoControls.pipErrors.androidVersion' => '需要 Android 8.0 或更高版本',
|
||||
'videoControls.pipErrors.iosVersion' => '需要 iOS 15.0 或更高版本',
|
||||
'videoControls.pipErrors.permissionDisabled' => '画中画权限已禁用。请在设置 > 应用 > Plezy > 画中画中启用',
|
||||
'videoControls.pipErrors.notSupported' => '此设备不支持画中画模式',
|
||||
'videoControls.pipErrors.voSwitchFailed' => '无法切换画中画的视频输出',
|
||||
'videoControls.pipErrors.failed' => '画中画启动失败',
|
||||
'videoControls.pipErrors.unknown' => ({required Object error}) => '发生错误:${error}',
|
||||
'videoControls.chapters' => '章节',
|
||||
@@ -1674,19 +1678,10 @@ extension on TranslationsZh {
|
||||
'subtitlingStyling.backgroundOpacity' => '背景不透明度',
|
||||
'subtitlingStyling.backgroundColor' => '背景颜色',
|
||||
'subtitlingStyling.position' => 'Position',
|
||||
'mpvConfig.title' => 'MPV 配置',
|
||||
'mpvConfig.title' => 'mpv 配置',
|
||||
'mpvConfig.description' => '高级视频播放器设置',
|
||||
'mpvConfig.properties' => '属性',
|
||||
'mpvConfig.presets' => '预设',
|
||||
'mpvConfig.noProperties' => '未配置任何属性',
|
||||
'mpvConfig.noPresets' => '没有保存的预设',
|
||||
'mpvConfig.addProperty' => '添加属性',
|
||||
'mpvConfig.editProperty' => '编辑属性',
|
||||
'mpvConfig.deleteProperty' => '删除属性',
|
||||
'mpvConfig.propertyKey' => '属性键',
|
||||
'mpvConfig.propertyKeyHint' => '例如 hwdec, demuxer-max-bytes',
|
||||
'mpvConfig.propertyValue' => '属性值',
|
||||
'mpvConfig.propertyValueHint' => '例如 auto, 256000000',
|
||||
'mpvConfig.saveAsPreset' => '保存为预设...',
|
||||
'mpvConfig.presetName' => '预设名称',
|
||||
'mpvConfig.presetNameHint' => '输入此预设的名称',
|
||||
@@ -1696,8 +1691,7 @@ extension on TranslationsZh {
|
||||
'mpvConfig.presetLoaded' => '预设已加载',
|
||||
'mpvConfig.presetDeleted' => '预设已删除',
|
||||
'mpvConfig.confirmDeletePreset' => '确定要删除此预设吗?',
|
||||
'mpvConfig.confirmDeleteProperty' => '确定要删除此属性吗?',
|
||||
'mpvConfig.entriesCount' => ({required Object count}) => '${count} 条目',
|
||||
'mpvConfig.configPlaceholder' => 'gpu-api=vulkan\nhwdec=auto\n# comment',
|
||||
'dialog.confirmAction' => '确认操作',
|
||||
'discover.title' => '发现',
|
||||
'discover.switchProfile' => '切换用户',
|
||||
@@ -1813,6 +1807,8 @@ extension on TranslationsZh {
|
||||
'liveTv.premiere' => '新',
|
||||
'liveTv.reloadGuide' => '重新加载节目指南',
|
||||
'liveTv.allChannels' => '所有频道',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'liveTv.now' => '现在',
|
||||
'liveTv.today' => '今天',
|
||||
'liveTv.midnight' => '午夜',
|
||||
@@ -1822,8 +1818,6 @@ extension on TranslationsZh {
|
||||
'liveTv.evening' => '晚上',
|
||||
'liveTv.lateNight' => '深夜',
|
||||
'liveTv.whatsOn' => '正在播出',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'liveTv.watchChannel' => '观看频道',
|
||||
'downloads.title' => '下载',
|
||||
'downloads.manage' => '管理',
|
||||
@@ -1861,7 +1855,6 @@ extension on TranslationsZh {
|
||||
'playlists.itemAdded' => '已添加到播放列表',
|
||||
'playlists.itemRemoved' => '已从播放列表中移除',
|
||||
'playlists.selectPlaylist' => '选择播放列表',
|
||||
'playlists.createNewPlaylist' => '创建新播放列表',
|
||||
'playlists.errorCreating' => '创建播放列表失败',
|
||||
'playlists.errorDeleting' => '删除播放列表失败',
|
||||
'playlists.errorLoading' => '加载播放列表失败',
|
||||
@@ -1880,7 +1873,6 @@ extension on TranslationsZh {
|
||||
'collections.deleteFailedWithError' => ({required Object error}) => '删除合集失败:${error}',
|
||||
'collections.failedToLoadItems' => ({required Object error}) => '加载合集项目失败:${error}',
|
||||
'collections.selectCollection' => '选择合集',
|
||||
'collections.createNewCollection' => '创建新合集',
|
||||
'collections.collectionName' => '合集名称',
|
||||
'collections.enterCollectionName' => '输入合集名称',
|
||||
'collections.addedToCollection' => '已添加到合集',
|
||||
|
||||
+13
-18
@@ -32,6 +32,7 @@
|
||||
"delete": "Ta bort",
|
||||
"shuffle": "Blanda",
|
||||
"addTo": "Lägg till i...",
|
||||
"createNew": "Skapa ny",
|
||||
"remove": "Ta bort",
|
||||
"paste": "Klistra in",
|
||||
"connect": "Anslut",
|
||||
@@ -43,7 +44,7 @@
|
||||
"search": "Sök",
|
||||
"home": "Hem",
|
||||
"back": "Tillbaka",
|
||||
"settings": "Inställningar",
|
||||
"settings": "Mer",
|
||||
"mute": "Ljud av",
|
||||
"ok": "OK",
|
||||
"loading": "Laddar...",
|
||||
@@ -63,7 +64,7 @@
|
||||
"licenses": "Licenser",
|
||||
"switchProfile": "Byt profil",
|
||||
"subtitleStyling": "Undertext-styling",
|
||||
"mpvConfig": "MPV-konfiguration",
|
||||
"mpvConfig": "mpv.conf",
|
||||
"logs": "Loggar"
|
||||
},
|
||||
"update": {
|
||||
@@ -127,7 +128,7 @@
|
||||
"playerBackend": "Spelarmotor",
|
||||
"exoPlayer": "ExoPlayer (Rekommenderad)",
|
||||
"exoPlayerDescription": "Android-nativ spelare med bättre hårdvarustöd",
|
||||
"mpv": "MPV",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "Avancerad spelare med fler funktioner och ASS-undertextstöd",
|
||||
"hardwareDecoding": "Hårdvaruavkodning",
|
||||
"hardwareDecodingDescription": "Använd hårdvaruacceleration när tillgängligt",
|
||||
@@ -151,6 +152,8 @@
|
||||
"keyboardShortcutsDescription": "Anpassa tangentbordsgenvägar",
|
||||
"videoPlayerNavigation": "Navigering i videospelaren",
|
||||
"videoPlayerNavigationDescription": "Använd piltangenter för att navigera videospelarens kontroller",
|
||||
"crashReporting": "Kraschrapportering",
|
||||
"crashReportingDescription": "Skicka kraschrapporter för att förbättra appen",
|
||||
"debugLogging": "Felsökningsloggning",
|
||||
"debugLoggingDescription": "Aktivera detaljerad loggning för felsökning",
|
||||
"viewLogs": "Visa loggar",
|
||||
@@ -335,6 +338,7 @@
|
||||
"settingsButton": "Videoinställningar",
|
||||
"audioTrackButton": "Ljudspår",
|
||||
"subtitlesButton": "Undertexter",
|
||||
"tracksButton": "Ljud och undertexter",
|
||||
"chaptersButton": "Kapitel",
|
||||
"versionsButton": "Videoversioner",
|
||||
"pipButton": "Bild-i-bild läge",
|
||||
@@ -349,11 +353,14 @@
|
||||
"timelineSlider": "Videotidslinje",
|
||||
"volumeSlider": "Volymnivå",
|
||||
"endsAt": "Slutar ${time}",
|
||||
"pipActive": "Spelar i bild-i-bild",
|
||||
"pipFailed": "Bild-i-bild kunde inte starta",
|
||||
"pipErrors": {
|
||||
"androidVersion": "Kräver Android 8.0 eller nyare",
|
||||
"iosVersion": "Kräver iOS 15.0 eller nyare",
|
||||
"permissionDisabled": "Bild-i-bild-behörighet är inaktiverad. Aktivera den i Inställningar > Appar > Plezy > Bild-i-bild",
|
||||
"notSupported": "Denna enhet stöder inte bild-i-bild-läge",
|
||||
"voSwitchFailed": "Kunde inte byta videoutgång för bild-i-bild",
|
||||
"failed": "Bild-i-bild kunde inte starta",
|
||||
"unknown": "Ett fel uppstod: ${error}"
|
||||
},
|
||||
@@ -414,19 +421,10 @@
|
||||
"position": "Position"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "MPV-konfiguration",
|
||||
"title": "mpv-konfiguration",
|
||||
"description": "Avancerade videospelares inställningar",
|
||||
"properties": "Egenskaper",
|
||||
"presets": "Förval",
|
||||
"noProperties": "Inga egenskaper konfigurerade",
|
||||
"noPresets": "Inga sparade förval",
|
||||
"addProperty": "Lägg till egenskap",
|
||||
"editProperty": "Redigera egenskap",
|
||||
"deleteProperty": "Ta bort egenskap",
|
||||
"propertyKey": "Egenskapsnyckel",
|
||||
"propertyKeyHint": "t.ex. hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "Egenskapsvärde",
|
||||
"propertyValueHint": "t.ex. auto, 256000000",
|
||||
"saveAsPreset": "Spara som förval...",
|
||||
"presetName": "Förvalnamn",
|
||||
"presetNameHint": "Ange ett namn för detta förval",
|
||||
@@ -436,8 +434,7 @@
|
||||
"presetLoaded": "Förval laddat",
|
||||
"presetDeleted": "Förval borttaget",
|
||||
"confirmDeletePreset": "Är du säker på att du vill ta bort detta förval?",
|
||||
"confirmDeleteProperty": "Är du säker på att du vill ta bort denna egenskap?",
|
||||
"entriesCount": "${count} poster"
|
||||
"configPlaceholder": "gpu-api=vulkan\nhwdec=auto\n# comment"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "Bekräfta åtgärd"
|
||||
@@ -560,7 +557,7 @@
|
||||
},
|
||||
"navigation": {
|
||||
"libraries": "Bibliotek",
|
||||
"downloads": "Nedladdningar",
|
||||
"downloads": "Nerladdat",
|
||||
"liveTv": "Live-TV"
|
||||
},
|
||||
"liveTv": {
|
||||
@@ -629,7 +626,6 @@
|
||||
"itemAdded": "Tillagd i spellista",
|
||||
"itemRemoved": "Borttagen från spellista",
|
||||
"selectPlaylist": "Välj spellista",
|
||||
"createNewPlaylist": "Skapa ny spellista",
|
||||
"errorCreating": "Det gick inte att skapa spellista",
|
||||
"errorDeleting": "Det gick inte att ta bort spellista",
|
||||
"errorLoading": "Det gick inte att ladda spellistor",
|
||||
@@ -650,7 +646,6 @@
|
||||
"deleteFailedWithError": "Det gick inte att ta bort samlingen: ${error}",
|
||||
"failedToLoadItems": "Det gick inte att läsa in samlingsobjekt: ${error}",
|
||||
"selectCollection": "Välj samling",
|
||||
"createNewCollection": "Skapa ny samling",
|
||||
"collectionName": "Samlingsnamn",
|
||||
"enterCollectionName": "Ange samlingsnamn",
|
||||
"addedToCollection": "Tillagd i samling",
|
||||
|
||||
+11
-16
@@ -32,6 +32,7 @@
|
||||
"delete": "删除",
|
||||
"shuffle": "随机播放",
|
||||
"addTo": "添加到...",
|
||||
"createNew": "新建",
|
||||
"remove": "删除",
|
||||
"paste": "粘贴",
|
||||
"connect": "连接",
|
||||
@@ -63,7 +64,7 @@
|
||||
"licenses": "许可证",
|
||||
"switchProfile": "切换用户",
|
||||
"subtitleStyling": "字幕样式",
|
||||
"mpvConfig": "MPV 配置",
|
||||
"mpvConfig": "mpv.conf",
|
||||
"logs": "日志"
|
||||
},
|
||||
"update": {
|
||||
@@ -127,7 +128,7 @@
|
||||
"playerBackend": "播放器引擎",
|
||||
"exoPlayer": "ExoPlayer(推荐)",
|
||||
"exoPlayerDescription": "Android 原生播放器,硬件支持更好",
|
||||
"mpv": "MPV",
|
||||
"mpv": "mpv",
|
||||
"mpvDescription": "功能更多的高级播放器,支持 ASS 字幕",
|
||||
"hardwareDecoding": "硬件解码",
|
||||
"hardwareDecodingDescription": "如果可用,使用硬件加速",
|
||||
@@ -151,6 +152,8 @@
|
||||
"keyboardShortcutsDescription": "自定义键盘快捷键",
|
||||
"videoPlayerNavigation": "视频播放器导航",
|
||||
"videoPlayerNavigationDescription": "使用方向键导航视频播放器控件",
|
||||
"crashReporting": "崩溃报告",
|
||||
"crashReportingDescription": "发送崩溃报告以帮助改进应用",
|
||||
"debugLogging": "调试日志",
|
||||
"debugLoggingDescription": "启用详细日志记录以便故障排除",
|
||||
"viewLogs": "查看日志",
|
||||
@@ -335,6 +338,7 @@
|
||||
"settingsButton": "视频设置",
|
||||
"audioTrackButton": "音轨",
|
||||
"subtitlesButton": "字幕",
|
||||
"tracksButton": "音频和字幕",
|
||||
"chaptersButton": "章节",
|
||||
"versionsButton": "视频版本",
|
||||
"pipButton": "画中画模式",
|
||||
@@ -349,11 +353,14 @@
|
||||
"timelineSlider": "视频时间轴",
|
||||
"volumeSlider": "音量调节",
|
||||
"endsAt": "${time} 结束",
|
||||
"pipActive": "正在画中画模式中播放",
|
||||
"pipFailed": "画中画启动失败",
|
||||
"pipErrors": {
|
||||
"androidVersion": "需要 Android 8.0 或更高版本",
|
||||
"iosVersion": "需要 iOS 15.0 或更高版本",
|
||||
"permissionDisabled": "画中画权限已禁用。请在设置 > 应用 > Plezy > 画中画中启用",
|
||||
"notSupported": "此设备不支持画中画模式",
|
||||
"voSwitchFailed": "无法切换画中画的视频输出",
|
||||
"failed": "画中画启动失败",
|
||||
"unknown": "发生错误:${error}"
|
||||
},
|
||||
@@ -414,19 +421,10 @@
|
||||
"position": "Position"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "MPV 配置",
|
||||
"title": "mpv 配置",
|
||||
"description": "高级视频播放器设置",
|
||||
"properties": "属性",
|
||||
"presets": "预设",
|
||||
"noProperties": "未配置任何属性",
|
||||
"noPresets": "没有保存的预设",
|
||||
"addProperty": "添加属性",
|
||||
"editProperty": "编辑属性",
|
||||
"deleteProperty": "删除属性",
|
||||
"propertyKey": "属性键",
|
||||
"propertyKeyHint": "例如 hwdec, demuxer-max-bytes",
|
||||
"propertyValue": "属性值",
|
||||
"propertyValueHint": "例如 auto, 256000000",
|
||||
"saveAsPreset": "保存为预设...",
|
||||
"presetName": "预设名称",
|
||||
"presetNameHint": "输入此预设的名称",
|
||||
@@ -436,8 +434,7 @@
|
||||
"presetLoaded": "预设已加载",
|
||||
"presetDeleted": "预设已删除",
|
||||
"confirmDeletePreset": "确定要删除此预设吗?",
|
||||
"confirmDeleteProperty": "确定要删除此属性吗?",
|
||||
"entriesCount": "${count} 条目"
|
||||
"configPlaceholder": "gpu-api=vulkan\nhwdec=auto\n# comment"
|
||||
},
|
||||
"dialog": {
|
||||
"confirmAction": "确认操作"
|
||||
@@ -629,7 +626,6 @@
|
||||
"itemAdded": "已添加到播放列表",
|
||||
"itemRemoved": "已从播放列表中移除",
|
||||
"selectPlaylist": "选择播放列表",
|
||||
"createNewPlaylist": "创建新播放列表",
|
||||
"errorCreating": "创建播放列表失败",
|
||||
"errorDeleting": "删除播放列表失败",
|
||||
"errorLoading": "加载播放列表失败",
|
||||
@@ -650,7 +646,6 @@
|
||||
"deleteFailedWithError": "删除合集失败:${error}",
|
||||
"failedToLoadItems": "加载合集项目失败:${error}",
|
||||
"selectCollection": "选择合集",
|
||||
"createNewCollection": "创建新合集",
|
||||
"collectionName": "合集名称",
|
||||
"enterCollectionName": "输入合集名称",
|
||||
"addedToCollection": "已添加到合集",
|
||||
|
||||
+102
-54
@@ -1,3 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
@@ -5,6 +7,7 @@ import 'dart:io' show Platform;
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
import 'screens/main_screen.dart';
|
||||
import 'screens/auth_screen.dart';
|
||||
import 'services/storage_service.dart';
|
||||
@@ -48,6 +51,7 @@ import 'focus/input_mode_tracker.dart';
|
||||
import 'focus/key_event_utils.dart';
|
||||
import 'package:intl/date_symbol_data_local.dart';
|
||||
import 'utils/navigation_transitions.dart';
|
||||
import 'utils/log_redaction_manager.dart';
|
||||
|
||||
// Workaround for Flutter bug #177992: iPadOS 26.1+ misinterprets fake touch events
|
||||
// at (0,0) as barrier taps, causing modals to dismiss immediately.
|
||||
@@ -70,69 +74,113 @@ void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
_installZeroOffsetPointerGuard(); // Workaround for iPadOS 26.1+ modal dismissal bug
|
||||
|
||||
// Initialize settings first to get saved locale
|
||||
final settings = await SettingsService.getInstance();
|
||||
final savedLocale = settings.getAppLocale();
|
||||
await SentryFlutter.init(
|
||||
(options) {
|
||||
options.dsn = 'https://6a1a6ef8c72140099b2798973c1bfb2f@bugs.plezy.app/1';
|
||||
options.tracesSampleRate = 0;
|
||||
options.attachStacktrace = true;
|
||||
options.enableAutoSessionTracking = false;
|
||||
options.beforeSend = _beforeSend;
|
||||
},
|
||||
appRunner: () async {
|
||||
// Initialize settings first to get saved locale
|
||||
final settings = await SettingsService.getInstance();
|
||||
final savedLocale = settings.getAppLocale();
|
||||
|
||||
// Initialize localization with saved locale
|
||||
LocaleSettings.setLocale(savedLocale);
|
||||
// Initialize localization with saved locale
|
||||
LocaleSettings.setLocale(savedLocale);
|
||||
|
||||
// Needed for formatting dates in different locales
|
||||
await initializeDateFormatting(savedLocale.languageCode, null);
|
||||
// Needed for formatting dates in different locales
|
||||
await initializeDateFormatting(savedLocale.languageCode, null);
|
||||
|
||||
// Configure image cache for large libraries
|
||||
PaintingBinding.instance.imageCache.maximumSize = 2000; // default 1000
|
||||
PaintingBinding.instance.imageCache.maximumSizeBytes = 300 << 20; // 300MB
|
||||
// Configure image cache for large libraries
|
||||
PaintingBinding.instance.imageCache.maximumSize = 2000; // default 1000
|
||||
PaintingBinding.instance.imageCache.maximumSizeBytes = 300 << 20; // 300MB
|
||||
|
||||
// Initialize services in parallel where possible
|
||||
final futures = <Future<void>>[];
|
||||
// Initialize services in parallel where possible
|
||||
final futures = <Future<void>>[];
|
||||
|
||||
// Initialize window_manager for desktop platforms
|
||||
if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) {
|
||||
futures.add(windowManager.ensureInitialized());
|
||||
// Initialize window_manager for desktop platforms
|
||||
if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) {
|
||||
futures.add(windowManager.ensureInitialized());
|
||||
}
|
||||
|
||||
// Initialize TV detection and PiP service for Android
|
||||
if (Platform.isAndroid) {
|
||||
futures.add(TvDetectionService.getInstance());
|
||||
// Initialize PiP service to listen for PiP state changes
|
||||
PipService();
|
||||
}
|
||||
|
||||
// Configure macOS window with custom titlebar (depends on window manager)
|
||||
futures.add(MacOSWindowService.setupCustomTitlebar());
|
||||
|
||||
// Initialize storage service
|
||||
futures.add(StorageService.getInstance());
|
||||
|
||||
// Initialize language codes for track selection
|
||||
futures.add(LanguageCodes.initialize());
|
||||
|
||||
// Wait for all parallel services to complete
|
||||
await Future.wait(futures);
|
||||
|
||||
// Initialize logger level based on debug setting
|
||||
final debugEnabled = settings.getEnableDebugLogging();
|
||||
setLoggerLevel(debugEnabled);
|
||||
|
||||
// Initialize download storage service with settings
|
||||
await DownloadStorageService.instance.initialize(settings);
|
||||
|
||||
// Start global fullscreen state monitoring
|
||||
FullscreenStateManager().startMonitoring();
|
||||
|
||||
// Initialize gamepad service for desktop platforms
|
||||
if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) {
|
||||
GamepadService.instance.start();
|
||||
DiscordRPCService.instance.initialize();
|
||||
}
|
||||
|
||||
// DTD service is available for MCP tooling connection if needed
|
||||
|
||||
// Register bundled shader licenses
|
||||
_registerShaderLicenses();
|
||||
|
||||
runApp(const MainApp());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
FutureOr<SentryEvent?> _beforeSend(SentryEvent event, Hint hint) {
|
||||
// Drop event if user opted out of crash reporting
|
||||
final instance = SettingsService.instanceOrNull;
|
||||
if (instance != null && !instance.getCrashReporting()) return null;
|
||||
|
||||
// Scrub Plex tokens and server URLs from exception messages
|
||||
var exceptions = event.exceptions;
|
||||
if (exceptions != null) {
|
||||
exceptions = exceptions.map((e) {
|
||||
final value = e.value;
|
||||
if (value != null) {
|
||||
return e.copyWith(value: LogRedactionManager.redact(value));
|
||||
}
|
||||
return e;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
// Initialize TV detection and PiP service for Android
|
||||
if (Platform.isAndroid) {
|
||||
futures.add(TvDetectionService.getInstance());
|
||||
// Initialize PiP service to listen for PiP state changes
|
||||
PipService();
|
||||
// Scrub breadcrumb messages and data
|
||||
var breadcrumbs = event.breadcrumbs;
|
||||
if (breadcrumbs != null) {
|
||||
breadcrumbs = breadcrumbs.map((b) {
|
||||
final message = b.message;
|
||||
final data = b.data;
|
||||
return b.copyWith(
|
||||
message: message != null ? LogRedactionManager.redact(message) : null,
|
||||
data: data?.map((k, v) => MapEntry(k, v is String ? LogRedactionManager.redact(v) : v)),
|
||||
);
|
||||
}).toList();
|
||||
}
|
||||
|
||||
// Configure macOS window with custom titlebar (depends on window manager)
|
||||
futures.add(MacOSWindowService.setupCustomTitlebar());
|
||||
|
||||
// Initialize storage service
|
||||
futures.add(StorageService.getInstance());
|
||||
|
||||
// Initialize language codes for track selection
|
||||
futures.add(LanguageCodes.initialize());
|
||||
|
||||
// Wait for all parallel services to complete
|
||||
await Future.wait(futures);
|
||||
|
||||
// Initialize logger level based on debug setting
|
||||
final debugEnabled = settings.getEnableDebugLogging();
|
||||
setLoggerLevel(debugEnabled);
|
||||
|
||||
// Initialize download storage service with settings
|
||||
await DownloadStorageService.instance.initialize(settings);
|
||||
|
||||
// Start global fullscreen state monitoring
|
||||
FullscreenStateManager().startMonitoring();
|
||||
|
||||
// Initialize gamepad service for desktop platforms
|
||||
if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) {
|
||||
GamepadService.instance.start();
|
||||
DiscordRPCService.instance.initialize();
|
||||
}
|
||||
|
||||
// DTD service is available for MCP tooling connection if needed
|
||||
|
||||
// Register bundled shader licenses
|
||||
_registerShaderLicenses();
|
||||
|
||||
runApp(const MainApp());
|
||||
return event.copyWith(exceptions: exceptions, breadcrumbs: breadcrumbs);
|
||||
}
|
||||
|
||||
void _registerShaderLicenses() {
|
||||
|
||||
@@ -1,45 +1,22 @@
|
||||
/// Represents a single MPV configuration entry
|
||||
class MpvConfigEntry {
|
||||
final String key;
|
||||
final String value;
|
||||
final bool isEnabled;
|
||||
|
||||
const MpvConfigEntry({required this.key, required this.value, this.isEnabled = true});
|
||||
|
||||
factory MpvConfigEntry.fromJson(Map<String, dynamic> json) {
|
||||
return MpvConfigEntry(
|
||||
key: json['key'] as String,
|
||||
value: json['value'] as String,
|
||||
isEnabled: json['isEnabled'] as bool? ?? true,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {'key': key, 'value': value, 'isEnabled': isEnabled};
|
||||
|
||||
MpvConfigEntry copyWith({String? key, String? value, bool? isEnabled}) {
|
||||
return MpvConfigEntry(key: key ?? this.key, value: value ?? this.value, isEnabled: isEnabled ?? this.isEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents a saved preset of MPV configurations
|
||||
class MpvPreset {
|
||||
final String name;
|
||||
final List<MpvConfigEntry> entries;
|
||||
final String text;
|
||||
final DateTime createdAt;
|
||||
|
||||
const MpvPreset({required this.name, required this.entries, required this.createdAt});
|
||||
const MpvPreset({required this.name, required this.text, required this.createdAt});
|
||||
|
||||
factory MpvPreset.fromJson(Map<String, dynamic> json) {
|
||||
return MpvPreset(
|
||||
name: json['name'] as String,
|
||||
entries: (json['entries'] as List).map((e) => MpvConfigEntry.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
text: json['text'] as String,
|
||||
createdAt: DateTime.parse(json['createdAt'] as String),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'name': name,
|
||||
'entries': entries.map((e) => e.toJson()).toList(),
|
||||
'text': text,
|
||||
'createdAt': createdAt.toIso8601String(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,6 +12,9 @@ class PlayerAndroid extends PlayerBase {
|
||||
int? _bufferSizeBytes;
|
||||
bool _tunnelingEnabled = true;
|
||||
|
||||
/// Stored subtitle track ID when subtitles are hidden via sub-visibility.
|
||||
String? _hiddenSubtitleTrackId;
|
||||
|
||||
@override
|
||||
MethodChannel get methodChannel => _methodChannel;
|
||||
|
||||
@@ -193,6 +196,29 @@ class PlayerAndroid extends PlayerBase {
|
||||
case 'tunneled-playback':
|
||||
_tunnelingEnabled = value != 'no';
|
||||
break;
|
||||
case 'sub-visibility':
|
||||
if (value == 'no') {
|
||||
// Store current subtitle track and disable
|
||||
final current = state.track.subtitle;
|
||||
if (current != null && current.id != 'no') {
|
||||
_hiddenSubtitleTrackId = current.id;
|
||||
await selectSubtitleTrack(SubtitleTrack.off);
|
||||
}
|
||||
} else {
|
||||
// Restore previously hidden subtitle track
|
||||
final storedId = _hiddenSubtitleTrackId;
|
||||
if (storedId != null) {
|
||||
_hiddenSubtitleTrackId = null;
|
||||
final track = state.tracks.subtitle.cast<SubtitleTrack?>().firstWhere(
|
||||
(t) => t?.id == storedId,
|
||||
orElse: () => null,
|
||||
);
|
||||
if (track != null) {
|
||||
await selectSubtitleTrack(track);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
// Other properties are no-ops for ExoPlayer
|
||||
}
|
||||
}
|
||||
@@ -355,7 +381,7 @@ class PlayerAndroid extends PlayerBase {
|
||||
@override
|
||||
Future<bool> requestAudioFocus() async {
|
||||
checkDisposed();
|
||||
if (!initialized) return false;
|
||||
await _ensureInitialized();
|
||||
|
||||
final result = await methodChannel.invokeMethod<bool>('requestAudioFocus');
|
||||
return result ?? false;
|
||||
|
||||
@@ -309,7 +309,7 @@ class PlayerNative extends PlayerBase {
|
||||
Future<bool> requestAudioFocus() async {
|
||||
checkDisposed();
|
||||
if (!Platform.isAndroid) return true;
|
||||
if (!initialized) return false;
|
||||
await _ensureInitialized();
|
||||
|
||||
final result = await methodChannel.invokeMethod<bool>('requestAudioFocus');
|
||||
return result ?? false;
|
||||
|
||||
@@ -214,7 +214,6 @@ class DownloadProvider extends ChangeNotifier {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
@override
|
||||
@override
|
||||
void dispose() {
|
||||
_progressSubscription?.cancel();
|
||||
@@ -222,6 +221,10 @@ class DownloadProvider extends ChangeNotifier {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
/// Ensure metadata has a serverId, falling back to a parent's serverId.
|
||||
PlexMetadata _ensureServerId(PlexMetadata metadata, String? fallbackServerId) =>
|
||||
metadata.serverId != null ? metadata : metadata.copyWith(serverId: fallbackServerId);
|
||||
|
||||
/// All current download progress entries
|
||||
Map<String, DownloadProgress> get downloads => Map.unmodifiable(_downloads);
|
||||
|
||||
@@ -333,23 +336,18 @@ class DownloadProvider extends ChangeNotifier {
|
||||
.toList();
|
||||
}
|
||||
|
||||
/// Get all episode downloads (any status) for a specific show
|
||||
List<DownloadProgress> _getEpisodeDownloadsForShow(String showRatingKey) {
|
||||
/// Get episode downloads filtered by show and/or season ratingKey.
|
||||
List<DownloadProgress> _getEpisodeDownloads({
|
||||
String? showRatingKey,
|
||||
String? seasonRatingKey,
|
||||
}) {
|
||||
return _downloads.entries
|
||||
.where((entry) {
|
||||
final meta = _metadata[entry.key];
|
||||
return meta?.type == 'episode' && meta?.grandparentRatingKey == showRatingKey;
|
||||
})
|
||||
.map((entry) => entry.value)
|
||||
.toList();
|
||||
}
|
||||
|
||||
/// Get all episode downloads (any status) for a specific season
|
||||
List<DownloadProgress> _getEpisodeDownloadsForSeason(String seasonRatingKey) {
|
||||
return _downloads.entries
|
||||
.where((entry) {
|
||||
final meta = _metadata[entry.key];
|
||||
return meta?.type == 'episode' && meta?.parentRatingKey == seasonRatingKey;
|
||||
if (meta?.type != 'episode') return false;
|
||||
if (showRatingKey != null && meta?.grandparentRatingKey != showRatingKey) return false;
|
||||
if (seasonRatingKey != null && meta?.parentRatingKey != seasonRatingKey) return false;
|
||||
return true;
|
||||
})
|
||||
.map((entry) => entry.value)
|
||||
.toList();
|
||||
@@ -361,7 +359,7 @@ class DownloadProvider extends ChangeNotifier {
|
||||
return _calculateAggregateProgress(
|
||||
serverId: serverId,
|
||||
ratingKey: showRatingKey,
|
||||
episodes: _getEpisodeDownloadsForShow(showRatingKey),
|
||||
episodes: _getEpisodeDownloads(showRatingKey: showRatingKey),
|
||||
entityType: 'show',
|
||||
);
|
||||
}
|
||||
@@ -372,7 +370,7 @@ class DownloadProvider extends ChangeNotifier {
|
||||
return _calculateAggregateProgress(
|
||||
serverId: serverId,
|
||||
ratingKey: seasonRatingKey,
|
||||
episodes: _getEpisodeDownloadsForSeason(seasonRatingKey),
|
||||
episodes: _getEpisodeDownloads(seasonRatingKey: seasonRatingKey),
|
||||
entityType: 'season',
|
||||
);
|
||||
}
|
||||
@@ -511,12 +509,12 @@ class DownloadProvider extends ChangeNotifier {
|
||||
if (meta == null) {
|
||||
// No metadata stored yet, might be a show/season being queued
|
||||
// Check if any episodes exist for this as a parent
|
||||
final episodesAsShow = _getEpisodeDownloadsForShow(ratingKey);
|
||||
final episodesAsShow = _getEpisodeDownloads(showRatingKey: ratingKey);
|
||||
if (episodesAsShow.isNotEmpty) {
|
||||
return getAggregateProgressForShow(serverId, ratingKey);
|
||||
}
|
||||
|
||||
final episodesAsSeason = _getEpisodeDownloadsForSeason(ratingKey);
|
||||
final episodesAsSeason = _getEpisodeDownloads(seasonRatingKey: ratingKey);
|
||||
if (episodesAsSeason.isNotEmpty) {
|
||||
return getAggregateProgressForSeason(serverId, ratingKey);
|
||||
}
|
||||
@@ -691,109 +689,61 @@ class DownloadProvider extends ChangeNotifier {
|
||||
Future<void> _fetchAndStoreParentMetadata(PlexMetadata episode, PlexClient client) async {
|
||||
final serverId = episode.serverId;
|
||||
if (serverId == null) return;
|
||||
|
||||
await _fetchAndStoreRelatedMetadata(serverId: serverId, ratingKey: episode.grandparentRatingKey, client: client);
|
||||
await _fetchAndStoreRelatedMetadata(serverId: serverId, ratingKey: episode.parentRatingKey, client: client);
|
||||
}
|
||||
|
||||
/// Fetch, persist, and download artwork for a related metadata item (show or season).
|
||||
Future<void> _fetchAndStoreRelatedMetadata({
|
||||
required String serverId,
|
||||
required String? ratingKey,
|
||||
required PlexClient client,
|
||||
}) async {
|
||||
if (ratingKey == null) return;
|
||||
final globalKey = buildGlobalKey(serverId, ratingKey);
|
||||
final storageService = DownloadStorageService.instance;
|
||||
|
||||
// Fetch and store show metadata if not already stored
|
||||
final showRatingKey = episode.grandparentRatingKey;
|
||||
if (showRatingKey != null) {
|
||||
final showGlobalKey = buildGlobalKey(serverId, showRatingKey);
|
||||
|
||||
// Try to use existing metadata (set when queueing an entire show)
|
||||
PlexMetadata? showMetadata = _metadata[showGlobalKey];
|
||||
|
||||
// If not already cached, fetch full metadata with images
|
||||
if (showMetadata == null) {
|
||||
try {
|
||||
showMetadata = await client.getMetadataWithImages(showRatingKey);
|
||||
} catch (e) {
|
||||
appLogger.w('Failed to fetch show metadata for $showRatingKey', error: e);
|
||||
}
|
||||
}
|
||||
|
||||
if (showMetadata != null) {
|
||||
final showWithServer = showMetadata.copyWith(serverId: serverId);
|
||||
_metadata[showGlobalKey] = showWithServer;
|
||||
|
||||
// Persist to database/API cache for offline usage
|
||||
await _downloadManager.saveMetadata(showWithServer);
|
||||
|
||||
// Ensure show artwork is downloaded even if metadata already existed
|
||||
final thumbPath = showWithServer.thumb;
|
||||
final hasPoster = thumbPath != null && await storageService.artworkExists(serverId, thumbPath);
|
||||
if (!hasPoster) {
|
||||
await _downloadManager.downloadArtworkForMetadata(showWithServer, client);
|
||||
appLogger.d('Downloaded show artwork for $showGlobalKey');
|
||||
}
|
||||
|
||||
// Store artwork reference in provider's map for offline display
|
||||
_artworkPaths[showGlobalKey] = DownloadedArtwork(thumbPath: thumbPath);
|
||||
PlexMetadata? metadata = _metadata[globalKey];
|
||||
if (metadata == null) {
|
||||
try {
|
||||
metadata = await client.getMetadataWithImages(ratingKey);
|
||||
} catch (e) {
|
||||
appLogger.w('Failed to fetch metadata for $ratingKey', error: e);
|
||||
}
|
||||
}
|
||||
if (metadata == null) return;
|
||||
|
||||
// Fetch and store season metadata if not already stored
|
||||
final seasonRatingKey = episode.parentRatingKey;
|
||||
if (seasonRatingKey != null) {
|
||||
final seasonGlobalKey = buildGlobalKey(serverId, seasonRatingKey);
|
||||
PlexMetadata? seasonMetadata = _metadata[seasonGlobalKey];
|
||||
final withServer = metadata.copyWith(serverId: serverId);
|
||||
_metadata[globalKey] = withServer;
|
||||
await _downloadManager.saveMetadata(withServer);
|
||||
|
||||
if (seasonMetadata == null) {
|
||||
try {
|
||||
seasonMetadata = await client.getMetadataWithImages(seasonRatingKey);
|
||||
} catch (e) {
|
||||
appLogger.w('Failed to fetch season metadata for $seasonRatingKey', error: e);
|
||||
}
|
||||
}
|
||||
final thumbPath = withServer.thumb;
|
||||
final hasPoster = thumbPath != null && await storageService.artworkExists(serverId, thumbPath);
|
||||
if (!hasPoster) {
|
||||
await _downloadManager.downloadArtworkForMetadata(withServer, client);
|
||||
}
|
||||
_artworkPaths[globalKey] = DownloadedArtwork(thumbPath: thumbPath);
|
||||
}
|
||||
|
||||
if (seasonMetadata != null) {
|
||||
final seasonWithServer = seasonMetadata.copyWith(serverId: serverId);
|
||||
_metadata[seasonGlobalKey] = seasonWithServer;
|
||||
|
||||
// Persist to database/API cache for offline usage
|
||||
await _downloadManager.saveMetadata(seasonWithServer);
|
||||
|
||||
// Ensure season artwork is downloaded even if metadata already existed
|
||||
final thumbPath = seasonWithServer.thumb;
|
||||
final hasPoster = thumbPath != null && await storageService.artworkExists(serverId, thumbPath);
|
||||
if (!hasPoster) {
|
||||
await _downloadManager.downloadArtworkForMetadata(seasonWithServer, client);
|
||||
appLogger.d('Downloaded season artwork for $seasonGlobalKey');
|
||||
}
|
||||
|
||||
// Store artwork reference in provider's map for offline display
|
||||
_artworkPaths[seasonGlobalKey] = DownloadedArtwork(thumbPath: thumbPath);
|
||||
}
|
||||
/// Store leafCount for a show or season so aggregate progress works.
|
||||
Future<void> _storeLeafCount(String globalKey, PlexMetadata metadata) async {
|
||||
if (metadata.leafCount != null && metadata.leafCount! > 0) {
|
||||
_totalEpisodeCounts[globalKey] = metadata.leafCount!;
|
||||
await _persistTotalEpisodeCount(globalKey, metadata.leafCount!);
|
||||
}
|
||||
}
|
||||
|
||||
/// Queue all episodes from a TV show for download
|
||||
Future<int> _queueShowDownload(PlexMetadata show, PlexClient client) async {
|
||||
final globalKey = show.globalKey;
|
||||
int count = 0;
|
||||
final seasons = await client.getChildren(show.ratingKey);
|
||||
|
||||
// Store total episode count from show metadata (leafCount)
|
||||
if (show.leafCount != null && show.leafCount! > 0) {
|
||||
_totalEpisodeCounts[globalKey] = show.leafCount!;
|
||||
await _persistTotalEpisodeCount(globalKey, show.leafCount!);
|
||||
appLogger.i(
|
||||
'💾 Stored episode count for show $globalKey: ${show.leafCount}\n'
|
||||
' - Show title: ${show.title}\n'
|
||||
' - Show type: ${show.type}\n'
|
||||
' - Total stored counts: ${_totalEpisodeCounts.length}',
|
||||
);
|
||||
} else {
|
||||
appLogger.w(
|
||||
'⚠️ Show $globalKey has no leafCount! Cannot store episode count.\n'
|
||||
' - Show title: ${show.title}\n'
|
||||
' - Show type: ${show.type}\n'
|
||||
' - leafCount value: ${show.leafCount}',
|
||||
);
|
||||
}
|
||||
await _storeLeafCount(show.globalKey, show);
|
||||
|
||||
for (final season in seasons) {
|
||||
if (season.type == 'season') {
|
||||
// Ensure season has serverId from parent show
|
||||
final seasonWithServer = season.serverId != null ? season : season.copyWith(serverId: show.serverId);
|
||||
final seasonWithServer = _ensureServerId(season, show.serverId);
|
||||
count += await _queueSeasonDownload(seasonWithServer, client);
|
||||
}
|
||||
}
|
||||
@@ -803,33 +753,14 @@ class DownloadProvider extends ChangeNotifier {
|
||||
|
||||
/// Queue all episodes from a season for download
|
||||
Future<int> _queueSeasonDownload(PlexMetadata season, PlexClient client) async {
|
||||
final globalKey = season.globalKey;
|
||||
int count = 0;
|
||||
final episodes = await client.getChildren(season.ratingKey);
|
||||
|
||||
// Store total episode count from season metadata (leafCount)
|
||||
if (season.leafCount != null && season.leafCount! > 0) {
|
||||
_totalEpisodeCounts[globalKey] = season.leafCount!;
|
||||
await _persistTotalEpisodeCount(globalKey, season.leafCount!);
|
||||
appLogger.i(
|
||||
'💾 Stored episode count for season $globalKey: ${season.leafCount}\n'
|
||||
' - Season title: ${season.title}\n'
|
||||
' - Season type: ${season.type}\n'
|
||||
' - Total stored counts: ${_totalEpisodeCounts.length}',
|
||||
);
|
||||
} else {
|
||||
appLogger.w(
|
||||
'⚠️ Season $globalKey has no leafCount! Cannot store episode count.\n'
|
||||
' - Season title: ${season.title}\n'
|
||||
' - Season type: ${season.type}\n'
|
||||
' - leafCount value: ${season.leafCount}',
|
||||
);
|
||||
}
|
||||
await _storeLeafCount(season.globalKey, season);
|
||||
|
||||
for (final episode in episodes) {
|
||||
if (episode.type == 'episode') {
|
||||
// Ensure episode has serverId from parent season
|
||||
final episodeWithServer = episode.serverId != null ? episode : episode.copyWith(serverId: season.serverId);
|
||||
final episodeWithServer = _ensureServerId(episode, season.serverId);
|
||||
await _queueSingleDownload(episodeWithServer, client);
|
||||
count++;
|
||||
}
|
||||
@@ -862,7 +793,7 @@ class DownloadProvider extends ChangeNotifier {
|
||||
|
||||
for (final season in seasons) {
|
||||
if (season.type == 'season') {
|
||||
final seasonWithServer = season.serverId != null ? season : season.copyWith(serverId: show.serverId);
|
||||
final seasonWithServer = _ensureServerId(season, show.serverId);
|
||||
queuedCount += await _queueMissingSeasonEpisodes(seasonWithServer, client);
|
||||
}
|
||||
}
|
||||
@@ -880,7 +811,7 @@ class DownloadProvider extends ChangeNotifier {
|
||||
|
||||
for (final episode in episodes) {
|
||||
if (episode.type == 'episode') {
|
||||
final episodeWithServer = episode.serverId != null ? episode : episode.copyWith(serverId: season.serverId);
|
||||
final episodeWithServer = _ensureServerId(episode, season.serverId);
|
||||
|
||||
final episodeGlobalKey = episodeWithServer.globalKey;
|
||||
|
||||
|
||||
@@ -99,7 +99,11 @@ class OfflineWatchProvider extends ChangeNotifier {
|
||||
final episodes = _downloadProvider.getDownloadedEpisodesForShow(showRatingKey);
|
||||
if (episodes.isEmpty) return episodes;
|
||||
|
||||
// Sort Season 0 (Specials) to the end so regular seasons play first
|
||||
episodes.sort((a, b) {
|
||||
final aIsSpecial = (a.parentIndex ?? 0) == 0;
|
||||
final bIsSpecial = (b.parentIndex ?? 0) == 0;
|
||||
if (aIsSpecial != bIsSpecial) return aIsSpecial ? 1 : -1;
|
||||
final seasonCompare = (a.parentIndex ?? 0).compareTo(b.parentIndex ?? 0);
|
||||
if (seasonCompare != 0) return seasonCompare;
|
||||
return (a.index ?? 0).compareTo(b.index ?? 0);
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:plezy/widgets/app_icon.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../focus/focusable_action_bar.dart';
|
||||
import '../focus/input_mode_tracker.dart';
|
||||
import '../focus/key_event_utils.dart';
|
||||
import '../utils/global_key_utils.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
@@ -1186,6 +1187,7 @@ class _DiscoverScreenState extends State<DiscoverScreen>
|
||||
),
|
||||
),
|
||||
// Page indicators with animated progress and pause/play button
|
||||
if (!InputModeTracker.isKeyboardMode(context))
|
||||
Positioned(
|
||||
bottom: 16,
|
||||
left: -26,
|
||||
|
||||
@@ -53,55 +53,29 @@ class _LibraryRecommendedTabState extends BaseLibraryTabState<PlexHub, LibraryRe
|
||||
@override
|
||||
String get errorContext => t.libraries.tabs.recommended;
|
||||
|
||||
/// Detects Continue Watching hubs by hubIdentifier.
|
||||
/// Section-specific CW hubs use identifiers like "movie.inprogress.1".
|
||||
static bool _isContinueWatchingHub(PlexHub hub) {
|
||||
final hubId = hub.hubIdentifier?.toLowerCase() ?? '';
|
||||
return hubId.contains('inprogress');
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<PlexHub>> loadData() async {
|
||||
// Clear hub keys before loading new hubs to prevent stale references
|
||||
_hubKeys.clear();
|
||||
|
||||
// Use server-specific client for this library
|
||||
final client = getClientForLibrary();
|
||||
final hubs = await client.getLibraryHubs(widget.library.key, limit: 12);
|
||||
|
||||
// Load both continue watching items and regular hubs in parallel
|
||||
final results = await Future.wait([
|
||||
client.getOnDeckForLibrary(widget.library.key),
|
||||
client.getLibraryHubs(widget.library.key, limit: 12),
|
||||
]);
|
||||
|
||||
final continueWatchingItems = results.first as List<PlexMetadata>;
|
||||
final hubs = results[1] as List<PlexHub>;
|
||||
|
||||
// Filter out any existing Continue Watching hubs since we're adding our own
|
||||
final filteredHubs = hubs.where((hub) {
|
||||
final title = hub.title.toLowerCase();
|
||||
final hubId = hub.hubIdentifier?.toLowerCase() ?? '';
|
||||
return !title.contains('continue watching') &&
|
||||
!title.contains('on deck') &&
|
||||
!hubId.contains('ondeck') &&
|
||||
!hubId.contains('continue');
|
||||
}).toList();
|
||||
|
||||
final finalHubs = <PlexHub>[];
|
||||
|
||||
// Add Continue Watching as the first hub if there are items
|
||||
if (continueWatchingItems.isNotEmpty) {
|
||||
final continueWatchingHub = PlexHub(
|
||||
hubKey: 'library_continue_watching_${widget.library.key}',
|
||||
title: t.discover.continueWatching,
|
||||
type: 'mixed',
|
||||
hubIdentifier: '_library_continue_watching_',
|
||||
size: continueWatchingItems.length,
|
||||
more: false,
|
||||
items: continueWatchingItems,
|
||||
serverId: widget.library.serverId,
|
||||
serverName: widget.library.serverName,
|
||||
);
|
||||
finalHubs.add(continueWatchingHub);
|
||||
// Move Continue Watching hub to the front if present
|
||||
final cwIndex = hubs.indexWhere(_isContinueWatchingHub);
|
||||
if (cwIndex > 0) {
|
||||
final cwHub = hubs.removeAt(cwIndex);
|
||||
hubs.insert(0, cwHub);
|
||||
}
|
||||
|
||||
// Add the filtered regular hubs
|
||||
finalHubs.addAll(filteredHubs);
|
||||
|
||||
return finalHubs;
|
||||
return hubs;
|
||||
}
|
||||
|
||||
/// Ensure we have enough GlobalKeys for all hubs
|
||||
@@ -163,7 +137,7 @@ class _LibraryRecommendedTabState extends BaseLibraryTabState<PlexHub, LibraryRe
|
||||
itemCount: items.length,
|
||||
itemBuilder: (context, index) {
|
||||
final hub = items[index];
|
||||
final isContinueWatching = hub.hubIdentifier == '_library_continue_watching_';
|
||||
final isContinueWatching = _isContinueWatchingHub(hub);
|
||||
|
||||
return HubSection(
|
||||
key: index < _hubKeys.length ? _hubKeys[index] : null,
|
||||
|
||||
@@ -8,6 +8,7 @@ import '../../models/livetv_channel.dart';
|
||||
import '../../models/livetv_program.dart';
|
||||
import '../../providers/multi_server_provider.dart';
|
||||
import '../../theme/mono_tokens.dart';
|
||||
import '../../utils/formatters.dart';
|
||||
import '../../utils/live_tv_player_navigation.dart';
|
||||
import '../../utils/plex_image_helper.dart';
|
||||
import '../../widgets/app_icon.dart';
|
||||
@@ -173,7 +174,7 @@ class _ScheduleListTile extends StatelessWidget {
|
||||
|
||||
const _ScheduleListTile({required this.program, required this.channel, required this.onTap});
|
||||
|
||||
String _formatTimeInfo() {
|
||||
String _formatTimeInfo({required bool is24Hour}) {
|
||||
final now = DateTime.now();
|
||||
final start = program.startTime;
|
||||
final end = program.endTime;
|
||||
@@ -187,16 +188,16 @@ class _ScheduleListTile extends StatelessWidget {
|
||||
final minutesUntil = start.difference(now).inMinutes;
|
||||
if (minutesUntil <= 0) {
|
||||
// Just started
|
||||
return _formatAbsoluteTime(start, now);
|
||||
return _formatAbsoluteTime(start, now, is24Hour: is24Hour);
|
||||
} else if (minutesUntil < 90) {
|
||||
return 'Starting in ${minutesUntil}min';
|
||||
} else {
|
||||
return _formatAbsoluteTime(start, now);
|
||||
return _formatAbsoluteTime(start, now, is24Hour: is24Hour);
|
||||
}
|
||||
}
|
||||
|
||||
String _formatAbsoluteTime(DateTime start, DateTime now) {
|
||||
final time = '${start.hour.toString().padLeft(2, '0')}:${start.minute.toString().padLeft(2, '0')}';
|
||||
String _formatAbsoluteTime(DateTime start, DateTime now, {required bool is24Hour}) {
|
||||
final time = formatClockTime(start, is24Hour: is24Hour);
|
||||
final today = DateTime(now.year, now.month, now.day);
|
||||
final startDay = DateTime(start.year, start.month, start.day);
|
||||
final diff = startDay.difference(today).inDays;
|
||||
@@ -217,7 +218,7 @@ class _ScheduleListTile extends StatelessWidget {
|
||||
? 'S${program.parentIndex} · E${program.index} — ${program.title}'
|
||||
: program.title;
|
||||
|
||||
final timeInfo = _formatTimeInfo();
|
||||
final timeInfo = _formatTimeInfo(is24Hour: MediaQuery.alwaysUse24HourFormatOf(context));
|
||||
final subtitle = [
|
||||
timeInfo,
|
||||
if (program.summary != null && program.summary!.isNotEmpty) program.summary!,
|
||||
|
||||
@@ -194,7 +194,7 @@ class _ProgramDetailsSheetContentState extends State<_ProgramDetailsSheetContent
|
||||
[
|
||||
if (channel != null) channel.displayName,
|
||||
if (program.startTime != null && program.endTime != null)
|
||||
'${program.startTime!.hour.toString().padLeft(2, '0')}:${program.startTime!.minute.toString().padLeft(2, '0')} - ${program.endTime!.hour.toString().padLeft(2, '0')}:${program.endTime!.minute.toString().padLeft(2, '0')}',
|
||||
'${formatClockTime(program.startTime!, is24Hour: MediaQuery.alwaysUse24HourFormatOf(context))} - ${formatClockTime(program.endTime!, is24Hour: MediaQuery.alwaysUse24HourFormatOf(context))}',
|
||||
if (program.durationMinutes > 0) formatDurationTextual(program.durationMinutes * 60000),
|
||||
].join(' · '),
|
||||
style: theme.textTheme.bodySmall?.copyWith(color: theme.colorScheme.onSurfaceVariant),
|
||||
|
||||
@@ -845,11 +845,12 @@ class GuideTabState extends State<GuideTab> {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Widget _buildTimeHeader(ThemeData theme) {
|
||||
final is24Hour = MediaQuery.alwaysUse24HourFormatOf(context);
|
||||
final slots = <Widget>[];
|
||||
var current = _gridStart;
|
||||
|
||||
while (current.isBefore(_gridEnd)) {
|
||||
final timeStr = '${current.hour.toString().padLeft(2, '0')}:${current.minute.toString().padLeft(2, '0')}';
|
||||
final timeStr = formatClockTime(current, is24Hour: is24Hour);
|
||||
slots.add(
|
||||
SizedBox(
|
||||
width: _slotWidth,
|
||||
@@ -1064,7 +1065,7 @@ class GuideTabState extends State<GuideTab> {
|
||||
),
|
||||
if (program.startTime != null)
|
||||
Text(
|
||||
'${program.startTime!.hour.toString().padLeft(2, '0')}:${program.startTime!.minute.toString().padLeft(2, '0')} · ${formatDurationTextual(program.durationMinutes * 60000)}',
|
||||
'${formatClockTime(program.startTime!, is24Hour: MediaQuery.alwaysUse24HourFormatOf(context))} · ${formatDurationTextual(program.durationMinutes * 60000)}',
|
||||
style: theme.textTheme.labelSmall?.copyWith(color: subtitleColor),
|
||||
maxLines: 1,
|
||||
),
|
||||
|
||||
@@ -646,10 +646,17 @@ class _MediaDetailScreenState extends State<MediaDetailScreen> with WatchStateAw
|
||||
onPressed: () async {
|
||||
final client = _getClientForMetadata(context);
|
||||
if (client == null) return;
|
||||
final count = await downloadProvider.queueDownload(metadata, client);
|
||||
if (context.mounted) {
|
||||
final message = count > 1 ? t.downloads.episodesQueued(count: count) : t.downloads.downloadQueued;
|
||||
showSuccessSnackBar(context, message);
|
||||
try {
|
||||
final count = await downloadProvider.queueDownload(metadata, client);
|
||||
if (context.mounted) {
|
||||
final message =
|
||||
count > 1 ? t.downloads.episodesQueued(count: count) : t.downloads.downloadQueued;
|
||||
showSuccessSnackBar(context, message);
|
||||
}
|
||||
} on CellularDownloadBlockedException {
|
||||
if (context.mounted) {
|
||||
showErrorSnackBar(context, t.settings.cellularDownloadBlocked);
|
||||
}
|
||||
}
|
||||
},
|
||||
icon: const AppIcon(Symbols.download_rounded, fill: 1),
|
||||
@@ -1677,8 +1684,11 @@ class _MediaDetailScreenState extends State<MediaDetailScreen> with WatchStateAw
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the first season (usually Season 1, but could be Season 0 for specials)
|
||||
final firstSeason = _seasons.first;
|
||||
// Skip Season 0 (Specials) — prefer the first regular season
|
||||
final firstSeason = _seasons.firstWhere(
|
||||
(s) => (s.index ?? 0) > 0,
|
||||
orElse: () => _seasons.first,
|
||||
);
|
||||
|
||||
// Get episodes of the first season
|
||||
List<PlexMetadata> episodes;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:plezy/widgets/app_icon.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import '../../focus/dpad_navigator.dart';
|
||||
import '../../i18n/strings.g.dart';
|
||||
import '../../models/mpv_config_models.dart';
|
||||
import '../../focus/focusable_button.dart';
|
||||
@@ -20,158 +22,41 @@ class _MpvConfigScreenState extends State<MpvConfigScreen> {
|
||||
late SettingsService _settingsService;
|
||||
bool _isLoading = true;
|
||||
|
||||
List<MpvConfigEntry> _entries = [];
|
||||
late TextEditingController _textController;
|
||||
final _savePresetFocusNode = FocusNode();
|
||||
List<MpvPreset> _presets = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_textController = TextEditingController();
|
||||
_loadSettings();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_textController.dispose();
|
||||
_savePresetFocusNode.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
Future<void> _loadSettings() async {
|
||||
_settingsService = await SettingsService.getInstance();
|
||||
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_entries = _settingsService.getMpvConfigEntries();
|
||||
_textController.text = _settingsService.getMpvConfigText();
|
||||
_presets = _settingsService.getMpvPresets();
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _saveEntries() async {
|
||||
await _settingsService.setMpvConfigEntries(_entries);
|
||||
}
|
||||
|
||||
void _toggleEntry(int index) {
|
||||
setState(() {
|
||||
_entries[index] = _entries[index].copyWith(isEnabled: !_entries[index].isEnabled);
|
||||
});
|
||||
_saveEntries();
|
||||
}
|
||||
|
||||
void _deleteEntry(int index) {
|
||||
setState(() {
|
||||
_entries.removeAt(index);
|
||||
});
|
||||
_saveEntries();
|
||||
}
|
||||
|
||||
void _addEntry(MpvConfigEntry entry) {
|
||||
setState(() {
|
||||
_entries.add(entry);
|
||||
});
|
||||
_saveEntries();
|
||||
}
|
||||
|
||||
void _updateEntry(int index, MpvConfigEntry entry) {
|
||||
setState(() {
|
||||
_entries[index] = entry;
|
||||
});
|
||||
_saveEntries();
|
||||
}
|
||||
|
||||
Future<void> _showEntryDialog({int? editIndex}) async {
|
||||
final isEdit = editIndex != null;
|
||||
final existingEntry = isEdit ? _entries[editIndex] : null;
|
||||
|
||||
final keyController = TextEditingController(text: existingEntry?.key ?? '');
|
||||
final valueController = TextEditingController(text: existingEntry?.value ?? '');
|
||||
final keyFocusNode = FocusNode();
|
||||
final valueFocusNode = FocusNode();
|
||||
final saveFocusNode = FocusNode();
|
||||
|
||||
final result = await showDialog<bool>(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(isEdit ? t.mpvConfig.editProperty : t.mpvConfig.addProperty),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
TextField(
|
||||
controller: keyController,
|
||||
focusNode: keyFocusNode,
|
||||
decoration: InputDecoration(labelText: t.mpvConfig.propertyKey, hintText: t.mpvConfig.propertyKeyHint),
|
||||
autofocus: true,
|
||||
textInputAction: TextInputAction.next,
|
||||
onSubmitted: (_) => valueFocusNode.requestFocus(),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
TextField(
|
||||
controller: valueController,
|
||||
focusNode: valueFocusNode,
|
||||
decoration: InputDecoration(
|
||||
labelText: t.mpvConfig.propertyValue,
|
||||
hintText: t.mpvConfig.propertyValueHint,
|
||||
),
|
||||
textInputAction: TextInputAction.done,
|
||||
onSubmitted: (_) => saveFocusNode.requestFocus(),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
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: TextButton(
|
||||
onPressed: () {
|
||||
if (keyController.text.isNotEmpty && valueController.text.isNotEmpty) {
|
||||
Navigator.pop(context, true);
|
||||
}
|
||||
},
|
||||
child: Text(t.common.save),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
if (result == true) {
|
||||
final entry = MpvConfigEntry(
|
||||
key: keyController.text.trim(),
|
||||
value: valueController.text.trim(),
|
||||
isEnabled: existingEntry?.isEnabled ?? true,
|
||||
);
|
||||
|
||||
if (isEdit) {
|
||||
_updateEntry(editIndex, entry);
|
||||
} else {
|
||||
_addEntry(entry);
|
||||
}
|
||||
}
|
||||
|
||||
keyController.dispose();
|
||||
valueController.dispose();
|
||||
keyFocusNode.dispose();
|
||||
valueFocusNode.dispose();
|
||||
saveFocusNode.dispose();
|
||||
}
|
||||
|
||||
Future<bool> _showConfirmDeleteDialog({required String title, required String content}) {
|
||||
return showDeleteConfirmation(context, title: title, message: content);
|
||||
}
|
||||
|
||||
Future<void> _showDeleteEntryDialog(int index) async {
|
||||
final confirmed = await _showConfirmDeleteDialog(
|
||||
title: t.mpvConfig.deleteProperty,
|
||||
content: t.mpvConfig.confirmDeleteProperty,
|
||||
);
|
||||
if (confirmed) {
|
||||
_deleteEntry(index);
|
||||
}
|
||||
Future<void> _saveText() async {
|
||||
await _settingsService.setMpvConfigText(_textController.text);
|
||||
}
|
||||
|
||||
Future<void> _showSavePresetDialog() async {
|
||||
if (_entries.isEmpty) return;
|
||||
if (_textController.text.trim().isEmpty) return;
|
||||
|
||||
final nameController = TextEditingController();
|
||||
final saveFocusNode = FocusNode();
|
||||
@@ -215,7 +100,7 @@ class _MpvConfigScreenState extends State<MpvConfigScreen> {
|
||||
saveFocusNode.dispose();
|
||||
|
||||
if (result == true) {
|
||||
await _settingsService.saveMpvPreset(nameController.text.trim(), _entries);
|
||||
await _settingsService.saveMpvPreset(nameController.text.trim(), _textController.text);
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_presets = _settingsService.getMpvPresets();
|
||||
@@ -233,7 +118,7 @@ class _MpvConfigScreenState extends State<MpvConfigScreen> {
|
||||
await _settingsService.loadMpvPreset(preset.name);
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_entries = _settingsService.getMpvConfigEntries();
|
||||
_textController.text = _settingsService.getMpvConfigText();
|
||||
});
|
||||
|
||||
if (mounted) {
|
||||
@@ -242,9 +127,10 @@ class _MpvConfigScreenState extends State<MpvConfigScreen> {
|
||||
}
|
||||
|
||||
Future<void> _deletePreset(MpvPreset preset) async {
|
||||
final confirmed = await _showConfirmDeleteDialog(
|
||||
final confirmed = await showDeleteConfirmation(
|
||||
context,
|
||||
title: t.mpvConfig.deletePreset,
|
||||
content: t.mpvConfig.confirmDeletePreset,
|
||||
message: t.mpvConfig.confirmDeletePreset,
|
||||
);
|
||||
|
||||
if (confirmed) {
|
||||
@@ -271,9 +157,9 @@ class _MpvConfigScreenState extends State<MpvConfigScreen> {
|
||||
padding: const EdgeInsets.all(16),
|
||||
sliver: SliverList(
|
||||
delegate: SliverChildListDelegate([
|
||||
_buildPresetsCard(),
|
||||
_buildConfigEditor(),
|
||||
const SizedBox(height: 16),
|
||||
_buildEntriesCard(),
|
||||
_buildPresetsCard(),
|
||||
const SizedBox(height: 24),
|
||||
]),
|
||||
),
|
||||
@@ -282,6 +168,58 @@ class _MpvConfigScreenState extends State<MpvConfigScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildConfigEditor() {
|
||||
return Focus(
|
||||
canRequestFocus: false,
|
||||
onKeyEvent: (_, event) {
|
||||
// Back/Escape: move focus to the save preset button instead of exiting.
|
||||
// Suppress the KeyUp so it doesn't reach handleBackKeyNavigation
|
||||
// on the new focus chain after focus moves away from the text field.
|
||||
if (event.logicalKey.isBackKey) {
|
||||
if (event is KeyDownEvent) {
|
||||
BackKeyUpSuppressor.suppressBackUntilKeyUp();
|
||||
_savePresetFocusNode.requestFocus();
|
||||
}
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
// We must consume Enter to prevent parent handlers from unfocusing,
|
||||
// but that also blocks Flutter's text editing shortcuts (which are
|
||||
// higher in the focus tree). So we manually insert newlines here.
|
||||
if (event.logicalKey == LogicalKeyboardKey.enter ||
|
||||
event.logicalKey == LogicalKeyboardKey.numpadEnter) {
|
||||
if (event is KeyDownEvent || event is KeyRepeatEvent) {
|
||||
final sel = _textController.selection;
|
||||
if (sel.isValid) {
|
||||
final text = _textController.text;
|
||||
_textController.value = TextEditingValue(
|
||||
text: text.replaceRange(sel.start, sel.end, '\n'),
|
||||
selection: TextSelection.collapsed(offset: sel.start + 1),
|
||||
);
|
||||
_saveText();
|
||||
}
|
||||
}
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
if (event.logicalKey.isSelectKey) {
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
return KeyEventResult.ignored;
|
||||
},
|
||||
child: TextField(
|
||||
controller: _textController,
|
||||
maxLines: null,
|
||||
minLines: 12,
|
||||
decoration: InputDecoration(
|
||||
hintText: t.mpvConfig.configPlaceholder,
|
||||
border: const OutlineInputBorder(),
|
||||
contentPadding: const EdgeInsets.all(12),
|
||||
),
|
||||
style: const TextStyle(fontFamily: 'monospace', fontSize: 13),
|
||||
onChanged: (_) => _saveText(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildPresetsCard() {
|
||||
return Card(
|
||||
child: Column(
|
||||
@@ -295,10 +233,11 @@ class _MpvConfigScreenState extends State<MpvConfigScreen> {
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
focusNode: _savePresetFocusNode,
|
||||
leading: const AppIcon(Symbols.save_rounded, fill: 1),
|
||||
title: Text(t.mpvConfig.saveAsPreset),
|
||||
enabled: _entries.isNotEmpty,
|
||||
onTap: _entries.isNotEmpty ? _showSavePresetDialog : null,
|
||||
enabled: _textController.text.trim().isNotEmpty,
|
||||
onTap: _textController.text.trim().isNotEmpty ? _showSavePresetDialog : null,
|
||||
),
|
||||
if (_presets.isNotEmpty) ...[
|
||||
const Divider(),
|
||||
@@ -306,7 +245,6 @@ class _MpvConfigScreenState extends State<MpvConfigScreen> {
|
||||
(preset) => ListTile(
|
||||
leading: const AppIcon(Symbols.folder_rounded, fill: 1),
|
||||
title: Text(preset.name),
|
||||
subtitle: Text(t.mpvConfig.entriesCount(count: preset.entries.length)),
|
||||
trailing: PopupMenuButton<String>(
|
||||
onSelected: (value) {
|
||||
if (value == 'load') {
|
||||
@@ -337,71 +275,4 @@ class _MpvConfigScreenState extends State<MpvConfigScreen> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildEntriesCard() {
|
||||
return Card(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
t.mpvConfig.properties,
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
icon: const AppIcon(Symbols.add_rounded, fill: 1),
|
||||
onPressed: () => _showEntryDialog(),
|
||||
tooltip: t.mpvConfig.addProperty,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (_entries.isNotEmpty) ...[
|
||||
const Divider(height: 1),
|
||||
...List.generate(_entries.length, (index) {
|
||||
final entry = _entries[index];
|
||||
return ListTile(
|
||||
leading: Switch(value: entry.isEnabled, onChanged: (_) => _toggleEntry(index)),
|
||||
title: Text(
|
||||
entry.key,
|
||||
style: TextStyle(color: entry.isEnabled ? null : Theme.of(context).colorScheme.onSurfaceVariant),
|
||||
),
|
||||
subtitle: Text(
|
||||
entry.value,
|
||||
style: TextStyle(color: entry.isEnabled ? null : Theme.of(context).colorScheme.onSurfaceVariant),
|
||||
),
|
||||
trailing: PopupMenuButton<String>(
|
||||
onSelected: (value) {
|
||||
if (value == 'edit') {
|
||||
_showEntryDialog(editIndex: index);
|
||||
} else if (value == 'delete') {
|
||||
_showDeleteEntryDialog(index);
|
||||
}
|
||||
},
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(value: 'edit', child: Text(t.mpvConfig.editProperty)),
|
||||
PopupMenuItem(value: 'delete', child: Text(t.mpvConfig.deleteProperty)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}),
|
||||
] else
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16),
|
||||
child: Text(
|
||||
t.mpvConfig.noProperties,
|
||||
style: Theme.of(
|
||||
context,
|
||||
).textTheme.bodyMedium?.copyWith(color: Theme.of(context).colorScheme.onSurfaceVariant),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:plezy/widgets/app_icon.dart';
|
||||
@@ -97,6 +98,7 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
|
||||
static const _kDownloadOnWifiOnly = 'download_on_wifi_only';
|
||||
static const _kVideoPlayerControls = 'video_player_controls';
|
||||
static const _kVideoPlayerNavigation = 'video_player_navigation';
|
||||
static const _kCrashReporting = 'crash_reporting';
|
||||
static const _kDebugLogging = 'debug_logging';
|
||||
static const _kViewLogs = 'view_logs';
|
||||
static const _kClearCache = 'clear_cache';
|
||||
@@ -107,6 +109,7 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
|
||||
late final bool _keyboardShortcutsSupported = KeyboardShortcutsService.isPlatformSupported();
|
||||
bool _isLoading = true;
|
||||
|
||||
bool _crashReporting = true;
|
||||
bool _enableDebugLogging = false;
|
||||
bool _enableHardwareDecoding = true;
|
||||
int _bufferSize = 0;
|
||||
@@ -183,6 +186,7 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
|
||||
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_crashReporting = _settingsService.getCrashReporting();
|
||||
_enableDebugLogging = _settingsService.getEnableDebugLogging();
|
||||
_enableHardwareDecoding = _settingsService.getEnableHardwareDecoding();
|
||||
_bufferSize = _settingsService.getBufferSize();
|
||||
@@ -490,7 +494,7 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
|
||||
await _settingsService.setEnableHardwareDecoding(value);
|
||||
},
|
||||
),
|
||||
if (Platform.isAndroid)
|
||||
if (Platform.isAndroid || Platform.isIOS || Platform.isMacOS)
|
||||
SwitchListTile(
|
||||
focusNode: _focusTracker.get(_kAutoPip),
|
||||
secondary: const AppIcon(Symbols.picture_in_picture_alt_rounded, fill: 1),
|
||||
@@ -935,6 +939,19 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
SwitchListTile(
|
||||
focusNode: _focusTracker.get(_kCrashReporting),
|
||||
secondary: const AppIcon(Symbols.monitoring_rounded, fill: 1),
|
||||
title: Text(t.settings.crashReporting),
|
||||
subtitle: Text(t.settings.crashReportingDescription),
|
||||
value: _crashReporting,
|
||||
onChanged: (value) async {
|
||||
setState(() {
|
||||
_crashReporting = value;
|
||||
});
|
||||
await _settingsService.setCrashReporting(value);
|
||||
},
|
||||
),
|
||||
SwitchListTile(
|
||||
focusNode: _focusTracker.get(_kDebugLogging),
|
||||
secondary: const AppIcon(Symbols.bug_report_rounded, fill: 1),
|
||||
@@ -974,6 +991,28 @@ class _SettingsScreenState extends State<SettingsScreen> with FocusableTab {
|
||||
trailing: const AppIcon(Symbols.chevron_right_rounded, fill: 1),
|
||||
onTap: () => _showResetSettingsDialog(),
|
||||
),
|
||||
if (kDebugMode)
|
||||
ListTile(
|
||||
leading: const AppIcon(Symbols.error_rounded, fill: 1),
|
||||
title: const Text('Test Sentry'),
|
||||
subtitle: const Text('Send a test error'),
|
||||
trailing: const AppIcon(Symbols.chevron_right_rounded, fill: 1),
|
||||
onTap: () {
|
||||
throw Exception("Example exception");
|
||||
},
|
||||
),
|
||||
if (kDebugMode)
|
||||
ListTile(
|
||||
leading: const AppIcon(Symbols.timer_rounded, fill: 1),
|
||||
title: const Text('Test ANR'),
|
||||
subtitle: const Text('Block the main thread for 10 seconds'),
|
||||
trailing: const AppIcon(Symbols.chevron_right_rounded, fill: 1),
|
||||
onTap: () {
|
||||
showSnackBar(context, 'Blocking main thread...');
|
||||
final end = DateTime.now().add(const Duration(seconds: 10));
|
||||
while (DateTime.now().isBefore(end)) {}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:plezy/widgets/app_icon.dart';
|
||||
@@ -7,6 +8,7 @@ import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:os_media_controls/os_media_controls.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
import 'package:wakelock_plus/wakelock_plus.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
|
||||
@@ -182,6 +184,13 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
bool _wasPlayingBeforeInactive = false;
|
||||
bool _autoPipEnabled = false;
|
||||
|
||||
/// Whether to skip lifecycle actions because PiP is active or about to start.
|
||||
/// iOS auto-PiP is system-initiated during the background transition, so
|
||||
/// isPipActive may not be true yet — we also check the auto-PiP setting.
|
||||
bool get _shouldSkipForPip =>
|
||||
PipService().isPipActive.value ||
|
||||
((Platform.isIOS || Platform.isMacOS) && _autoPipEnabled);
|
||||
|
||||
// Services
|
||||
MediaControlsManager? _mediaControlsManager;
|
||||
PlaybackProgressTracker? _progressTracker;
|
||||
@@ -316,9 +325,8 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
case AppLifecycleState.hidden:
|
||||
// App is being hidden (user is switching away)
|
||||
// Pause video since we don't support background playback (mobile only)
|
||||
// Skip if entering PiP mode - video should keep playing
|
||||
if (PlatformDetector.isMobile(context)) {
|
||||
if (Platform.isAndroid && PipService().isPipActive.value) break;
|
||||
if (_shouldSkipForPip) break;
|
||||
if (player != null && _isPlayerInitialized) {
|
||||
_wasPlayingBeforeInactive = player!.state.playing;
|
||||
if (_wasPlayingBeforeInactive) {
|
||||
@@ -329,8 +337,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
}
|
||||
break;
|
||||
case AppLifecycleState.paused:
|
||||
// Skip if in PiP mode - video should keep playing
|
||||
if (Platform.isAndroid && PipService().isPipActive.value) break;
|
||||
if (_shouldSkipForPip) break;
|
||||
// Clear media controls when app truly goes to background
|
||||
// (we don't support background playback)
|
||||
OsMediaControls.clear();
|
||||
@@ -399,9 +406,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
// Load buffer size from settings
|
||||
final settingsService = await SettingsService.getInstance();
|
||||
_videoPlayerNavigationEnabled = settingsService.getVideoPlayerNavigationEnabled();
|
||||
if (Platform.isAndroid) {
|
||||
_autoPipEnabled = settingsService.getAutoPip();
|
||||
}
|
||||
_autoPipEnabled = settingsService.getAutoPip();
|
||||
final bufferSizeMB = settingsService.getBufferSize();
|
||||
final enableHardwareDecoding = settingsService.getEnableHardwareDecoding();
|
||||
final debugLoggingEnabled = settingsService.getEnableDebugLogging();
|
||||
@@ -418,6 +423,29 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
if (bufferSizeMB > 0) {
|
||||
final bufferSizeBytes = bufferSizeMB * 1024 * 1024;
|
||||
await player!.setProperty('demuxer-max-bytes', bufferSizeBytes.toString());
|
||||
// Set back-buffer to 1/4 of forward buffer
|
||||
final backBytes = bufferSizeBytes ~/ 4;
|
||||
await player!.setProperty('demuxer-max-back-bytes', backBytes.toString());
|
||||
}
|
||||
if (Platform.isAndroid) {
|
||||
// Cap demuxer buffers based on device heap to prevent OOM crashes.
|
||||
// Without limits, mpv defaults can consume 225MB+ just for demuxer
|
||||
// buffering, which combined with decoded frames and GPU textures
|
||||
// exhausts the process address space on memory-constrained devices.
|
||||
final heapMB = await PlayerAndroid.getHeapSize();
|
||||
if (heapMB > 0) {
|
||||
final autoBackMB = heapMB <= 256 ? 16 : (heapMB <= 512 ? 32 : 48);
|
||||
if (bufferSizeMB == 0) {
|
||||
// Auto mode: cap both forward and back buffer based on heap
|
||||
final autoForwardMB = heapMB <= 256 ? 32 : (heapMB <= 512 ? 64 : 100);
|
||||
await player!.setProperty('demuxer-max-bytes', '${autoForwardMB * 1024 * 1024}');
|
||||
await player!.setProperty('demuxer-max-back-bytes', '${autoBackMB * 1024 * 1024}');
|
||||
} else {
|
||||
// Manual mode: cap back-buffer relative to heap if 1/4 ratio is too high
|
||||
final maxBackBytes = min(bufferSizeMB * 1024 * 1024 ~/ 4, autoBackMB * 1024 * 1024);
|
||||
await player!.setProperty('demuxer-max-back-bytes', maxBackBytes.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
await player!.setProperty('msg-level', debugLoggingEnabled ? 'all=debug' : 'all=error');
|
||||
await player!.setLogLevel(debugLoggingEnabled ? 'v' : 'warn');
|
||||
@@ -557,6 +585,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
_playbackRestartSubscription = player!.streams.playbackRestart.listen((_) async {
|
||||
if (!_hasFirstFrame.value) {
|
||||
_hasFirstFrame.value = true;
|
||||
Sentry.addBreadcrumb(Breadcrumb(message: 'First frame ready', category: 'player'));
|
||||
|
||||
// Apply frame rate matching on Android if enabled
|
||||
if (Platform.isAndroid && settingsService.getMatchContentFrameRate()) {
|
||||
@@ -624,6 +653,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
// Set MPV video-sync mode for smoother playback when display is synced
|
||||
await player!.setProperty('video-sync', 'display-tempo');
|
||||
|
||||
Sentry.addBreadcrumb(Breadcrumb(message: 'Frame rate matching: ${fps}fps', category: 'player'));
|
||||
appLogger.d('Frame rate matching: Set display to ${fps}fps (duration: ${durationMs}ms)');
|
||||
} catch (e) {
|
||||
appLogger.w('Failed to apply frame rate matching', error: e);
|
||||
@@ -637,6 +667,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
try {
|
||||
await player!.clearVideoFrameRate();
|
||||
await player!.setProperty('video-sync', 'audio');
|
||||
Sentry.addBreadcrumb(Breadcrumb(message: 'Frame rate matching cleared', category: 'player'));
|
||||
appLogger.d('Frame rate matching: Cleared, restored default display mode');
|
||||
} catch (e) {
|
||||
appLogger.d('Failed to clear frame rate matching', error: e);
|
||||
@@ -882,9 +913,12 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
|
||||
if (episodes.isEmpty) return;
|
||||
|
||||
// Sort by season then episode number
|
||||
// Sort by season then episode number, with Season 0 (Specials) at the end
|
||||
final sorted = List<PlexMetadata>.from(episodes)
|
||||
..sort((a, b) {
|
||||
final aIsSpecial = (a.parentIndex ?? 0) == 0;
|
||||
final bIsSpecial = (b.parentIndex ?? 0) == 0;
|
||||
if (aIsSpecial != bIsSpecial) return aIsSpecial ? 1 : -1;
|
||||
final seasonCmp = (a.parentIndex ?? 0).compareTo(b.parentIndex ?? 0);
|
||||
if (seasonCmp != 0) return seasonCmp;
|
||||
return (a.index ?? 0).compareTo(b.index ?? 0);
|
||||
@@ -1068,10 +1102,13 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
|
||||
// Initialize video PIP and filter manager with player and available versions
|
||||
if (player != null) {
|
||||
final settings = await SettingsService.getInstance();
|
||||
_videoFilterManager = VideoFilterManager(
|
||||
player: player!,
|
||||
availableVersions: _availableVersions,
|
||||
selectedMediaIndex: widget.selectedMediaIndex,
|
||||
initialBoxFitMode: settings.getDefaultBoxFitMode(),
|
||||
onBoxFitModeChanged: (mode) => settings.setDefaultBoxFitMode(mode),
|
||||
);
|
||||
// Update video filter once dimensions are available
|
||||
_videoFilterManager!.updateVideoFilter();
|
||||
@@ -1084,7 +1121,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
_videoPIPManager!.isPipActive.addListener(_onPipStateChanged);
|
||||
|
||||
// Auto-PiP: set up callback for API 26-30 path and initial state
|
||||
if (Platform.isAndroid && _autoPipEnabled) {
|
||||
if (_autoPipEnabled) {
|
||||
PipService.onAutoPipEntering = () {
|
||||
_videoFilterManager?.enterPipMode();
|
||||
};
|
||||
@@ -1231,15 +1268,18 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
}
|
||||
}
|
||||
|
||||
/// Apply the saved shader preset on playback start
|
||||
/// Apply the saved shader preset on playback start.
|
||||
/// Reads directly from SettingsService (synchronous SharedPreferences) to
|
||||
/// avoid a race with ShaderProvider's async initialization.
|
||||
Future<void> _applySavedShaderPreset() async {
|
||||
if (_shaderService == null || !_shaderService!.isSupported) return;
|
||||
|
||||
try {
|
||||
final shaderProvider = context.read<ShaderProvider>();
|
||||
final preset = shaderProvider.savedPreset;
|
||||
final settings = await SettingsService.getInstance();
|
||||
final presetId = settings.getGlobalShaderPreset();
|
||||
final preset = ShaderPreset.fromId(presetId) ?? ShaderPreset.none;
|
||||
await _shaderService!.applyPreset(preset);
|
||||
shaderProvider.setCurrentPreset(preset);
|
||||
context.read<ShaderProvider>().setCurrentPreset(preset);
|
||||
} catch (e) {
|
||||
appLogger.d('Could not apply shader preset', error: e);
|
||||
}
|
||||
@@ -1740,6 +1780,7 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
}
|
||||
}
|
||||
|
||||
Sentry.addBreadcrumb(Breadcrumb(message: 'Player dispose', category: 'player'));
|
||||
player?.dispose();
|
||||
if (_activeRatingKey == widget.metadata.ratingKey) {
|
||||
_activeRatingKey = null;
|
||||
@@ -1790,8 +1831,8 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
DiscordRPCService.instance.pausePlayback();
|
||||
}
|
||||
|
||||
// Update auto-PiP readiness on Android
|
||||
if (Platform.isAndroid && _autoPipEnabled) {
|
||||
// Update auto-PiP readiness
|
||||
if (_autoPipEnabled) {
|
||||
_videoPIPManager?.updateAutoPipState(isPlaying: isPlaying);
|
||||
}
|
||||
}
|
||||
@@ -2533,6 +2574,36 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
|
||||
},
|
||||
child: Stack(
|
||||
children: [
|
||||
// macOS PiP placeholder — video is in PiP window, show background with icon
|
||||
// Placed before Video so controls render on top
|
||||
if (Platform.isMacOS)
|
||||
ValueListenableBuilder<bool>(
|
||||
valueListenable: PipService().isPipActive,
|
||||
builder: (context, isInPip, child) {
|
||||
if (!isInPip) return const SizedBox.shrink();
|
||||
return Positioned.fill(
|
||||
child: Container(
|
||||
color: Colors.black,
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Symbols.picture_in_picture_alt_rounded, size: 48, color: Colors.white.withValues(alpha: 0.5)),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
t.videoControls.pipActive,
|
||||
style: TextStyle(
|
||||
color: Colors.white.withValues(alpha: 0.5),
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
// Video player
|
||||
Center(
|
||||
child: LayoutBuilder(
|
||||
|
||||
@@ -234,10 +234,18 @@ class DownloadManagerService {
|
||||
// background_downloader state
|
||||
bool _fileDownloaderInitialized = false;
|
||||
static const _downloadGroup = 'video_downloads';
|
||||
static const _maxAppRetries = 3;
|
||||
static const _nativeRetries = 5;
|
||||
static const _autoRetryDelay = Duration(seconds: 30);
|
||||
static const _progressDebounceDelay = Duration(seconds: 2);
|
||||
static const _videoExtensions = {'.mp4', '.ogv', '.mkv', '.m4v', '.avi'};
|
||||
|
||||
// Keys currently being paused — prevents holding queue from promoting them
|
||||
final Set<String> _pausingKeys = {};
|
||||
|
||||
// Keys whose completion callback is in-flight — prevents orphan scan from re-queuing them
|
||||
final Set<String> _completingKeys = {};
|
||||
|
||||
// Prevents concurrent _processQueue calls
|
||||
bool _isProcessingQueue = false;
|
||||
bool _disposed = false;
|
||||
@@ -246,6 +254,10 @@ class DownloadManagerService {
|
||||
// UI progress streams are still real-time; only the DB write is debounced.
|
||||
final Map<String, Timer> _progressDebounceTimers = {};
|
||||
|
||||
// App-level auto-retry timers for downloads that exhausted native retries.
|
||||
// Keyed by globalKey; each timer fires a fresh re-enqueue after a delay.
|
||||
final Map<String, Timer> _autoRetryTimers = {};
|
||||
|
||||
/// Public method to check if downloads should be blocked due to cellular-only setting
|
||||
/// Can be used by DownloadProvider to show user-friendly error
|
||||
static Future<bool> shouldBlockDownloadOnCellular() async {
|
||||
@@ -292,6 +304,8 @@ class DownloadManagerService {
|
||||
|
||||
// Track tasks for persistence across app restarts
|
||||
await FileDownloader().trackTasks();
|
||||
// Deliver status updates from iOS background-to-foreground transitions
|
||||
await FileDownloader().resumeFromBackground();
|
||||
|
||||
_fileDownloaderInitialized = true;
|
||||
}
|
||||
@@ -352,6 +366,12 @@ class DownloadManagerService {
|
||||
final allDownloads = await _database.select(_database.downloadedMedia).get();
|
||||
for (final item in allDownloads) {
|
||||
if (item.status == DownloadStatus.downloading.index) {
|
||||
// Skip items whose completion callback is already in-flight (race with trackTasks)
|
||||
if (_completingKeys.contains(item.globalKey)) {
|
||||
appLogger.d('Skipping orphan check for ${item.globalKey}: completion in progress');
|
||||
continue;
|
||||
}
|
||||
|
||||
// Video already downloaded but post-processing didn't complete
|
||||
if (item.videoFilePath != null) {
|
||||
appLogger.i('Download ${item.globalKey} has video but incomplete post-processing, completing');
|
||||
@@ -420,12 +440,7 @@ class DownloadManagerService {
|
||||
if (metadata.type == 'episode' && metadata.grandparentRatingKey != null) {
|
||||
final parsed = parseGlobalKey(globalKey);
|
||||
if (parsed != null) {
|
||||
final showCached = await _apiCache.get(
|
||||
parsed.serverId,
|
||||
'/library/metadata/${metadata.grandparentRatingKey}',
|
||||
);
|
||||
final showJson = PlexCacheParser.extractFirstMetadata(showCached);
|
||||
if (showJson != null) showYear = PlexMetadata.fromJson(showJson).year;
|
||||
showYear = await _fetchShowYear(parsed.serverId, metadata.grandparentRatingKey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -537,6 +552,14 @@ class DownloadManagerService {
|
||||
/// Resolve metadata, video URL, and file path, then enqueue a background download task.
|
||||
Future<void> _prepareAndEnqueueDownload(String globalKey, PlexClient client, DownloadQueueItem queueItem) async {
|
||||
try {
|
||||
// Guard: don't re-enqueue an item that's already completed or was deleted
|
||||
final existing = await _database.getDownloadedMedia(globalKey);
|
||||
if (existing == null || existing.status == DownloadStatus.completed.index) {
|
||||
appLogger.d('Skipping enqueue for $globalKey: already completed or deleted');
|
||||
await _database.removeFromQueue(globalKey);
|
||||
return;
|
||||
}
|
||||
|
||||
appLogger.i('Preparing download for $globalKey');
|
||||
await _transitionStatus(globalKey, DownloadStatus.downloading);
|
||||
|
||||
@@ -574,12 +597,9 @@ class DownloadManagerService {
|
||||
final ext = _getExtensionFromUrl(playbackData.videoUrl!) ?? 'mp4';
|
||||
|
||||
// Look up show year for episodes
|
||||
int? showYear;
|
||||
if (metadata.type == 'episode' && metadata.grandparentRatingKey != null) {
|
||||
final showCached = await _apiCache.get(serverId, '/library/metadata/${metadata.grandparentRatingKey}');
|
||||
final showJson = PlexCacheParser.extractFirstMetadata(showCached);
|
||||
if (showJson != null) showYear = PlexMetadata.fromJson(showJson).year;
|
||||
}
|
||||
final showYear = metadata.type == 'episode'
|
||||
? await _fetchShowYear(serverId, metadata.grandparentRatingKey)
|
||||
: null;
|
||||
|
||||
// Build display name for notifications
|
||||
final displayName = metadata.type == 'episode'
|
||||
@@ -618,7 +638,7 @@ class DownloadManagerService {
|
||||
group: _downloadGroup,
|
||||
updates: Updates.statusAndProgress,
|
||||
requiresWiFi: requiresWiFi,
|
||||
retries: 3,
|
||||
retries: _nativeRetries,
|
||||
metaData: globalKey,
|
||||
displayName: displayName,
|
||||
);
|
||||
@@ -659,7 +679,7 @@ class DownloadManagerService {
|
||||
group: _downloadGroup,
|
||||
updates: Updates.statusAndProgress,
|
||||
requiresWiFi: requiresWiFi,
|
||||
retries: 3,
|
||||
retries: _nativeRetries,
|
||||
allowPause: true,
|
||||
metaData: globalKey,
|
||||
displayName: displayName,
|
||||
@@ -683,7 +703,6 @@ class DownloadManagerService {
|
||||
} catch (e) {
|
||||
appLogger.e('Failed to prepare download for $globalKey', error: e);
|
||||
await _transitionStatus(globalKey, DownloadStatus.failed, errorMessage: e.toString());
|
||||
await _database.updateDownloadError(globalKey, e.toString());
|
||||
await _database.removeFromQueue(globalKey);
|
||||
_pendingDownloadContext.remove(globalKey);
|
||||
}
|
||||
@@ -722,7 +741,7 @@ class DownloadManagerService {
|
||||
// a 2-second settle period. The stream above provides real-time UI updates;
|
||||
// the DB write is only for crash-recovery state.
|
||||
_progressDebounceTimers[globalKey]?.cancel();
|
||||
_progressDebounceTimers[globalKey] = Timer(const Duration(seconds: 2), () {
|
||||
_progressDebounceTimers[globalKey] = Timer(_progressDebounceDelay, () {
|
||||
_progressDebounceTimers.remove(globalKey);
|
||||
_database.updateDownloadProgress(globalKey, progress, downloadedBytes, totalBytes).catchError((e) {
|
||||
appLogger.w('Failed to update download progress in DB', error: e);
|
||||
@@ -745,22 +764,10 @@ class DownloadManagerService {
|
||||
case TaskStatus.failed:
|
||||
_onDownloadFailed(globalKey, update.exception?.description ?? 'Download failed');
|
||||
case TaskStatus.notFound:
|
||||
_onDownloadFailed(globalKey, 'File not found (404)');
|
||||
_onDownloadPermanentlyFailed(globalKey, 'File not found (404)');
|
||||
case TaskStatus.canceled:
|
||||
if (_pausingKeys.contains(globalKey)) {
|
||||
// Expected cancel from holding-queue promotion during pause — ignore
|
||||
break;
|
||||
}
|
||||
final ctx = _pendingDownloadContext.remove(globalKey);
|
||||
if (ctx != null) {
|
||||
// Context still present → OS cancelled the task, not user code
|
||||
// (user-initiated pause/cancel/delete removes context before cancellation completes)
|
||||
appLogger.w('Download cancelled by system for $globalKey, re-queuing');
|
||||
_database.updateBgTaskId(globalKey, null);
|
||||
_transitionStatus(globalKey, DownloadStatus.queued);
|
||||
_database.addToQueue(mediaGlobalKey: globalKey);
|
||||
if (_lastClient != null) _processQueue(_lastClient!);
|
||||
}
|
||||
if (_pausingKeys.contains(globalKey)) break;
|
||||
_onDownloadCanceled(globalKey);
|
||||
case TaskStatus.paused:
|
||||
appLogger.d('Download paused by system for $globalKey');
|
||||
case TaskStatus.waitingToRetry:
|
||||
@@ -778,24 +785,123 @@ class DownloadManagerService {
|
||||
}
|
||||
}
|
||||
|
||||
/// Handle a permanently failed download
|
||||
/// Handle a system-initiated cancel — re-queue unless already completed.
|
||||
Future<void> _onDownloadCanceled(String globalKey) async {
|
||||
final ctx = _pendingDownloadContext.remove(globalKey);
|
||||
if (ctx == null) return;
|
||||
if (_completingKeys.contains(globalKey)) return;
|
||||
|
||||
final existing = await _database.getDownloadedMedia(globalKey);
|
||||
if (existing?.status == DownloadStatus.completed.index) return;
|
||||
|
||||
appLogger.w('Download cancelled by system for $globalKey, re-queuing');
|
||||
await _database.updateBgTaskId(globalKey, null);
|
||||
await _transitionStatus(globalKey, DownloadStatus.queued);
|
||||
await _database.addToQueue(mediaGlobalKey: globalKey);
|
||||
if (_lastClient != null) _processQueue(_lastClient!);
|
||||
}
|
||||
|
||||
/// Handle a failed download — auto-retry if retries remain, otherwise permanently fail.
|
||||
/// Native retries (Range-based resume) are already exhausted at this point.
|
||||
Future<void> _onDownloadFailed(String globalKey, String errorMessage) async {
|
||||
if (_completingKeys.contains(globalKey)) {
|
||||
appLogger.d('Ignoring failure event for $globalKey: completion in progress');
|
||||
return;
|
||||
}
|
||||
_pendingDownloadContext.remove(globalKey);
|
||||
appLogger.e('Download failed for $globalKey: $errorMessage');
|
||||
|
||||
final existing = await _database.getDownloadedMedia(globalKey);
|
||||
if (existing?.status == DownloadStatus.completed.index) {
|
||||
appLogger.d('Ignoring stale failure for completed download $globalKey');
|
||||
return;
|
||||
}
|
||||
final retryCount = existing?.retryCount ?? 0;
|
||||
|
||||
if (retryCount < _maxAppRetries && _lastClient != null) {
|
||||
// App-level auto-retry: schedule a fresh download after a delay.
|
||||
// Each new task gets 5 native retries with Range-based resume.
|
||||
appLogger.w(
|
||||
'Download failed for $globalKey (attempt ${retryCount + 1}/$_maxAppRetries), '
|
||||
'scheduling auto-retry in ${_autoRetryDelay.inSeconds}s: $errorMessage',
|
||||
);
|
||||
await _transitionStatus(globalKey, DownloadStatus.failed, errorMessage: errorMessage);
|
||||
await _database.removeFromQueue(globalKey);
|
||||
_autoRetryTimers[globalKey]?.cancel();
|
||||
_autoRetryTimers[globalKey] = Timer(_autoRetryDelay, () {
|
||||
_autoRetryTimers.remove(globalKey);
|
||||
_performAutoRetry(globalKey);
|
||||
});
|
||||
|
||||
// Advance the queue while we wait for the retry timer
|
||||
if (_lastClient != null) _processQueue(_lastClient!);
|
||||
} else {
|
||||
await _onDownloadPermanentlyFailed(globalKey, errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
/// Handle a non-retryable failure (e.g. 404) — fail immediately without auto-retry.
|
||||
Future<void> _onDownloadPermanentlyFailed(String globalKey, String errorMessage) async {
|
||||
if (_completingKeys.contains(globalKey)) {
|
||||
appLogger.d('Ignoring permanent failure event for $globalKey: completion in progress');
|
||||
return;
|
||||
}
|
||||
_pendingDownloadContext.remove(globalKey);
|
||||
|
||||
final existing = await _database.getDownloadedMedia(globalKey);
|
||||
if (existing?.status == DownloadStatus.completed.index) {
|
||||
appLogger.d('Ignoring stale permanent failure for completed download $globalKey');
|
||||
return;
|
||||
}
|
||||
|
||||
appLogger.e('Download permanently failed for $globalKey: $errorMessage');
|
||||
await _transitionStatus(globalKey, DownloadStatus.failed, errorMessage: errorMessage);
|
||||
await _database.updateDownloadError(globalKey, errorMessage);
|
||||
await _database.removeFromQueue(globalKey);
|
||||
|
||||
// Try to enqueue more items from the queue
|
||||
if (_lastClient != null) _processQueue(_lastClient!);
|
||||
}
|
||||
|
||||
/// Execute an app-level auto-retry: transition back to queued and re-enqueue.
|
||||
Future<void> _performAutoRetry(String globalKey) async {
|
||||
if (_disposed) return;
|
||||
final client = _lastClient;
|
||||
if (client == null) {
|
||||
appLogger.w('Cannot auto-retry $globalKey: no client available');
|
||||
return;
|
||||
}
|
||||
|
||||
final existing = await _database.getDownloadedMedia(globalKey);
|
||||
if (existing == null || existing.status != DownloadStatus.failed.index) {
|
||||
// Download was cancelled/deleted/retried by user during the delay
|
||||
return;
|
||||
}
|
||||
|
||||
appLogger.i('Auto-retrying download for $globalKey');
|
||||
await _database.updateBgTaskId(globalKey, null);
|
||||
await _transitionStatus(globalKey, DownloadStatus.queued);
|
||||
await _database.addToQueue(mediaGlobalKey: globalKey);
|
||||
_processQueue(client);
|
||||
}
|
||||
|
||||
/// Handle a completed video download — store path, download supplementary content, mark done.
|
||||
Future<void> _onDownloadComplete(String globalKey, Task task) async {
|
||||
// Prevent duplicate concurrent completions (e.g. trackTasks replaying events)
|
||||
if (_completingKeys.contains(globalKey)) {
|
||||
appLogger.d('Already processing completion for $globalKey, skipping');
|
||||
return;
|
||||
}
|
||||
_completingKeys.add(globalKey);
|
||||
try {
|
||||
// Flush any pending debounced progress write before completing
|
||||
_progressDebounceTimers.remove(globalKey)?.cancel();
|
||||
|
||||
// Fresh DB check — bail if already completed (guards against race with orphan scan)
|
||||
final existingCheck = await _database.getDownloadedMedia(globalKey);
|
||||
if (existingCheck?.status == DownloadStatus.completed.index) {
|
||||
appLogger.d('Download already completed for $globalKey, skipping');
|
||||
return;
|
||||
}
|
||||
|
||||
final ctx = _pendingDownloadContext.remove(globalKey);
|
||||
|
||||
// ── Phase 1 (critical): resolve and store the video file path ──
|
||||
@@ -889,9 +995,9 @@ class DownloadManagerService {
|
||||
} catch (e) {
|
||||
appLogger.e('Post-download processing failed for $globalKey', error: e);
|
||||
await _transitionStatus(globalKey, DownloadStatus.failed, errorMessage: 'Post-processing failed: $e');
|
||||
await _database.updateDownloadError(globalKey, 'Post-processing failed: $e');
|
||||
await _database.removeFromQueue(globalKey);
|
||||
} finally {
|
||||
_completingKeys.remove(globalKey);
|
||||
// Always advance the queue, even after errors
|
||||
if (_lastClient != null) _processQueue(_lastClient!);
|
||||
}
|
||||
@@ -904,6 +1010,15 @@ class DownloadManagerService {
|
||||
return _apiCache.getMetadata(parsed.serverId, parsed.ratingKey);
|
||||
}
|
||||
|
||||
/// Look up the year of the parent show for an episode (used for folder naming).
|
||||
Future<int?> _fetchShowYear(String serverId, String? grandparentRatingKey) async {
|
||||
if (grandparentRatingKey == null) return null;
|
||||
final showCached = await _apiCache.get(serverId, '/library/metadata/$grandparentRatingKey');
|
||||
final showJson = PlexCacheParser.extractFirstMetadata(showCached);
|
||||
if (showJson != null) return PlexMetadata.fromJson(showJson).year;
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Re-derive the SAF file URI from metadata (for recovery when context is lost)
|
||||
Future<String?> _resolveSafStoredPath(PlexMetadata metadata, String ext, int? showYear) async {
|
||||
final safBaseUri = _storageService.safBaseUri;
|
||||
@@ -1143,6 +1258,9 @@ class DownloadManagerService {
|
||||
/// Default progress is 0 for most statuses, 100 for completed.
|
||||
Future<void> _transitionStatus(String globalKey, DownloadStatus status, {int? progress, String? errorMessage}) async {
|
||||
await _database.updateDownloadStatus(globalKey, status.index);
|
||||
if (status == DownloadStatus.failed && errorMessage != null) {
|
||||
await _database.updateDownloadError(globalKey, errorMessage);
|
||||
}
|
||||
_emitProgress(
|
||||
globalKey,
|
||||
status,
|
||||
@@ -1219,6 +1337,7 @@ class DownloadManagerService {
|
||||
|
||||
/// Retry a failed download
|
||||
Future<void> retryDownload(String globalKey, PlexClient client) async {
|
||||
_autoRetryTimers.remove(globalKey)?.cancel();
|
||||
await _database.clearDownloadError(globalKey);
|
||||
await _database.updateBgTaskId(globalKey, null);
|
||||
await _transitionStatus(globalKey, DownloadStatus.queued);
|
||||
@@ -1228,6 +1347,7 @@ class DownloadManagerService {
|
||||
|
||||
/// Cancel a download
|
||||
Future<void> cancelDownload(String globalKey) async {
|
||||
_autoRetryTimers.remove(globalKey)?.cancel();
|
||||
final bgTaskId = await _database.getBgTaskId(globalKey);
|
||||
if (bgTaskId != null) {
|
||||
await FileDownloader().cancelTaskWithId(bgTaskId);
|
||||
@@ -1239,6 +1359,7 @@ class DownloadManagerService {
|
||||
|
||||
/// Delete a downloaded item and its files
|
||||
Future<void> deleteDownload(String globalKey) async {
|
||||
_autoRetryTimers.remove(globalKey)?.cancel();
|
||||
// Cancel if actively downloading via background_downloader
|
||||
final bgTaskId = await _database.getBgTaskId(globalKey);
|
||||
if (bgTaskId != null) {
|
||||
@@ -1583,11 +1704,7 @@ class DownloadManagerService {
|
||||
final contents = await seasonDir.list().toList();
|
||||
final hasVideos = contents.any(
|
||||
(e) =>
|
||||
e.path.endsWith('.mp4') ||
|
||||
e.path.endsWith('.ogv') ||
|
||||
e.path.endsWith('.mkv') ||
|
||||
e.path.endsWith('.m4v') ||
|
||||
e.path.endsWith('.avi') ||
|
||||
_videoExtensions.any((ext) => e.path.endsWith(ext)) ||
|
||||
e.path.contains('_subs'),
|
||||
);
|
||||
|
||||
@@ -1748,6 +1865,10 @@ class DownloadManagerService {
|
||||
timer.cancel();
|
||||
}
|
||||
_progressDebounceTimers.clear();
|
||||
for (final timer in _autoRetryTimers.values) {
|
||||
timer.cancel();
|
||||
}
|
||||
_autoRetryTimers.clear();
|
||||
_progressController.close();
|
||||
_deletionProgressController.close();
|
||||
}
|
||||
|
||||
@@ -60,8 +60,11 @@ class PipService {
|
||||
static String _getLocalizedError(String errorCode, String? errorMessage) {
|
||||
return switch (errorCode) {
|
||||
'android_version' => t.videoControls.pipErrors.androidVersion,
|
||||
'ios_version' => t.videoControls.pipErrors.iosVersion,
|
||||
'macos_version' => t.videoControls.pipErrors.notSupported,
|
||||
'permission_disabled' => t.videoControls.pipErrors.permissionDisabled,
|
||||
'not_supported' => t.videoControls.pipErrors.notSupported,
|
||||
'vo_switch_failed' => t.videoControls.pipErrors.voSwitchFailed,
|
||||
'failed' => t.videoControls.pipErrors.failed,
|
||||
_ => t.videoControls.pipErrors.unknown(error: errorMessage ?? 'Unknown error'),
|
||||
};
|
||||
|
||||
@@ -40,10 +40,9 @@ class LibraryContentResult {
|
||||
const LibraryContentResult({required this.items, required this.totalSize});
|
||||
}
|
||||
|
||||
/// Process hub JSON response in an isolate.
|
||||
/// Process hub response in an isolate.
|
||||
/// Top-level function so it can be passed to [Isolate.run].
|
||||
List<PlexHub> _processHubResponse(String jsonStr, String serverId, String? serverName) {
|
||||
final decoded = jsonDecode(jsonStr) as Map<String, dynamic>;
|
||||
List<PlexHub> _processHubResponse(Map<String, dynamic> decoded, String serverId, String? serverName) {
|
||||
final container = decoded['MediaContainer'] as Map<String, dynamic>?;
|
||||
if (container == null || container['Hub'] == null) return [];
|
||||
|
||||
@@ -80,10 +79,9 @@ List<PlexHub> _processHubResponse(String jsonStr, String serverId, String? serve
|
||||
return hubs;
|
||||
}
|
||||
|
||||
/// Process on-deck JSON response in an isolate.
|
||||
/// Process on-deck response in an isolate.
|
||||
/// Top-level function so it can be passed to [Isolate.run].
|
||||
List<PlexMetadata> _processOnDeckResponse(String jsonStr, String serverId, String? serverName) {
|
||||
final decoded = jsonDecode(jsonStr) as Map<String, dynamic>;
|
||||
List<PlexMetadata> _processOnDeckResponse(Map<String, dynamic> decoded, String serverId, String? serverName) {
|
||||
final container = decoded['MediaContainer'] as Map<String, dynamic>?;
|
||||
if (container == null || container['Metadata'] == null) return [];
|
||||
|
||||
@@ -170,6 +168,7 @@ class PlexClient {
|
||||
responseDecoder: _lenientUtf8Decoder,
|
||||
),
|
||||
);
|
||||
_dio.transformer = BackgroundTransformer();
|
||||
|
||||
// Add interceptor for logging (optional, can be disabled in production)
|
||||
_dio.interceptors.add(
|
||||
@@ -846,23 +845,10 @@ class PlexClient {
|
||||
|
||||
/// Get on deck items (continue watching, filtered to video content only)
|
||||
Future<List<PlexMetadata>> getOnDeck() async {
|
||||
final response = await _dio.get(
|
||||
'/library/onDeck',
|
||||
options: Options(responseType: ResponseType.plain),
|
||||
);
|
||||
final response = await _dio.get('/library/onDeck');
|
||||
final sid = serverId;
|
||||
final sname = serverName;
|
||||
return Isolate.run(() => _processOnDeckResponse(response.data as String, sid, sname));
|
||||
}
|
||||
|
||||
/// Get on deck items filtered by a specific library section
|
||||
Future<List<PlexMetadata>> getOnDeckForLibrary(String sectionId) async {
|
||||
final allOnDeck = await getOnDeck();
|
||||
|
||||
// Filter items to only include those from the specified library section
|
||||
return allOnDeck.where((item) {
|
||||
return item.librarySectionID == int.tryParse(sectionId);
|
||||
}).toList();
|
||||
return Isolate.run(() => _processOnDeckResponse(response.data as Map<String, dynamic>, sid, sname));
|
||||
}
|
||||
|
||||
/// Get children of a metadata item (e.g., seasons for a show, episodes for a season)
|
||||
@@ -1325,11 +1311,10 @@ class PlexClient {
|
||||
final response = await _dio.get(
|
||||
'/hubs/sections/$sectionId',
|
||||
queryParameters: {'count': limit, 'includeGuids': 1},
|
||||
options: Options(responseType: ResponseType.plain),
|
||||
);
|
||||
final sid = serverId;
|
||||
final sname = serverName;
|
||||
return Isolate.run(() => _processHubResponse(response.data as String, sid, sname));
|
||||
return Isolate.run(() => _processHubResponse(response.data as Map<String, dynamic>, sid, sname));
|
||||
} catch (e) {
|
||||
appLogger.e('Failed to get library hubs: $e');
|
||||
}
|
||||
@@ -1344,11 +1329,10 @@ class PlexClient {
|
||||
final response = await _dio.get(
|
||||
'/hubs',
|
||||
queryParameters: {'count': limit, 'includeGuids': 1},
|
||||
options: Options(responseType: ResponseType.plain),
|
||||
);
|
||||
final sid = serverId;
|
||||
final sname = serverName;
|
||||
return Isolate.run(() => _processHubResponse(response.data as String, sid, sname));
|
||||
return Isolate.run(() => _processHubResponse(response.data as Map<String, dynamic>, sid, sname));
|
||||
} catch (e) {
|
||||
appLogger.e('Failed to get global hubs: $e');
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'package:flutter/services.dart';
|
||||
import '../models/hotkey_model.dart';
|
||||
import 'package:plezy/utils/app_logger.dart';
|
||||
@@ -19,6 +20,7 @@ enum EpisodePosterMode { seriesPoster, seasonPoster, episodeThumbnail }
|
||||
class SettingsService extends BaseSharedPreferencesService {
|
||||
static const String _keyThemeMode = 'theme_mode';
|
||||
static const String _keyEnableDebugLogging = 'enable_debug_logging';
|
||||
static const String _keyCrashReporting = 'crash_reporting';
|
||||
static const String _keyBufferSize = 'buffer_size';
|
||||
static const String _keyBufferSizeMigratedToAuto = 'buffer_size_migrated_to_auto';
|
||||
static const String _keyKeyboardShortcuts = 'keyboard_shortcuts';
|
||||
@@ -60,7 +62,8 @@ class SettingsService extends BaseSharedPreferencesService {
|
||||
static const String _keyDownloadOnWifiOnly = 'download_on_wifi_only';
|
||||
static const String _keyVideoPlayerNavigationEnabled = 'video_player_navigation_enabled';
|
||||
static const String _keyShowPerformanceOverlay = 'show_performance_overlay';
|
||||
static const String _keyMpvConfigEntries = 'mpv_config_entries';
|
||||
static const String _keyMpvConfigEntries = 'mpv_config_entries'; // Legacy
|
||||
static const String _keyMpvConfigText = 'mpv_config_text';
|
||||
static const String _keyMpvConfigPresets = 'mpv_config_presets';
|
||||
static const String _keyMaxVolume = 'max_volume';
|
||||
static const String _keyEnableDiscordRPC = 'enable_discord_rpc';
|
||||
@@ -68,6 +71,7 @@ class SettingsService extends BaseSharedPreferencesService {
|
||||
static const String _keyMatchContentFrameRate = 'match_content_frame_rate';
|
||||
static const String _keyTunneledPlayback = 'tunneled_playback';
|
||||
static const String _keyDefaultPlaybackSpeed = 'default_playback_speed';
|
||||
static const String _keyDefaultBoxFitMode = 'default_box_fit_mode';
|
||||
static const String _keyAutoPlayNextEpisode = 'auto_play_next_episode';
|
||||
static const String _keyUseExoPlayer = 'use_exoplayer';
|
||||
static const String _keyAlwaysKeepSidebarOpen = 'always_keep_sidebar_open';
|
||||
@@ -85,10 +89,16 @@ class SettingsService extends BaseSharedPreferencesService {
|
||||
|
||||
SettingsService._();
|
||||
|
||||
static Future<SettingsService> getInstance() {
|
||||
return BaseSharedPreferencesService.initializeInstance(() => SettingsService._());
|
||||
static SettingsService? _cachedInstance;
|
||||
|
||||
static Future<SettingsService> getInstance() async {
|
||||
_cachedInstance ??= await BaseSharedPreferencesService.initializeInstance(() => SettingsService._());
|
||||
return _cachedInstance!;
|
||||
}
|
||||
|
||||
/// Synchronous access to the singleton, or null if not yet initialized.
|
||||
static SettingsService? get instanceOrNull => _cachedInstance;
|
||||
|
||||
/// Generic helper to get an enum value from preferences
|
||||
T _getEnumValue<T extends Enum>(String key, List<T> values, T defaultValue) {
|
||||
final stored = prefs.getString(key);
|
||||
@@ -121,6 +131,15 @@ class SettingsService extends BaseSharedPreferencesService {
|
||||
return prefs.getBool(_keyEnableDebugLogging) ?? false;
|
||||
}
|
||||
|
||||
// Crash Reporting
|
||||
Future<void> setCrashReporting(bool enabled) async {
|
||||
await prefs.setBool(_keyCrashReporting, enabled);
|
||||
}
|
||||
|
||||
bool getCrashReporting() {
|
||||
return prefs.getBool(_keyCrashReporting) ?? true; // Default enabled
|
||||
}
|
||||
|
||||
// Buffer Size (in MB)
|
||||
Future<void> setBufferSize(int sizeInMB) async {
|
||||
await prefs.setInt(_keyBufferSize, sizeInMB);
|
||||
@@ -905,31 +924,61 @@ class SettingsService extends BaseSharedPreferencesService {
|
||||
return prefs.getBool(_keyDownloadOnWifiOnly) ?? false;
|
||||
}
|
||||
|
||||
// MPV Config Entries
|
||||
// MPV Config (raw text)
|
||||
|
||||
/// Get all MPV config entries
|
||||
List<MpvConfigEntry> getMpvConfigEntries() {
|
||||
final jsonString = prefs.getString(_keyMpvConfigEntries);
|
||||
if (jsonString == null) return [];
|
||||
/// Get the raw MPV config text. Migrates from legacy JSON entries on first read.
|
||||
String getMpvConfigText() {
|
||||
final text = prefs.getString(_keyMpvConfigText);
|
||||
if (text != null) return text;
|
||||
|
||||
try {
|
||||
final List<dynamic> decoded = json.decode(jsonString);
|
||||
return decoded.map((e) => MpvConfigEntry.fromJson(e as Map<String, dynamic>)).toList();
|
||||
} catch (e) {
|
||||
return [];
|
||||
// Migrate from legacy JSON entries
|
||||
final legacyJson = prefs.getString(_keyMpvConfigEntries);
|
||||
if (legacyJson != null) {
|
||||
try {
|
||||
final List<dynamic> decoded = json.decode(legacyJson);
|
||||
final lines = <String>[];
|
||||
for (final item in decoded) {
|
||||
if (item is Map<String, dynamic>) {
|
||||
final key = item['key'] as String? ?? '';
|
||||
final value = item['value'] as String? ?? '';
|
||||
final enabled = item['isEnabled'] as bool? ?? true;
|
||||
if (key.isNotEmpty) {
|
||||
lines.add(enabled ? '$key=$value' : '#$key=$value');
|
||||
}
|
||||
}
|
||||
}
|
||||
final migrated = lines.join('\n');
|
||||
prefs.setString(_keyMpvConfigText, migrated);
|
||||
return migrated;
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/// Save all MPV config entries
|
||||
Future<void> setMpvConfigEntries(List<MpvConfigEntry> entries) async {
|
||||
final jsonString = json.encode(entries.map((e) => e.toJson()).toList());
|
||||
await prefs.setString(_keyMpvConfigEntries, jsonString);
|
||||
/// Save the raw MPV config text
|
||||
Future<void> setMpvConfigText(String text) async {
|
||||
await prefs.setString(_keyMpvConfigText, text);
|
||||
}
|
||||
|
||||
/// Get only enabled MPV config entries (for player initialization)
|
||||
/// Parse raw config text into a Map<String, String> (skip blanks and # comments)
|
||||
static Map<String, String> parseMpvConfigText(String text) {
|
||||
final result = <String, String>{};
|
||||
for (final line in text.split('\n')) {
|
||||
final trimmed = line.trim();
|
||||
if (trimmed.isEmpty || trimmed.startsWith('#')) continue;
|
||||
final eqIndex = trimmed.indexOf('=');
|
||||
if (eqIndex <= 0) continue;
|
||||
final key = trimmed.substring(0, eqIndex).trim();
|
||||
final value = trimmed.substring(eqIndex + 1).trim();
|
||||
if (key.isNotEmpty) result[key] = value;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Get enabled MPV config entries (for player initialization)
|
||||
Map<String, String> getEnabledMpvConfigEntries() {
|
||||
final entries = getMpvConfigEntries();
|
||||
return Map.fromEntries(entries.where((e) => e.isEnabled).map((e) => MapEntry(e.key, e.value)));
|
||||
return parseMpvConfigText(getMpvConfigText());
|
||||
}
|
||||
|
||||
// MPV Presets
|
||||
@@ -941,20 +990,36 @@ class SettingsService extends BaseSharedPreferencesService {
|
||||
|
||||
try {
|
||||
final List<dynamic> decoded = json.decode(jsonString);
|
||||
return decoded.map((e) => MpvPreset.fromJson(e as Map<String, dynamic>)).toList();
|
||||
return decoded.map((e) {
|
||||
final map = e as Map<String, dynamic>;
|
||||
// Migrate legacy presets with entries list to text
|
||||
if (map.containsKey('entries') && !map.containsKey('text')) {
|
||||
final entries = map['entries'] as List;
|
||||
final lines = <String>[];
|
||||
for (final item in entries) {
|
||||
if (item is Map<String, dynamic>) {
|
||||
final key = item['key'] as String? ?? '';
|
||||
final value = item['value'] as String? ?? '';
|
||||
final enabled = item['isEnabled'] as bool? ?? true;
|
||||
if (key.isNotEmpty) {
|
||||
lines.add(enabled ? '$key=$value' : '#$key=$value');
|
||||
}
|
||||
}
|
||||
}
|
||||
map['text'] = lines.join('\n');
|
||||
}
|
||||
return MpvPreset.fromJson(map);
|
||||
}).toList();
|
||||
} catch (e) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
/// Save a new preset (overwrites existing with same name)
|
||||
Future<void> saveMpvPreset(String name, List<MpvConfigEntry> entries) async {
|
||||
Future<void> saveMpvPreset(String name, String text) async {
|
||||
final presets = getMpvPresets();
|
||||
|
||||
// Remove existing preset with same name
|
||||
presets.removeWhere((p) => p.name == name);
|
||||
|
||||
presets.add(MpvPreset(name: name, entries: entries, createdAt: DateTime.now()));
|
||||
presets.add(MpvPreset(name: name, text: text, createdAt: DateTime.now()));
|
||||
|
||||
final jsonString = json.encode(presets.map((p) => p.toJson()).toList());
|
||||
await prefs.setString(_keyMpvConfigPresets, jsonString);
|
||||
@@ -969,12 +1034,12 @@ class SettingsService extends BaseSharedPreferencesService {
|
||||
await prefs.setString(_keyMpvConfigPresets, jsonString);
|
||||
}
|
||||
|
||||
/// Load a preset (replaces current entries)
|
||||
/// Load a preset (replaces current config text)
|
||||
Future<void> loadMpvPreset(String name) async {
|
||||
final presets = getMpvPresets();
|
||||
final preset = presets.firstWhere((p) => p.name == name, orElse: () => throw Exception('Preset not found: $name'));
|
||||
|
||||
await setMpvConfigEntries(preset.entries);
|
||||
await setMpvConfigText(preset.text);
|
||||
}
|
||||
|
||||
// Discord Rich Presence
|
||||
@@ -986,13 +1051,15 @@ class SettingsService extends BaseSharedPreferencesService {
|
||||
return prefs.getBool(_keyEnableDiscordRPC) ?? false; // Default disabled
|
||||
}
|
||||
|
||||
// Auto Picture-in-Picture (Android only)
|
||||
// Auto Picture-in-Picture (Android & iOS)
|
||||
Future<void> setAutoPip(bool enabled) async {
|
||||
await prefs.setBool(_keyAutoPip, enabled);
|
||||
}
|
||||
|
||||
bool getAutoPip() {
|
||||
return prefs.getBool(_keyAutoPip) ?? true; // Default enabled
|
||||
if (!Platform.isAndroid && !Platform.isIOS && !Platform.isMacOS) return false;
|
||||
// Default enabled on mobile, disabled on macOS
|
||||
return prefs.getBool(_keyAutoPip) ?? !Platform.isMacOS;
|
||||
}
|
||||
|
||||
// Match Content Frame Rate (Android only)
|
||||
@@ -1022,6 +1089,15 @@ class SettingsService extends BaseSharedPreferencesService {
|
||||
return prefs.getDouble(_keyDefaultPlaybackSpeed) ?? 1.0; // Default: normal speed
|
||||
}
|
||||
|
||||
// Default BoxFit Mode (0=contain, 1=cover, 2=fill)
|
||||
Future<void> setDefaultBoxFitMode(int mode) async {
|
||||
await prefs.setInt(_keyDefaultBoxFitMode, mode.clamp(0, 2));
|
||||
}
|
||||
|
||||
int getDefaultBoxFitMode() {
|
||||
return prefs.getInt(_keyDefaultBoxFitMode) ?? 0; // Default: contain
|
||||
}
|
||||
|
||||
// Auto-Play Next Episode
|
||||
Future<void> setAutoPlayNextEpisode(bool enabled) async {
|
||||
await prefs.setBool(_keyAutoPlayNextEpisode, enabled);
|
||||
@@ -1219,12 +1295,14 @@ class SettingsService extends BaseSharedPreferencesService {
|
||||
prefs.remove(_keyVideoPlayerNavigationEnabled),
|
||||
prefs.remove(_keyShowPerformanceOverlay),
|
||||
prefs.remove(_keyMpvConfigEntries),
|
||||
prefs.remove(_keyMpvConfigText),
|
||||
prefs.remove(_keyMpvConfigPresets),
|
||||
prefs.remove(_keyEnableDiscordRPC),
|
||||
prefs.remove(_keyAutoPip),
|
||||
prefs.remove(_keyMatchContentFrameRate),
|
||||
prefs.remove(_keyTunneledPlayback),
|
||||
prefs.remove(_keyDefaultPlaybackSpeed),
|
||||
prefs.remove(_keyDefaultBoxFitMode),
|
||||
prefs.remove(_keyAutoPlayNextEpisode),
|
||||
prefs.remove(_keyUseExoPlayer),
|
||||
prefs.remove(_keyAlwaysKeepSidebarOpen),
|
||||
|
||||
@@ -21,7 +21,7 @@ class VideoFilterManager {
|
||||
final int selectedMediaIndex;
|
||||
|
||||
/// BoxFit mode state: 0=contain (letterbox), 1=cover (fill screen), 2=fill (stretch)
|
||||
int _boxFitMode = 0;
|
||||
int _boxFitMode;
|
||||
|
||||
/// Store the boxFitMode before entering PiP so it can be restored
|
||||
int? _prePipBoxFitMode;
|
||||
@@ -41,7 +41,10 @@ class VideoFilterManager {
|
||||
/// Debounced video filter update with leading edge execution
|
||||
late final Debounce _debouncedUpdateVideoFilter;
|
||||
|
||||
VideoFilterManager({required this.player, required this.availableVersions, required this.selectedMediaIndex}) {
|
||||
/// Callback invoked when boxFitMode changes, for external persistence
|
||||
final void Function(int mode)? onBoxFitModeChanged;
|
||||
|
||||
VideoFilterManager({required this.player, required this.availableVersions, required this.selectedMediaIndex, int initialBoxFitMode = 0, this.onBoxFitModeChanged}) : _boxFitMode = initialBoxFitMode {
|
||||
_debouncedUpdateVideoFilter = debounce(
|
||||
updateVideoFilter,
|
||||
const Duration(milliseconds: 50),
|
||||
@@ -59,6 +62,7 @@ class VideoFilterManager {
|
||||
/// Cycle through BoxFit modes: contain → cover → fill → contain (for button)
|
||||
void cycleBoxFitMode() {
|
||||
_boxFitMode = (_boxFitMode + 1) % 3;
|
||||
onBoxFitModeChanged?.call(_boxFitMode);
|
||||
updateVideoFilter();
|
||||
}
|
||||
|
||||
@@ -73,6 +77,7 @@ class VideoFilterManager {
|
||||
/// Toggle between contain and cover modes only (for pinch gesture)
|
||||
void toggleContainCover() {
|
||||
_boxFitMode = _boxFitMode == 0 ? 1 : 0;
|
||||
onBoxFitModeChanged?.call(_boxFitMode);
|
||||
updateVideoFilter();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import '../mpv/mpv.dart';
|
||||
import '../services/pip_service.dart';
|
||||
@@ -59,11 +61,13 @@ class VideoPIPManager {
|
||||
final supported = await PipService.isSupported();
|
||||
if (!supported) return (false, 'PiP not supported on this device');
|
||||
|
||||
// Reset video filter to contain mode BEFORE entering PiP
|
||||
onBeforeEnterPip?.call();
|
||||
|
||||
// Wait a frame for the filter change to take effect
|
||||
await Future.delayed(const Duration(milliseconds: 50));
|
||||
// Reset video filter to contain mode BEFORE entering PiP (Android only —
|
||||
// iOS switches VO entirely so the filter is irrelevant)
|
||||
if (Platform.isAndroid) {
|
||||
onBeforeEnterPip?.call();
|
||||
// Wait a frame for the filter change to take effect
|
||||
await Future.delayed(const Duration(milliseconds: 50));
|
||||
}
|
||||
|
||||
final dims = await _getVideoDimensions();
|
||||
return await PipService.enter(width: dims.$1, height: dims.$2);
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
class ConnectionTimeouts {
|
||||
/// Timeout for probing a cached/preferred endpoint before falling back to
|
||||
/// the full candidate race (used in [PlexServer.findBestWorkingConnection]).
|
||||
static const preferredEndpointProbe = Duration(seconds: 2);
|
||||
static const preferredEndpointProbe = Duration(milliseconds: 1500);
|
||||
|
||||
/// Timeout for the connection race where all candidates are tested in
|
||||
/// parallel (used in [PlexServer.findBestWorkingConnection]).
|
||||
static const connectionRace = Duration(seconds: 4);
|
||||
static const connectionRace = Duration(seconds: 2);
|
||||
|
||||
/// Dio connect timeout for individual HTTP requests to a Plex server.
|
||||
static const connect = Duration(seconds: 10);
|
||||
|
||||
/// Timeout for [MultiServerManager.connectToAllServers] — the maximum time
|
||||
/// to wait for each server's connection future.
|
||||
static const connectAll = Duration(seconds: 10);
|
||||
static const connectAll = Duration(seconds: 4);
|
||||
|
||||
/// Dio receive timeout for streaming/large responses from a Plex server.
|
||||
static const receive = Duration(seconds: 120);
|
||||
|
||||
@@ -176,13 +176,20 @@ DurationLocale _getDurationLocale() {
|
||||
}
|
||||
}
|
||||
|
||||
/// Formats a [DateTime] as a clock time string, respecting the system 24-hour preference.
|
||||
/// Uses `DateFormat.Hm` for 24-hour format and `DateFormat.jm` for 12-hour format.
|
||||
String formatClockTime(DateTime time, {required bool is24Hour}) {
|
||||
final locale = LocaleSettings.currentLocale.languageCode;
|
||||
final formatter = is24Hour ? DateFormat.Hm(locale) : DateFormat.jm(locale);
|
||||
return formatter.format(time);
|
||||
}
|
||||
|
||||
/// Formats the clock time at which media will finish playing, given the remaining duration.
|
||||
/// Returns a localized time string like "6:12 PM" or "18:12" depending on locale.
|
||||
String formatFinishTime(Duration remaining, {double rate = 1.0}) {
|
||||
/// Returns a localized time string like "6:12 PM" or "18:12" depending on system setting.
|
||||
String formatFinishTime(Duration remaining, {double rate = 1.0, required bool is24Hour}) {
|
||||
final adjustedRemaining = remaining * (1.0 / rate);
|
||||
final finishTime = DateTime.now().add(adjustedRemaining);
|
||||
final formatter = DateFormat.jm(LocaleSettings.currentLocale.languageCode);
|
||||
return formatter.format(finishTime);
|
||||
return formatClockTime(finishTime, is24Hour: is24Hour);
|
||||
}
|
||||
|
||||
/// Takes a list of strings and returns one long string with each item in the list concatenated by a bullet
|
||||
|
||||
@@ -33,15 +33,6 @@ class DeletionProgressDialog extends StatelessWidget {
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Progress text
|
||||
Text(
|
||||
'Deleting ${progress.itemTitle}... (${progress.currentItem} of ${progress.totalItems})',
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Progress bar
|
||||
|
||||
@@ -82,7 +82,7 @@ class MediaContextMenuState extends State<MediaContextMenu> {
|
||||
/// Used for keyboard/gamepad long-press activation.
|
||||
/// If [position] is null, the menu will appear at the center of this widget.
|
||||
void showContextMenu(BuildContext menuContext, {Offset? position}) {
|
||||
_openedFromKeyboard = true;
|
||||
_openedFromKeyboard = position == null;
|
||||
if (position != null) {
|
||||
_tapPosition = position;
|
||||
} else {
|
||||
@@ -211,14 +211,26 @@ class MediaContextMenuState extends State<MediaContextMenu> {
|
||||
);
|
||||
}
|
||||
|
||||
// Go to Series (for episodes and seasons)
|
||||
// Go to Series (for episodes and seasons) — hide if already on that series' detail screen,
|
||||
// or on a season screen belonging to the same series
|
||||
final ancestorMediaDetail = context.findAncestorWidgetOfExactType<MediaDetailScreen>();
|
||||
final ancestorSeasonDetail = context.findAncestorWidgetOfExactType<SeasonDetailScreen>();
|
||||
final ancestorSeriesKey =
|
||||
ancestorMediaDetail?.metadata.ratingKey ?? ancestorSeasonDetail?.season.parentRatingKey;
|
||||
// For episodes, the show key is grandparentRatingKey; for seasons, it's parentRatingKey
|
||||
final itemSeriesKey =
|
||||
mediaType == PlexMediaType.episode ? metadata.grandparentRatingKey : metadata.parentRatingKey;
|
||||
if ((mediaType == PlexMediaType.episode || mediaType == PlexMediaType.season) &&
|
||||
metadata.grandparentTitle != null) {
|
||||
itemSeriesKey != null &&
|
||||
ancestorSeriesKey != itemSeriesKey) {
|
||||
menuActions.add(_MenuAction(value: 'series', icon: Symbols.tv_rounded, label: t.mediaMenu.goToSeries));
|
||||
}
|
||||
|
||||
// Go to Season (for episodes)
|
||||
if (mediaType == PlexMediaType.episode && metadata.parentTitle != null) {
|
||||
// Go to Season (for episodes) — hide if already on that season's detail screen
|
||||
if (mediaType == PlexMediaType.episode &&
|
||||
metadata.parentTitle != null &&
|
||||
context.findAncestorWidgetOfExactType<SeasonDetailScreen>()?.season.ratingKey !=
|
||||
metadata.parentRatingKey) {
|
||||
menuActions.add(
|
||||
_MenuAction(value: 'season', icon: Symbols.playlist_play_rounded, label: t.mediaMenu.goToSeason),
|
||||
);
|
||||
@@ -302,6 +314,7 @@ class MediaContextMenuState extends State<MediaContextMenu> {
|
||||
if (useBottomSheet) {
|
||||
selected = await OverlaySheetController.showAdaptive<String>(
|
||||
context,
|
||||
showDragHandle: true,
|
||||
builder: (context) => _FocusableContextMenuSheet(
|
||||
title: widget.item.title,
|
||||
actions: menuActions,
|
||||
@@ -424,7 +437,9 @@ class MediaContextMenuState extends State<MediaContextMenu> {
|
||||
didNavigate = true;
|
||||
await _navigateToRelated(
|
||||
context,
|
||||
metadata!.grandparentRatingKey,
|
||||
metadata!.mediaType == PlexMediaType.season
|
||||
? metadata.parentRatingKey
|
||||
: metadata.grandparentRatingKey,
|
||||
(metadata) => MediaDetailScreen(metadata: metadata),
|
||||
t.messages.errorLoadingSeries,
|
||||
);
|
||||
@@ -562,7 +577,6 @@ class MediaContextMenuState extends State<MediaContextMenu> {
|
||||
await OverlaySheetController.showAdaptive(
|
||||
context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
builder: (context) => FileInfoBottomSheet(fileInfo: fileInfo, title: metadata.title),
|
||||
);
|
||||
} else if (context.mounted) {
|
||||
@@ -597,58 +611,27 @@ class MediaContextMenuState extends State<MediaContextMenu> {
|
||||
|
||||
/// Show submenu for Add to... (Playlist or Collection)
|
||||
Future<void> _showAddToSubmenu(BuildContext context) async {
|
||||
final useBottomSheet = Platform.isIOS || Platform.isAndroid;
|
||||
|
||||
final submenuActions = [
|
||||
_MenuAction(value: 'playlist', icon: Symbols.playlist_play_rounded, label: t.playlists.playlist),
|
||||
_MenuAction(value: 'collection', icon: Symbols.collections_rounded, label: t.collections.collection),
|
||||
];
|
||||
|
||||
String? selected;
|
||||
if (useBottomSheet) {
|
||||
selected = await OverlaySheetController.pushAdaptive<String>(
|
||||
context,
|
||||
builder: (context) => SafeArea(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Text(t.common.addTo, style: Theme.of(context).textTheme.titleMedium),
|
||||
),
|
||||
...submenuActions.map((action) {
|
||||
return ListTile(
|
||||
leading: AppIcon(action.icon, fill: 1),
|
||||
title: Text(action.label),
|
||||
onTap: () => OverlaySheetController.popAdaptive(context, action.value),
|
||||
);
|
||||
}),
|
||||
const SizedBox(height: 8),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
selected = await showMenu<String>(
|
||||
context: context,
|
||||
position: RelativeRect.fromLTRB(
|
||||
_tapPosition?.dx ?? 0,
|
||||
_tapPosition?.dy ?? 0,
|
||||
_tapPosition?.dx ?? 0,
|
||||
_tapPosition?.dy ?? 0,
|
||||
),
|
||||
items: submenuActions.map((action) {
|
||||
return PopupMenuItem<String>(
|
||||
value: action.value,
|
||||
final selected = await showDialog<String>(
|
||||
context: context,
|
||||
builder: (dialogContext) => SimpleDialog(
|
||||
title: Text(t.common.addTo),
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 8),
|
||||
children: submenuActions.map((action) {
|
||||
return SimpleDialogOption(
|
||||
onPressed: () => Navigator.pop(dialogContext, action.value),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [AppIcon(action.icon, fill: 1, size: 20), const SizedBox(width: 12), Text(action.label)],
|
||||
children: [AppIcon(action.icon, fill: 1, size: 24), const SizedBox(width: 16), Text(action.label, style: Theme.of(dialogContext).textTheme.bodyLarge)],
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
);
|
||||
}
|
||||
),
|
||||
);
|
||||
|
||||
// Handle the submenu selection
|
||||
if (selected == 'playlist' && context.mounted) {
|
||||
@@ -825,7 +808,7 @@ class MediaContextMenuState extends State<MediaContextMenu> {
|
||||
// Create new collection flow
|
||||
final collectionName = await showTextInputDialog(
|
||||
context,
|
||||
title: t.collections.createNewCollection,
|
||||
title: t.common.createNew,
|
||||
labelText: t.collections.collectionName,
|
||||
hintText: t.collections.enterCollectionName,
|
||||
);
|
||||
@@ -918,8 +901,9 @@ class MediaContextMenuState extends State<MediaContextMenu> {
|
||||
final currentStarValue = (metadata.userRating != null && metadata.userRating! > 0)
|
||||
? metadata.userRating! / 2.0
|
||||
: 0.0;
|
||||
await showModalBottomSheet(
|
||||
context: context,
|
||||
await OverlaySheetController.showAdaptive(
|
||||
context,
|
||||
showDragHandle: true,
|
||||
builder: (context) => RatingBottomSheet(
|
||||
currentRating: currentStarValue,
|
||||
onRate: (stars) async {
|
||||
@@ -1198,7 +1182,7 @@ class _PlaylistSelectionDialog extends StatelessWidget {
|
||||
// Create new playlist option (always shown first)
|
||||
return ListTile(
|
||||
leading: const AppIcon(Symbols.add_rounded, fill: 1),
|
||||
title: Text(t.playlists.createNewPlaylist),
|
||||
title: Text(t.common.createNew),
|
||||
onTap: () => Navigator.pop(context, '_create_new'),
|
||||
);
|
||||
}
|
||||
@@ -1252,7 +1236,7 @@ class _CollectionSelectionDialog extends StatelessWidget {
|
||||
// Create new collection option (always shown first)
|
||||
return ListTile(
|
||||
leading: const AppIcon(Symbols.add_rounded, fill: 1),
|
||||
title: Text(t.collections.createNewCollection),
|
||||
title: Text(t.common.createNew),
|
||||
onTap: () => Navigator.pop(context, '_create_new'),
|
||||
);
|
||||
}
|
||||
@@ -1311,7 +1295,7 @@ class _FocusableContextMenuSheetState extends State<_FocusableContextMenuSheet>
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
padding: const EdgeInsets.fromLTRB(16, 4, 16, 8),
|
||||
child: Text(
|
||||
widget.title,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
@@ -1328,7 +1312,7 @@ class _FocusableContextMenuSheetState extends State<_FocusableContextMenuSheet>
|
||||
final index = entry.key;
|
||||
final action = entry.value;
|
||||
return FocusableListTile(
|
||||
focusNode: index == 0 ? _initialFocusNode : null,
|
||||
focusNode: index == 0 && widget.focusFirstItem ? _initialFocusNode : null,
|
||||
leading: AppIcon(action.icon, fill: 1),
|
||||
title: Text(action.label),
|
||||
onTap: () => OverlaySheetController.closeAdaptive(context, action.value),
|
||||
|
||||
+138
-37
@@ -1,5 +1,6 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
@@ -60,6 +61,7 @@ class OverlaySheetController {
|
||||
bool barrierDismissible = true,
|
||||
FocusNode? initialFocusNode,
|
||||
Alignment alignment = Alignment.bottomCenter,
|
||||
bool showDragHandle = false,
|
||||
}) {
|
||||
return _state._show<T>(
|
||||
builder: builder,
|
||||
@@ -68,6 +70,7 @@ class OverlaySheetController {
|
||||
barrierDismissible: barrierDismissible,
|
||||
initialFocusNode: initialFocusNode,
|
||||
alignment: alignment,
|
||||
showDragHandle: showDragHandle,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -104,6 +107,7 @@ class OverlaySheetController {
|
||||
bool isScrollControlled = false,
|
||||
FocusNode? initialFocusNode,
|
||||
Alignment alignment = Alignment.bottomCenter,
|
||||
bool showDragHandle = false,
|
||||
}) {
|
||||
final controller = maybeOf(context);
|
||||
if (controller != null) {
|
||||
@@ -114,6 +118,7 @@ class OverlaySheetController {
|
||||
barrierDismissible: barrierDismissible,
|
||||
initialFocusNode: initialFocusNode,
|
||||
alignment: alignment,
|
||||
showDragHandle: showDragHandle,
|
||||
);
|
||||
}
|
||||
return showModalBottomSheet<T>(
|
||||
@@ -193,6 +198,7 @@ class _OverlaySheetHostState extends State<OverlaySheetHost> with SingleTickerPr
|
||||
bool _isOpen = false;
|
||||
bool _isClosing = false;
|
||||
bool _barrierDismissible = true;
|
||||
bool _showDragHandle = false;
|
||||
BoxConstraints? _constraints;
|
||||
Color? _explicitBackgroundColor;
|
||||
Alignment _alignment = Alignment.bottomCenter;
|
||||
@@ -200,6 +206,7 @@ class _OverlaySheetHostState extends State<OverlaySheetHost> with SingleTickerPr
|
||||
// Drag-to-dismiss state
|
||||
double _dragOffset = 0;
|
||||
bool _isDragging = false;
|
||||
final _sheetKey = GlobalKey();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -240,6 +247,7 @@ class _OverlaySheetHostState extends State<OverlaySheetHost> with SingleTickerPr
|
||||
bool barrierDismissible = true,
|
||||
FocusNode? initialFocusNode,
|
||||
Alignment alignment = Alignment.bottomCenter,
|
||||
bool showDragHandle = false,
|
||||
}) {
|
||||
// If already open, close first (instant)
|
||||
if (_isOpen) {
|
||||
@@ -260,6 +268,7 @@ class _OverlaySheetHostState extends State<OverlaySheetHost> with SingleTickerPr
|
||||
_isOpen = true;
|
||||
_isClosing = false;
|
||||
_barrierDismissible = barrierDismissible;
|
||||
_showDragHandle = showDragHandle;
|
||||
_constraints = constraints;
|
||||
_explicitBackgroundColor = backgroundColor;
|
||||
_alignment = alignment;
|
||||
@@ -458,10 +467,28 @@ class _OverlaySheetHostState extends State<OverlaySheetHost> with SingleTickerPr
|
||||
);
|
||||
}
|
||||
|
||||
double _getSheetHeight() {
|
||||
final renderBox = _sheetKey.currentContext?.findRenderObject() as RenderBox?;
|
||||
return renderBox?.size.height ?? 300;
|
||||
}
|
||||
|
||||
void _checkDismiss(double velocity) {
|
||||
final sheetHeight = _getSheetHeight();
|
||||
if (_dragOffset > sheetHeight * 0.25 || velocity > 500) {
|
||||
_close();
|
||||
} else {
|
||||
setState(() {
|
||||
_dragOffset = 0;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildSheet(BuildContext context) {
|
||||
final size = MediaQuery.of(context).size;
|
||||
final isDesktop = size.width > 600;
|
||||
final isTop = _alignment.y < 0;
|
||||
final isTV = PlatformDetector.isTV();
|
||||
final showHandle = _showDragHandle && !isTV && !isTop;
|
||||
|
||||
final effectiveConstraints =
|
||||
_constraints ??
|
||||
@@ -473,6 +500,73 @@ class _OverlaySheetHostState extends State<OverlaySheetHost> with SingleTickerPr
|
||||
? const BorderRadius.vertical(bottom: Radius.circular(16))
|
||||
: const BorderRadius.vertical(top: Radius.circular(16));
|
||||
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
|
||||
Widget content = _pageStack.isNotEmpty ? _pageStack.last.builder(context) : const SizedBox.shrink();
|
||||
|
||||
// Wrap content in NotificationListener for scroll-aware drag-to-dismiss
|
||||
if (showHandle) {
|
||||
content = NotificationListener<ScrollNotification>(
|
||||
onNotification: (notification) {
|
||||
if (notification is OverscrollNotification) {
|
||||
// Android (ClampingScrollPhysics): overscroll fires reliably
|
||||
if (notification.overscroll < 0) {
|
||||
setState(() {
|
||||
_dragOffset += -notification.overscroll;
|
||||
});
|
||||
return true;
|
||||
}
|
||||
} else if (notification is ScrollUpdateNotification) {
|
||||
// iOS (BouncingScrollPhysics): pixels go negative when bouncing past top
|
||||
if (notification.metrics.pixels < 0) {
|
||||
setState(() {
|
||||
_dragOffset = -notification.metrics.pixels;
|
||||
});
|
||||
return true;
|
||||
}
|
||||
// If user scrolled back down from overscroll, reset drag offset
|
||||
if (_dragOffset > 0 && notification.metrics.pixels >= 0) {
|
||||
setState(() {
|
||||
_dragOffset = 0;
|
||||
});
|
||||
}
|
||||
} else if (notification is ScrollEndNotification) {
|
||||
if (_dragOffset > 0) {
|
||||
_checkDismiss(0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
child: content,
|
||||
);
|
||||
}
|
||||
|
||||
// Build the sheet content column (handle + content)
|
||||
Widget sheetContent;
|
||||
if (showHandle) {
|
||||
sheetContent = Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// M3 drag handle: 32x4, rounded, with 12dp top / 4dp bottom margin
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 12, bottom: 4),
|
||||
child: Container(
|
||||
width: 32,
|
||||
height: 4,
|
||||
decoration: BoxDecoration(
|
||||
color: colorScheme.onSurfaceVariant.withValues(alpha: 0.4),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(2)),
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(child: content),
|
||||
],
|
||||
);
|
||||
} else {
|
||||
sheetContent = content;
|
||||
}
|
||||
|
||||
Widget sheet = FocusScope(
|
||||
node: _sheetFocusScopeNode,
|
||||
child: Focus(
|
||||
@@ -492,16 +586,25 @@ class _OverlaySheetHostState extends State<OverlaySheetHost> with SingleTickerPr
|
||||
alignment: _alignment,
|
||||
child: Transform.translate(
|
||||
offset: Offset(0, _dragOffset.clamp(0, double.infinity)),
|
||||
child: Material(
|
||||
color: _explicitBackgroundColor ?? Theme.of(context).colorScheme.surface,
|
||||
borderRadius: borderRadius,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: SafeArea(
|
||||
top: !isTop,
|
||||
bottom: isTop,
|
||||
child: ConstrainedBox(
|
||||
constraints: effectiveConstraints,
|
||||
child: _pageStack.isNotEmpty ? _pageStack.last.builder(context) : const SizedBox.shrink(),
|
||||
child: SafeArea(
|
||||
left: true,
|
||||
right: true,
|
||||
top: false,
|
||||
bottom: false,
|
||||
child: Material(
|
||||
key: _sheetKey,
|
||||
color: _explicitBackgroundColor ?? colorScheme.surface,
|
||||
borderRadius: borderRadius,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: SafeArea(
|
||||
top: isTop,
|
||||
bottom: !isTop,
|
||||
left: false,
|
||||
right: false,
|
||||
child: ConstrainedBox(
|
||||
constraints: effectiveConstraints,
|
||||
child: sheetContent,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -511,33 +614,31 @@ class _OverlaySheetHostState extends State<OverlaySheetHost> with SingleTickerPr
|
||||
),
|
||||
);
|
||||
|
||||
// Swipe-down-to-dismiss (skip on TV and for top-aligned sheets)
|
||||
if (!PlatformDetector.isTV() && !isTop) {
|
||||
sheet = GestureDetector(
|
||||
onVerticalDragStart: (_) {
|
||||
_isDragging = true;
|
||||
_dragOffset = 0;
|
||||
},
|
||||
onVerticalDragUpdate: (details) {
|
||||
if (!_isDragging) return;
|
||||
setState(() {
|
||||
_dragOffset += details.delta.dy;
|
||||
});
|
||||
},
|
||||
onVerticalDragEnd: (details) {
|
||||
if (!_isDragging) return;
|
||||
_isDragging = false;
|
||||
|
||||
final sheetHeight = effectiveConstraints.minHeight;
|
||||
final velocity = details.primaryVelocity ?? 0;
|
||||
|
||||
if (_dragOffset > sheetHeight * 0.25 || velocity > 500) {
|
||||
_close();
|
||||
} else {
|
||||
setState(() {
|
||||
_dragOffset = 0;
|
||||
});
|
||||
}
|
||||
// Swipe-down-to-dismiss on non-scrollable areas (skip on TV and top-aligned)
|
||||
if (showHandle) {
|
||||
sheet = RawGestureDetector(
|
||||
gestures: <Type, GestureRecognizerFactory>{
|
||||
VerticalDragGestureRecognizer: GestureRecognizerFactoryWithHandlers<VerticalDragGestureRecognizer>(
|
||||
() => VerticalDragGestureRecognizer()..onlyAcceptDragOnThreshold = true,
|
||||
(instance) {
|
||||
instance
|
||||
..onStart = (_) {
|
||||
_isDragging = true;
|
||||
_dragOffset = 0;
|
||||
}
|
||||
..onUpdate = (details) {
|
||||
if (!_isDragging) return;
|
||||
setState(() {
|
||||
_dragOffset += details.delta.dy;
|
||||
});
|
||||
}
|
||||
..onEnd = (details) {
|
||||
if (!_isDragging) return;
|
||||
_isDragging = false;
|
||||
_checkDismiss(details.primaryVelocity ?? 0);
|
||||
};
|
||||
},
|
||||
),
|
||||
},
|
||||
child: sheet,
|
||||
);
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import '../widgets/app_icon.dart';
|
||||
import '../widgets/overlay_sheet.dart';
|
||||
import '../focus/dpad_navigator.dart';
|
||||
import '../i18n/strings.g.dart';
|
||||
|
||||
@@ -44,116 +45,105 @@ class _RatingBottomSheetState extends State<RatingBottomSheet> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
return SafeArea(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(24, 16, 24, 24),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
width: 32,
|
||||
height: 4,
|
||||
decoration: BoxDecoration(
|
||||
color: theme.colorScheme.onSurfaceVariant.withValues(alpha: 0.4),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(2)),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
_selectedRating > 0
|
||||
? '${formatRating(_selectedRating)} / 5'
|
||||
: t.mediaMenu.rate,
|
||||
style: theme.textTheme.titleMedium,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Focus(
|
||||
focusNode: _starsFocusNode,
|
||||
autofocus: true,
|
||||
onKeyEvent: _handleStarsKeyEvent,
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final starSize = (constraints.maxWidth / 5).clamp(0.0, 48.0);
|
||||
return GestureDetector(
|
||||
onTapDown: (details) => _handleStarTap(details.localPosition.dx, starSize),
|
||||
onPanUpdate: (details) => _handleStarTap(details.localPosition.dx, starSize),
|
||||
child: AnimatedBuilder(
|
||||
animation: _starsFocusNode,
|
||||
builder: (context, child) {
|
||||
final hasFocus = _starsFocusNode.hasFocus;
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
color: hasFocus
|
||||
? theme.colorScheme.primary.withValues(alpha: 0.12)
|
||||
: null,
|
||||
),
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: List.generate(5, (i) {
|
||||
final starIndex = i + 1;
|
||||
final IconData icon;
|
||||
if (_selectedRating >= starIndex) {
|
||||
icon = Symbols.star_rounded;
|
||||
} else if (_selectedRating >= starIndex - 0.5) {
|
||||
icon = Symbols.star_half_rounded;
|
||||
} else {
|
||||
icon = Symbols.star_rounded;
|
||||
}
|
||||
return SizedBox(
|
||||
width: starSize,
|
||||
height: starSize,
|
||||
child: Center(
|
||||
child: AppIcon(
|
||||
icon,
|
||||
fill: _selectedRating >= starIndex - 0.5 ? 1 : 0,
|
||||
color: _selectedRating >= starIndex - 0.5
|
||||
? Colors.amber
|
||||
: theme.colorScheme.onSurfaceVariant.withValues(alpha: 0.3),
|
||||
size: starSize * 0.8,
|
||||
),
|
||||
return Padding(
|
||||
padding: const EdgeInsets.fromLTRB(24, 4, 24, 24),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
_selectedRating > 0
|
||||
? '${formatRating(_selectedRating)} / 5'
|
||||
: t.mediaMenu.rate,
|
||||
style: theme.textTheme.titleMedium,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Focus(
|
||||
focusNode: _starsFocusNode,
|
||||
autofocus: true,
|
||||
onKeyEvent: _handleStarsKeyEvent,
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final starSize = (constraints.maxWidth / 5).clamp(0.0, 48.0);
|
||||
return GestureDetector(
|
||||
onTapDown: (details) => _handleStarTap(details.localPosition.dx, starSize),
|
||||
onPanUpdate: (details) => _handleStarTap(details.localPosition.dx, starSize),
|
||||
child: AnimatedBuilder(
|
||||
animation: _starsFocusNode,
|
||||
builder: (context, child) {
|
||||
final hasFocus = _starsFocusNode.hasFocus;
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
color: hasFocus
|
||||
? theme.colorScheme.primary.withValues(alpha: 0.12)
|
||||
: null,
|
||||
),
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: List.generate(5, (i) {
|
||||
final starIndex = i + 1;
|
||||
final IconData icon;
|
||||
if (_selectedRating >= starIndex) {
|
||||
icon = Symbols.star_rounded;
|
||||
} else if (_selectedRating >= starIndex - 0.5) {
|
||||
icon = Symbols.star_half_rounded;
|
||||
} else {
|
||||
icon = Symbols.star_rounded;
|
||||
}
|
||||
return SizedBox(
|
||||
width: starSize,
|
||||
height: starSize,
|
||||
child: Center(
|
||||
child: AppIcon(
|
||||
icon,
|
||||
fill: _selectedRating >= starIndex - 0.5 ? 1 : 0,
|
||||
color: _selectedRating >= starIndex - 0.5
|
||||
? Colors.amber
|
||||
: theme.colorScheme.onSurfaceVariant.withValues(alpha: 0.3),
|
||||
size: starSize * 0.8,
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Row(
|
||||
children: [
|
||||
if (widget.currentRating > 0)
|
||||
Expanded(
|
||||
child: OutlinedButton(
|
||||
onPressed: () {
|
||||
widget.onClear();
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text(t.common.clear),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
if (widget.currentRating > 0) const SizedBox(width: 12),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Row(
|
||||
children: [
|
||||
if (widget.currentRating > 0)
|
||||
Expanded(
|
||||
child: FilledButton(
|
||||
onPressed: _selectedRating > 0
|
||||
? () {
|
||||
widget.onRate(_selectedRating);
|
||||
Navigator.pop(context);
|
||||
}
|
||||
: null,
|
||||
child: Text(t.mediaMenu.rate),
|
||||
child: OutlinedButton(
|
||||
onPressed: () {
|
||||
widget.onClear();
|
||||
OverlaySheetController.closeAdaptive(context);
|
||||
},
|
||||
child: Text(t.common.clear),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
if (widget.currentRating > 0) const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: FilledButton(
|
||||
onPressed: _selectedRating > 0
|
||||
? () {
|
||||
widget.onRate(_selectedRating);
|
||||
OverlaySheetController.closeAdaptive(context);
|
||||
}
|
||||
: null,
|
||||
child: Text(t.mediaMenu.rate),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -177,7 +167,7 @@ class _RatingBottomSheetState extends State<RatingBottomSheet> {
|
||||
if (key == LogicalKeyboardKey.select || key == LogicalKeyboardKey.enter) {
|
||||
if (_selectedRating > 0) {
|
||||
widget.onRate(_selectedRating);
|
||||
Navigator.pop(context);
|
||||
OverlaySheetController.closeAdaptive(context);
|
||||
}
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
@@ -96,6 +96,9 @@ class DesktopVideoControls extends StatefulWidget {
|
||||
/// Called to toggle ambient lighting (passed to settings sheet)
|
||||
final VoidCallback? onToggleAmbientLighting;
|
||||
|
||||
/// Whether subtitles are currently visible (false = hidden via sub-visibility toggle)
|
||||
final bool subtitlesVisible;
|
||||
|
||||
/// Whether to show the queue button
|
||||
final bool showQueueButton;
|
||||
|
||||
@@ -151,6 +154,7 @@ class DesktopVideoControls extends StatefulWidget {
|
||||
this.liveChannelName,
|
||||
this.isAmbientLightingEnabled = false,
|
||||
this.onToggleAmbientLighting,
|
||||
this.subtitlesVisible = true,
|
||||
this.showQueueButton = false,
|
||||
this.onQueueItemSelected,
|
||||
});
|
||||
@@ -633,7 +637,7 @@ class DesktopVideoControlsState extends State<DesktopVideoControls> {
|
||||
final rate = rateSnap.data ?? 1.0;
|
||||
if (remaining.inSeconds <= 0) return const SizedBox.shrink();
|
||||
|
||||
final text = t.videoControls.endsAt(time: formatFinishTime(remaining, rate: rate));
|
||||
final text = t.videoControls.endsAt(time: formatFinishTime(remaining, rate: rate, is24Hour: MediaQuery.alwaysUse24HourFormatOf(context)));
|
||||
const style = TextStyle(color: Colors.white70, fontSize: 13);
|
||||
|
||||
return LayoutBuilder(
|
||||
@@ -681,7 +685,7 @@ class DesktopVideoControlsState extends State<DesktopVideoControls> {
|
||||
isFullscreen: widget.isFullscreen,
|
||||
isAlwaysOnTop: widget.isAlwaysOnTop,
|
||||
serverId: widget.serverId,
|
||||
onTogglePIPMode: null, // PIP not supported on desktop
|
||||
onTogglePIPMode: widget.onTogglePIPMode,
|
||||
onCycleBoxFitMode: widget.onCycleBoxFitMode,
|
||||
onToggleFullscreen: widget.onToggleFullscreen,
|
||||
onToggleAlwaysOnTop: widget.onToggleAlwaysOnTop,
|
||||
@@ -697,6 +701,7 @@ class DesktopVideoControlsState extends State<DesktopVideoControls> {
|
||||
onNavigateLeft: navigateFromTrackToVolume,
|
||||
canControl: widget.canControl,
|
||||
isLive: widget.isLive,
|
||||
subtitlesVisible: widget.subtitlesVisible,
|
||||
showQueueButton: widget.showQueueButton,
|
||||
onQueueItemSelected: widget.onQueueItemSelected,
|
||||
shaderService: widget.shaderService,
|
||||
|
||||
@@ -9,6 +9,7 @@ import '../../models/plex_metadata.dart';
|
||||
import '../../utils/desktop_window_padding.dart';
|
||||
import '../../i18n/strings.g.dart';
|
||||
import 'widgets/circular_control_button.dart';
|
||||
import 'widgets/content_strip.dart';
|
||||
import 'widgets/first_frame_guard.dart';
|
||||
import 'widgets/play_pause_stream_builder.dart';
|
||||
import 'widgets/video_controls_header.dart';
|
||||
@@ -20,7 +21,11 @@ import 'widgets/video_timeline_bar.dart';
|
||||
/// - Top bar: Back button, title, and track/chapter controls
|
||||
/// - Center: Large playback controls (seek backward, play/pause, seek forward)
|
||||
/// - Bottom bar: Timeline slider with chapter markers and timestamps
|
||||
class MobileVideoControls extends StatelessWidget {
|
||||
///
|
||||
/// When chapters or queue are available, the user can swipe up on the bottom
|
||||
/// area to slide a content strip into view. The playback controls and timeline
|
||||
/// fade out while the strip slides up — only the top bar stays fixed.
|
||||
class MobileVideoControls extends StatefulWidget {
|
||||
final Player player;
|
||||
final PlexMetadata metadata;
|
||||
final List<PlexChapter> chapters;
|
||||
@@ -54,6 +59,21 @@ class MobileVideoControls extends StatelessWidget {
|
||||
/// Channel name for live TV display
|
||||
final String? liveChannelName;
|
||||
|
||||
/// Server ID for chapter thumbnails in the content strip
|
||||
final String? serverId;
|
||||
|
||||
/// Whether to show the queue tab in the content strip
|
||||
final bool showQueueTab;
|
||||
|
||||
/// Callback when a queue item is selected from the content strip
|
||||
final Function(PlexMetadata)? onQueueItemSelected;
|
||||
|
||||
/// Notifier for controls visibility (used to reset strip on hide)
|
||||
final ValueNotifier<bool>? controlsVisible;
|
||||
|
||||
/// Called when the content strip visibility changes
|
||||
final ValueChanged<bool>? onStripVisibilityChanged;
|
||||
|
||||
const MobileVideoControls({
|
||||
super.key,
|
||||
required this.player,
|
||||
@@ -78,20 +98,183 @@ class MobileVideoControls extends StatelessWidget {
|
||||
this.thumbnailDataBuilder,
|
||||
this.isLive = false,
|
||||
this.liveChannelName,
|
||||
this.serverId,
|
||||
this.showQueueTab = false,
|
||||
this.onQueueItemSelected,
|
||||
this.controlsVisible,
|
||||
this.onStripVisibilityChanged,
|
||||
});
|
||||
|
||||
@override
|
||||
State<MobileVideoControls> createState() => _MobileVideoControlsState();
|
||||
}
|
||||
|
||||
class _MobileVideoControlsState extends State<MobileVideoControls>
|
||||
with SingleTickerProviderStateMixin {
|
||||
late final AnimationController _stripAnim;
|
||||
bool _stripVisible = false;
|
||||
|
||||
/// Drag distance (in pixels) required to fully reveal the strip.
|
||||
static const _dragExtent = 150.0;
|
||||
|
||||
bool get _hasStripContent =>
|
||||
widget.chapters.isNotEmpty || (widget.showQueueTab && widget.onQueueItemSelected != null);
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_stripAnim = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(milliseconds: 250),
|
||||
);
|
||||
_stripAnim.addListener(_onStripAnimChanged);
|
||||
widget.controlsVisible?.addListener(_onControlsVisibilityChanged);
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(MobileVideoControls oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
if (oldWidget.controlsVisible != widget.controlsVisible) {
|
||||
oldWidget.controlsVisible?.removeListener(_onControlsVisibilityChanged);
|
||||
widget.controlsVisible?.addListener(_onControlsVisibilityChanged);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
widget.controlsVisible?.removeListener(_onControlsVisibilityChanged);
|
||||
_stripAnim.removeListener(_onStripAnimChanged);
|
||||
_stripAnim.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void _onStripAnimChanged() {
|
||||
final visible = _stripAnim.value > 0.5;
|
||||
if (visible != _stripVisible) {
|
||||
_stripVisible = visible;
|
||||
widget.onStripVisibilityChanged?.call(visible);
|
||||
}
|
||||
}
|
||||
|
||||
void _onControlsVisibilityChanged() {
|
||||
if (widget.controlsVisible?.value == false && _stripVisible) {
|
||||
// Just notify parent that strip is no longer active — don't animate,
|
||||
// let the overlay fade out with the strip still showing.
|
||||
_stripVisible = false;
|
||||
widget.onStripVisibilityChanged?.call(false);
|
||||
} else if (widget.controlsVisible?.value == true && _stripAnim.value > 0) {
|
||||
// Reset strip when controls reappear so page 0 is shown.
|
||||
_stripAnim.value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void _onVerticalDragUpdate(DragUpdateDetails details) {
|
||||
// Negative primaryDelta = swipe up = reveal strip (increase value)
|
||||
_stripAnim.value -= (details.primaryDelta ?? 0) / _dragExtent;
|
||||
}
|
||||
|
||||
void _onVerticalDragEnd(DragEndDetails details) {
|
||||
final velocity = details.primaryVelocity ?? 0;
|
||||
// Fast swipe up or past halfway without fast swipe down → show strip
|
||||
if (velocity < -200 || (_stripAnim.value > 0.5 && velocity < 200)) {
|
||||
_stripAnim.forward();
|
||||
} else {
|
||||
_stripAnim.reverse();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (!_hasStripContent) {
|
||||
return Column(
|
||||
children: [
|
||||
_buildTopBar(context),
|
||||
const Spacer(),
|
||||
_buildPlaybackControls(context),
|
||||
const Spacer(),
|
||||
_buildBottomBar(context),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// Top bar stays fixed. Everything below it is a Stack where the controls
|
||||
// fade out and the content strip slides up from the bottom on swipe.
|
||||
return Column(
|
||||
children: [
|
||||
// Top bar with back button and track/chapter controls
|
||||
_buildTopBar(context),
|
||||
const Spacer(),
|
||||
// Centered large playback controls
|
||||
_buildPlaybackControls(context),
|
||||
const Spacer(),
|
||||
// Progress bar at bottom
|
||||
_buildBottomBar(context),
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onVerticalDragUpdate: _onVerticalDragUpdate,
|
||||
onVerticalDragEnd: _onVerticalDragEnd,
|
||||
behavior: HitTestBehavior.translucent,
|
||||
child: ListenableBuilder(
|
||||
listenable: _stripAnim,
|
||||
builder: (context, _) {
|
||||
final t = _stripAnim.value;
|
||||
return Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
// Normal controls — fade out as strip appears
|
||||
Positioned.fill(
|
||||
child: IgnorePointer(
|
||||
ignoring: t > 0.5,
|
||||
child: Opacity(
|
||||
opacity: (1 - t * 2).clamp(0.0, 1.0),
|
||||
child: Stack(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
const Spacer(),
|
||||
_buildPlaybackControls(context),
|
||||
const Spacer(),
|
||||
_buildBottomBar(context),
|
||||
],
|
||||
),
|
||||
const Positioned(
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 12,
|
||||
child: Icon(Symbols.keyboard_arrow_up_rounded, color: Colors.white24, size: 24),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// Content strip — slides up from below the bottom edge
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: FractionalTranslation(
|
||||
translation: Offset(0, 1 - t),
|
||||
child: IgnorePointer(
|
||||
ignoring: t < 0.5,
|
||||
child: Opacity(
|
||||
opacity: (t * 2).clamp(0.0, 1.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(Symbols.keyboard_arrow_down_rounded, color: Colors.white38, size: 20),
|
||||
const SizedBox(height: 4),
|
||||
ContentStrip(
|
||||
player: widget.player,
|
||||
chapters: widget.chapters,
|
||||
chaptersLoaded: widget.chaptersLoaded,
|
||||
serverId: widget.serverId,
|
||||
showQueueTab: widget.showQueueTab,
|
||||
onQueueItemSelected: widget.onQueueItemSelected,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -103,10 +286,10 @@ class MobileVideoControls extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: VideoControlsHeader(
|
||||
metadata: metadata,
|
||||
metadata: widget.metadata,
|
||||
style: VideoHeaderStyle.multiLine,
|
||||
trailing: trackChapterControls,
|
||||
onBack: onBack,
|
||||
trailing: widget.trackChapterControls,
|
||||
onBack: widget.onBack,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -116,29 +299,29 @@ class MobileVideoControls extends StatelessWidget {
|
||||
|
||||
Widget _buildPlaybackControls(BuildContext _) {
|
||||
// Hide all playback controls in host-only mode for non-host
|
||||
if (!canControl) {
|
||||
if (!widget.canControl) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return FirstFrameGuard(hasFirstFrame: hasFirstFrame, builder: (context) => _buildPlaybackControlsContent(context));
|
||||
return FirstFrameGuard(hasFirstFrame: widget.hasFirstFrame, builder: (context) => _buildPlaybackControlsContent(context));
|
||||
}
|
||||
|
||||
Widget _buildPlaybackControlsContent(BuildContext _) {
|
||||
final hasChapters = !isLive && chaptersLoaded && chapters.isNotEmpty;
|
||||
final hasChapters = !widget.isLive && widget.chaptersLoaded && widget.chapters.isNotEmpty;
|
||||
|
||||
return PlayPauseStreamBuilder(
|
||||
player: player,
|
||||
player: widget.player,
|
||||
builder: (context, isPlaying) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
if (!isLive) ...[
|
||||
if (!widget.isLive) ...[
|
||||
if (hasChapters) ...[
|
||||
CircularControlButton(
|
||||
semanticLabel: t.videoControls.previousChapterButton,
|
||||
icon: Symbols.fast_rewind_rounded,
|
||||
iconSize: 32,
|
||||
onPressed: onSeekToPreviousChapter,
|
||||
onPressed: widget.onSeekToPreviousChapter,
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
],
|
||||
@@ -147,7 +330,7 @@ class MobileVideoControls extends StatelessWidget {
|
||||
semanticLabel: t.videoControls.previousButton,
|
||||
icon: Symbols.skip_previous_rounded,
|
||||
iconSize: 48,
|
||||
onPressed: onPrevious,
|
||||
onPressed: widget.onPrevious,
|
||||
),
|
||||
const SizedBox(width: 24),
|
||||
],
|
||||
@@ -157,22 +340,22 @@ class MobileVideoControls extends StatelessWidget {
|
||||
iconSize: 72,
|
||||
onPressed: () {
|
||||
if (isPlaying) {
|
||||
player.pause();
|
||||
onCancelAutoHide?.call(); // Cancel auto-hide when paused
|
||||
widget.player.pause();
|
||||
widget.onCancelAutoHide?.call(); // Cancel auto-hide when paused
|
||||
} else {
|
||||
player.play();
|
||||
onStartAutoHide?.call(); // Start auto-hide when playing
|
||||
widget.player.play();
|
||||
widget.onStartAutoHide?.call(); // Start auto-hide when playing
|
||||
}
|
||||
},
|
||||
),
|
||||
if (!isLive) ...[
|
||||
if (!widget.isLive) ...[
|
||||
const SizedBox(width: 24),
|
||||
// Next episode button (greyed out when unavailable)
|
||||
CircularControlButton(
|
||||
semanticLabel: t.videoControls.nextButton,
|
||||
icon: Symbols.skip_next_rounded,
|
||||
iconSize: 48,
|
||||
onPressed: onNext,
|
||||
onPressed: widget.onNext,
|
||||
),
|
||||
if (hasChapters) ...[
|
||||
const SizedBox(width: 16),
|
||||
@@ -180,7 +363,7 @@ class MobileVideoControls extends StatelessWidget {
|
||||
semanticLabel: t.videoControls.nextChapterButton,
|
||||
icon: Symbols.fast_forward_rounded,
|
||||
iconSize: 32,
|
||||
onPressed: onSeekToNextChapter,
|
||||
onPressed: widget.onSeekToNextChapter,
|
||||
),
|
||||
],
|
||||
],
|
||||
@@ -191,7 +374,7 @@ class MobileVideoControls extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildBottomBar(BuildContext _) {
|
||||
if (isLive) {
|
||||
if (widget.isLive) {
|
||||
// For live TV, show channel name instead of timeline
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
@@ -209,7 +392,7 @@ class MobileVideoControls extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
return FirstFrameGuard(hasFirstFrame: hasFirstFrame, builder: (context) => _buildBottomBarContent(context));
|
||||
return FirstFrameGuard(hasFirstFrame: widget.hasFirstFrame, builder: (context) => _buildBottomBarContent(context));
|
||||
}
|
||||
|
||||
Widget _buildBottomBarContent(BuildContext context) {
|
||||
@@ -219,15 +402,15 @@ class MobileVideoControls extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: VideoTimelineBar(
|
||||
player: player,
|
||||
chapters: chapters,
|
||||
chaptersLoaded: chaptersLoaded,
|
||||
onSeek: onSeek,
|
||||
onSeekEnd: onSeekEnd,
|
||||
player: widget.player,
|
||||
chapters: widget.chapters,
|
||||
chaptersLoaded: widget.chaptersLoaded,
|
||||
onSeek: widget.onSeek,
|
||||
onSeekEnd: widget.onSeekEnd,
|
||||
horizontalLayout: false,
|
||||
enabled: canControl,
|
||||
enabled: widget.canControl,
|
||||
showFinishTime: true,
|
||||
thumbnailDataBuilder: thumbnailDataBuilder,
|
||||
thumbnailDataBuilder: widget.thumbnailDataBuilder,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
import '../../../mpv/mpv.dart';
|
||||
import '../../../i18n/strings.g.dart';
|
||||
import '../../../utils/track_label_builder.dart';
|
||||
import 'track_selection_sheet.dart';
|
||||
|
||||
/// Bottom sheet for selecting audio tracks
|
||||
class AudioTrackSheet extends StatelessWidget {
|
||||
final Player player;
|
||||
final Function(AudioTrack)? onTrackChanged;
|
||||
|
||||
const AudioTrackSheet({
|
||||
super.key,
|
||||
required this.player,
|
||||
this.onTrackChanged,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TrackSelectionSheet<AudioTrack>(
|
||||
player: player,
|
||||
title: t.videoControls.audioLabel,
|
||||
icon: Symbols.audiotrack_rounded,
|
||||
extractTracks: (tracks) => tracks?.audio ?? [],
|
||||
getCurrentTrack: (track) => track.audio,
|
||||
buildLabel: (audioTrack, index) => TrackLabelBuilder.buildAudioLabel(
|
||||
title: audioTrack.title,
|
||||
language: audioTrack.language,
|
||||
codec: audioTrack.codec,
|
||||
channelsCount: audioTrack.channelsCount,
|
||||
index: index,
|
||||
),
|
||||
setTrack: (track) => player.selectAudioTrack(track),
|
||||
onTrackChanged: onTrackChanged,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -47,8 +47,6 @@ class BaseVideoControlSheet extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
return SafeArea(
|
||||
child: SizedBox(height: MediaQuery.of(context).size.height * 0.75, child: content),
|
||||
);
|
||||
return SizedBox(height: MediaQuery.of(context).size.height * 0.75, child: content);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
import '../../../mpv/mpv.dart';
|
||||
import '../../../i18n/strings.g.dart';
|
||||
import '../../../utils/track_label_builder.dart';
|
||||
import 'track_selection_sheet.dart';
|
||||
|
||||
/// Bottom sheet for selecting subtitle tracks
|
||||
class SubtitleTrackSheet extends StatelessWidget {
|
||||
final Player player;
|
||||
final Function(SubtitleTrack)? onTrackChanged;
|
||||
|
||||
const SubtitleTrackSheet({
|
||||
super.key,
|
||||
required this.player,
|
||||
this.onTrackChanged,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TrackSelectionSheet<SubtitleTrack>(
|
||||
player: player,
|
||||
title: t.videoControls.subtitlesLabel,
|
||||
icon: Symbols.subtitles_rounded,
|
||||
extractTracks: (tracks) => tracks?.subtitle ?? [],
|
||||
getCurrentTrack: (track) => track.subtitle,
|
||||
buildLabel: (subtitle, index) => TrackLabelBuilder.buildSubtitleLabel(
|
||||
title: subtitle.title,
|
||||
language: subtitle.language,
|
||||
codec: subtitle.codec,
|
||||
index: index,
|
||||
),
|
||||
setTrack: (track) => player.selectSubtitleTrack(track),
|
||||
onTrackChanged: onTrackChanged,
|
||||
showOffOption: true,
|
||||
createOffTrack: () => SubtitleTrack.off,
|
||||
isOffTrack: (track) => track.id == 'no',
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../mpv/mpv.dart';
|
||||
import '../../../widgets/overlay_sheet.dart';
|
||||
import 'base_video_control_sheet.dart';
|
||||
import '../helpers/track_filter_helper.dart';
|
||||
import '../helpers/track_selection_helper.dart';
|
||||
|
||||
/// Generic track selection sheet for audio and subtitle tracks
|
||||
///
|
||||
/// Type parameter [T] should be either [AudioTrack] or [SubtitleTrack]
|
||||
class TrackSelectionSheet<T> extends StatefulWidget {
|
||||
final Player player;
|
||||
final String title;
|
||||
final IconData icon;
|
||||
final List<T> Function(Tracks?) extractTracks;
|
||||
final T? Function(TrackSelection) getCurrentTrack;
|
||||
final String Function(T track, int index) buildLabel;
|
||||
final void Function(T track) setTrack;
|
||||
final Function(T)? onTrackChanged;
|
||||
final bool showOffOption;
|
||||
final T Function()? createOffTrack;
|
||||
final bool Function(T track)? isOffTrack;
|
||||
|
||||
const TrackSelectionSheet({
|
||||
super.key,
|
||||
required this.player,
|
||||
required this.title,
|
||||
required this.icon,
|
||||
required this.extractTracks,
|
||||
required this.getCurrentTrack,
|
||||
required this.buildLabel,
|
||||
required this.setTrack,
|
||||
this.onTrackChanged,
|
||||
this.showOffOption = false,
|
||||
this.createOffTrack,
|
||||
this.isOffTrack,
|
||||
});
|
||||
|
||||
@override
|
||||
State<TrackSelectionSheet<T>> createState() => _TrackSelectionSheetState<T>();
|
||||
}
|
||||
|
||||
class _TrackSelectionSheetState<T> extends State<TrackSelectionSheet<T>> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return StreamBuilder<Tracks>(
|
||||
stream: widget.player.streams.tracks,
|
||||
initialData: widget.player.state.tracks,
|
||||
builder: (context, snapshot) {
|
||||
final tracks = snapshot.data;
|
||||
final availableTracks = TrackFilterHelper.extractAndFilterTracks<T>(tracks, widget.extractTracks);
|
||||
|
||||
final sheetChild = availableTracks.isEmpty
|
||||
? TrackSelectionHelper.buildEmptyState<T>()
|
||||
: _buildTrackList(availableTracks);
|
||||
|
||||
return BaseVideoControlSheet(title: widget.title, icon: widget.icon, child: sheetChild);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildTrackList(List<T> availableTracks) {
|
||||
return StreamBuilder<TrackSelection>(
|
||||
stream: widget.player.streams.track,
|
||||
initialData: widget.player.state.track,
|
||||
builder: (context, selectedSnapshot) {
|
||||
final currentTrack = selectedSnapshot.data ?? widget.player.state.track;
|
||||
final selectedTrack = widget.getCurrentTrack(currentTrack);
|
||||
final isOffSelected = TrackSelectionHelper.isOffSelected(selectedTrack, widget.isOffTrack);
|
||||
final itemCount = availableTracks.length + (widget.showOffOption ? 1 : 0);
|
||||
|
||||
return ListView.builder(
|
||||
itemCount: itemCount,
|
||||
itemBuilder: (context, index) {
|
||||
if (widget.showOffOption && index == 0) {
|
||||
return _buildOffTile(isOffSelected);
|
||||
}
|
||||
|
||||
final trackIndex = widget.showOffOption ? index - 1 : index;
|
||||
final track = availableTracks[trackIndex];
|
||||
final trackId = TrackSelectionHelper.getTrackId(track);
|
||||
final selectedId = selectedTrack == null ? '' : TrackSelectionHelper.getTrackId(selectedTrack);
|
||||
return TrackSelectionHelper.buildTrackTile<T>(
|
||||
label: widget.buildLabel(track, trackIndex),
|
||||
isSelected: trackId == selectedId,
|
||||
onTap: () {
|
||||
widget.setTrack(track);
|
||||
widget.onTrackChanged?.call(track);
|
||||
OverlaySheetController.of(context).close();
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildOffTile(bool isOffSelected) {
|
||||
return TrackSelectionHelper.buildOffTile<T>(
|
||||
isSelected: isOffSelected,
|
||||
onTap: () {
|
||||
if (widget.createOffTrack != null) {
|
||||
final offTrack = widget.createOffTrack!();
|
||||
widget.setTrack(offTrack);
|
||||
widget.onTrackChanged?.call(offTrack);
|
||||
}
|
||||
OverlaySheetController.of(context).close();
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,256 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
|
||||
import '../../../mpv/mpv.dart';
|
||||
import '../../../i18n/strings.g.dart';
|
||||
import '../../../utils/track_label_builder.dart';
|
||||
import '../../../widgets/overlay_sheet.dart';
|
||||
import 'base_video_control_sheet.dart';
|
||||
import '../helpers/track_filter_helper.dart';
|
||||
import '../helpers/track_selection_helper.dart';
|
||||
|
||||
/// Combined bottom sheet for selecting audio and subtitle tracks side-by-side.
|
||||
class TrackSheet extends StatelessWidget {
|
||||
final Player player;
|
||||
final Function(AudioTrack)? onAudioTrackChanged;
|
||||
final Function(SubtitleTrack)? onSubtitleTrackChanged;
|
||||
|
||||
const TrackSheet({
|
||||
super.key,
|
||||
required this.player,
|
||||
this.onAudioTrackChanged,
|
||||
this.onSubtitleTrackChanged,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return StreamBuilder<Tracks>(
|
||||
stream: player.streams.tracks,
|
||||
initialData: player.state.tracks,
|
||||
builder: (context, tracksSnapshot) {
|
||||
final tracks = tracksSnapshot.data;
|
||||
final audioTracks = TrackFilterHelper.extractAndFilterTracks<AudioTrack>(
|
||||
tracks,
|
||||
(t) => t?.audio ?? [],
|
||||
);
|
||||
final subtitleTracks = TrackFilterHelper.extractAndFilterTracks<SubtitleTrack>(
|
||||
tracks,
|
||||
(t) => t?.subtitle ?? [],
|
||||
);
|
||||
|
||||
final showAudio = audioTracks.length > 1;
|
||||
final showSubtitles = subtitleTracks.isNotEmpty;
|
||||
|
||||
// Determine title/icon based on what's shown
|
||||
final String title;
|
||||
final IconData icon;
|
||||
if (showAudio && showSubtitles) {
|
||||
title = t.videoControls.tracksButton;
|
||||
icon = Symbols.subtitles_rounded;
|
||||
} else if (showAudio) {
|
||||
title = t.videoControls.audioLabel;
|
||||
icon = Symbols.audiotrack_rounded;
|
||||
} else {
|
||||
title = t.videoControls.subtitlesLabel;
|
||||
icon = Symbols.subtitles_rounded;
|
||||
}
|
||||
|
||||
return BaseVideoControlSheet(
|
||||
title: title,
|
||||
icon: icon,
|
||||
child: StreamBuilder<TrackSelection>(
|
||||
stream: player.streams.track,
|
||||
initialData: player.state.track,
|
||||
builder: (context, selSnapshot) {
|
||||
final selection = selSnapshot.data ?? player.state.track;
|
||||
|
||||
if (showAudio && showSubtitles) {
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: FocusTraversalGroup(
|
||||
child: _AudioColumn(
|
||||
tracks: audioTracks,
|
||||
selection: selection,
|
||||
player: player,
|
||||
onTrackChanged: onAudioTrackChanged,
|
||||
showHeader: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
VerticalDivider(width: 1, color: Theme.of(context).dividerColor),
|
||||
Expanded(
|
||||
child: FocusTraversalGroup(
|
||||
child: _SubtitleColumn(
|
||||
tracks: subtitleTracks,
|
||||
selection: selection,
|
||||
player: player,
|
||||
onTrackChanged: onSubtitleTrackChanged,
|
||||
showHeader: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
if (showAudio) {
|
||||
return _AudioColumn(
|
||||
tracks: audioTracks,
|
||||
selection: selection,
|
||||
player: player,
|
||||
onTrackChanged: onAudioTrackChanged,
|
||||
showHeader: false,
|
||||
);
|
||||
}
|
||||
|
||||
return _SubtitleColumn(
|
||||
tracks: subtitleTracks,
|
||||
selection: selection,
|
||||
player: player,
|
||||
onTrackChanged: onSubtitleTrackChanged,
|
||||
showHeader: false,
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _AudioColumn extends StatelessWidget {
|
||||
final List<AudioTrack> tracks;
|
||||
final TrackSelection selection;
|
||||
final Player player;
|
||||
final Function(AudioTrack)? onTrackChanged;
|
||||
final bool showHeader;
|
||||
|
||||
const _AudioColumn({
|
||||
required this.tracks,
|
||||
required this.selection,
|
||||
required this.player,
|
||||
this.onTrackChanged,
|
||||
required this.showHeader,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final selectedId = selection.audio?.id ?? '';
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
if (showHeader) _ColumnHeader(label: t.videoControls.audioLabel),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: tracks.length,
|
||||
itemBuilder: (context, index) {
|
||||
final track = tracks[index];
|
||||
final label = TrackLabelBuilder.buildAudioLabel(
|
||||
title: track.title,
|
||||
language: track.language,
|
||||
codec: track.codec,
|
||||
channelsCount: track.channelsCount,
|
||||
index: index,
|
||||
);
|
||||
return TrackSelectionHelper.buildTrackTile<AudioTrack>(
|
||||
label: label,
|
||||
isSelected: track.id == selectedId,
|
||||
onTap: () {
|
||||
player.selectAudioTrack(track);
|
||||
onTrackChanged?.call(track);
|
||||
OverlaySheetController.of(context).close();
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _SubtitleColumn extends StatelessWidget {
|
||||
final List<SubtitleTrack> tracks;
|
||||
final TrackSelection selection;
|
||||
final Player player;
|
||||
final Function(SubtitleTrack)? onTrackChanged;
|
||||
final bool showHeader;
|
||||
|
||||
const _SubtitleColumn({
|
||||
required this.tracks,
|
||||
required this.selection,
|
||||
required this.player,
|
||||
this.onTrackChanged,
|
||||
required this.showHeader,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final selectedSub = selection.subtitle;
|
||||
final isOffSelected = selectedSub == null || selectedSub.id == 'no';
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
if (showHeader) _ColumnHeader(label: t.videoControls.subtitlesLabel),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: tracks.length + 1, // +1 for "Off"
|
||||
itemBuilder: (context, index) {
|
||||
if (index == 0) {
|
||||
return TrackSelectionHelper.buildOffTile<SubtitleTrack>(
|
||||
isSelected: isOffSelected,
|
||||
onTap: () {
|
||||
player.selectSubtitleTrack(SubtitleTrack.off);
|
||||
onTrackChanged?.call(SubtitleTrack.off);
|
||||
OverlaySheetController.of(context).close();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
final track = tracks[index - 1];
|
||||
final label = TrackLabelBuilder.buildSubtitleLabel(
|
||||
title: track.title,
|
||||
language: track.language,
|
||||
codec: track.codec,
|
||||
index: index - 1,
|
||||
);
|
||||
return TrackSelectionHelper.buildTrackTile<SubtitleTrack>(
|
||||
label: label,
|
||||
isSelected: !isOffSelected && track.id == selectedSub.id,
|
||||
onTap: () {
|
||||
player.selectSubtitleTrack(track);
|
||||
onTrackChanged?.call(track);
|
||||
OverlaySheetController.of(context).close();
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _ColumnHeader extends StatelessWidget {
|
||||
final String label;
|
||||
|
||||
const _ColumnHeader({required this.label});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
label,
|
||||
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -198,6 +198,7 @@ class PlexVideoControls extends StatefulWidget {
|
||||
|
||||
class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListener, WidgetsBindingObserver {
|
||||
bool _showControls = true;
|
||||
bool _forceShowControls = false;
|
||||
List<PlexChapter> _chapters = [];
|
||||
bool _chaptersLoaded = false;
|
||||
Timer? _hideTimer;
|
||||
@@ -210,6 +211,7 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
int _subtitleSyncOffset = 0; // Default, loaded from settings
|
||||
bool _isRotationLocked = true; // Default locked (landscape only)
|
||||
bool _clickVideoTogglesPlayback = false; // Default, loaded from settings
|
||||
bool _isContentStripVisible = false; // Whether the swipe-up content strip is showing
|
||||
|
||||
// GlobalKey to access DesktopVideoControls state for focus management
|
||||
final GlobalKey<DesktopVideoControlsState> _desktopControlsKey = GlobalKey<DesktopVideoControlsState>();
|
||||
@@ -255,6 +257,8 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
bool _showPerformanceOverlay = false;
|
||||
// Long-press 2x speed state
|
||||
bool _isLongPressing = false;
|
||||
// Subtitle visibility toggle state
|
||||
bool _subtitlesVisible = true;
|
||||
// Skip marker button focus node (for TV D-pad navigation)
|
||||
late final FocusNode _skipMarkerFocusNode;
|
||||
double? _rateBeforeLongPress;
|
||||
@@ -296,6 +300,10 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
widget.hasFirstFrame?.addListener(_onFirstFrameReady);
|
||||
// Listen for external requests to show controls (e.g. screen-level focus recovery)
|
||||
widget.controlsVisible?.addListener(_onControlsVisibleExternal);
|
||||
// On macOS, show controls and disable auto-hide when PiP activates
|
||||
if (Platform.isMacOS) {
|
||||
_pipService.isPipActive.addListener(_onMacPipChanged);
|
||||
}
|
||||
|
||||
// Defer context-dependent initialization to after first build
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
@@ -546,8 +554,28 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
}
|
||||
}
|
||||
|
||||
// ignore: no-empty-block - stub for future subtitle toggle implementation
|
||||
void _toggleSubtitles() {}
|
||||
void _toggleSubtitles() {
|
||||
final currentTrack = widget.player.state.track.subtitle;
|
||||
// No-op if no subtitle track is selected
|
||||
if (currentTrack == null || currentTrack.id == 'no') return;
|
||||
|
||||
final newVisible = !_subtitlesVisible;
|
||||
widget.player.setProperty('sub-visibility', newVisible ? 'yes' : 'no');
|
||||
setState(() {
|
||||
_subtitlesVisible = newVisible;
|
||||
});
|
||||
}
|
||||
|
||||
void _onSubtitleTrackChanged(SubtitleTrack track) {
|
||||
// Reset visibility when user explicitly picks a new subtitle track
|
||||
if (track.id != 'no' && !_subtitlesVisible) {
|
||||
widget.player.setProperty('sub-visibility', 'yes');
|
||||
setState(() {
|
||||
_subtitlesVisible = true;
|
||||
});
|
||||
}
|
||||
widget.onSubtitleTrackChanged?.call(track);
|
||||
}
|
||||
|
||||
void _toggleShader() {
|
||||
final shaderService = widget.shaderService;
|
||||
@@ -621,6 +649,9 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) {
|
||||
windowManager.removeListener(this);
|
||||
}
|
||||
if (Platform.isMacOS) {
|
||||
_pipService.isPipActive.removeListener(_onMacPipChanged);
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -685,9 +716,10 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
|
||||
/// Shared hide logic: hides controls, notifies parent, updates traffic lights, restores focus.
|
||||
void _hideControls() {
|
||||
if (!mounted || !_showControls) return;
|
||||
if (!mounted || !_showControls || _forceShowControls) return;
|
||||
setState(() {
|
||||
_showControls = false;
|
||||
_isContentStripVisible = false;
|
||||
// Dismiss skip button with controls — after this it only re-appears with controls
|
||||
if (_currentMarker != null) {
|
||||
_skipButtonDismissed = true;
|
||||
@@ -721,6 +753,8 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
final hasFrame = widget.hasFirstFrame?.value ?? true;
|
||||
if (!hasFrame) return;
|
||||
|
||||
if (_forceShowControls) return;
|
||||
|
||||
// Only auto-hide if playing
|
||||
if (widget.player.state.playing) {
|
||||
_hideTimer = Timer(_hideDelay, () {
|
||||
@@ -736,6 +770,7 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
/// Auto-hide controls after pause (does not check playing state in callback).
|
||||
void _startPausedHideTimer() {
|
||||
_hideTimer?.cancel();
|
||||
if (_forceShowControls) return;
|
||||
_hideTimer = Timer(_hideDelay, () {
|
||||
_hideControls();
|
||||
});
|
||||
@@ -830,13 +865,13 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
// user can reach them without the controls-hide-on-mouse-leave race.
|
||||
// In normal windowed mode, toggle with controls as before.
|
||||
final isMaximizedOrFullscreen = await windowManager.isMaximized() || await windowManager.isFullScreen();
|
||||
final visible = isMaximizedOrFullscreen ? true : _showControls;
|
||||
final visible = isMaximizedOrFullscreen || _forceShowControls ? true : _showControls;
|
||||
await MacOSWindowService.setTrafficLightsVisible(visible);
|
||||
}
|
||||
|
||||
/// Check whether PiP is supported on this device
|
||||
Future<void> _checkPipSupport() async {
|
||||
if (!Platform.isAndroid) {
|
||||
if (!Platform.isAndroid && !Platform.isIOS && !Platform.isMacOS) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -852,6 +887,19 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
}
|
||||
}
|
||||
|
||||
/// macOS PiP changed — force controls visible while PiP is active
|
||||
void _onMacPipChanged() {
|
||||
if (!mounted) return;
|
||||
final inPip = _pipService.isPipActive.value;
|
||||
setState(() => _forceShowControls = inPip);
|
||||
if (inPip) {
|
||||
_hideTimer?.cancel();
|
||||
widget.controlsVisible?.value = true;
|
||||
} else {
|
||||
_startHideTimer();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _loadPlaybackExtras() async {
|
||||
// Live TV metadata uses EPG rating keys, not library items
|
||||
if (widget.isLive) return;
|
||||
@@ -938,7 +986,7 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
return PlaybackExtras.withChapterFallback(chapters: chapters, markers: markers);
|
||||
}
|
||||
|
||||
Widget _buildTrackChapterControlsWidget() {
|
||||
Widget _buildTrackChapterControlsWidget({bool hideChaptersAndQueue = false}) {
|
||||
final playbackState = context.watch<PlaybackStateProvider>();
|
||||
|
||||
return TrackChapterControls(
|
||||
@@ -952,13 +1000,14 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
subtitleSyncOffset: _subtitleSyncOffset,
|
||||
isRotationLocked: _isRotationLocked,
|
||||
isFullscreen: _isFullscreen,
|
||||
onTogglePIPMode: (_isPipSupported && Platform.isAndroid) ? widget.onTogglePIPMode : null,
|
||||
onTogglePIPMode: (_isPipSupported && (Platform.isAndroid || Platform.isIOS || Platform.isMacOS)) ? widget.onTogglePIPMode : null,
|
||||
onCycleBoxFitMode: widget.player.playerType != 'exoplayer' ? widget.onCycleBoxFitMode : null,
|
||||
onToggleRotationLock: _toggleRotationLock,
|
||||
onToggleFullscreen: _toggleFullscreen,
|
||||
onSwitchVersion: _switchMediaVersion,
|
||||
onAudioTrackChanged: widget.onAudioTrackChanged,
|
||||
onSubtitleTrackChanged: widget.onSubtitleTrackChanged,
|
||||
onSubtitleTrackChanged: _onSubtitleTrackChanged,
|
||||
subtitlesVisible: _subtitlesVisible,
|
||||
onLoadSeekTimes: () async {
|
||||
if (mounted) {
|
||||
await _loadSeekTimes();
|
||||
@@ -980,6 +1029,7 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
isLive: widget.isLive,
|
||||
showQueueButton: playbackState.isQueueActive,
|
||||
onQueueItemSelected: playbackState.isQueueActive ? _onQueueItemSelected : null,
|
||||
hideChaptersAndQueue: hideChaptersAndQueue,
|
||||
shaderService: widget.shaderService,
|
||||
onShaderChanged: widget.onShaderChanged,
|
||||
isAmbientLightingEnabled: widget.isAmbientLightingEnabled,
|
||||
@@ -1583,11 +1633,11 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
// Use desktop controls for desktop platforms AND Android TV
|
||||
final isMobile = PlatformDetector.isMobile(context) && !PlatformDetector.isTV();
|
||||
|
||||
// Hide ALL controls when in PiP mode (Android only)
|
||||
// Hide ALL controls when in PiP mode (except macOS where main window stays visible)
|
||||
return ValueListenableBuilder<bool>(
|
||||
valueListenable: _pipService.isPipActive,
|
||||
builder: (context, isInPip, _) {
|
||||
if (isInPip) return const SizedBox.shrink();
|
||||
if (isInPip && !Platform.isMacOS) return const SizedBox.shrink();
|
||||
return Focus(
|
||||
focusNode: _focusNode,
|
||||
autofocus: true,
|
||||
@@ -1716,7 +1766,7 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
onPointerHover: (_) => _showControlsFromPointerActivity(),
|
||||
onPointerSignal: _handlePointerSignal,
|
||||
child: MouseRegion(
|
||||
cursor: _showControls ? SystemMouseCursors.basic : SystemMouseCursors.none,
|
||||
cursor: (_showControls || _forceShowControls) ? SystemMouseCursors.basic : SystemMouseCursors.none,
|
||||
onHover: (_) => _showControlsFromPointerActivity(),
|
||||
onExit: (_) => _hideControlsFromPointerExit(),
|
||||
child: Stack(
|
||||
@@ -1825,9 +1875,9 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
ignoring: !_showControls,
|
||||
child: FocusScope(
|
||||
// Prevent focus from entering controls when hidden
|
||||
canRequestFocus: _showControls,
|
||||
canRequestFocus: _showControls || _forceShowControls,
|
||||
child: AnimatedOpacity(
|
||||
opacity: _showControls ? 1.0 : 0.0,
|
||||
opacity: (_showControls || _forceShowControls) ? 1.0 : 0.0,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
@@ -1864,31 +1914,53 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
child: isMobile
|
||||
? Listener(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onPointerDown: (_) => _restartHideTimerIfPlaying(),
|
||||
child: MobileVideoControls(
|
||||
player: widget.player,
|
||||
metadata: widget.metadata,
|
||||
chapters: _chapters,
|
||||
chaptersLoaded: _chaptersLoaded,
|
||||
seekTimeSmall: _seekTimeSmall,
|
||||
trackChapterControls: _buildTrackChapterControlsWidget(),
|
||||
onSeek: _throttledSeek,
|
||||
onSeekEnd: _finalizeSeek,
|
||||
onSeekCompleted: widget.onSeekCompleted,
|
||||
// ignore: no-empty-block - play/pause handled by parent VideoControlsState
|
||||
onPlayPause: () {},
|
||||
onCancelAutoHide: () => _hideTimer?.cancel(),
|
||||
onStartAutoHide: _startHideTimer,
|
||||
onBack: widget.onBack,
|
||||
onNext: widget.onNext,
|
||||
onPrevious: widget.onPrevious,
|
||||
onSeekToPreviousChapter: _seekToPreviousChapter,
|
||||
onSeekToNextChapter: _seekToNextChapter,
|
||||
canControl: widget.canControl,
|
||||
hasFirstFrame: widget.hasFirstFrame,
|
||||
thumbnailDataBuilder: widget.thumbnailDataBuilder,
|
||||
isLive: widget.isLive,
|
||||
liveChannelName: widget.liveChannelName,
|
||||
onPointerDown: (_) {
|
||||
if (!_isContentStripVisible) _restartHideTimerIfPlaying();
|
||||
},
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final playbackState = context.watch<PlaybackStateProvider>();
|
||||
final hasStripContent = _chapters.isNotEmpty || playbackState.isQueueActive;
|
||||
return MobileVideoControls(
|
||||
player: widget.player,
|
||||
metadata: widget.metadata,
|
||||
chapters: _chapters,
|
||||
chaptersLoaded: _chaptersLoaded,
|
||||
seekTimeSmall: _seekTimeSmall,
|
||||
trackChapterControls: _buildTrackChapterControlsWidget(
|
||||
hideChaptersAndQueue: hasStripContent,
|
||||
),
|
||||
onSeek: _throttledSeek,
|
||||
onSeekEnd: _finalizeSeek,
|
||||
onSeekCompleted: widget.onSeekCompleted,
|
||||
// ignore: no-empty-block - play/pause handled by parent VideoControlsState
|
||||
onPlayPause: () {},
|
||||
onCancelAutoHide: () => _hideTimer?.cancel(),
|
||||
onStartAutoHide: _startHideTimer,
|
||||
onBack: widget.onBack,
|
||||
onNext: widget.onNext,
|
||||
onPrevious: widget.onPrevious,
|
||||
onSeekToPreviousChapter: _seekToPreviousChapter,
|
||||
onSeekToNextChapter: _seekToNextChapter,
|
||||
canControl: widget.canControl,
|
||||
hasFirstFrame: widget.hasFirstFrame,
|
||||
thumbnailDataBuilder: widget.thumbnailDataBuilder,
|
||||
isLive: widget.isLive,
|
||||
liveChannelName: widget.liveChannelName,
|
||||
serverId: widget.metadata.serverId,
|
||||
showQueueTab: playbackState.isQueueActive,
|
||||
onQueueItemSelected: playbackState.isQueueActive ? _onQueueItemSelected : null,
|
||||
controlsVisible: widget.controlsVisible,
|
||||
onStripVisibilityChanged: (visible) {
|
||||
setState(() => _isContentStripVisible = visible);
|
||||
if (visible) {
|
||||
_hideTimer?.cancel();
|
||||
} else {
|
||||
_restartHideTimerIfPlaying();
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
)
|
||||
: _buildDesktopControlsListener(),
|
||||
@@ -1921,6 +1993,7 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
right: 24,
|
||||
bottom: () {
|
||||
if (!_showControls) return 24.0;
|
||||
if (_isContentStripVisible) return 180.0;
|
||||
return isMobile ? 80.0 : 115.0;
|
||||
}(),
|
||||
child: AnimatedOpacity(
|
||||
@@ -1946,7 +2019,7 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
}
|
||||
|
||||
Widget _buildDesktopControlsListener() {
|
||||
final pipMode = (_isPipSupported && Platform.isAndroid) ? widget.onTogglePIPMode : null;
|
||||
final pipMode = (_isPipSupported && (Platform.isAndroid || Platform.isIOS || Platform.isMacOS)) ? widget.onTogglePIPMode : null;
|
||||
final boxFitMode = widget.player.playerType != 'exoplayer' ? widget.onCycleBoxFitMode : null;
|
||||
final playbackState = context.watch<PlaybackStateProvider>();
|
||||
|
||||
@@ -1982,10 +2055,11 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
|
||||
onTogglePIPMode: pipMode,
|
||||
onCycleBoxFitMode: boxFitMode,
|
||||
onToggleFullscreen: _toggleFullscreen,
|
||||
onToggleAlwaysOnTop: _toggleAlwaysOnTop,
|
||||
onToggleAlwaysOnTop: Platform.isMacOS ? null : _toggleAlwaysOnTop,
|
||||
onSwitchVersion: _switchMediaVersion,
|
||||
onAudioTrackChanged: widget.onAudioTrackChanged,
|
||||
onSubtitleTrackChanged: widget.onSubtitleTrackChanged,
|
||||
onSubtitleTrackChanged: _onSubtitleTrackChanged,
|
||||
subtitlesVisible: _subtitlesVisible,
|
||||
onLoadSeekTimes: () async {
|
||||
if (mounted) {
|
||||
await _loadSeekTimes();
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../i18n/strings.g.dart';
|
||||
import '../../../mpv/mpv.dart';
|
||||
import '../../../models/plex_media_info.dart';
|
||||
import '../../../models/plex_metadata.dart';
|
||||
import '../../../providers/playback_state_provider.dart';
|
||||
import '../../../services/download_storage_service.dart';
|
||||
import '../../../services/plex_client.dart';
|
||||
import '../../../theme/mono_tokens.dart';
|
||||
import '../../../utils/formatters.dart';
|
||||
import '../../../utils/provider_extensions.dart';
|
||||
import '../../app_icon.dart';
|
||||
import '../../plex_optimized_image.dart';
|
||||
|
||||
/// Horizontal scrollable strip of chapter/queue items shown on swipe-up.
|
||||
class ContentStrip extends StatefulWidget {
|
||||
final Player player;
|
||||
final List<PlexChapter> chapters;
|
||||
final bool chaptersLoaded;
|
||||
final String? serverId;
|
||||
final bool showQueueTab;
|
||||
final Function(PlexMetadata)? onQueueItemSelected;
|
||||
|
||||
const ContentStrip({
|
||||
super.key,
|
||||
required this.player,
|
||||
required this.chapters,
|
||||
required this.chaptersLoaded,
|
||||
this.serverId,
|
||||
this.showQueueTab = false,
|
||||
this.onQueueItemSelected,
|
||||
});
|
||||
|
||||
@override
|
||||
State<ContentStrip> createState() => _ContentStripState();
|
||||
}
|
||||
|
||||
enum _StripTab { chapters, queue }
|
||||
|
||||
class _ContentStripState extends State<ContentStrip> {
|
||||
late _StripTab _activeTab;
|
||||
final ScrollController _chapterScrollController = ScrollController();
|
||||
final ScrollController _queueScrollController = ScrollController();
|
||||
bool _hasAutoScrolledChapters = false;
|
||||
bool _hasAutoScrolledQueue = false;
|
||||
|
||||
bool get _hasChapters => widget.chapters.isNotEmpty;
|
||||
bool get _hasQueue => widget.showQueueTab && widget.onQueueItemSelected != null;
|
||||
bool get _hasBothTabs => _hasChapters && _hasQueue;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_activeTab = _hasChapters ? _StripTab.chapters : _StripTab.queue;
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_chapterScrollController.dispose();
|
||||
_queueScrollController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
PlexClient? _tryGetClient(BuildContext context, String? serverId) {
|
||||
if (serverId == null) return null;
|
||||
try {
|
||||
return context.getClientForServer(serverId);
|
||||
} catch (_) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
void _autoScrollTo(ScrollController controller, int index, {bool force = false}) {
|
||||
if (!controller.hasClients) return;
|
||||
const itemWidth = 132.0; // 120 thumb + 12 padding
|
||||
final target = (index * itemWidth - 60).clamp(0.0, controller.position.maxScrollExtent);
|
||||
if (force || (target - controller.offset).abs() > itemWidth) {
|
||||
controller.jumpTo(target);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SafeArea(
|
||||
top: false,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (_hasBothTabs) _buildTabBar(context),
|
||||
const SizedBox(height: 8),
|
||||
SizedBox(
|
||||
height: 106,
|
||||
child: _activeTab == _StripTab.chapters ? _buildChapterStrip(context) : _buildQueueStrip(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildTabBar(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
_buildTabLabel(context, t.videoControls.chapters, _StripTab.chapters),
|
||||
const SizedBox(width: 24),
|
||||
_buildTabLabel(context, t.videoControls.queue, _StripTab.queue),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildTabLabel(BuildContext context, String label, _StripTab tab) {
|
||||
final isActive = _activeTab == tab;
|
||||
return GestureDetector(
|
||||
onTap: () => setState(() => _activeTab = tab),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: isActive ? Colors.white : Colors.white54,
|
||||
fontSize: 13,
|
||||
fontWeight: isActive ? FontWeight.w600 : FontWeight.normal,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Container(
|
||||
height: 2,
|
||||
width: 40,
|
||||
color: isActive ? Colors.blue : Colors.transparent,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildChapterStrip(BuildContext context) {
|
||||
return StreamBuilder<Duration>(
|
||||
stream: widget.player.streams.position,
|
||||
initialData: widget.player.state.position,
|
||||
builder: (context, positionSnapshot) {
|
||||
final currentPosition = positionSnapshot.data ?? Duration.zero;
|
||||
final currentPositionMs = currentPosition.inMilliseconds;
|
||||
|
||||
int? currentChapterIndex;
|
||||
for (int i = 0; i < widget.chapters.length; i++) {
|
||||
final chapter = widget.chapters[i];
|
||||
final startMs = chapter.startTimeOffset ?? 0;
|
||||
final endMs = chapter.endTimeOffset ??
|
||||
(i < widget.chapters.length - 1 ? widget.chapters[i + 1].startTimeOffset ?? 0 : double.maxFinite.toInt());
|
||||
if (currentPositionMs >= startMs && currentPositionMs < endMs) {
|
||||
currentChapterIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Auto-scroll to current chapter on first build
|
||||
if (!_hasAutoScrolledChapters && currentChapterIndex != null) {
|
||||
_hasAutoScrolledChapters = true;
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_autoScrollTo(_chapterScrollController, currentChapterIndex!);
|
||||
});
|
||||
}
|
||||
|
||||
return ListView.builder(
|
||||
controller: _chapterScrollController,
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: widget.chapters.length,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
itemBuilder: (context, index) {
|
||||
final chapter = widget.chapters[index];
|
||||
final isCurrent = currentChapterIndex == index;
|
||||
|
||||
final localThumbPath = widget.serverId != null && chapter.thumb != null
|
||||
? DownloadStorageService.instance.getArtworkPathSync(widget.serverId!, chapter.thumb!)
|
||||
: null;
|
||||
|
||||
return _buildStripItem(
|
||||
context: context,
|
||||
isCurrent: isCurrent,
|
||||
thumbnail: chapter.thumb != null
|
||||
? PlexOptimizedImage.thumb(
|
||||
client: _tryGetClient(context, widget.serverId),
|
||||
imagePath: chapter.thumb,
|
||||
localFilePath: localThumbPath,
|
||||
width: 120,
|
||||
height: 68,
|
||||
fit: BoxFit.cover,
|
||||
errorWidget: (_, __, ___) =>
|
||||
const AppIcon(Symbols.image_rounded, fill: 1, color: Colors.white54, size: 34),
|
||||
)
|
||||
: null,
|
||||
title: chapter.label,
|
||||
subtitle: formatDurationTimestamp(chapter.startTime),
|
||||
onTap: () => widget.player.seek(chapter.startTime),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildQueueStrip(BuildContext context) {
|
||||
return Consumer<PlaybackStateProvider>(
|
||||
builder: (context, playbackState, _) {
|
||||
final items = playbackState.loadedItems;
|
||||
final currentItemID = playbackState.currentPlayQueueItemID;
|
||||
final currentIndex = items.indexWhere((item) => item.playQueueItemID == currentItemID);
|
||||
|
||||
if (!_hasAutoScrolledQueue && currentIndex >= 0) {
|
||||
_hasAutoScrolledQueue = true;
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_autoScrollTo(_queueScrollController, currentIndex);
|
||||
});
|
||||
}
|
||||
|
||||
return ListView.builder(
|
||||
controller: _queueScrollController,
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: items.length,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
itemBuilder: (context, index) {
|
||||
final item = items[index];
|
||||
final isCurrent = item.playQueueItemID == currentItemID;
|
||||
|
||||
PlexClient? client;
|
||||
if (item.serverId != null) {
|
||||
try {
|
||||
client = context.getClientForServer(item.serverId!);
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
return _buildStripItem(
|
||||
context: context,
|
||||
isCurrent: isCurrent,
|
||||
thumbnail: item.thumb != null
|
||||
? PlexOptimizedImage.thumb(
|
||||
client: client,
|
||||
imagePath: item.thumb,
|
||||
width: 120,
|
||||
height: 68,
|
||||
fit: BoxFit.cover,
|
||||
errorWidget: (_, __, ___) =>
|
||||
const AppIcon(Symbols.image_rounded, fill: 1, color: Colors.white54, size: 34),
|
||||
)
|
||||
: null,
|
||||
title: item.title,
|
||||
subtitle: _buildQueueSubtitle(item),
|
||||
onTap: () => widget.onQueueItemSelected?.call(item),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
String _buildQueueSubtitle(PlexMetadata item) {
|
||||
if (item.grandparentTitle != null && item.parentIndex != null && item.index != null) {
|
||||
return '${item.grandparentTitle} \u00b7 S${item.parentIndex}E${item.index}';
|
||||
}
|
||||
if (item.grandparentTitle != null) return item.grandparentTitle!;
|
||||
if (item.year != null) return '${item.year}';
|
||||
return item.type;
|
||||
}
|
||||
|
||||
Widget _buildStripItem({
|
||||
required BuildContext context,
|
||||
required bool isCurrent,
|
||||
required Widget? thumbnail,
|
||||
required String title,
|
||||
required String subtitle,
|
||||
required VoidCallback onTap,
|
||||
}) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
width: 120,
|
||||
margin: const EdgeInsets.symmetric(horizontal: 6),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Thumbnail
|
||||
SizedBox(
|
||||
width: 120,
|
||||
height: 68,
|
||||
child: Stack(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
||||
child: thumbnail ??
|
||||
Container(
|
||||
color: Colors.white10,
|
||||
child: const Center(
|
||||
child: AppIcon(Symbols.movie_rounded, fill: 1, color: Colors.white38, size: 28),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (isCurrent)
|
||||
Positioned.fill(
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(6)),
|
||||
border: Border.fromBorderSide(BorderSide(color: Colors.blue, width: 2)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
// Title
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: isCurrent ? Colors.blue : Colors.white,
|
||||
fontSize: 11,
|
||||
fontWeight: isCurrent ? FontWeight.w600 : FontWeight.normal,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
// Subtitle
|
||||
Text(
|
||||
subtitle,
|
||||
style: TextStyle(
|
||||
color: isCurrent ? Colors.blue.withValues(alpha: 0.7) : tokens(context).textMuted,
|
||||
fontSize: 10,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -13,10 +13,9 @@ import '../../../utils/platform_detector.dart';
|
||||
import '../../../i18n/strings.g.dart';
|
||||
import '../../../widgets/overlay_sheet.dart';
|
||||
import '../../../models/plex_metadata.dart';
|
||||
import '../sheets/audio_track_sheet.dart';
|
||||
import '../sheets/chapter_sheet.dart';
|
||||
import '../sheets/queue_sheet.dart';
|
||||
import '../sheets/subtitle_track_sheet.dart';
|
||||
import '../sheets/track_sheet.dart';
|
||||
import '../sheets/version_sheet.dart';
|
||||
import '../sheets/video_settings_sheet.dart';
|
||||
import '../../../services/shader_service.dart';
|
||||
@@ -73,12 +72,18 @@ class TrackChapterControls extends StatelessWidget {
|
||||
/// Whether this is a live TV stream (hides speed settings).
|
||||
final bool isLive;
|
||||
|
||||
/// Whether subtitles are currently visible (false = hidden via sub-visibility toggle)
|
||||
final bool subtitlesVisible;
|
||||
|
||||
/// Whether to show the queue button
|
||||
final bool showQueueButton;
|
||||
|
||||
/// Callback when a queue item is selected
|
||||
final Function(PlexMetadata)? onQueueItemSelected;
|
||||
|
||||
/// Whether to hide the chapters and queue buttons (mobile uses content strip instead)
|
||||
final bool hideChaptersAndQueue;
|
||||
|
||||
const TrackChapterControls({
|
||||
super.key,
|
||||
required this.player,
|
||||
@@ -110,8 +115,10 @@ class TrackChapterControls extends StatelessWidget {
|
||||
this.onNavigateLeft,
|
||||
this.canControl = true,
|
||||
this.isLive = false,
|
||||
this.subtitlesVisible = true,
|
||||
this.showQueueButton = false,
|
||||
this.onQueueItemSelected,
|
||||
this.hideChaptersAndQueue = false,
|
||||
this.shaderService,
|
||||
this.onShaderChanged,
|
||||
this.isAmbientLightingEnabled = false,
|
||||
@@ -238,24 +245,32 @@ class TrackChapterControls extends StatelessWidget {
|
||||
);
|
||||
buttonIndex++;
|
||||
|
||||
// Audio track button
|
||||
if (_hasMultipleAudioTracks(tracks)) {
|
||||
// Combined audio & subtitles button
|
||||
if (_hasMultipleAudioTracks(tracks) || _hasSubtitles(tracks)) {
|
||||
final currentIndex = buttonIndex;
|
||||
final hasSubs = _hasSubtitles(tracks);
|
||||
final selectedSub = player.state.track.subtitle;
|
||||
final hasActiveSubtitle = selectedSub != null && selectedSub.id != 'no';
|
||||
final isHidden = hasSubs && hasActiveSubtitle && !subtitlesVisible;
|
||||
final icon = hasSubs
|
||||
? (isHidden ? Symbols.subtitles_off_rounded : Symbols.subtitles_rounded)
|
||||
: Symbols.audiotrack_rounded;
|
||||
buttons.add(
|
||||
_buildTrackButton(
|
||||
buttonIndex: currentIndex,
|
||||
icon: Symbols.audiotrack_rounded,
|
||||
tooltip: t.videoControls.audioTrackButton,
|
||||
semanticLabel: t.videoControls.audioTrackButton,
|
||||
icon: icon,
|
||||
tooltip: t.videoControls.tracksButton,
|
||||
semanticLabel: t.videoControls.tracksButton,
|
||||
tracks: tracks,
|
||||
isMobile: isMobile,
|
||||
isDesktop: isDesktop,
|
||||
onPressed: () {
|
||||
onCancelAutoHide?.call();
|
||||
OverlaySheetController.of(context).show(
|
||||
builder: (_) => AudioTrackSheet(
|
||||
builder: (_) => TrackSheet(
|
||||
player: player,
|
||||
onTrackChanged: onAudioTrackChanged,
|
||||
onAudioTrackChanged: onAudioTrackChanged,
|
||||
onSubtitleTrackChanged: onSubtitleTrackChanged,
|
||||
),
|
||||
).whenComplete(() => onStartAutoHide?.call());
|
||||
},
|
||||
@@ -264,34 +279,8 @@ class TrackChapterControls extends StatelessWidget {
|
||||
buttonIndex++;
|
||||
}
|
||||
|
||||
// Subtitles button
|
||||
if (_hasSubtitles(tracks)) {
|
||||
final currentIndex = buttonIndex;
|
||||
buttons.add(
|
||||
_buildTrackButton(
|
||||
buttonIndex: currentIndex,
|
||||
icon: Symbols.subtitles_rounded,
|
||||
tooltip: t.videoControls.subtitlesButton,
|
||||
semanticLabel: t.videoControls.subtitlesButton,
|
||||
tracks: tracks,
|
||||
isMobile: isMobile,
|
||||
isDesktop: isDesktop,
|
||||
onPressed: () {
|
||||
onCancelAutoHide?.call();
|
||||
OverlaySheetController.of(context).show(
|
||||
builder: (_) => SubtitleTrackSheet(
|
||||
player: player,
|
||||
onTrackChanged: onSubtitleTrackChanged,
|
||||
),
|
||||
).whenComplete(() => onStartAutoHide?.call());
|
||||
},
|
||||
),
|
||||
);
|
||||
buttonIndex++;
|
||||
}
|
||||
|
||||
// Chapters button
|
||||
if (chapters.isNotEmpty) {
|
||||
// Chapters button (hidden on mobile when content strip is available)
|
||||
if (chapters.isNotEmpty && !hideChaptersAndQueue) {
|
||||
final currentIndex = buttonIndex;
|
||||
buttons.add(
|
||||
_buildTrackButton(
|
||||
@@ -318,8 +307,8 @@ class TrackChapterControls extends StatelessWidget {
|
||||
buttonIndex++;
|
||||
}
|
||||
|
||||
// Queue button
|
||||
if (showQueueButton && onQueueItemSelected != null) {
|
||||
// Queue button (hidden on mobile when content strip is available)
|
||||
if (showQueueButton && onQueueItemSelected != null && !hideChaptersAndQueue) {
|
||||
final currentIndex = buttonIndex;
|
||||
buttons.add(
|
||||
_buildTrackButton(
|
||||
@@ -468,10 +457,9 @@ class TrackChapterControls extends StatelessWidget {
|
||||
/// Calculate total button count for navigation
|
||||
int _getButtonCount(Tracks? tracks, bool isMobile, bool isDesktop) {
|
||||
int count = 1; // Settings button always shown
|
||||
if (_hasMultipleAudioTracks(tracks)) count++;
|
||||
if (_hasSubtitles(tracks)) count++;
|
||||
if (chapters.isNotEmpty) count++;
|
||||
if (showQueueButton && onQueueItemSelected != null) count++;
|
||||
if (_hasMultipleAudioTracks(tracks) || _hasSubtitles(tracks)) count++;
|
||||
if (chapters.isNotEmpty && !hideChaptersAndQueue) count++;
|
||||
if (showQueueButton && onQueueItemSelected != null && !hideChaptersAndQueue) count++;
|
||||
if (availableVersions.length > 1 && onSwitchVersion != null) count++;
|
||||
if (onTogglePIPMode != null) count++;
|
||||
if (onCycleBoxFitMode != null) count++;
|
||||
|
||||
@@ -127,7 +127,7 @@ class VideoTimelineBar extends StatelessWidget {
|
||||
initialData: player.state.rate,
|
||||
builder: (context, rateSnap) {
|
||||
final rate = rateSnap.data ?? 1.0;
|
||||
final text = '${formatDurationTimestamp(remaining)} · ${formatFinishTime(remaining.abs(), rate: rate)}';
|
||||
final text = '${formatDurationTimestamp(remaining)} · ${formatFinishTime(remaining.abs(), rate: rate, is24Hour: MediaQuery.alwaysUse24HourFormatOf(context))}';
|
||||
return Text(text, style: const TextStyle(color: Colors.white, fontSize: 14));
|
||||
},
|
||||
);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <os_media_controls/os_media_controls_plugin.h>
|
||||
#include <screen_retriever_linux/screen_retriever_linux_plugin.h>
|
||||
#include <sentry_flutter/sentry_flutter_plugin.h>
|
||||
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
|
||||
#include <universal_gamepad/gamepad_plugin.h>
|
||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||
@@ -20,6 +21,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) screen_retriever_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverLinuxPlugin");
|
||||
screen_retriever_linux_plugin_register_with_registrar(screen_retriever_linux_registrar);
|
||||
g_autoptr(FlPluginRegistrar) sentry_flutter_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "SentryFlutterPlugin");
|
||||
sentry_flutter_plugin_register_with_registrar(sentry_flutter_registrar);
|
||||
g_autoptr(FlPluginRegistrar) sqlite3_flutter_libs_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "Sqlite3FlutterLibsPlugin");
|
||||
sqlite3_flutter_libs_plugin_register_with_registrar(sqlite3_flutter_libs_registrar);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
os_media_controls
|
||||
screen_retriever_linux
|
||||
sentry_flutter
|
||||
sqlite3_flutter_libs
|
||||
universal_gamepad
|
||||
url_launcher_linux
|
||||
|
||||
@@ -15,6 +15,7 @@ import os_media_controls
|
||||
import package_info_plus
|
||||
import path_provider_foundation
|
||||
import screen_retriever_macos
|
||||
import sentry_flutter
|
||||
import shared_preferences_foundation
|
||||
import sqflite_darwin
|
||||
import sqlite3_flutter_libs
|
||||
@@ -34,6 +35,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
ScreenRetrieverMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverMacosPlugin"))
|
||||
SentryFlutterPlugin.register(with: registry.registrar(forPlugin: "SentryFlutterPlugin"))
|
||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||
Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin"))
|
||||
|
||||
@@ -22,6 +22,11 @@ PODS:
|
||||
- FlutterMacOS
|
||||
- screen_retriever_macos (0.0.1):
|
||||
- FlutterMacOS
|
||||
- Sentry/HybridSDK (8.46.0)
|
||||
- sentry_flutter (8.14.2):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- Sentry/HybridSDK (= 8.46.0)
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
@@ -75,6 +80,7 @@ DEPENDENCIES:
|
||||
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
|
||||
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- screen_retriever_macos (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever_macos/macos`)
|
||||
- sentry_flutter (from `Flutter/ephemeral/.symlinks/plugins/sentry_flutter/macos`)
|
||||
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sqflite_darwin (from `Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin`)
|
||||
- sqlite3_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/sqlite3_flutter_libs/darwin`)
|
||||
@@ -85,6 +91,7 @@ DEPENDENCIES:
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- Sentry
|
||||
- Sparkle
|
||||
- sqlite3
|
||||
|
||||
@@ -111,6 +118,8 @@ EXTERNAL SOURCES:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
||||
screen_retriever_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/screen_retriever_macos/macos
|
||||
sentry_flutter:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/sentry_flutter/macos
|
||||
shared_preferences_foundation:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
|
||||
sqflite_darwin:
|
||||
@@ -138,6 +147,8 @@ SPEC CHECKSUMS:
|
||||
package_info_plus: f0052d280d17aa382b932f399edf32507174e870
|
||||
path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880
|
||||
screen_retriever_macos: 452e51764a9e1cdb74b3c541238795849f21557f
|
||||
Sentry: da60d980b197a46db0b35ea12cb8f39af48d8854
|
||||
sentry_flutter: 27892878729f42701297c628eb90e7c6529f3684
|
||||
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
|
||||
Sparkle: f4355f9ebbe9b7d932df4980d70f13922ac97b2a
|
||||
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||
|
||||
@@ -27,12 +27,13 @@
|
||||
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
|
||||
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
||||
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
||||
6AB6B0952EDB27C100EAC8DB /* MPVKit-GPL in Frameworks */ = {isa = PBXBuildFile; productRef = 6AB6B0942EDB27C100EAC8DB /* MPVKit-GPL */; };
|
||||
6AB6B0952EDB27C100EAC8DB /* MPVKit in Frameworks */ = {isa = PBXBuildFile; productRef = 6AB6B0942EDB27C100EAC8DB /* MPVKit */; };
|
||||
6AC86ED72EA70B4C0067BC66 /* plezy.icon in Resources */ = {isa = PBXBuildFile; fileRef = 6AC86ED62EA70B4C0067BC66 /* plezy.icon */; };
|
||||
6AD8B1612ED7B50000E9E1B4 /* MpvPlayerCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD8B1632ED7B50000E9E1B4 /* MpvPlayerCore.swift */; };
|
||||
6AD8B1622ED7B50000E9E1B4 /* MpvPlayerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD8B1642ED7B50000E9E1B4 /* MpvPlayerPlugin.swift */; };
|
||||
6AD8B1662ED7B50000E9E1B5 /* WindowUtilsPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD8B1682ED7B50000E9E1B5 /* WindowUtilsPlugin.swift */; };
|
||||
6AD8B1672ED7B50000E9E1B5 /* WindowDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD8B1692ED7B50000E9E1B5 /* WindowDelegate.swift */; };
|
||||
6AD8B16A2ED7B50000E9E1B6 /* MpvPipController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD8B16B2ED7B50000E9E1B6 /* MpvPipController.swift */; };
|
||||
DF7527C52F58F90C45939A79 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81BACC65DEDF97C1CA1F025F /* Pods_Runner.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -89,6 +90,8 @@
|
||||
6AD8B1642ED7B50000E9E1B4 /* MpvPlayerPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MpvPlayerPlugin.swift; sourceTree = "<group>"; };
|
||||
6AD8B1682ED7B50000E9E1B5 /* WindowUtilsPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowUtilsPlugin.swift; sourceTree = "<group>"; };
|
||||
6AD8B1692ED7B50000E9E1B5 /* WindowDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowDelegate.swift; sourceTree = "<group>"; };
|
||||
6AD8B16B2ED7B50000E9E1B6 /* MpvPipController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MpvPipController.swift; sourceTree = "<group>"; };
|
||||
6AD8B16C2ED7B50000E9E1B7 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
6E770EFFB2EDFFA0C566F238 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
||||
81BACC65DEDF97C1CA1F025F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -112,7 +115,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6AB6B0952EDB27C100EAC8DB /* MPVKit-GPL in Frameworks */,
|
||||
6AB6B0952EDB27C100EAC8DB /* MPVKit in Frameworks */,
|
||||
DF7527C52F58F90C45939A79 /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -203,6 +206,7 @@
|
||||
6AD8B1682ED7B50000E9E1B5 /* WindowUtilsPlugin.swift */,
|
||||
6AD8B1692ED7B50000E9E1B5 /* WindowDelegate.swift */,
|
||||
6AD8B1652ED7B50000E9E1B4 /* MpvPlayer */,
|
||||
6AD8B16C2ED7B50000E9E1B7 /* Runner-Bridging-Header.h */,
|
||||
33E51913231747F40026EE4D /* DebugProfile.entitlements */,
|
||||
33E51914231749380026EE4D /* Release.entitlements */,
|
||||
33CC11242044D66E0003C045 /* Resources */,
|
||||
@@ -215,6 +219,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6AD8B1632ED7B50000E9E1B4 /* MpvPlayerCore.swift */,
|
||||
6AD8B16B2ED7B50000E9E1B6 /* MpvPipController.swift */,
|
||||
6AD8B1642ED7B50000E9E1B4 /* MpvPlayerPlugin.swift */,
|
||||
);
|
||||
path = MpvPlayer;
|
||||
@@ -468,6 +473,7 @@
|
||||
6AD8B1622ED7B50000E9E1B4 /* MpvPlayerPlugin.swift in Sources */,
|
||||
6AD8B1662ED7B50000E9E1B5 /* WindowUtilsPlugin.swift in Sources */,
|
||||
6AD8B1672ED7B50000E9E1B5 /* WindowDelegate.swift in Sources */,
|
||||
6AD8B16A2ED7B50000E9E1B6 /* MpvPipController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -602,12 +608,22 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"/System/Library/PrivateFrameworks",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-weak_framework",
|
||||
PIP,
|
||||
);
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Profile;
|
||||
@@ -734,12 +750,22 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"/System/Library/PrivateFrameworks",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-weak_framework",
|
||||
PIP,
|
||||
);
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
@@ -754,12 +780,22 @@
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"/System/Library/PrivateFrameworks",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-weak_framework",
|
||||
PIP,
|
||||
);
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
@@ -831,16 +867,16 @@
|
||||
repositoryURL = "https://github.com/edde746/MPVKit";
|
||||
requirement = {
|
||||
kind = revision;
|
||||
revision = 2e887368b44ce1dc9e1649e7757ec62c2564e792;
|
||||
revision = b2179eec26c6ceda339e6c6b512e457341768761;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
6AB6B0942EDB27C100EAC8DB /* MPVKit-GPL */ = {
|
||||
6AB6B0942EDB27C100EAC8DB /* MPVKit */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 6AB6B0932EDB27C100EAC8DB /* XCRemoteSwiftPackageReference "MPVKit" */;
|
||||
productName = "MPVKit-GPL";
|
||||
productName = "MPVKit";
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/edde746/MPVKit",
|
||||
"state" : {
|
||||
"revision" : "2e887368b44ce1dc9e1649e7757ec62c2564e792"
|
||||
"revision" : "b2179eec26c6ceda339e6c6b512e457341768761"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/edde746/MPVKit",
|
||||
"state" : {
|
||||
"revision" : "2e887368b44ce1dc9e1649e7757ec62c2564e792"
|
||||
"revision" : "b2179eec26c6ceda339e6c6b512e457341768761"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
import Cocoa
|
||||
|
||||
/// Delegate to notify the plugin of PiP lifecycle events
|
||||
protocol MpvPipDelegate: AnyObject {
|
||||
func pipWillStart()
|
||||
func pipDidStart()
|
||||
/// Called when PiP stops. `restored` is true if the user pressed the close button (restore UI).
|
||||
func pipDidStop(restored: Bool)
|
||||
/// Forward play/pause commands from PiP overlay to mpv
|
||||
func pipSetPlaying(_ playing: Bool)
|
||||
/// Query whether mpv is currently playing
|
||||
var isPipPlaying: Bool { get }
|
||||
}
|
||||
|
||||
/// Encapsulates macOS Picture-in-Picture using the private PIP.framework (PIPViewController).
|
||||
/// This approach wraps the existing Metal rendering view in PiP — no VO switching needed.
|
||||
/// mpv continues rendering to its CAMetalLayer throughout PiP.
|
||||
class MpvPipController: NSObject, PIPViewControllerDelegate {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
private lazy var pip: PIPViewController = {
|
||||
let vc = PIPViewController()
|
||||
vc.delegate = self
|
||||
return vc
|
||||
}()
|
||||
|
||||
private var pipVideoVC: NSViewController?
|
||||
private var pipVideoView: NSView?
|
||||
|
||||
weak var delegate: MpvPipDelegate?
|
||||
private(set) var isActive = false
|
||||
var autoPipEnabled = false
|
||||
|
||||
// Keep reference to the window for restore animation
|
||||
private weak var sourceWindow: NSWindow?
|
||||
|
||||
// MARK: - Public API
|
||||
|
||||
static var isSupported: Bool { true }
|
||||
|
||||
/// Enter PiP by wrapping the given Metal layer in a view and presenting it.
|
||||
/// The layer continues receiving mpv frames — no VO switch needed.
|
||||
func startPip(metalLayer: CAMetalLayer, window: NSWindow, aspectRatio: NSSize) {
|
||||
guard !isActive else { return }
|
||||
|
||||
sourceWindow = window
|
||||
|
||||
// Create a layer-hosting wrapper view for the Metal layer.
|
||||
// PIPViewController resizes the view (and its root layer) as the PiP window resizes.
|
||||
let videoView = NSView(frame: NSRect(origin: .zero, size: aspectRatio))
|
||||
videoView.wantsLayer = true
|
||||
videoView.layer = metalLayer
|
||||
|
||||
// Reset drawableSize to zero so it auto-derives from the layer's bounds.
|
||||
// Without this, the explicit drawableSize set by updateFrame() (main window size)
|
||||
// persists and causes mpv/MoltenVK to render at the wrong resolution in PiP.
|
||||
metalLayer.drawableSize = .zero
|
||||
|
||||
// Create a view controller for PIPViewController
|
||||
let vc = NSViewController()
|
||||
vc.view = videoView
|
||||
|
||||
pipVideoVC = vc
|
||||
pipVideoView = videoView
|
||||
|
||||
// Configure PiP
|
||||
pip.playing = delegate?.isPipPlaying ?? false
|
||||
pip.aspectRatio = aspectRatio
|
||||
pip.replacementWindow = window
|
||||
pip.replacementRect = window.contentView?.frame ?? .zero
|
||||
|
||||
delegate?.pipWillStart()
|
||||
|
||||
// Present PiP
|
||||
pip.presentAsPicture(inPicture: vc)
|
||||
isActive = true
|
||||
delegate?.pipDidStart()
|
||||
}
|
||||
|
||||
func stopPip() {
|
||||
guard isActive else { return }
|
||||
pip.dismiss(pipVideoVC!)
|
||||
}
|
||||
|
||||
/// Update the play/pause button state in the PiP overlay
|
||||
func setPlaying(_ playing: Bool) {
|
||||
pip.playing = playing
|
||||
}
|
||||
|
||||
/// Update the aspect ratio (e.g., when video track changes)
|
||||
func setAspectRatio(_ size: NSSize) {
|
||||
pip.aspectRatio = size
|
||||
}
|
||||
|
||||
func setAutoStart(_ enabled: Bool) {
|
||||
autoPipEnabled = enabled
|
||||
}
|
||||
|
||||
/// Clean up after PiP closes — detaches the Metal layer from the wrapper view
|
||||
/// so MpvPlayerCore can re-add it to the main window.
|
||||
/// Returns the Metal layer that was hosted in PiP.
|
||||
@discardableResult
|
||||
func detachLayer() -> CAMetalLayer? {
|
||||
let metalLayer = pipVideoView?.layer as? CAMetalLayer
|
||||
pipVideoView?.layer = CALayer() // detach before removing
|
||||
pipVideoView = nil
|
||||
pipVideoVC = nil
|
||||
return metalLayer
|
||||
}
|
||||
|
||||
// MARK: - PIPViewControllerDelegate
|
||||
|
||||
func pipShouldClose(_ pip: PIPViewController) -> Bool {
|
||||
prepareForClose()
|
||||
return true
|
||||
}
|
||||
|
||||
func pipWillClose(_ pip: PIPViewController) {
|
||||
prepareForClose()
|
||||
}
|
||||
|
||||
func pipDidClose(_ pip: PIPViewController) {
|
||||
isActive = false
|
||||
delegate?.pipDidStop(restored: true)
|
||||
}
|
||||
|
||||
func pipActionPlay(_ pip: PIPViewController) {
|
||||
delegate?.pipSetPlaying(true)
|
||||
}
|
||||
|
||||
func pipActionPause(_ pip: PIPViewController) {
|
||||
delegate?.pipSetPlaying(false)
|
||||
}
|
||||
|
||||
func pipActionStop(_ pip: PIPViewController) {
|
||||
delegate?.pipSetPlaying(false)
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func prepareForClose() {
|
||||
guard let window = sourceWindow else { return }
|
||||
pip.replacementWindow = window
|
||||
pip.replacementRect = window.contentView?.frame ?? .zero
|
||||
// Bring the main window forward for the restore animation
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
window.deminiaturize(nil)
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,8 @@ private class MetalLayer: CAMetalLayer {
|
||||
override var drawableSize: CGSize {
|
||||
get { return super.drawableSize }
|
||||
set {
|
||||
if Int(newValue.width) > 1 && Int(newValue.height) > 1 {
|
||||
// Allow .zero (auto-derive from bounds) or valid sizes > 1x1
|
||||
if newValue == .zero || (Int(newValue.width) > 1 && Int(newValue.height) > 1) {
|
||||
super.drawableSize = newValue
|
||||
}
|
||||
}
|
||||
@@ -49,6 +50,9 @@ class MpvPlayerCore: NSObject {
|
||||
|
||||
private(set) var isInitialized = false
|
||||
|
||||
// PiP state
|
||||
var isPipActive = false
|
||||
|
||||
// HDR settings
|
||||
private var hdrEnabled = true // User preference for HDR
|
||||
private var lastSigPeak: Double = 0.0 // Last known sig-peak for re-evaluation
|
||||
@@ -119,25 +123,25 @@ class MpvPlayerCore: NSObject {
|
||||
// MARK: - Fullscreen Transition Handling
|
||||
|
||||
@objc private func windowWillEnterFullScreen(_ notification: Notification) {
|
||||
guard mpv != nil else { return }
|
||||
guard mpv != nil, !isPipActive else { return }
|
||||
print("[MpvPlayerCore] willEnterFullScreen — disabling video output")
|
||||
mpv_set_property_string(mpv, "vid", "no")
|
||||
}
|
||||
|
||||
@objc private func windowDidEnterFullScreen(_ notification: Notification) {
|
||||
guard mpv != nil else { return }
|
||||
guard mpv != nil, !isPipActive else { return }
|
||||
print("[MpvPlayerCore] didEnterFullScreen — re-enabling video output")
|
||||
mpv_set_property_string(mpv, "vid", "auto")
|
||||
}
|
||||
|
||||
@objc private func windowWillExitFullScreen(_ notification: Notification) {
|
||||
guard mpv != nil else { return }
|
||||
guard mpv != nil, !isPipActive else { return }
|
||||
print("[MpvPlayerCore] willExitFullScreen — disabling video output")
|
||||
mpv_set_property_string(mpv, "vid", "no")
|
||||
}
|
||||
|
||||
@objc private func windowDidExitFullScreen(_ notification: Notification) {
|
||||
guard mpv != nil else { return }
|
||||
guard mpv != nil, !isPipActive else { return }
|
||||
print("[MpvPlayerCore] didExitFullScreen — re-enabling video output")
|
||||
mpv_set_property_string(mpv, "vid", "auto")
|
||||
}
|
||||
@@ -300,10 +304,64 @@ class MpvPlayerCore: NSObject {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - PiP Support
|
||||
|
||||
/// The Metal layer used for video rendering, exposed for PiP.
|
||||
/// PiP moves this layer to its own window; mpv continues rendering to it.
|
||||
var videoLayer: CAMetalLayer? { metalLayer }
|
||||
|
||||
/// Re-attach the Metal layer to the main window after PiP exits.
|
||||
func reattachMetalLayer() {
|
||||
guard let metalLayer = metalLayer, let contentView = window?.contentView else { return }
|
||||
if metalLayer.superlayer == nil {
|
||||
contentView.wantsLayer = true
|
||||
contentView.layer?.insertSublayer(metalLayer, at: 0)
|
||||
metalLayer.frame = contentView.bounds
|
||||
if let screen = window?.screen ?? NSScreen.main {
|
||||
metalLayer.contentsScale = screen.backingScaleFactor
|
||||
metalLayer.drawableSize = CGSize(
|
||||
width: contentView.bounds.width * screen.backingScaleFactor,
|
||||
height: contentView.bounds.height * screen.backingScaleFactor
|
||||
)
|
||||
}
|
||||
}
|
||||
print("[MpvPlayerCore] Metal layer reattached to window")
|
||||
}
|
||||
|
||||
/// Force a redraw (useful after PiP exit when paused).
|
||||
/// Uses a seek to the current position to trigger a frame render.
|
||||
func forceDraw() {
|
||||
command(["seek", "0", "relative+exact"])
|
||||
}
|
||||
|
||||
/// Whether mpv is currently paused
|
||||
var isPaused: Bool {
|
||||
guard let mpv = mpv else { return true }
|
||||
var flag: Int32 = 0
|
||||
mpv_get_property(mpv, "pause", MPV_FORMAT_FLAG, &flag)
|
||||
return flag != 0
|
||||
}
|
||||
|
||||
/// Current playback duration in seconds
|
||||
var duration: Double {
|
||||
guard let mpv = mpv else { return 0 }
|
||||
var value: Double = 0
|
||||
mpv_get_property(mpv, "duration", MPV_FORMAT_DOUBLE, &value)
|
||||
return value
|
||||
}
|
||||
|
||||
/// Current playback time in seconds
|
||||
var timePos: Double {
|
||||
guard let mpv = mpv else { return 0 }
|
||||
var value: Double = 0
|
||||
mpv_get_property(mpv, "time-pos", MPV_FORMAT_DOUBLE, &value)
|
||||
return value
|
||||
}
|
||||
|
||||
// MARK: - Visibility
|
||||
|
||||
func setVisible(_ visible: Bool) {
|
||||
guard let layer = metalLayer else { return }
|
||||
guard let layer = metalLayer, !isPipActive else { return }
|
||||
|
||||
if visible {
|
||||
// Re-insert after background layer but before Flutter control views
|
||||
@@ -321,7 +379,7 @@ class MpvPlayerCore: NSObject {
|
||||
}
|
||||
|
||||
func updateFrame(_ frame: CGRect? = nil) {
|
||||
guard let metalLayer = metalLayer else { return }
|
||||
guard let metalLayer = metalLayer, !isPipActive else { return }
|
||||
|
||||
if let frame = frame {
|
||||
metalLayer.frame = frame
|
||||
|
||||
@@ -11,6 +11,12 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
private weak var registrar: FlutterPluginRegistrar?
|
||||
private var nameToId: [String: Int] = [:]
|
||||
|
||||
// PiP
|
||||
private var pipController: MpvPipController?
|
||||
private var pipChannel: FlutterMethodChannel?
|
||||
private var autoPipEnabled = false
|
||||
private var enteredPipViaAuto = false
|
||||
|
||||
// MARK: - FlutterPlugin Registration
|
||||
|
||||
static func register(with registrar: FlutterPluginRegistrar) {
|
||||
@@ -26,11 +32,18 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
binaryMessenger: registrar.messenger
|
||||
)
|
||||
|
||||
let pipChannel = FlutterMethodChannel(
|
||||
name: "app.plezy/pip",
|
||||
binaryMessenger: registrar.messenger
|
||||
)
|
||||
|
||||
let instance = MpvPlayerPlugin()
|
||||
instance.registrar = registrar
|
||||
instance.pipChannel = pipChannel
|
||||
|
||||
registrar.addMethodCallDelegate(instance, channel: methodChannel)
|
||||
eventChannel.setStreamHandler(instance)
|
||||
pipChannel.setMethodCallHandler(instance.handlePipCall)
|
||||
|
||||
print("[MpvPlayerPlugin] Registered with Flutter")
|
||||
}
|
||||
@@ -88,6 +101,99 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - PiP
|
||||
|
||||
private func ensurePipController() -> MpvPipController {
|
||||
if let existing = pipController { return existing }
|
||||
let controller = MpvPipController()
|
||||
controller.delegate = self
|
||||
pipController = controller
|
||||
return controller
|
||||
}
|
||||
|
||||
private func handlePipCall(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
switch call.method {
|
||||
case "isSupported":
|
||||
result(MpvPipController.isSupported)
|
||||
case "enter":
|
||||
enterPip(manual: true, result: result)
|
||||
case "setAutoPipReady":
|
||||
if let args = call.arguments as? [String: Any], let ready = args["ready"] as? Bool {
|
||||
autoPipEnabled = ready
|
||||
let pip = ensurePipController()
|
||||
pip.setAutoStart(ready)
|
||||
if ready {
|
||||
// Observe app resigning active to auto-enter PiP
|
||||
NotificationCenter.default.removeObserver(self, name: NSApplication.didResignActiveNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(appDidResignActive), name: NSApplication.didResignActiveNotification, object: nil)
|
||||
// Observe app becoming active to auto-exit PiP
|
||||
NotificationCenter.default.removeObserver(self, name: NSApplication.didBecomeActiveNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(appDidBecomeActive), name: NSApplication.didBecomeActiveNotification, object: nil)
|
||||
} else {
|
||||
NotificationCenter.default.removeObserver(self, name: NSApplication.didResignActiveNotification, object: nil)
|
||||
NotificationCenter.default.removeObserver(self, name: NSApplication.didBecomeActiveNotification, object: nil)
|
||||
}
|
||||
}
|
||||
result(nil)
|
||||
default:
|
||||
result(FlutterMethodNotImplemented)
|
||||
}
|
||||
}
|
||||
|
||||
/// Enter PiP by moving the Metal rendering layer to a PiP window.
|
||||
/// No VO switching — mpv keeps rendering to the same Metal layer.
|
||||
private func enterPip(manual: Bool, result: FlutterResult? = nil) {
|
||||
guard let playerCore = playerCore else {
|
||||
result?(["success": false, "errorCode": "failed", "errorMessage": "Player not initialized"])
|
||||
return
|
||||
}
|
||||
guard let metalLayer = playerCore.videoLayer else {
|
||||
result?(["success": false, "errorCode": "failed", "errorMessage": "No video layer"])
|
||||
return
|
||||
}
|
||||
guard let window = findFlutterWindow()?.0 else {
|
||||
result?(["success": false, "errorCode": "failed", "errorMessage": "No window"])
|
||||
return
|
||||
}
|
||||
|
||||
let pip = ensurePipController()
|
||||
guard !pip.isActive else {
|
||||
result?(["success": false, "errorCode": "failed", "errorMessage": "PiP already active"])
|
||||
return
|
||||
}
|
||||
|
||||
// Get video dimensions for aspect ratio
|
||||
var aspectRatio = NSSize(width: 16, height: 9) // default
|
||||
if let w = playerCore.getProperty("width"), let h = playerCore.getProperty("height"),
|
||||
let width = Double(w), let height = Double(h), width > 0 && height > 0 {
|
||||
aspectRatio = NSSize(width: width, height: height)
|
||||
}
|
||||
|
||||
enteredPipViaAuto = !manual
|
||||
playerCore.isPipActive = true
|
||||
pip.startPip(metalLayer: metalLayer, window: window, aspectRatio: aspectRatio)
|
||||
pipChannel?.invokeMethod("onPipChanged", arguments: true)
|
||||
result?(["success": true])
|
||||
}
|
||||
|
||||
/// App resigned active — auto-enter PiP if enabled and playing
|
||||
@objc private func appDidResignActive() {
|
||||
guard autoPipEnabled,
|
||||
let pc = playerCore,
|
||||
!pc.isPipActive,
|
||||
!pc.isPaused,
|
||||
pipController?.autoPipEnabled == true else { return }
|
||||
print("[MpvPlayerPlugin] Auto-PiP: app resigned active, entering PiP")
|
||||
enterPip(manual: false)
|
||||
}
|
||||
|
||||
/// App became active — auto-exit PiP if it was entered automatically
|
||||
@objc private func appDidBecomeActive() {
|
||||
guard enteredPipViaAuto, let pip = pipController, pip.isActive else { return }
|
||||
print("[MpvPlayerPlugin] Auto-PiP: app became active, exiting PiP")
|
||||
pip.stopPip()
|
||||
}
|
||||
|
||||
// MARK: - Method Handlers
|
||||
|
||||
private func handleInitialize(result: @escaping FlutterResult) {
|
||||
@@ -133,8 +239,17 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
|
||||
private func handleDispose(result: @escaping FlutterResult) {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.playerCore?.dispose()
|
||||
self?.playerCore = nil
|
||||
guard let self = self else { result(nil); return }
|
||||
if let pip = self.pipController, pip.isActive {
|
||||
pip.stopPip()
|
||||
pip.detachLayer()
|
||||
}
|
||||
self.pipController = nil
|
||||
self.autoPipEnabled = false
|
||||
NotificationCenter.default.removeObserver(self, name: NSApplication.didResignActiveNotification, object: nil)
|
||||
NotificationCenter.default.removeObserver(self, name: NSApplication.didBecomeActiveNotification, object: nil)
|
||||
self.playerCore?.dispose()
|
||||
self.playerCore = nil
|
||||
print("[MpvPlayerPlugin] Disposed")
|
||||
result(nil)
|
||||
}
|
||||
@@ -149,6 +264,12 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
}
|
||||
|
||||
playerCore?.setProperty(name, value: value)
|
||||
|
||||
if name == "pause" {
|
||||
let isPlaying = value == "no"
|
||||
pipController?.setPlaying(isPlaying)
|
||||
}
|
||||
|
||||
result(nil)
|
||||
}
|
||||
|
||||
@@ -280,3 +401,42 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - MpvPipDelegate
|
||||
|
||||
extension MpvPlayerPlugin: MpvPipDelegate {
|
||||
|
||||
func pipWillStart() {
|
||||
print("[MpvPlayerPlugin] PiP will start")
|
||||
}
|
||||
|
||||
func pipDidStart() {
|
||||
print("[MpvPlayerPlugin] PiP did start")
|
||||
}
|
||||
|
||||
func pipDidStop(restored: Bool) {
|
||||
print("[MpvPlayerPlugin] PiP did stop (restored: \(restored))")
|
||||
playerCore?.isPipActive = false
|
||||
enteredPipViaAuto = false
|
||||
|
||||
// Detach the Metal layer from the PiP wrapper view
|
||||
pipController?.detachLayer()
|
||||
|
||||
// Re-attach the Metal layer to the main window
|
||||
playerCore?.reattachMetalLayer()
|
||||
|
||||
// Force a redraw if paused (prevents black frame after PiP exit)
|
||||
if playerCore?.isPaused == true {
|
||||
playerCore?.forceDraw()
|
||||
}
|
||||
|
||||
pipChannel?.invokeMethod("onPipChanged", arguments: false)
|
||||
}
|
||||
|
||||
func pipSetPlaying(_ playing: Bool) {
|
||||
playerCore?.setProperty("pause", value: playing ? "no" : "yes")
|
||||
pipController?.setPlaying(playing)
|
||||
}
|
||||
|
||||
var isPipPlaying: Bool { !(playerCore?.isPaused ?? true) }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
// MARK: - PIP.framework (Private Framework)
|
||||
|
||||
@protocol PIPViewControllerDelegate;
|
||||
|
||||
@interface PIPViewController : NSViewController
|
||||
|
||||
@property (nonatomic, copy, nullable) NSString *name;
|
||||
@property (nonatomic, weak, nullable) id<PIPViewControllerDelegate> delegate;
|
||||
@property (nonatomic, weak, nullable) NSWindow *replacementWindow;
|
||||
@property (nonatomic) NSRect replacementRect;
|
||||
@property (nonatomic) bool playing;
|
||||
@property (nonatomic) NSSize aspectRatio;
|
||||
|
||||
- (void)presentViewControllerAsPictureInPicture:(NSViewController *)viewController;
|
||||
|
||||
@end
|
||||
|
||||
@protocol PIPViewControllerDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
// macOS 10.12-10.14
|
||||
- (BOOL)pipShouldClose:(PIPViewController *)pip;
|
||||
// macOS 10.15+
|
||||
- (void)pipWillClose:(PIPViewController *)pip;
|
||||
- (void)pipDidClose:(PIPViewController *)pip;
|
||||
- (void)pipActionPlay:(PIPViewController *)pip;
|
||||
- (void)pipActionPause:(PIPViewController *)pip;
|
||||
- (void)pipActionStop:(PIPViewController *)pip;
|
||||
|
||||
@end
|
||||
@@ -1008,6 +1008,22 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.0"
|
||||
sentry:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sentry
|
||||
sha256: "599701ca0693a74da361bc780b0752e1abc98226cf5095f6b069648116c896bb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.14.2"
|
||||
sentry_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sentry_flutter
|
||||
sha256: "5ba2cf40646a77d113b37a07bd69f61bb3ec8a73cbabe5537b05a7c89d2656f8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.14.2"
|
||||
shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
+2
-1
@@ -1,7 +1,7 @@
|
||||
name: plezy
|
||||
description: "A beautiful Plex client for Flutter"
|
||||
publish_to: "none"
|
||||
version: 1.23.0+50
|
||||
version: 1.24.0+51
|
||||
|
||||
environment:
|
||||
sdk: ^3.8.1
|
||||
@@ -56,6 +56,7 @@ dependencies:
|
||||
mobile_scanner: ^6.0.2
|
||||
android_intent_plus: ^5.0.2
|
||||
background_downloader: ^9.5.2
|
||||
sentry_flutter: ^8.12.0
|
||||
auto_updater:
|
||||
git:
|
||||
url: https://github.com/edde746/auto_updater
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
ice.plezy.app {
|
||||
reverse_proxy relay:8080
|
||||
}
|
||||
|
||||
bugs.plezy.app {
|
||||
reverse_proxy glitchtip:8000
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
FROM golang:1.22-alpine AS build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY main.go .
|
||||
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /relay .
|
||||
|
||||
FROM scratch
|
||||
COPY --from=build /relay /relay
|
||||
VOLUME /data/logs
|
||||
EXPOSE 8080
|
||||
ENV GOMEMLIMIT=64MiB
|
||||
ENTRYPOINT ["/relay"]
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
REMOTE="root@212.132.75.249"
|
||||
SSH_KEY="$HOME/.ssh/id_edde"
|
||||
REMOTE_DIR="/opt/plezy-relay"
|
||||
SSH="ssh -i $SSH_KEY $REMOTE"
|
||||
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
echo "Syncing files to $REMOTE:$REMOTE_DIR..."
|
||||
rsync -avz --exclude='plezy-relay' --exclude='plezy-server-linux-amd64' \
|
||||
-e "ssh -i $SSH_KEY" \
|
||||
. "$REMOTE:$REMOTE_DIR/"
|
||||
|
||||
echo "Deploying..."
|
||||
$SSH "cd $REMOTE_DIR && docker compose up -d --build"
|
||||
|
||||
echo "Done."
|
||||
@@ -0,0 +1,58 @@
|
||||
services:
|
||||
relay:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- logs:/data/logs
|
||||
expose:
|
||||
- "8080"
|
||||
|
||||
caddy:
|
||||
image: caddy:2-alpine
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
|
||||
glitchtip-db:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: glitchtip
|
||||
POSTGRES_USER: ${GLITCHTIP_POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${GLITCHTIP_POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- glitchtip_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${GLITCHTIP_POSTGRES_USER}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
glitchtip:
|
||||
image: glitchtip/glitchtip
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
glitchtip-db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DATABASE_URL: postgres://${GLITCHTIP_POSTGRES_USER}:${GLITCHTIP_POSTGRES_PASSWORD}@glitchtip-db/glitchtip
|
||||
SECRET_KEY: ${GLITCHTIP_SECRET_KEY}
|
||||
GLITCHTIP_DOMAIN: https://bugs.plezy.app
|
||||
DEFAULT_FROM_EMAIL: noreply@plezy.app
|
||||
GLITCHTIP_MAX_EVENT_LIFE_DAYS: 90
|
||||
SERVER_ROLE: all_in_one
|
||||
ENABLE_USER_REGISTRATION: "false"
|
||||
VALKEY_URL: ""
|
||||
expose:
|
||||
- "8000"
|
||||
|
||||
volumes:
|
||||
logs:
|
||||
caddy_data:
|
||||
caddy_config:
|
||||
glitchtip_data:
|
||||
+1
-9
@@ -2,12 +2,4 @@ module github.com/edde746/plezy-relay
|
||||
|
||||
go 1.22
|
||||
|
||||
require (
|
||||
github.com/gorilla/websocket v1.5.3
|
||||
golang.org/x/crypto v0.31.0
|
||||
)
|
||||
|
||||
require (
|
||||
golang.org/x/net v0.33.0 // indirect
|
||||
golang.org/x/text v0.21.0 // indirect
|
||||
)
|
||||
require github.com/gorilla/websocket v1.5.3
|
||||
|
||||
@@ -1,8 +1,2 @@
|
||||
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
|
||||
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
|
||||
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
|
||||
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
|
||||
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
|
||||
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
||||
|
||||
+57
-38
@@ -9,12 +9,14 @@ import (
|
||||
"math/big"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"golang.org/x/crypto/acme/autocert"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -29,13 +31,16 @@ const (
|
||||
pingInterval = 30 * time.Second
|
||||
maxMessageSize = 64 * 1024
|
||||
maxLogSize = 1 * 1024 * 1024 // 1MB
|
||||
logMaxAge = 7 * 24 * time.Hour
|
||||
logMaxAge = 3 * 24 * time.Hour
|
||||
logIDLength = 5
|
||||
logRateInterval = 1 * time.Minute
|
||||
maxLogEntries = 500
|
||||
)
|
||||
|
||||
var upgrader = websocket.Upgrader{
|
||||
CheckOrigin: func(r *http.Request) bool { return true },
|
||||
ReadBufferSize: 1024,
|
||||
WriteBufferSize: 1024,
|
||||
CheckOrigin: func(r *http.Request) bool { return true },
|
||||
}
|
||||
|
||||
// --- Rate limiter (token bucket) ---
|
||||
@@ -150,21 +155,36 @@ func (r *Room) sendTo(targetID string, msg serverMsg) bool {
|
||||
// --- Log store ---
|
||||
|
||||
type logEntry struct {
|
||||
Text string
|
||||
Size int
|
||||
ExpiresAt time.Time
|
||||
}
|
||||
|
||||
type logStore struct {
|
||||
entries map[string]logEntry
|
||||
rateLimit map[string]time.Time // IP -> last upload time
|
||||
dir string
|
||||
mu sync.RWMutex
|
||||
}
|
||||
|
||||
func newLogStore() *logStore {
|
||||
return &logStore{
|
||||
func newLogStore(dir string) *logStore {
|
||||
if err := os.MkdirAll(dir, 0755); err != nil {
|
||||
log.Fatalf("failed to create log dir %s: %v", dir, err)
|
||||
}
|
||||
ls := &logStore{
|
||||
entries: make(map[string]logEntry),
|
||||
rateLimit: make(map[string]time.Time),
|
||||
dir: dir,
|
||||
}
|
||||
// Clean orphaned files from prior runs
|
||||
files, _ := os.ReadDir(dir)
|
||||
for _, f := range files {
|
||||
os.Remove(filepath.Join(dir, f.Name()))
|
||||
}
|
||||
return ls
|
||||
}
|
||||
|
||||
func (ls *logStore) filePath(id string) string {
|
||||
return filepath.Join(ls.dir, id+".log")
|
||||
}
|
||||
|
||||
const logIDChars = "abcdefghijklmnopqrstuvwxyz0123456789"
|
||||
@@ -184,6 +204,7 @@ func (ls *logStore) cleanup() {
|
||||
now := time.Now()
|
||||
for id, entry := range ls.entries {
|
||||
if now.After(entry.ExpiresAt) {
|
||||
os.Remove(ls.filePath(id))
|
||||
delete(ls.entries, id)
|
||||
}
|
||||
}
|
||||
@@ -202,8 +223,8 @@ type Server struct {
|
||||
mu sync.RWMutex
|
||||
}
|
||||
|
||||
func newServer() *Server {
|
||||
s := &Server{rooms: make(map[string]*Room), logs: newLogStore()}
|
||||
func newServer(logDir string) *Server {
|
||||
s := &Server{rooms: make(map[string]*Room), logs: newLogStore(logDir)}
|
||||
go s.cleanupLoop()
|
||||
return s
|
||||
}
|
||||
@@ -271,10 +292,24 @@ func (s *Server) handlePostLogs(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
s.logs.mu.Lock()
|
||||
if len(s.logs.entries) >= maxLogEntries {
|
||||
s.logs.mu.Unlock()
|
||||
http.Error(w, "Log store full", http.StatusServiceUnavailable)
|
||||
return
|
||||
}
|
||||
s.logs.mu.Unlock()
|
||||
|
||||
id := generateLogID()
|
||||
if err := os.WriteFile(s.logs.filePath(id), body, 0644); err != nil {
|
||||
log.Printf("logs: failed to write %s: %v", id, err)
|
||||
http.Error(w, "Failed to store log", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
s.logs.mu.Lock()
|
||||
s.logs.entries[id] = logEntry{
|
||||
Text: string(body),
|
||||
Size: len(body),
|
||||
ExpiresAt: time.Now().Add(logMaxAge),
|
||||
}
|
||||
s.logs.mu.Unlock()
|
||||
@@ -306,8 +341,15 @@ func (s *Server) handleGetLogs(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
data, err := os.ReadFile(s.logs.filePath(id))
|
||||
if err != nil {
|
||||
http.Error(w, "Not found", http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
||||
w.Write([]byte(entry.Text))
|
||||
w.Header().Set("Content-Length", strconv.Itoa(entry.Size))
|
||||
w.Write(data)
|
||||
}
|
||||
|
||||
func (s *Server) sendError(conn *websocket.Conn, code, message string) {
|
||||
@@ -485,11 +527,11 @@ func (s *Server) handleWS(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func main() {
|
||||
dev := flag.Bool("dev", false, "Run in development mode (plain HTTP on :8080)")
|
||||
host := flag.String("host", "ice.plezy.app", "Hostname for TLS autocert")
|
||||
addr := flag.String("addr", ":8080", "Listen address")
|
||||
logDir := flag.String("log-dir", "/data/logs", "Directory for log file storage")
|
||||
flag.Parse()
|
||||
|
||||
srv := newServer()
|
||||
srv := newServer(*logDir)
|
||||
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/relay", srv.handleWS)
|
||||
@@ -500,29 +542,6 @@ func main() {
|
||||
mux.HandleFunc("/logs", srv.handlePostLogs)
|
||||
mux.HandleFunc("/logs/", srv.handleGetLogs)
|
||||
|
||||
if *dev {
|
||||
log.Println("Starting dev server on :8080")
|
||||
log.Fatal(http.ListenAndServe(":8080", mux))
|
||||
} else {
|
||||
certManager := autocert.Manager{
|
||||
Prompt: autocert.AcceptTOS,
|
||||
HostPolicy: autocert.HostWhitelist(*host),
|
||||
Cache: autocert.DirCache("/var/lib/plezy-relay/certs"),
|
||||
}
|
||||
|
||||
server := &http.Server{
|
||||
Addr: ":443",
|
||||
Handler: mux,
|
||||
TLSConfig: certManager.TLSConfig(),
|
||||
}
|
||||
|
||||
// HTTP challenge server for Let's Encrypt
|
||||
go func() {
|
||||
log.Println("Starting HTTP challenge server on :80")
|
||||
log.Fatal(http.ListenAndServe(":80", certManager.HTTPHandler(nil)))
|
||||
}()
|
||||
|
||||
log.Printf("Starting relay server on :443 (host=%s)", *host)
|
||||
log.Fatal(server.ListenAndServeTLS("", ""))
|
||||
}
|
||||
log.Printf("Starting relay server on %s", *addr)
|
||||
log.Fatal(http.ListenAndServe(*addr, mux))
|
||||
}
|
||||
|
||||
@@ -149,9 +149,14 @@ Name: "{group}\{cm:UninstallProgram,{#Name}}"; Filename: "{uninstallexe}"
|
||||
Name: "{autodesktop}\{#Name}"; Filename: "{app}\{#ExeName}"; Tasks: desktopicon
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\{#ExeName}"; Description: "{cm:LaunchProgram,{#Name}}"; Flags: nowait postinstall
|
||||
Filename: "{app}\{#ExeName}"; Description: "{cm:LaunchProgram,{#Name}}"; Flags: nowait postinstall; Check: not IsNoRun
|
||||
|
||||
[Code]
|
||||
function IsNoRun: Boolean;
|
||||
begin
|
||||
Result := ExpandConstant('{param:NORUN|0}') = '1';
|
||||
end;
|
||||
|
||||
function IsX64: Boolean;
|
||||
begin
|
||||
Result := not IsArm64;
|
||||
@@ -219,9 +224,14 @@ Name: "{group}\{cm:UninstallProgram,{#Name}}"; Filename: "{uninstallexe}"
|
||||
Name: "{autodesktop}\{#Name}"; Filename: "{app}\{#ExeName}"; Tasks: desktopicon
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\{#ExeName}"; Description: "{cm:LaunchProgram,{#Name}}"; Flags: nowait postinstall
|
||||
Filename: "{app}\{#ExeName}"; Description: "{cm:LaunchProgram,{#Name}}"; Flags: nowait postinstall; Check: not IsNoRun
|
||||
|
||||
[Code]
|
||||
function IsNoRun: Boolean;
|
||||
begin
|
||||
Result := ExpandConstant('{param:NORUN|0}') = '1';
|
||||
end;
|
||||
|
||||
procedure CurStepChanged(CurStep: TSetupStep);
|
||||
var
|
||||
MarkerPath: String;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
|
||||
#include <os_media_controls/os_media_controls_plugin_c_api.h>
|
||||
#include <screen_retriever_windows/screen_retriever_windows_plugin_c_api.h>
|
||||
#include <sentry_flutter/sentry_flutter_plugin.h>
|
||||
#include <sqlite3_flutter_libs/sqlite3_flutter_libs_plugin.h>
|
||||
#include <universal_gamepad/gamepad_plugin_c_api.h>
|
||||
#include <url_launcher_windows/url_launcher_windows.h>
|
||||
@@ -24,6 +25,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
registry->GetRegistrarForPlugin("OsMediaControlsPluginCApi"));
|
||||
ScreenRetrieverWindowsPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("ScreenRetrieverWindowsPluginCApi"));
|
||||
SentryFlutterPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("SentryFlutterPlugin"));
|
||||
Sqlite3FlutterLibsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("Sqlite3FlutterLibsPlugin"));
|
||||
GamepadPluginCApiRegisterWithRegistrar(
|
||||
|
||||
@@ -7,6 +7,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||
connectivity_plus
|
||||
os_media_controls
|
||||
screen_retriever_windows
|
||||
sentry_flutter
|
||||
sqlite3_flutter_libs
|
||||
universal_gamepad
|
||||
url_launcher_windows
|
||||
|
||||
Reference in New Issue
Block a user