Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06bd9d775d | ||
|
|
d6487e24c9 | ||
|
|
c404589382 | ||
|
|
f1689a7794 | ||
|
|
a861a4110f | ||
|
|
e7809b3160 | ||
|
|
edd0618e64 | ||
|
|
849e62df7e | ||
|
|
e1c0df3bd7 | ||
|
|
349b5b0513 | ||
|
|
3ad049cb28 | ||
|
|
656cf1158b | ||
|
|
f3cb508649 | ||
|
|
c39b5a5cf1 | ||
|
|
9ff3099a9d | ||
|
|
c24a2aade0 | ||
|
|
8f862d1ca0 | ||
|
|
b56608f94f | ||
|
|
2876e1bf78 | ||
|
|
ebd850b0d5 | ||
|
|
f3f962a7c9 | ||
|
|
49ae1fdc34 | ||
|
|
dc769bda41 | ||
|
|
75ba6b0627 | ||
|
|
1e40d21bd8 | ||
|
|
3c43874342 | ||
|
|
4f422f1485 | ||
|
|
85d9b6ebab | ||
|
|
90662e2173 | ||
|
|
24980aff95 | ||
|
|
804261605b | ||
|
|
8a65c78999 | ||
|
|
979db254d1 | ||
|
|
18ebe77806 | ||
|
|
0de856e929 | ||
|
|
a6d82b4637 | ||
|
|
acfb79c857 | ||
|
|
dcfe0f8308 | ||
|
|
23a423fe85 | ||
|
|
b2cb874b73 | ||
|
|
f671f367ea | ||
|
|
665603b314 | ||
|
|
0d7dd093c4 | ||
|
|
c849a213f0 | ||
|
|
49ff0854c0 | ||
|
|
5047057521 | ||
|
|
e28e2b9371 | ||
|
|
bb92b6083b | ||
|
|
acdae74587 | ||
|
|
5e4449247b | ||
|
|
c2fe142293 | ||
|
|
431b0f9b0c | ||
|
|
959e6e9398 | ||
|
|
18e47d2327 | ||
|
|
b2e5e02204 | ||
|
|
e6a488a4e2 | ||
|
|
75d0164a8b | ||
|
|
05251edaf3 | ||
|
|
892dfee381 | ||
|
|
7f1eb3a818 | ||
|
|
bd0a0c5d6b | ||
|
|
71b05fd4b2 | ||
|
|
587609d7f6 | ||
|
|
cceba28d0a | ||
|
|
03c623e8c7 | ||
|
|
2b34f4a9d7 | ||
|
|
ad3cc6b986 | ||
|
|
133db721a2 | ||
|
|
a03d30fa45 | ||
|
|
62abd3c30a | ||
|
|
97ba02f45e | ||
|
|
0f1bf5e011 | ||
|
|
d816d82a38 | ||
|
|
c89c88647e | ||
|
|
3599b0b0e1 | ||
|
|
1adb89c6b3 | ||
|
|
7ec1c2ebdc | ||
|
|
7ec062deaf | ||
|
|
a5c7d5b52a | ||
|
|
e54bbd11f1 | ||
|
|
38afdab2e4 | ||
|
|
f214c50c15 | ||
|
|
1fc081ed6b | ||
|
|
cbaed8cdfb | ||
|
|
eac0e26696 |
+2
-2
@@ -1,6 +1,6 @@
|
||||
cask "plezy" do
|
||||
version "2.5.0"
|
||||
sha256 "9f71d8c1cafb74c113e8cbdd8e66ec2a86c26a846b823a3459a8b9a7ab0c31fa"
|
||||
version "2.6.0"
|
||||
sha256 "e408fe84c07e0ff4a2f1a78e8dcfc418233c66ca98c79028a7b099499307a59e"
|
||||
|
||||
url "https://github.com/edde746/plezy/releases/download/#{version}/plezy-macos.dmg"
|
||||
name "Plezy"
|
||||
|
||||
@@ -23,21 +23,28 @@ val downloadLibmpv by tasks.registering {
|
||||
}
|
||||
}
|
||||
|
||||
val assVersion = "fp-3"
|
||||
val assDir = layout.buildDirectory.dir("libass").get().asFile
|
||||
val assAars = listOf("lib_ass-release.aar", "lib_ass_kt-release.aar", "lib_ass_media-release.aar")
|
||||
|
||||
val downloadLibass by tasks.registering {
|
||||
val stamp = File(assDir, ".version")
|
||||
outputs.upToDateWhen { stamp.exists() && stamp.readText().trim() == assVersion }
|
||||
// Extract libc++_shared.so from the libmpv AAR so the app source set can package
|
||||
// it with top merge priority (see packaging { jniLibs } and sourceSets below).
|
||||
val extractMpvLibcxx by tasks.registering {
|
||||
dependsOn(downloadLibmpv)
|
||||
val aar = File(mpvDir, mpvAar)
|
||||
val outDir = File(mpvDir, "libcxx")
|
||||
inputs.file(aar)
|
||||
outputs.dir(outDir)
|
||||
doLast {
|
||||
assDir.mkdirs()
|
||||
val baseUrl = "https://github.com/edde746/libass-android/releases/download/$assVersion"
|
||||
assAars.forEach { name ->
|
||||
val dest = File(assDir, name)
|
||||
exec { commandLine("curl", "-sfL", "$baseUrl/$name", "-o", dest.absolutePath) }
|
||||
outDir.deleteRecursively() // drop stale ABIs from a previous AAR version
|
||||
outDir.mkdirs()
|
||||
exec {
|
||||
commandLine(
|
||||
"unzip",
|
||||
"-q",
|
||||
"-o",
|
||||
aar.absolutePath,
|
||||
"jni/*/libc++_shared.so",
|
||||
"-d",
|
||||
outDir.absolutePath
|
||||
)
|
||||
}
|
||||
stamp.writeText(assVersion)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,10 +152,29 @@ android {
|
||||
|
||||
packaging {
|
||||
jniLibs {
|
||||
// Resolve conflict between libass-android and libmpv native libraries
|
||||
// Three copies of libc++_shared.so reach the merge: the libmpv AAR's
|
||||
// (NDK r29 — exports std::from_chars<float> that libmpv.so needs), the
|
||||
// :libass module's CMake-contributed copy (NDK 28.2 — lacks it), and
|
||||
// peerless2012:ass's bundled copy (also old). pickFirst keeps the merge
|
||||
// from erroring on the duplicates; WHICH copy wins is pinned by the
|
||||
// sourceSets block below: extractMpvLibcxx unpacks the libmpv AAR's copy
|
||||
// into an app jniLibs dir, and PROJECT-scope sources beat sub-projects
|
||||
// and external AARs. libc++ is backward ABI-compatible, so the older-NDK
|
||||
// consumers (libass.so, libasskt.so, ffmpeg decoder, cronet) run fine
|
||||
// against the newer copy.
|
||||
pickFirsts.add("lib/*/libc++_shared.so")
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
getByName("main") {
|
||||
// libc++_shared.so extracted from the libmpv AAR by extractMpvLibcxx.
|
||||
// App source-set jniLibs sit in the PROJECT scope, merged ahead of
|
||||
// subprojects (:libass) and external AARs, so with the pickFirst rule
|
||||
// above this copy deterministically wins regardless of dependency order.
|
||||
jniLibs.srcDir(File(mpvDir, "libcxx/jni"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
@@ -160,10 +186,14 @@ tasks.matching { it.name.contains("CMake") || it.name.contains("externalNative")
|
||||
dependsOn(downloadLibdovi)
|
||||
}
|
||||
|
||||
// Download libmpv and libass AARs before compilation
|
||||
// Download the libmpv AAR before compilation
|
||||
tasks.matching { it.name.startsWith("pre") && it.name.endsWith("Build") }.configureEach {
|
||||
dependsOn(downloadLibmpv)
|
||||
dependsOn(downloadLibass)
|
||||
dependsOn(downloadLibmpv, extractMpvLibcxx)
|
||||
}
|
||||
// merge{Debug,Profile,Release}JniLibFolders snapshot jniLibs source dirs as inputs;
|
||||
// Gradle 8 requires an explicit dependency on the producing task.
|
||||
tasks.matching { it.name.startsWith("merge") && it.name.endsWith("JniLibFolders") }.configureEach {
|
||||
dependsOn(extractMpvLibcxx)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -186,8 +216,13 @@ dependencies {
|
||||
// FFmpeg audio decoder for unsupported codecs (ALAC, DTS, TrueHD, etc.)
|
||||
implementation("org.jellyfin.media3:media3-ffmpeg-decoder:1.9.0+1")
|
||||
|
||||
// libass-android for ASS/SSA subtitle rendering
|
||||
assAars.forEach { implementation(files(File(assDir, it))) }
|
||||
// libass ASS/SSA subtitle rendering: optimized native core (libass.so +
|
||||
// prefab headers) from the edde746/libass-android fork's releases; Kotlin/JNI
|
||||
// bindings + Media3 glue live in the android/libass module. -PlocalAssCore
|
||||
// swaps in a mavenLocal()-published core (0.4.0-local) for native A/B tests.
|
||||
val assCoreVersion = if (project.hasProperty("localAssCore")) "0.4.0-local" else "0.4.1-plezy.1"
|
||||
implementation("io.github.peerless2012:ass:$assCoreVersion@aar")
|
||||
implementation(project(":libass"))
|
||||
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
<!-- Internet access permissions -->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
|
||||
|
||||
|
||||
<!-- PIP and media session foreground service permissions -->
|
||||
|
||||
@@ -4,16 +4,19 @@ import android.app.Activity
|
||||
import android.app.ActivityManager
|
||||
import android.app.AppOpsManager
|
||||
import android.app.PictureInPictureParams
|
||||
import android.content.ActivityNotFoundException
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.content.res.Configuration
|
||||
import android.graphics.SurfaceTexture
|
||||
import android.media.AudioManager
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Process
|
||||
import android.provider.Settings
|
||||
import android.util.Log
|
||||
import android.util.Rational
|
||||
@@ -22,6 +25,7 @@ import android.view.KeyEvent
|
||||
import android.view.TextureView
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowInsets
|
||||
import android.view.WindowManager
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.FrameLayout
|
||||
import androidx.core.content.FileProvider
|
||||
@@ -38,6 +42,7 @@ import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.embedding.engine.FlutterShellArgs
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import java.io.File
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
class MainActivity : FlutterActivity() {
|
||||
|
||||
@@ -76,12 +81,14 @@ class MainActivity : FlutterActivity() {
|
||||
private val EXTERNAL_PLAYER_CHANNEL = "com.plezy/external_player"
|
||||
private val THEME_CHANNEL = "com.plezy/theme"
|
||||
private val DEVICE_CHANNEL = "com.plezy/device"
|
||||
private val DEVICE_ADJUSTMENT_CHANNEL = "com.plezy/device_adjustment"
|
||||
private val TEXT_INPUT_CHANNEL = "com.plezy/text_input"
|
||||
private val APP_EXIT_CHANNEL = "com.plezy/app_exit"
|
||||
private val APP_FOREGROUND_CHANNEL = "com.plezy/app_foreground"
|
||||
private var watchNextPlugin: WatchNextPlugin? = null
|
||||
private var nativeTextInputFocused = false
|
||||
private var pendingExternalPlayerResult: MethodChannel.Result? = null
|
||||
private var originalWindowBrightness: Float? = null
|
||||
|
||||
private inline fun logTextInputDiag(message: () -> String) {
|
||||
if (TEXT_INPUT_DIAGNOSTICS_ENABLED) {
|
||||
@@ -190,6 +197,19 @@ class MainActivity : FlutterActivity() {
|
||||
)
|
||||
}
|
||||
|
||||
/** Hardware capability signals used by Dart to pick the visual-effects tier. */
|
||||
private fun getPerformanceSignals(): Map<String, Any> {
|
||||
val activityManager = getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
|
||||
val memoryInfo = ActivityManager.MemoryInfo()
|
||||
activityManager.getMemoryInfo(memoryInfo)
|
||||
return mapOf(
|
||||
// Actual process bitness: low-end TV boxes often run 32-bit userspace.
|
||||
"is64Bit" to Process.is64Bit(),
|
||||
"isLowRamDevice" to activityManager.isLowRamDevice,
|
||||
"totalMemBytes" to memoryInfo.totalMem
|
||||
)
|
||||
}
|
||||
|
||||
/** User-assigned device name (Settings > About > Device name), or null. */
|
||||
private fun getDeviceName(): String? {
|
||||
// The name the user gave the device; also used by Cast/Nearby.
|
||||
@@ -440,10 +460,15 @@ class MainActivity : FlutterActivity() {
|
||||
when (call.method) {
|
||||
"getTvDetection" -> result.success(getAndroidTvDetection())
|
||||
"getDeviceName" -> result.success(getDeviceName())
|
||||
"getPerformanceSignals" -> result.success(getPerformanceSignals())
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
}
|
||||
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, DEVICE_ADJUSTMENT_CHANNEL).setMethodCallHandler { call, result ->
|
||||
handleDeviceAdjustmentCall(call.method, call.arguments, result)
|
||||
}
|
||||
|
||||
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, TEXT_INPUT_CHANNEL).setMethodCallHandler { call, result ->
|
||||
when (call.method) {
|
||||
"setNativeTextInputFocused" -> {
|
||||
@@ -482,7 +507,9 @@ class MainActivity : FlutterActivity() {
|
||||
when (call.method) {
|
||||
"openVideo" -> {
|
||||
val filePath = call.argument<String>("filePath")
|
||||
val packageName = call.argument<String>("package")
|
||||
val packageNames = call.argument<List<Any?>>("packages")
|
||||
?.mapNotNull { (it as? String)?.trim()?.takeIf { value -> value.isNotEmpty() } }
|
||||
?: emptyList()
|
||||
val title = call.argument<String>("title")?.trim()?.takeIf { it.isNotEmpty() }
|
||||
val startPositionMs = call.argument<Number>("startPositionMs")?.toLong() ?: 0L
|
||||
|
||||
@@ -516,14 +543,12 @@ class MainActivity : FlutterActivity() {
|
||||
grantRead = true
|
||||
}
|
||||
|
||||
val intent = Intent(Intent.ACTION_VIEW).apply {
|
||||
fun buildIntent(packageName: String?): Intent = Intent(Intent.ACTION_VIEW).apply {
|
||||
setDataAndType(uri, "video/*")
|
||||
if (grantRead) {
|
||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
}
|
||||
if (packageName != null) {
|
||||
setPackage(packageName)
|
||||
}
|
||||
packageName?.let { setPackage(it) }
|
||||
val startPosition = startPositionMs.coerceAtLeast(0).coerceAtMost(Int.MAX_VALUE.toLong()).toInt()
|
||||
if (startPosition > 0) {
|
||||
putExtra(API_MX_RESULT_POSITION, startPosition)
|
||||
@@ -538,11 +563,25 @@ class MainActivity : FlutterActivity() {
|
||||
}
|
||||
fileName?.let { putExtra(API_MX_FILENAME, it) }
|
||||
}
|
||||
pendingExternalPlayerResult = result
|
||||
startActivityForResult(intent, EXTERNAL_PLAYER_REQUEST_CODE)
|
||||
} catch (e: android.content.ActivityNotFoundException) {
|
||||
|
||||
val targetPackages = if (packageNames.isEmpty()) listOf<String?>(null) else packageNames
|
||||
for (packageName in targetPackages) {
|
||||
try {
|
||||
pendingExternalPlayerResult = result
|
||||
startActivityForResult(buildIntent(packageName), EXTERNAL_PLAYER_REQUEST_CODE)
|
||||
return@setMethodCallHandler
|
||||
} catch (e: ActivityNotFoundException) {
|
||||
pendingExternalPlayerResult = null
|
||||
}
|
||||
}
|
||||
|
||||
pendingExternalPlayerResult = null
|
||||
result.error("APP_NOT_FOUND", "No app found for package: $packageName", null)
|
||||
val message = if (packageNames.isEmpty()) {
|
||||
"No app found for video"
|
||||
} else {
|
||||
"No app found for packages: ${packageNames.joinToString(", ")}"
|
||||
}
|
||||
result.error("APP_NOT_FOUND", message, null)
|
||||
} catch (e: Exception) {
|
||||
pendingExternalPlayerResult = null
|
||||
result.error("LAUNCH_FAILED", e.message ?: e.javaClass.simpleName, null)
|
||||
@@ -672,6 +711,92 @@ class MainActivity : FlutterActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleDeviceAdjustmentCall(method: String, arguments: Any?, result: MethodChannel.Result) {
|
||||
try {
|
||||
when (method) {
|
||||
"getBrightness" -> result.success(getScreenBrightnessFraction())
|
||||
"setBrightness" -> {
|
||||
setScreenBrightnessFraction(argumentAsDouble(arguments))
|
||||
result.success(null)
|
||||
}
|
||||
"restoreBrightness" -> {
|
||||
restoreScreenBrightness()
|
||||
result.success(null)
|
||||
}
|
||||
"getMediaVolume" -> result.success(getMediaVolumeFraction())
|
||||
"setMediaVolume" -> {
|
||||
setMediaVolumeFraction(argumentAsDouble(arguments))
|
||||
result.success(null)
|
||||
}
|
||||
else -> result.notImplemented()
|
||||
}
|
||||
} catch (e: IllegalArgumentException) {
|
||||
result.error("INVALID_ARGUMENT", e.message ?: e.javaClass.simpleName, null)
|
||||
} catch (e: Exception) {
|
||||
result.error("DEVICE_ADJUSTMENT_FAILED", e.message ?: e.javaClass.simpleName, null)
|
||||
}
|
||||
}
|
||||
|
||||
private fun argumentAsDouble(arguments: Any?): Double {
|
||||
val value = (arguments as? Number)?.toDouble()
|
||||
?: throw IllegalArgumentException("Expected a numeric value")
|
||||
if (value.isNaN() || value.isInfinite()) {
|
||||
throw IllegalArgumentException("Expected a finite numeric value")
|
||||
}
|
||||
return value.coerceIn(0.0, 1.0)
|
||||
}
|
||||
|
||||
private fun getScreenBrightnessFraction(): Double {
|
||||
val windowBrightness = window.attributes.screenBrightness
|
||||
if (windowBrightness >= 0f) return windowBrightness.coerceIn(0f, 1f).toDouble()
|
||||
|
||||
return try {
|
||||
Settings.System.getInt(contentResolver, Settings.System.SCREEN_BRIGHTNESS).coerceIn(0, 255) / 255.0
|
||||
} catch (e: Settings.SettingNotFoundException) {
|
||||
0.5
|
||||
}
|
||||
}
|
||||
|
||||
private fun setScreenBrightnessFraction(value: Double) {
|
||||
if (originalWindowBrightness == null) originalWindowBrightness = window.attributes.screenBrightness
|
||||
val attributes = window.attributes
|
||||
attributes.screenBrightness = value.coerceIn(0.0, 1.0).toFloat()
|
||||
window.attributes = attributes
|
||||
}
|
||||
|
||||
private fun restoreScreenBrightness() {
|
||||
val attributes = window.attributes
|
||||
attributes.screenBrightness = originalWindowBrightness ?: WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_NONE
|
||||
window.attributes = attributes
|
||||
originalWindowBrightness = null
|
||||
}
|
||||
|
||||
private fun getMediaVolumeFraction(): Double {
|
||||
val audioManager = getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
||||
val maxVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC)
|
||||
val minVolume = streamMinVolume(audioManager)
|
||||
if (maxVolume <= minVolume) return 0.0
|
||||
|
||||
val volume = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC).coerceIn(minVolume, maxVolume)
|
||||
return (volume - minVolume).toDouble() / (maxVolume - minVolume).toDouble()
|
||||
}
|
||||
|
||||
private fun setMediaVolumeFraction(value: Double) {
|
||||
val audioManager = getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
||||
val maxVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC)
|
||||
val minVolume = streamMinVolume(audioManager)
|
||||
val target = (minVolume + value.coerceIn(0.0, 1.0) * (maxVolume - minVolume))
|
||||
.roundToInt()
|
||||
.coerceIn(minVolume, maxVolume)
|
||||
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, target, 0)
|
||||
}
|
||||
|
||||
private fun streamMinVolume(audioManager: AudioManager): Int = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
audioManager.getStreamMinVolume(AudioManager.STREAM_MUSIC)
|
||||
} else {
|
||||
0
|
||||
}
|
||||
|
||||
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean, newConfig: Configuration) {
|
||||
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig)
|
||||
flutterEngine?.let { engine ->
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
package com.edde746.plezy.exoplayer
|
||||
|
||||
import android.media.audiofx.DynamicsProcessing
|
||||
import android.media.audiofx.LoudnessEnhancer
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
|
||||
/**
|
||||
* Session-bound loudness normalization approximating mpv's
|
||||
* `loudnorm=I=-14:TP=-3:LRA=4` filter (#1289).
|
||||
*
|
||||
* API 28+: DynamicsProcessing with a single full-range compressor band as a
|
||||
* slow AGC plus a limiter for the true-peak ceiling. API 25-27, or when the
|
||||
* device lacks the DynamicsProcessing effect HAL: LoudnessEnhancer (fixed
|
||||
* makeup gain with built-in limiting).
|
||||
*
|
||||
* Effects bind to the audio session, so they survive AudioTrack re-creation
|
||||
* (seeks, format changes) while the session id is stable. They only process
|
||||
* PCM mixer streams — the caller must force decoded PCM output and disable
|
||||
* tunneling while enabled. DynamicsProcessing parameters are per-channel, so
|
||||
* the effect is re-created when the output channel count changes (dialogue
|
||||
* lives in the center channel of 5.1 PCM).
|
||||
*/
|
||||
class AudioNormalizationEffect(private val log: (String, String, String) -> Unit) {
|
||||
|
||||
private companion object {
|
||||
const val EFFECT_PRIORITY = 0
|
||||
|
||||
// DynamicsProcessing — tuned for movie mixes whose dialogue sits around
|
||||
// -27 LUFS: compress above threshold, make up toward I=-14, limit at TP=-3.
|
||||
const val FRAME_DURATION_MS = 10f
|
||||
const val MBC_CUTOFF_HZ = 20_000f
|
||||
const val MBC_ATTACK_MS = 30f
|
||||
const val MBC_RELEASE_MS = 300f
|
||||
const val MBC_RATIO = 4f
|
||||
const val MBC_THRESHOLD_DB = -34f
|
||||
const val MBC_KNEE_DB = 6f
|
||||
const val MBC_NOISE_GATE_DB = -90f // effectively disabled
|
||||
const val MBC_EXPANDER_RATIO = 1f // no downward expansion
|
||||
const val MBC_POST_GAIN_DB = 15f
|
||||
const val LIMITER_ATTACK_MS = 1f
|
||||
const val LIMITER_RELEASE_MS = 60f
|
||||
const val LIMITER_RATIO = 10f
|
||||
const val LIMITER_THRESHOLD_DB = -3f
|
||||
const val DEFAULT_CHANNEL_COUNT = 2
|
||||
const val MAX_CHANNEL_COUNT = 8
|
||||
|
||||
// LoudnessEnhancer fallback: fixed boost, internally limited.
|
||||
const val LOUDNESS_ENHANCER_GAIN_MB = 900 // +9 dB
|
||||
}
|
||||
|
||||
private var dynamicsProcessing: DynamicsProcessing? = null
|
||||
private var loudnessEnhancer: LoudnessEnhancer? = null
|
||||
private var attachedSessionId = 0
|
||||
private var attachedChannelCount = 0
|
||||
|
||||
val isActive: Boolean get() = dynamicsProcessing != null || loudnessEnhancer != null
|
||||
|
||||
/** For stats/QA: which engine is processing. */
|
||||
val describe: String
|
||||
get() = when {
|
||||
dynamicsProcessing != null -> "DynamicsProcessing"
|
||||
loudnessEnhancer != null -> "LoudnessEnhancer"
|
||||
else -> "off"
|
||||
}
|
||||
|
||||
/** Attach to [sessionId]; idempotent for an unchanged (session, channels) pair. */
|
||||
fun attach(sessionId: Int, channelCount: Int?) {
|
||||
val channels = (channelCount ?: DEFAULT_CHANNEL_COUNT).coerceIn(1, MAX_CHANNEL_COUNT)
|
||||
if (sessionId == attachedSessionId && channels == attachedChannelCount && isActive) return
|
||||
release()
|
||||
if (sessionId == 0) return // AUDIO_SESSION_ID_UNSET — retry on onAudioSessionIdChanged
|
||||
attachedSessionId = sessionId
|
||||
attachedChannelCount = channels
|
||||
if (Build.VERSION.SDK_INT >= 28 && tryDynamicsProcessing(sessionId, channels)) return
|
||||
tryLoudnessEnhancer(sessionId)
|
||||
}
|
||||
|
||||
fun release() {
|
||||
dynamicsProcessing?.let { effect ->
|
||||
runCatching { effect.setEnabled(false) }
|
||||
runCatching { effect.release() }
|
||||
}
|
||||
dynamicsProcessing = null
|
||||
loudnessEnhancer?.let { effect ->
|
||||
runCatching { effect.setEnabled(false) }
|
||||
runCatching { effect.release() }
|
||||
}
|
||||
loudnessEnhancer = null
|
||||
attachedSessionId = 0
|
||||
attachedChannelCount = 0
|
||||
}
|
||||
|
||||
@RequiresApi(28)
|
||||
private fun tryDynamicsProcessing(sessionId: Int, channelCount: Int): Boolean = try {
|
||||
val band = DynamicsProcessing.MbcBand(
|
||||
// inUse
|
||||
true,
|
||||
MBC_CUTOFF_HZ,
|
||||
MBC_ATTACK_MS,
|
||||
MBC_RELEASE_MS,
|
||||
MBC_RATIO,
|
||||
MBC_THRESHOLD_DB,
|
||||
MBC_KNEE_DB,
|
||||
MBC_NOISE_GATE_DB,
|
||||
MBC_EXPANDER_RATIO,
|
||||
// preGain
|
||||
0f,
|
||||
MBC_POST_GAIN_DB
|
||||
)
|
||||
val mbc = DynamicsProcessing.Mbc(
|
||||
// inUse
|
||||
true,
|
||||
// enabled
|
||||
true,
|
||||
// bandCount
|
||||
1
|
||||
).apply { setBand(0, band) }
|
||||
val limiter = DynamicsProcessing.Limiter(
|
||||
// inUse
|
||||
true,
|
||||
// enabled
|
||||
true,
|
||||
// linkGroup
|
||||
0,
|
||||
LIMITER_ATTACK_MS,
|
||||
LIMITER_RELEASE_MS,
|
||||
LIMITER_RATIO,
|
||||
LIMITER_THRESHOLD_DB,
|
||||
// postGain
|
||||
0f
|
||||
)
|
||||
val channel = DynamicsProcessing.Channel(
|
||||
// inputGain
|
||||
0f,
|
||||
// preEqInUse
|
||||
false,
|
||||
// preEqBandCount
|
||||
0,
|
||||
// mbcInUse
|
||||
true,
|
||||
// mbcBandCount
|
||||
1,
|
||||
// postEqInUse
|
||||
false,
|
||||
// postEqBandCount
|
||||
0,
|
||||
// limiterInUse
|
||||
true
|
||||
).apply {
|
||||
setMbc(mbc)
|
||||
setLimiter(limiter)
|
||||
}
|
||||
val config = DynamicsProcessing.Config.Builder(
|
||||
DynamicsProcessing.VARIANT_FAVOR_FREQUENCY_RESOLUTION,
|
||||
channelCount,
|
||||
// preEqInUse
|
||||
false,
|
||||
// preEqBandCount
|
||||
0,
|
||||
// mbcInUse
|
||||
true,
|
||||
// mbcBandCount
|
||||
1,
|
||||
// postEqInUse
|
||||
false,
|
||||
// postEqBandCount
|
||||
0,
|
||||
// limiterInUse
|
||||
true
|
||||
)
|
||||
.setPreferredFrameDuration(FRAME_DURATION_MS)
|
||||
.setAllChannelsTo(channel)
|
||||
.build()
|
||||
dynamicsProcessing = DynamicsProcessing(EFFECT_PRIORITY, sessionId, config).apply { setEnabled(true) }
|
||||
log("info", "audio-normalization", "DynamicsProcessing attached (session=$sessionId, channels=$channelCount)")
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
log(
|
||||
"warn",
|
||||
"audio-normalization",
|
||||
"DynamicsProcessing unavailable (${e.javaClass.simpleName}: ${e.message}); trying LoudnessEnhancer"
|
||||
)
|
||||
dynamicsProcessing = null
|
||||
false
|
||||
}
|
||||
|
||||
private fun tryLoudnessEnhancer(sessionId: Int) {
|
||||
try {
|
||||
loudnessEnhancer = LoudnessEnhancer(sessionId).apply {
|
||||
setTargetGain(LOUDNESS_ENHANCER_GAIN_MB)
|
||||
setEnabled(true)
|
||||
}
|
||||
log("info", "audio-normalization", "LoudnessEnhancer attached (session=$sessionId, gain=${LOUDNESS_ENHANCER_GAIN_MB}mB)")
|
||||
} catch (e: Exception) {
|
||||
loudnessEnhancer = null
|
||||
attachedSessionId = 0
|
||||
attachedChannelCount = 0
|
||||
log(
|
||||
"warn",
|
||||
"audio-normalization",
|
||||
"No loudness effect available on this device (${e.javaClass.simpleName}: ${e.message})"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,40 +13,64 @@ import java.nio.ByteBuffer
|
||||
* - HEVC fallback for a DV format: strip DV RPU/EL NALs (types 62/63) instead,
|
||||
* leaving HDR10+ for the display.
|
||||
*
|
||||
* Runs on the playback thread against MediaCodec's direct input buffers, where
|
||||
* per-byte ByteBuffer accessor calls are far too slow for high-bitrate UHD remuxes
|
||||
* (#1313). Each sample is therefore staged through a reusable heap array with a
|
||||
* single bulk get, scanned and compacted with array ops, and only the modified tail
|
||||
* is written back. Instances are not thread-safe: use one per renderer.
|
||||
*
|
||||
* Pure JVM (no android/media3 imports) so it stays unit-testable on the host.
|
||||
*/
|
||||
object DvBitstreamSanitizer {
|
||||
class DvBitstreamSanitizer {
|
||||
|
||||
private const val NAL_TYPE_PREFIX_SEI = 39
|
||||
private const val NAL_TYPE_SUFFIX_SEI = 40
|
||||
private const val NAL_TYPE_UNSPEC62 = 62 // DV RPU
|
||||
private const val NAL_TYPE_UNSPEC63 = 63 // DV Enhancement Layer
|
||||
private companion object {
|
||||
const val NAL_TYPE_PREFIX_SEI = 39
|
||||
const val NAL_TYPE_SUFFIX_SEI = 40
|
||||
const val NAL_TYPE_UNSPEC62 = 62 // DV RPU
|
||||
const val NAL_TYPE_UNSPEC63 = 63 // DV Enhancement Layer
|
||||
|
||||
private const val SEI_PAYLOAD_TYPE_ITU_T_T35 = 4
|
||||
const val SEI_PAYLOAD_TYPE_ITU_T_T35 = 4
|
||||
|
||||
const val INITIAL_SCRATCH_SIZE = 256 * 1024
|
||||
}
|
||||
|
||||
/** Reusable staging buffer — grown as needed, never shrunk. */
|
||||
private var scratch = ByteArray(INITIAL_SCRATCH_SIZE)
|
||||
|
||||
/**
|
||||
* Scans `[position, limit)` of [data] for Annex B NAL units and removes the selected
|
||||
* metadata NALs by compacting the buffer in place and reducing its limit. The position
|
||||
* is left unchanged.
|
||||
* is left unchanged. Returns the number of NAL units stripped.
|
||||
*
|
||||
* A sample with no start codes at all is left untouched: it cannot contain the
|
||||
* targeted NALs, and emptying it would only confuse the decoder.
|
||||
*/
|
||||
fun sanitize(data: ByteBuffer, stripHdr10PlusSei: Boolean, stripDvRpu: Boolean) {
|
||||
fun sanitize(data: ByteBuffer, stripHdr10PlusSei: Boolean, stripDvRpu: Boolean): Int {
|
||||
val startPos = data.position()
|
||||
val limit = data.limit()
|
||||
var writePos = startPos
|
||||
val len = data.limit() - startPos
|
||||
if (len == 0) return 0
|
||||
if (scratch.size < len) scratch = ByteArray(maxOf(len, scratch.size * 2))
|
||||
val buf = scratch
|
||||
data.get(buf, 0, len)
|
||||
data.position(startPos)
|
||||
|
||||
var writeLen = 0
|
||||
var firstModified = -1
|
||||
var strippedCount = 0
|
||||
var nalStartIndex = -1
|
||||
var startCodeLen = 0
|
||||
|
||||
var i = startPos
|
||||
while (i <= limit) {
|
||||
var i = 0
|
||||
while (i <= len) {
|
||||
// Find next start code or end of buffer.
|
||||
val atEnd = i == limit
|
||||
val atEnd = i == len
|
||||
var foundStartCode = false
|
||||
var nextStartCodeLen = 0
|
||||
if (!atEnd && i + 2 < limit && data.get(i).toInt() == 0 && data.get(i + 1).toInt() == 0) {
|
||||
if (data.get(i + 2).toInt() == 1) {
|
||||
if (!atEnd && i + 2 < len && buf[i].toInt() == 0 && buf[i + 1].toInt() == 0) {
|
||||
if (buf[i + 2].toInt() == 1) {
|
||||
foundStartCode = true
|
||||
nextStartCodeLen = 3
|
||||
} else if (data.get(i + 2).toInt() == 0 && i + 3 < limit && data.get(i + 3).toInt() == 1) {
|
||||
} else if (buf[i + 2].toInt() == 0 && i + 3 < len && buf[i + 3].toInt() == 1) {
|
||||
foundStartCode = true
|
||||
nextStartCodeLen = 4
|
||||
}
|
||||
@@ -61,23 +85,25 @@ object DvBitstreamSanitizer {
|
||||
|
||||
if (nalEnd - nalDataStart >= 2) {
|
||||
// HEVC NAL header: forbidden_zero_bit(1) + nal_unit_type(6) + nuh_layer_id MSB(1).
|
||||
val nalUnitType = (data.get(nalDataStart).toInt() and 0x7E) shr 1
|
||||
val nalUnitType = (buf[nalDataStart].toInt() and 0x7E) shr 1
|
||||
strip = when (nalUnitType) {
|
||||
NAL_TYPE_UNSPEC62, NAL_TYPE_UNSPEC63 -> stripDvRpu
|
||||
NAL_TYPE_PREFIX_SEI, NAL_TYPE_SUFFIX_SEI ->
|
||||
stripHdr10PlusSei && isHdr10PlusSeiNalUnit(data, nalDataStart + 2, nalEnd)
|
||||
stripHdr10PlusSei && isHdr10PlusSeiNalUnit(buf, nalDataStart + 2, nalEnd)
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
if (!strip) {
|
||||
if (writePos != nalStartIndex) {
|
||||
for (j in nalStartIndex until nalEnd) {
|
||||
data.put(writePos++, data.get(j))
|
||||
}
|
||||
} else {
|
||||
writePos = nalEnd
|
||||
if (strip) {
|
||||
strippedCount++
|
||||
if (firstModified < 0) firstModified = writeLen
|
||||
} else {
|
||||
if (writeLen != nalStartIndex) {
|
||||
// Also reached with zero strips when bytes precede the first start code.
|
||||
if (firstModified < 0) firstModified = writeLen
|
||||
System.arraycopy(buf, nalStartIndex, buf, writeLen, nalEnd - nalStartIndex)
|
||||
}
|
||||
writeLen += nalEnd - nalStartIndex
|
||||
}
|
||||
}
|
||||
nalStartIndex = i
|
||||
@@ -88,8 +114,14 @@ object DvBitstreamSanitizer {
|
||||
}
|
||||
}
|
||||
|
||||
data.limit(writePos)
|
||||
if (writeLen == len || firstModified < 0) return 0
|
||||
|
||||
// Bytes before firstModified are byte-identical to the buffer; write back only the tail.
|
||||
data.position(startPos + firstModified)
|
||||
data.put(buf, firstModified, writeLen - firstModified)
|
||||
data.limit(startPos + writeLen)
|
||||
data.position(startPos)
|
||||
return strippedCount
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -99,14 +131,14 @@ object DvBitstreamSanitizer {
|
||||
* (ST 2094-40), application version 0 or 1. Malformed/truncated data returns false so the
|
||||
* NAL is kept.
|
||||
*/
|
||||
private fun isHdr10PlusSeiNalUnit(data: ByteBuffer, rbspStart: Int, nalEnd: Int): Boolean {
|
||||
private fun isHdr10PlusSeiNalUnit(buf: ByteArray, rbspStart: Int, nalEnd: Int): Boolean {
|
||||
var pos = rbspStart
|
||||
if (pos >= nalEnd) return false
|
||||
|
||||
// SEI payload type: accumulated 0xFF bytes plus the final byte.
|
||||
var payloadType = 0
|
||||
while (pos < nalEnd) {
|
||||
val b = data.get(pos++).toInt() and 0xFF
|
||||
val b = buf[pos++].toInt() and 0xFF
|
||||
payloadType += b
|
||||
if (b != 0xFF) break
|
||||
}
|
||||
@@ -114,7 +146,7 @@ object DvBitstreamSanitizer {
|
||||
// SEI payload size, same encoding.
|
||||
var payloadSize = 0
|
||||
while (pos < nalEnd) {
|
||||
val b = data.get(pos++).toInt() and 0xFF
|
||||
val b = buf[pos++].toInt() and 0xFF
|
||||
payloadSize += b
|
||||
if (b != 0xFF) break
|
||||
}
|
||||
@@ -125,11 +157,11 @@ object DvBitstreamSanitizer {
|
||||
|
||||
// The identifier bytes (B5 00 3C 00 01 04 00/01) cannot contain the 0x000003 emulation
|
||||
// prevention pattern, so they can be read without RBSP unescaping.
|
||||
val countryCode = data.get(pos).toInt() and 0xFF
|
||||
val providerCode = ((data.get(pos + 1).toInt() and 0xFF) shl 8) or (data.get(pos + 2).toInt() and 0xFF)
|
||||
val orientedCode = ((data.get(pos + 3).toInt() and 0xFF) shl 8) or (data.get(pos + 4).toInt() and 0xFF)
|
||||
val appIdentifier = data.get(pos + 5).toInt() and 0xFF
|
||||
val appVersion = data.get(pos + 6).toInt() and 0xFF
|
||||
val countryCode = buf[pos].toInt() and 0xFF
|
||||
val providerCode = ((buf[pos + 1].toInt() and 0xFF) shl 8) or (buf[pos + 2].toInt() and 0xFF)
|
||||
val orientedCode = ((buf[pos + 3].toInt() and 0xFF) shl 8) or (buf[pos + 4].toInt() and 0xFF)
|
||||
val appIdentifier = buf[pos + 5].toInt() and 0xFF
|
||||
val appVersion = buf[pos + 6].toInt() and 0xFF
|
||||
|
||||
return countryCode == 0xB5 &&
|
||||
providerCode == 0x003C &&
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.app.Activity
|
||||
import android.app.ActivityManager
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.graphics.PixelFormat
|
||||
import android.graphics.Typeface
|
||||
import android.media.AudioDeviceInfo
|
||||
import android.media.AudioFormat
|
||||
@@ -17,7 +16,6 @@ import android.os.Looper
|
||||
import android.util.Log
|
||||
import android.view.Gravity
|
||||
import android.view.SurfaceView
|
||||
import android.view.TextureView
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewTreeObserver
|
||||
@@ -38,6 +36,7 @@ import androidx.media3.common.text.CueGroup
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
import androidx.media3.common.util.Util
|
||||
import androidx.media3.datasource.DefaultDataSource
|
||||
import androidx.media3.datasource.DefaultHttpDataSource
|
||||
import androidx.media3.datasource.HttpDataSource
|
||||
import androidx.media3.datasource.cronet.CronetDataSource
|
||||
import androidx.media3.exoplayer.DecoderReuseEvaluation
|
||||
@@ -61,17 +60,17 @@ import androidx.media3.extractor.ts.TsExtractor
|
||||
import androidx.media3.ui.AspectRatioFrameLayout
|
||||
import androidx.media3.ui.CaptionStyleCompat
|
||||
import androidx.media3.ui.SubtitleView
|
||||
import com.edde746.plezy.libass.media.AssHandler
|
||||
import com.edde746.plezy.libass.media.parser.AssSubtitleParserFactory
|
||||
import com.edde746.plezy.libass.media.widget.AssSubtitleSurfaceView
|
||||
import com.edde746.plezy.shared.AudioFocusManager
|
||||
import com.edde746.plezy.shared.DeviceQuirks
|
||||
import com.edde746.plezy.shared.FlutterOverlayHelper
|
||||
import com.edde746.plezy.shared.FrameRateManager
|
||||
import io.github.peerless2012.ass.media.AssHandler
|
||||
import io.github.peerless2012.ass.media.parser.AssSubtitleParserFactory
|
||||
import io.github.peerless2012.ass.media.type.AssRenderType
|
||||
import io.github.peerless2012.ass.media.widget.AssSubtitleSurfaceView
|
||||
import java.util.concurrent.Executors
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
import org.chromium.net.CronetEngine
|
||||
import org.chromium.net.CronetProvider
|
||||
|
||||
interface ExoPlayerDelegate : com.edde746.plezy.shared.PlayerDelegate {
|
||||
|
||||
@@ -99,6 +98,11 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
private const val DECODER_HANG_TIMEOUT_MS = 5000L
|
||||
private const val MAX_AUDIO_RECOVERY_ATTEMPTS = 2
|
||||
private const val FPS_SAMPLE_COUNT = 8
|
||||
private const val AUDIO_BOUNCE_TIMEOUT_MS = 1000L
|
||||
|
||||
/** Per-frame "video is at X" logcat stream (tag AssFrameCb) for diagnosing
|
||||
* ASS subtitle lag against the libass pipeline's render/swap lines. */
|
||||
private const val ASS_FRAME_LOGS = false
|
||||
private const val TS_TIMESTAMP_SEARCH_PACKETS = 1800
|
||||
private val DV_CODEC_PROFILE_REGEX = Regex("""(?:^|,)\s*dvh[1e]\.(\d{2})""")
|
||||
|
||||
@@ -108,13 +112,41 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
|
||||
private var assGlCrashHandlerInstalled = false
|
||||
|
||||
private var cronetEngine: CronetEngine? = null
|
||||
private fun getCronetEngine(context: Context): CronetEngine = cronetEngine ?: synchronized(this) {
|
||||
cronetEngine ?: CronetEngine.Builder(context.applicationContext)
|
||||
.enableHttp2(true)
|
||||
.enableQuic(true)
|
||||
.build()
|
||||
.also { cronetEngine = it }
|
||||
@Volatile private var cronetEngine: CronetEngine? = null
|
||||
|
||||
@Volatile private var cronetUnavailable = false
|
||||
private fun getCronetEngine(context: Context): CronetEngine? {
|
||||
cronetEngine?.let { return it }
|
||||
if (cronetUnavailable) return null
|
||||
return synchronized(this) {
|
||||
cronetEngine?.let { return@synchronized it }
|
||||
if (cronetUnavailable) return@synchronized null
|
||||
|
||||
val providers = try {
|
||||
CronetProvider.getAllProviders(context.applicationContext)
|
||||
.filter { it.isEnabled && it.name != CronetProvider.PROVIDER_NAME_FALLBACK }
|
||||
.sortedBy { if (it.name == CronetProvider.PROVIDER_NAME_APP_PACKAGED) 0 else 1 }
|
||||
} catch (t: Throwable) {
|
||||
Log.w(TAG, "Cronet provider discovery failed", t)
|
||||
cronetUnavailable = true
|
||||
return@synchronized null
|
||||
}
|
||||
|
||||
for (provider in providers) {
|
||||
try {
|
||||
return@synchronized provider.createBuilder()
|
||||
.enableHttp2(true)
|
||||
.enableQuic(true)
|
||||
.build()
|
||||
.also { cronetEngine = it }
|
||||
} catch (t: Throwable) {
|
||||
Log.w(TAG, "Cronet provider ${provider.name} failed", t)
|
||||
}
|
||||
}
|
||||
|
||||
cronetUnavailable = true
|
||||
null
|
||||
}
|
||||
}
|
||||
private val cronetExecutor by lazy { Executors.newSingleThreadExecutor() }
|
||||
}
|
||||
@@ -125,6 +157,9 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
private var subtitleView: SubtitleView? = null
|
||||
private var videoZoomScale: Float = 1.0f
|
||||
private var assHandler: AssHandler? = null
|
||||
private var assSubtitleView: AssSubtitleSurfaceView? = null
|
||||
private var assForceMargins = false
|
||||
private var lastAssMargins: IntArray? = null
|
||||
private var overlayLayoutListener: ViewTreeObserver.OnGlobalLayoutListener? = null
|
||||
private var lastVideoSize: VideoSize? = null
|
||||
private var exoPlayer: ExoPlayer? = null
|
||||
@@ -141,9 +176,22 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
private var tunnelingDisabledForVideoCodec: Boolean = false
|
||||
private var tunnelingDisabledForDecodedTrueHdPcm: Boolean = false
|
||||
private var tunnelingDisabledForAudioRecovery: Boolean = false
|
||||
|
||||
// Tunneled playback never fires the VideoFrameMetadataListener (media3 releases
|
||||
// frames inside the codec), which is the libass pipeline's only render trigger —
|
||||
// ASS subs would freeze. Correctness over tunneling while an ASS track is active.
|
||||
private var tunnelingDisabledForAssSubtitles: Boolean = false
|
||||
private val tunnelingDisabledForCodec: Boolean
|
||||
get() = tunnelingDisabledForAudioCodec || tunnelingDisabledForVideoCodec || tunnelingDisabledForDecodedTrueHdPcm || tunnelingDisabledForAudioRecovery
|
||||
private var currentTunneledPlayback: Boolean = false
|
||||
|
||||
// Loudness normalization (#1289): audiofx effects only process non-tunneled
|
||||
// PCM mixer streams, so while enabled we block direct/bitstream output and
|
||||
// disable tunneling.
|
||||
private var audioNormalizationEnabled: Boolean = false
|
||||
private val audioNormalization = AudioNormalizationEffect(::emitLog)
|
||||
private var pendingAudioRendererBounce: Boolean = false
|
||||
private val audioBounceTimeout = Runnable { completeAudioRendererBounce("audio-normalization bounce timeout") }
|
||||
private var lastSeekable: Boolean? = null
|
||||
|
||||
@Volatile private var disposing: Boolean = false
|
||||
@@ -298,23 +346,6 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
}
|
||||
}
|
||||
|
||||
private fun configureSubtitleOverlaySurface() {
|
||||
subtitleView?.post {
|
||||
val count = subtitleView?.childCount ?: 0
|
||||
for (i in 0 until count) {
|
||||
val child = subtitleView?.getChildAt(i)
|
||||
if (child is SurfaceView) {
|
||||
child.setZOrderOnTop(false)
|
||||
child.setZOrderMediaOverlay(true)
|
||||
child.holder.setFormat(PixelFormat.TRANSLUCENT)
|
||||
FlutterOverlayHelper.applyCompositionOrder(child, -1)
|
||||
} else if (child is TextureView) {
|
||||
child.isOpaque = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DV conversion state
|
||||
private var dvMode: DvConversionMode = DvConversionMode.DISABLED
|
||||
private var debugDvModeOverride: DvConversionMode? = null
|
||||
@@ -406,9 +437,9 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
videoAspectContainer!!.addView(surfaceView)
|
||||
surfaceContainer!!.addView(videoAspectContainer)
|
||||
|
||||
// Create SubtitleView - added to surfaceContainer above video
|
||||
// With OVERLAY_OPEN_GL mode, libass-android adds AssSubtitleTextureView as a child
|
||||
// which renders ASS subtitles with full styling using GPU texture composition
|
||||
// Create SubtitleView - added to surfaceContainer above video. Hosts only
|
||||
// the built-in CanvasSubtitleOutput for non-ASS text cues; the ASS overlay
|
||||
// lives inside videoAspectContainer so it tracks the video rect.
|
||||
subtitleView = SubtitleView(activity).apply {
|
||||
layoutParams = FrameLayout.LayoutParams(
|
||||
FrameLayout.LayoutParams.MATCH_PARENT,
|
||||
@@ -486,23 +517,30 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
this.renderersFactory = renderersFactory
|
||||
updateAudioDecoderPolicy("initialize")
|
||||
|
||||
// Cronet DataSource for HTTP/2 multiplexing — all range requests share one connection
|
||||
httpDataSourceFactory = CronetDataSource.Factory(getCronetEngine(activity), cronetExecutor)
|
||||
.setConnectionTimeoutMs(15_000)
|
||||
.setReadTimeoutMs(10_000)
|
||||
dataSourceFactory = DefaultDataSource.Factory(activity, httpDataSourceFactory!!)
|
||||
// Prefer Cronet for HTTP/2 multiplexing; fall back when a device's provider crashes during init.
|
||||
val cronetEngine = getCronetEngine(activity)
|
||||
val dataSourceLabel: String
|
||||
val httpFactory: HttpDataSource.Factory
|
||||
if (cronetEngine != null) {
|
||||
dataSourceLabel = "Cronet"
|
||||
httpFactory = CronetDataSource.Factory(cronetEngine, cronetExecutor)
|
||||
.setConnectionTimeoutMs(15_000)
|
||||
.setReadTimeoutMs(10_000)
|
||||
} else {
|
||||
dataSourceLabel = "DefaultHttp"
|
||||
httpFactory = DefaultHttpDataSource.Factory()
|
||||
.setConnectTimeoutMs(15_000)
|
||||
.setReadTimeoutMs(10_000)
|
||||
}
|
||||
httpDataSourceFactory = httpFactory
|
||||
dataSourceFactory = DefaultDataSource.Factory(activity, httpFactory)
|
||||
val extractorsFactory = DefaultExtractorsFactory()
|
||||
// High-bitrate Plex DVR MPEG-TS recordings can have sparse PCR packets; the default
|
||||
// 600-packet window may leave duration unknown and seeking disabled.
|
||||
.setTsExtractorTimestampSearchBytes(TS_TIMESTAMP_SEARCH_PACKETS * TsExtractor.TS_PACKET_SIZE)
|
||||
|
||||
// Inline buildWithAssSupport to retain AssHandler reference for font scale control.
|
||||
// OVERLAY_OPEN_GL uses TextureView which follows normal View hierarchy z-ordering,
|
||||
// preventing hardware overlay promotion issues on devices like Nvidia Shield.
|
||||
Log.d(TAG, "SubtitleView childCount before ASS setup: ${subtitleView?.childCount}")
|
||||
|
||||
val renderType = AssRenderType.OVERLAY_OPEN_GL
|
||||
val handler = AssHandler(renderType)
|
||||
val handler = AssHandler()
|
||||
assHandler = handler
|
||||
|
||||
val assParserFactory = AssSubtitleParserFactory(handler)
|
||||
@@ -580,7 +618,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
setBufferDurationsMs(30_000, 60_000, 1_000, 5_000)
|
||||
}
|
||||
}.build()
|
||||
emitLog("info", "init", "Buffer: ${targetBufferBytes / 1024 / 1024}MB limit, available=${availableMB}MB, tunneling=$tunnelingUserEnabled, dataSource=Cronet")
|
||||
emitLog("info", "init", "Buffer: ${targetBufferBytes / 1024 / 1024}MB limit, available=${availableMB}MB, tunneling=$tunnelingUserEnabled, dataSource=$dataSourceLabel")
|
||||
|
||||
exoPlayer = ExoPlayer.Builder(activity)
|
||||
.setTrackSelector(trackSelector!!)
|
||||
@@ -590,22 +628,28 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
.setRenderersFactory(wrappedRenderersFactory)
|
||||
.build()
|
||||
|
||||
// Add ASS overlay view to SubtitleView for OVERLAY modes.
|
||||
// We use AssSubtitleSurfaceView directly (not AssSubtitleView) so we get a
|
||||
// SurfaceFlinger-layer-backed overlay that eglPresentationTimeANDROID can
|
||||
// vsync-pin. Z-order: video SurfaceView (-2) < this MediaOverlay-flagged
|
||||
// Add ASS overlay view to the full-screen surfaceContainer (NOT the zoom-scaled
|
||||
// videoAspectContainer): the libass frame = screen, and mpv-style ass_set_margins
|
||||
// describe where the video dst rect sits inside it (negative when zoomed past the
|
||||
// edges) — see updateAssMargins(). Non-positioned dialogue can then be forced
|
||||
// on-screen (sub-ass-force-margins) while positioned/typeset events stay glued to
|
||||
// the video rect, matching mpv. Also keeps the subtitle surface unscaled (crisp
|
||||
// text, no per-gesture geometry churn).
|
||||
// AssSubtitleSurfaceView gives us a SurfaceFlinger-layer-backed overlay that
|
||||
// eglPresentationTimeANDROID can vsync-pin to the video frame.
|
||||
// Z-order: video SurfaceView (-2) < this MediaOverlay-flagged
|
||||
// SurfaceView (-1) < parent canvas < Flutter SurfaceView (+1) in the window.
|
||||
//
|
||||
// Inserted at child index 0 so the SurfaceView's transparent punch runs BEFORE
|
||||
// SubtitleView's built-in CanvasSubtitleOutput child renders non-ASS cues.
|
||||
// Appending would punch away already-drawn SRT/VTT text.
|
||||
var assSubtitleSurfaceView: AssSubtitleSurfaceView? = null
|
||||
subtitleView?.let { sv ->
|
||||
val assView = AssSubtitleSurfaceView(sv.context, handler)
|
||||
assSubtitleSurfaceView = assView
|
||||
sv.addView(
|
||||
// Inserted before subtitleView so both punches run before SRT/VTT cues draw
|
||||
// on the parent canvas.
|
||||
surfaceContainer?.let { container ->
|
||||
val assView = AssSubtitleSurfaceView(container.context, handler)
|
||||
assSubtitleView = assView
|
||||
// Pre-36 sublayer is already set by the view's own setZOrderMediaOverlay(true).
|
||||
FlutterOverlayHelper.applyCompositionOrder(assView, -1)
|
||||
val subtitleIndex = container.indexOfChild(subtitleView)
|
||||
container.addView(
|
||||
assView,
|
||||
0,
|
||||
if (subtitleIndex >= 0) subtitleIndex else container.childCount,
|
||||
FrameLayout.LayoutParams(
|
||||
FrameLayout.LayoutParams.MATCH_PARENT,
|
||||
FrameLayout.LayoutParams.MATCH_PARENT
|
||||
@@ -642,7 +686,19 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
exoPlayer!!.addAnalyticsListener(decoderHangListener)
|
||||
exoPlayer!!.setVideoFrameMetadataListener { presentationTimeUs, releaseTimeNs, _, _ ->
|
||||
// ASS bypasses Media3's text renderer, so apply sub-delay before libass renders.
|
||||
assSubtitleSurfaceView?.requestRender(presentationTimeUs - subtitleDelayUs.get(), releaseTimeNs)
|
||||
assSubtitleView?.requestRender(presentationTimeUs - subtitleDelayUs.get(), releaseTimeNs)
|
||||
if (ASS_FRAME_LOGS) {
|
||||
// Reference stream for subtitle-lag diagnosis: the video frame ExoPlayer
|
||||
// is releasing right now and how far ahead of its vsync we are. Subtitle
|
||||
// "render pts=" lines lagging these pts values = pipeline behind;
|
||||
// budgetMs far from ~10-50 = release-time clock-domain trouble.
|
||||
val budgetMs = (releaseTimeNs - System.nanoTime()) / 1_000_000
|
||||
Log.d(
|
||||
"AssFrameCb",
|
||||
"video pts=${presentationTimeUs / 1000}ms budgetMs=$budgetMs" +
|
||||
(subtitleDelayUs.get().takeIf { it != 0L }?.let { " subDelayMs=${it / 1000}" } ?: "")
|
||||
)
|
||||
}
|
||||
val count = fpsTimestampCount
|
||||
if (count < FPS_SAMPLE_COUNT) {
|
||||
fpsTimestamps[count] = presentationTimeUs
|
||||
@@ -655,9 +711,6 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
}
|
||||
surfaceView?.let { exoPlayer!!.setVideoSurfaceView(it) }
|
||||
|
||||
Log.d(TAG, "SubtitleView childCount after ASS setup: ${subtitleView?.childCount}")
|
||||
configureSubtitleOverlaySurface()
|
||||
|
||||
// Debug: Log SubtitleView child hierarchy
|
||||
subtitleView?.post {
|
||||
Log.d(TAG, "SubtitleView post-layout: width=${subtitleView?.width}, height=${subtitleView?.height}, childCount=${subtitleView?.childCount}")
|
||||
@@ -759,7 +812,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
// Player.Listener
|
||||
|
||||
override fun onCues(cueGroup: CueGroup) {
|
||||
// With OVERLAY_CANVAS mode, ASS subtitles are rendered directly by AssSubtitleView
|
||||
// ASS subtitles are rendered by the libass overlay surface.
|
||||
// This callback is for non-ASS subtitles (SRT, VTT, etc.)
|
||||
val incoming = cueGroup.cues
|
||||
lastSubtitleCues = incoming
|
||||
@@ -913,6 +966,14 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
return
|
||||
}
|
||||
|
||||
// Audio renderer bounce (loudness normalization): the playback thread has
|
||||
// observed the disabled audio renderer — re-enable so selection re-queries
|
||||
// the sink's direct-output verdict.
|
||||
if (pendingAudioRendererBounce && tracks.groups.none { it.type == C.TRACK_TYPE_AUDIO && it.isSelected }) {
|
||||
completeAudioRendererBounce("audio-normalization (audio renderer back on)")
|
||||
return // skip processing the intermediate no-audio track list
|
||||
}
|
||||
|
||||
if (restorePendingDvTrackSelection(tracks)) return
|
||||
|
||||
// Log selected video and audio track details
|
||||
@@ -941,6 +1002,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
|
||||
evaluateAudioCodecForTunneling()
|
||||
evaluateVideoCodecForTunneling()
|
||||
evaluateAssSubtitlesForTunneling(tracks)
|
||||
updateTunnelingState("tracks changed")
|
||||
emitTrackList()
|
||||
}
|
||||
@@ -1253,6 +1315,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
videoAspectContainer?.setAspectRatio(videoAspect)
|
||||
}
|
||||
updateSubtitleViewSize(videoWidth, videoHeight, pixelRatio)
|
||||
updateAssMargins()
|
||||
}
|
||||
|
||||
private fun updateSubtitleViewSize(videoWidth: Int, videoHeight: Int, pixelRatio: Float) {
|
||||
@@ -1265,7 +1328,9 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
val containerHeight = contentView.height
|
||||
if (containerWidth == 0 || containerHeight == 0) return
|
||||
|
||||
// In cover/stretch/zoomed-in modes subtitles stay at container size so they
|
||||
// Sizes the non-ASS SubtitleView only (the ASS overlay is screen-sized and
|
||||
// tracks the video rect via libass margins — see updateAssMargins()).
|
||||
// In cover/stretch/zoomed-in modes text cues stay at container size so they
|
||||
// never get cropped. In letterbox mode they follow the visible video rect.
|
||||
val isLetterbox = videoAspectContainer?.resizeMode == AspectRatioFrameLayout.RESIZE_MODE_FIT
|
||||
val (subWidth, subHeight) = if (isLetterbox) {
|
||||
@@ -1290,10 +1355,97 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
}
|
||||
|
||||
activity.runOnUiThread {
|
||||
// Skip when already at the target size: setLayoutParams always schedules a
|
||||
// layout pass, and this runs from the global-layout listener — re-applying
|
||||
// equal params would keep the UI thread laying out every frame (#1261).
|
||||
val current = subtitle.layoutParams as? FrameLayout.LayoutParams
|
||||
if (current != null &&
|
||||
current.width == subWidth &&
|
||||
current.height == subHeight &&
|
||||
current.gravity == Gravity.CENTER
|
||||
) {
|
||||
return@runOnUiThread
|
||||
}
|
||||
subtitle.layoutParams = FrameLayout.LayoutParams(subWidth, subHeight).apply {
|
||||
gravity = Gravity.CENTER
|
||||
}
|
||||
subtitle.requestLayout()
|
||||
}
|
||||
}
|
||||
|
||||
// Pushes mpv-style libass margins: the offsets of the video dst rect within the
|
||||
// full-screen container (= the libass frame). Negative when the video extends past
|
||||
// the screen (cover mode, zoom > 1) — libass supports that explicitly. Pure math +
|
||||
// a native setter (no view mutation), so it is safe to run per layout pass and per
|
||||
// pinch-zoom tick (#1261 no-churn invariant).
|
||||
private fun updateAssMargins() {
|
||||
if (disposing) return
|
||||
val handler = assHandler ?: return
|
||||
val vs = lastVideoSize ?: return
|
||||
if (vs.width == 0 || vs.height == 0) return
|
||||
|
||||
activity.runOnUiThread {
|
||||
if (disposing) return@runOnUiThread
|
||||
val containerWidth = surfaceContainer?.width ?: 0
|
||||
val containerHeight = surfaceContainer?.height ?: 0
|
||||
if (containerWidth == 0 || containerHeight == 0) return@runOnUiThread
|
||||
|
||||
val videoAspect = (vs.width * vs.pixelWidthHeightRatio) / vs.height
|
||||
val containerAspect = containerWidth.toFloat() / containerHeight
|
||||
val resizeMode = videoAspectContainer?.resizeMode ?: AspectRatioFrameLayout.RESIZE_MODE_FIT
|
||||
|
||||
// Mirror AspectRatioFrameLayout.onMeasure: aspect mismatches <= 1% are
|
||||
// absorbed by stretching to the container instead of resizing.
|
||||
val (baseWidth, baseHeight) = if (kotlin.math.abs(videoAspect / containerAspect - 1f) <= 0.01f) {
|
||||
containerWidth.toFloat() to containerHeight.toFloat()
|
||||
} else {
|
||||
when (resizeMode) {
|
||||
// Cover: scale up to fill the container, cropping the overflow
|
||||
AspectRatioFrameLayout.RESIZE_MODE_ZOOM ->
|
||||
if (videoAspect > containerAspect) {
|
||||
containerHeight * videoAspect to containerHeight.toFloat()
|
||||
} else {
|
||||
containerWidth.toFloat() to containerWidth / videoAspect
|
||||
}
|
||||
// Stretch: video fills the container, aspect overridden
|
||||
AspectRatioFrameLayout.RESIZE_MODE_FILL ->
|
||||
containerWidth.toFloat() to containerHeight.toFloat()
|
||||
// Fit: letterbox within the container
|
||||
else ->
|
||||
if (videoAspect > containerAspect) {
|
||||
containerWidth.toFloat() to containerWidth / videoAspect
|
||||
} else {
|
||||
containerHeight * videoAspect to containerHeight.toFloat()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// videoAspectContainer is centered and zoom-scaled about its center.
|
||||
val videoWidth = Math.round(baseWidth * videoZoomScale)
|
||||
val videoHeight = Math.round(baseHeight * videoZoomScale)
|
||||
val left = (containerWidth - videoWidth) / 2
|
||||
val top = (containerHeight - videoHeight) / 2
|
||||
val right = containerWidth - videoWidth - left
|
||||
val bottom = containerHeight - videoHeight - top
|
||||
|
||||
val margins = intArrayOf(top, bottom, left, right)
|
||||
if (lastAssMargins?.contentEquals(margins) == true) return@runOnUiThread
|
||||
lastAssMargins = margins
|
||||
handler.setMargins(top, bottom, left, right)
|
||||
// Repaint at the current position so changes are visible while paused; during
|
||||
// playback the next video frame's render supersedes it (latest-wins).
|
||||
assSubtitleView?.invalidateSubtitles()
|
||||
}
|
||||
}
|
||||
|
||||
// mpv's sub-ass-force-margins, live-applied from the Dart-managed property: lay out
|
||||
// non-positioned ASS events against the visible screen instead of the video rect.
|
||||
fun setAssForceMargins(force: Boolean) {
|
||||
if (disposing) return
|
||||
activity.runOnUiThread {
|
||||
if (disposing || assForceMargins == force) return@runOnUiThread
|
||||
assForceMargins = force
|
||||
assHandler?.setUseMargins(force)
|
||||
assSubtitleView?.invalidateSubtitles()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1305,13 +1457,17 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
|
||||
fun setBoxFitMode(mode: Int) {
|
||||
if (disposing) return
|
||||
val resizeMode = boxFitModeToResizeMode(mode.coerceIn(0, 2))
|
||||
activity.runOnUiThread {
|
||||
videoAspectContainer?.resizeMode = boxFitModeToResizeMode(mode.coerceIn(0, 2))
|
||||
val container = videoAspectContainer ?: return@runOnUiThread
|
||||
if (container.resizeMode == resizeMode) return@runOnUiThread
|
||||
container.resizeMode = resizeMode
|
||||
lastVideoSize?.let { vs ->
|
||||
if (vs.width > 0 && vs.height > 0) {
|
||||
updateSubtitleViewSize(vs.width, vs.height, vs.pixelWidthHeightRatio)
|
||||
}
|
||||
}
|
||||
updateAssMargins()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1319,6 +1475,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
if (disposing) return
|
||||
val clamped = scale.coerceIn(0.5, 2.0).toFloat()
|
||||
activity.runOnUiThread {
|
||||
if (clamped == videoZoomScale) return@runOnUiThread
|
||||
videoZoomScale = clamped
|
||||
videoAspectContainer?.scaleX = clamped
|
||||
videoAspectContainer?.scaleY = clamped
|
||||
@@ -1327,6 +1484,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
updateSubtitleViewSize(vs.width, vs.height, vs.pixelWidthHeightRatio)
|
||||
}
|
||||
}
|
||||
updateAssMargins()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1671,6 +1829,8 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
|
||||
private fun shouldBlockDirectAudioOutput(format: Format, reason: String): Boolean {
|
||||
val mimeType = format.sampleMimeType ?: return false
|
||||
// Loudness normalization needs decoded PCM for the audiofx chain to act on.
|
||||
if (audioNormalizationEnabled && isEncodedAudioMimeType(mimeType)) return true
|
||||
if (directAudioOutputBlockedAfterFailure.contains(mimeType)) {
|
||||
if (loggedDirectAudioRecoveryBlocks.add("$mimeType|$reason")) {
|
||||
emitLog(
|
||||
@@ -1980,6 +2140,34 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
applyTrackSelectorPolicy(reason = reason, forceSelector = forceSelector)
|
||||
}
|
||||
|
||||
/** True when [format] is an ASS/SSA subtitle track (rendered by libass). */
|
||||
private fun isAssSubtitleFormat(format: Format): Boolean = format.sampleMimeType == MimeTypes.TEXT_SSA || format.codecs == MimeTypes.TEXT_SSA
|
||||
|
||||
/** Sets the ASS-subtitles tunneling block; returns true when the flag changed. */
|
||||
private fun updateAssSubtitlesForTunneling(assActive: Boolean): Boolean {
|
||||
if (assActive == tunnelingDisabledForAssSubtitles) return false
|
||||
tunnelingDisabledForAssSubtitles = assActive
|
||||
emitLog(
|
||||
"info",
|
||||
"tunneling",
|
||||
if (assActive) {
|
||||
"ASS subtitle track selected: tunneling DISABLED (frame metadata required for libass)"
|
||||
} else {
|
||||
"ASS subtitle track deselected: tunneling unblocked"
|
||||
}
|
||||
)
|
||||
return true
|
||||
}
|
||||
|
||||
private fun evaluateAssSubtitlesForTunneling(tracks: Tracks) {
|
||||
val assSelected = tracks.groups.any { group ->
|
||||
group.type == C.TRACK_TYPE_TEXT &&
|
||||
group.isSelected &&
|
||||
(0 until group.length).any { isAssSubtitleFormat(group.getTrackFormat(it)) }
|
||||
}
|
||||
updateAssSubtitlesForTunneling(assSelected)
|
||||
}
|
||||
|
||||
private fun applyTrackSelectorPolicy(
|
||||
reason: String,
|
||||
forceSelector: Boolean = false,
|
||||
@@ -2028,7 +2216,12 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
private fun calculateTunnelingEnabled(): Boolean? {
|
||||
val player = exoPlayer ?: return null
|
||||
val audioDelayActive = (renderersFactory?.audioDelayUs?.get() ?: 0L) != 0L
|
||||
return tunnelingUserEnabled && (player.playbackParameters.speed == 1f) && !tunnelingDisabledForCodec && !audioDelayActive
|
||||
return tunnelingUserEnabled &&
|
||||
(player.playbackParameters.speed == 1f) &&
|
||||
!tunnelingDisabledForCodec &&
|
||||
!tunnelingDisabledForAssSubtitles &&
|
||||
!audioDelayActive &&
|
||||
!audioNormalizationEnabled
|
||||
}
|
||||
|
||||
private fun updateCurrentTunnelingState(reason: String, shouldTunnel: Boolean): Boolean {
|
||||
@@ -2036,7 +2229,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
currentTunneledPlayback = shouldTunnel
|
||||
val speed = exoPlayer?.playbackParameters?.speed ?: 1f
|
||||
val audioDelayActive = (renderersFactory?.audioDelayUs?.get() ?: 0L) != 0L
|
||||
emitLog("info", "tunneling", "Toggling tunneling=$shouldTunnel (reason=$reason, user=$tunnelingUserEnabled, speed=$speed, audioCodecDisabled=$tunnelingDisabledForAudioCodec, videoCodecDisabled=$tunnelingDisabledForVideoCodec, decodedTrueHdPcmDisabled=$tunnelingDisabledForDecodedTrueHdPcm, audioRecoveryDisabled=$tunnelingDisabledForAudioRecovery, audioDelay=$audioDelayActive)")
|
||||
emitLog("info", "tunneling", "Toggling tunneling=$shouldTunnel (reason=$reason, user=$tunnelingUserEnabled, speed=$speed, audioCodecDisabled=$tunnelingDisabledForAudioCodec, videoCodecDisabled=$tunnelingDisabledForVideoCodec, decodedTrueHdPcmDisabled=$tunnelingDisabledForDecodedTrueHdPcm, audioRecoveryDisabled=$tunnelingDisabledForAudioRecovery, assSubtitlesDisabled=$tunnelingDisabledForAssSubtitles, audioDelay=$audioDelayActive, audioNormalization=$audioNormalizationEnabled)")
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -2202,6 +2395,14 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
updateTunnelingState("encoded TrueHD output initialized", forceSelector = true)
|
||||
}
|
||||
}
|
||||
// Re-key the normalization effect to the actual output channel count
|
||||
// (DynamicsProcessing parameters are per-channel).
|
||||
if (audioNormalizationEnabled) attachNormalizationEffect()
|
||||
}
|
||||
|
||||
override fun onAudioSessionIdChanged(eventTime: AnalyticsListener.EventTime, audioSessionId: Int) {
|
||||
emitLog("debug", "audio", "Audio session id: $audioSessionId")
|
||||
if (audioNormalizationEnabled) attachNormalizationEffect()
|
||||
}
|
||||
|
||||
override fun onAudioTrackReleased(
|
||||
@@ -2429,7 +2630,12 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
tunnelingDisabledForVideoCodec = false
|
||||
tunnelingDisabledForDecodedTrueHdPcm = false
|
||||
tunnelingDisabledForAudioRecovery = false
|
||||
tunnelingDisabledForAssSubtitles = false
|
||||
currentTunneledPlayback = false
|
||||
// audioNormalizationEnabled persists across opens (user-level state, like
|
||||
// tunnelingUserEnabled); only the in-flight bounce is abandoned.
|
||||
pendingAudioRendererBounce = false
|
||||
handler.removeCallbacks(audioBounceTimeout)
|
||||
pendingStartPositionMs = startPositionMs
|
||||
pendingPlayWhenReady = autoPlay
|
||||
applyTrackSelectorPolicy(
|
||||
@@ -2479,6 +2685,61 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
updateTunnelingState("audio-delay")
|
||||
}
|
||||
|
||||
fun setAudioNormalization(enabled: Boolean) {
|
||||
if (audioNormalizationEnabled == enabled) return
|
||||
audioNormalizationEnabled = enabled
|
||||
emitLog("info", "audio-normalization", "Loudness normalization ${if (enabled) "enabled" else "disabled"}")
|
||||
if (enabled) attachNormalizationEffect() else audioNormalization.release()
|
||||
|
||||
if (exoPlayer == null) return
|
||||
// A selector-parameter change only re-inits the audio renderer when the
|
||||
// parameters actually differ (the tunneling flag flipping). Otherwise the
|
||||
// renderer keeps its bypass/decode path and the sink's new direct-output
|
||||
// verdict is never consulted — bounce the renderer in that case.
|
||||
val tunnelingWillFlip = calculateTunnelingEnabled() != currentTunneledPlayback
|
||||
val outputEncoding = lastAudioTrackConfig?.encoding
|
||||
val selectedMime = selectedAudioFormat()?.sampleMimeType
|
||||
val needsBounce = !tunnelingWillFlip &&
|
||||
outputEncoding != null &&
|
||||
selectedMime != null &&
|
||||
isEncodedAudioMimeType(selectedMime) &&
|
||||
(if (enabled) !isPcmEncoding(outputEncoding) else isPcmEncoding(outputEncoding))
|
||||
if (needsBounce) {
|
||||
startAudioRendererBounce("audio-normalization")
|
||||
} else {
|
||||
updateTunnelingState("audio-normalization")
|
||||
}
|
||||
}
|
||||
|
||||
private fun attachNormalizationEffect() {
|
||||
val sessionId = exoPlayer?.audioSessionId ?: C.AUDIO_SESSION_ID_UNSET
|
||||
if (sessionId == C.AUDIO_SESSION_ID_UNSET) {
|
||||
emitLog("debug", "audio-normalization", "Audio session id not ready; attach deferred")
|
||||
return // onAudioSessionIdChanged re-attaches
|
||||
}
|
||||
val channels = lastAudioTrackConfig?.channelConfig?.let { Integer.bitCount(it) }
|
||||
audioNormalization.attach(sessionId, channels)
|
||||
}
|
||||
|
||||
// Two-phase audio renderer bounce: disable, wait for the playback thread to
|
||||
// observe it (onTracksChanged with no selected audio), then re-enable so track
|
||||
// selection re-queries the sink's format support. A synchronous flip-back
|
||||
// would be coalesced: the invalidation message reads the latest parameters.
|
||||
private fun startAudioRendererBounce(reason: String) {
|
||||
if (pendingAudioRendererBounce) return
|
||||
pendingAudioRendererBounce = true
|
||||
emitLog("info", "audio-normalization", "Bouncing audio renderer to re-evaluate output path (reason=$reason)")
|
||||
applyTrackSelectorPolicy(reason = "$reason (audio renderer off)", audioDisabled = true)
|
||||
handler.postDelayed(audioBounceTimeout, AUDIO_BOUNCE_TIMEOUT_MS)
|
||||
}
|
||||
|
||||
private fun completeAudioRendererBounce(reason: String) {
|
||||
if (!pendingAudioRendererBounce) return
|
||||
pendingAudioRendererBounce = false
|
||||
handler.removeCallbacks(audioBounceTimeout)
|
||||
applyTrackSelectorPolicy(reason = reason, audioDisabled = false)
|
||||
}
|
||||
|
||||
fun setSubtitleDelay(seconds: Double) {
|
||||
subtitleDelayUs.set((seconds * 1_000_000).toLong())
|
||||
}
|
||||
@@ -2576,6 +2837,10 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
} else {
|
||||
positionMs.coerceAtLeast(0L)
|
||||
}
|
||||
// A user seek is authoritative. Do not let a pending start-position restore
|
||||
// from open/reload recovery re-seek back over an early seek near zero once
|
||||
// ExoPlayer reports STATE_READY.
|
||||
pendingStartPositionMs = 0L
|
||||
player.seekTo(clampedPositionMs)
|
||||
lastPosition = clampedPositionMs
|
||||
delegate?.onPropertyChange("time-pos", clampedPositionMs / 1000.0)
|
||||
@@ -2611,6 +2876,9 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
fun selectSubtitleTrack(trackId: String?) {
|
||||
if (trackId == null || trackId == "no") {
|
||||
selectedSubtitleTrackId = "no"
|
||||
// Flip the tunneling block in the same parameters update as the text
|
||||
// disable so the renderer re-initializes once, not twice.
|
||||
updateAssSubtitlesForTunneling(false)
|
||||
applyTrackSelectorPolicy(
|
||||
reason = "subtitle disabled",
|
||||
textDisabled = true
|
||||
@@ -2621,6 +2889,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
|
||||
val trackGroup = subtitleTrackGroupMap[trackId] ?: return
|
||||
selectedSubtitleTrackId = trackId
|
||||
updateAssSubtitlesForTunneling(isAssSubtitleFormat(trackGroup.getFormat(0)))
|
||||
applyTrackSelectorPolicy(
|
||||
reason = "subtitle track selected",
|
||||
textOverride = TrackSelectionOverride(trackGroup, 0),
|
||||
@@ -2904,6 +3173,26 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
"videoDecoderName" to videoDecoderName,
|
||||
"videoDroppedFrames" to player.videoDecoderCounters?.droppedBufferCount,
|
||||
"videoRenderedFrames" to player.videoDecoderCounters?.renderedOutputBufferCount,
|
||||
// ASS overlay swap timing (vsync-pinned; late = past the swap-time budget)
|
||||
"subSwapCount" to assSubtitleView?.swapCount,
|
||||
"subLateSwaps" to assSubtitleView?.lateSwapCount,
|
||||
"subMaxLateMs" to assSubtitleView?.maxLateMs,
|
||||
// ASS libass render cost (changed renders rewrite the atlas; histogram
|
||||
// buckets: ≤10/≤25/≤42/≤84/>84 ms)
|
||||
"subRenderCount" to assSubtitleView?.renderCount,
|
||||
"subChangedRenders" to assSubtitleView?.changedRenderCount,
|
||||
"subOverflows" to assSubtitleView?.overflowCount,
|
||||
"subLibassLastMs" to assSubtitleView?.lastLibassMs,
|
||||
"subLibassMaxMs" to assSubtitleView?.maxLibassMs,
|
||||
"subLibassHist" to assSubtitleView?.libassMsHistogram,
|
||||
// ASS render-ahead: hits = served from a pre-rendered frame (GL-only path);
|
||||
// minLead ≥ 0 means changed content reached the queue before the video
|
||||
// frame's vsync — the frame-perfection signal.
|
||||
"subSpecHits" to assSubtitleView?.specHits,
|
||||
"subSpecMisses" to assSubtitleView?.specMisses,
|
||||
"subSpecSkips" to assSubtitleView?.specSkips,
|
||||
"subPrefetches" to assSubtitleView?.prefetchCount,
|
||||
"subMinLeadMs" to assSubtitleView?.minLeadChangedMs,
|
||||
// Color info
|
||||
"colorSpace" to videoFormat?.colorInfo?.colorSpace,
|
||||
"colorRange" to videoFormat?.colorInfo?.colorRange,
|
||||
@@ -2922,6 +3211,8 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
"audioOutputTunneling" to audioTrackConfig?.tunneling,
|
||||
"audioOutputOffload" to audioTrackConfig?.offload,
|
||||
"audioOutputBufferSize" to audioTrackConfig?.bufferSize,
|
||||
"audioNormalization" to audioNormalizationEnabled,
|
||||
"audioNormalizationEffect" to audioNormalization.describe,
|
||||
"audioLastSinkError" to lastAudioSinkError,
|
||||
"audioRecoveryAttempts" to audioRecoveryAttempts,
|
||||
"audioRecoveryLastAction" to lastAudioRecoveryAction,
|
||||
@@ -2994,10 +3285,12 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
if (currentTunneledPlayback) return "Active"
|
||||
if (!tunnelingUserEnabled) return "Disabled by user"
|
||||
if (player.playbackParameters.speed != 1f) return "Off (speed ≠ 1×)"
|
||||
if (audioNormalizationEnabled) return "Off (loudness normalization)"
|
||||
if (tunnelingDisabledForAudioRecovery) return "Off (audio recovery)"
|
||||
if (tunnelingDisabledForDecodedTrueHdPcm) return "Off (decoded TrueHD PCM)"
|
||||
if (tunnelingDisabledForVideoCodec) return "Off (video codec unsupported)"
|
||||
if (tunnelingDisabledForAudioCodec) return "Off (no HW audio decoder)"
|
||||
if (tunnelingDisabledForAssSubtitles) return "Off (ASS subtitles active)"
|
||||
return "Off"
|
||||
}
|
||||
|
||||
@@ -3015,6 +3308,11 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
check(Looper.myLooper() == Looper.getMainLooper())
|
||||
Log.d(TAG, "Disposing")
|
||||
|
||||
surfaceContainer?.let { container ->
|
||||
container.visibility = View.INVISIBLE
|
||||
Log.d(TAG, "Hiding surface container during dispose")
|
||||
}
|
||||
|
||||
stopFrameWatchdog()
|
||||
cancelDecoderHangCheck()
|
||||
stopPositionUpdates()
|
||||
@@ -3029,6 +3327,9 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
audioFocusManager?.release()
|
||||
audioFocusManager = null
|
||||
|
||||
audioNormalization.release()
|
||||
pendingAudioRendererBounce = false
|
||||
|
||||
decoderInitName = null
|
||||
audioDecoderInitName = null
|
||||
lastAudioTrackConfig = null
|
||||
@@ -3042,6 +3343,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
tunnelingDisabledForVideoCodec = false
|
||||
tunnelingDisabledForDecodedTrueHdPcm = false
|
||||
tunnelingDisabledForAudioRecovery = false
|
||||
tunnelingDisabledForAssSubtitles = false
|
||||
currentTunneledPlayback = false
|
||||
pendingStartPositionMs = 0L
|
||||
pendingPlayWhenReady = null
|
||||
@@ -3076,6 +3378,7 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
|
||||
videoAspectContainer = null
|
||||
surfaceView = null
|
||||
subtitleView = null
|
||||
assSubtitleView = null
|
||||
|
||||
// Remove layout listener synchronously
|
||||
overlayLayoutListener?.let { listener ->
|
||||
|
||||
@@ -27,6 +27,7 @@ class ExoPlayerPlugin :
|
||||
private const val TAG = "ExoPlayerPlugin"
|
||||
private const val METHOD_CHANNEL = "com.plezy/exo_player"
|
||||
private const val EVENT_CHANNEL = "com.plezy/exo_player/events"
|
||||
private const val MPV_FALLBACK_SWITCH_TIMEOUT_MS = 15_000L
|
||||
}
|
||||
|
||||
private lateinit var methodChannel: MethodChannel
|
||||
@@ -36,6 +37,7 @@ class ExoPlayerPlugin :
|
||||
private var mpvCore: MpvPlayerCore? = null // MPV fallback player
|
||||
private var usingMpvFallback: Boolean = false
|
||||
private var fallbackInProgress: Boolean = false
|
||||
private var pendingMpvFallbackSwitchGeneration: Int? = null
|
||||
private var activity: Activity? = null
|
||||
private var activityBinding: ActivityPluginBinding? = null
|
||||
|
||||
@@ -93,6 +95,7 @@ class ExoPlayerPlugin :
|
||||
mpvCore = null
|
||||
usingMpvFallback = false
|
||||
fallbackInProgress = false
|
||||
clearPendingMpvFallbackSwitch()
|
||||
pendingMpvProperties.clear()
|
||||
activity = null
|
||||
activityBinding = null
|
||||
@@ -108,6 +111,7 @@ class ExoPlayerPlugin :
|
||||
override fun onDetachedFromActivityForConfigChanges() {
|
||||
sessionGeneration++
|
||||
fallbackInProgress = false
|
||||
clearPendingMpvFallbackSwitch()
|
||||
activity = null
|
||||
activityBinding = null
|
||||
Log.d(TAG, "Detached from activity for config changes")
|
||||
@@ -164,6 +168,7 @@ class ExoPlayerPlugin :
|
||||
"setBoxFitMode" -> handleSetBoxFitMode(call, result)
|
||||
"setVideoZoom" -> handleSetVideoZoom(call, result)
|
||||
"setDvConversionMode" -> handleSetDvConversionMode(call, result)
|
||||
"setAudioNormalization" -> handleSetAudioNormalization(call, result)
|
||||
"observeProperty" -> handleObserveProperty(call, result)
|
||||
"setMpvProperty" -> handleSetMpvProperty(call, result)
|
||||
"setLogLevel" -> {
|
||||
@@ -209,6 +214,7 @@ class ExoPlayerPlugin :
|
||||
mpvCore = null
|
||||
usingMpvFallback = false
|
||||
fallbackInProgress = false
|
||||
clearPendingMpvFallbackSwitch()
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -245,6 +251,7 @@ class ExoPlayerPlugin :
|
||||
mpvCore = null
|
||||
usingMpvFallback = false
|
||||
fallbackInProgress = false
|
||||
clearPendingMpvFallbackSwitch()
|
||||
pendingMpvProperties.clear()
|
||||
Log.d(TAG, "Disposed")
|
||||
result.success(null)
|
||||
@@ -265,9 +272,12 @@ class ExoPlayerPlugin :
|
||||
return
|
||||
}
|
||||
|
||||
// Only clear pending MPV properties when MPV is the active backend.
|
||||
// When ExoPlayer is active, keep them for potential ExoPlayer→MPV fallback.
|
||||
// Only clear pending MPV state when MPV is the active backend. A same-core
|
||||
// MPV reload must not inherit a fallback switch that was armed for the
|
||||
// previous load. When ExoPlayer is active, keep queued properties for a
|
||||
// potential ExoPlayer→MPV fallback.
|
||||
if (usingMpvFallback) {
|
||||
clearPendingMpvFallbackSwitch()
|
||||
pendingMpvProperties.clear()
|
||||
}
|
||||
|
||||
@@ -608,6 +618,23 @@ class ExoPlayerPlugin :
|
||||
} ?: result.error("NO_ACTIVITY", "Activity not available", null)
|
||||
}
|
||||
|
||||
private fun handleSetAudioNormalization(call: MethodCall, result: MethodChannel.Result) {
|
||||
val enabled = call.argument<Boolean>("enabled")
|
||||
if (enabled == null) {
|
||||
result.error("INVALID_ARGS", "Missing 'enabled'", null)
|
||||
return
|
||||
}
|
||||
if (usingMpvFallback) {
|
||||
// mpv applies loudnorm via the 'af' property the Dart layer also sends.
|
||||
result.success(true)
|
||||
return
|
||||
}
|
||||
activity?.runOnUiThread {
|
||||
playerCore?.setAudioNormalization(enabled)
|
||||
result.success(true)
|
||||
} ?: result.error("NO_ACTIVITY", "Activity not available", null)
|
||||
}
|
||||
|
||||
private fun handleSetMpvProperty(call: MethodCall, result: MethodChannel.Result) {
|
||||
val name = call.argument<String>("name")
|
||||
val value = call.argument<String>("value")
|
||||
@@ -622,6 +649,9 @@ class ExoPlayerPlugin :
|
||||
when (name) {
|
||||
"audio-delay" -> playerCore?.setAudioDelay(value.toDoubleOrNull() ?: 0.0)
|
||||
"sub-delay" -> playerCore?.setSubtitleDelay(value.toDoubleOrNull() ?: 0.0)
|
||||
// mpv semantics mirrored on the libass overlay: anchor non-positioned ASS
|
||||
// events to the visible screen (Dart sets 'yes' for cover mode / zoom > 1)
|
||||
"sub-ass-force-margins" -> playerCore?.setAssForceMargins(value == "yes")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -677,6 +707,8 @@ class ExoPlayerPlugin :
|
||||
"audio-bitrate" to mpv.getProperty("audio-bitrate"),
|
||||
// Performance metrics
|
||||
"total-avsync-change" to mpv.getProperty("total-avsync-change"),
|
||||
"cache-used" to mpv.getProperty("cache-used"),
|
||||
"demuxer-max-bytes" to mpv.getProperty("demuxer-max-bytes"),
|
||||
"cache-speed" to mpv.getProperty("cache-speed"),
|
||||
"frame-drop-count" to mpv.getProperty("frame-drop-count"),
|
||||
"decoder-frame-drop-count" to mpv.getProperty("decoder-frame-drop-count"),
|
||||
@@ -724,13 +756,44 @@ class ExoPlayerPlugin :
|
||||
mainHandler.post { eventSink?.success(listOf(propId, value)) }
|
||||
}
|
||||
|
||||
override fun onEvent(name: String, data: Map<String, Any>?) {
|
||||
private fun eventPayload(name: String, data: Map<String, Any>? = null): Map<String, Any> {
|
||||
val event = mutableMapOf<String, Any>(
|
||||
"type" to "event",
|
||||
"name" to name
|
||||
)
|
||||
data?.let { event["data"] = it }
|
||||
mainHandler.post { eventSink?.success(event) }
|
||||
return event
|
||||
}
|
||||
|
||||
override fun onEvent(name: String, data: Map<String, Any>?) {
|
||||
val pendingFallbackSwitch =
|
||||
name == "file-loaded" && pendingMpvFallbackSwitchGeneration == sessionGeneration && usingMpvFallback
|
||||
if (pendingFallbackSwitch) {
|
||||
clearPendingMpvFallbackSwitch()
|
||||
}
|
||||
|
||||
val event = eventPayload(name, data)
|
||||
mainHandler.post {
|
||||
eventSink?.success(event)
|
||||
if (pendingFallbackSwitch) {
|
||||
eventSink?.success(eventPayload("backend-switched"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun armPendingMpvFallbackSwitch(generation: Int) {
|
||||
pendingMpvFallbackSwitchGeneration = generation
|
||||
mainHandler.postDelayed({
|
||||
if (pendingMpvFallbackSwitchGeneration == generation && sessionGeneration == generation && usingMpvFallback) {
|
||||
Log.w(TAG, "Timed out waiting for MPV fallback file-loaded before backend-switched")
|
||||
clearPendingMpvFallbackSwitch()
|
||||
onEvent("backend-switched", null)
|
||||
}
|
||||
}, MPV_FALLBACK_SWITCH_TIMEOUT_MS)
|
||||
}
|
||||
|
||||
private fun clearPendingMpvFallbackSwitch() {
|
||||
pendingMpvFallbackSwitchGeneration = null
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -783,6 +846,7 @@ class ExoPlayerPlugin :
|
||||
if (mpvCore !== core) {
|
||||
core.dispose()
|
||||
fallbackInProgress = false
|
||||
clearPendingMpvFallbackSwitch()
|
||||
return
|
||||
}
|
||||
// Configure basic MPV properties for Plex playback
|
||||
@@ -817,6 +881,7 @@ class ExoPlayerPlugin :
|
||||
options.add("http-header-fields-append=$key: $value")
|
||||
}
|
||||
val optionsStr = options.joinToString(",")
|
||||
armPendingMpvFallbackSwitch(sessionGeneration)
|
||||
core.command(arrayOf("loadfile", mpvUri, "replace", "-1", optionsStr))
|
||||
|
||||
// On GPUs without compute shaders, MPV can't do dynamic peak detection
|
||||
@@ -835,11 +900,6 @@ class ExoPlayerPlugin :
|
||||
// Request audio focus
|
||||
core.requestAudioFocus()
|
||||
|
||||
// Emit backend-switched event on main thread
|
||||
activity?.runOnUiThread {
|
||||
onEvent("backend-switched", null)
|
||||
}
|
||||
|
||||
Log.i(TAG, "Successfully switched to MPV fallback")
|
||||
}
|
||||
|
||||
@@ -877,17 +937,20 @@ class ExoPlayerPlugin :
|
||||
mpvCore?.dispose()
|
||||
mpvCore = null
|
||||
usingMpvFallback = false // Clear before handoff
|
||||
clearPendingMpvFallbackSwitch()
|
||||
|
||||
val generation = sessionGeneration
|
||||
|
||||
Handler(Looper.getMainLooper()).post {
|
||||
if (generation != sessionGeneration) {
|
||||
fallbackInProgress = false
|
||||
clearPendingMpvFallbackSwitch()
|
||||
return@post
|
||||
}
|
||||
val act = activity
|
||||
if (act == null) {
|
||||
fallbackInProgress = false
|
||||
clearPendingMpvFallbackSwitch()
|
||||
return@post
|
||||
}
|
||||
|
||||
@@ -904,6 +967,7 @@ class ExoPlayerPlugin :
|
||||
mpvCore = null
|
||||
}
|
||||
fallbackInProgress = false
|
||||
clearPendingMpvFallbackSwitch()
|
||||
return@initialize
|
||||
}
|
||||
if (!success) {
|
||||
@@ -912,6 +976,7 @@ class ExoPlayerPlugin :
|
||||
mpvCore = null
|
||||
}
|
||||
fallbackInProgress = false
|
||||
clearPendingMpvFallbackSwitch()
|
||||
Log.e(TAG, "Failed to initialize MPV fallback")
|
||||
onEvent("end-file", mapOf("reason" to "error", "message" to "Fallback failed: $errorMessage"))
|
||||
return@initialize
|
||||
@@ -924,12 +989,14 @@ class ExoPlayerPlugin :
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
fallbackInProgress = false
|
||||
clearPendingMpvFallbackSwitch()
|
||||
Log.e(TAG, "Failed to switch to MPV fallback", e)
|
||||
onEvent("end-file", mapOf("reason" to "error", "message" to "Fallback failed: ${e.message}"))
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
fallbackInProgress = false
|
||||
clearPendingMpvFallbackSwitch()
|
||||
Log.e(TAG, "Failed to switch to MPV fallback", e)
|
||||
onEvent("end-file", mapOf("reason" to "error", "message" to "Fallback failed: ${e.message}"))
|
||||
}
|
||||
|
||||
@@ -344,9 +344,18 @@ internal class DvSanitizingVideoRenderer(
|
||||
private val log: ((String, String, String) -> Unit)?
|
||||
) : MediaCodecVideoRenderer(builder) {
|
||||
|
||||
private val sanitizer = DvBitstreamSanitizer()
|
||||
|
||||
private var stripHdr10PlusSei = false
|
||||
private var stripDvRpu = false
|
||||
|
||||
// Sanitize diagnostics — playback-thread only, cumulative for the renderer's lifetime.
|
||||
private var sanitizedSampleCount = 0L
|
||||
private var totalSanitizeTimeUs = 0L
|
||||
private var maxSanitizeTimeUs = 0L
|
||||
private var totalStrippedNals = 0L
|
||||
private var totalStrippedBytes = 0L
|
||||
|
||||
override fun onCodecInitialized(
|
||||
name: String,
|
||||
configuration: MediaCodecAdapter.Configuration,
|
||||
@@ -378,7 +387,25 @@ internal class DvSanitizingVideoRenderer(
|
||||
if (stripHdr10PlusSei || stripDvRpu) {
|
||||
val data = buffer.data
|
||||
if (data != null && data.hasRemaining() && !buffer.isEncrypted) {
|
||||
DvBitstreamSanitizer.sanitize(data, stripHdr10PlusSei, stripDvRpu)
|
||||
val sizeBefore = data.remaining()
|
||||
val startNs = System.nanoTime()
|
||||
val stripped = sanitizer.sanitize(data, stripHdr10PlusSei, stripDvRpu)
|
||||
val elapsedUs = (System.nanoTime() - startNs) / 1_000
|
||||
sanitizedSampleCount++
|
||||
totalSanitizeTimeUs += elapsedUs
|
||||
if (elapsedUs > maxSanitizeTimeUs) maxSanitizeTimeUs = elapsedUs
|
||||
totalStrippedNals += stripped
|
||||
totalStrippedBytes += sizeBefore - data.remaining()
|
||||
if (sanitizedSampleCount <= 3 || sanitizedSampleCount % 500 == 0L) {
|
||||
log?.invoke(
|
||||
"debug",
|
||||
"dv-sanitize",
|
||||
"Sample #$sanitizedSampleCount: ${sizeBefore}B -> ${data.remaining()}B, " +
|
||||
"stripped=$stripped, took=${elapsedUs}us " +
|
||||
"(avg=${totalSanitizeTimeUs / sanitizedSampleCount}us, max=${maxSanitizeTimeUs}us, " +
|
||||
"totalNals=$totalStrippedNals, totalBytes=${totalStrippedBytes}B)"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
super.onQueueInputBuffer(buffer)
|
||||
|
||||
@@ -7,8 +7,8 @@ import androidx.media3.extractor.SeekMap
|
||||
import androidx.media3.extractor.TrackOutput
|
||||
import androidx.media3.extractor.mkv.MatroskaExtractor
|
||||
import androidx.media3.extractor.text.SubtitleParser
|
||||
import io.github.peerless2012.ass.media.AssHandler
|
||||
import io.github.peerless2012.ass.media.extractor.AssMatroskaExtractor
|
||||
import com.edde746.plezy.libass.media.AssHandler
|
||||
import com.edde746.plezy.libass.media.extractor.AssMatroskaExtractor
|
||||
|
||||
/**
|
||||
* Extends AssMatroskaExtractor to add support for MKV ContentCompAlgo 0 (zlib).
|
||||
|
||||
@@ -813,6 +813,11 @@ class MpvPlayerCore(private val activity: Activity) : SurfaceHolder.Callback {
|
||||
check(Looper.myLooper() == Looper.getMainLooper())
|
||||
Log.d(TAG, "Disposing")
|
||||
|
||||
surfaceContainer?.let { container ->
|
||||
container.visibility = View.INVISIBLE
|
||||
Log.d(TAG, "Hiding surface container during dispose")
|
||||
}
|
||||
|
||||
handler.removeCallbacksAndMessages(null)
|
||||
|
||||
// Clean up frame rate and audio focus.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
<item android:drawable="@color/splash_background" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- TV (Android TV / Google TV / Fire TV) launch + window background.
|
||||
The television UI-mode qualifier outranks night/notnight, so this wins
|
||||
even on TVs that report notnight (most do) where values/ would resolve
|
||||
the near-white #F7F7F8. Black matches the OLED default theme on TV. -->
|
||||
<color name="splash_background">#000000</color>
|
||||
</resources>
|
||||
+128
-16
@@ -8,6 +8,8 @@ import org.junit.Test
|
||||
|
||||
class DvBitstreamSanitizerTest {
|
||||
|
||||
private val sanitizer = DvBitstreamSanitizer()
|
||||
|
||||
// --- HDR10+ SEI stripping (native DV codec path) ---
|
||||
|
||||
@Test
|
||||
@@ -17,7 +19,7 @@ class DvBitstreamSanitizerTest {
|
||||
val buffer = bufferOf(vcl1, hdr10PlusSei(), vcl2)
|
||||
val originalLimit = buffer.limit()
|
||||
|
||||
DvBitstreamSanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
|
||||
assertArrayEquals(concat(vcl1, vcl2), remainingBytes(buffer))
|
||||
assertTrue(buffer.limit() < originalLimit)
|
||||
@@ -30,7 +32,7 @@ class DvBitstreamSanitizerTest {
|
||||
val suffixSei = annexBNal(40, hdr10PlusSeiPayload())
|
||||
val buffer = bufferOf(vcl, suffixSei)
|
||||
|
||||
DvBitstreamSanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
|
||||
assertArrayEquals(vcl, remainingBytes(buffer))
|
||||
}
|
||||
@@ -42,7 +44,7 @@ class DvBitstreamSanitizerTest {
|
||||
val vcl2 = annexBNal(1, byteArrayOf(0x03), startCodeLen = 3)
|
||||
val buffer = bufferOf(vcl1, sei, vcl2)
|
||||
|
||||
DvBitstreamSanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
|
||||
assertArrayEquals(concat(vcl1, vcl2), remainingBytes(buffer))
|
||||
}
|
||||
@@ -57,7 +59,7 @@ class DvBitstreamSanitizerTest {
|
||||
val buffer = bufferOf(annexBNal(1, byteArrayOf(0x01)), sei, annexBNal(1, byteArrayOf(0x02)))
|
||||
val original = remainingBytes(buffer)
|
||||
|
||||
DvBitstreamSanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
|
||||
assertArrayEquals(original, remainingBytes(buffer))
|
||||
}
|
||||
@@ -67,7 +69,7 @@ class DvBitstreamSanitizerTest {
|
||||
val buffer = bufferOf(annexBNal(1, byteArrayOf(0x01, 0x02)), annexBNal(1, byteArrayOf(0x03)))
|
||||
val original = remainingBytes(buffer)
|
||||
|
||||
DvBitstreamSanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = true)
|
||||
sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = true)
|
||||
|
||||
assertArrayEquals(original, remainingBytes(buffer))
|
||||
}
|
||||
@@ -79,7 +81,7 @@ class DvBitstreamSanitizerTest {
|
||||
val buffer = bufferOf(annexBNal(1, byteArrayOf(0x01)), truncated)
|
||||
val original = remainingBytes(buffer)
|
||||
|
||||
DvBitstreamSanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
|
||||
assertArrayEquals(original, remainingBytes(buffer))
|
||||
}
|
||||
@@ -89,7 +91,7 @@ class DvBitstreamSanitizerTest {
|
||||
val buffer = bufferOf(annexBNal(1, byteArrayOf(0x01)), hdr10PlusSei())
|
||||
val original = remainingBytes(buffer)
|
||||
|
||||
DvBitstreamSanitizer.sanitize(buffer, stripHdr10PlusSei = false, stripDvRpu = false)
|
||||
sanitizer.sanitize(buffer, stripHdr10PlusSei = false, stripDvRpu = false)
|
||||
|
||||
assertArrayEquals(original, remainingBytes(buffer))
|
||||
}
|
||||
@@ -104,7 +106,7 @@ class DvBitstreamSanitizerTest {
|
||||
val sei = hdr10PlusSei()
|
||||
val buffer = bufferOf(vcl, rpu, sei, el)
|
||||
|
||||
DvBitstreamSanitizer.sanitize(buffer, stripHdr10PlusSei = false, stripDvRpu = true)
|
||||
sanitizer.sanitize(buffer, stripHdr10PlusSei = false, stripDvRpu = true)
|
||||
|
||||
assertArrayEquals(concat(vcl, sei), remainingBytes(buffer))
|
||||
}
|
||||
@@ -115,7 +117,7 @@ class DvBitstreamSanitizerTest {
|
||||
val vcl2 = annexBNal(1, byteArrayOf(0x05))
|
||||
val buffer = bufferOf(vcl1, annexBNal(62, byteArrayOf(0x19)), hdr10PlusSei(), vcl2)
|
||||
|
||||
DvBitstreamSanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = true)
|
||||
sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = true)
|
||||
|
||||
assertArrayEquals(concat(vcl1, vcl2), remainingBytes(buffer))
|
||||
}
|
||||
@@ -130,7 +132,7 @@ class DvBitstreamSanitizerTest {
|
||||
val buffer = ByteBuffer.wrap(content.copyOf())
|
||||
buffer.position(prefix.size)
|
||||
|
||||
DvBitstreamSanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
|
||||
assertEquals(prefix.size, buffer.position())
|
||||
assertArrayEquals(vcl, remainingBytes(buffer))
|
||||
@@ -142,12 +144,9 @@ class DvBitstreamSanitizerTest {
|
||||
@Test
|
||||
fun worksOnDirectBuffers() {
|
||||
val vcl = annexBNal(1, byteArrayOf(0x01, 0x02))
|
||||
val content = concat(vcl, hdr10PlusSei())
|
||||
val buffer = ByteBuffer.allocateDirect(content.size)
|
||||
buffer.put(content)
|
||||
buffer.flip()
|
||||
val buffer = directBufferOf(vcl, hdr10PlusSei())
|
||||
|
||||
DvBitstreamSanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
|
||||
assertArrayEquals(vcl, remainingBytes(buffer))
|
||||
}
|
||||
@@ -156,12 +155,117 @@ class DvBitstreamSanitizerTest {
|
||||
fun emptyBufferIsNoOp() {
|
||||
val buffer = ByteBuffer.allocate(0)
|
||||
|
||||
DvBitstreamSanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = true)
|
||||
sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = true)
|
||||
|
||||
assertEquals(0, buffer.position())
|
||||
assertEquals(0, buffer.limit())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun stripsOnDirectBufferWithNonZeroPosition() {
|
||||
val vcl1 = annexBNal(1, byteArrayOf(0x01, 0x02))
|
||||
val vcl2 = annexBNal(1, byteArrayOf(0x03))
|
||||
val buffer = directBufferOf(byteArrayOf(0xAA.toByte(), 0xBB.toByte()), vcl1, hdr10PlusSei(), vcl2)
|
||||
buffer.position(2)
|
||||
|
||||
val stripped = sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
|
||||
assertEquals(1, stripped)
|
||||
assertEquals(2, buffer.position())
|
||||
assertArrayEquals(concat(vcl1, vcl2), remainingBytes(buffer))
|
||||
// Bytes before the position are untouched.
|
||||
assertEquals(0xAA.toByte(), buffer.get(0))
|
||||
assertEquals(0xBB.toByte(), buffer.get(1))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun noStripLeavesDirectBufferStateUntouched() {
|
||||
val vcl1 = annexBNal(1, byteArrayOf(0x01, 0x02))
|
||||
val vcl2 = annexBNal(1, byteArrayOf(0x03))
|
||||
val buffer = directBufferOf(vcl1, vcl2)
|
||||
val originalLimit = buffer.limit()
|
||||
|
||||
val stripped = sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = true)
|
||||
|
||||
assertEquals(0, stripped)
|
||||
assertEquals(0, buffer.position())
|
||||
assertEquals(originalLimit, buffer.limit())
|
||||
assertArrayEquals(concat(vcl1, vcl2), remainingBytes(buffer))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun stripsTrailingRpuWithZeroByteTailWriteBack() {
|
||||
val vcl1 = annexBNal(1, byteArrayOf(0x01, 0x02))
|
||||
val vcl2 = annexBNal(1, byteArrayOf(0x03))
|
||||
val rpu = annexBNal(62, byteArrayOf(0x19, 0x08))
|
||||
val buffer = directBufferOf(vcl1, vcl2, rpu)
|
||||
val originalLimit = buffer.limit()
|
||||
|
||||
val stripped = sanitizer.sanitize(buffer, stripHdr10PlusSei = false, stripDvRpu = true)
|
||||
|
||||
assertEquals(1, stripped)
|
||||
assertEquals(originalLimit - rpu.size, buffer.limit())
|
||||
assertArrayEquals(concat(vcl1, vcl2), remainingBytes(buffer))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun growsScratchForLargeSamples() {
|
||||
// Exceeds the initial 256KB scratch and one doubling; non-zero filler so no
|
||||
// accidental start codes appear in the payloads.
|
||||
val vcl1 = annexBNal(1, ByteArray(800_000) { 0xAB.toByte() })
|
||||
val vcl2 = annexBNal(1, ByteArray(700_000) { 0xCD.toByte() })
|
||||
val buffer = bufferOf(vcl1, hdr10PlusSei(), vcl2)
|
||||
|
||||
val stripped = sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
|
||||
assertEquals(1, stripped)
|
||||
assertArrayEquals(concat(vcl1, vcl2), remainingBytes(buffer))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun reusesSanitizerAcrossSequentialBuffers() {
|
||||
val vcl1 = annexBNal(1, byteArrayOf(0x01, 0x02))
|
||||
val vcl2 = annexBNal(1, byteArrayOf(0x03, 0x04))
|
||||
|
||||
val first = bufferOf(vcl1, hdr10PlusSei(), vcl2)
|
||||
assertEquals(1, sanitizer.sanitize(first, stripHdr10PlusSei = true, stripDvRpu = false))
|
||||
assertArrayEquals(concat(vcl1, vcl2), remainingBytes(first))
|
||||
|
||||
val second = bufferOf(vcl1, vcl2)
|
||||
assertEquals(0, sanitizer.sanitize(second, stripHdr10PlusSei = true, stripDvRpu = false))
|
||||
assertArrayEquals(concat(vcl1, vcl2), remainingBytes(second))
|
||||
|
||||
val third = bufferOf(hdr10PlusSei(), vcl1, annexBNal(62, byteArrayOf(0x19)), vcl2, hdr10PlusSei())
|
||||
assertEquals(3, sanitizer.sanitize(third, stripHdr10PlusSei = true, stripDvRpu = true))
|
||||
assertArrayEquals(concat(vcl1, vcl2), remainingBytes(third))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun keepsBufferWithoutStartCodes() {
|
||||
val content = byteArrayOf(0x12, 0x34, 0x56, 0x78)
|
||||
val buffer = ByteBuffer.wrap(content.copyOf())
|
||||
|
||||
val stripped = sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = true)
|
||||
|
||||
assertEquals(0, stripped)
|
||||
assertEquals(0, buffer.position())
|
||||
assertEquals(content.size, buffer.limit())
|
||||
assertArrayEquals(content, remainingBytes(buffer))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun stripsMultipleSeisInOneAccessUnit() {
|
||||
val vcl1 = annexBNal(1, byteArrayOf(0x01, 0x02))
|
||||
val vcl2 = annexBNal(1, byteArrayOf(0x03))
|
||||
val suffixSei = annexBNal(40, hdr10PlusSeiPayload())
|
||||
val buffer = bufferOf(vcl1, hdr10PlusSei(), vcl2, suffixSei)
|
||||
|
||||
val stripped = sanitizer.sanitize(buffer, stripHdr10PlusSei = true, stripDvRpu = false)
|
||||
|
||||
assertEquals(2, stripped)
|
||||
assertArrayEquals(concat(vcl1, vcl2), remainingBytes(buffer))
|
||||
}
|
||||
|
||||
// --- Helpers ---
|
||||
|
||||
/** Builds an HEVC NAL unit: start code + 2-byte NAL header encoding [nalUnitType] + payload. */
|
||||
@@ -193,6 +297,14 @@ class DvBitstreamSanitizerTest {
|
||||
|
||||
private fun bufferOf(vararg parts: ByteArray): ByteBuffer = ByteBuffer.wrap(concat(*parts))
|
||||
|
||||
private fun directBufferOf(vararg parts: ByteArray): ByteBuffer {
|
||||
val content = concat(*parts)
|
||||
val buffer = ByteBuffer.allocateDirect(content.size)
|
||||
buffer.put(content)
|
||||
buffer.flip()
|
||||
return buffer
|
||||
}
|
||||
|
||||
private fun remainingBytes(buffer: ByteBuffer): ByteArray {
|
||||
val copy = ByteArray(buffer.remaining())
|
||||
buffer.duplicate().get(copy)
|
||||
|
||||
@@ -2,6 +2,28 @@ allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
if (providers.gradleProperty("localAssCore").isPresent) {
|
||||
// Opt-in A/B of a locally built libass native core: build it in the
|
||||
// libass-android fork with `./gradlew :lib_ass:publishToMavenLocal
|
||||
// -PVERSION_NAME=0.4.0-local`, then build this app with -PlocalAssCore.
|
||||
mavenLocal()
|
||||
} else {
|
||||
// Production libass native core: the -O3/NEON/asm AAR published on
|
||||
// the edde746/libass-android fork's releases (the upstream Maven
|
||||
// artifact io.github.peerless2012:ass ships un-optimized natives —
|
||||
// see the fork's pinned libass-cmake fix). Resolved as
|
||||
// <tag>/ass-<tag>.aar with no metadata probing.
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
ivy {
|
||||
url = uri("https://github.com/edde746/libass-android/releases/download")
|
||||
patternLayout { artifact("[revision]/[artifact]-[revision].[ext]") }
|
||||
metadataSources { artifact() }
|
||||
}
|
||||
}
|
||||
filter { includeModule("io.github.peerless2012", "ass") }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
// libass ASS subtitle rendering: Kotlin/JNI bindings + Media3 integration
|
||||
// (extractor, parsers, AssHandler, GL atlas overlay). The native libass core
|
||||
// (libass.so + prefab headers) comes from the Maven artifact
|
||||
// io.github.peerless2012:ass; this module compiles its JNI against it.
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.edde746.plezy.libass"
|
||||
compileSdk = 36
|
||||
// Matches flutter.ndkVersion so only one NDK is provisioned. This module's
|
||||
// CMake build (-DANDROID_STL=c++_shared) contributes NDK 28.2's
|
||||
// libc++_shared.so to packaging, but that copy is NOT what ships: the app
|
||||
// packages the libmpv AAR's newer copy with top merge priority (see
|
||||
// app/build.gradle.kts packaging { jniLibs } + sourceSets).
|
||||
ndkVersion = "28.2.13676358"
|
||||
|
||||
defaultConfig {
|
||||
minSdk = 21
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
if (project.hasProperty("localAssCore")) {
|
||||
// The locally published A/B core only ships device ABIs (x86 would need
|
||||
// nasm on the host); match it so prefab resolution doesn't fail.
|
||||
ndk {
|
||||
abiFilters += listOf("armeabi-v7a", "arm64-v8a")
|
||||
}
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
// libass.so in the prefab AAR is built against c++_shared (abi.json: stl=c++_shared);
|
||||
// prefab validates consumer STL compatibility.
|
||||
arguments += listOf("-DANDROID_STL=c++_shared")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
prefab = true
|
||||
}
|
||||
|
||||
packaging {
|
||||
jniLibs {
|
||||
// libass.so is a prefab IMPORTED target (linked, not owned) — the app packages
|
||||
// it from the io.github.peerless2012:ass AAR; don't duplicate it here.
|
||||
excludes.add("**/libass.so")
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
path = file("src/main/cpp/CMakeLists.txt")
|
||||
version = "3.22.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// compileOnly: prefab headers + link-time libass.so come from the AAR; runtime
|
||||
// packaging of libass.so is the app's implementation dependency.
|
||||
// -PlocalAssCore swaps in a mavenLocal()-published core for A/B tests (must
|
||||
// match the app module's version so one libass.so is linked and packaged).
|
||||
val assCoreVersion = if (project.hasProperty("localAssCore")) "0.4.0-local" else "0.4.1-plezy.1"
|
||||
compileOnly("io.github.peerless2012:ass:$assCoreVersion@aar")
|
||||
|
||||
implementation("androidx.annotation:annotation:1.9.1")
|
||||
implementation("androidx.annotation:annotation-experimental:1.5.1")
|
||||
implementation("androidx.media3:media3-exoplayer:1.9.2")
|
||||
implementation("androidx.media3:media3-ui:1.9.2")
|
||||
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
# Constructed from JNI via FindClass/NewObject (AssKt.c).
|
||||
-keep class com.edde746.plezy.libass.AssAtlasFrame { *; }
|
||||
# JNI exports bind by name (Java_com_edde746_plezy_libass_*); keep the names stable.
|
||||
-keepclasseswithmembernames class com.edde746.plezy.libass.* {
|
||||
native <methods>;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,436 @@
|
||||
// JNI bindings for libass. Exports use standard Java_<package>_<Class>_<method>
|
||||
// naming so no RegisterNatives/JNI_OnLoad registration is needed.
|
||||
#include <android/log.h>
|
||||
#include <jni.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
static inline long long nowMs(void) {
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
return (long long)ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
|
||||
}
|
||||
|
||||
#include "ass/ass.h"
|
||||
|
||||
#define LOG_TAG "SubtitleRenderer"
|
||||
|
||||
static void assMessageCallback(int level, const char* fmt, va_list args, void* data) {
|
||||
if (level > 4) return;
|
||||
|
||||
if (level >= 2) {
|
||||
__android_log_vprint(ANDROID_LOG_WARN, LOG_TAG, fmt, args);
|
||||
} else {
|
||||
__android_log_vprint(ANDROID_LOG_ERROR, LOG_TAG, fmt, args);
|
||||
}
|
||||
}
|
||||
|
||||
// --- Ass (library) ---
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_com_edde746_plezy_libass_Ass_nativeAssInit(JNIEnv* env, jclass clazz) {
|
||||
ASS_Library* assLibrary = ass_library_init();
|
||||
ass_set_message_cb(assLibrary, assMessageCallback, NULL);
|
||||
ass_set_extract_fonts(assLibrary, 1);
|
||||
return (jlong)assLibrary;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_edde746_plezy_libass_Ass_nativeAssAddFont(
|
||||
JNIEnv* env, jclass clazz, jlong ass, jstring name, jbyteArray byteArray) {
|
||||
jsize length = (*env)->GetArrayLength(env, byteArray);
|
||||
jbyte* bytePtr = (*env)->GetByteArrayElements(env, byteArray, NULL);
|
||||
if (bytePtr == NULL) {
|
||||
return;
|
||||
}
|
||||
const char* cName = (*env)->GetStringUTFChars(env, name, NULL);
|
||||
ass_add_font(((ASS_Library*)ass), cName, (char*)bytePtr, length);
|
||||
(*env)->ReleaseByteArrayElements(env, byteArray, bytePtr, 0);
|
||||
if (cName != NULL) {
|
||||
(*env)->ReleaseStringUTFChars(env, name, cName);
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_edde746_plezy_libass_Ass_nativeAssDeinit(JNIEnv* env, jclass clazz, jlong ass) {
|
||||
if (ass) {
|
||||
ass_library_done((ASS_Library*)ass);
|
||||
}
|
||||
}
|
||||
|
||||
// --- AssTrack ---
|
||||
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_com_edde746_plezy_libass_AssTrack_nativeAssTrackInit(JNIEnv* env, jclass clazz, jlong ass) {
|
||||
return (jlong)ass_new_track((ASS_Library*)ass);
|
||||
}
|
||||
|
||||
// Shared body of readBuffer/readChunk: pins the byte array and feeds libass.
|
||||
// chunked != 0 routes to ass_process_chunk (timed dialogue), else ass_process_data.
|
||||
static void processTrackBytes(
|
||||
JNIEnv* env, jlong track, jbyteArray buffer, jint offset, jint length, jlong start, jlong duration, int chunked) {
|
||||
if (!track) return;
|
||||
jbyte* elements = (*env)->GetByteArrayElements(env, buffer, NULL);
|
||||
if (elements == NULL) {
|
||||
return;
|
||||
}
|
||||
if (chunked) {
|
||||
ass_process_chunk((ASS_Track*)track, (char*)(elements + offset), length, start, duration);
|
||||
} else {
|
||||
ass_process_data((ASS_Track*)track, (char*)(elements + offset), length);
|
||||
}
|
||||
(*env)->ReleaseByteArrayElements(env, buffer, elements, 0);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_edde746_plezy_libass_AssTrack_nativeAssTrackReadBuffer(
|
||||
JNIEnv* env, jclass clazz, jlong track, jbyteArray buffer, jint offset, jint length) {
|
||||
processTrackBytes(env, track, buffer, offset, length, 0, 0, 0);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_edde746_plezy_libass_AssTrack_nativeAssTrackReadChunk(
|
||||
JNIEnv* env, jclass clazz, jlong track, jlong start, jlong duration, jbyteArray buffer, jint offset, jint length) {
|
||||
processTrackBytes(env, track, buffer, offset, length, start, duration, 1);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_edde746_plezy_libass_AssTrack_nativeAssTrackDeinit(JNIEnv* env, jclass clazz, jlong track) {
|
||||
if (!track) return;
|
||||
ass_free_track((ASS_Track*)track);
|
||||
}
|
||||
|
||||
// Earliest event Start strictly after afterMs, or -1. Lets the render pipeline
|
||||
// pre-render (cache-warm) the next upcoming event during idle stretches so
|
||||
// heavy typesetting doesn't pay its cache-cold rasterization at appearance.
|
||||
JNIEXPORT jlong JNICALL Java_com_edde746_plezy_libass_AssTrack_nativeAssTrackNextEventStart(
|
||||
JNIEnv* env, jclass clazz, jlong track, jlong afterMs) {
|
||||
if (!track) return -1;
|
||||
ASS_Track* t = (ASS_Track*)track;
|
||||
long long best = -1;
|
||||
for (int i = 0; i < t->n_events; i++) {
|
||||
const long long start = t->events[i].Start;
|
||||
if (start > afterMs && (best < 0 || start < best)) best = start;
|
||||
}
|
||||
return (jlong)best;
|
||||
}
|
||||
|
||||
// Earliest visible-content boundary (event Start OR End) strictly after afterMs,
|
||||
// or -1. A cache-warming prefetch is only invisible while no boundary passes:
|
||||
// the render pipeline uses this to ensure nothing on screen is due to change
|
||||
// before the event it is about to warm.
|
||||
JNIEXPORT jlong JNICALL Java_com_edde746_plezy_libass_AssTrack_nativeAssTrackNextEventChange(
|
||||
JNIEnv* env, jclass clazz, jlong track, jlong afterMs) {
|
||||
if (!track) return -1;
|
||||
ASS_Track* t = (ASS_Track*)track;
|
||||
long long best = -1;
|
||||
for (int i = 0; i < t->n_events; i++) {
|
||||
const long long start = t->events[i].Start;
|
||||
const long long end = start + t->events[i].Duration;
|
||||
if (start > afterMs && (best < 0 || start < best)) best = start;
|
||||
if (end > afterMs && (best < 0 || end < best)) best = end;
|
||||
}
|
||||
return (jlong)best;
|
||||
}
|
||||
|
||||
// --- AssRender ---
|
||||
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_com_edde746_plezy_libass_AssRender_nativeAssRenderInit(JNIEnv* env, jclass clazz, jlong ass) {
|
||||
ASS_Renderer* assRenderer = ass_renderer_init((ASS_Library*)ass);
|
||||
ass_set_fonts(assRenderer, NULL, "sans-serif", ASS_FONTPROVIDER_FONTCONFIG, NULL, 1);
|
||||
return (jlong)assRenderer;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_edde746_plezy_libass_AssRender_nativeAssRenderSetFontScale(
|
||||
JNIEnv* env, jclass clazz, jlong render, jfloat scale) {
|
||||
if (!render) return;
|
||||
ass_set_font_scale((ASS_Renderer*)render, scale);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_edde746_plezy_libass_AssRender_nativeAssRenderSetCacheLimit(
|
||||
JNIEnv* env, jclass clazz, jlong render, jint glyphMax, jint bitmapMaxSize) {
|
||||
if (!render) return;
|
||||
ass_set_cache_limits((ASS_Renderer*)render, glyphMax, bitmapMaxSize);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_edde746_plezy_libass_AssRender_nativeAssRenderSetFrameSize(
|
||||
JNIEnv* env, jclass clazz, jlong render, jint width, jint height) {
|
||||
if (!render) return;
|
||||
ass_set_frame_size((ASS_Renderer*)render, width, height);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_edde746_plezy_libass_AssRender_nativeAssRenderSetStorageSize(
|
||||
JNIEnv* env, jclass clazz, jlong render, jint width, jint height) {
|
||||
if (!render) return;
|
||||
ass_set_storage_size((ASS_Renderer*)render, width, height);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_edde746_plezy_libass_AssRender_nativeAssRenderSetMargins(
|
||||
JNIEnv* env, jclass clazz, jlong render, jint top, jint bottom, jint left, jint right) {
|
||||
if (!render) return;
|
||||
ass_set_margins((ASS_Renderer*)render, top, bottom, left, right);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_edde746_plezy_libass_AssRender_nativeAssRenderSetUseMargins(
|
||||
JNIEnv* env, jclass clazz, jlong render, jboolean use) {
|
||||
if (!render) return;
|
||||
ass_set_use_margins((ASS_Renderer*)render, use ? 1 : 0);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_edde746_plezy_libass_AssRender_nativeAssRenderDeinit(JNIEnv* env, jclass clazz, jlong render) {
|
||||
if (render) {
|
||||
ass_renderer_done((ASS_Renderer*)render);
|
||||
}
|
||||
}
|
||||
|
||||
// (image, original-list index) pair so packing can run in height-sorted order
|
||||
// while slots stay keyed by list position (= blend order) for pass 2.
|
||||
typedef struct {
|
||||
ASS_Image* img;
|
||||
int idx;
|
||||
} PackItem;
|
||||
|
||||
static int comparePackItemsByHeightDesc(const void* a, const void* b) {
|
||||
const PackItem* ia = (const PackItem*)a;
|
||||
const PackItem* ib = (const PackItem*)b;
|
||||
return ib->img->h - ia->img->h;
|
||||
}
|
||||
|
||||
// Throttle for truncation warnings (shared across renderers; logging only).
|
||||
static int truncationLogCounter = 0;
|
||||
|
||||
// Renders a frame into the provided atlas + vertex direct ByteBuffers.
|
||||
//
|
||||
// - atlasBuf holds packed ALPHA_8 pixels with row stride atlasMaxW. Only the first
|
||||
// atlasHeight rows are written; the caller uploads that region to a texture
|
||||
// allocated once at atlasMaxW × atlasMaxH.
|
||||
// - vertexBuf holds a per-quad vertex stream (6 vertices × (2 pos + 2 uv + 4 color)
|
||||
// floats = 48 floats = 192 bytes per quad). Must match BYTES_PER_QUAD/VERTEX in
|
||||
// AssSubtitleAtlasPipeline.kt. Ready for a single glDrawArrays(GL_TRIANGLES, 0, N * 6).
|
||||
// - UVs are normalized against atlasMaxW × atlasMaxH (the allocated texture dims),
|
||||
// not the packed region, so the texture never needs reallocation.
|
||||
// - Images are packed in height-sorted rows (minimizes packed height) but vertices
|
||||
// are emitted in original list order — the list order is libass's painter order.
|
||||
//
|
||||
// Never fails on content size: images that don't fit the remaining atlas/vertex
|
||||
// capacity are dropped and counted in AssAtlasFrame.truncated, so a heavy frame
|
||||
// degrades instead of going stale. Returns NULL only for missing buffers/handles.
|
||||
// On changed == 0, returns (0, 0, 0, changed, 0) without touching the buffers —
|
||||
// caller reuses the atlas texture already on the GPU.
|
||||
JNIEXPORT jobject JNICALL Java_com_edde746_plezy_libass_AssRender_nativeAssRenderFrameAtlas(
|
||||
JNIEnv* env, jclass clazz, jlong render, jlong track, jlong time, jobject atlasBuf, jint atlasMaxW, jint atlasMaxH,
|
||||
jobject vertexBuf) {
|
||||
if (!render || !track || !atlasBuf || !vertexBuf || atlasMaxW <= 0 || atlasMaxH <= 0) return NULL;
|
||||
|
||||
jclass atlasFrameClass = (*env)->FindClass(env, "com/edde746/plezy/libass/AssAtlasFrame");
|
||||
if (!atlasFrameClass) return NULL;
|
||||
jmethodID ctor = (*env)->GetMethodID(env, atlasFrameClass, "<init>", "(IIIII)V");
|
||||
if (!ctor) return NULL;
|
||||
|
||||
const long long t0 = nowMs();
|
||||
int changed;
|
||||
ASS_Image* image = ass_render_frame((ASS_Renderer*)render, (ASS_Track*)track, time, &changed);
|
||||
const long long tAss = nowMs();
|
||||
|
||||
if (changed == 0 || image == NULL) {
|
||||
if (tAss - t0 > 40) {
|
||||
__android_log_print(
|
||||
ANDROID_LOG_WARN, LOG_TAG, "slow render t=%lldms: ass=%lldms (changed=%d, no output)", (long long)time,
|
||||
tAss - t0, changed);
|
||||
}
|
||||
return (*env)->NewObject(env, atlasFrameClass, ctor, 0, 0, 0, changed, 0);
|
||||
}
|
||||
|
||||
uint8_t* atlasPixels = (uint8_t*)(*env)->GetDirectBufferAddress(env, atlasBuf);
|
||||
jlong atlasCap = (*env)->GetDirectBufferCapacity(env, atlasBuf);
|
||||
float* vertices = (float*)(*env)->GetDirectBufferAddress(env, vertexBuf);
|
||||
jlong vertexCap = (*env)->GetDirectBufferCapacity(env, vertexBuf);
|
||||
if (!atlasPixels || !vertices) return NULL;
|
||||
if ((jlong)atlasMaxW * atlasMaxH > atlasCap) {
|
||||
__android_log_print(
|
||||
ANDROID_LOG_ERROR, LOG_TAG, "atlas buffer smaller than %dx%d (capacity %lld bytes)", atlasMaxW, atlasMaxH,
|
||||
(long long)atlasCap);
|
||||
return NULL;
|
||||
}
|
||||
// 48 floats per quad × 4 bytes = 192 bytes/quad
|
||||
const int maxQuads = (int)(vertexCap / 192);
|
||||
|
||||
int total = 0;
|
||||
for (ASS_Image* img = image; img != NULL; img = img->next) {
|
||||
if (img->w > 0 && img->h > 0) total++;
|
||||
}
|
||||
if (total == 0) {
|
||||
return (*env)->NewObject(env, atlasFrameClass, ctor, 0, 0, 0, changed, 0);
|
||||
}
|
||||
|
||||
// Pass 1: assign packing slots in height-sorted order so mixed-size frames pack
|
||||
// tight rows. slotX/slotY are keyed by the image's position in the original
|
||||
// list; -1 marks images dropped for capacity.
|
||||
PackItem* items = (PackItem*)malloc(sizeof(PackItem) * (size_t)total);
|
||||
int* slotX = (int*)malloc(sizeof(int) * (size_t)total);
|
||||
int* slotY = (int*)malloc(sizeof(int) * (size_t)total);
|
||||
if (!items || !slotX || !slotY) {
|
||||
free(items);
|
||||
free(slotX);
|
||||
free(slotY);
|
||||
return NULL;
|
||||
}
|
||||
int n = 0;
|
||||
for (ASS_Image* img = image; img != NULL; img = img->next) {
|
||||
if (img->w > 0 && img->h > 0) {
|
||||
items[n].img = img;
|
||||
items[n].idx = n;
|
||||
n++;
|
||||
}
|
||||
}
|
||||
qsort(items, (size_t)n, sizeof(PackItem), comparePackItemsByHeightDesc);
|
||||
|
||||
int cursorX = 0, cursorY = 0, rowH = 0;
|
||||
int truncated = 0;
|
||||
int packedH = 0;
|
||||
int accepted = 0;
|
||||
long long srcPixels = 0;
|
||||
for (int i = 0; i < n; i++) {
|
||||
ASS_Image* img = items[i].img;
|
||||
srcPixels += (long long)img->w * img->h;
|
||||
int sx = -1, sy = -1;
|
||||
if (img->w <= atlasMaxW && accepted < maxQuads) {
|
||||
int cx = cursorX, cy = cursorY, rh = rowH;
|
||||
if (cx + img->w > atlasMaxW) {
|
||||
cy += rh;
|
||||
cx = 0;
|
||||
rh = 0;
|
||||
}
|
||||
if (cy + img->h <= atlasMaxH) {
|
||||
sx = cx;
|
||||
sy = cy;
|
||||
cursorX = cx + img->w;
|
||||
cursorY = cy;
|
||||
rowH = (img->h > rh) ? img->h : rh;
|
||||
if (cy + img->h > packedH) packedH = cy + img->h;
|
||||
accepted++;
|
||||
}
|
||||
}
|
||||
if (sx < 0) truncated++;
|
||||
slotX[items[i].idx] = sx;
|
||||
slotY[items[i].idx] = sy;
|
||||
}
|
||||
|
||||
if (truncated > 0 && (truncationLogCounter++ & 63) == 0) {
|
||||
__android_log_print(
|
||||
ANDROID_LOG_WARN, LOG_TAG, "atlas truncation: %d of %d images dropped (atlas %dx%d, %d quads max)", truncated,
|
||||
n, atlasMaxW, atlasMaxH, maxQuads);
|
||||
}
|
||||
if (accepted == 0) {
|
||||
free(items);
|
||||
free(slotX);
|
||||
free(slotY);
|
||||
return (*env)->NewObject(env, atlasFrameClass, ctor, 0, 0, 0, changed, truncated);
|
||||
}
|
||||
|
||||
memset(atlasPixels, 0, (size_t)atlasMaxW * packedH);
|
||||
|
||||
// Pass 2: walk the original list (= libass's painter/blend order), copying each
|
||||
// accepted image into its assigned slot and emitting its quad.
|
||||
int qi = 0;
|
||||
int k = 0;
|
||||
for (ASS_Image* img = image; img != NULL; img = img->next) {
|
||||
if (img->w <= 0 || img->h <= 0) continue;
|
||||
const int px = slotX[k];
|
||||
const int py = slotY[k];
|
||||
k++;
|
||||
if (px < 0) continue;
|
||||
|
||||
for (int y = 0; y < img->h; y++) {
|
||||
uint8_t* dst = atlasPixels + (size_t)(py + y) * atlasMaxW + px;
|
||||
const uint8_t* src = img->bitmap + (size_t)y * img->stride;
|
||||
memcpy(dst, src, (size_t)img->w);
|
||||
}
|
||||
|
||||
const float x0 = (float)img->dst_x;
|
||||
const float y0 = (float)img->dst_y;
|
||||
const float x1 = x0 + (float)img->w;
|
||||
const float y1 = y0 + (float)img->h;
|
||||
const float u0 = (float)px / (float)atlasMaxW;
|
||||
const float v0 = (float)py / (float)atlasMaxH;
|
||||
const float u1 = (float)(px + img->w) / (float)atlasMaxW;
|
||||
const float v1 = (float)(py + img->h) / (float)atlasMaxH;
|
||||
const unsigned int c = img->color;
|
||||
const float r = (float)((c >> 24) & 0xFFu) / 255.0f;
|
||||
const float g = (float)((c >> 16) & 0xFFu) / 255.0f;
|
||||
const float b = (float)((c >> 8) & 0xFFu) / 255.0f;
|
||||
const float a = (float)(0xFFu - (c & 0xFFu)) / 255.0f;
|
||||
|
||||
float* vx = vertices + (size_t)qi * 48;
|
||||
// 8 floats per vertex: x, y, u, v, r, g, b, a.
|
||||
// Triangle 1: (x0,y0) (x1,y0) (x0,y1)
|
||||
vx[0] = x0;
|
||||
vx[1] = y0;
|
||||
vx[2] = u0;
|
||||
vx[3] = v0;
|
||||
vx[4] = r;
|
||||
vx[5] = g;
|
||||
vx[6] = b;
|
||||
vx[7] = a;
|
||||
vx[8] = x1;
|
||||
vx[9] = y0;
|
||||
vx[10] = u1;
|
||||
vx[11] = v0;
|
||||
vx[12] = r;
|
||||
vx[13] = g;
|
||||
vx[14] = b;
|
||||
vx[15] = a;
|
||||
vx[16] = x0;
|
||||
vx[17] = y1;
|
||||
vx[18] = u0;
|
||||
vx[19] = v1;
|
||||
vx[20] = r;
|
||||
vx[21] = g;
|
||||
vx[22] = b;
|
||||
vx[23] = a;
|
||||
// Triangle 2: (x1,y0) (x1,y1) (x0,y1)
|
||||
vx[24] = x1;
|
||||
vx[25] = y0;
|
||||
vx[26] = u1;
|
||||
vx[27] = v0;
|
||||
vx[28] = r;
|
||||
vx[29] = g;
|
||||
vx[30] = b;
|
||||
vx[31] = a;
|
||||
vx[32] = x1;
|
||||
vx[33] = y1;
|
||||
vx[34] = u1;
|
||||
vx[35] = v1;
|
||||
vx[36] = r;
|
||||
vx[37] = g;
|
||||
vx[38] = b;
|
||||
vx[39] = a;
|
||||
vx[40] = x0;
|
||||
vx[41] = y1;
|
||||
vx[42] = u0;
|
||||
vx[43] = v1;
|
||||
vx[44] = r;
|
||||
vx[45] = g;
|
||||
vx[46] = b;
|
||||
vx[47] = a;
|
||||
|
||||
qi++;
|
||||
}
|
||||
|
||||
free(items);
|
||||
free(slotX);
|
||||
free(slotY);
|
||||
|
||||
// Slow-render breakdown: separates libass's own cost (rasterize/blur/shape)
|
||||
// from this function's packing + memcpy, so device logs attribute the time.
|
||||
const long long tEnd = nowMs();
|
||||
if (tEnd - t0 > 40) {
|
||||
__android_log_print(
|
||||
ANDROID_LOG_WARN, LOG_TAG,
|
||||
"slow render t=%lldms: total=%lldms ass=%lldms pack+copy=%lldms images=%d srcPx=%lldk atlas=%dx%d quads=%d",
|
||||
(long long)time, tEnd - t0, tAss - t0, tEnd - tAss, n, srcPixels / 1000, atlasMaxW, packedH, qi);
|
||||
}
|
||||
|
||||
// atlasWidth is the full row stride (GLES2 can't upload with stride ≠ width);
|
||||
// atlasHeight is the packed height — the only rows worth uploading.
|
||||
return (*env)->NewObject(env, atlasFrameClass, ctor, atlasMaxW, packedH, qi, changed, truncated);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
cmake_minimum_required(VERSION 3.22.1)
|
||||
|
||||
project("asskt")
|
||||
|
||||
# libass headers + libass.so come from the io.github.peerless2012:ass AAR via prefab.
|
||||
add_library(${CMAKE_PROJECT_NAME} SHARED AssKt.c)
|
||||
find_package(lib_ass REQUIRED CONFIG)
|
||||
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
|
||||
lib_ass::ass
|
||||
log)
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.edde746.plezy.libass
|
||||
|
||||
import java.util.concurrent.locks.ReentrantLock
|
||||
import kotlin.concurrent.withLock
|
||||
|
||||
class Ass {
|
||||
|
||||
companion object {
|
||||
|
||||
init {
|
||||
System.loadLibrary("asskt")
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssInit(): Long
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssAddFont(ptr: Long, name: String, buffer: ByteArray)
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssDeinit(ptr: Long)
|
||||
}
|
||||
|
||||
/** Single lock for all libass calls on this library instance. */
|
||||
val lock = ReentrantLock()
|
||||
|
||||
private var nativeAss: Long = nativeAssInit()
|
||||
|
||||
@Volatile
|
||||
var released = false
|
||||
private set
|
||||
|
||||
private fun <T> create(block: (Long) -> T): T = lock.withLock {
|
||||
check(!released && nativeAss != 0L) { "Ass already released" }
|
||||
block(nativeAss)
|
||||
}
|
||||
|
||||
fun createTrack(): AssTrack = create { AssTrack(it, lock) }
|
||||
|
||||
fun createRender(): AssRender = create { AssRender(it, lock) }
|
||||
|
||||
fun addFont(name: String, buffer: ByteArray) {
|
||||
lock.withLock {
|
||||
if (!released && nativeAss != 0L) nativeAssAddFont(nativeAss, name, buffer)
|
||||
}
|
||||
}
|
||||
|
||||
fun release() {
|
||||
lock.withLock {
|
||||
if (released) return
|
||||
released = true
|
||||
if (nativeAss != 0L) {
|
||||
nativeAssDeinit(nativeAss)
|
||||
nativeAss = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected fun finalize() {
|
||||
release()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.edde746.plezy.libass
|
||||
|
||||
/**
|
||||
* Result of a packed-atlas render. The atlas pixel data is stored in the direct ByteBuffer
|
||||
* that was passed into [AssRender.renderFrameAtlas]; the vertex stream is in the other.
|
||||
*
|
||||
* @param atlasWidth atlas row stride in pixels (= the allocated width; 0 when [changed] == 0)
|
||||
* @param atlasHeight packed atlas height in pixels — the rows worth uploading
|
||||
* @param quadCount number of quads; the vertex buffer holds [quadCount] * 6 vertices
|
||||
* @param changed libass change flag (0 = no change, 1 = positions, 2 = content)
|
||||
* @param truncated images dropped because they exceeded the atlas/vertex capacity;
|
||||
* the frame is incomplete but never stale (> 0 should be rare —
|
||||
* it means even the GL-max-sized atlas couldn't fit the frame)
|
||||
*/
|
||||
class AssAtlasFrame(
|
||||
val atlasWidth: Int,
|
||||
val atlasHeight: Int,
|
||||
val quadCount: Int,
|
||||
val changed: Int,
|
||||
val truncated: Int
|
||||
)
|
||||
@@ -0,0 +1,164 @@
|
||||
package com.edde746.plezy.libass
|
||||
|
||||
import java.nio.ByteBuffer
|
||||
import java.util.concurrent.locks.ReentrantLock
|
||||
import kotlin.concurrent.withLock
|
||||
|
||||
class AssRender(nativeAss: Long, private val lock: ReentrantLock) {
|
||||
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssRenderInit(ass: Long): Long
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssRenderSetFontScale(render: Long, scale: Float)
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssRenderSetCacheLimit(render: Long, glyphMax: Int, bitmapMaxSize: Int)
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssRenderSetStorageSize(render: Long, width: Int, height: Int)
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssRenderSetFrameSize(render: Long, width: Int, height: Int)
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssRenderSetMargins(render: Long, top: Int, bottom: Int, left: Int, right: Int)
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssRenderSetUseMargins(render: Long, use: Boolean)
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssRenderFrameAtlas(
|
||||
render: Long,
|
||||
track: Long,
|
||||
time: Long,
|
||||
atlasBuf: ByteBuffer,
|
||||
atlasMaxWidth: Int,
|
||||
atlasMaxHeight: Int,
|
||||
vertexBuf: ByteBuffer
|
||||
): AssAtlasFrame?
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssRenderDeinit(render: Long)
|
||||
}
|
||||
|
||||
private var nativeRender: Long = nativeAssRenderInit(nativeAss)
|
||||
|
||||
@Volatile
|
||||
var released = false
|
||||
private set
|
||||
|
||||
private var track: AssTrack? = null
|
||||
|
||||
/**
|
||||
* Bumped on every renderer-state mutation (track, sizes, margins, font scale).
|
||||
* Lets the render-ahead pipeline detect that a speculatively rendered frame was
|
||||
* produced against stale state and must not be presented.
|
||||
*/
|
||||
private val generation = java.util.concurrent.atomic.AtomicInteger(0)
|
||||
|
||||
/** Current renderer-state generation; see [generation]. */
|
||||
val stateGeneration: Int get() = generation.get()
|
||||
|
||||
/** Runs [block] with the native handle under the shared libass lock; no-op once released. */
|
||||
private inline fun withNative(block: (Long) -> Unit) {
|
||||
lock.withLock {
|
||||
if (!released && nativeRender != 0L) block(nativeRender)
|
||||
}
|
||||
}
|
||||
|
||||
fun setTrack(track: AssTrack?) {
|
||||
generation.incrementAndGet()
|
||||
lock.withLock { this.track = track }
|
||||
}
|
||||
|
||||
fun setFontScale(scale: Float) {
|
||||
generation.incrementAndGet()
|
||||
withNative { nativeAssRenderSetFontScale(it, scale) }
|
||||
}
|
||||
|
||||
fun setCacheLimit(glyphMax: Int, bitmapMaxSize: Int) = withNative { nativeAssRenderSetCacheLimit(it, glyphMax, bitmapMaxSize) }
|
||||
|
||||
fun setStorageSize(width: Int, height: Int) {
|
||||
generation.incrementAndGet()
|
||||
withNative { nativeAssRenderSetStorageSize(it, width, height) }
|
||||
}
|
||||
|
||||
fun setFrameSize(width: Int, height: Int) {
|
||||
generation.incrementAndGet()
|
||||
withNative { nativeAssRenderSetFrameSize(it, width, height) }
|
||||
}
|
||||
|
||||
/**
|
||||
* mpv-style frame margins: offsets of the video dst rect within the frame set by
|
||||
* [setFrameSize]. Negative when the video extends beyond the frame (zoomed in / cover).
|
||||
*/
|
||||
fun setMargins(top: Int, bottom: Int, left: Int, right: Int) {
|
||||
generation.incrementAndGet()
|
||||
withNative { nativeAssRenderSetMargins(it, top, bottom, left, right) }
|
||||
}
|
||||
|
||||
/**
|
||||
* mpv's sub-ass-force-margins: lay out non-positioned events against the full frame
|
||||
* (kept on the visible screen) instead of the video rect between the margins.
|
||||
*/
|
||||
fun setUseMargins(use: Boolean) {
|
||||
generation.incrementAndGet()
|
||||
withNative { nativeAssRenderSetUseMargins(it, use) }
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders a frame into a packed ALPHA_8 texture atlas plus a single vertex stream
|
||||
* ready for `glDrawArrays(GL_TRIANGLES, 0, quadCount * 6)`.
|
||||
*
|
||||
* UVs are normalized against ([atlasMaxW], [atlasMaxH]) — the allocated texture
|
||||
* dims — so the caller can allocate the texture once and `glTexSubImage2D` only
|
||||
* the packed rows. Images that exceed the capacity are dropped and counted in
|
||||
* [AssAtlasFrame.truncated]; the render never fails on content size.
|
||||
*
|
||||
* @param atlasBuf direct ByteBuffer receiving the packed pixels (≥ atlasMaxW × atlasMaxH)
|
||||
* @param atlasMaxW atlas row stride in pixels (bound by `GL_MAX_TEXTURE_SIZE`)
|
||||
* @param atlasMaxH atlas height in pixels (bound by `GL_MAX_TEXTURE_SIZE`)
|
||||
* @param vertexBuf direct ByteBuffer receiving the vertex stream (192 bytes per quad)
|
||||
*/
|
||||
/** How long the most recent [renderFrameAtlas] waited to acquire the shared
|
||||
* libass lock (contended by track dialogue/font feeding), in milliseconds. */
|
||||
@Volatile
|
||||
var lastLockWaitMs: Long = 0
|
||||
private set
|
||||
|
||||
fun renderFrameAtlas(
|
||||
time: Long,
|
||||
atlasBuf: ByteBuffer,
|
||||
atlasMaxW: Int,
|
||||
atlasMaxH: Int,
|
||||
vertexBuf: ByteBuffer
|
||||
): AssAtlasFrame? {
|
||||
val tQueue = System.nanoTime()
|
||||
lock.withLock {
|
||||
lastLockWaitMs = (System.nanoTime() - tQueue) / 1_000_000
|
||||
if (released || nativeRender == 0L) return null
|
||||
val t = track ?: return null
|
||||
if (t.released || t.nativeAssTrack == 0L) return null
|
||||
return nativeAssRenderFrameAtlas(nativeRender, t.nativeAssTrack, time, atlasBuf, atlasMaxW, atlasMaxH, vertexBuf)
|
||||
}
|
||||
}
|
||||
|
||||
fun release() {
|
||||
lock.withLock {
|
||||
if (released) return
|
||||
released = true
|
||||
track = null
|
||||
if (nativeRender != 0L) {
|
||||
nativeAssRenderDeinit(nativeRender)
|
||||
nativeRender = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected fun finalize() {
|
||||
release()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.edde746.plezy.libass
|
||||
|
||||
import java.util.concurrent.locks.ReentrantLock
|
||||
import kotlin.concurrent.withLock
|
||||
|
||||
class AssTrack(private val ass: Long, private val lock: ReentrantLock) {
|
||||
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssTrackInit(track: Long): Long
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssTrackReadBuffer(track: Long, byteArray: ByteArray, offset: Int, length: Int)
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssTrackReadChunk(track: Long, start: Long, duration: Long, byteArray: ByteArray, offset: Int, length: Int)
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssTrackDeinit(track: Long)
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssTrackNextEventStart(track: Long, afterMs: Long): Long
|
||||
|
||||
@JvmStatic
|
||||
external fun nativeAssTrackNextEventChange(track: Long, afterMs: Long): Long
|
||||
}
|
||||
|
||||
var nativeAssTrack = nativeAssTrackInit(ass)
|
||||
private set
|
||||
|
||||
@Volatile
|
||||
var released = false
|
||||
private set
|
||||
|
||||
/** Runs [block] with the native handle under the shared libass lock; no-op once released. */
|
||||
private inline fun withNative(block: (Long) -> Unit) {
|
||||
lock.withLock {
|
||||
if (!released && nativeAssTrack != 0L) block(nativeAssTrack)
|
||||
}
|
||||
}
|
||||
|
||||
fun readBuffer(array: ByteArray, offset: Int = 0, length: Int = array.size) = withNative { nativeAssTrackReadBuffer(it, array, offset, length) }
|
||||
|
||||
fun readChunk(start: Long, duration: Long, array: ByteArray, offset: Int = 0, length: Int = array.size) = withNative { nativeAssTrackReadChunk(it, start, duration, array, offset, length) }
|
||||
|
||||
/** Earliest event start strictly after [afterMs], or -1 if none (yet). */
|
||||
fun nextEventStartMs(afterMs: Long): Long {
|
||||
lock.withLock {
|
||||
if (released || nativeAssTrack == 0L) return -1
|
||||
return nativeAssTrackNextEventStart(nativeAssTrack, afterMs)
|
||||
}
|
||||
}
|
||||
|
||||
/** Earliest event start OR end strictly after [afterMs], or -1 if none (yet). */
|
||||
fun nextEventChangeMs(afterMs: Long): Long {
|
||||
lock.withLock {
|
||||
if (released || nativeAssTrack == 0L) return -1
|
||||
return nativeAssTrackNextEventChange(nativeAssTrack, afterMs)
|
||||
}
|
||||
}
|
||||
|
||||
fun release() {
|
||||
lock.withLock {
|
||||
if (released) return
|
||||
released = true
|
||||
if (nativeAssTrack != 0L) {
|
||||
nativeAssTrackDeinit(nativeAssTrack)
|
||||
nativeAssTrack = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected fun finalize() {
|
||||
release()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,386 @@
|
||||
package com.edde746.plezy.libass.media
|
||||
|
||||
import android.util.Log
|
||||
import androidx.annotation.OptIn
|
||||
import androidx.media3.common.Format
|
||||
import androidx.media3.common.MediaItem
|
||||
import androidx.media3.common.MimeTypes
|
||||
import androidx.media3.common.MimeTypes.TEXT_SSA
|
||||
import androidx.media3.common.Player.Listener
|
||||
import androidx.media3.common.Tracks
|
||||
import androidx.media3.common.VideoSize
|
||||
import androidx.media3.common.util.Size
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
import androidx.media3.exoplayer.ExoPlayer
|
||||
import androidx.media3.exoplayer.video.VideoFrameMetadataListener
|
||||
import com.edde746.plezy.libass.Ass
|
||||
import com.edde746.plezy.libass.AssRender
|
||||
import com.edde746.plezy.libass.AssTrack
|
||||
import com.edde746.plezy.libass.media.parser.AssHeaderParser
|
||||
|
||||
/**
|
||||
* Handles ASS subtitle rendering and integration with ExoPlayer.
|
||||
*
|
||||
* This class listens to ExoPlayer events and manages the creation, selection, and rendering of ASS
|
||||
* subtitle tracks. Rendering always happens on a GL overlay surface (atlas pipeline) — the
|
||||
* libass frame is the overlay surface, not the video.
|
||||
*/
|
||||
@OptIn(UnstableApi::class)
|
||||
class AssHandler(
|
||||
val config: AssHandlerConfig = AssHandlerConfig()
|
||||
) : Listener {
|
||||
|
||||
/** The ASS instance used for creating tracks and renderers. This is lazy to avoid loading
|
||||
* libass if the played media does not have ASS tracks. */
|
||||
private val assDelegate = lazy { Ass() }
|
||||
val ass by assDelegate
|
||||
|
||||
/** The current ASS renderer. It's created as soon as a ASS track is detected. */
|
||||
var render: AssRender? = null
|
||||
private set
|
||||
|
||||
/**
|
||||
* AssRender changed callback
|
||||
*/
|
||||
var renderCallback: ((AssRender?) -> Unit)? = null
|
||||
|
||||
/** The currently selected ASS track. */
|
||||
var track: AssTrack? = null
|
||||
private set
|
||||
|
||||
/** The available ASS tracks in the current media. */
|
||||
private val availableTracks = mutableMapOf<String, AssTrack>()
|
||||
|
||||
/** Fonts encountered before any ASS track was created. Flushed in [createTrack]. */
|
||||
private val pendingFonts = mutableListOf<Pair<String, ByteArray>>()
|
||||
|
||||
/** The size of the video track. */
|
||||
var videoSize = Size.ZERO
|
||||
private set
|
||||
|
||||
/** The size of the surface on which subtitles are rendered. */
|
||||
var surfaceSize = Size.ZERO
|
||||
private set
|
||||
|
||||
/**
|
||||
* True once an overlay widget reported its surface size via [setOverlaySurfaceSize].
|
||||
* From then on the Player.Listener surface size (= the video output surface, which
|
||||
* may differ from the subtitle overlay once the overlay is parented elsewhere) is
|
||||
* ignored as a frame-size source.
|
||||
*/
|
||||
private var overlaySizeFromWidget = false
|
||||
|
||||
/** mpv-style margins of the video rect within the frame: top, bottom, left, right. */
|
||||
private var margins: IntArray? = null
|
||||
|
||||
/** mpv's sub-ass-force-margins: anchor non-positioned events to the visible frame. */
|
||||
private var useMargins = false
|
||||
|
||||
/**
|
||||
* Per-video-frame callback. Fired by ExoPlayer just before MediaCodec releases the frame
|
||||
* to the output surface. Carries the exact PTS of the frame and the System.nanoTime()
|
||||
* domain target release time, so subtitle renderers can align composition to the same
|
||||
* display vsync as the video.
|
||||
*
|
||||
* - [presentationTimeUs] is track-relative microseconds matching the subtitle track's PTS.
|
||||
* - [releaseTimeNs] may be [androidx.media3.common.C.TIME_UNSET] in rare paths.
|
||||
*
|
||||
* Invoked on the playback thread.
|
||||
*/
|
||||
var videoFrameCallback: ((presentationTimeUs: Long, releaseTimeNs: Long) -> Unit)? = null
|
||||
|
||||
private val videoFrameMetadataListener = VideoFrameMetadataListener { pts, releaseNs, _, _ ->
|
||||
videoFrameCallback?.invoke(pts, releaseNs)
|
||||
}
|
||||
|
||||
private var player: ExoPlayer? = null
|
||||
|
||||
/** The current selected ass format. */
|
||||
private var format: Format? = null
|
||||
|
||||
/**
|
||||
* Initializes the handler with the provided ExoPlayer instance.
|
||||
* @param player The ExoPlayer instance to attach to.
|
||||
*/
|
||||
fun init(player: ExoPlayer) {
|
||||
this.player = player
|
||||
player.addListener(this)
|
||||
player.setVideoFrameMetadataListener(videoFrameMetadataListener)
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles transitions between media items in the player and resets everything to the initial
|
||||
* state.
|
||||
*/
|
||||
override fun onMediaItemTransition(mediaItem: MediaItem?, reason: Int) {
|
||||
super.onMediaItemTransition(mediaItem, reason)
|
||||
Log.i("AssHandler", "onMediaItemTransition: item = $mediaItem, reason = $reason")
|
||||
resetMediaState(releaseNative = true)
|
||||
}
|
||||
|
||||
private fun resetMediaState(releaseNative: Boolean) {
|
||||
val oldRender = render
|
||||
val oldTracks = availableTracks.values.toList()
|
||||
|
||||
render = null
|
||||
track = null
|
||||
format = null
|
||||
availableTracks.clear()
|
||||
pendingFonts.clear()
|
||||
videoSize = Size.ZERO
|
||||
renderCallback?.invoke(null)
|
||||
|
||||
if (releaseNative) {
|
||||
oldRender?.release()
|
||||
oldTracks.forEach { it.release() }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles changes to the tracks available in the current media.
|
||||
* Configures the selected ASS track if available.
|
||||
* @param tracks The selected tracks.
|
||||
*/
|
||||
override fun onTracksChanged(tracks: Tracks) {
|
||||
Log.i("AssHandler", "onTracksChanged $tracks")
|
||||
|
||||
val selectedVideoTrack = getSelectedVideoTrack(tracks)
|
||||
if (selectedVideoTrack != null) {
|
||||
setVideoSize(selectedVideoTrack.width, selectedVideoTrack.height)
|
||||
}
|
||||
|
||||
format = getSelectedAssTrack(tracks)
|
||||
if (format == null) {
|
||||
Log.i("AssHandler", "subtitle track disabled")
|
||||
track = null
|
||||
render?.setTrack(null)
|
||||
return
|
||||
}
|
||||
|
||||
updateTrack()
|
||||
}
|
||||
|
||||
private fun updateTrack() {
|
||||
val track = availableTracks.firstNotNullOfOrNull {
|
||||
// When media without external subtitles, format id will not change.
|
||||
// When media with external subtitles, format will become like 1:1 .
|
||||
// So to compat both situation, we extract the actual id after the colon.
|
||||
if (format?.id?.substringAfter(":") == it.key) {
|
||||
it.value
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
if (track == null || this.track == track) return
|
||||
|
||||
Log.i("AssHandler", "subtitle track changed to $format")
|
||||
this.track = track
|
||||
val render = requireNotNull(render)
|
||||
applyRenderState(render)
|
||||
render.setTrack(track)
|
||||
}
|
||||
|
||||
/**
|
||||
* (Re)applies sizing and margin state to [render]. Called whenever a render is
|
||||
* (re)created or the selected track changes, so renderer state survives both.
|
||||
*/
|
||||
private fun applyRenderState(render: AssRender) {
|
||||
if (videoSize.isValid) render.setStorageSize(videoSize.width, videoSize.height)
|
||||
when {
|
||||
surfaceSize.isValid -> render.setFrameSize(surfaceSize.width, surfaceSize.height)
|
||||
// Fallback frame until the overlay surface reports its size.
|
||||
videoSize.isValid -> render.setFrameSize(videoSize.width, videoSize.height)
|
||||
}
|
||||
margins?.let { m -> render.setMargins(m[0], m[1], m[2], m[3]) }
|
||||
render.setUseMargins(useMargins)
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles changes to the surface size for video playback.
|
||||
* Notifies the callback if the size has changed.
|
||||
* @param width The new width of the surface.
|
||||
* @param height The new height of the surface.
|
||||
*/
|
||||
override fun onSurfaceSizeChanged(width: Int, height: Int) {
|
||||
super.onSurfaceSizeChanged(width, height)
|
||||
Log.i("AssHandler", "onSurfaceSizeChanged: width = $width, height = $height")
|
||||
// The video output surface is only a frame-size proxy until an overlay widget
|
||||
// reports its own size — they diverge when the overlay isn't video-rect-sized.
|
||||
if (overlaySizeFromWidget) return
|
||||
if (surfaceSize.width == width && surfaceSize.height == height) return
|
||||
surfaceSize = Size(width, height)
|
||||
}
|
||||
|
||||
/**
|
||||
* Reports the subtitle overlay widget's actual surface size — the authoritative
|
||||
* libass frame size for OVERLAY render types.
|
||||
*/
|
||||
fun setOverlaySurfaceSize(width: Int, height: Int) {
|
||||
overlaySizeFromWidget = true
|
||||
if (surfaceSize.width == width && surfaceSize.height == height) return
|
||||
Log.i("AssHandler", "setOverlaySurfaceSize: width = $width, height = $height")
|
||||
surfaceSize = Size(width, height)
|
||||
render?.setFrameSize(width, height)
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets mpv-style frame margins: the offsets of the video dst rect within the libass
|
||||
* frame ([setOverlaySurfaceSize]); negative when the video extends beyond the frame.
|
||||
* Applied to the current render and re-applied whenever a render is (re)created.
|
||||
*/
|
||||
fun setMargins(top: Int, bottom: Int, left: Int, right: Int) {
|
||||
margins = intArrayOf(top, bottom, left, right)
|
||||
render?.setMargins(top, bottom, left, right)
|
||||
}
|
||||
|
||||
/** mpv's sub-ass-force-margins: anchor non-positioned events to the visible frame. */
|
||||
fun setUseMargins(use: Boolean) {
|
||||
useMargins = use
|
||||
render?.setUseMargins(use)
|
||||
}
|
||||
|
||||
override fun onVideoSizeChanged(videoSize: VideoSize) {
|
||||
super.onVideoSizeChanged(videoSize)
|
||||
this.videoSize = Size(videoSize.width, videoSize.height)
|
||||
Log.i("AssHandler", "onVideoSizeChanged: width = ${videoSize.width}, height = ${videoSize.height}")
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the video size for the ASS renderer. Called as soon as the video size is known in
|
||||
* order to properly render subtitles.
|
||||
* @param width The width of the video.
|
||||
* @param height The height of the video.
|
||||
*/
|
||||
fun setVideoSize(width: Int, height: Int) {
|
||||
Log.i("AssHandler", "setVideoSize: width = $width, height = $height")
|
||||
videoSize = Size(width, height)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the current media has ASS tracks, false otherwise.
|
||||
*/
|
||||
fun hasTracks(): Boolean = availableTracks.isNotEmpty()
|
||||
|
||||
/**
|
||||
* Adds a font to the ASS library. If no tracks have been created yet, the font is buffered
|
||||
* and will be added when the first track is created via [createTrack].
|
||||
*/
|
||||
@Synchronized
|
||||
fun addFont(name: String, data: ByteArray) {
|
||||
if (hasTracks()) {
|
||||
ass.addFont(name, data)
|
||||
} else {
|
||||
pendingFonts.add(name to data)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new ASS track from the given format and saves it in the [availableTracks].
|
||||
* The renderer and libass are also created if needed.
|
||||
* @param format The format of the ASS track.
|
||||
* @return The created ASS track.
|
||||
*/
|
||||
@Synchronized
|
||||
fun createTrack(format: Format): AssTrack {
|
||||
Log.i("AssHandler", "createTrack: format = $format")
|
||||
// Ensure the renderer is created before creating tracks.
|
||||
createRenderIfNeeded()
|
||||
|
||||
// Flush any fonts that were buffered before the first track was created.
|
||||
if (pendingFonts.isNotEmpty()) {
|
||||
for ((name, data) in pendingFonts) {
|
||||
ass.addFont(name, data)
|
||||
}
|
||||
pendingFonts.clear()
|
||||
}
|
||||
|
||||
val track = ass.createTrack()
|
||||
if (format.initializationData.size > 0) {
|
||||
val header = AssHeaderParser.parse(format)
|
||||
track.readBuffer(header)
|
||||
}
|
||||
availableTracks[format.id!!] = track
|
||||
|
||||
updateTrack()
|
||||
|
||||
return track
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures the ASS renderer is created if it does not already exist.
|
||||
*/
|
||||
private fun createRenderIfNeeded() {
|
||||
if (render != null) return
|
||||
Log.i("AssHandler", "createRender (cacheSize: ${config.cacheSize}MB, glyphSize: ${config.glyphSize})")
|
||||
render = ass.createRender().also { render ->
|
||||
render.setCacheLimit(config.glyphSize, config.cacheSize)
|
||||
applyRenderState(render)
|
||||
}
|
||||
renderCallback?.invoke(render)
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a dialogue into the track of the given [trackId].
|
||||
* Thread-safe: AssTrack.readChunk internally acquires the shared libass lock.
|
||||
*/
|
||||
fun readTrackDialogue(
|
||||
trackId: String?,
|
||||
start: Long,
|
||||
duration: Long,
|
||||
data: ByteArray,
|
||||
offset: Int = 0,
|
||||
length: Int = data.size
|
||||
) {
|
||||
val t = availableTracks[trackId] ?: return
|
||||
t.readChunk(start, duration, data, offset, length)
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the selected video track, if any.
|
||||
*/
|
||||
private fun getSelectedVideoTrack(tracks: Tracks): Format? = tracks.groups.find { group ->
|
||||
if (group.isSelected) {
|
||||
(0 until group.length).any { index ->
|
||||
val track = group.getTrackFormat(index)
|
||||
MimeTypes.isVideo(track.sampleMimeType)
|
||||
}
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}?.getTrackFormat(0)
|
||||
|
||||
/**
|
||||
* Retrieves the ID of the selected ASS track, if any.
|
||||
* @param tracks The selected tracks.
|
||||
* @return The ID of the selected ASS track, or null if none.
|
||||
*/
|
||||
private fun getSelectedAssTrack(tracks: Tracks): Format? = tracks.groups.find { group ->
|
||||
if (group.isSelected) {
|
||||
(0 until group.length).any { index ->
|
||||
val track = group.getTrackFormat(index)
|
||||
track.sampleMimeType == TEXT_SSA || track.codecs == TEXT_SSA
|
||||
}
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}?.getTrackFormat(0)
|
||||
|
||||
/**
|
||||
* Releases all native resources held by this handler.
|
||||
*/
|
||||
fun release() {
|
||||
videoFrameCallback = null
|
||||
player?.clearVideoFrameMetadataListener(videoFrameMetadataListener)
|
||||
player = null
|
||||
resetMediaState(releaseNative = true)
|
||||
if (assDelegate.isInitialized()) {
|
||||
ass.release()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the size is valid (both width and height are greater than 0).
|
||||
*/
|
||||
private val Size.isValid
|
||||
get() = width > 0 && height > 0
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.edde746.plezy.libass.media
|
||||
|
||||
data class AssHandlerConfig(
|
||||
val glyphSize: Int = 10000,
|
||||
val cacheSize: Int = 128
|
||||
)
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
package com.edde746.plezy.libass.media.extractor
|
||||
|
||||
import androidx.annotation.OptIn
|
||||
import androidx.media3.common.util.ParsableByteArray
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
import androidx.media3.extractor.ExtractorInput
|
||||
import androidx.media3.extractor.ExtractorOutput
|
||||
import androidx.media3.extractor.mkv.EbmlProcessor
|
||||
import androidx.media3.extractor.mkv.MatroskaExtractor
|
||||
import androidx.media3.extractor.text.SubtitleParser
|
||||
import com.edde746.plezy.libass.media.AssHandler
|
||||
import com.edde746.plezy.libass.media.text.AssSubtitleExtractorOutput
|
||||
|
||||
@OptIn(UnstableApi::class)
|
||||
open class AssMatroskaExtractor(
|
||||
subtitleParserFactory: SubtitleParser.Factory,
|
||||
private val assHandler: AssHandler,
|
||||
flags: Int = 0
|
||||
) : MatroskaExtractor(subtitleParserFactory, flags) {
|
||||
|
||||
private var currentAttachmentName: String? = null
|
||||
private var currentAttachmentMime: String? = null
|
||||
|
||||
internal val subtitleSample = subtitleSampleField.get(this) as ParsableByteArray
|
||||
|
||||
override fun getElementType(id: Int): Int = when (id) {
|
||||
ID_ATTACHMENTS -> EbmlProcessor.ELEMENT_TYPE_MASTER
|
||||
ID_ATTACHED_FILE -> EbmlProcessor.ELEMENT_TYPE_MASTER
|
||||
ID_FILE_NAME -> EbmlProcessor.ELEMENT_TYPE_STRING
|
||||
ID_FILE_MIME_TYPE -> EbmlProcessor.ELEMENT_TYPE_STRING
|
||||
ID_FILE_DATA -> EbmlProcessor.ELEMENT_TYPE_BINARY
|
||||
else -> super.getElementType(id)
|
||||
}
|
||||
|
||||
override fun isLevel1Element(id: Int): Boolean = super.isLevel1Element(id) || id == ID_ATTACHMENTS
|
||||
|
||||
override fun startMasterElement(id: Int, contentPosition: Long, contentSize: Long) {
|
||||
when (id) {
|
||||
ID_EBML -> {
|
||||
val currentExtractor = extractorOutput.get(this) as ExtractorOutput
|
||||
if (currentExtractor !is AssSubtitleExtractorOutput) {
|
||||
extractorOutput.set(
|
||||
this,
|
||||
AssSubtitleExtractorOutput(currentExtractor, assHandler, this)
|
||||
)
|
||||
}
|
||||
super.startMasterElement(id, contentPosition, contentSize)
|
||||
}
|
||||
ID_ATTACHED_FILE -> clearAttachment()
|
||||
else -> super.startMasterElement(id, contentPosition, contentSize)
|
||||
}
|
||||
}
|
||||
|
||||
override fun endMasterElement(id: Int) {
|
||||
when (id) {
|
||||
ID_VIDEO -> {
|
||||
// We need to get the video dimensions very early
|
||||
val track = getCurrentTrack(id)
|
||||
assHandler.setVideoSize(track.width, track.height)
|
||||
super.endMasterElement(id)
|
||||
}
|
||||
ID_ATTACHED_FILE -> clearAttachment()
|
||||
else -> super.endMasterElement(id)
|
||||
}
|
||||
}
|
||||
|
||||
override fun stringElement(id: Int, value: String) {
|
||||
when (id) {
|
||||
ID_FILE_NAME -> currentAttachmentName = value
|
||||
ID_FILE_MIME_TYPE -> currentAttachmentMime = value
|
||||
else -> super.stringElement(id, value)
|
||||
}
|
||||
}
|
||||
|
||||
override fun binaryElement(id: Int, contentSize: Int, input: ExtractorInput) {
|
||||
when (id) {
|
||||
ID_FILE_DATA -> {
|
||||
val attachmentName = requireNotNull(currentAttachmentName)
|
||||
val attachmentMime = requireNotNull(currentAttachmentMime)
|
||||
|
||||
if (attachmentMime in fontMimeTypes) {
|
||||
val data = ByteArray(contentSize)
|
||||
input.readFully(data, 0, contentSize)
|
||||
assHandler.addFont(attachmentName, data)
|
||||
} else {
|
||||
input.skipFully(contentSize)
|
||||
}
|
||||
}
|
||||
else -> super.binaryElement(id, contentSize, input)
|
||||
}
|
||||
}
|
||||
|
||||
private fun clearAttachment() {
|
||||
currentAttachmentName = null
|
||||
currentAttachmentMime = null
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val ID_EBML = 0x1A45DFA3
|
||||
const val ID_VIDEO = 0xE0
|
||||
const val ID_ATTACHMENTS = 0x1941A469
|
||||
const val ID_ATTACHED_FILE = 0x61A7
|
||||
const val ID_FILE_NAME = 0x466E
|
||||
const val ID_FILE_MIME_TYPE = 0x4660
|
||||
const val ID_FILE_DATA = 0x465C
|
||||
|
||||
val fontMimeTypes = listOf(
|
||||
"font/ttf",
|
||||
"font/otf",
|
||||
"font/sfnt",
|
||||
"font/woff",
|
||||
"font/woff2",
|
||||
"application/font-sfnt",
|
||||
"application/font-woff",
|
||||
"application/x-truetype-font",
|
||||
"application/vnd.ms-opentype",
|
||||
"application/x-font-ttf"
|
||||
)
|
||||
|
||||
val extractorOutput = MatroskaExtractor::class.java.getDeclaredField("extractorOutput").apply {
|
||||
isAccessible = true
|
||||
}
|
||||
val subtitleSampleField = MatroskaExtractor::class.java.getDeclaredField("subtitleSample").apply {
|
||||
isAccessible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.edde746.plezy.libass.media.parser
|
||||
|
||||
import androidx.media3.common.Format
|
||||
import androidx.media3.common.util.Consumer
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
import androidx.media3.extractor.text.CuesWithTiming
|
||||
import androidx.media3.extractor.text.SubtitleParser
|
||||
import com.edde746.plezy.libass.AssTrack
|
||||
|
||||
/**
|
||||
* Parser for full (non-embedded) ASS documents, e.g. external sidecar files.
|
||||
* Feeds the whole document into the libass track; rendering happens on the
|
||||
* overlay surface, so no Media3 cues are emitted.
|
||||
*/
|
||||
@UnstableApi
|
||||
class AssFullSubtitleParser(private val track: AssTrack) : SubtitleParser {
|
||||
|
||||
override fun parse(
|
||||
data: ByteArray,
|
||||
offset: Int,
|
||||
length: Int,
|
||||
outputOptions: SubtitleParser.OutputOptions,
|
||||
output: Consumer<CuesWithTiming>
|
||||
) {
|
||||
track.readBuffer(data, offset, length)
|
||||
}
|
||||
|
||||
override fun getCueReplacementBehavior(): Int = Format.CUE_REPLACEMENT_BEHAVIOR_REPLACE
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.edde746.plezy.libass.media.parser
|
||||
|
||||
import androidx.annotation.OptIn
|
||||
import androidx.media3.common.Format
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
|
||||
@OptIn(UnstableApi::class)
|
||||
object AssHeaderParser {
|
||||
|
||||
private const val ASS_EVENTS = "[Events]\n" +
|
||||
"Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text"
|
||||
|
||||
/**
|
||||
* Fix some ass header with error end.
|
||||
* https://github.com/jellyfin/jellyfin-ffmpeg/issues/506
|
||||
*/
|
||||
private fun fixAssHeaderIfNeed(buffer: ByteArray): ByteArray = if (buffer[buffer.size - 1] != 0.toByte()) {
|
||||
// validate ass header
|
||||
buffer
|
||||
} else {
|
||||
// remote the last null character and append the events tag
|
||||
(String(buffer, 0, buffer.size - 1) + "\n" + ASS_EVENTS).toByteArray()
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the headers from the initialization data of the given [format]. The original
|
||||
* headers are preserved (duplication checks are handled by libass).
|
||||
*/
|
||||
fun parse(format: Format): ByteArray = fixAssHeaderIfNeed(format.initializationData[1])
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.edde746.plezy.libass.media.parser
|
||||
|
||||
import androidx.media3.common.Format
|
||||
import androidx.media3.common.util.Consumer
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
import androidx.media3.extractor.text.CuesWithTiming
|
||||
import androidx.media3.extractor.text.SubtitleParser
|
||||
|
||||
/**
|
||||
* No operation subtitle parser.
|
||||
*/
|
||||
@UnstableApi
|
||||
class AssNoOpSubtitleParser : SubtitleParser {
|
||||
override fun parse(
|
||||
p0: ByteArray,
|
||||
p1: Int,
|
||||
p2: Int,
|
||||
p3: SubtitleParser.OutputOptions,
|
||||
p4: Consumer<CuesWithTiming>
|
||||
) {
|
||||
}
|
||||
|
||||
override fun getCueReplacementBehavior(): Int = Format.CUE_REPLACEMENT_BEHAVIOR_REPLACE
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.edde746.plezy.libass.media.parser
|
||||
|
||||
import androidx.media3.common.Format
|
||||
import androidx.media3.common.MimeTypes
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
import androidx.media3.extractor.text.DefaultSubtitleParserFactory
|
||||
import androidx.media3.extractor.text.SubtitleParser
|
||||
import com.edde746.plezy.libass.media.AssHandler
|
||||
|
||||
@UnstableApi
|
||||
class AssSubtitleParserFactory(private val assHandler: AssHandler) : SubtitleParser.Factory {
|
||||
|
||||
private val defaultSubtitleParserFactory = DefaultSubtitleParserFactory()
|
||||
|
||||
override fun supportsFormat(format: Format): Boolean = defaultSubtitleParserFactory.supportsFormat(format)
|
||||
|
||||
override fun getCueReplacementBehavior(format: Format): Int = defaultSubtitleParserFactory.getCueReplacementBehavior(format)
|
||||
|
||||
override fun create(format: Format): SubtitleParser = if (format.sampleMimeType == MimeTypes.TEXT_SSA) {
|
||||
val embeddedSubtitles = MimeTypes.VIDEO_MATROSKA
|
||||
.contentEquals(format.containerMimeType)
|
||||
val track = assHandler.createTrack(format)
|
||||
if (embeddedSubtitles) {
|
||||
// Embedded dialogue lines reach libass via AssTrackOutput; nothing to parse here.
|
||||
AssNoOpSubtitleParser()
|
||||
} else {
|
||||
AssFullSubtitleParser(track)
|
||||
}
|
||||
} else {
|
||||
defaultSubtitleParserFactory.create(format)
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.edde746.plezy.libass.media.text
|
||||
|
||||
import androidx.media3.common.C
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
import androidx.media3.extractor.ExtractorOutput
|
||||
import androidx.media3.extractor.TrackOutput
|
||||
import com.edde746.plezy.libass.media.AssHandler
|
||||
import com.edde746.plezy.libass.media.extractor.AssMatroskaExtractor
|
||||
|
||||
/**
|
||||
* This class is only used by the overlay renderer. It's needed to get the start time of the subtitles.
|
||||
*/
|
||||
@UnstableApi
|
||||
class AssSubtitleExtractorOutput(
|
||||
private val delegate: ExtractorOutput,
|
||||
private val assHandler: AssHandler,
|
||||
private val extractor: AssMatroskaExtractor
|
||||
) : ExtractorOutput by delegate {
|
||||
override fun track(id: Int, type: Int): TrackOutput = if (type == C.TRACK_TYPE_TEXT) {
|
||||
// We can't know at this time if the subtitle track is ASS or other format, so we wrap
|
||||
// every subtitle track
|
||||
AssTrackOutput(delegate.track(id, type), assHandler, extractor)
|
||||
} else {
|
||||
delegate.track(id, type)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.edde746.plezy.libass.media.text
|
||||
|
||||
import androidx.media3.common.C
|
||||
import androidx.media3.common.Format
|
||||
import androidx.media3.common.MimeTypes
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
import androidx.media3.common.util.Util
|
||||
import androidx.media3.extractor.TrackOutput
|
||||
import com.edde746.plezy.libass.media.AssHandler
|
||||
import com.edde746.plezy.libass.media.extractor.AssMatroskaExtractor
|
||||
import java.util.regex.Pattern
|
||||
|
||||
/**
|
||||
* This class is only used by the overlay renderer. It's needed to get the start time of the subtitles.
|
||||
*/
|
||||
@UnstableApi
|
||||
class AssTrackOutput(
|
||||
private val delegate: TrackOutput,
|
||||
private val assHandler: AssHandler,
|
||||
private val extractor: AssMatroskaExtractor
|
||||
) : TrackOutput by delegate {
|
||||
|
||||
private var isAss = false
|
||||
|
||||
private var trackId: String? = null
|
||||
|
||||
override fun format(format: Format) {
|
||||
if (format.sampleMimeType == MimeTypes.TEXT_SSA || format.codecs == MimeTypes.TEXT_SSA) {
|
||||
isAss = true
|
||||
trackId = format.id
|
||||
}
|
||||
delegate.format(format)
|
||||
}
|
||||
|
||||
override fun sampleMetadata(
|
||||
timeUs: Long,
|
||||
flags: Int,
|
||||
size: Int,
|
||||
offset: Int,
|
||||
cryptoData: TrackOutput.CryptoData?
|
||||
) {
|
||||
if (isAss && timeUs.isValidTs) {
|
||||
val sample = extractor.subtitleSample
|
||||
val endIndex = findTokenIndex(sample.data, 1)
|
||||
val lineIndex = findTokenIndex(sample.data, 2)
|
||||
|
||||
val rawDuration = sample.data.decodeToString(endIndex, lineIndex - 1)
|
||||
val durationUs = parseTimecodeUs(rawDuration)
|
||||
|
||||
assHandler.readTrackDialogue(
|
||||
trackId = trackId,
|
||||
start = timeUs / 1000,
|
||||
duration = durationUs / 1000,
|
||||
data = sample.data,
|
||||
offset = lineIndex,
|
||||
length = sample.limit() - lineIndex
|
||||
)
|
||||
}
|
||||
delegate.sampleMetadata(timeUs, flags, size, offset, cryptoData)
|
||||
}
|
||||
|
||||
private fun parseTimecodeUs(timeString: String): Long {
|
||||
val matcher = SSA_TIMECODE_PATTERN.matcher(timeString.trim { it <= ' ' })
|
||||
if (!matcher.matches()) {
|
||||
return C.TIME_UNSET
|
||||
}
|
||||
var timestampUs =
|
||||
Util.castNonNull(matcher.group(1)).toLong() * 60 * 60 * C.MICROS_PER_SECOND
|
||||
timestampUs += Util.castNonNull(matcher.group(2)).toLong() * 60 * C.MICROS_PER_SECOND
|
||||
timestampUs += Util.castNonNull(matcher.group(3)).toLong() * C.MICROS_PER_SECOND
|
||||
timestampUs += Util.castNonNull(matcher.group(4)).toLong() * 10000
|
||||
return timestampUs
|
||||
}
|
||||
|
||||
private fun findTokenIndex(array: ByteArray, tokenNumber: Int): Int {
|
||||
if (tokenNumber == 0) return 0
|
||||
var tokensFound = 0
|
||||
array.forEachIndexed { index, byte ->
|
||||
if (byte == COMMA && ++tokensFound == tokenNumber) {
|
||||
return index + 1
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
private val Long.isValidTs
|
||||
get() = this != C.TIME_UNSET
|
||||
|
||||
private companion object {
|
||||
val SSA_TIMECODE_PATTERN: Pattern =
|
||||
Pattern.compile("""(?:(\d+):)?(\d+):(\d+)[:.](\d+)""")
|
||||
|
||||
const val COMMA = ','.code.toByte()
|
||||
}
|
||||
}
|
||||
+991
@@ -0,0 +1,991 @@
|
||||
package com.edde746.plezy.libass.media.widget
|
||||
|
||||
import android.opengl.EGL14
|
||||
import android.opengl.EGLContext
|
||||
import android.opengl.EGLDisplay
|
||||
import android.opengl.EGLExt
|
||||
import android.opengl.EGLSurface
|
||||
import android.opengl.GLES20
|
||||
import android.os.Handler
|
||||
import android.os.HandlerThread
|
||||
import android.os.Process
|
||||
import android.util.Log
|
||||
import android.view.Surface
|
||||
import androidx.media3.common.C
|
||||
import androidx.media3.common.util.GlProgram
|
||||
import androidx.media3.common.util.GlUtil
|
||||
import androidx.media3.common.util.Size
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
import com.edde746.plezy.libass.AssAtlasFrame
|
||||
import com.edde746.plezy.libass.media.AssHandler
|
||||
import java.nio.ByteBuffer
|
||||
import java.nio.ByteOrder
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
/**
|
||||
* Atlas-rendering pipeline behind [AssSubtitleSurfaceView].
|
||||
* Runs libass on its own [HandlerThread] into a packed
|
||||
* ALPHA_8 texture atlas plus a single vertex stream, and a GL thread that uploads
|
||||
* both and issues one `glDrawArrays` per frame. Each swap is pinned to the video's
|
||||
* target release time via [EGLExt.eglPresentationTimeANDROID]: SurfaceFlinger holds
|
||||
* the buffer and composes it on the same vsync as the corresponding video frame.
|
||||
*/
|
||||
@UnstableApi
|
||||
internal object AssAtlasPipelineConfig {
|
||||
/** Flip to `true` for `adb logcat -s AssSurfaceGlThread:D AssLibassThread:D` traces. */
|
||||
internal const val TIMING_LOGS = false
|
||||
|
||||
/** Fallback atlas row width when GL caps are unknown (EGL init failed/slow). */
|
||||
internal const val FALLBACK_ATLAS_W = 2048
|
||||
|
||||
/** Fallback atlas height; 2048 × 4096 = 8 MB matches the long-proven default. */
|
||||
internal const val FALLBACK_ATLAS_H = 4096
|
||||
|
||||
/**
|
||||
* Pixel budget per atlas slot once GL caps are known: 4096×4096 or 2048×8192
|
||||
* (16 MB ALPHA_8). Sized so heavy typesetting (full-screen gradients/blurs)
|
||||
* fits where the old fixed 2048×4096 overflowed and dropped frames.
|
||||
*/
|
||||
internal const val ATLAS_PIXEL_BUDGET = 16 * 1024 * 1024
|
||||
|
||||
/** Preallocated vertex-stream capacity (192 bytes × 16384 = 3 MB per buffer). */
|
||||
internal const val MAX_QUADS = 16384
|
||||
|
||||
/** Must match the byte layout produced by `nativeAssRenderFrameAtlas` in AssKt.c. */
|
||||
internal const val BYTES_PER_VERTEX = 32
|
||||
internal const val BYTES_PER_QUAD = BYTES_PER_VERTEX * 6
|
||||
|
||||
/**
|
||||
* Kill switch for speculative render-ahead (see [SpecRenderEngine]) and the
|
||||
* event prefetch. With it off (or on low-RAM devices, which stay at 2 slots)
|
||||
* every request renders on-demand inside the video frame's release deadline —
|
||||
* the pre-speculation behavior.
|
||||
*
|
||||
* Only pays off when typical changed renders fit the speculation coverage
|
||||
* window (~frame interval + release budget): with the un-optimized (-O0)
|
||||
* native core's 90ms+ renders it could only add overhead; with the -O3/NEON
|
||||
* core's ~35-50ms renders it converts near-misses into on-time latches.
|
||||
*/
|
||||
internal const val SPECULATION_ENABLED = true
|
||||
}
|
||||
|
||||
/** Payload handed from the libass worker to the GL thread. */
|
||||
internal class AtlasPayload(
|
||||
val slotIndex: Int,
|
||||
val atlasBuf: ByteBuffer,
|
||||
val vertexBuf: ByteBuffer,
|
||||
var frame: AssAtlasFrame,
|
||||
var presentationTimeUs: Long,
|
||||
var releaseTimeNs: Long,
|
||||
/** Bumped on every content-changing render; lets the GL thread tell "same slot,
|
||||
* new content" apart from "same slot, same content" when deciding to re-upload. */
|
||||
var contentSeq: Long = 0L
|
||||
)
|
||||
|
||||
/** Payload slots plus the atlas dims their buffers were sized for. */
|
||||
internal class AtlasSlots(
|
||||
val payloads: Array<AtlasPayload>,
|
||||
val atlasW: Int,
|
||||
val atlasH: Int
|
||||
)
|
||||
|
||||
/**
|
||||
* Owns both the libass worker and the GL thread. The two talk via a single-slot
|
||||
* atomic — a newer payload always replaces a pending one so the GL thread never
|
||||
* falls behind.
|
||||
*/
|
||||
@UnstableApi
|
||||
internal class AssAtlasPipeline(
|
||||
surface: Surface,
|
||||
width: Int,
|
||||
height: Int,
|
||||
assHandler: AssHandler,
|
||||
lowRamDevice: Boolean = false
|
||||
) {
|
||||
private val surfaceWidth = width
|
||||
private val surfaceHeight = height
|
||||
|
||||
// 3 slots give the render-ahead engine a writable target while one slot is
|
||||
// posted and another is in GL's hands; low-RAM devices stay at 2 slots with
|
||||
// speculation off (the legacy on-demand behavior, ~19 MB less in buffers).
|
||||
private val slotCount = if (lowRamDevice) 2 else 3
|
||||
private val speculationEnabled = AssAtlasPipelineConfig.SPECULATION_ENABLED && slotCount >= 3
|
||||
|
||||
// Atlas dims, resolved exactly once (first-wins): normally by the GL thread from
|
||||
// GL_MAX_TEXTURE_SIZE right after EGL init; by the libass thread's 1 s fallback
|
||||
// if GL never comes up. Both threads then agree on the dims, which matters
|
||||
// because the C side bakes UV denominators = these dims into the vertex stream
|
||||
// and the GL side allocates the texture once at these dims.
|
||||
private val dimsResolved = java.util.concurrent.atomic.AtomicBoolean(false)
|
||||
private val dimsLatch = java.util.concurrent.CountDownLatch(1)
|
||||
|
||||
@Volatile private var atlasW = 0
|
||||
|
||||
@Volatile private var atlasH = 0
|
||||
|
||||
private fun resolveAtlasDims(maxTextureSize: Int): Pair<Int, Int> {
|
||||
if (dimsResolved.compareAndSet(false, true)) {
|
||||
if (maxTextureSize < 4096) {
|
||||
// Query failed (or an ancient GPU): keep the long-proven fixed size.
|
||||
atlasW = AssAtlasPipelineConfig.FALLBACK_ATLAS_W
|
||||
atlasH = AssAtlasPipelineConfig.FALLBACK_ATLAS_H
|
||||
} else {
|
||||
val w = if (surfaceWidth > 2048) 4096 else 2048
|
||||
atlasW = w
|
||||
atlasH = minOf(maxTextureSize, AssAtlasPipelineConfig.ATLAS_PIXEL_BUDGET / w)
|
||||
}
|
||||
if (AssAtlasPipelineConfig.TIMING_LOGS) {
|
||||
Log.d("AssAtlasPipeline", "atlas dims ${atlasW}x$atlasH (glMaxTexture=$maxTextureSize)")
|
||||
}
|
||||
dimsLatch.countDown()
|
||||
}
|
||||
return atlasW to atlasH
|
||||
}
|
||||
|
||||
// Lazily allocated on the libass thread once atlas dims are known; ~19 MB of
|
||||
// direct buffers per slot at the full budget, so don't pay it before the
|
||||
// first actual render. Confined to the libass thread after creation.
|
||||
private var slots: AtlasSlots? = null
|
||||
|
||||
private fun acquireSlots(): AtlasSlots {
|
||||
slots?.let { return it }
|
||||
if (!dimsLatch.await(1, java.util.concurrent.TimeUnit.SECONDS)) {
|
||||
resolveAtlasDims(0) // first-wins: no-op if the GL thread resolved meanwhile
|
||||
}
|
||||
val w = atlasW
|
||||
val h = atlasH
|
||||
val payloads = Array(slotCount) { index ->
|
||||
AtlasPayload(
|
||||
slotIndex = index,
|
||||
atlasBuf = ByteBuffer.allocateDirect(w * h).order(ByteOrder.nativeOrder()),
|
||||
vertexBuf = ByteBuffer.allocateDirect(
|
||||
AssAtlasPipelineConfig.MAX_QUADS * AssAtlasPipelineConfig.BYTES_PER_QUAD
|
||||
).order(ByteOrder.nativeOrder()),
|
||||
frame = AssAtlasFrame(0, 0, 0, 0, 0),
|
||||
presentationTimeUs = 0L,
|
||||
releaseTimeNs = C.TIME_UNSET
|
||||
)
|
||||
}
|
||||
return AtlasSlots(payloads, w, h).also { slots = it }
|
||||
}
|
||||
|
||||
/** Slot index the GL thread most recently took for drawing; the libass side
|
||||
* never writes it. Written only inside [takePending] on the GL thread. */
|
||||
@Volatile private var glLastTakenSlot = -1
|
||||
|
||||
private val pendingPayload = AtomicReference<AtlasPayload?>(null)
|
||||
private val glThread = AtlasGlThread(
|
||||
surface,
|
||||
width,
|
||||
height,
|
||||
assHandler,
|
||||
takePending = {
|
||||
pendingPayload.getAndSet(null)?.also { glLastTakenSlot = it.slotIndex }
|
||||
},
|
||||
resolveAtlasDims = ::resolveAtlasDims
|
||||
)
|
||||
private val libassThread = AtlasLibassThread(
|
||||
assHandler,
|
||||
acquireSlots = ::acquireSlots,
|
||||
speculationEnabled = speculationEnabled,
|
||||
glTakenSlot = { glLastTakenSlot },
|
||||
onFrameReady = { payload ->
|
||||
pendingPayload.set(payload)
|
||||
glThread.triggerDraw()
|
||||
}
|
||||
)
|
||||
|
||||
fun start() {
|
||||
if (AssAtlasPipelineConfig.TIMING_LOGS) {
|
||||
Log.d(
|
||||
"AssAtlasPipeline",
|
||||
"start surface=${surfaceWidth}x$surfaceHeight slots=$slotCount speculation=$speculationEnabled"
|
||||
)
|
||||
}
|
||||
glThread.start()
|
||||
libassThread.start()
|
||||
}
|
||||
|
||||
fun requestRender(presentationTimeUs: Long, releaseTimeNs: Long) {
|
||||
libassThread.enqueue(presentationTimeUs, releaseTimeNs)
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-renders the last requested position — for renderer state changes (margins,
|
||||
* use-margins) that must become visible while playback is paused. Safe during
|
||||
* playback: the next video frame's [requestRender] supersedes it (latest-wins).
|
||||
*/
|
||||
fun invalidate() {
|
||||
libassThread.invalidate()
|
||||
}
|
||||
|
||||
fun onSurfaceSizeChanged(width: Int, height: Int) {
|
||||
glThread.onSurfaceSizeChanged(width, height)
|
||||
}
|
||||
|
||||
/** Vsync-pinned swaps performed (excludes untimed invalidate repaints). */
|
||||
val swapCount: Long get() = glThread.swapCount
|
||||
|
||||
/** Pinned swaps that finished past the swap-time budget (possible missed vsync). */
|
||||
val lateSwapCount: Long get() = glThread.lateSwapCount
|
||||
|
||||
/** Worst observed swap lateness past the target release time, in milliseconds. */
|
||||
val maxLateMs: Long get() = glThread.maxLateMs
|
||||
|
||||
/** Total libass renders performed (one per serviced request). */
|
||||
val renderCount: Long get() = libassThread.renderCount
|
||||
|
||||
/** Renders where libass reported changed content (atlas/vertex rewritten). */
|
||||
val changedRenderCount: Long get() = libassThread.changedRenderCount
|
||||
|
||||
/** Renders that overflowed the atlas/vertex capacity (frame content incomplete). */
|
||||
val overflowCount: Long get() = libassThread.overflowCount
|
||||
|
||||
/** Duration of the most recent libass render, in milliseconds. */
|
||||
val lastLibassMs: Long get() = libassThread.lastLibassMs
|
||||
|
||||
/** Worst observed libass render duration, in milliseconds. */
|
||||
val maxLibassMs: Long get() = libassThread.maxLibassMs
|
||||
|
||||
/** Changed-render duration histogram: [≤10ms, ≤25ms, ≤42ms, ≤84ms, >84ms]. */
|
||||
val libassMsHistogram: List<Long> get() = libassThread.histogramSnapshot()
|
||||
|
||||
/** Requests served from a pre-rendered (speculative) frame — GL-only hot path. */
|
||||
val specHits: Long get() = libassThread.specHits
|
||||
|
||||
/** Requests where a speculative frame existed but didn't match (seek, state change). */
|
||||
val specMisses: Long get() = libassThread.specMisses
|
||||
|
||||
/** Speculation rounds skipped (paused, pending request, no confident cadence). */
|
||||
val specSkips: Long get() = libassThread.specSkips
|
||||
|
||||
/** Cache-warming prefetch renders of upcoming events. */
|
||||
val prefetchCount: Long get() = libassThread.prefetchCount
|
||||
|
||||
/** Worst (minimum) lead of a changed-content pinned swap vs its target release
|
||||
* time, in ms; negative = the new content was queued after the video frame's
|
||||
* vsync. Long.MAX_VALUE until a changed pinned swap happened. */
|
||||
val minLeadChangedMs: Long get() = glThread.minLeadChangedMs
|
||||
|
||||
fun releaseAndWait() {
|
||||
libassThread.releaseAndWait()
|
||||
glThread.releaseAndWait()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops a [Handler] synchronously: posts [releaseWhat] with an [Ack], waits up to 1 s
|
||||
* for the handler to invoke [onReleased] (on its own looper) and signal the latch.
|
||||
*/
|
||||
private fun postShutdownAndWait(
|
||||
handler: Handler,
|
||||
releaseWhat: Int,
|
||||
onReleased: () -> Unit
|
||||
) {
|
||||
val latch = Object()
|
||||
synchronized(latch) {
|
||||
handler.obtainMessage(releaseWhat, Ack(latch, onReleased)).sendToTarget()
|
||||
try {
|
||||
latch.wait(1_000)
|
||||
} catch (_: InterruptedException) {
|
||||
Thread.currentThread().interrupt()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Transport for [postShutdownAndWait] — the handler callback calls [release] then notifies. */
|
||||
private class Ack(val latch: Any, val release: () -> Unit)
|
||||
|
||||
/**
|
||||
* Runs libass off the GL thread into a packed atlas + vertex stream. Latest-wins:
|
||||
* older pending renders are dropped when a newer one arrives. Slot choice, the
|
||||
* changed-flag bookkeeping and speculative render-ahead live in [SpecRenderEngine];
|
||||
* this thread owns the buffers, the timing/stat accounting and the GL handoff.
|
||||
*/
|
||||
@UnstableApi
|
||||
private class AtlasLibassThread(
|
||||
private val assHandler: AssHandler,
|
||||
private val acquireSlots: () -> AtlasSlots,
|
||||
private val speculationEnabled: Boolean,
|
||||
private val glTakenSlot: () -> Int,
|
||||
private val onFrameReady: (AtlasPayload) -> Unit
|
||||
) : HandlerThread(TAG, Process.THREAD_PRIORITY_DISPLAY) {
|
||||
|
||||
/** Immutable (pts, release) request — handed off through a single atomic so a
|
||||
* concurrent enqueue can neither be lost by drain's consume nor torn in half.
|
||||
* [enqueueNs] timestamps the handoff so drain can report how long the request
|
||||
* sat behind an in-flight render (the queue-wait component of subtitle lag). */
|
||||
private class PendingFrame(val ptsUs: Long, val releaseNs: Long, val enqueueNs: Long = System.nanoTime())
|
||||
|
||||
private lateinit var handler: Handler
|
||||
|
||||
private val pending = AtomicReference<PendingFrame?>(null)
|
||||
|
||||
@Volatile private var lastRequestedPtsUs = UNSET
|
||||
private var contentSeqCounter = 0L
|
||||
|
||||
// Thread-confined; created on first render so non-ASS playback never allocates.
|
||||
private var engine: SpecRenderEngine? = null
|
||||
|
||||
val specHits: Long get() = engine?.specHits ?: 0L
|
||||
val specMisses: Long get() = engine?.specMisses ?: 0L
|
||||
val specSkips: Long get() = engine?.specSkips ?: 0L
|
||||
val prefetchCount: Long get() = engine?.prefetchCount ?: 0L
|
||||
|
||||
// Telemetry; single-writer (this thread), read from the stats path.
|
||||
@Volatile var renderCount = 0L
|
||||
private set
|
||||
|
||||
@Volatile var changedRenderCount = 0L
|
||||
private set
|
||||
|
||||
@Volatile var overflowCount = 0L
|
||||
private set
|
||||
|
||||
@Volatile var lastLibassMs = 0L
|
||||
private set
|
||||
|
||||
@Volatile var maxLibassMs = 0L
|
||||
private set
|
||||
|
||||
/** Changed-render durations bucketed at ≤10 / ≤25 / ≤42 / ≤84 / >84 ms. */
|
||||
private val histogram = java.util.concurrent.atomic.AtomicLongArray(5)
|
||||
|
||||
fun histogramSnapshot(): List<Long> = List(histogram.length()) { histogram.get(it) }
|
||||
|
||||
private fun recordChangedRenderMs(ms: Long) {
|
||||
val bucket = when {
|
||||
ms <= 10 -> 0
|
||||
ms <= 25 -> 1
|
||||
ms <= 42 -> 2
|
||||
ms <= 84 -> 3
|
||||
else -> 4
|
||||
}
|
||||
histogram.incrementAndGet(bucket)
|
||||
}
|
||||
|
||||
override fun start() {
|
||||
super.start()
|
||||
handler = Handler(looper) { msg ->
|
||||
when (msg.what) {
|
||||
MSG_RENDER -> drainAndRender()
|
||||
MSG_RELEASE -> {
|
||||
val ack = msg.obj as Ack
|
||||
ack.release()
|
||||
quit()
|
||||
synchronized(ack.latch) { (ack.latch as Object).notifyAll() }
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
fun enqueue(presentationTimeUs: Long, releaseTimeNs: Long) {
|
||||
if (!::handler.isInitialized) return
|
||||
val dropped = pending.getAndSet(PendingFrame(presentationTimeUs, releaseTimeNs))
|
||||
if (dropped != null && AssAtlasPipelineConfig.TIMING_LOGS) {
|
||||
// A request was coalesced away — the renderer is behind by at least one
|
||||
// frame. agedMs = how long the dropped request had been waiting.
|
||||
Log.d(
|
||||
TAG,
|
||||
"drop pts=${dropped.ptsUs / 1000}ms agedMs=${(System.nanoTime() - dropped.enqueueNs) / 1_000_000} " +
|
||||
"replacedBy=${presentationTimeUs / 1000}ms"
|
||||
)
|
||||
}
|
||||
handler.removeMessages(MSG_RENDER)
|
||||
handler.sendEmptyMessage(MSG_RENDER)
|
||||
}
|
||||
|
||||
/** Re-enqueues the last requested PTS (renderer state changed, possibly while paused). */
|
||||
fun invalidate() {
|
||||
val pts = lastRequestedPtsUs
|
||||
if (pts == UNSET) return
|
||||
// TIME_UNSET release time => the GL thread swaps immediately instead of
|
||||
// vsync-pinning to a video frame that may never come while paused.
|
||||
enqueue(pts, C.TIME_UNSET)
|
||||
}
|
||||
|
||||
private fun ensureEngine(slots: AtlasSlots): SpecRenderEngine {
|
||||
engine?.let { return it }
|
||||
return SpecRenderEngine(
|
||||
slotCount = slots.payloads.size,
|
||||
speculationEnabled = speculationEnabled,
|
||||
renderAt = { timeMs, slot -> timedRender(timeMs, slots, slot) },
|
||||
// Renderer identity in the high bits + its state generation in the low bits:
|
||||
// a recreated renderer (media item transition) can never alias a stale
|
||||
// speculation, even if the new generation counter happens to match.
|
||||
stateGeneration = {
|
||||
assHandler.render?.let {
|
||||
(System.identityHashCode(it).toLong() shl 32) or (it.stateGeneration.toLong() and 0xffffffffL)
|
||||
} ?: -1L
|
||||
},
|
||||
glTakenSlot = glTakenSlot,
|
||||
debugLog = if (AssAtlasPipelineConfig.TIMING_LOGS) ({ msg -> Log.d(TAG, msg) }) else null
|
||||
).also { engine = it }
|
||||
}
|
||||
|
||||
/** Consecutive renders that reported no content change — a static screen.
|
||||
* Reset by any changed render (dialogue flips, karaoke, animated signs). */
|
||||
private var unchangedStreak = 0
|
||||
|
||||
/** Renders into [slot]'s buffers, owning the per-render timing/stat accounting
|
||||
* for both on-demand and speculative renders. */
|
||||
private fun timedRender(timeMs: Long, slots: AtlasSlots, slot: Int): AssAtlasFrame? {
|
||||
val render = assHandler.render ?: return null
|
||||
val payload = slots.payloads[slot]
|
||||
val t0 = System.nanoTime()
|
||||
val frame = render.renderFrameAtlas(timeMs, payload.atlasBuf, slots.atlasW, slots.atlasH, payload.vertexBuf)
|
||||
?: return null
|
||||
val libassMs = (System.nanoTime() - t0) / 1_000_000
|
||||
renderCount++
|
||||
lastLibassMs = libassMs
|
||||
if (libassMs > maxLibassMs) maxLibassMs = libassMs
|
||||
if (frame.truncated > 0) overflowCount++
|
||||
if (frame.changed != 0) {
|
||||
changedRenderCount++
|
||||
recordChangedRenderMs(libassMs)
|
||||
unchangedStreak = 0
|
||||
} else {
|
||||
unchangedStreak++
|
||||
}
|
||||
return frame
|
||||
}
|
||||
|
||||
private fun drainAndRender() {
|
||||
val request = pending.getAndSet(null) ?: return
|
||||
val pts = request.ptsUs
|
||||
val releaseNs = request.releaseNs
|
||||
lastRequestedPtsUs = pts
|
||||
val tDrain = System.nanoTime()
|
||||
// How long the request sat in the handoff (behind an in-flight on-demand or
|
||||
// speculative render) — the queue-wait component of any subtitle lag.
|
||||
val waitMs = (tDrain - request.enqueueNs) / 1_000_000
|
||||
// Before any ASS render exists (SRT/VTT or no subs) do nothing — this also
|
||||
// keeps the slot buffers unallocated for non-ASS playback.
|
||||
if (assHandler.render == null) return
|
||||
val slots = acquireSlots()
|
||||
val engine = ensureEngine(slots)
|
||||
val pinned = releaseNs != C.TIME_UNSET
|
||||
// Budget left until the video frame's vsync when we START servicing.
|
||||
val budgetMs = if (pinned) (releaseNs - tDrain) / 1_000_000 else -1L
|
||||
|
||||
when (val outcome = engine.service(pts, pinned)) {
|
||||
is SpecRenderEngine.Outcome.Post -> {
|
||||
val payload = slots.payloads[outcome.slot]
|
||||
if (outcome.newContent) {
|
||||
payload.frame = outcome.frame
|
||||
payload.contentSeq = ++contentSeqCounter
|
||||
}
|
||||
payload.presentationTimeUs = pts
|
||||
payload.releaseTimeNs = releaseNs
|
||||
onFrameReady(payload)
|
||||
if (AssAtlasPipelineConfig.TIMING_LOGS) {
|
||||
Log.d(
|
||||
TAG,
|
||||
"render pts=${pts / 1000}ms seq=${payload.contentSeq} waitMs=$waitMs budgetMs=$budgetMs " +
|
||||
"libassMs=$lastLibassMs lockWaitMs=${assHandler.render?.lastLockWaitMs} " +
|
||||
"specHit=${outcome.specHit} changed=${payload.frame.changed} quads=${payload.frame.quadCount} " +
|
||||
"atlas=${payload.frame.atlasWidth}x${payload.frame.atlasHeight} truncated=${payload.frame.truncated}"
|
||||
)
|
||||
}
|
||||
}
|
||||
SpecRenderEngine.Outcome.Skip -> {
|
||||
if (AssAtlasPipelineConfig.TIMING_LOGS) {
|
||||
Log.d(TAG, "skip pts=${pts / 1000}ms waitMs=$waitMs budgetMs=$budgetMs (no content)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Pre-render the predicted next frame in the dead time between requests so the
|
||||
// next service is (usually) a GL-only hit. Never delays a waiting request.
|
||||
engine.speculateAfter(pts, pinned, hasPending = pending.get() != null)?.let { write ->
|
||||
val payload = slots.payloads[write.slot]
|
||||
payload.frame = write.frame
|
||||
payload.contentSeq = ++contentSeqCounter
|
||||
if (AssAtlasPipelineConfig.TIMING_LOGS) {
|
||||
Log.d(
|
||||
TAG,
|
||||
"spec after=${pts / 1000}ms seq=${payload.contentSeq} libassMs=$lastLibassMs " +
|
||||
"lockWaitMs=${assHandler.render?.lastLockWaitMs} slot=${write.slot} quads=${write.frame.quadCount}"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
maybePrefetch(engine, slots, pts, pinned)
|
||||
}
|
||||
|
||||
/** Start time of the last event boundary we cache-warmed (libass/track ms). */
|
||||
private var lastPrefetchedStartMs = Long.MIN_VALUE
|
||||
|
||||
/** Wall time of the last prefetch render, for the cooldown. */
|
||||
private var lastPrefetchNs = Long.MIN_VALUE / 2
|
||||
|
||||
/**
|
||||
* Cache-warms the next upcoming subtitle event so heavy typesetting pays its
|
||||
* cache-cold rasterization (seconds on weak devices) before the sign appears
|
||||
* instead of at appearance.
|
||||
*
|
||||
* The render blocks this thread, and during playback a new request is never
|
||||
* more than one frame interval away — so a prefetch is only allowed when its
|
||||
* delay cannot be SEEN, not merely when the queue is momentarily empty
|
||||
* (the v1 mistake, which thrashed on densely-authored per-frame events and
|
||||
* stalled visible dialogue):
|
||||
* - the screen must be static ([unchangedStreak]): requests delayed behind
|
||||
* the prefetch re-render identical content, so their lateness is invisible;
|
||||
* - the warmed event must be the NEXT on-screen change (no other event start
|
||||
* or end before it) — this also kills dense per-frame event sections,
|
||||
* where the next change is always ≤ one frame away;
|
||||
* - a cooldown bounds the worst-case overhead to one render per window.
|
||||
*/
|
||||
private fun maybePrefetch(engine: SpecRenderEngine, slots: AtlasSlots, ptsUs: Long, pinned: Boolean) {
|
||||
if (!speculationEnabled) return
|
||||
if (!pinned) return
|
||||
if (pending.get() != null) return
|
||||
if (unchangedStreak < PREFETCH_STATIC_STREAK) return
|
||||
val now = System.nanoTime()
|
||||
if (now - lastPrefetchNs < PREFETCH_COOLDOWN_NS) return
|
||||
val track = assHandler.track ?: return
|
||||
val nowMs = ptsUs / 1000
|
||||
// Events closer than MIN_AHEAD are the regular per-frame path's business;
|
||||
// beyond HORIZON the warmed bitmaps may be evicted before they're needed.
|
||||
val targetMs = track.nextEventStartMs(nowMs + PREFETCH_MIN_AHEAD_MS)
|
||||
if (targetMs < 0 || targetMs == lastPrefetchedStartMs) return
|
||||
if (targetMs > nowMs + PREFETCH_HORIZON_MS) return
|
||||
// Invisibility gate, time-budgeted: a prefetch is invisible as long as it
|
||||
// finishes before anything on screen is due to change (the screen is static
|
||||
// per the streak gate, so requests delayed behind it re-render identical
|
||||
// content). Estimate the cost from the worst render seen this session —
|
||||
// an overestimate only skips warming; an underestimate delays one boundary
|
||||
// by the shortfall. nextEventChangeMs also sees ends, so a dialogue line
|
||||
// due to disappear inside the budget skips the prefetch.
|
||||
val nextChangeMs = track.nextEventChangeMs(nowMs)
|
||||
if (nextChangeMs in 0 until targetMs) {
|
||||
val runwayMs = nextChangeMs - nowMs
|
||||
val costEstimateMs = (maxLibassMs * 5 / 4).coerceIn(PREFETCH_COST_FLOOR_MS, PREFETCH_COST_CEIL_MS)
|
||||
if (runwayMs < costEstimateMs + PREFETCH_SAFETY_MS) return
|
||||
}
|
||||
lastPrefetchedStartMs = targetMs
|
||||
lastPrefetchNs = now
|
||||
engine.prefetch(targetMs * 1000)?.let { write ->
|
||||
val payload = slots.payloads[write.slot]
|
||||
payload.frame = write.frame
|
||||
payload.contentSeq = ++contentSeqCounter
|
||||
}
|
||||
if (AssAtlasPipelineConfig.TIMING_LOGS) {
|
||||
Log.d(
|
||||
TAG,
|
||||
"prefetch evt=${targetMs}ms aheadMs=${targetMs - nowMs} " +
|
||||
"tookMs=${(System.nanoTime() - now) / 1_000_000} libassMs=$lastLibassMs"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun releaseAndWait() {
|
||||
if (!::handler.isInitialized) {
|
||||
quit()
|
||||
return
|
||||
}
|
||||
postShutdownAndWait(handler, MSG_RELEASE) { /* nothing thread-local to tear down */ }
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "AssLibassThread"
|
||||
private const val MSG_RENDER = 1
|
||||
private const val MSG_RELEASE = 2
|
||||
private const val UNSET = Long.MIN_VALUE
|
||||
|
||||
/** Don't prefetch events the per-frame speculation will reach imminently. */
|
||||
private const val PREFETCH_MIN_AHEAD_MS = 1_000L
|
||||
|
||||
/** Don't warm caches so early that the bitmaps could be evicted again. */
|
||||
private const val PREFETCH_HORIZON_MS = 15_000L
|
||||
|
||||
/** Static-screen requirement before a prefetch may block this thread. */
|
||||
private const val PREFETCH_STATIC_STREAK = 3
|
||||
|
||||
/** Minimum spacing between prefetch renders. */
|
||||
private const val PREFETCH_COOLDOWN_NS = 2_000_000_000L
|
||||
|
||||
/** Cost-estimate clamp for the time-budgeted invisibility gate: never
|
||||
* assume a prefetch cheaper than the floor (estimator may not have seen a
|
||||
* heavy frame yet) nor pointlessly demand more runway than the ceiling. */
|
||||
private const val PREFETCH_COST_FLOOR_MS = 250L
|
||||
private const val PREFETCH_COST_CEIL_MS = 1_500L
|
||||
|
||||
/** Slack added to the cost estimate when checking the static runway. */
|
||||
private const val PREFETCH_SAFETY_MS = 150L
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Owns the EGL surface, uploads the atlas + vertex stream and issues a single
|
||||
* `glDrawArrays` per frame. Swaps immediately with the swap pinned to the video's
|
||||
* target release time via [EGLExt.eglPresentationTimeANDROID]; SurfaceFlinger
|
||||
* holds the buffer until then, so the thread is never blocked waiting for a vsync.
|
||||
*/
|
||||
@UnstableApi
|
||||
private class AtlasGlThread(
|
||||
private val surface: Surface,
|
||||
@Volatile private var width: Int,
|
||||
@Volatile private var height: Int,
|
||||
private val assHandler: AssHandler,
|
||||
private val takePending: () -> AtlasPayload?,
|
||||
private val resolveAtlasDims: (maxTextureSize: Int) -> Pair<Int, Int>
|
||||
) : HandlerThread(TAG, Process.THREAD_PRIORITY_DISPLAY) {
|
||||
|
||||
private lateinit var handler: Handler
|
||||
private var eglDisplay: EGLDisplay = EGL14.EGL_NO_DISPLAY
|
||||
private var eglContext: EGLContext = EGL14.EGL_NO_CONTEXT
|
||||
private var eglSurface: EGLSurface = EGL14.EGL_NO_SURFACE
|
||||
|
||||
private val renderer = AtlasRenderer(assHandler)
|
||||
private var lastUploadedPayload: AtlasPayload? = null
|
||||
private var lastUploadedSeq = -1L
|
||||
private var lastSwappedSeq = -1L
|
||||
|
||||
// Lateness telemetry; single-writer (this thread), read from the stats path.
|
||||
@Volatile var swapCount = 0L
|
||||
private set
|
||||
|
||||
@Volatile var lateSwapCount = 0L
|
||||
private set
|
||||
|
||||
@Volatile var maxLateMs = 0L
|
||||
private set
|
||||
|
||||
/** Minimum lead (release target − swap completion) over changed-content pinned
|
||||
* swaps; negative = content queued after the video frame's vsync. */
|
||||
@Volatile var minLeadChangedMs = Long.MAX_VALUE
|
||||
private set
|
||||
|
||||
override fun start() {
|
||||
super.start()
|
||||
handler = Handler(looper) { msg ->
|
||||
try {
|
||||
when (msg.what) {
|
||||
MSG_INIT -> initEgl()
|
||||
MSG_DRAW -> drawAndSwap()
|
||||
MSG_SIZE_CHANGED -> sizeChanged(width, height)
|
||||
MSG_RELEASE -> {
|
||||
val ack = msg.obj as Ack
|
||||
ack.release()
|
||||
quit()
|
||||
synchronized(ack.latch) { (ack.latch as Object).notifyAll() }
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "GL thread error", e)
|
||||
releaseEgl()
|
||||
}
|
||||
true
|
||||
}
|
||||
handler.sendEmptyMessage(MSG_INIT)
|
||||
}
|
||||
|
||||
fun onSurfaceSizeChanged(width: Int, height: Int) {
|
||||
this.width = width
|
||||
this.height = height
|
||||
handler.sendEmptyMessage(MSG_SIZE_CHANGED)
|
||||
}
|
||||
|
||||
fun triggerDraw() {
|
||||
if (!::handler.isInitialized) return
|
||||
handler.removeMessages(MSG_DRAW)
|
||||
handler.sendEmptyMessage(MSG_DRAW)
|
||||
}
|
||||
|
||||
fun releaseAndWait() {
|
||||
if (!::handler.isInitialized) {
|
||||
quit()
|
||||
return
|
||||
}
|
||||
postShutdownAndWait(handler, MSG_RELEASE) { releaseEgl() }
|
||||
}
|
||||
|
||||
private fun initEgl() {
|
||||
try {
|
||||
eglDisplay = GlUtil.getDefaultEglDisplay()
|
||||
eglContext = GlUtil.createEglContext(eglDisplay)
|
||||
eglSurface = GlUtil.createEglSurface(eglDisplay, surface, C.COLOR_TRANSFER_SDR, false)
|
||||
EGL14.eglMakeCurrent(eglDisplay, eglSurface, eglSurface, eglContext)
|
||||
renderer.onSurfaceCreated()
|
||||
// Resolve atlas dims from real GL caps (first-wins against the libass
|
||||
// thread's fallback) and allocate the texture once at those dims — uploads
|
||||
// are glTexSubImage2D of the packed rows from then on.
|
||||
val maxTexture = IntArray(1)
|
||||
GLES20.glGetIntegerv(GLES20.GL_MAX_TEXTURE_SIZE, maxTexture, 0)
|
||||
val (atlasW, atlasH) = resolveAtlasDims(maxTexture[0])
|
||||
renderer.allocateAtlasTexture(atlasW, atlasH)
|
||||
sizeChanged(width, height)
|
||||
} catch (e: GlUtil.GlException) {
|
||||
Log.e(TAG, "Failed to initialize EGL", e)
|
||||
}
|
||||
}
|
||||
|
||||
private fun sizeChanged(width: Int, height: Int) {
|
||||
renderer.onSurfaceChanged(width, height)
|
||||
if (eglDisplay != EGL14.EGL_NO_DISPLAY) {
|
||||
GlUtil.clearFocusedBuffers()
|
||||
EGL14.eglSwapBuffers(eglDisplay, eglSurface)
|
||||
}
|
||||
}
|
||||
|
||||
private fun drawAndSwap() {
|
||||
if (eglDisplay == EGL14.EGL_NO_DISPLAY) return
|
||||
val payload = takePending() ?: return
|
||||
|
||||
// Render immediately (GL commands queue on the GPU). Re-upload only when the
|
||||
// slot's content actually changed — identity alone is not enough because the
|
||||
// libass side rewrites slot buffers in place (contentSeq tracks the rewrites).
|
||||
val t0 = System.nanoTime()
|
||||
val reuse = payload === lastUploadedPayload && payload.contentSeq == lastUploadedSeq
|
||||
renderer.onDrawFrame(payload, reuseUploads = reuse)
|
||||
lastUploadedPayload = payload
|
||||
lastUploadedSeq = payload.contentSeq
|
||||
val t1 = System.nanoTime()
|
||||
|
||||
// Swap immediately with the presentation time set: SurfaceFlinger holds the
|
||||
// queued buffer until the video frame's target release time, so the subtitle
|
||||
// can never appear early, and the GL thread is free again within a couple of
|
||||
// milliseconds. Sleeping here until near the target vsync (as a removed
|
||||
// TextureView path once required) made this thread blind for almost a whole
|
||||
// frame interval — the single-slot latest-wins handoff would then drop an
|
||||
// intermediate subtitle state (e.g. the transition to blank), showing the
|
||||
// previous state one frame too long.
|
||||
if (payload.releaseTimeNs != C.TIME_UNSET) {
|
||||
EGLExt.eglPresentationTimeANDROID(eglDisplay, eglSurface, payload.releaseTimeNs)
|
||||
}
|
||||
EGL14.eglSwapBuffers(eglDisplay, eglSurface)
|
||||
val t2 = System.nanoTime()
|
||||
if (payload.releaseTimeNs != C.TIME_UNSET) {
|
||||
swapCount++
|
||||
val lateNs = t2 - payload.releaseTimeNs
|
||||
if (lateNs > LATE_THRESHOLD_NS) {
|
||||
lateSwapCount++
|
||||
val lateMs = lateNs / 1_000_000
|
||||
if (lateMs > maxLateMs) maxLateMs = lateMs
|
||||
}
|
||||
// Lead of changed-content swaps is the frame-perfection signal: ≥ 0 means
|
||||
// the new subtitle content reached the queue before the video frame's vsync.
|
||||
if (payload.contentSeq != lastSwappedSeq) {
|
||||
val leadMs = -lateNs / 1_000_000
|
||||
if (leadMs < minLeadChangedMs) minLeadChangedMs = leadMs
|
||||
}
|
||||
}
|
||||
lastSwappedSeq = payload.contentSeq
|
||||
if (AssAtlasPipelineConfig.TIMING_LOGS) {
|
||||
val pinned = payload.releaseTimeNs != C.TIME_UNSET
|
||||
// headroomMs: slack before the target vsync when GL STARTED; leadMs: slack
|
||||
// when the buffer was actually queued (negative = queued after the vsync).
|
||||
val headroomMs = if (pinned) (payload.releaseTimeNs - t0) / 1_000_000 else -1L
|
||||
val leadMs = if (pinned) (payload.releaseTimeNs - t2) / 1_000_000 else -1L
|
||||
Log.d(
|
||||
TAG,
|
||||
"swap pts=${payload.presentationTimeUs / 1000}ms seq=${payload.contentSeq} " +
|
||||
"quads=${payload.frame.quadCount} reused=$reuse drawMs=${(t1 - t0) / 1_000_000} " +
|
||||
"swapMs=${(t2 - t1) / 1_000_000} headroomMs=$headroomMs leadMs=$leadMs pinned=$pinned"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun releaseEgl() {
|
||||
if (eglDisplay != EGL14.EGL_NO_DISPLAY) {
|
||||
try {
|
||||
renderer.onSurfaceDestroyed()
|
||||
GlUtil.destroyEglSurface(eglDisplay, eglSurface)
|
||||
GlUtil.destroyEglContext(eglDisplay, eglContext)
|
||||
} catch (e: GlUtil.GlException) {
|
||||
Log.e(TAG, "Failed to release EGL", e)
|
||||
} finally {
|
||||
eglDisplay = EGL14.EGL_NO_DISPLAY
|
||||
eglContext = EGL14.EGL_NO_CONTEXT
|
||||
eglSurface = EGL14.EGL_NO_SURFACE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "AssSurfaceGlThread"
|
||||
private const val MSG_INIT = 1
|
||||
private const val MSG_DRAW = 2
|
||||
private const val MSG_SIZE_CHANGED = 3
|
||||
private const val MSG_RELEASE = 4
|
||||
|
||||
/**
|
||||
* Swaps finishing this far past the target release time arrived after the
|
||||
* buffer should already have been queued and may miss the frame's vsync —
|
||||
* actual slack depends on the display's vsync offset from the release time.
|
||||
*/
|
||||
private const val LATE_THRESHOLD_NS = 4_000_000L
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* GL-side work for the atlas-based path. Maintains a single atlas texture and a
|
||||
* single vertex buffer; uploads them per frame (unless the payload identity
|
||||
* matches the last upload) and issues one `glDrawArrays` for the whole frame.
|
||||
*/
|
||||
@UnstableApi
|
||||
private class AtlasRenderer(private val assHandler: AssHandler) {
|
||||
|
||||
private val vertexShaderCode = """
|
||||
attribute vec2 a_Position;
|
||||
attribute vec2 a_TexCoord;
|
||||
attribute vec4 a_Color;
|
||||
uniform vec2 u_SurfaceSize;
|
||||
varying vec2 v_TexCoord;
|
||||
varying vec4 v_Color;
|
||||
void main() {
|
||||
vec2 clip = (a_Position / u_SurfaceSize) * 2.0 - 1.0;
|
||||
clip.y = -clip.y;
|
||||
gl_Position = vec4(clip, 0.0, 1.0);
|
||||
v_TexCoord = a_TexCoord;
|
||||
v_Color = a_Color;
|
||||
}
|
||||
""".trimIndent()
|
||||
|
||||
private val fragmentShaderCode = """
|
||||
precision mediump float;
|
||||
varying vec2 v_TexCoord;
|
||||
varying vec4 v_Color;
|
||||
uniform sampler2D u_Texture;
|
||||
void main() {
|
||||
float alpha = texture2D(u_Texture, v_TexCoord).a;
|
||||
gl_FragColor = v_Color * alpha;
|
||||
}
|
||||
""".trimIndent()
|
||||
|
||||
private var surfaceSize = Size.ZERO
|
||||
private lateinit var glProgram: GlProgram
|
||||
|
||||
private var atlasTexId = 0
|
||||
private var vertexBufferId = 0
|
||||
|
||||
private var aPosition = 0
|
||||
private var aTexCoord = 0
|
||||
private var aColor = 0
|
||||
private var uTexture = 0
|
||||
private var uSurfaceSize = 0
|
||||
|
||||
private var atlasAllocatedW = 0
|
||||
private var atlasAllocatedH = 0
|
||||
|
||||
/**
|
||||
* Allocates the atlas texture once at the resolved dims. The C side bakes UV
|
||||
* denominators = these dims into the vertex stream, so per-frame uploads can be
|
||||
* partial ([uploadAtlas]) without ever reallocating — drivers keep one stable
|
||||
* texture allocation instead of churning on packed-height changes.
|
||||
*/
|
||||
fun allocateAtlasTexture(width: Int, height: Int) {
|
||||
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, atlasTexId)
|
||||
GLES20.glTexImage2D(
|
||||
GLES20.GL_TEXTURE_2D, 0, GLES20.GL_ALPHA,
|
||||
width, height, 0,
|
||||
GLES20.GL_ALPHA, GLES20.GL_UNSIGNED_BYTE, null
|
||||
)
|
||||
atlasAllocatedW = width
|
||||
atlasAllocatedH = height
|
||||
}
|
||||
|
||||
fun onSurfaceCreated() {
|
||||
glProgram = GlProgram(vertexShaderCode, fragmentShaderCode)
|
||||
GlUtil.checkGlError()
|
||||
glProgram.use()
|
||||
|
||||
aPosition = glProgram.getAttributeArrayLocationAndEnable("a_Position")
|
||||
aTexCoord = glProgram.getAttributeArrayLocationAndEnable("a_TexCoord")
|
||||
aColor = glProgram.getAttributeArrayLocationAndEnable("a_Color")
|
||||
uTexture = glProgram.getUniformLocation("u_Texture")
|
||||
uSurfaceSize = glProgram.getUniformLocation("u_SurfaceSize")
|
||||
|
||||
val tex = IntArray(1)
|
||||
GLES20.glGenTextures(1, tex, 0)
|
||||
atlasTexId = tex[0]
|
||||
GLES20.glActiveTexture(GLES20.GL_TEXTURE0)
|
||||
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, atlasTexId)
|
||||
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE)
|
||||
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE)
|
||||
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR)
|
||||
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR)
|
||||
GLES20.glUniform1i(uTexture, 0)
|
||||
|
||||
val buf = IntArray(1)
|
||||
GLES20.glGenBuffers(1, buf, 0)
|
||||
vertexBufferId = buf[0]
|
||||
|
||||
GLES20.glPixelStorei(GLES20.GL_UNPACK_ALIGNMENT, 1)
|
||||
GLES20.glEnable(GLES20.GL_BLEND)
|
||||
GLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA)
|
||||
}
|
||||
|
||||
fun onSurfaceChanged(width: Int, height: Int) {
|
||||
surfaceSize = Size(width, height)
|
||||
assHandler.render?.setFrameSize(width, height)
|
||||
GLES20.glViewport(0, 0, width, height)
|
||||
GLES20.glUniform2f(uSurfaceSize, width.toFloat(), height.toFloat())
|
||||
}
|
||||
|
||||
fun onDrawFrame(payload: AtlasPayload, reuseUploads: Boolean) {
|
||||
GlUtil.clearFocusedBuffers()
|
||||
|
||||
val frame = payload.frame
|
||||
val quadCount = frame.quadCount
|
||||
if (quadCount == 0) return
|
||||
|
||||
if (!reuseUploads) {
|
||||
uploadAtlas(payload.atlasBuf, frame.atlasWidth, frame.atlasHeight)
|
||||
uploadVertices(payload.vertexBuf, quadCount)
|
||||
}
|
||||
|
||||
GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, vertexBufferId)
|
||||
val stride = AssAtlasPipelineConfig.BYTES_PER_VERTEX
|
||||
GLES20.glVertexAttribPointer(aPosition, 2, GLES20.GL_FLOAT, false, stride, 0)
|
||||
GLES20.glVertexAttribPointer(aTexCoord, 2, GLES20.GL_FLOAT, false, stride, 8)
|
||||
GLES20.glVertexAttribPointer(aColor, 4, GLES20.GL_FLOAT, false, stride, 16)
|
||||
GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, quadCount * 6)
|
||||
}
|
||||
|
||||
private fun uploadAtlas(atlasBuf: ByteBuffer, atlasW: Int, atlasH: Int) {
|
||||
atlasBuf.position(0).limit(atlasW * atlasH)
|
||||
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, atlasTexId)
|
||||
if (atlasW == atlasAllocatedW && atlasH <= atlasAllocatedH) {
|
||||
// Steady state: packed rows into the once-allocated texture.
|
||||
GLES20.glTexSubImage2D(
|
||||
GLES20.GL_TEXTURE_2D, 0, 0, 0, atlasW, atlasH,
|
||||
GLES20.GL_ALPHA, GLES20.GL_UNSIGNED_BYTE, atlasBuf
|
||||
)
|
||||
} else {
|
||||
// Defensive: dims disagree with the allocation (shouldn't happen — both
|
||||
// sides resolve dims through the same first-wins gate).
|
||||
Log.w("AssAtlasRenderer", "atlas upload ${atlasW}x$atlasH outside allocation ${atlasAllocatedW}x$atlasAllocatedH")
|
||||
GLES20.glTexImage2D(
|
||||
GLES20.GL_TEXTURE_2D, 0, GLES20.GL_ALPHA,
|
||||
atlasW, atlasH, 0,
|
||||
GLES20.GL_ALPHA, GLES20.GL_UNSIGNED_BYTE, atlasBuf
|
||||
)
|
||||
atlasAllocatedW = atlasW
|
||||
atlasAllocatedH = atlasH
|
||||
}
|
||||
}
|
||||
|
||||
private fun uploadVertices(vertexBuf: ByteBuffer, quadCount: Int) {
|
||||
val size = quadCount * AssAtlasPipelineConfig.BYTES_PER_QUAD
|
||||
vertexBuf.position(0).limit(size)
|
||||
GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, vertexBufferId)
|
||||
GLES20.glBufferData(GLES20.GL_ARRAY_BUFFER, size, vertexBuf, GLES20.GL_STREAM_DRAW)
|
||||
}
|
||||
|
||||
fun onSurfaceDestroyed() {
|
||||
if (atlasTexId != 0) {
|
||||
val tex = intArrayOf(atlasTexId)
|
||||
GLES20.glDeleteTextures(1, tex, 0)
|
||||
atlasTexId = 0
|
||||
}
|
||||
if (vertexBufferId != 0) {
|
||||
val buf = intArrayOf(vertexBufferId)
|
||||
GLES20.glDeleteBuffers(1, buf, 0)
|
||||
vertexBufferId = 0
|
||||
}
|
||||
if (::glProgram.isInitialized) glProgram.delete()
|
||||
}
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.edde746.plezy.libass.media.widget
|
||||
|
||||
import android.app.ActivityManager
|
||||
import android.content.Context
|
||||
import android.graphics.PixelFormat
|
||||
import android.view.SurfaceHolder
|
||||
import android.view.SurfaceView
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
import com.edde746.plezy.libass.media.AssHandler
|
||||
|
||||
/**
|
||||
* Subtitle overlay rendered through a dedicated [SurfaceView] layer.
|
||||
*
|
||||
* Uses a SurfaceFlinger layer directly, which lets the atlas-based pipeline
|
||||
* vsync-align its swap with the corresponding video frame via
|
||||
* `eglPresentationTimeANDROID`.
|
||||
*/
|
||||
@UnstableApi
|
||||
class AssSubtitleSurfaceView(
|
||||
context: Context,
|
||||
private val assHandler: AssHandler
|
||||
) : SurfaceView(context),
|
||||
SurfaceHolder.Callback {
|
||||
|
||||
private var pipeline: AssAtlasPipeline? = null
|
||||
|
||||
init {
|
||||
setZOrderMediaOverlay(true)
|
||||
holder.setFormat(PixelFormat.TRANSLUCENT)
|
||||
holder.addCallback(this)
|
||||
}
|
||||
|
||||
fun requestRender(presentationTimeUs: Long, releaseTimeNs: Long) {
|
||||
pipeline?.requestRender(presentationTimeUs, releaseTimeNs)
|
||||
}
|
||||
|
||||
/** Re-renders the last position, e.g. after margin changes while paused. */
|
||||
fun invalidateSubtitles() {
|
||||
pipeline?.invalidate()
|
||||
}
|
||||
|
||||
/** Vsync-pinned swaps performed by the current pipeline. */
|
||||
val swapCount: Long get() = pipeline?.swapCount ?: 0L
|
||||
|
||||
/** Pinned swaps that finished past the swap-time budget (possible missed vsync). */
|
||||
val lateSwapCount: Long get() = pipeline?.lateSwapCount ?: 0L
|
||||
|
||||
/** Worst observed swap lateness past the target release time, in milliseconds. */
|
||||
val maxLateMs: Long get() = pipeline?.maxLateMs ?: 0L
|
||||
|
||||
/** Total libass renders performed by the current pipeline. */
|
||||
val renderCount: Long get() = pipeline?.renderCount ?: 0L
|
||||
|
||||
/** Renders where libass reported changed content. */
|
||||
val changedRenderCount: Long get() = pipeline?.changedRenderCount ?: 0L
|
||||
|
||||
/** Renders that overflowed the atlas/vertex capacity. */
|
||||
val overflowCount: Long get() = pipeline?.overflowCount ?: 0L
|
||||
|
||||
/** Duration of the most recent libass render, in milliseconds. */
|
||||
val lastLibassMs: Long get() = pipeline?.lastLibassMs ?: 0L
|
||||
|
||||
/** Worst observed libass render duration, in milliseconds. */
|
||||
val maxLibassMs: Long get() = pipeline?.maxLibassMs ?: 0L
|
||||
|
||||
/** Changed-render duration histogram: [≤10ms, ≤25ms, ≤42ms, ≤84ms, >84ms]. */
|
||||
val libassMsHistogram: List<Long> get() = pipeline?.libassMsHistogram ?: emptyList()
|
||||
|
||||
/** Requests served from a pre-rendered (speculative) frame. */
|
||||
val specHits: Long get() = pipeline?.specHits ?: 0L
|
||||
|
||||
/** Requests where speculation existed but didn't match (seek, state change). */
|
||||
val specMisses: Long get() = pipeline?.specMisses ?: 0L
|
||||
|
||||
/** Speculation rounds skipped (paused, pending request, no confident cadence). */
|
||||
val specSkips: Long get() = pipeline?.specSkips ?: 0L
|
||||
|
||||
/** Cache-warming prefetch renders of upcoming events. */
|
||||
val prefetchCount: Long get() = pipeline?.prefetchCount ?: 0L
|
||||
|
||||
/** Minimum lead of changed-content pinned swaps vs the video frame's release
|
||||
* time, in ms (negative = late); null until one happened. */
|
||||
val minLeadChangedMs: Long? get() = pipeline?.minLeadChangedMs?.takeIf { it != Long.MAX_VALUE }
|
||||
|
||||
override fun surfaceCreated(holder: SurfaceHolder) {
|
||||
val rect = holder.surfaceFrame
|
||||
assHandler.setOverlaySurfaceSize(rect.width(), rect.height())
|
||||
val lowRam = (context.getSystemService(Context.ACTIVITY_SERVICE) as? ActivityManager)
|
||||
?.isLowRamDevice ?: false
|
||||
pipeline = AssAtlasPipeline(holder.surface, rect.width(), rect.height(), assHandler, lowRam)
|
||||
.also { it.start() }
|
||||
}
|
||||
|
||||
override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) {
|
||||
assHandler.setOverlaySurfaceSize(width, height)
|
||||
pipeline?.onSurfaceSizeChanged(width, height)
|
||||
}
|
||||
|
||||
override fun surfaceDestroyed(holder: SurfaceHolder) {
|
||||
pipeline?.releaseAndWait()
|
||||
pipeline = null
|
||||
}
|
||||
}
|
||||
+265
@@ -0,0 +1,265 @@
|
||||
package com.edde746.plezy.libass.media.widget
|
||||
|
||||
import com.edde746.plezy.libass.AssAtlasFrame
|
||||
import kotlin.math.abs
|
||||
|
||||
/**
|
||||
* Decision core of the speculative render-ahead pipeline.
|
||||
*
|
||||
* The problem it solves: ExoPlayer's frame-metadata callback gives only ~40 ms
|
||||
* between "video frame scheduled" and that frame's vsync, while a changed-content
|
||||
* libass render can take longer — so a render started at the callback lands a
|
||||
* frame (or more) late. The engine renders the *predicted next* PTS right after
|
||||
* servicing the current one, in the dead time between frames; when the next
|
||||
* request matches the prediction, only the GL upload+swap (~6–11 ms) sits inside
|
||||
* the deadline.
|
||||
*
|
||||
* Pure logic, single-threaded (the libass worker) — rendering, buffers and GL
|
||||
* are behind injected closures, so the state machine is unit-testable. Only the
|
||||
* stat fields are read from other threads.
|
||||
*
|
||||
* Slot ownership invariant: a slot handed to GL ([lastPostedSlot]) or currently
|
||||
* read by GL ([glTakenSlot]) is never chosen as a render target. With 3 slots and
|
||||
* at most 2 exclusions a target always exists; with 2 slots (low-RAM devices)
|
||||
* speculation must be disabled and the legacy alternation behavior falls out.
|
||||
*
|
||||
* Key subtlety inherited from libass: `ass_render_frame`'s `changed` flag compares
|
||||
* against libass's *previous render* — which, with speculation, may be content
|
||||
* that never reached the screen. The engine therefore tracks [libassLastSlot]
|
||||
* (the slot holding libass's most recent render output) rather than the last
|
||||
* *posted* slot, and prefers it as the render target: on `changed == 0` the
|
||||
* buffers were untouched and that slot already holds exactly the right content.
|
||||
*/
|
||||
internal class SpecRenderEngine(
|
||||
private val slotCount: Int,
|
||||
private val speculationEnabled: Boolean,
|
||||
/**
|
||||
* Renders the current track at [timeMs] into the slot's buffers. Returns null
|
||||
* when the renderer/track is gone. The closure owns timing/stat accounting.
|
||||
*/
|
||||
private val renderAt: (timeMs: Long, slot: Int) -> AssAtlasFrame?,
|
||||
/**
|
||||
* Renderer identity + state generation as one comparable value. Must change
|
||||
* whenever a speculatively rendered frame could be stale: margins, sizes,
|
||||
* track switches, renderer recreation.
|
||||
*/
|
||||
private val stateGeneration: () -> Long,
|
||||
/** Slot the GL thread most recently took for drawing, or -1. Never write it. */
|
||||
private val glTakenSlot: () -> Int,
|
||||
/** Diagnostic sink for hit/miss/skip decisions; null disables (no string cost). */
|
||||
private val debugLog: ((String) -> Unit)? = null
|
||||
) {
|
||||
|
||||
/** What the caller should do after [service]. */
|
||||
sealed class Outcome {
|
||||
/** Nothing to post (no renderer, or no rendered content exists yet). */
|
||||
object Skip : Outcome()
|
||||
|
||||
/**
|
||||
* Post [slot] to GL. [newContent] means this call wrote fresh content into
|
||||
* the slot (the caller bumps the payload's content seq). [specHit] means the
|
||||
* content was pre-rendered — no libass render ran inside the deadline.
|
||||
*/
|
||||
class Post(val slot: Int, val frame: AssAtlasFrame, val newContent: Boolean, val specHit: Boolean) : Outcome()
|
||||
}
|
||||
|
||||
/** A speculative render that wrote new content into [slot] (bump its seq). */
|
||||
class SpecWrite(val slot: Int, val frame: AssAtlasFrame)
|
||||
|
||||
// Speculation state: content for specPtsUs is pre-rendered and lives either in
|
||||
// specSlot, or — when the spec render returned changed == 0 — is identical to
|
||||
// libassLastSlot's content (specIsLibassLast).
|
||||
private var specPtsUs = UNSET
|
||||
private var specSlot = -1
|
||||
private var specIsLibassLast = false
|
||||
private var specGen = 0L
|
||||
|
||||
// The slot holding libass's most recent render output and its frame.
|
||||
private var libassLastSlot = -1
|
||||
private var libassLastFrame: AssAtlasFrame? = null
|
||||
private var lastPostedSlot = -1
|
||||
|
||||
// Request-cadence estimator over pinned (playing) requests: median of the last
|
||||
// 8 PTS deltas, valid after 4, reset on any non-monotonic or > 250 ms jump.
|
||||
private val deltas = LongArray(DELTA_SAMPLES)
|
||||
private var deltaCount = 0
|
||||
private var deltaIndex = 0
|
||||
private var lastPinnedPtsUs = UNSET
|
||||
|
||||
// Stats; single-writer (the libass thread), read from the stats path.
|
||||
@Volatile
|
||||
var specHits = 0L
|
||||
private set
|
||||
|
||||
@Volatile
|
||||
var specMisses = 0L
|
||||
private set
|
||||
|
||||
@Volatile
|
||||
var specSkips = 0L
|
||||
private set
|
||||
|
||||
/**
|
||||
* Services a render request for [ptsUs]. [pinned] is false for invalidate
|
||||
* repaints (paused margin changes etc.), which never feed the cadence
|
||||
* estimator and never count as speculation misses against playback.
|
||||
*/
|
||||
fun service(ptsUs: Long, pinned: Boolean): Outcome {
|
||||
if (pinned) updateDeltaEstimator(ptsUs)
|
||||
|
||||
if (specPtsUs != UNSET) {
|
||||
val eps = epsilonUs()
|
||||
val genNow = stateGeneration()
|
||||
val hit = genNow == specGen && eps > 0 && abs(ptsUs - specPtsUs) <= eps
|
||||
val slot = if (specIsLibassLast) libassLastSlot else specSlot
|
||||
val frame = libassLastFrame
|
||||
val specPts = specPtsUs
|
||||
specPtsUs = UNSET
|
||||
if (hit && slot >= 0 && frame != null) {
|
||||
specHits++
|
||||
lastPostedSlot = slot
|
||||
debugLog?.invoke("hit pts=${ptsUs / 1000}ms spec=${specPts / 1000}ms d=${(ptsUs - specPts) / 1000}ms slot=$slot")
|
||||
return Outcome.Post(slot, frame, newContent = false, specHit = true)
|
||||
}
|
||||
specMisses++
|
||||
debugLog?.invoke(
|
||||
"miss pts=${ptsUs / 1000}ms spec=${specPts / 1000}ms d=${(ptsUs - specPts) / 1000}ms eps=${eps / 1000}ms " +
|
||||
"gen=${if (genNow == specGen) "ok" else "CHANGED"} slot=$slot frame=${frame != null}"
|
||||
)
|
||||
} else {
|
||||
debugLog?.invoke("no-spec pts=${ptsUs / 1000}ms")
|
||||
}
|
||||
|
||||
// On-demand render. Preferring libassLastSlot as the target makes changed == 0
|
||||
// unambiguous: the buffers were untouched and already hold the right content.
|
||||
val target = renderTargetSlot() ?: return Outcome.Skip
|
||||
val frame = renderAt(ptsUs / 1000, target) ?: return Outcome.Skip
|
||||
if (frame.changed == 0) {
|
||||
val lastSlot = libassLastSlot
|
||||
val lastFrame = libassLastFrame ?: return Outcome.Skip
|
||||
if (lastSlot < 0) return Outcome.Skip
|
||||
lastPostedSlot = lastSlot
|
||||
return Outcome.Post(lastSlot, lastFrame, newContent = false, specHit = false)
|
||||
}
|
||||
libassLastSlot = target
|
||||
libassLastFrame = frame
|
||||
lastPostedSlot = target
|
||||
return Outcome.Post(target, frame, newContent = true, specHit = false)
|
||||
}
|
||||
|
||||
/**
|
||||
* Speculatively renders the predicted next request ([servicedPtsUs] + median
|
||||
* delta) into a free slot. Call after posting the current frame; skipped while
|
||||
* paused ([pinned] false), when a newer request is already waiting, or while
|
||||
* the cadence estimator has no confident delta.
|
||||
*/
|
||||
fun speculateAfter(servicedPtsUs: Long, pinned: Boolean, hasPending: Boolean): SpecWrite? {
|
||||
if (!speculationEnabled) return null
|
||||
if (!pinned || hasPending || !deltaValid()) {
|
||||
specSkips++
|
||||
debugLog?.invoke(
|
||||
"spec-skip after=${servicedPtsUs / 1000}ms pinned=$pinned pending=$hasPending cadence=${deltaValid()}"
|
||||
)
|
||||
return null
|
||||
}
|
||||
val target = renderTargetSlot() ?: run {
|
||||
specSkips++
|
||||
debugLog?.invoke("spec-skip after=${servicedPtsUs / 1000}ms no-free-slot")
|
||||
return null
|
||||
}
|
||||
val gen = stateGeneration()
|
||||
val specPts = servicedPtsUs + medianDeltaUs()
|
||||
val frame = renderAt(specPts / 1000, target) ?: run {
|
||||
specSkips++
|
||||
return null
|
||||
}
|
||||
specGen = gen
|
||||
specPtsUs = specPts
|
||||
if (frame.changed == 0) {
|
||||
// Content at specPts is identical to libass's last render — nothing was
|
||||
// written; a hit will repost libassLastSlot (and GL will skip the upload).
|
||||
specIsLibassLast = true
|
||||
specSlot = -1
|
||||
return null
|
||||
}
|
||||
libassLastSlot = target
|
||||
libassLastFrame = frame
|
||||
specIsLibassLast = false
|
||||
specSlot = target
|
||||
return SpecWrite(target, frame)
|
||||
}
|
||||
|
||||
/**
|
||||
* Pre-renders [ptsUs] (an upcoming event's start) purely to warm the
|
||||
* renderer's glyph/bitmap caches before that content is actually needed —
|
||||
* heavy typesetting otherwise pays its cache-cold rasterization (measured
|
||||
* 0.8–2.6 s on weak devices) exactly when the sign appears. The result is
|
||||
* never posted; like any render it becomes libass's last-rendered content,
|
||||
* so any pending speculation is invalidated first (its slot/content
|
||||
* references would go stale).
|
||||
*
|
||||
* Returns the slot written (caller bumps its content seq) or null when
|
||||
* nothing was rendered.
|
||||
*/
|
||||
fun prefetch(ptsUs: Long): SpecWrite? {
|
||||
specPtsUs = UNSET
|
||||
val target = renderTargetSlot() ?: return null
|
||||
val frame = renderAt(ptsUs / 1000, target) ?: return null
|
||||
prefetchCount++
|
||||
if (frame.changed == 0) return null
|
||||
libassLastSlot = target
|
||||
libassLastFrame = frame
|
||||
return SpecWrite(target, frame)
|
||||
}
|
||||
|
||||
/** Cache-warming prefetch renders performed; single-writer, read cross-thread. */
|
||||
@Volatile
|
||||
var prefetchCount = 0L
|
||||
private set
|
||||
|
||||
private fun renderTargetSlot(): Int? {
|
||||
// The GL exclusion only exists in ≥3-slot mode; with 2 slots this reduces to
|
||||
// the legacy "don't write the posted slot" alternation.
|
||||
val taken = if (slotCount > 2) glTakenSlot() else -1
|
||||
val last = libassLastSlot
|
||||
if (last >= 0 && last != lastPostedSlot && last != taken) return last
|
||||
for (s in 0 until slotCount) {
|
||||
if (s != lastPostedSlot && s != taken) return s
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
private fun updateDeltaEstimator(ptsUs: Long) {
|
||||
val prev = lastPinnedPtsUs
|
||||
lastPinnedPtsUs = ptsUs
|
||||
if (prev == UNSET) return
|
||||
val d = ptsUs - prev
|
||||
if (d <= 0 || d > MAX_DELTA_US) {
|
||||
// Seek/discontinuity (or duplicate PTS): forget the cadence.
|
||||
deltaCount = 0
|
||||
deltaIndex = 0
|
||||
return
|
||||
}
|
||||
deltas[deltaIndex] = d
|
||||
deltaIndex = (deltaIndex + 1) % DELTA_SAMPLES
|
||||
if (deltaCount < DELTA_SAMPLES) deltaCount++
|
||||
}
|
||||
|
||||
private fun deltaValid() = deltaCount >= MIN_DELTA_SAMPLES
|
||||
|
||||
private fun medianDeltaUs(): Long {
|
||||
val copy = deltas.copyOfRange(0, deltaCount)
|
||||
copy.sort()
|
||||
return copy[deltaCount / 2]
|
||||
}
|
||||
|
||||
private fun epsilonUs(): Long = if (deltaValid()) minOf(medianDeltaUs() / 2, EPSILON_CAP_US) else 0L
|
||||
|
||||
private companion object {
|
||||
const val UNSET = Long.MIN_VALUE
|
||||
const val DELTA_SAMPLES = 8
|
||||
const val MIN_DELTA_SAMPLES = 4
|
||||
const val MAX_DELTA_US = 250_000L
|
||||
const val EPSILON_CAP_US = 8_000L
|
||||
}
|
||||
}
|
||||
+333
@@ -0,0 +1,333 @@
|
||||
package com.edde746.plezy.libass.media.widget
|
||||
|
||||
import com.edde746.plezy.libass.AssAtlasFrame
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertNotNull
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
/**
|
||||
* Tests for the speculative render-ahead state machine. The render function is
|
||||
* scripted: each call records (timeMs, slot) and returns the next queued frame.
|
||||
*/
|
||||
class SpecRenderEngineTest {
|
||||
|
||||
private class RenderCall(val timeMs: Long, val slot: Int)
|
||||
|
||||
private class Harness(
|
||||
slotCount: Int = 3,
|
||||
speculationEnabled: Boolean = true
|
||||
) {
|
||||
val calls = mutableListOf<RenderCall>()
|
||||
val script = ArrayDeque<AssAtlasFrame?>()
|
||||
var generation = 0L
|
||||
var glTaken = -1
|
||||
|
||||
val engine = SpecRenderEngine(
|
||||
slotCount = slotCount,
|
||||
speculationEnabled = speculationEnabled,
|
||||
renderAt = { timeMs, slot ->
|
||||
calls.add(RenderCall(timeMs, slot))
|
||||
if (script.isEmpty()) changed() else script.removeFirst()
|
||||
},
|
||||
stateGeneration = { generation },
|
||||
glTakenSlot = { glTaken }
|
||||
)
|
||||
|
||||
/** Primes the cadence estimator with [n] steady requests; returns last pts. */
|
||||
fun prime(n: Int = 5, startUs: Long = 0L, deltaUs: Long = 42_000L): Long {
|
||||
var pts = startUs
|
||||
repeat(n) {
|
||||
engine.service(pts, pinned = true)
|
||||
engine.speculateAfter(pts, pinned = true, hasPending = false)
|
||||
pts += deltaUs
|
||||
}
|
||||
return pts - deltaUs
|
||||
}
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val DELTA = 42_000L
|
||||
|
||||
fun changed(quads: Int = 5) = AssAtlasFrame(2048, 100, quads, 2, 0)
|
||||
|
||||
fun unchanged() = AssAtlasFrame(0, 0, 0, 0, 0)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `steady state hits serve without rendering`() {
|
||||
val h = Harness()
|
||||
val last = h.prime()
|
||||
|
||||
// Cadence is confident by now: the last speculateAfter pre-rendered last+Δ.
|
||||
val before = h.calls.size
|
||||
val outcome = h.engine.service(last + DELTA, pinned = true)
|
||||
|
||||
assertTrue(outcome is SpecRenderEngine.Outcome.Post)
|
||||
outcome as SpecRenderEngine.Outcome.Post
|
||||
assertTrue(outcome.specHit)
|
||||
assertFalse(outcome.newContent) // content was written (and seq-bumped) at spec time
|
||||
assertEquals("service must not render on a hit", before, h.calls.size)
|
||||
assertEquals(1L, h.engine.specHits)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `hit tolerates jitter within epsilon`() {
|
||||
val h = Harness()
|
||||
val last = h.prime()
|
||||
|
||||
val outcome = h.engine.service(last + DELTA + 3_000, pinned = true)
|
||||
|
||||
assertTrue((outcome as SpecRenderEngine.Outcome.Post).specHit)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `seek misses and renders on demand into the spec slot`() {
|
||||
val h = Harness()
|
||||
val last = h.prime()
|
||||
val specSlot = h.calls.last().slot // where the speculative content went
|
||||
|
||||
val before = h.calls.size
|
||||
h.script.add(changed())
|
||||
val outcome = h.engine.service(last + 1_000_000, pinned = true)
|
||||
|
||||
assertTrue(outcome is SpecRenderEngine.Outcome.Post)
|
||||
outcome as SpecRenderEngine.Outcome.Post
|
||||
assertFalse(outcome.specHit)
|
||||
assertTrue(outcome.newContent)
|
||||
assertEquals(before + 1, h.calls.size)
|
||||
assertEquals("miss must render into the slot holding libass's last content", specSlot, h.calls.last().slot)
|
||||
assertEquals(1L, h.engine.specMisses)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `miss with changed 0 posts the spec slot not stale screen content`() {
|
||||
// The trap: spec rendered NEW content (never posted); a mismatched request
|
||||
// then returns changed == 0 (identical to libass's LAST render = the spec
|
||||
// content). Posting "last posted" content would be stale — the engine must
|
||||
// post the slot libass last wrote.
|
||||
val h = Harness()
|
||||
val last = h.prime()
|
||||
val specSlot = h.calls.last().slot
|
||||
|
||||
h.script.add(unchanged())
|
||||
val outcome = h.engine.service(last + 200_000, pinned = true) // > ε, miss; estimator resets too
|
||||
|
||||
assertTrue(outcome is SpecRenderEngine.Outcome.Post)
|
||||
outcome as SpecRenderEngine.Outcome.Post
|
||||
assertFalse(outcome.specHit)
|
||||
assertFalse(outcome.newContent)
|
||||
assertEquals("changed==0 must repost libass's last-rendered slot", specSlot, outcome.slot)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `state generation change invalidates speculation`() {
|
||||
val h = Harness()
|
||||
val last = h.prime()
|
||||
|
||||
h.generation++ // margins/zoom/track switch between spec render and the request
|
||||
h.script.add(changed())
|
||||
val before = h.calls.size
|
||||
val outcome = h.engine.service(last + DELTA, pinned = true)
|
||||
|
||||
assertTrue(outcome is SpecRenderEngine.Outcome.Post)
|
||||
assertFalse((outcome as SpecRenderEngine.Outcome.Post).specHit)
|
||||
assertEquals("stale spec must be re-rendered", before + 1, h.calls.size)
|
||||
assertEquals(1L, h.engine.specMisses)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `unpinned requests never feed the estimator or speculate`() {
|
||||
val h = Harness()
|
||||
val last = h.prime()
|
||||
|
||||
// Paused invalidate-repaint at an arbitrary position.
|
||||
h.script.add(changed())
|
||||
h.engine.service(last, pinned = false)
|
||||
val specBefore = h.calls.size
|
||||
assertNull(h.engine.speculateAfter(last, pinned = false, hasPending = false))
|
||||
assertEquals("unpinned must not speculate", specBefore, h.calls.size)
|
||||
|
||||
// Cadence survives the unpinned request: the next pinned pair still hits.
|
||||
h.engine.service(last + DELTA, pinned = true)
|
||||
h.engine.speculateAfter(last + DELTA, pinned = true, hasPending = false)
|
||||
val outcome = h.engine.service(last + 2 * DELTA, pinned = true)
|
||||
assertTrue((outcome as SpecRenderEngine.Outcome.Post).specHit)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `speculation skipped while a request is pending`() {
|
||||
val h = Harness()
|
||||
val last = h.prime()
|
||||
val before = h.calls.size
|
||||
|
||||
assertNull(h.engine.speculateAfter(last, pinned = true, hasPending = true))
|
||||
assertEquals(before, h.calls.size)
|
||||
assertTrue(h.engine.specSkips > 0)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `no speculation until cadence is confident`() {
|
||||
val h = Harness()
|
||||
h.engine.service(0, pinned = true)
|
||||
// Only one delta sample so far (needs 4).
|
||||
h.engine.service(DELTA, pinned = true)
|
||||
val before = h.calls.size
|
||||
assertNull(h.engine.speculateAfter(DELTA, pinned = true, hasPending = false))
|
||||
assertEquals(before, h.calls.size)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `render target avoids posted and gl taken slots`() {
|
||||
val h = Harness()
|
||||
h.script.add(changed())
|
||||
val first = h.engine.service(0, pinned = true) as SpecRenderEngine.Outcome.Post
|
||||
val posted = first.slot
|
||||
|
||||
h.glTaken = (posted + 1) % 3
|
||||
h.script.add(changed())
|
||||
val second = h.engine.service(1_000_000, pinned = true) as SpecRenderEngine.Outcome.Post
|
||||
|
||||
val expected = (0 until 3).first { it != posted && it != h.glTaken }
|
||||
assertEquals(expected, second.slot)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `changed 0 before any content skips`() {
|
||||
val h = Harness()
|
||||
h.script.add(unchanged())
|
||||
assertEquals(SpecRenderEngine.Outcome.Skip, h.engine.service(0, pinned = true))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `renderer gone skips`() {
|
||||
val h = Harness()
|
||||
h.script.add(null)
|
||||
assertEquals(SpecRenderEngine.Outcome.Skip, h.engine.service(0, pinned = true))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `two slot mode alternates and never speculates`() {
|
||||
val h = Harness(slotCount = 2, speculationEnabled = false)
|
||||
h.script.add(changed())
|
||||
val a = h.engine.service(0, pinned = true) as SpecRenderEngine.Outcome.Post
|
||||
assertNull(h.engine.speculateAfter(0, pinned = true, hasPending = false))
|
||||
|
||||
h.script.add(changed())
|
||||
val b = h.engine.service(DELTA, pinned = true) as SpecRenderEngine.Outcome.Post
|
||||
assertTrue(a.slot != b.slot)
|
||||
assertTrue(a.slot in 0..1 && b.slot in 0..1)
|
||||
assertEquals(0, h.calls.count { it.slot >= 2 })
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `static dialogue hit reposts the same slot without new content`() {
|
||||
// Spec render returns changed == 0 (nothing moves): a hit must repost the
|
||||
// last-rendered slot so GL skips the upload entirely.
|
||||
val h = Harness()
|
||||
h.script.add(changed())
|
||||
val first = h.engine.service(0, pinned = true) as SpecRenderEngine.Outcome.Post
|
||||
var pts = 0L
|
||||
repeat(4) {
|
||||
// build cadence; renders return changed for simplicity
|
||||
pts += DELTA
|
||||
h.engine.service(pts, pinned = true)
|
||||
}
|
||||
h.script.add(unchanged()) // speculative render: nothing changes at pts+Δ
|
||||
assertNull(h.engine.speculateAfter(pts, pinned = true, hasPending = false))
|
||||
|
||||
val before = h.calls.size
|
||||
val outcome = h.engine.service(pts + DELTA, pinned = true) as SpecRenderEngine.Outcome.Post
|
||||
assertTrue(outcome.specHit)
|
||||
assertFalse(outcome.newContent)
|
||||
assertEquals(before, h.calls.size)
|
||||
assertNotNull(first) // first slot existed; hit reposts whichever slot was last rendered
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `speculative write reports slot for seq bump`() {
|
||||
val h = Harness()
|
||||
val last = h.prime()
|
||||
h.script.add(changed())
|
||||
val write = h.engine.speculateAfter(last, pinned = true, hasPending = false)
|
||||
assertNotNull(write)
|
||||
assertEquals(h.calls.last().slot, write!!.slot)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `spec predicts pts plus median delta`() {
|
||||
val h = Harness()
|
||||
val last = h.prime()
|
||||
h.script.add(changed())
|
||||
h.engine.speculateAfter(last, pinned = true, hasPending = false)
|
||||
assertEquals((last + DELTA) / 1000, h.calls.last().timeMs)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `prefetch renders the requested future pts and reports its slot`() {
|
||||
val h = Harness()
|
||||
h.script.add(changed())
|
||||
h.engine.service(0, pinned = true) // some content on screen
|
||||
|
||||
h.script.add(changed())
|
||||
val write = h.engine.prefetch(5_000_000)
|
||||
|
||||
assertNotNull(write)
|
||||
assertEquals(5_000L, h.calls.last().timeMs)
|
||||
assertEquals(h.calls.last().slot, write!!.slot)
|
||||
assertEquals(1L, h.engine.prefetchCount)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `prefetch invalidates pending speculation`() {
|
||||
// Prefetch rewrites libass's last-rendered content (and possibly the spec
|
||||
// slot itself); a stale spec hit would post future-event content.
|
||||
val h = Harness()
|
||||
val last = h.prime() // leaves a valid spec for last+Δ
|
||||
|
||||
h.script.add(changed())
|
||||
h.engine.prefetch(last + 5_000_000)
|
||||
|
||||
val before = h.calls.size
|
||||
h.script.add(changed())
|
||||
val outcome = h.engine.service(last + DELTA, pinned = true)
|
||||
|
||||
assertTrue(outcome is SpecRenderEngine.Outcome.Post)
|
||||
assertFalse((outcome as SpecRenderEngine.Outcome.Post).specHit)
|
||||
assertEquals("post-prefetch request must render on demand", before + 1, h.calls.size)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `render after prefetch with changed 0 posts the prefetched slot`() {
|
||||
// changed==0 after a prefetch means "identical to libass's last render" =
|
||||
// the prefetched content — correct exactly when playback reached the
|
||||
// prefetched event. The engine must post that slot, not older content.
|
||||
val h = Harness()
|
||||
h.script.add(changed())
|
||||
h.engine.service(0, pinned = true)
|
||||
|
||||
h.script.add(changed())
|
||||
val write = h.engine.prefetch(5_000_000)!!
|
||||
|
||||
h.script.add(unchanged())
|
||||
val outcome = h.engine.service(5_000_000, pinned = true) as SpecRenderEngine.Outcome.Post
|
||||
assertEquals(write.slot, outcome.slot)
|
||||
assertFalse(outcome.newContent)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `prefetch avoids posted and gl taken slots`() {
|
||||
val h = Harness()
|
||||
h.script.add(changed())
|
||||
val posted = (h.engine.service(0, pinned = true) as SpecRenderEngine.Outcome.Post).slot
|
||||
h.glTaken = (posted + 1) % 3
|
||||
|
||||
h.script.add(changed())
|
||||
val write = h.engine.prefetch(5_000_000)
|
||||
|
||||
val expected = (0 until 3).first { it != posted && it != h.glTaken }
|
||||
assertEquals(expected, write!!.slot)
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,11 @@ pluginManagement {
|
||||
plugins {
|
||||
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
||||
id("com.android.application") version "8.9.1" apply false
|
||||
id("com.android.library") version "8.9.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
|
||||
}
|
||||
|
||||
include(":app")
|
||||
// libass subtitle module (Kotlin/JNI bindings + Media3 glue); the native libass
|
||||
// core stays the upstream Maven artifact io.github.peerless2012:ass.
|
||||
include(":libass")
|
||||
|
||||
@@ -789,7 +789,7 @@
|
||||
repositoryURL = "https://github.com/edde746/MPVKit";
|
||||
requirement = {
|
||||
kind = revision;
|
||||
revision = 1fc33029bc0317583866c62811dc0ab2aa2415b6;
|
||||
revision = 245b69dce22156e81b79c84cfcb748358b674e47;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/edde746/MPVKit",
|
||||
"state" : {
|
||||
"revision" : "1fc33029bc0317583866c62811dc0ab2aa2415b6"
|
||||
"revision" : "245b69dce22156e81b79c84cfcb748358b674e47"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/edde746/MPVKit",
|
||||
"state" : {
|
||||
"revision" : "1fc33029bc0317583866c62811dc0ab2aa2415b6"
|
||||
"revision" : "245b69dce22156e81b79c84cfcb748358b674e47"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
import Flutter
|
||||
import UIKit
|
||||
import AVFoundation
|
||||
import MediaPlayer
|
||||
|
||||
@main
|
||||
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
|
||||
private var deviceAdjustmentChannel: FlutterMethodChannel?
|
||||
private var originalBrightness: CGFloat?
|
||||
private var volumeView: MPVolumeView?
|
||||
private weak var volumeSlider: UISlider?
|
||||
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
@@ -29,5 +35,119 @@ import AVFoundation
|
||||
if let registrar = engineBridge.pluginRegistry.registrar(forPlugin: "MpvPlayerPlugin") {
|
||||
MpvPlayerPlugin.register(with: registrar)
|
||||
}
|
||||
|
||||
if let registrar = engineBridge.pluginRegistry.registrar(forPlugin: "DeviceAdjustmentChannel") {
|
||||
registerDeviceAdjustmentChannel(messenger: registrar.messenger())
|
||||
}
|
||||
}
|
||||
|
||||
private func registerDeviceAdjustmentChannel(messenger: FlutterBinaryMessenger) {
|
||||
let channel = FlutterMethodChannel(name: "com.plezy/device_adjustment", binaryMessenger: messenger)
|
||||
channel.setMethodCallHandler { [weak self] call, result in
|
||||
DispatchQueue.main.async {
|
||||
self?.handleDeviceAdjustmentCall(call, result: result)
|
||||
}
|
||||
}
|
||||
deviceAdjustmentChannel = channel
|
||||
}
|
||||
|
||||
private func handleDeviceAdjustmentCall(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
switch call.method {
|
||||
case "getBrightness":
|
||||
result(Double(UIScreen.main.brightness))
|
||||
case "setBrightness":
|
||||
guard let value = normalizedArgument(call.arguments, result: result) else { return }
|
||||
if originalBrightness == nil {
|
||||
originalBrightness = UIScreen.main.brightness
|
||||
}
|
||||
UIScreen.main.brightness = CGFloat(value)
|
||||
result(nil)
|
||||
case "restoreBrightness":
|
||||
if let originalBrightness = originalBrightness {
|
||||
UIScreen.main.brightness = originalBrightness
|
||||
self.originalBrightness = nil
|
||||
}
|
||||
result(nil)
|
||||
case "getMediaVolume":
|
||||
result(Double(AVAudioSession.sharedInstance().outputVolume))
|
||||
case "setMediaVolume":
|
||||
guard let value = normalizedArgument(call.arguments, result: result) else { return }
|
||||
if setMediaVolume(value) {
|
||||
result(nil)
|
||||
} else {
|
||||
result(
|
||||
FlutterError(code: "DEVICE_ADJUSTMENT_UNAVAILABLE", message: "System volume slider unavailable", details: nil)
|
||||
)
|
||||
}
|
||||
default:
|
||||
result(FlutterMethodNotImplemented)
|
||||
}
|
||||
}
|
||||
|
||||
private func normalizedArgument(_ arguments: Any?, result: @escaping FlutterResult) -> Double? {
|
||||
guard let value = arguments as? NSNumber else {
|
||||
result(FlutterError(code: "INVALID_ARGUMENT", message: "Expected a numeric value", details: nil))
|
||||
return nil
|
||||
}
|
||||
let doubleValue = value.doubleValue
|
||||
guard doubleValue.isFinite else {
|
||||
result(FlutterError(code: "INVALID_ARGUMENT", message: "Expected a finite numeric value", details: nil))
|
||||
return nil
|
||||
}
|
||||
return min(1.0, max(0.0, doubleValue))
|
||||
}
|
||||
|
||||
private func setMediaVolume(_ value: Double) -> Bool {
|
||||
guard let slider = ensureVolumeSlider() else { return false }
|
||||
slider.setValue(Float(value), animated: false)
|
||||
slider.sendActions(for: .valueChanged)
|
||||
slider.sendActions(for: .touchUpInside)
|
||||
return true
|
||||
}
|
||||
|
||||
private func ensureVolumeSlider() -> UISlider? {
|
||||
if let volumeSlider = volumeSlider { return volumeSlider }
|
||||
|
||||
let volumeView = self.volumeView ?? MPVolumeView(frame: CGRect(x: -1000, y: -1000, width: 1, height: 1))
|
||||
volumeView.showsRouteButton = false
|
||||
volumeView.showsVolumeSlider = true
|
||||
volumeView.alpha = 0.01
|
||||
volumeView.isUserInteractionEnabled = false
|
||||
|
||||
if volumeView.superview == nil {
|
||||
activeWindow?.addSubview(volumeView)
|
||||
}
|
||||
volumeView.layoutIfNeeded()
|
||||
|
||||
self.volumeView = volumeView
|
||||
let slider = findVolumeSlider(in: volumeView)
|
||||
volumeSlider = slider
|
||||
return slider
|
||||
}
|
||||
|
||||
private func findVolumeSlider(in view: UIView) -> UISlider? {
|
||||
if let slider = view as? UISlider { return slider }
|
||||
for subview in view.subviews {
|
||||
if let slider = findVolumeSlider(in: subview) { return slider }
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
private var activeWindow: UIWindow? {
|
||||
if #available(iOS 13.0, *) {
|
||||
for scene in UIApplication.shared.connectedScenes {
|
||||
guard let windowScene = scene as? UIWindowScene else { continue }
|
||||
if let keyWindow = windowScene.windows.first(where: { $0.isKeyWindow }) {
|
||||
return keyWindow
|
||||
}
|
||||
}
|
||||
for scene in UIApplication.shared.connectedScenes {
|
||||
guard let windowScene = scene as? UIWindowScene, let window = windowScene.windows.first else { continue }
|
||||
return window
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
return UIApplication.shared.windows.first(where: { $0.isKeyWindow }) ?? UIApplication.shared.windows.first
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0xF8",
|
||||
"green" : "0xF7",
|
||||
"red" : "0xF7"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x12",
|
||||
"green" : "0x0F",
|
||||
"red" : "0x0E"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
@@ -19,7 +20,7 @@
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="backgroundColor" name="LaunchBackground"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
@@ -33,5 +34,8 @@
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
<namedColor name="LaunchBackground">
|
||||
<color red="0.96862745098039216" green="0.96862745098039216" blue="0.97254901960784312" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</namedColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -663,13 +663,18 @@ Future<void> migrateLegacyDesktopDatabase({
|
||||
Future<void> Function(File source, String targetPath)? renameOverride,
|
||||
}) async {
|
||||
final File oldFile;
|
||||
if (sourceOverride != null) {
|
||||
oldFile = sourceOverride;
|
||||
} else {
|
||||
final oldFolder = await getApplicationDocumentsDirectory();
|
||||
oldFile = File(p.join(oldFolder.path, 'plezy_downloads.db'));
|
||||
try {
|
||||
if (sourceOverride != null) {
|
||||
oldFile = sourceOverride;
|
||||
} else {
|
||||
final oldFolder = await getApplicationDocumentsDirectory();
|
||||
oldFile = File(p.join(oldFolder.path, 'plezy_downloads.db'));
|
||||
}
|
||||
if (!await oldFile.exists()) return;
|
||||
} catch (e, st) {
|
||||
appLogger.w('Legacy DB migration skipped before source lookup completed', error: e, stackTrace: st);
|
||||
return;
|
||||
}
|
||||
if (!await oldFile.exists()) return;
|
||||
|
||||
try {
|
||||
if (renameOverride != null) {
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'focus_theme.dart';
|
||||
|
||||
/// Exposes the focus state of an enclosing focus wrapper to a descendant
|
||||
/// [CardFocusBorder] that draws the focus border itself.
|
||||
///
|
||||
/// Wrappers ([FocusableWrapper]/[FocusBuilders.buildFocusableCard]) insert this
|
||||
/// instead of painting a border when `delegateFocusBorder` is set, so cards can
|
||||
/// put the border on the exact rect the design highlights (the poster image,
|
||||
/// not the card-plus-captions rect — issue #1278). Only the [CardFocusBorder]
|
||||
/// element registers a dependency, so a focus flip rebuilds just that border
|
||||
/// box: a stable `child:` card subtree (e.g. the TV rail's MediaCard) is not
|
||||
/// rebuilt.
|
||||
class CardFocusScope extends InheritedWidget {
|
||||
const CardFocusScope({super.key, required this.showFocus, required super.child});
|
||||
|
||||
/// Whether the enclosing wrapper currently shows focus visuals
|
||||
/// (focused while in keyboard/d-pad input mode).
|
||||
final bool showFocus;
|
||||
|
||||
/// Null when no delegating wrapper is above (touch mode skips the focus
|
||||
/// wrappers entirely) — [CardFocusBorder] then renders its child bare.
|
||||
static bool? maybeOf(BuildContext context) => context.dependOnInheritedWidgetOfExactType<CardFocusScope>()?.showFocus;
|
||||
|
||||
@override
|
||||
bool updateShouldNotify(CardFocusScope oldWidget) => showFocus != oldWidget.showFocus;
|
||||
}
|
||||
|
||||
/// Draws the focus border around its child based on the enclosing
|
||||
/// [CardFocusScope], letting the card decide which rect gets highlighted.
|
||||
///
|
||||
/// Defaults to an outside stroke so the border hugs the child exactly like the
|
||||
/// full-bleed card treatment (the child's own corner radius nests inside it).
|
||||
/// Decoration only — never affects layout. Renders the child unchanged when no
|
||||
/// scope is present.
|
||||
class CardFocusBorder extends StatelessWidget {
|
||||
const CardFocusBorder({
|
||||
super.key,
|
||||
required this.borderRadius,
|
||||
this.strokeAlign = BorderSide.strokeAlignOutside,
|
||||
required this.child,
|
||||
});
|
||||
|
||||
final double borderRadius;
|
||||
final double strokeAlign;
|
||||
final Widget child;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final showFocus = CardFocusScope.maybeOf(context);
|
||||
if (showFocus == null) return child;
|
||||
|
||||
return AnimatedContainer(
|
||||
duration: FocusTheme.getAnimationDuration(context),
|
||||
curve: Curves.easeOutCubic,
|
||||
foregroundDecoration: FocusTheme.focusDecoration(
|
||||
context,
|
||||
isFocused: showFocus,
|
||||
borderRadius: borderRadius,
|
||||
borderStrokeAlign: strokeAlign,
|
||||
),
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -99,35 +99,17 @@ class SelectKeyUpSuppressor {
|
||||
|
||||
/// Global helper to suppress the next BACK key-up event.
|
||||
///
|
||||
/// Use this when a modal (bottom sheet, dialog) closes to prevent
|
||||
/// the BACK key-up from propagating to the underlying screen.
|
||||
/// Armed when a modal (dialog, sheet) closes while a back key is still held —
|
||||
/// e.g. by [BackKeySuppressorObserver] when a route pops mid-press — so the
|
||||
/// in-flight key-up doesn't propagate to the underlying screen's back handler.
|
||||
class BackKeyUpSuppressor {
|
||||
static final _instance = _KeyUpSuppressor((k) => k.isBackKey);
|
||||
static bool _closedViaBackKey = false;
|
||||
|
||||
/// Mark that a modal is being closed via back key press.
|
||||
/// Call this before Navigator.pop() in back key handlers.
|
||||
static void markClosedViaBackKey() {
|
||||
_closedViaBackKey = true;
|
||||
}
|
||||
|
||||
/// Request suppression of back key-up events.
|
||||
/// Suppression is skipped if the modal was closed via back key
|
||||
/// (since the key-up already triggered the close).
|
||||
static void suppressBackUntilKeyUp() {
|
||||
if (_closedViaBackKey) {
|
||||
_closedViaBackKey = false;
|
||||
return;
|
||||
}
|
||||
_instance.suppress();
|
||||
}
|
||||
static void suppressBackUntilKeyUp() => _instance.suppress();
|
||||
|
||||
/// Clear any pending suppression. Call when opening a new modal
|
||||
/// to ensure stale suppression from previous closes doesn't affect it.
|
||||
static void clearSuppression() {
|
||||
_instance.clearSuppression();
|
||||
_closedViaBackKey = false;
|
||||
}
|
||||
static void clearSuppression() => _instance.clearSuppression();
|
||||
|
||||
static bool consumeIfSuppressed(KeyEvent event) => _instance.consumeIfSuppressed(event);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../services/device_performance.dart';
|
||||
import '../services/settings_service.dart';
|
||||
import 'focus_theme.dart';
|
||||
|
||||
/// Renders the focus glow for a focused card in the root [Overlay] so it paints
|
||||
@@ -55,10 +57,15 @@ class _FocusGlowOverlayState extends State<FocusGlowOverlay> {
|
||||
/// fades out before the portal is hidden in [_handleFadeEnd].
|
||||
bool _visible = false;
|
||||
|
||||
/// Glow is skipped on the reduced effects tier (blurred shadows + fade
|
||||
/// saveLayer are too expensive on weak GPUs) and when the user turned the
|
||||
/// Focus Glow setting off (#1278). The crisp focus border remains.
|
||||
static bool get _disabled => DevicePerformance.isReduced || !SettingsService.instance.read(SettingsService.focusGlow);
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
if (widget.isFocused) {
|
||||
if (widget.isFocused && !_disabled) {
|
||||
_visible = true;
|
||||
_controller.show();
|
||||
}
|
||||
@@ -67,6 +74,7 @@ class _FocusGlowOverlayState extends State<FocusGlowOverlay> {
|
||||
@override
|
||||
void didUpdateWidget(FocusGlowOverlay oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
if (_disabled) return;
|
||||
if (widget.isFocused == oldWidget.isFocused) return;
|
||||
if (widget.isFocused) {
|
||||
_controller.show();
|
||||
@@ -90,6 +98,8 @@ class _FocusGlowOverlayState extends State<FocusGlowOverlay> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (_disabled) return widget.child;
|
||||
|
||||
// Gate the LeaderLayer to the focused card only: when not focused and not
|
||||
// mid-fade, return the bare child (no OverlayPortal, no leader).
|
||||
if (!widget.isFocused && !_controller.isShowing) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../services/device_performance.dart';
|
||||
import '../theme/mono_tokens.dart';
|
||||
|
||||
class FocusTheme {
|
||||
@@ -17,6 +18,9 @@ class FocusTheme {
|
||||
}
|
||||
|
||||
static Duration getAnimationDuration(BuildContext context) {
|
||||
// Reduced tier: snap focus transitions (scale/border/glow) instead of
|
||||
// animating — each animation frame re-rasterizes the focused card.
|
||||
if (DevicePerformance.isReduced) return Duration.zero;
|
||||
return Theme.of(context).extension<MonoTokens>()?.fast ?? const Duration(milliseconds: 150);
|
||||
}
|
||||
|
||||
|
||||
@@ -648,6 +648,7 @@ class _FocusableTextInputHostState extends State<_FocusableTextInputHost> {
|
||||
late final VoidCallback _focusListener = _handleFocusChanged;
|
||||
final Object _nativeFocusToken = Object();
|
||||
bool _reportedNativeTextInputFocused = false;
|
||||
TvVirtualKeyboardHandle? _tvKeyboardHandle;
|
||||
bool _tvKeyboardOpen = false;
|
||||
bool _tvKeyboardOpenScheduled = false;
|
||||
bool _suppressTvKeyboardAutoOpen = false;
|
||||
@@ -661,6 +662,8 @@ class _FocusableTextInputHostState extends State<_FocusableTextInputHost> {
|
||||
void didUpdateWidget(_FocusableTextInputHost oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
if (oldWidget.input.focusNode != widget.input.focusNode) {
|
||||
// An open keyboard dialog intentionally survives rebuilds and focusNode
|
||||
// swaps; it is closed only when this host unmounts — see dispose.
|
||||
_restoreInstalledHandler();
|
||||
_suppressTvKeyboardAutoOpen = false;
|
||||
_tvKeyboardOpenScheduled = false;
|
||||
@@ -673,6 +676,13 @@ class _FocusableTextInputHostState extends State<_FocusableTextInputHost> {
|
||||
@override
|
||||
void dispose() {
|
||||
_restoreInstalledHandler();
|
||||
// The keyboard is a navigator route — it must not outlive the field that
|
||||
// opened it (e.g. a form section swapped out while the keyboard is up).
|
||||
// Navigator mutation is unsafe during tree finalization; defer a frame.
|
||||
final keyboard = _tvKeyboardHandle;
|
||||
if (keyboard != null) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => keyboard.close());
|
||||
}
|
||||
_ownedFocusNode?.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
@@ -763,31 +773,38 @@ class _FocusableTextInputHostState extends State<_FocusableTextInputHost> {
|
||||
// so only static configuration may be snapshotted here — the callbacks
|
||||
// must resolve against widget.input at invoke time.
|
||||
final input = widget.input;
|
||||
final keyboard = showTvVirtualKeyboard(
|
||||
context: context,
|
||||
controller: input.controller,
|
||||
hintText: _keyboardHint(input.decoration),
|
||||
keyboardType: input.keyboardType,
|
||||
textInputAction: input.textInputAction,
|
||||
inputFormatters: input.inputFormatters,
|
||||
obscureText: input.obscureText,
|
||||
maxLength: input.maxLength,
|
||||
maxLines: input.maxLines,
|
||||
onChanged: (text) {
|
||||
if (!mounted) return;
|
||||
widget.input.onChanged?.call(text);
|
||||
},
|
||||
onSubmitted: (text) {
|
||||
if (!mounted) return;
|
||||
final current = widget.input;
|
||||
if (current.onSubmitted != null) {
|
||||
current.onSubmitted!(text);
|
||||
} else {
|
||||
current._handleTvKeyboardAction();
|
||||
}
|
||||
},
|
||||
);
|
||||
if (keyboard == null) {
|
||||
_tvKeyboardOpen = false;
|
||||
return;
|
||||
}
|
||||
_tvKeyboardHandle = keyboard;
|
||||
unawaited(
|
||||
showTvVirtualKeyboard(
|
||||
context: context,
|
||||
controller: input.controller,
|
||||
hintText: _keyboardHint(input.decoration),
|
||||
keyboardType: input.keyboardType,
|
||||
textInputAction: input.textInputAction,
|
||||
inputFormatters: input.inputFormatters,
|
||||
obscureText: input.obscureText,
|
||||
maxLength: input.maxLength,
|
||||
maxLines: input.maxLines,
|
||||
onChanged: (text) {
|
||||
if (!mounted) return;
|
||||
widget.input.onChanged?.call(text);
|
||||
},
|
||||
onSubmitted: (text) {
|
||||
if (!mounted) return;
|
||||
final current = widget.input;
|
||||
if (current.onSubmitted != null) {
|
||||
current.onSubmitted!(text);
|
||||
} else {
|
||||
current._handleTvKeyboardAction();
|
||||
}
|
||||
},
|
||||
).whenComplete(() {
|
||||
keyboard.closed.whenComplete(() {
|
||||
_tvKeyboardHandle = null;
|
||||
if (!mounted) return;
|
||||
_tvKeyboardOpen = false;
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:flutter/services.dart';
|
||||
|
||||
import '../widgets/clickable_cursor.dart';
|
||||
import '../utils/text_input_diagnostics.dart';
|
||||
import 'card_focus_scope.dart';
|
||||
import 'dpad_navigator.dart';
|
||||
import 'focus_glow_overlay.dart';
|
||||
import 'focus_theme.dart';
|
||||
@@ -110,14 +111,13 @@ class FocusableWrapper extends StatefulWidget {
|
||||
/// Scale used for the focus animation.
|
||||
final double focusScale;
|
||||
|
||||
/// Stroke alignment for the focus border.
|
||||
final double focusBorderStrokeAlign;
|
||||
|
||||
/// Whether to draw a glow around the focused widget.
|
||||
final bool useFocusGlow;
|
||||
|
||||
/// Whether to draw the focus border as a foreground decoration.
|
||||
final bool useForegroundFocusDecoration;
|
||||
/// Skip drawing the focus border here and expose the focus state through a
|
||||
/// [CardFocusScope] instead, so the child places the border on the exact
|
||||
/// rect it wants highlighted (e.g. MediaCard's poster image).
|
||||
final bool delegateFocusBorder;
|
||||
|
||||
/// Whether descendants can receive focus.
|
||||
/// Set to false when the child widget has its own Focus (e.g. buttons)
|
||||
@@ -150,9 +150,8 @@ class FocusableWrapper extends StatefulWidget {
|
||||
this.focusColor,
|
||||
this.disableScale = false,
|
||||
this.focusScale = FocusTheme.focusScale,
|
||||
this.focusBorderStrokeAlign = BorderSide.strokeAlignInside,
|
||||
this.useFocusGlow = false,
|
||||
this.useForegroundFocusDecoration = false,
|
||||
this.delegateFocusBorder = false,
|
||||
this.descendantsAreFocusable = true,
|
||||
});
|
||||
|
||||
@@ -471,16 +470,6 @@ class _FocusableWrapperState extends State<FocusableWrapper> with SingleTickerPr
|
||||
_animationController.duration = duration;
|
||||
}
|
||||
|
||||
// Choose decoration based on useBackgroundFocus
|
||||
final focusDecoration = widget.useBackgroundFocus
|
||||
? FocusTheme.focusBackgroundDecoration(isFocused: showFocus, borderRadius: widget.borderRadius)
|
||||
: FocusTheme.focusDecoration(
|
||||
context,
|
||||
isFocused: showFocus,
|
||||
borderRadius: widget.borderRadius,
|
||||
color: widget.focusColor,
|
||||
borderStrokeAlign: widget.focusBorderStrokeAlign,
|
||||
);
|
||||
Widget result = Focus(
|
||||
focusNode: _focusNode,
|
||||
autofocus: widget.autofocus,
|
||||
@@ -493,13 +482,25 @@ class _FocusableWrapperState extends State<FocusableWrapper> with SingleTickerPr
|
||||
final shouldScale = showFocus && !widget.disableScale;
|
||||
// The glow (full-bleed cards) is drawn in an overlay above siblings so
|
||||
// it stays symmetric; the in-card decoration only carries the border.
|
||||
Widget card = AnimatedContainer(
|
||||
duration: duration,
|
||||
curve: Curves.easeOutCubic,
|
||||
decoration: widget.useForegroundFocusDecoration ? null : focusDecoration,
|
||||
foregroundDecoration: widget.useForegroundFocusDecoration ? focusDecoration : null,
|
||||
child: widget.child,
|
||||
);
|
||||
Widget card;
|
||||
if (widget.delegateFocusBorder) {
|
||||
card = CardFocusScope(showFocus: showFocus, child: widget.child);
|
||||
} else {
|
||||
final focusDecoration = widget.useBackgroundFocus
|
||||
? FocusTheme.focusBackgroundDecoration(isFocused: showFocus, borderRadius: widget.borderRadius)
|
||||
: FocusTheme.focusDecoration(
|
||||
context,
|
||||
isFocused: showFocus,
|
||||
borderRadius: widget.borderRadius,
|
||||
color: widget.focusColor,
|
||||
);
|
||||
card = AnimatedContainer(
|
||||
duration: duration,
|
||||
curve: Curves.easeOutCubic,
|
||||
decoration: focusDecoration,
|
||||
child: widget.child,
|
||||
);
|
||||
}
|
||||
if (widget.useFocusGlow) {
|
||||
card = FocusGlowOverlay(
|
||||
isFocused: showFocus,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
@@ -40,6 +42,13 @@ class InputModeTracker extends StatefulWidget {
|
||||
return of(context) == InputMode.keyboard;
|
||||
}
|
||||
|
||||
/// Whether system back must be blocked because the dpad key handler owns
|
||||
/// back navigation: on Android in keyboard mode (TV/gamepad), letting the
|
||||
/// system back through as well double-pops the route.
|
||||
static bool shouldBlockSystemBack(BuildContext context) {
|
||||
return Platform.isAndroid && isKeyboardMode(context);
|
||||
}
|
||||
|
||||
@override
|
||||
State<InputModeTracker> createState() => _InputModeTrackerState();
|
||||
}
|
||||
|
||||
@@ -79,8 +79,6 @@ KeyEventResult handleBackKeyAction(KeyEvent event, VoidCallback onBack) {
|
||||
|
||||
if (event is KeyUpEvent) {
|
||||
BackKeyCoordinator.markHandled();
|
||||
// Mark that we're closing via back key so suppressBackUntilKeyUp() knows to skip
|
||||
BackKeyUpSuppressor.markClosedViaBackKey();
|
||||
onBack();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "или",
|
||||
"connectToJellyfin": "Свързване с Jellyfin",
|
||||
"useQuickConnect": "Използвай Quick Connect",
|
||||
"quickConnectCode": "Quick Connect код",
|
||||
"quickConnectInstructions": "Отворете Quick Connect в Jellyfin и въведете този код.",
|
||||
"quickConnectWaiting": "Изчакване на одобрение…",
|
||||
"quickConnectCancel": "Отказ",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "Показвай постера на всеки сезон над неговия таб",
|
||||
"tvFullCardLayout": "Пълни TV карти",
|
||||
"tvFullCardLayoutDescription": "Използвай TV карти само с изображения, с насложени имена на актьорите",
|
||||
"focusGlow": "Сияние при фокус",
|
||||
"focusGlowDescription": "Показвай меко сияние около фокусираната карта",
|
||||
"hideSpoilers": "Скривай спойлери за негледани епизоди",
|
||||
"hideSpoilersDescription": "Замазвай миниатюри и описания за негледани епизоди",
|
||||
"playerBackend": "Енджин на плеъра",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "Позиция",
|
||||
"assOverride": "ASS презаписване",
|
||||
"bold": "Получер",
|
||||
"italic": "Курсив"
|
||||
"italic": "Курсив",
|
||||
"renderResolution": "Резолюция на изобразяване",
|
||||
"renderResolutionScreen": "Резолюция на екрана",
|
||||
"renderResolutionVideo": "Резолюция на видеото"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv.conf",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "Използван кеш",
|
||||
"cacheLimit": "Лимит на кеша",
|
||||
"speed": "Скорост",
|
||||
"player": "Плеър",
|
||||
"memory": "Памет",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Добави Jellyfin сървър",
|
||||
"jellyfinUrlIntro": "Въведете URL адреса на сървъра, напр. `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "Въведете един или повече URL адреси на сървъра, разделени със запетаи. Plezy ще използва достъпния URL адрес с най-ниска латентност.",
|
||||
"serverUrl": "URL адрес на сървъра",
|
||||
"serverUrls": "URL адреси на сървъра",
|
||||
"serverUrlsHelper": "Позволени са няколко URL адреса, разделени със запетаи.",
|
||||
"findServer": "Намери сървър",
|
||||
"searchingLocalServers": "Търсене на локални Jellyfin сървъри...",
|
||||
"localServers": "Локални Jellyfin сървъри",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "Входът е неуспешен: ${error}",
|
||||
"quickConnectFailed": "Quick Connect е неуспешен: ${error}",
|
||||
"addPlexTitle": "Вход с Plex",
|
||||
"plexAuthIntro": "Влезте с браузър или QR код.",
|
||||
"plexQRPrompt": "Сканирайте този QR код, за да влезете.",
|
||||
"waitingForPlexConfirmation": "Изчакване plex.tv да потвърди вашия вход…",
|
||||
"pinExpired": "PIN-ът изтече преди вход. Моля, опитайте отново.",
|
||||
"duplicatePlexAccount": "Вече сте влезли в Plex. Излезте, за да смените акаунта.",
|
||||
"failedToRegisterAccount": "Неуспешна регистрация на акаунт: ${error}",
|
||||
"enterJellyfinUrlError": "Въведете URL адреса на вашия Jellyfin сървър",
|
||||
"addConnectionTitle": "Добави връзка",
|
||||
"addConnectionTitleScoped": "Добави към ${name}",
|
||||
"addConnectionIntroGlobal": "Добавете друг медиен сървър. Plex и Jellyfin се показват заедно на началния екран.",
|
||||
"addConnectionIntroScoped": "Добавете нов сървър или използвайте такъв от друг профил.",
|
||||
"signInWithPlexCard": "Вход с Plex",
|
||||
"signInWithPlexCardSubtitle": "Удостоверете това устройство. Споделените сървъри се добавят.",
|
||||
"signInWithPlexCardSubtitleScoped": "Удостоверете Plex акаунт. Домашните потребители стават профили.",
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "eller",
|
||||
"connectToJellyfin": "Forbind til Jellyfin",
|
||||
"useQuickConnect": "Brug Quick Connect",
|
||||
"quickConnectCode": "Quick Connect-kode",
|
||||
"quickConnectInstructions": "Åbn Quick Connect i Jellyfin, og indtast denne kode.",
|
||||
"quickConnectWaiting": "Venter på godkendelse…",
|
||||
"quickConnectCancel": "Annullér",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "Vis hver sæsons plakat over dens fane",
|
||||
"tvFullCardLayout": "Fuldflade TV-kort",
|
||||
"tvFullCardLayoutDescription": "Brug TV-kort kun med billeder og skuespillernavne ovenpå",
|
||||
"focusGlow": "Fokusglød",
|
||||
"focusGlowDescription": "Vis en blød glød omkring det fokuserede kort",
|
||||
"hideSpoilers": "Skjul spoilere for usete episoder",
|
||||
"hideSpoilersDescription": "Slør miniaturebilleder og beskrivelser for usete episoder",
|
||||
"playerBackend": "Afspillerbackend",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "Position",
|
||||
"assOverride": "ASS-tilsidesættelse",
|
||||
"bold": "Fed",
|
||||
"italic": "Kursiv"
|
||||
"italic": "Kursiv",
|
||||
"renderResolution": "Gengivelsesopløsning",
|
||||
"renderResolutionScreen": "Skærmopløsning",
|
||||
"renderResolutionVideo": "Videoopløsning"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv.conf",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "Brugt cache",
|
||||
"cacheLimit": "Cachegrænse",
|
||||
"speed": "Hastighed",
|
||||
"player": "Afspiller",
|
||||
"memory": "Hukommelse",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Tilføj Jellyfin-server",
|
||||
"jellyfinUrlIntro": "Indtast server-URL'en, f.eks. `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "Indtast en eller flere server-URL'er, adskilt med kommaer. Plezy bruger den tilgængelige URL med lavest latenstid.",
|
||||
"serverUrl": "Server-URL",
|
||||
"serverUrls": "Server-URL'er",
|
||||
"serverUrlsHelper": "Flere URL'er er tilladt, adskilt med kommaer.",
|
||||
"findServer": "Find server",
|
||||
"searchingLocalServers": "Søger efter lokale Jellyfin-servere...",
|
||||
"localServers": "Lokale Jellyfin-servere",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "Login mislykkedes: ${error}",
|
||||
"quickConnectFailed": "Quick Connect mislykkedes: ${error}",
|
||||
"addPlexTitle": "Log ind med Plex",
|
||||
"plexAuthIntro": "Log ind med en browser eller QR-kode.",
|
||||
"plexQRPrompt": "Scan denne QR-kode for at logge ind.",
|
||||
"waitingForPlexConfirmation": "Venter på at plex.tv bekræfter login…",
|
||||
"pinExpired": "PIN udløb før login. Prøv igen.",
|
||||
"duplicatePlexAccount": "Allerede logget ind på Plex. Log ud for at skifte konto.",
|
||||
"failedToRegisterAccount": "Kunne ikke registrere kontoen: ${error}",
|
||||
"enterJellyfinUrlError": "Angiv URL'en til din Jellyfin-server",
|
||||
"addConnectionTitle": "Tilføj forbindelse",
|
||||
"addConnectionTitleScoped": "Tilføj til ${name}",
|
||||
"addConnectionIntroGlobal": "Tilføj en anden medieserver. Plex og Jellyfin vises sammen på Hjem.",
|
||||
"addConnectionIntroScoped": "Tilføj en ny server, eller lån en fra en anden profil.",
|
||||
"signInWithPlexCard": "Log ind med Plex",
|
||||
"signInWithPlexCardSubtitle": "Godkend denne enhed. Delte servere tilføjes.",
|
||||
"signInWithPlexCardSubtitleScoped": "Godkend en Plex-konto. Home-brugere bliver profiler.",
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "oder",
|
||||
"connectToJellyfin": "Mit Jellyfin verbinden",
|
||||
"useQuickConnect": "Quick Connect verwenden",
|
||||
"quickConnectCode": "Quick Connect-Code",
|
||||
"quickConnectInstructions": "Öffne Quick Connect in Jellyfin und gib diesen Code ein.",
|
||||
"quickConnectWaiting": "Warte auf Bestätigung…",
|
||||
"quickConnectCancel": "Abbrechen",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "Poster jeder Staffel über ihrem Tab anzeigen",
|
||||
"tvFullCardLayout": "Vollflächige TV-Karten",
|
||||
"tvFullCardLayoutDescription": "TV-Karten nur mit Bild verwenden und Darstellernamen einblenden",
|
||||
"focusGlow": "Fokus-Leuchten",
|
||||
"focusGlowDescription": "Sanftes Leuchten um die fokussierte Karte anzeigen",
|
||||
"hideSpoilers": "Spoiler für nicht gesehene Episoden verbergen",
|
||||
"hideSpoilersDescription": "Vorschaubilder und Beschreibungen ungesehener Episoden verwischen",
|
||||
"playerBackend": "Player-Backend",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "Position",
|
||||
"assOverride": "ASS-Überschreibung",
|
||||
"bold": "Fett",
|
||||
"italic": "Kursiv"
|
||||
"italic": "Kursiv",
|
||||
"renderResolution": "Render-Auflösung",
|
||||
"renderResolutionScreen": "Bildschirmauflösung",
|
||||
"renderResolutionVideo": "Videoauflösung"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv-Konfiguration",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "Cache genutzt",
|
||||
"cacheLimit": "Cache-Limit",
|
||||
"speed": "Geschwindigkeit",
|
||||
"player": "Player",
|
||||
"memory": "Speicher",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Jellyfin-Server hinzufügen",
|
||||
"jellyfinUrlIntro": "Gib die Server-URL ein, z. B. `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "Gib eine oder mehrere Server-URLs ein, getrennt durch Kommas. Plezy verwendet die erreichbare URL mit der geringsten Latenz.",
|
||||
"serverUrl": "Server-URL",
|
||||
"serverUrls": "Server-URLs",
|
||||
"serverUrlsHelper": "Mehrere URLs möglich, durch Kommas getrennt.",
|
||||
"findServer": "Server finden",
|
||||
"searchingLocalServers": "Suche nach lokalen Jellyfin-Servern...",
|
||||
"localServers": "Lokale Jellyfin-Server",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "Anmeldung fehlgeschlagen: ${error}",
|
||||
"quickConnectFailed": "Quick Connect fehlgeschlagen: ${error}",
|
||||
"addPlexTitle": "Mit Plex anmelden",
|
||||
"plexAuthIntro": "Melde dich mit Browser oder QR-Code an.",
|
||||
"plexQRPrompt": "Scanne diesen QR-Code zum Anmelden.",
|
||||
"waitingForPlexConfirmation": "Warte auf Bestätigung durch plex.tv…",
|
||||
"pinExpired": "PIN ist vor der Anmeldung abgelaufen. Bitte erneut versuchen.",
|
||||
"duplicatePlexAccount": "Bereits bei Plex angemeldet. Melde dich ab, um Konten zu wechseln.",
|
||||
"failedToRegisterAccount": "Konto konnte nicht registriert werden: ${error}",
|
||||
"enterJellyfinUrlError": "Gib die URL deines Jellyfin-Servers ein",
|
||||
"addConnectionTitle": "Verbindung hinzufügen",
|
||||
"addConnectionTitleScoped": "Zu ${name} hinzufügen",
|
||||
"addConnectionIntroGlobal": "Füge einen weiteren Medienserver hinzu. Plex und Jellyfin erscheinen zusammen auf der Startseite.",
|
||||
"addConnectionIntroScoped": "Füge einen neuen Server hinzu oder leihe einen von einem anderen Profil aus.",
|
||||
"signInWithPlexCard": "Mit Plex anmelden",
|
||||
"signInWithPlexCardSubtitle": "Dieses Gerät autorisieren. Geteilte Server werden hinzugefügt.",
|
||||
"signInWithPlexCardSubtitleScoped": "Ein Plex-Konto autorisieren. Home-Benutzer werden zu Profilen.",
|
||||
|
||||
+17
-10
@@ -14,7 +14,6 @@
|
||||
"or": "or",
|
||||
"connectToJellyfin": "Connect to Jellyfin",
|
||||
"useQuickConnect": "Use Quick Connect",
|
||||
"quickConnectCode": "Quick Connect code",
|
||||
"quickConnectInstructions": "Open Quick Connect in Jellyfin and enter this code.",
|
||||
"quickConnectWaiting": "Waiting for approval…",
|
||||
"quickConnectCancel": "Cancel",
|
||||
@@ -135,6 +134,14 @@
|
||||
"showSeasonPostersOnTabsDescription": "Show each season's poster above its tab",
|
||||
"tvFullCardLayout": "Full TV Cards",
|
||||
"tvFullCardLayoutDescription": "Use image-only TV cards with actor names overlaid",
|
||||
"focusGlow": "Focus Glow",
|
||||
"focusGlowDescription": "Draw a soft glow around the focused card",
|
||||
"visualEffects": "Visual Effects",
|
||||
"visualEffectsAuto": "Auto",
|
||||
"visualEffectsAutoDescription": "Reduce effects automatically on low-power devices",
|
||||
"visualEffectsFull": "Full",
|
||||
"visualEffectsReduced": "Reduced",
|
||||
"visualEffectsReducedDescription": "Fewer animations and lower-resolution artwork",
|
||||
"hideSpoilers": "Hide Spoilers for Unwatched Episodes",
|
||||
"hideSpoilersDescription": "Blur thumbnails and descriptions for unwatched episodes",
|
||||
"playerBackend": "Player Backend",
|
||||
@@ -556,7 +563,10 @@
|
||||
"position": "Position",
|
||||
"assOverride": "ASS Override",
|
||||
"bold": "Bold",
|
||||
"italic": "Italic"
|
||||
"italic": "Italic",
|
||||
"renderResolution": "Render Resolution",
|
||||
"renderResolutionScreen": "Screen resolution",
|
||||
"renderResolutionVideo": "Video resolution"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv.conf",
|
||||
@@ -977,7 +987,10 @@
|
||||
"participantResumed": "${name} resumed",
|
||||
"participantSeeked": "${name} seeked",
|
||||
"participantBuffering": "${name} is buffering",
|
||||
"participantNeedsUpdate": "${name} is on an older app version — sync unavailable",
|
||||
"resumingWithout": "Resuming without ${name}",
|
||||
"waitingForParticipants": "Waiting for others to load...",
|
||||
"waitingForName": "Waiting for ${name}...",
|
||||
"recentRooms": "Recent Rooms",
|
||||
"renameRoom": "Rename Room",
|
||||
"removeRoom": "Remove",
|
||||
@@ -1183,6 +1196,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "Cache Used",
|
||||
"cacheLimit": "Cache Limit",
|
||||
"speed": "Speed",
|
||||
"player": "Player",
|
||||
"memory": "Memory",
|
||||
@@ -1357,10 +1371,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Add Jellyfin server",
|
||||
"jellyfinUrlIntro": "Enter the server URL, e.g. `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "Enter one or more server URLs, separated by commas. Plezy will use the reachable URL with the lowest latency.",
|
||||
"serverUrl": "Server URL",
|
||||
"serverUrls": "Server URLs",
|
||||
"serverUrlsHelper": "Multiple URLs allowed, separated by commas.",
|
||||
"findServer": "Find server",
|
||||
"searchingLocalServers": "Looking for local Jellyfin servers...",
|
||||
"localServers": "Local Jellyfin servers",
|
||||
@@ -1373,17 +1385,12 @@
|
||||
"signInFailed": "Sign-in failed: ${error}",
|
||||
"quickConnectFailed": "Quick Connect failed: ${error}",
|
||||
"addPlexTitle": "Sign in with Plex",
|
||||
"plexAuthIntro": "Sign in with a browser or QR code.",
|
||||
"plexQRPrompt": "Scan this QR code to sign in.",
|
||||
"waitingForPlexConfirmation": "Waiting for plex.tv to confirm your sign-in…",
|
||||
"pinExpired": "PIN expired before sign-in. Please try again.",
|
||||
"duplicatePlexAccount": "Already signed in to Plex. Sign out to switch accounts.",
|
||||
"failedToRegisterAccount": "Failed to register account: ${error}",
|
||||
"enterJellyfinUrlError": "Enter your Jellyfin server URL",
|
||||
"addConnectionTitle": "Add connection",
|
||||
"addConnectionTitleScoped": "Add to ${name}",
|
||||
"addConnectionIntroGlobal": "Add another media server. Plex and Jellyfin appear together on Home.",
|
||||
"addConnectionIntroScoped": "Add a new server, or borrow one from another profile.",
|
||||
"signInWithPlexCard": "Sign in with Plex",
|
||||
"signInWithPlexCardSubtitle": "Authorize this device. Shared servers are added.",
|
||||
"signInWithPlexCardSubtitleScoped": "Authorize a Plex account. Home users become profiles.",
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "o",
|
||||
"connectToJellyfin": "Conectar a Jellyfin",
|
||||
"useQuickConnect": "Usar Quick Connect",
|
||||
"quickConnectCode": "Código de Quick Connect",
|
||||
"quickConnectInstructions": "Abre Quick Connect en Jellyfin e introduce este código.",
|
||||
"quickConnectWaiting": "Esperando aprobación…",
|
||||
"quickConnectCancel": "Cancelar",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "Mostrar el póster de cada temporada sobre su pestaña",
|
||||
"tvFullCardLayout": "Tarjetas TV completas",
|
||||
"tvFullCardLayoutDescription": "Usar tarjetas TV solo con imagen y nombres de actores superpuestos",
|
||||
"focusGlow": "Brillo de foco",
|
||||
"focusGlowDescription": "Mostrar un brillo suave alrededor de la tarjeta con foco",
|
||||
"hideSpoilers": "Ocultar spoilers de episodios no vistos",
|
||||
"hideSpoilersDescription": "Desenfocar miniaturas y descripciones de episodios no vistos",
|
||||
"playerBackend": "Reproductor",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "Posición",
|
||||
"assOverride": "Sobreescritura ASS",
|
||||
"bold": "Negrita",
|
||||
"italic": "Cursiva"
|
||||
"italic": "Cursiva",
|
||||
"renderResolution": "Resolución de renderizado",
|
||||
"renderResolutionScreen": "Resolución de pantalla",
|
||||
"renderResolutionVideo": "Resolución del vídeo"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "Configuración de mpv",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "Caché usada",
|
||||
"cacheLimit": "Límite de caché",
|
||||
"speed": "Velocidad",
|
||||
"player": "Reproductor",
|
||||
"memory": "Memoria",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Añadir servidor Jellyfin",
|
||||
"jellyfinUrlIntro": "Introduce la URL del servidor, p. ej. `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "Introduce una o más URL del servidor, separadas por comas. Plezy usará la URL accesible con menor latencia.",
|
||||
"serverUrl": "URL del servidor",
|
||||
"serverUrls": "URL del servidor",
|
||||
"serverUrlsHelper": "Se permiten varias URL, separadas por comas.",
|
||||
"findServer": "Buscar servidor",
|
||||
"searchingLocalServers": "Buscando servidores Jellyfin locales...",
|
||||
"localServers": "Servidores Jellyfin locales",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "Error al iniciar sesión: ${error}",
|
||||
"quickConnectFailed": "Quick Connect ha fallado: ${error}",
|
||||
"addPlexTitle": "Iniciar sesión con Plex",
|
||||
"plexAuthIntro": "Inicia sesión con un navegador o código QR.",
|
||||
"plexQRPrompt": "Escanea este código QR para iniciar sesión.",
|
||||
"waitingForPlexConfirmation": "Esperando que plex.tv confirme tu inicio de sesión…",
|
||||
"pinExpired": "El PIN caducó antes de iniciar sesión. Inténtalo de nuevo.",
|
||||
"duplicatePlexAccount": "Ya iniciaste sesión en Plex. Cierra sesión para cambiar de cuenta.",
|
||||
"failedToRegisterAccount": "No se pudo registrar la cuenta: ${error}",
|
||||
"enterJellyfinUrlError": "Introduce la URL de tu servidor Jellyfin",
|
||||
"addConnectionTitle": "Añadir conexión",
|
||||
"addConnectionTitleScoped": "Añadir a ${name}",
|
||||
"addConnectionIntroGlobal": "Añade otro servidor multimedia. Plex y Jellyfin aparecen juntos en Inicio.",
|
||||
"addConnectionIntroScoped": "Añade un servidor nuevo o toma prestado uno de otro perfil.",
|
||||
"signInWithPlexCard": "Iniciar sesión con Plex",
|
||||
"signInWithPlexCardSubtitle": "Autoriza este dispositivo. Se añaden servidores compartidos.",
|
||||
"signInWithPlexCardSubtitleScoped": "Autoriza una cuenta Plex. Los usuarios de Home se convierten en perfiles.",
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "ou",
|
||||
"connectToJellyfin": "Se connecter à Jellyfin",
|
||||
"useQuickConnect": "Utiliser Quick Connect",
|
||||
"quickConnectCode": "Code Quick Connect",
|
||||
"quickConnectInstructions": "Ouvrez Quick Connect dans Jellyfin et saisissez ce code.",
|
||||
"quickConnectWaiting": "En attente d'approbation…",
|
||||
"quickConnectCancel": "Annuler",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "Afficher l'affiche de chaque saison au-dessus de son onglet",
|
||||
"tvFullCardLayout": "Cartes TV pleines",
|
||||
"tvFullCardLayoutDescription": "Utiliser des cartes TV avec image seule et noms des acteurs superposés",
|
||||
"focusGlow": "Halo de sélection",
|
||||
"focusGlowDescription": "Afficher un léger halo autour de la carte sélectionnée",
|
||||
"hideSpoilers": "Masquer les spoilers des épisodes non vus",
|
||||
"hideSpoilersDescription": "Flouter les miniatures et descriptions des épisodes non vus",
|
||||
"playerBackend": "Moteur de lecture",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "Position",
|
||||
"assOverride": "Remplacement ASS",
|
||||
"bold": "Gras",
|
||||
"italic": "Italique"
|
||||
"italic": "Italique",
|
||||
"renderResolution": "Résolution de rendu",
|
||||
"renderResolutionScreen": "Résolution de l'écran",
|
||||
"renderResolutionVideo": "Résolution de la vidéo"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "Configuration mpv",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "Cache utilisé",
|
||||
"cacheLimit": "Limite du cache",
|
||||
"speed": "Vitesse",
|
||||
"player": "Lecteur",
|
||||
"memory": "Mémoire",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Ajouter un serveur Jellyfin",
|
||||
"jellyfinUrlIntro": "Saisissez l'URL du serveur, par ex. `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "Saisissez une ou plusieurs URL de serveur, séparées par des virgules. Plezy utilisera l'URL joignable avec la latence la plus faible.",
|
||||
"serverUrl": "URL du serveur",
|
||||
"serverUrls": "URL du serveur",
|
||||
"serverUrlsHelper": "Plusieurs URL possibles, séparées par des virgules.",
|
||||
"findServer": "Rechercher un serveur",
|
||||
"searchingLocalServers": "Recherche de serveurs Jellyfin locaux...",
|
||||
"localServers": "Serveurs Jellyfin locaux",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "Échec de la connexion : ${error}",
|
||||
"quickConnectFailed": "Échec de Quick Connect : ${error}",
|
||||
"addPlexTitle": "Se connecter avec Plex",
|
||||
"plexAuthIntro": "Connectez-vous avec un navigateur ou un code QR.",
|
||||
"plexQRPrompt": "Scannez ce QR code pour vous connecter.",
|
||||
"waitingForPlexConfirmation": "En attente de la confirmation de plex.tv…",
|
||||
"pinExpired": "Le PIN a expiré avant la connexion. Veuillez réessayer.",
|
||||
"duplicatePlexAccount": "Déjà connecté à Plex. Déconnectez-vous pour changer de compte.",
|
||||
"failedToRegisterAccount": "Échec de l'enregistrement du compte : ${error}",
|
||||
"enterJellyfinUrlError": "Saisissez l'URL de votre serveur Jellyfin",
|
||||
"addConnectionTitle": "Ajouter une connexion",
|
||||
"addConnectionTitleScoped": "Ajouter à ${name}",
|
||||
"addConnectionIntroGlobal": "Ajoutez un autre serveur multimédia. Plex et Jellyfin apparaissent ensemble sur Accueil.",
|
||||
"addConnectionIntroScoped": "Ajoutez un nouveau serveur, ou empruntez-en un à un autre profil.",
|
||||
"signInWithPlexCard": "Se connecter avec Plex",
|
||||
"signInWithPlexCardSubtitle": "Autorisez cet appareil. Les serveurs partagés sont ajoutés.",
|
||||
"signInWithPlexCardSubtitleScoped": "Autorisez un compte Plex. Les utilisateurs Home deviennent des profils.",
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "o",
|
||||
"connectToJellyfin": "Connetti a Jellyfin",
|
||||
"useQuickConnect": "Usa Quick Connect",
|
||||
"quickConnectCode": "Codice Quick Connect",
|
||||
"quickConnectInstructions": "Apri Quick Connect in Jellyfin e inserisci questo codice.",
|
||||
"quickConnectWaiting": "In attesa di approvazione…",
|
||||
"quickConnectCancel": "Annulla",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "Mostra il poster di ogni stagione sopra la sua scheda",
|
||||
"tvFullCardLayout": "Schede TV piene",
|
||||
"tvFullCardLayoutDescription": "Usa schede TV solo immagine con i nomi degli attori sovrapposti",
|
||||
"focusGlow": "Bagliore di selezione",
|
||||
"focusGlowDescription": "Mostra un leggero bagliore attorno alla scheda selezionata",
|
||||
"hideSpoilers": "Nascondi spoiler per episodi non visti",
|
||||
"hideSpoilersDescription": "Sfoca miniature e descrizioni degli episodi non visti",
|
||||
"playerBackend": "Motore di riproduzione",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "Posizione",
|
||||
"assOverride": "Sovrascrittura ASS",
|
||||
"bold": "Grassetto",
|
||||
"italic": "Corsivo"
|
||||
"italic": "Corsivo",
|
||||
"renderResolution": "Risoluzione di rendering",
|
||||
"renderResolutionScreen": "Risoluzione dello schermo",
|
||||
"renderResolutionVideo": "Risoluzione del video"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "Configurazione mpv",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "Cache usata",
|
||||
"cacheLimit": "Limite cache",
|
||||
"speed": "Velocità",
|
||||
"player": "Player",
|
||||
"memory": "Memoria",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Aggiungi server Jellyfin",
|
||||
"jellyfinUrlIntro": "Inserisci l'URL del server, es. `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "Inserisci uno o più URL del server, separati da virgole. Plezy userà l'URL raggiungibile con la latenza più bassa.",
|
||||
"serverUrl": "URL del server",
|
||||
"serverUrls": "URL del server",
|
||||
"serverUrlsHelper": "Sono consentiti più URL, separati da virgole.",
|
||||
"findServer": "Trova server",
|
||||
"searchingLocalServers": "Ricerca server Jellyfin locali...",
|
||||
"localServers": "Server Jellyfin locali",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "Accesso non riuscito: ${error}",
|
||||
"quickConnectFailed": "Quick Connect non riuscito: ${error}",
|
||||
"addPlexTitle": "Accedi con Plex",
|
||||
"plexAuthIntro": "Accedi con un browser o un codice QR.",
|
||||
"plexQRPrompt": "Scansiona questo QR code per accedere.",
|
||||
"waitingForPlexConfirmation": "In attesa della conferma da plex.tv…",
|
||||
"pinExpired": "PIN scaduto prima dell'accesso. Riprova.",
|
||||
"duplicatePlexAccount": "Accesso a Plex già effettuato. Esci per cambiare account.",
|
||||
"failedToRegisterAccount": "Registrazione account non riuscita: ${error}",
|
||||
"enterJellyfinUrlError": "Inserisci l'URL del tuo server Jellyfin",
|
||||
"addConnectionTitle": "Aggiungi connessione",
|
||||
"addConnectionTitleScoped": "Aggiungi a ${name}",
|
||||
"addConnectionIntroGlobal": "Aggiungi un altro server multimediale. Plex e Jellyfin appaiono insieme in Home.",
|
||||
"addConnectionIntroScoped": "Aggiungi un nuovo server, o prendine in prestito uno da un altro profilo.",
|
||||
"signInWithPlexCard": "Accedi con Plex",
|
||||
"signInWithPlexCardSubtitle": "Autorizza questo dispositivo. I server condivisi vengono aggiunti.",
|
||||
"signInWithPlexCardSubtitleScoped": "Autorizza un account Plex. Gli utenti Home diventano profili.",
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "または",
|
||||
"connectToJellyfin": "Jellyfinに接続",
|
||||
"useQuickConnect": "Quick Connect を使う",
|
||||
"quickConnectCode": "Quick Connect コード",
|
||||
"quickConnectInstructions": "JellyfinでQuick Connectを開き、このコードを入力してください。",
|
||||
"quickConnectWaiting": "承認を待っています…",
|
||||
"quickConnectCancel": "キャンセル",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "各シーズンのポスターをタブの上に表示します",
|
||||
"tvFullCardLayout": "フルTVカード",
|
||||
"tvFullCardLayoutDescription": "TVカードを画像のみで表示し、俳優名を重ねて表示します",
|
||||
"focusGlow": "フォーカス時の光彩",
|
||||
"focusGlowDescription": "フォーカス中のカードの周りに柔らかい光彩を表示します",
|
||||
"hideSpoilers": "未視聴エピソードのネタバレを非表示",
|
||||
"hideSpoilersDescription": "未視聴エピソードのサムネイルと説明をぼかします",
|
||||
"playerBackend": "プレーヤーバックエンド",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "位置",
|
||||
"assOverride": "ASSオーバーライド",
|
||||
"bold": "太字",
|
||||
"italic": "斜体"
|
||||
"italic": "斜体",
|
||||
"renderResolution": "レンダリング解像度",
|
||||
"renderResolutionScreen": "画面解像度",
|
||||
"renderResolutionVideo": "動画解像度"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv.conf",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "使用キャッシュ",
|
||||
"cacheLimit": "キャッシュ上限",
|
||||
"speed": "速度",
|
||||
"player": "プレーヤー",
|
||||
"memory": "メモリ",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Jellyfinサーバーを追加",
|
||||
"jellyfinUrlIntro": "サーバーURLを入力してください。例: `https://jellyfin.example.com`。",
|
||||
"jellyfinUrlsIntro": "サーバーURLを1つ以上、カンマで区切って入力してください。Plezyは到達可能なURLのうち最も低遅延のものを使用します。",
|
||||
"serverUrl": "サーバーURL",
|
||||
"serverUrls": "サーバーURL",
|
||||
"serverUrlsHelper": "複数のURLをカンマ区切りで入力できます。",
|
||||
"findServer": "サーバーを検索",
|
||||
"searchingLocalServers": "ローカル Jellyfin サーバーを検索中...",
|
||||
"localServers": "ローカル Jellyfin サーバー",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "サインインに失敗しました: ${error}",
|
||||
"quickConnectFailed": "Quick Connectに失敗しました: ${error}",
|
||||
"addPlexTitle": "Plexでサインイン",
|
||||
"plexAuthIntro": "ブラウザまたはQRコードでサインインします。",
|
||||
"plexQRPrompt": "このQRコードをスキャンしてサインインしてください。",
|
||||
"waitingForPlexConfirmation": "plex.tvがサインインを確認するのを待っています…",
|
||||
"pinExpired": "サインイン前にPINの有効期限が切れました。もう一度お試しください。",
|
||||
"duplicatePlexAccount": "すでにPlexにサインインしています。アカウントを切り替えるにはサインアウトしてください。",
|
||||
"failedToRegisterAccount": "アカウントの登録に失敗しました: ${error}",
|
||||
"enterJellyfinUrlError": "JellyfinサーバーのURLを入力してください",
|
||||
"addConnectionTitle": "接続を追加",
|
||||
"addConnectionTitleScoped": "${name}に追加",
|
||||
"addConnectionIntroGlobal": "別のメディアサーバーを追加します。PlexとJellyfinはホームに一緒に表示されます。",
|
||||
"addConnectionIntroScoped": "新しいサーバーを追加するか、別のプロファイルから借りてください。",
|
||||
"signInWithPlexCard": "Plexでサインイン",
|
||||
"signInWithPlexCardSubtitle": "このデバイスを承認します。共有サーバーが追加されます。",
|
||||
"signInWithPlexCardSubtitleScoped": "Plexアカウントを承認します。Homeユーザーはプロフィールになります。",
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "또는",
|
||||
"connectToJellyfin": "Jellyfin에 연결",
|
||||
"useQuickConnect": "Quick Connect 사용",
|
||||
"quickConnectCode": "Quick Connect 코드",
|
||||
"quickConnectInstructions": "Jellyfin에서 Quick Connect를 열고 이 코드를 입력하세요.",
|
||||
"quickConnectWaiting": "승인 대기 중…",
|
||||
"quickConnectCancel": "취소",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "각 시즌 포스터를 탭 위에 표시",
|
||||
"tvFullCardLayout": "전체 TV 카드",
|
||||
"tvFullCardLayoutDescription": "TV 카드에 이미지만 표시하고 배우 이름을 오버레이로 표시",
|
||||
"focusGlow": "포커스 글로우",
|
||||
"focusGlowDescription": "포커스된 카드 주위에 은은한 빛 효과를 표시",
|
||||
"hideSpoilers": "미시청 에피소드 스포일러 숨기기",
|
||||
"hideSpoilersDescription": "시청하지 않은 에피소드의 썸네일과 설명을 흐리게 처리",
|
||||
"playerBackend": "플레이어 백엔드",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "위치",
|
||||
"assOverride": "ASS 오버라이드",
|
||||
"bold": "굵게",
|
||||
"italic": "기울임꼴"
|
||||
"italic": "기울임꼴",
|
||||
"renderResolution": "렌더링 해상도",
|
||||
"renderResolutionScreen": "화면 해상도",
|
||||
"renderResolutionVideo": "영상 해상도"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv 설정",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "사용 캐시",
|
||||
"cacheLimit": "캐시 제한",
|
||||
"speed": "속도",
|
||||
"player": "플레이어",
|
||||
"memory": "메모리",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Jellyfin 서버 추가",
|
||||
"jellyfinUrlIntro": "서버 URL을 입력하세요. 예: `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "서버 URL을 하나 이상 쉼표로 구분해 입력하세요. Plezy는 연결 가능한 URL 중 지연 시간이 가장 낮은 URL을 사용합니다.",
|
||||
"serverUrl": "서버 URL",
|
||||
"serverUrls": "서버 URL",
|
||||
"serverUrlsHelper": "쉼표로 구분하여 여러 URL을 입력할 수 있습니다.",
|
||||
"findServer": "서버 찾기",
|
||||
"searchingLocalServers": "로컬 Jellyfin 서버 검색 중...",
|
||||
"localServers": "로컬 Jellyfin 서버",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "로그인 실패: ${error}",
|
||||
"quickConnectFailed": "Quick Connect 실패: ${error}",
|
||||
"addPlexTitle": "Plex로 로그인",
|
||||
"plexAuthIntro": "브라우저 또는 QR 코드로 로그인하세요.",
|
||||
"plexQRPrompt": "이 QR 코드를 스캔하여 로그인하세요.",
|
||||
"waitingForPlexConfirmation": "plex.tv에서 로그인을 확인하는 중…",
|
||||
"pinExpired": "로그인 전에 PIN이 만료되었습니다. 다시 시도하세요.",
|
||||
"duplicatePlexAccount": "이미 Plex에 로그인되어 있습니다. 계정을 전환하려면 로그아웃하세요.",
|
||||
"failedToRegisterAccount": "계정 등록 실패: ${error}",
|
||||
"enterJellyfinUrlError": "Jellyfin 서버 URL을 입력하세요",
|
||||
"addConnectionTitle": "연결 추가",
|
||||
"addConnectionTitleScoped": "${name}에 추가",
|
||||
"addConnectionIntroGlobal": "다른 미디어 서버를 추가합니다. Plex와 Jellyfin이 홈에 함께 표시됩니다.",
|
||||
"addConnectionIntroScoped": "새 서버를 추가하거나 다른 프로필에서 빌리세요.",
|
||||
"signInWithPlexCard": "Plex로 로그인",
|
||||
"signInWithPlexCardSubtitle": "이 기기를 승인합니다. 공유 서버가 추가됩니다.",
|
||||
"signInWithPlexCardSubtitleScoped": "Plex 계정을 승인합니다. Home 사용자는 프로필이 됩니다.",
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "eller",
|
||||
"connectToJellyfin": "Koble til Jellyfin",
|
||||
"useQuickConnect": "Bruk Quick Connect",
|
||||
"quickConnectCode": "Quick Connect-kode",
|
||||
"quickConnectInstructions": "Åpne Quick Connect i Jellyfin og skriv inn denne koden.",
|
||||
"quickConnectWaiting": "Venter på godkjenning…",
|
||||
"quickConnectCancel": "Avbryt",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "Vis hver sesongs plakat over fanen",
|
||||
"tvFullCardLayout": "Fulle TV-kort",
|
||||
"tvFullCardLayoutDescription": "Bruk bildebaserte TV-kort med skuespillernavn lagt over",
|
||||
"focusGlow": "Fokusglød",
|
||||
"focusGlowDescription": "Vis en myk glød rundt kortet i fokus",
|
||||
"hideSpoilers": "Skjul spoilere for usette episoder",
|
||||
"hideSpoilersDescription": "Slør miniatyrbilder og beskrivelser for usette episoder",
|
||||
"playerBackend": "Spillermotor",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "Posisjon",
|
||||
"assOverride": "ASS-overstyring",
|
||||
"bold": "Fet",
|
||||
"italic": "Kursiv"
|
||||
"italic": "Kursiv",
|
||||
"renderResolution": "Gjengivelsesoppløsning",
|
||||
"renderResolutionScreen": "Skjermoppløsning",
|
||||
"renderResolutionVideo": "Videooppløsning"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv.conf",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "Cache brukt",
|
||||
"cacheLimit": "Cachegrense",
|
||||
"speed": "Hastighet",
|
||||
"player": "Spiller",
|
||||
"memory": "Minne",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Legg til Jellyfin-server",
|
||||
"jellyfinUrlIntro": "Skriv inn server-URL-en, f.eks. `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "Skriv inn én eller flere server-URL-er, adskilt med kommaer. Plezy bruker den tilgjengelige URL-en med lavest forsinkelse.",
|
||||
"serverUrl": "Server-URL",
|
||||
"serverUrls": "Server-URL-er",
|
||||
"serverUrlsHelper": "Flere URL-er er tillatt, atskilt med komma.",
|
||||
"findServer": "Finn server",
|
||||
"searchingLocalServers": "Søker etter lokale Jellyfin-servere...",
|
||||
"localServers": "Lokale Jellyfin-servere",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "Pålogging mislyktes: ${error}",
|
||||
"quickConnectFailed": "Quick Connect mislyktes: ${error}",
|
||||
"addPlexTitle": "Logg på med Plex",
|
||||
"plexAuthIntro": "Logg inn med en nettleser eller QR-kode.",
|
||||
"plexQRPrompt": "Skann denne QR-koden for å logge på.",
|
||||
"waitingForPlexConfirmation": "Venter på at plex.tv bekrefter påloggingen…",
|
||||
"pinExpired": "PIN-koden gikk ut før pålogging. Prøv igjen.",
|
||||
"duplicatePlexAccount": "Allerede logget inn på Plex. Logg ut for å bytte konto.",
|
||||
"failedToRegisterAccount": "Kunne ikke registrere kontoen: ${error}",
|
||||
"enterJellyfinUrlError": "Oppgi URL-en til Jellyfin-serveren din",
|
||||
"addConnectionTitle": "Legg til tilkobling",
|
||||
"addConnectionTitleScoped": "Legg til i ${name}",
|
||||
"addConnectionIntroGlobal": "Legg til en annen medieserver. Plex og Jellyfin vises sammen på Hjem.",
|
||||
"addConnectionIntroScoped": "Legg til en ny server, eller lån en fra en annen profil.",
|
||||
"signInWithPlexCard": "Logg på med Plex",
|
||||
"signInWithPlexCardSubtitle": "Autoriser denne enheten. Delte servere legges til.",
|
||||
"signInWithPlexCardSubtitleScoped": "Autoriser en Plex-konto. Home-brukere blir profiler.",
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "of",
|
||||
"connectToJellyfin": "Verbinden met Jellyfin",
|
||||
"useQuickConnect": "Quick Connect gebruiken",
|
||||
"quickConnectCode": "Quick Connect-code",
|
||||
"quickConnectInstructions": "Open Quick Connect in Jellyfin en voer deze code in.",
|
||||
"quickConnectWaiting": "Wachten op goedkeuring…",
|
||||
"quickConnectCancel": "Annuleren",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "Toon de poster van elk seizoen boven het tabblad",
|
||||
"tvFullCardLayout": "Volledige tv-kaarten",
|
||||
"tvFullCardLayoutDescription": "Gebruik tv-kaarten met alleen afbeeldingen en namen van acteurs als overlay",
|
||||
"focusGlow": "Focusgloed",
|
||||
"focusGlowDescription": "Toon een zachte gloed rond de kaart met focus",
|
||||
"hideSpoilers": "Spoilers voor ongekeken afleveringen verbergen",
|
||||
"hideSpoilersDescription": "Vervaag miniaturen en beschrijvingen voor niet-bekeken afleveringen",
|
||||
"playerBackend": "Speler backend",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "Positie",
|
||||
"assOverride": "ASS-overschrijving",
|
||||
"bold": "Vet",
|
||||
"italic": "Cursief"
|
||||
"italic": "Cursief",
|
||||
"renderResolution": "Renderresolutie",
|
||||
"renderResolutionScreen": "Schermresolutie",
|
||||
"renderResolutionVideo": "Videoresolutie"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv-configuratie",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "Cache gebruikt",
|
||||
"cacheLimit": "Cachelimiet",
|
||||
"speed": "Snelheid",
|
||||
"player": "Speler",
|
||||
"memory": "Geheugen",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Jellyfin-server toevoegen",
|
||||
"jellyfinUrlIntro": "Voer de server-URL in, bijv. `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "Voer een of meer server-URL's in, gescheiden door komma's. Plezy gebruikt de bereikbare URL met de laagste latentie.",
|
||||
"serverUrl": "Server-URL",
|
||||
"serverUrls": "Server-URL's",
|
||||
"serverUrlsHelper": "Meerdere URL's toegestaan, gescheiden door komma's.",
|
||||
"findServer": "Server zoeken",
|
||||
"searchingLocalServers": "Lokale Jellyfin-servers zoeken...",
|
||||
"localServers": "Lokale Jellyfin-servers",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "Inloggen mislukt: ${error}",
|
||||
"quickConnectFailed": "Quick Connect mislukt: ${error}",
|
||||
"addPlexTitle": "Inloggen met Plex",
|
||||
"plexAuthIntro": "Meld je aan met een browser of QR-code.",
|
||||
"plexQRPrompt": "Scan deze QR-code om in te loggen.",
|
||||
"waitingForPlexConfirmation": "Wachten tot plex.tv je inloggen bevestigt…",
|
||||
"pinExpired": "PIN verlopen vóór inloggen. Probeer opnieuw.",
|
||||
"duplicatePlexAccount": "Al aangemeld bij Plex. Meld je af om van account te wisselen.",
|
||||
"failedToRegisterAccount": "Account registreren mislukt: ${error}",
|
||||
"enterJellyfinUrlError": "Voer de URL van je Jellyfin-server in",
|
||||
"addConnectionTitle": "Verbinding toevoegen",
|
||||
"addConnectionTitleScoped": "Toevoegen aan ${name}",
|
||||
"addConnectionIntroGlobal": "Voeg een andere mediaserver toe. Plex en Jellyfin verschijnen samen op Home.",
|
||||
"addConnectionIntroScoped": "Voeg een nieuwe server toe, of leen er een van een ander profiel.",
|
||||
"signInWithPlexCard": "Inloggen met Plex",
|
||||
"signInWithPlexCardSubtitle": "Autoriseer dit apparaat. Gedeelde servers worden toegevoegd.",
|
||||
"signInWithPlexCardSubtitleScoped": "Autoriseer een Plex-account. Home-gebruikers worden profielen.",
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "lub",
|
||||
"connectToJellyfin": "Połącz z Jellyfin",
|
||||
"useQuickConnect": "Użyj Quick Connect",
|
||||
"quickConnectCode": "Kod Quick Connect",
|
||||
"quickConnectInstructions": "Otwórz Quick Connect w Jellyfin i wpisz ten kod.",
|
||||
"quickConnectWaiting": "Oczekiwanie na zatwierdzenie…",
|
||||
"quickConnectCancel": "Anuluj",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "Pokazuj plakat każdego sezonu nad jego kartą",
|
||||
"tvFullCardLayout": "Pełne karty TV",
|
||||
"tvFullCardLayoutDescription": "Używaj kart TV tylko z obrazem i nałożonymi nazwiskami aktorów",
|
||||
"focusGlow": "Poświata zaznaczenia",
|
||||
"focusGlowDescription": "Wyświetlaj delikatną poświatę wokół zaznaczonej karty",
|
||||
"hideSpoilers": "Ukryj spoilery nieobejrzanych odcinków",
|
||||
"hideSpoilersDescription": "Rozmywaj miniatury i opisy nieobejrzanych odcinków",
|
||||
"playerBackend": "Backend odtwarzacza",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "Pozycja",
|
||||
"assOverride": "Nadpisywanie ASS",
|
||||
"bold": "Pogrubienie",
|
||||
"italic": "Kursywa"
|
||||
"italic": "Kursywa",
|
||||
"renderResolution": "Rozdzielczość renderowania",
|
||||
"renderResolutionScreen": "Rozdzielczość ekranu",
|
||||
"renderResolutionVideo": "Rozdzielczość wideo"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv.conf",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "Użyty cache",
|
||||
"cacheLimit": "Limit cache'u",
|
||||
"speed": "Szybkość",
|
||||
"player": "Odtwarzacz",
|
||||
"memory": "Pamięć",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Dodaj serwer Jellyfin",
|
||||
"jellyfinUrlIntro": "Wpisz URL serwera, np. `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "Wpisz co najmniej jeden URL serwera, oddzielając je przecinkami. Plezy użyje osiągalnego URL-a o najniższym opóźnieniu.",
|
||||
"serverUrl": "URL serwera",
|
||||
"serverUrls": "URL-e serwera",
|
||||
"serverUrlsHelper": "Można podać wiele adresów URL, rozdzielonych przecinkami.",
|
||||
"findServer": "Znajdź serwer",
|
||||
"searchingLocalServers": "Szukanie lokalnych serwerów Jellyfin...",
|
||||
"localServers": "Lokalne serwery Jellyfin",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "Logowanie nie powiodło się: ${error}",
|
||||
"quickConnectFailed": "Quick Connect nie powiodło się: ${error}",
|
||||
"addPlexTitle": "Zaloguj się przez Plex",
|
||||
"plexAuthIntro": "Zaloguj się przez przeglądarkę lub kod QR.",
|
||||
"plexQRPrompt": "Zeskanuj ten kod QR, aby się zalogować.",
|
||||
"waitingForPlexConfirmation": "Czekam na potwierdzenie logowania przez plex.tv…",
|
||||
"pinExpired": "PIN wygasł przed zalogowaniem. Spróbuj ponownie.",
|
||||
"duplicatePlexAccount": "Już zalogowano do Plex. Wyloguj się, aby zmienić konto.",
|
||||
"failedToRegisterAccount": "Nie udało się zarejestrować konta: ${error}",
|
||||
"enterJellyfinUrlError": "Podaj URL serwera Jellyfin",
|
||||
"addConnectionTitle": "Dodaj połączenie",
|
||||
"addConnectionTitleScoped": "Dodaj do ${name}",
|
||||
"addConnectionIntroGlobal": "Dodaj kolejny serwer multimediów. Plex i Jellyfin pojawią się razem na ekranie głównym.",
|
||||
"addConnectionIntroScoped": "Dodaj nowy serwer lub pożycz z innego profilu.",
|
||||
"signInWithPlexCard": "Zaloguj się przez Plex",
|
||||
"signInWithPlexCardSubtitle": "Autoryzuj to urządzenie. Serwery udostępnione zostaną dodane.",
|
||||
"signInWithPlexCardSubtitleScoped": "Autoryzuj konto Plex. Użytkownicy Home staną się profilami.",
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "ou",
|
||||
"connectToJellyfin": "Conectar ao Jellyfin",
|
||||
"useQuickConnect": "Usar Quick Connect",
|
||||
"quickConnectCode": "Código do Quick Connect",
|
||||
"quickConnectInstructions": "Abra o Quick Connect no Jellyfin e insira este código.",
|
||||
"quickConnectWaiting": "A aguardar aprovação…",
|
||||
"quickConnectCancel": "Cancelar",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "Mostrar o pôster de cada temporada acima da aba",
|
||||
"tvFullCardLayout": "Cartões TV completos",
|
||||
"tvFullCardLayoutDescription": "Usar cartões de TV só com imagem e nomes dos atores sobrepostos",
|
||||
"focusGlow": "Brilho de foco",
|
||||
"focusGlowDescription": "Mostrar um brilho suave à volta do cartão em foco",
|
||||
"hideSpoilers": "Ocultar Spoilers de Episódios Não Assistidos",
|
||||
"hideSpoilersDescription": "Desfocar miniaturas e descrições de episódios não vistos",
|
||||
"playerBackend": "Backend do Player",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "Posição",
|
||||
"assOverride": "Substituição ASS",
|
||||
"bold": "Negrito",
|
||||
"italic": "Itálico"
|
||||
"italic": "Itálico",
|
||||
"renderResolution": "Resolução de renderização",
|
||||
"renderResolutionScreen": "Resolução da tela",
|
||||
"renderResolutionVideo": "Resolução do vídeo"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv.conf",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "Cache usado",
|
||||
"cacheLimit": "Limite do cache",
|
||||
"speed": "Velocidade",
|
||||
"player": "Player",
|
||||
"memory": "Memória",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Adicionar servidor Jellyfin",
|
||||
"jellyfinUrlIntro": "Insira a URL do servidor, ex. `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "Insira uma ou mais URLs do servidor, separadas por vírgulas. O Plezy usará a URL acessível com a menor latência.",
|
||||
"serverUrl": "URL do servidor",
|
||||
"serverUrls": "URLs do servidor",
|
||||
"serverUrlsHelper": "Vários URLs permitidos, separados por vírgulas.",
|
||||
"findServer": "Encontrar servidor",
|
||||
"searchingLocalServers": "A procurar servidores Jellyfin locais...",
|
||||
"localServers": "Servidores Jellyfin locais",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "Falha ao entrar: ${error}",
|
||||
"quickConnectFailed": "Quick Connect falhou: ${error}",
|
||||
"addPlexTitle": "Entrar com Plex",
|
||||
"plexAuthIntro": "Entre com um navegador ou código QR.",
|
||||
"plexQRPrompt": "Escaneie este código QR para entrar.",
|
||||
"waitingForPlexConfirmation": "Aguardando o plex.tv confirmar o login…",
|
||||
"pinExpired": "O PIN expirou antes do login. Tente novamente.",
|
||||
"duplicatePlexAccount": "Você já entrou no Plex. Saia para trocar de conta.",
|
||||
"failedToRegisterAccount": "Falha ao registrar a conta: ${error}",
|
||||
"enterJellyfinUrlError": "Insira a URL do seu servidor Jellyfin",
|
||||
"addConnectionTitle": "Adicionar conexão",
|
||||
"addConnectionTitleScoped": "Adicionar a ${name}",
|
||||
"addConnectionIntroGlobal": "Adicione outro servidor de mídia. Plex e Jellyfin aparecem juntos no Início.",
|
||||
"addConnectionIntroScoped": "Adicione um novo servidor ou pegue um emprestado de outro perfil.",
|
||||
"signInWithPlexCard": "Entrar com Plex",
|
||||
"signInWithPlexCardSubtitle": "Autorize este dispositivo. Servidores compartilhados são adicionados.",
|
||||
"signInWithPlexCardSubtitleScoped": "Autorize uma conta Plex. Usuários Home viram perfis.",
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "или",
|
||||
"connectToJellyfin": "Подключиться к Jellyfin",
|
||||
"useQuickConnect": "Использовать Quick Connect",
|
||||
"quickConnectCode": "Код Quick Connect",
|
||||
"quickConnectInstructions": "Откройте Quick Connect в Jellyfin и введите этот код.",
|
||||
"quickConnectWaiting": "Ожидание подтверждения…",
|
||||
"quickConnectCancel": "Отмена",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "Показывать постер каждого сезона над его вкладкой",
|
||||
"tvFullCardLayout": "Полные TV-карточки",
|
||||
"tvFullCardLayoutDescription": "Использовать TV-карточки только с изображением и именами актёров поверх него",
|
||||
"focusGlow": "Свечение при фокусе",
|
||||
"focusGlowDescription": "Показывать мягкое свечение вокруг карточки в фокусе",
|
||||
"hideSpoilers": "Скрыть спойлеры непросмотренных эпизодов",
|
||||
"hideSpoilersDescription": "Размывать миниатюры и описания непросмотренных серий",
|
||||
"playerBackend": "Бэкенд плеера",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "Позиция",
|
||||
"assOverride": "Переопределение ASS",
|
||||
"bold": "Жирный",
|
||||
"italic": "Курсив"
|
||||
"italic": "Курсив",
|
||||
"renderResolution": "Разрешение отрисовки",
|
||||
"renderResolutionScreen": "Разрешение экрана",
|
||||
"renderResolutionVideo": "Разрешение видео"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv.conf",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "Кэш использован",
|
||||
"cacheLimit": "Лимит кэша",
|
||||
"speed": "Скорость",
|
||||
"player": "Плеер",
|
||||
"memory": "Память",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Добавить сервер Jellyfin",
|
||||
"jellyfinUrlIntro": "Введите URL сервера, например `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "Введите один или несколько URL сервера, разделяя их запятыми. Plezy будет использовать доступный URL с минимальной задержкой.",
|
||||
"serverUrl": "URL сервера",
|
||||
"serverUrls": "URL сервера",
|
||||
"serverUrlsHelper": "Можно указать несколько URL через запятую.",
|
||||
"findServer": "Найти сервер",
|
||||
"searchingLocalServers": "Поиск локальных серверов Jellyfin...",
|
||||
"localServers": "Локальные серверы Jellyfin",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "Не удалось войти: ${error}",
|
||||
"quickConnectFailed": "Quick Connect не удался: ${error}",
|
||||
"addPlexTitle": "Войти через Plex",
|
||||
"plexAuthIntro": "Войдите через браузер или QR-код.",
|
||||
"plexQRPrompt": "Отсканируйте этот QR-код, чтобы войти.",
|
||||
"waitingForPlexConfirmation": "Ожидание подтверждения от plex.tv…",
|
||||
"pinExpired": "Срок действия PIN истёк до входа. Попробуйте снова.",
|
||||
"duplicatePlexAccount": "В Plex уже выполнен вход. Выйдите, чтобы сменить аккаунт.",
|
||||
"failedToRegisterAccount": "Не удалось зарегистрировать учётную запись: ${error}",
|
||||
"enterJellyfinUrlError": "Введите URL вашего сервера Jellyfin",
|
||||
"addConnectionTitle": "Добавить подключение",
|
||||
"addConnectionTitleScoped": "Добавить в ${name}",
|
||||
"addConnectionIntroGlobal": "Добавьте еще один медиасервер. Plex и Jellyfin появятся вместе на главной.",
|
||||
"addConnectionIntroScoped": "Добавьте новый сервер или одолжите из другого профиля.",
|
||||
"signInWithPlexCard": "Войти через Plex",
|
||||
"signInWithPlexCardSubtitle": "Авторизуйте это устройство. Общие серверы будут добавлены.",
|
||||
"signInWithPlexCardSubtitleScoped": "Авторизуйте аккаунт Plex. Пользователи Home станут профилями.",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/// To regenerate, run: `dart run slang`
|
||||
///
|
||||
/// Locales: 16
|
||||
/// Strings: 20384 (1274 per locale)
|
||||
/// Strings: 20361 (1272 per locale)
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint, unused_import
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthBg extends TranslationsAuthEn {
|
||||
@override String get or => 'или';
|
||||
@override String get connectToJellyfin => 'Свързване с Jellyfin';
|
||||
@override String get useQuickConnect => 'Използвай Quick Connect';
|
||||
@override String get quickConnectCode => 'Quick Connect код';
|
||||
@override String get quickConnectInstructions => 'Отворете Quick Connect в Jellyfin и въведете този код.';
|
||||
@override String get quickConnectWaiting => 'Изчакване на одобрение…';
|
||||
@override String get quickConnectCancel => 'Отказ';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsBg extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => 'Показвай постера на всеки сезон над неговия таб';
|
||||
@override String get tvFullCardLayout => 'Пълни TV карти';
|
||||
@override String get tvFullCardLayoutDescription => 'Използвай TV карти само с изображения, с насложени имена на актьорите';
|
||||
@override String get focusGlow => 'Сияние при фокус';
|
||||
@override String get focusGlowDescription => 'Показвай меко сияние около фокусираната карта';
|
||||
@override String get hideSpoilers => 'Скривай спойлери за негледани епизоди';
|
||||
@override String get hideSpoilersDescription => 'Замазвай миниатюри и описания за негледани епизоди';
|
||||
@override String get playerBackend => 'Енджин на плеъра';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingBg extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'ASS презаписване';
|
||||
@override String get bold => 'Получер';
|
||||
@override String get italic => 'Курсив';
|
||||
@override String get renderResolution => 'Резолюция на изобразяване';
|
||||
@override String get renderResolutionScreen => 'Резолюция на екрана';
|
||||
@override String get renderResolutionVideo => 'Резолюция на видеото';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayBg extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => 'Използван кеш';
|
||||
@override String get cacheLimit => 'Лимит на кеша';
|
||||
@override String get speed => 'Скорост';
|
||||
@override String get player => 'Плеър';
|
||||
@override String get memory => 'Памет';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerBg extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Добави Jellyfin сървър';
|
||||
@override String get jellyfinUrlIntro => 'Въведете URL адреса на сървъра, напр. `https://jellyfin.example.com`.';
|
||||
@override String get jellyfinUrlsIntro => 'Въведете един или повече URL адреси на сървъра, разделени със запетаи. Plezy ще използва достъпния URL адрес с най-ниска латентност.';
|
||||
@override String get serverUrl => 'URL адрес на сървъра';
|
||||
@override String get serverUrls => 'URL адреси на сървъра';
|
||||
@override String get serverUrlsHelper => 'Позволени са няколко URL адреса, разделени със запетаи.';
|
||||
@override String get findServer => 'Намери сървър';
|
||||
@override String get searchingLocalServers => 'Търсене на локални Jellyfin сървъри...';
|
||||
@override String get localServers => 'Локални Jellyfin сървъри';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerBg extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => 'Входът е неуспешен: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connect е неуспешен: ${error}';
|
||||
@override String get addPlexTitle => 'Вход с Plex';
|
||||
@override String get plexAuthIntro => 'Влезте с браузър или QR код.';
|
||||
@override String get plexQRPrompt => 'Сканирайте този QR код, за да влезете.';
|
||||
@override String get waitingForPlexConfirmation => 'Изчакване plex.tv да потвърди вашия вход…';
|
||||
@override String get pinExpired => 'PIN-ът изтече преди вход. Моля, опитайте отново.';
|
||||
@override String get duplicatePlexAccount => 'Вече сте влезли в Plex. Излезте, за да смените акаунта.';
|
||||
@override String failedToRegisterAccount({required Object error}) => 'Неуспешна регистрация на акаунт: ${error}';
|
||||
@override String get enterJellyfinUrlError => 'Въведете URL адреса на вашия Jellyfin сървър';
|
||||
@override String get addConnectionTitle => 'Добави връзка';
|
||||
@override String addConnectionTitleScoped({required Object name}) => 'Добави към ${name}';
|
||||
@override String get addConnectionIntroGlobal => 'Добавете друг медиен сървър. Plex и Jellyfin се показват заедно на началния екран.';
|
||||
@override String get addConnectionIntroScoped => 'Добавете нов сървър или използвайте такъв от друг профил.';
|
||||
@override String get signInWithPlexCard => 'Вход с Plex';
|
||||
@override String get signInWithPlexCardSubtitle => 'Удостоверете това устройство. Споделените сървъри се добавят.';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Удостоверете Plex акаунт. Домашните потребители стават профили.';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsBg {
|
||||
'auth.or' => 'или',
|
||||
'auth.connectToJellyfin' => 'Свързване с Jellyfin',
|
||||
'auth.useQuickConnect' => 'Използвай Quick Connect',
|
||||
'auth.quickConnectCode' => 'Quick Connect код',
|
||||
'auth.quickConnectInstructions' => 'Отворете Quick Connect в Jellyfin и въведете този код.',
|
||||
'auth.quickConnectWaiting' => 'Изчакване на одобрение…',
|
||||
'auth.quickConnectCancel' => 'Отказ',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsBg {
|
||||
'settings.showSeasonPostersOnTabsDescription' => 'Показвай постера на всеки сезон над неговия таб',
|
||||
'settings.tvFullCardLayout' => 'Пълни TV карти',
|
||||
'settings.tvFullCardLayoutDescription' => 'Използвай TV карти само с изображения, с насложени имена на актьорите',
|
||||
'settings.focusGlow' => 'Сияние при фокус',
|
||||
'settings.focusGlowDescription' => 'Показвай меко сияние около фокусираната карта',
|
||||
'settings.hideSpoilers' => 'Скривай спойлери за негледани епизоди',
|
||||
'settings.hideSpoilersDescription' => 'Замазвай миниатюри и описания за негледани епизоди',
|
||||
'settings.playerBackend' => 'Енджин на плеъра',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsBg {
|
||||
'subtitlingStyling.text' => 'Текст',
|
||||
'subtitlingStyling.border' => 'Рамка',
|
||||
'subtitlingStyling.background' => 'Фон',
|
||||
'subtitlingStyling.fontSize' => 'Размер на шрифта',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => 'Размер на шрифта',
|
||||
'subtitlingStyling.textColor' => 'Цвят на текста',
|
||||
'subtitlingStyling.borderSize' => 'Размер на рамката',
|
||||
'subtitlingStyling.borderColor' => 'Цвят на рамката',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsBg {
|
||||
'subtitlingStyling.assOverride' => 'ASS презаписване',
|
||||
'subtitlingStyling.bold' => 'Получер',
|
||||
'subtitlingStyling.italic' => 'Курсив',
|
||||
'subtitlingStyling.renderResolution' => 'Резолюция на изобразяване',
|
||||
'subtitlingStyling.renderResolutionScreen' => 'Резолюция на екрана',
|
||||
'subtitlingStyling.renderResolutionVideo' => 'Резолюция на видеото',
|
||||
'mpvConfig.title' => 'mpv.conf',
|
||||
'mpvConfig.description' => 'Разширени настройки на видео плейъра',
|
||||
'mpvConfig.presets' => 'Пресети',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsBg {
|
||||
'companionRemote.remote.retryNow' => 'Опитай сега',
|
||||
'companionRemote.remote.tabRemote' => 'Дистанционно',
|
||||
'companionRemote.remote.tabPlay' => 'Пускане',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => 'Още',
|
||||
'companionRemote.remote.menu' => 'Меню',
|
||||
'companionRemote.remote.tabNavigation' => 'Навигация с Tab',
|
||||
'companionRemote.remote.tabDiscover' => 'Открий',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'Библиотеки',
|
||||
'companionRemote.remote.tabSearch' => 'Търсене',
|
||||
'companionRemote.remote.tabDownloads' => 'Изтегляния',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsBg {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => 'Използван кеш',
|
||||
'performanceOverlay.cacheLimit' => 'Лимит на кеша',
|
||||
'performanceOverlay.speed' => 'Скорост',
|
||||
'performanceOverlay.player' => 'Плеър',
|
||||
'performanceOverlay.memory' => 'Памет',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsBg {
|
||||
'trackers.libraryFilter.libraries' => 'Библиотеки',
|
||||
'trackers.libraryFilter.noLibraries' => 'Няма налични библиотеки',
|
||||
'addServer.addJellyfinTitle' => 'Добави Jellyfin сървър',
|
||||
'addServer.jellyfinUrlIntro' => 'Въведете URL адреса на сървъра, напр. `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => 'Въведете един или повече URL адреси на сървъра, разделени със запетаи. Plezy ще използва достъпния URL адрес с най-ниска латентност.',
|
||||
'addServer.serverUrl' => 'URL адрес на сървъра',
|
||||
'addServer.serverUrls' => 'URL адреси на сървъра',
|
||||
'addServer.serverUrlsHelper' => 'Позволени са няколко URL адреса, разделени със запетаи.',
|
||||
'addServer.findServer' => 'Намери сървър',
|
||||
'addServer.searchingLocalServers' => 'Търсене на локални Jellyfin сървъри...',
|
||||
'addServer.localServers' => 'Локални Jellyfin сървъри',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsBg {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'Входът е неуспешен: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect е неуспешен: ${error}',
|
||||
'addServer.addPlexTitle' => 'Вход с Plex',
|
||||
'addServer.plexAuthIntro' => 'Влезте с браузър или QR код.',
|
||||
'addServer.plexQRPrompt' => 'Сканирайте този QR код, за да влезете.',
|
||||
'addServer.waitingForPlexConfirmation' => 'Изчакване plex.tv да потвърди вашия вход…',
|
||||
'addServer.pinExpired' => 'PIN-ът изтече преди вход. Моля, опитайте отново.',
|
||||
'addServer.duplicatePlexAccount' => 'Вече сте влезли в Plex. Излезте, за да смените акаунта.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'Неуспешна регистрация на акаунт: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Въведете URL адреса на вашия Jellyfin сървър',
|
||||
'addServer.addConnectionTitle' => 'Добави връзка',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => 'Добави към ${name}',
|
||||
'addServer.addConnectionIntroGlobal' => 'Добавете друг медиен сървър. Plex и Jellyfin се показват заедно на началния екран.',
|
||||
'addServer.addConnectionIntroScoped' => 'Добавете нов сървър или използвайте такъв от друг профил.',
|
||||
'addServer.signInWithPlexCard' => 'Вход с Plex',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'Удостоверете това устройство. Споделените сървъри се добавят.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Удостоверете Plex акаунт. Домашните потребители стават профили.',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthDa extends TranslationsAuthEn {
|
||||
@override String get or => 'eller';
|
||||
@override String get connectToJellyfin => 'Forbind til Jellyfin';
|
||||
@override String get useQuickConnect => 'Brug Quick Connect';
|
||||
@override String get quickConnectCode => 'Quick Connect-kode';
|
||||
@override String get quickConnectInstructions => 'Åbn Quick Connect i Jellyfin, og indtast denne kode.';
|
||||
@override String get quickConnectWaiting => 'Venter på godkendelse…';
|
||||
@override String get quickConnectCancel => 'Annullér';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsDa extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => 'Vis hver sæsons plakat over dens fane';
|
||||
@override String get tvFullCardLayout => 'Fuldflade TV-kort';
|
||||
@override String get tvFullCardLayoutDescription => 'Brug TV-kort kun med billeder og skuespillernavne ovenpå';
|
||||
@override String get focusGlow => 'Fokusglød';
|
||||
@override String get focusGlowDescription => 'Vis en blød glød omkring det fokuserede kort';
|
||||
@override String get hideSpoilers => 'Skjul spoilere for usete episoder';
|
||||
@override String get hideSpoilersDescription => 'Slør miniaturebilleder og beskrivelser for usete episoder';
|
||||
@override String get playerBackend => 'Afspillerbackend';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingDa extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'ASS-tilsidesættelse';
|
||||
@override String get bold => 'Fed';
|
||||
@override String get italic => 'Kursiv';
|
||||
@override String get renderResolution => 'Gengivelsesopløsning';
|
||||
@override String get renderResolutionScreen => 'Skærmopløsning';
|
||||
@override String get renderResolutionVideo => 'Videoopløsning';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayDa extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => 'Brugt cache';
|
||||
@override String get cacheLimit => 'Cachegrænse';
|
||||
@override String get speed => 'Hastighed';
|
||||
@override String get player => 'Afspiller';
|
||||
@override String get memory => 'Hukommelse';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerDa extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Tilføj Jellyfin-server';
|
||||
@override String get jellyfinUrlIntro => 'Indtast server-URL\'en, f.eks. `https://jellyfin.example.com`.';
|
||||
@override String get jellyfinUrlsIntro => 'Indtast en eller flere server-URL\'er, adskilt med kommaer. Plezy bruger den tilgængelige URL med lavest latenstid.';
|
||||
@override String get serverUrl => 'Server-URL';
|
||||
@override String get serverUrls => 'Server-URL\'er';
|
||||
@override String get serverUrlsHelper => 'Flere URL\'er er tilladt, adskilt med kommaer.';
|
||||
@override String get findServer => 'Find server';
|
||||
@override String get searchingLocalServers => 'Søger efter lokale Jellyfin-servere...';
|
||||
@override String get localServers => 'Lokale Jellyfin-servere';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerDa extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => 'Login mislykkedes: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connect mislykkedes: ${error}';
|
||||
@override String get addPlexTitle => 'Log ind med Plex';
|
||||
@override String get plexAuthIntro => 'Log ind med en browser eller QR-kode.';
|
||||
@override String get plexQRPrompt => 'Scan denne QR-kode for at logge ind.';
|
||||
@override String get waitingForPlexConfirmation => 'Venter på at plex.tv bekræfter login…';
|
||||
@override String get pinExpired => 'PIN udløb før login. Prøv igen.';
|
||||
@override String get duplicatePlexAccount => 'Allerede logget ind på Plex. Log ud for at skifte konto.';
|
||||
@override String failedToRegisterAccount({required Object error}) => 'Kunne ikke registrere kontoen: ${error}';
|
||||
@override String get enterJellyfinUrlError => 'Angiv URL\'en til din Jellyfin-server';
|
||||
@override String get addConnectionTitle => 'Tilføj forbindelse';
|
||||
@override String addConnectionTitleScoped({required Object name}) => 'Tilføj til ${name}';
|
||||
@override String get addConnectionIntroGlobal => 'Tilføj en anden medieserver. Plex og Jellyfin vises sammen på Hjem.';
|
||||
@override String get addConnectionIntroScoped => 'Tilføj en ny server, eller lån en fra en anden profil.';
|
||||
@override String get signInWithPlexCard => 'Log ind med Plex';
|
||||
@override String get signInWithPlexCardSubtitle => 'Godkend denne enhed. Delte servere tilføjes.';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Godkend en Plex-konto. Home-brugere bliver profiler.';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsDa {
|
||||
'auth.or' => 'eller',
|
||||
'auth.connectToJellyfin' => 'Forbind til Jellyfin',
|
||||
'auth.useQuickConnect' => 'Brug Quick Connect',
|
||||
'auth.quickConnectCode' => 'Quick Connect-kode',
|
||||
'auth.quickConnectInstructions' => 'Åbn Quick Connect i Jellyfin, og indtast denne kode.',
|
||||
'auth.quickConnectWaiting' => 'Venter på godkendelse…',
|
||||
'auth.quickConnectCancel' => 'Annullér',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsDa {
|
||||
'settings.showSeasonPostersOnTabsDescription' => 'Vis hver sæsons plakat over dens fane',
|
||||
'settings.tvFullCardLayout' => 'Fuldflade TV-kort',
|
||||
'settings.tvFullCardLayoutDescription' => 'Brug TV-kort kun med billeder og skuespillernavne ovenpå',
|
||||
'settings.focusGlow' => 'Fokusglød',
|
||||
'settings.focusGlowDescription' => 'Vis en blød glød omkring det fokuserede kort',
|
||||
'settings.hideSpoilers' => 'Skjul spoilere for usete episoder',
|
||||
'settings.hideSpoilersDescription' => 'Slør miniaturebilleder og beskrivelser for usete episoder',
|
||||
'settings.playerBackend' => 'Afspillerbackend',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsDa {
|
||||
'subtitlingStyling.text' => 'Tekst',
|
||||
'subtitlingStyling.border' => 'Kant',
|
||||
'subtitlingStyling.background' => 'Baggrund',
|
||||
'subtitlingStyling.fontSize' => 'Skriftstørrelse',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => 'Skriftstørrelse',
|
||||
'subtitlingStyling.textColor' => 'Tekstfarve',
|
||||
'subtitlingStyling.borderSize' => 'Kantstørrelse',
|
||||
'subtitlingStyling.borderColor' => 'Kantfarve',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsDa {
|
||||
'subtitlingStyling.assOverride' => 'ASS-tilsidesættelse',
|
||||
'subtitlingStyling.bold' => 'Fed',
|
||||
'subtitlingStyling.italic' => 'Kursiv',
|
||||
'subtitlingStyling.renderResolution' => 'Gengivelsesopløsning',
|
||||
'subtitlingStyling.renderResolutionScreen' => 'Skærmopløsning',
|
||||
'subtitlingStyling.renderResolutionVideo' => 'Videoopløsning',
|
||||
'mpvConfig.title' => 'mpv.conf',
|
||||
'mpvConfig.description' => 'Avancerede videoafspillerindstillinger',
|
||||
'mpvConfig.presets' => 'Forudindstillinger',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsDa {
|
||||
'companionRemote.remote.retryNow' => 'Prøv igen nu',
|
||||
'companionRemote.remote.tabRemote' => 'Fjernbetjening',
|
||||
'companionRemote.remote.tabPlay' => 'Afspil',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => 'Mere',
|
||||
'companionRemote.remote.menu' => 'Menu',
|
||||
'companionRemote.remote.tabNavigation' => 'Fanenavigation',
|
||||
'companionRemote.remote.tabDiscover' => 'Opdag',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'Biblioteker',
|
||||
'companionRemote.remote.tabSearch' => 'Søg',
|
||||
'companionRemote.remote.tabDownloads' => 'Downloads',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsDa {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => 'Brugt cache',
|
||||
'performanceOverlay.cacheLimit' => 'Cachegrænse',
|
||||
'performanceOverlay.speed' => 'Hastighed',
|
||||
'performanceOverlay.player' => 'Afspiller',
|
||||
'performanceOverlay.memory' => 'Hukommelse',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsDa {
|
||||
'trackers.libraryFilter.libraries' => 'Biblioteker',
|
||||
'trackers.libraryFilter.noLibraries' => 'Ingen biblioteker tilgængelige',
|
||||
'addServer.addJellyfinTitle' => 'Tilføj Jellyfin-server',
|
||||
'addServer.jellyfinUrlIntro' => 'Indtast server-URL\'en, f.eks. `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => 'Indtast en eller flere server-URL\'er, adskilt med kommaer. Plezy bruger den tilgængelige URL med lavest latenstid.',
|
||||
'addServer.serverUrl' => 'Server-URL',
|
||||
'addServer.serverUrls' => 'Server-URL\'er',
|
||||
'addServer.serverUrlsHelper' => 'Flere URL\'er er tilladt, adskilt med kommaer.',
|
||||
'addServer.findServer' => 'Find server',
|
||||
'addServer.searchingLocalServers' => 'Søger efter lokale Jellyfin-servere...',
|
||||
'addServer.localServers' => 'Lokale Jellyfin-servere',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsDa {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'Login mislykkedes: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect mislykkedes: ${error}',
|
||||
'addServer.addPlexTitle' => 'Log ind med Plex',
|
||||
'addServer.plexAuthIntro' => 'Log ind med en browser eller QR-kode.',
|
||||
'addServer.plexQRPrompt' => 'Scan denne QR-kode for at logge ind.',
|
||||
'addServer.waitingForPlexConfirmation' => 'Venter på at plex.tv bekræfter login…',
|
||||
'addServer.pinExpired' => 'PIN udløb før login. Prøv igen.',
|
||||
'addServer.duplicatePlexAccount' => 'Allerede logget ind på Plex. Log ud for at skifte konto.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'Kunne ikke registrere kontoen: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Angiv URL\'en til din Jellyfin-server',
|
||||
'addServer.addConnectionTitle' => 'Tilføj forbindelse',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => 'Tilføj til ${name}',
|
||||
'addServer.addConnectionIntroGlobal' => 'Tilføj en anden medieserver. Plex og Jellyfin vises sammen på Hjem.',
|
||||
'addServer.addConnectionIntroScoped' => 'Tilføj en ny server, eller lån en fra en anden profil.',
|
||||
'addServer.signInWithPlexCard' => 'Log ind med Plex',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'Godkend denne enhed. Delte servere tilføjes.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Godkend en Plex-konto. Home-brugere bliver profiler.',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthDe extends TranslationsAuthEn {
|
||||
@override String get or => 'oder';
|
||||
@override String get connectToJellyfin => 'Mit Jellyfin verbinden';
|
||||
@override String get useQuickConnect => 'Quick Connect verwenden';
|
||||
@override String get quickConnectCode => 'Quick Connect-Code';
|
||||
@override String get quickConnectInstructions => 'Öffne Quick Connect in Jellyfin und gib diesen Code ein.';
|
||||
@override String get quickConnectWaiting => 'Warte auf Bestätigung…';
|
||||
@override String get quickConnectCancel => 'Abbrechen';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsDe extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => 'Poster jeder Staffel über ihrem Tab anzeigen';
|
||||
@override String get tvFullCardLayout => 'Vollflächige TV-Karten';
|
||||
@override String get tvFullCardLayoutDescription => 'TV-Karten nur mit Bild verwenden und Darstellernamen einblenden';
|
||||
@override String get focusGlow => 'Fokus-Leuchten';
|
||||
@override String get focusGlowDescription => 'Sanftes Leuchten um die fokussierte Karte anzeigen';
|
||||
@override String get hideSpoilers => 'Spoiler für nicht gesehene Episoden verbergen';
|
||||
@override String get hideSpoilersDescription => 'Vorschaubilder und Beschreibungen ungesehener Episoden verwischen';
|
||||
@override String get playerBackend => 'Player-Backend';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingDe extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'ASS-Überschreibung';
|
||||
@override String get bold => 'Fett';
|
||||
@override String get italic => 'Kursiv';
|
||||
@override String get renderResolution => 'Render-Auflösung';
|
||||
@override String get renderResolutionScreen => 'Bildschirmauflösung';
|
||||
@override String get renderResolutionVideo => 'Videoauflösung';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayDe extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => 'Cache genutzt';
|
||||
@override String get cacheLimit => 'Cache-Limit';
|
||||
@override String get speed => 'Geschwindigkeit';
|
||||
@override String get player => 'Player';
|
||||
@override String get memory => 'Speicher';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerDe extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Jellyfin-Server hinzufügen';
|
||||
@override String get jellyfinUrlIntro => 'Gib die Server-URL ein, z. B. `https://jellyfin.example.com`.';
|
||||
@override String get jellyfinUrlsIntro => 'Gib eine oder mehrere Server-URLs ein, getrennt durch Kommas. Plezy verwendet die erreichbare URL mit der geringsten Latenz.';
|
||||
@override String get serverUrl => 'Server-URL';
|
||||
@override String get serverUrls => 'Server-URLs';
|
||||
@override String get serverUrlsHelper => 'Mehrere URLs möglich, durch Kommas getrennt.';
|
||||
@override String get findServer => 'Server finden';
|
||||
@override String get searchingLocalServers => 'Suche nach lokalen Jellyfin-Servern...';
|
||||
@override String get localServers => 'Lokale Jellyfin-Server';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerDe extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => 'Anmeldung fehlgeschlagen: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connect fehlgeschlagen: ${error}';
|
||||
@override String get addPlexTitle => 'Mit Plex anmelden';
|
||||
@override String get plexAuthIntro => 'Melde dich mit Browser oder QR-Code an.';
|
||||
@override String get plexQRPrompt => 'Scanne diesen QR-Code zum Anmelden.';
|
||||
@override String get waitingForPlexConfirmation => 'Warte auf Bestätigung durch plex.tv…';
|
||||
@override String get pinExpired => 'PIN ist vor der Anmeldung abgelaufen. Bitte erneut versuchen.';
|
||||
@override String get duplicatePlexAccount => 'Bereits bei Plex angemeldet. Melde dich ab, um Konten zu wechseln.';
|
||||
@override String failedToRegisterAccount({required Object error}) => 'Konto konnte nicht registriert werden: ${error}';
|
||||
@override String get enterJellyfinUrlError => 'Gib die URL deines Jellyfin-Servers ein';
|
||||
@override String get addConnectionTitle => 'Verbindung hinzufügen';
|
||||
@override String addConnectionTitleScoped({required Object name}) => 'Zu ${name} hinzufügen';
|
||||
@override String get addConnectionIntroGlobal => 'Füge einen weiteren Medienserver hinzu. Plex und Jellyfin erscheinen zusammen auf der Startseite.';
|
||||
@override String get addConnectionIntroScoped => 'Füge einen neuen Server hinzu oder leihe einen von einem anderen Profil aus.';
|
||||
@override String get signInWithPlexCard => 'Mit Plex anmelden';
|
||||
@override String get signInWithPlexCardSubtitle => 'Dieses Gerät autorisieren. Geteilte Server werden hinzugefügt.';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Ein Plex-Konto autorisieren. Home-Benutzer werden zu Profilen.';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsDe {
|
||||
'auth.or' => 'oder',
|
||||
'auth.connectToJellyfin' => 'Mit Jellyfin verbinden',
|
||||
'auth.useQuickConnect' => 'Quick Connect verwenden',
|
||||
'auth.quickConnectCode' => 'Quick Connect-Code',
|
||||
'auth.quickConnectInstructions' => 'Öffne Quick Connect in Jellyfin und gib diesen Code ein.',
|
||||
'auth.quickConnectWaiting' => 'Warte auf Bestätigung…',
|
||||
'auth.quickConnectCancel' => 'Abbrechen',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsDe {
|
||||
'settings.showSeasonPostersOnTabsDescription' => 'Poster jeder Staffel über ihrem Tab anzeigen',
|
||||
'settings.tvFullCardLayout' => 'Vollflächige TV-Karten',
|
||||
'settings.tvFullCardLayoutDescription' => 'TV-Karten nur mit Bild verwenden und Darstellernamen einblenden',
|
||||
'settings.focusGlow' => 'Fokus-Leuchten',
|
||||
'settings.focusGlowDescription' => 'Sanftes Leuchten um die fokussierte Karte anzeigen',
|
||||
'settings.hideSpoilers' => 'Spoiler für nicht gesehene Episoden verbergen',
|
||||
'settings.hideSpoilersDescription' => 'Vorschaubilder und Beschreibungen ungesehener Episoden verwischen',
|
||||
'settings.playerBackend' => 'Player-Backend',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsDe {
|
||||
'subtitlingStyling.text' => 'Text',
|
||||
'subtitlingStyling.border' => 'Rahmen',
|
||||
'subtitlingStyling.background' => 'Hintergrund',
|
||||
'subtitlingStyling.fontSize' => 'Schriftgröße',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => 'Schriftgröße',
|
||||
'subtitlingStyling.textColor' => 'Textfarbe',
|
||||
'subtitlingStyling.borderSize' => 'Rahmengröße',
|
||||
'subtitlingStyling.borderColor' => 'Rahmenfarbe',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsDe {
|
||||
'subtitlingStyling.assOverride' => 'ASS-Überschreibung',
|
||||
'subtitlingStyling.bold' => 'Fett',
|
||||
'subtitlingStyling.italic' => 'Kursiv',
|
||||
'subtitlingStyling.renderResolution' => 'Render-Auflösung',
|
||||
'subtitlingStyling.renderResolutionScreen' => 'Bildschirmauflösung',
|
||||
'subtitlingStyling.renderResolutionVideo' => 'Videoauflösung',
|
||||
'mpvConfig.title' => 'mpv-Konfiguration',
|
||||
'mpvConfig.description' => 'Erweiterte Videoplayer-Einstellungen',
|
||||
'mpvConfig.presets' => 'Voreinstellungen',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsDe {
|
||||
'companionRemote.remote.retryNow' => 'Jetzt wiederholen',
|
||||
'companionRemote.remote.tabRemote' => 'Fernbedienung',
|
||||
'companionRemote.remote.tabPlay' => 'Wiedergabe',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => 'Mehr',
|
||||
'companionRemote.remote.menu' => 'Menü',
|
||||
'companionRemote.remote.tabNavigation' => 'Tab-Navigation',
|
||||
'companionRemote.remote.tabDiscover' => 'Entdecken',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'Mediatheken',
|
||||
'companionRemote.remote.tabSearch' => 'Suche',
|
||||
'companionRemote.remote.tabDownloads' => 'Downloads',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsDe {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => 'Cache genutzt',
|
||||
'performanceOverlay.cacheLimit' => 'Cache-Limit',
|
||||
'performanceOverlay.speed' => 'Geschwindigkeit',
|
||||
'performanceOverlay.player' => 'Player',
|
||||
'performanceOverlay.memory' => 'Speicher',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsDe {
|
||||
'trackers.libraryFilter.libraries' => 'Bibliotheken',
|
||||
'trackers.libraryFilter.noLibraries' => 'Keine Bibliotheken verfügbar',
|
||||
'addServer.addJellyfinTitle' => 'Jellyfin-Server hinzufügen',
|
||||
'addServer.jellyfinUrlIntro' => 'Gib die Server-URL ein, z. B. `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => 'Gib eine oder mehrere Server-URLs ein, getrennt durch Kommas. Plezy verwendet die erreichbare URL mit der geringsten Latenz.',
|
||||
'addServer.serverUrl' => 'Server-URL',
|
||||
'addServer.serverUrls' => 'Server-URLs',
|
||||
'addServer.serverUrlsHelper' => 'Mehrere URLs möglich, durch Kommas getrennt.',
|
||||
'addServer.findServer' => 'Server finden',
|
||||
'addServer.searchingLocalServers' => 'Suche nach lokalen Jellyfin-Servern...',
|
||||
'addServer.localServers' => 'Lokale Jellyfin-Server',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsDe {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'Anmeldung fehlgeschlagen: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect fehlgeschlagen: ${error}',
|
||||
'addServer.addPlexTitle' => 'Mit Plex anmelden',
|
||||
'addServer.plexAuthIntro' => 'Melde dich mit Browser oder QR-Code an.',
|
||||
'addServer.plexQRPrompt' => 'Scanne diesen QR-Code zum Anmelden.',
|
||||
'addServer.waitingForPlexConfirmation' => 'Warte auf Bestätigung durch plex.tv…',
|
||||
'addServer.pinExpired' => 'PIN ist vor der Anmeldung abgelaufen. Bitte erneut versuchen.',
|
||||
'addServer.duplicatePlexAccount' => 'Bereits bei Plex angemeldet. Melde dich ab, um Konten zu wechseln.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'Konto konnte nicht registriert werden: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Gib die URL deines Jellyfin-Servers ein',
|
||||
'addServer.addConnectionTitle' => 'Verbindung hinzufügen',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => 'Zu ${name} hinzufügen',
|
||||
'addServer.addConnectionIntroGlobal' => 'Füge einen weiteren Medienserver hinzu. Plex und Jellyfin erscheinen zusammen auf der Startseite.',
|
||||
'addServer.addConnectionIntroScoped' => 'Füge einen neuen Server hinzu oder leihe einen von einem anderen Profil aus.',
|
||||
'addServer.signInWithPlexCard' => 'Mit Plex anmelden',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'Dieses Gerät autorisieren. Geteilte Server werden hinzugefügt.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Ein Plex-Konto autorisieren. Home-Benutzer werden zu Profilen.',
|
||||
|
||||
+68
-40
@@ -141,9 +141,6 @@ class TranslationsAuthEn {
|
||||
/// en: 'Use Quick Connect'
|
||||
String get useQuickConnect => 'Use Quick Connect';
|
||||
|
||||
/// en: 'Quick Connect code'
|
||||
String get quickConnectCode => 'Quick Connect code';
|
||||
|
||||
/// en: 'Open Quick Connect in Jellyfin and enter this code.'
|
||||
String get quickConnectInstructions => 'Open Quick Connect in Jellyfin and enter this code.';
|
||||
|
||||
@@ -516,6 +513,30 @@ class TranslationsSettingsEn {
|
||||
/// en: 'Use image-only TV cards with actor names overlaid'
|
||||
String get tvFullCardLayoutDescription => 'Use image-only TV cards with actor names overlaid';
|
||||
|
||||
/// en: 'Focus Glow'
|
||||
String get focusGlow => 'Focus Glow';
|
||||
|
||||
/// en: 'Draw a soft glow around the focused card'
|
||||
String get focusGlowDescription => 'Draw a soft glow around the focused card';
|
||||
|
||||
/// en: 'Visual Effects'
|
||||
String get visualEffects => 'Visual Effects';
|
||||
|
||||
/// en: 'Auto'
|
||||
String get visualEffectsAuto => 'Auto';
|
||||
|
||||
/// en: 'Reduce effects automatically on low-power devices'
|
||||
String get visualEffectsAutoDescription => 'Reduce effects automatically on low-power devices';
|
||||
|
||||
/// en: 'Full'
|
||||
String get visualEffectsFull => 'Full';
|
||||
|
||||
/// en: 'Reduced'
|
||||
String get visualEffectsReduced => 'Reduced';
|
||||
|
||||
/// en: 'Fewer animations and lower-resolution artwork'
|
||||
String get visualEffectsReducedDescription => 'Fewer animations and lower-resolution artwork';
|
||||
|
||||
/// en: 'Hide Spoilers for Unwatched Episodes'
|
||||
String get hideSpoilers => 'Hide Spoilers for Unwatched Episodes';
|
||||
|
||||
@@ -1710,6 +1731,15 @@ class TranslationsSubtitlingStylingEn {
|
||||
|
||||
/// en: 'Italic'
|
||||
String get italic => 'Italic';
|
||||
|
||||
/// en: 'Render Resolution'
|
||||
String get renderResolution => 'Render Resolution';
|
||||
|
||||
/// en: 'Screen resolution'
|
||||
String get renderResolutionScreen => 'Screen resolution';
|
||||
|
||||
/// en: 'Video resolution'
|
||||
String get renderResolutionVideo => 'Video resolution';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -2895,9 +2925,18 @@ class TranslationsWatchTogetherEn {
|
||||
/// en: '${name} is buffering'
|
||||
String participantBuffering({required Object name}) => '${name} is buffering';
|
||||
|
||||
/// en: '${name} is on an older app version — sync unavailable'
|
||||
String participantNeedsUpdate({required Object name}) => '${name} is on an older app version — sync unavailable';
|
||||
|
||||
/// en: 'Resuming without ${name}'
|
||||
String resumingWithout({required Object name}) => 'Resuming without ${name}';
|
||||
|
||||
/// en: 'Waiting for others to load...'
|
||||
String get waitingForParticipants => 'Waiting for others to load...';
|
||||
|
||||
/// en: 'Waiting for ${name}...'
|
||||
String waitingForName({required Object name}) => 'Waiting for ${name}...';
|
||||
|
||||
/// en: 'Recent Rooms'
|
||||
String get recentRooms => 'Recent Rooms';
|
||||
|
||||
@@ -3329,6 +3368,9 @@ class TranslationsPerformanceOverlayEn {
|
||||
/// en: 'Cache Used'
|
||||
String get cacheUsed => 'Cache Used';
|
||||
|
||||
/// en: 'Cache Limit'
|
||||
String get cacheLimit => 'Cache Limit';
|
||||
|
||||
/// en: 'Speed'
|
||||
String get speed => 'Speed';
|
||||
|
||||
@@ -3781,18 +3823,12 @@ class TranslationsAddServerEn {
|
||||
/// en: 'Add Jellyfin server'
|
||||
String get addJellyfinTitle => 'Add Jellyfin server';
|
||||
|
||||
/// en: 'Enter the server URL, e.g. `https://jellyfin.example.com`.'
|
||||
String get jellyfinUrlIntro => 'Enter the server URL, e.g. `https://jellyfin.example.com`.';
|
||||
|
||||
/// en: 'Enter one or more server URLs, separated by commas. Plezy will use the reachable URL with the lowest latency.'
|
||||
String get jellyfinUrlsIntro => 'Enter one or more server URLs, separated by commas. Plezy will use the reachable URL with the lowest latency.';
|
||||
|
||||
/// en: 'Server URL'
|
||||
String get serverUrl => 'Server URL';
|
||||
|
||||
/// en: 'Server URLs'
|
||||
String get serverUrls => 'Server URLs';
|
||||
|
||||
/// en: 'Multiple URLs allowed, separated by commas.'
|
||||
String get serverUrlsHelper => 'Multiple URLs allowed, separated by commas.';
|
||||
|
||||
/// en: 'Find server'
|
||||
String get findServer => 'Find server';
|
||||
|
||||
@@ -3829,15 +3865,6 @@ class TranslationsAddServerEn {
|
||||
/// en: 'Sign in with Plex'
|
||||
String get addPlexTitle => 'Sign in with Plex';
|
||||
|
||||
/// en: 'Sign in with a browser or QR code.'
|
||||
String get plexAuthIntro => 'Sign in with a browser or QR code.';
|
||||
|
||||
/// en: 'Scan this QR code to sign in.'
|
||||
String get plexQRPrompt => 'Scan this QR code to sign in.';
|
||||
|
||||
/// en: 'Waiting for plex.tv to confirm your sign-in…'
|
||||
String get waitingForPlexConfirmation => 'Waiting for plex.tv to confirm your sign-in…';
|
||||
|
||||
/// en: 'PIN expired before sign-in. Please try again.'
|
||||
String get pinExpired => 'PIN expired before sign-in. Please try again.';
|
||||
|
||||
@@ -3856,12 +3883,6 @@ class TranslationsAddServerEn {
|
||||
/// en: 'Add to ${name}'
|
||||
String addConnectionTitleScoped({required Object name}) => 'Add to ${name}';
|
||||
|
||||
/// en: 'Add another media server. Plex and Jellyfin appear together on Home.'
|
||||
String get addConnectionIntroGlobal => 'Add another media server. Plex and Jellyfin appear together on Home.';
|
||||
|
||||
/// en: 'Add a new server, or borrow one from another profile.'
|
||||
String get addConnectionIntroScoped => 'Add a new server, or borrow one from another profile.';
|
||||
|
||||
/// en: 'Sign in with Plex'
|
||||
String get signInWithPlexCard => 'Sign in with Plex';
|
||||
|
||||
@@ -4489,7 +4510,6 @@ extension on Translations {
|
||||
'auth.or' => 'or',
|
||||
'auth.connectToJellyfin' => 'Connect to Jellyfin',
|
||||
'auth.useQuickConnect' => 'Use Quick Connect',
|
||||
'auth.quickConnectCode' => 'Quick Connect code',
|
||||
'auth.quickConnectInstructions' => 'Open Quick Connect in Jellyfin and enter this code.',
|
||||
'auth.quickConnectWaiting' => 'Waiting for approval…',
|
||||
'auth.quickConnectCancel' => 'Cancel',
|
||||
@@ -4602,6 +4622,14 @@ extension on Translations {
|
||||
'settings.showSeasonPostersOnTabsDescription' => 'Show each season\'s poster above its tab',
|
||||
'settings.tvFullCardLayout' => 'Full TV Cards',
|
||||
'settings.tvFullCardLayoutDescription' => 'Use image-only TV cards with actor names overlaid',
|
||||
'settings.focusGlow' => 'Focus Glow',
|
||||
'settings.focusGlowDescription' => 'Draw a soft glow around the focused card',
|
||||
'settings.visualEffects' => 'Visual Effects',
|
||||
'settings.visualEffectsAuto' => 'Auto',
|
||||
'settings.visualEffectsAutoDescription' => 'Reduce effects automatically on low-power devices',
|
||||
'settings.visualEffectsFull' => 'Full',
|
||||
'settings.visualEffectsReduced' => 'Reduced',
|
||||
'settings.visualEffectsReducedDescription' => 'Fewer animations and lower-resolution artwork',
|
||||
'settings.hideSpoilers' => 'Hide Spoilers for Unwatched Episodes',
|
||||
'settings.hideSpoilersDescription' => 'Blur thumbnails and descriptions for unwatched episodes',
|
||||
'settings.playerBackend' => 'Player Backend',
|
||||
@@ -4982,6 +5010,8 @@ extension on Translations {
|
||||
'messages.switchingToCompatiblePlayer' => 'Switching to compatible player...',
|
||||
'messages.serverLimitTitle' => 'Playback failed',
|
||||
'messages.serverLimitBody' => 'Server error (HTTP 500). A bandwidth/transcoding limit likely rejected this session. Ask the owner to adjust it.',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'messages.logsUploaded' => 'Logs uploaded',
|
||||
'messages.logsUploadFailed' => 'Failed to upload logs',
|
||||
'messages.logId' => 'Log ID',
|
||||
@@ -4989,8 +5019,6 @@ extension on Translations {
|
||||
'subtitlingStyling.border' => 'Border',
|
||||
'subtitlingStyling.background' => 'Background',
|
||||
'subtitlingStyling.fontSize' => 'Font Size',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.textColor' => 'Text Color',
|
||||
'subtitlingStyling.borderSize' => 'Border Size',
|
||||
'subtitlingStyling.borderColor' => 'Border Color',
|
||||
@@ -5000,6 +5028,9 @@ extension on Translations {
|
||||
'subtitlingStyling.assOverride' => 'ASS Override',
|
||||
'subtitlingStyling.bold' => 'Bold',
|
||||
'subtitlingStyling.italic' => 'Italic',
|
||||
'subtitlingStyling.renderResolution' => 'Render Resolution',
|
||||
'subtitlingStyling.renderResolutionScreen' => 'Screen resolution',
|
||||
'subtitlingStyling.renderResolutionVideo' => 'Video resolution',
|
||||
'mpvConfig.title' => 'mpv.conf',
|
||||
'mpvConfig.description' => 'Advanced video player settings',
|
||||
'mpvConfig.presets' => 'Presets',
|
||||
@@ -5378,7 +5409,10 @@ extension on Translations {
|
||||
'watchTogether.participantResumed' => ({required Object name}) => '${name} resumed',
|
||||
'watchTogether.participantSeeked' => ({required Object name}) => '${name} seeked',
|
||||
'watchTogether.participantBuffering' => ({required Object name}) => '${name} is buffering',
|
||||
'watchTogether.participantNeedsUpdate' => ({required Object name}) => '${name} is on an older app version — sync unavailable',
|
||||
'watchTogether.resumingWithout' => ({required Object name}) => 'Resuming without ${name}',
|
||||
'watchTogether.waitingForParticipants' => 'Waiting for others to load...',
|
||||
'watchTogether.waitingForName' => ({required Object name}) => 'Waiting for ${name}...',
|
||||
'watchTogether.recentRooms' => 'Recent Rooms',
|
||||
'watchTogether.renameRoom' => 'Rename Room',
|
||||
'watchTogether.removeRoom' => 'Remove',
|
||||
@@ -5490,6 +5524,8 @@ extension on Translations {
|
||||
'companionRemote.pairing.validationHostRequired' => 'Please enter host address',
|
||||
'companionRemote.pairing.validationHostFormat' => 'Format must be IP:port (e.g., 192.168.1.100:48632)',
|
||||
'companionRemote.pairing.connectionTimedOut' => 'Connection timed out. Use the same network on both devices.',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.pairing.sessionNotFound' => 'Device not found. Make sure Plezy is running on the host.',
|
||||
'companionRemote.pairing.authFailed' => 'Authentication failed. Both devices need the same Plex account.',
|
||||
'companionRemote.pairing.failedToConnect' => ({required Object error}) => 'Failed to connect: ${error}',
|
||||
@@ -5503,8 +5539,6 @@ extension on Translations {
|
||||
'companionRemote.remote.menu' => 'Menu',
|
||||
'companionRemote.remote.tabNavigation' => 'Tab Navigation',
|
||||
'companionRemote.remote.tabDiscover' => 'Discover',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'Libraries',
|
||||
'companionRemote.remote.tabSearch' => 'Search',
|
||||
'companionRemote.remote.tabDownloads' => 'Downloads',
|
||||
@@ -5568,6 +5602,7 @@ extension on Translations {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => 'Cache Used',
|
||||
'performanceOverlay.cacheLimit' => 'Cache Limit',
|
||||
'performanceOverlay.speed' => 'Speed',
|
||||
'performanceOverlay.player' => 'Player',
|
||||
'performanceOverlay.memory' => 'Memory',
|
||||
@@ -5720,10 +5755,8 @@ extension on Translations {
|
||||
'trackers.libraryFilter.libraries' => 'Libraries',
|
||||
'trackers.libraryFilter.noLibraries' => 'No libraries available',
|
||||
'addServer.addJellyfinTitle' => 'Add Jellyfin server',
|
||||
'addServer.jellyfinUrlIntro' => 'Enter the server URL, e.g. `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => 'Enter one or more server URLs, separated by commas. Plezy will use the reachable URL with the lowest latency.',
|
||||
'addServer.serverUrl' => 'Server URL',
|
||||
'addServer.serverUrls' => 'Server URLs',
|
||||
'addServer.serverUrlsHelper' => 'Multiple URLs allowed, separated by commas.',
|
||||
'addServer.findServer' => 'Find server',
|
||||
'addServer.searchingLocalServers' => 'Looking for local Jellyfin servers...',
|
||||
'addServer.localServers' => 'Local Jellyfin servers',
|
||||
@@ -5736,17 +5769,12 @@ extension on Translations {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'Sign-in failed: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect failed: ${error}',
|
||||
'addServer.addPlexTitle' => 'Sign in with Plex',
|
||||
'addServer.plexAuthIntro' => 'Sign in with a browser or QR code.',
|
||||
'addServer.plexQRPrompt' => 'Scan this QR code to sign in.',
|
||||
'addServer.waitingForPlexConfirmation' => 'Waiting for plex.tv to confirm your sign-in…',
|
||||
'addServer.pinExpired' => 'PIN expired before sign-in. Please try again.',
|
||||
'addServer.duplicatePlexAccount' => 'Already signed in to Plex. Sign out to switch accounts.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'Failed to register account: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Enter your Jellyfin server URL',
|
||||
'addServer.addConnectionTitle' => 'Add connection',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => 'Add to ${name}',
|
||||
'addServer.addConnectionIntroGlobal' => 'Add another media server. Plex and Jellyfin appear together on Home.',
|
||||
'addServer.addConnectionIntroScoped' => 'Add a new server, or borrow one from another profile.',
|
||||
'addServer.signInWithPlexCard' => 'Sign in with Plex',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'Authorize this device. Shared servers are added.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Authorize a Plex account. Home users become profiles.',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthEs extends TranslationsAuthEn {
|
||||
@override String get or => 'o';
|
||||
@override String get connectToJellyfin => 'Conectar a Jellyfin';
|
||||
@override String get useQuickConnect => 'Usar Quick Connect';
|
||||
@override String get quickConnectCode => 'Código de Quick Connect';
|
||||
@override String get quickConnectInstructions => 'Abre Quick Connect en Jellyfin e introduce este código.';
|
||||
@override String get quickConnectWaiting => 'Esperando aprobación…';
|
||||
@override String get quickConnectCancel => 'Cancelar';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsEs extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => 'Mostrar el póster de cada temporada sobre su pestaña';
|
||||
@override String get tvFullCardLayout => 'Tarjetas TV completas';
|
||||
@override String get tvFullCardLayoutDescription => 'Usar tarjetas TV solo con imagen y nombres de actores superpuestos';
|
||||
@override String get focusGlow => 'Brillo de foco';
|
||||
@override String get focusGlowDescription => 'Mostrar un brillo suave alrededor de la tarjeta con foco';
|
||||
@override String get hideSpoilers => 'Ocultar spoilers de episodios no vistos';
|
||||
@override String get hideSpoilersDescription => 'Desenfocar miniaturas y descripciones de episodios no vistos';
|
||||
@override String get playerBackend => 'Reproductor';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingEs extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'Sobreescritura ASS';
|
||||
@override String get bold => 'Negrita';
|
||||
@override String get italic => 'Cursiva';
|
||||
@override String get renderResolution => 'Resolución de renderizado';
|
||||
@override String get renderResolutionScreen => 'Resolución de pantalla';
|
||||
@override String get renderResolutionVideo => 'Resolución del vídeo';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayEs extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => 'Caché usada';
|
||||
@override String get cacheLimit => 'Límite de caché';
|
||||
@override String get speed => 'Velocidad';
|
||||
@override String get player => 'Reproductor';
|
||||
@override String get memory => 'Memoria';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerEs extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Añadir servidor Jellyfin';
|
||||
@override String get jellyfinUrlIntro => 'Introduce la URL del servidor, p. ej. `https://jellyfin.example.com`.';
|
||||
@override String get jellyfinUrlsIntro => 'Introduce una o más URL del servidor, separadas por comas. Plezy usará la URL accesible con menor latencia.';
|
||||
@override String get serverUrl => 'URL del servidor';
|
||||
@override String get serverUrls => 'URL del servidor';
|
||||
@override String get serverUrlsHelper => 'Se permiten varias URL, separadas por comas.';
|
||||
@override String get findServer => 'Buscar servidor';
|
||||
@override String get searchingLocalServers => 'Buscando servidores Jellyfin locales...';
|
||||
@override String get localServers => 'Servidores Jellyfin locales';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerEs extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => 'Error al iniciar sesión: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connect ha fallado: ${error}';
|
||||
@override String get addPlexTitle => 'Iniciar sesión con Plex';
|
||||
@override String get plexAuthIntro => 'Inicia sesión con un navegador o código QR.';
|
||||
@override String get plexQRPrompt => 'Escanea este código QR para iniciar sesión.';
|
||||
@override String get waitingForPlexConfirmation => 'Esperando que plex.tv confirme tu inicio de sesión…';
|
||||
@override String get pinExpired => 'El PIN caducó antes de iniciar sesión. Inténtalo de nuevo.';
|
||||
@override String get duplicatePlexAccount => 'Ya iniciaste sesión en Plex. Cierra sesión para cambiar de cuenta.';
|
||||
@override String failedToRegisterAccount({required Object error}) => 'No se pudo registrar la cuenta: ${error}';
|
||||
@override String get enterJellyfinUrlError => 'Introduce la URL de tu servidor Jellyfin';
|
||||
@override String get addConnectionTitle => 'Añadir conexión';
|
||||
@override String addConnectionTitleScoped({required Object name}) => 'Añadir a ${name}';
|
||||
@override String get addConnectionIntroGlobal => 'Añade otro servidor multimedia. Plex y Jellyfin aparecen juntos en Inicio.';
|
||||
@override String get addConnectionIntroScoped => 'Añade un servidor nuevo o toma prestado uno de otro perfil.';
|
||||
@override String get signInWithPlexCard => 'Iniciar sesión con Plex';
|
||||
@override String get signInWithPlexCardSubtitle => 'Autoriza este dispositivo. Se añaden servidores compartidos.';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Autoriza una cuenta Plex. Los usuarios de Home se convierten en perfiles.';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsEs {
|
||||
'auth.or' => 'o',
|
||||
'auth.connectToJellyfin' => 'Conectar a Jellyfin',
|
||||
'auth.useQuickConnect' => 'Usar Quick Connect',
|
||||
'auth.quickConnectCode' => 'Código de Quick Connect',
|
||||
'auth.quickConnectInstructions' => 'Abre Quick Connect en Jellyfin e introduce este código.',
|
||||
'auth.quickConnectWaiting' => 'Esperando aprobación…',
|
||||
'auth.quickConnectCancel' => 'Cancelar',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsEs {
|
||||
'settings.showSeasonPostersOnTabsDescription' => 'Mostrar el póster de cada temporada sobre su pestaña',
|
||||
'settings.tvFullCardLayout' => 'Tarjetas TV completas',
|
||||
'settings.tvFullCardLayoutDescription' => 'Usar tarjetas TV solo con imagen y nombres de actores superpuestos',
|
||||
'settings.focusGlow' => 'Brillo de foco',
|
||||
'settings.focusGlowDescription' => 'Mostrar un brillo suave alrededor de la tarjeta con foco',
|
||||
'settings.hideSpoilers' => 'Ocultar spoilers de episodios no vistos',
|
||||
'settings.hideSpoilersDescription' => 'Desenfocar miniaturas y descripciones de episodios no vistos',
|
||||
'settings.playerBackend' => 'Reproductor',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsEs {
|
||||
'subtitlingStyling.text' => 'Texto',
|
||||
'subtitlingStyling.border' => 'Borde',
|
||||
'subtitlingStyling.background' => 'Fondo',
|
||||
'subtitlingStyling.fontSize' => 'Tamaño de Fuente',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => 'Tamaño de Fuente',
|
||||
'subtitlingStyling.textColor' => 'Color de Texto',
|
||||
'subtitlingStyling.borderSize' => 'Tamaño de Borde',
|
||||
'subtitlingStyling.borderColor' => 'Color de Borde',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsEs {
|
||||
'subtitlingStyling.assOverride' => 'Sobreescritura ASS',
|
||||
'subtitlingStyling.bold' => 'Negrita',
|
||||
'subtitlingStyling.italic' => 'Cursiva',
|
||||
'subtitlingStyling.renderResolution' => 'Resolución de renderizado',
|
||||
'subtitlingStyling.renderResolutionScreen' => 'Resolución de pantalla',
|
||||
'subtitlingStyling.renderResolutionVideo' => 'Resolución del vídeo',
|
||||
'mpvConfig.title' => 'Configuración de mpv',
|
||||
'mpvConfig.description' => 'Ajustes avanzados del reproductor de video',
|
||||
'mpvConfig.presets' => 'Ajustes preestablecidos',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsEs {
|
||||
'companionRemote.remote.retryNow' => 'Reintentar ahora',
|
||||
'companionRemote.remote.tabRemote' => 'Remoto',
|
||||
'companionRemote.remote.tabPlay' => 'Reproducir',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => 'Más',
|
||||
'companionRemote.remote.menu' => 'Menú',
|
||||
'companionRemote.remote.tabNavigation' => 'Navegación por pestañas',
|
||||
'companionRemote.remote.tabDiscover' => 'Descubrir',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'Bibliotecas',
|
||||
'companionRemote.remote.tabSearch' => 'Buscar',
|
||||
'companionRemote.remote.tabDownloads' => 'Descargas',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsEs {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => 'Caché usada',
|
||||
'performanceOverlay.cacheLimit' => 'Límite de caché',
|
||||
'performanceOverlay.speed' => 'Velocidad',
|
||||
'performanceOverlay.player' => 'Reproductor',
|
||||
'performanceOverlay.memory' => 'Memoria',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsEs {
|
||||
'trackers.libraryFilter.libraries' => 'Bibliotecas',
|
||||
'trackers.libraryFilter.noLibraries' => 'No hay bibliotecas disponibles',
|
||||
'addServer.addJellyfinTitle' => 'Añadir servidor Jellyfin',
|
||||
'addServer.jellyfinUrlIntro' => 'Introduce la URL del servidor, p. ej. `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => 'Introduce una o más URL del servidor, separadas por comas. Plezy usará la URL accesible con menor latencia.',
|
||||
'addServer.serverUrl' => 'URL del servidor',
|
||||
'addServer.serverUrls' => 'URL del servidor',
|
||||
'addServer.serverUrlsHelper' => 'Se permiten varias URL, separadas por comas.',
|
||||
'addServer.findServer' => 'Buscar servidor',
|
||||
'addServer.searchingLocalServers' => 'Buscando servidores Jellyfin locales...',
|
||||
'addServer.localServers' => 'Servidores Jellyfin locales',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsEs {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'Error al iniciar sesión: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect ha fallado: ${error}',
|
||||
'addServer.addPlexTitle' => 'Iniciar sesión con Plex',
|
||||
'addServer.plexAuthIntro' => 'Inicia sesión con un navegador o código QR.',
|
||||
'addServer.plexQRPrompt' => 'Escanea este código QR para iniciar sesión.',
|
||||
'addServer.waitingForPlexConfirmation' => 'Esperando que plex.tv confirme tu inicio de sesión…',
|
||||
'addServer.pinExpired' => 'El PIN caducó antes de iniciar sesión. Inténtalo de nuevo.',
|
||||
'addServer.duplicatePlexAccount' => 'Ya iniciaste sesión en Plex. Cierra sesión para cambiar de cuenta.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'No se pudo registrar la cuenta: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Introduce la URL de tu servidor Jellyfin',
|
||||
'addServer.addConnectionTitle' => 'Añadir conexión',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => 'Añadir a ${name}',
|
||||
'addServer.addConnectionIntroGlobal' => 'Añade otro servidor multimedia. Plex y Jellyfin aparecen juntos en Inicio.',
|
||||
'addServer.addConnectionIntroScoped' => 'Añade un servidor nuevo o toma prestado uno de otro perfil.',
|
||||
'addServer.signInWithPlexCard' => 'Iniciar sesión con Plex',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'Autoriza este dispositivo. Se añaden servidores compartidos.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Autoriza una cuenta Plex. Los usuarios de Home se convierten en perfiles.',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthFr extends TranslationsAuthEn {
|
||||
@override String get or => 'ou';
|
||||
@override String get connectToJellyfin => 'Se connecter à Jellyfin';
|
||||
@override String get useQuickConnect => 'Utiliser Quick Connect';
|
||||
@override String get quickConnectCode => 'Code Quick Connect';
|
||||
@override String get quickConnectInstructions => 'Ouvrez Quick Connect dans Jellyfin et saisissez ce code.';
|
||||
@override String get quickConnectWaiting => 'En attente d\'approbation…';
|
||||
@override String get quickConnectCancel => 'Annuler';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsFr extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => 'Afficher l\'affiche de chaque saison au-dessus de son onglet';
|
||||
@override String get tvFullCardLayout => 'Cartes TV pleines';
|
||||
@override String get tvFullCardLayoutDescription => 'Utiliser des cartes TV avec image seule et noms des acteurs superposés';
|
||||
@override String get focusGlow => 'Halo de sélection';
|
||||
@override String get focusGlowDescription => 'Afficher un léger halo autour de la carte sélectionnée';
|
||||
@override String get hideSpoilers => 'Masquer les spoilers des épisodes non vus';
|
||||
@override String get hideSpoilersDescription => 'Flouter les miniatures et descriptions des épisodes non vus';
|
||||
@override String get playerBackend => 'Moteur de lecture';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingFr extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'Remplacement ASS';
|
||||
@override String get bold => 'Gras';
|
||||
@override String get italic => 'Italique';
|
||||
@override String get renderResolution => 'Résolution de rendu';
|
||||
@override String get renderResolutionScreen => 'Résolution de l\'écran';
|
||||
@override String get renderResolutionVideo => 'Résolution de la vidéo';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayFr extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => 'Cache utilisé';
|
||||
@override String get cacheLimit => 'Limite du cache';
|
||||
@override String get speed => 'Vitesse';
|
||||
@override String get player => 'Lecteur';
|
||||
@override String get memory => 'Mémoire';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerFr extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Ajouter un serveur Jellyfin';
|
||||
@override String get jellyfinUrlIntro => 'Saisissez l\'URL du serveur, par ex. `https://jellyfin.example.com`.';
|
||||
@override String get jellyfinUrlsIntro => 'Saisissez une ou plusieurs URL de serveur, séparées par des virgules. Plezy utilisera l\'URL joignable avec la latence la plus faible.';
|
||||
@override String get serverUrl => 'URL du serveur';
|
||||
@override String get serverUrls => 'URL du serveur';
|
||||
@override String get serverUrlsHelper => 'Plusieurs URL possibles, séparées par des virgules.';
|
||||
@override String get findServer => 'Rechercher un serveur';
|
||||
@override String get searchingLocalServers => 'Recherche de serveurs Jellyfin locaux...';
|
||||
@override String get localServers => 'Serveurs Jellyfin locaux';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerFr extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => 'Échec de la connexion : ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Échec de Quick Connect : ${error}';
|
||||
@override String get addPlexTitle => 'Se connecter avec Plex';
|
||||
@override String get plexAuthIntro => 'Connectez-vous avec un navigateur ou un code QR.';
|
||||
@override String get plexQRPrompt => 'Scannez ce QR code pour vous connecter.';
|
||||
@override String get waitingForPlexConfirmation => 'En attente de la confirmation de plex.tv…';
|
||||
@override String get pinExpired => 'Le PIN a expiré avant la connexion. Veuillez réessayer.';
|
||||
@override String get duplicatePlexAccount => 'Déjà connecté à Plex. Déconnectez-vous pour changer de compte.';
|
||||
@override String failedToRegisterAccount({required Object error}) => 'Échec de l\'enregistrement du compte : ${error}';
|
||||
@override String get enterJellyfinUrlError => 'Saisissez l\'URL de votre serveur Jellyfin';
|
||||
@override String get addConnectionTitle => 'Ajouter une connexion';
|
||||
@override String addConnectionTitleScoped({required Object name}) => 'Ajouter à ${name}';
|
||||
@override String get addConnectionIntroGlobal => 'Ajoutez un autre serveur multimédia. Plex et Jellyfin apparaissent ensemble sur Accueil.';
|
||||
@override String get addConnectionIntroScoped => 'Ajoutez un nouveau serveur, ou empruntez-en un à un autre profil.';
|
||||
@override String get signInWithPlexCard => 'Se connecter avec Plex';
|
||||
@override String get signInWithPlexCardSubtitle => 'Autorisez cet appareil. Les serveurs partagés sont ajoutés.';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Autorisez un compte Plex. Les utilisateurs Home deviennent des profils.';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsFr {
|
||||
'auth.or' => 'ou',
|
||||
'auth.connectToJellyfin' => 'Se connecter à Jellyfin',
|
||||
'auth.useQuickConnect' => 'Utiliser Quick Connect',
|
||||
'auth.quickConnectCode' => 'Code Quick Connect',
|
||||
'auth.quickConnectInstructions' => 'Ouvrez Quick Connect dans Jellyfin et saisissez ce code.',
|
||||
'auth.quickConnectWaiting' => 'En attente d\'approbation…',
|
||||
'auth.quickConnectCancel' => 'Annuler',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsFr {
|
||||
'settings.showSeasonPostersOnTabsDescription' => 'Afficher l\'affiche de chaque saison au-dessus de son onglet',
|
||||
'settings.tvFullCardLayout' => 'Cartes TV pleines',
|
||||
'settings.tvFullCardLayoutDescription' => 'Utiliser des cartes TV avec image seule et noms des acteurs superposés',
|
||||
'settings.focusGlow' => 'Halo de sélection',
|
||||
'settings.focusGlowDescription' => 'Afficher un léger halo autour de la carte sélectionnée',
|
||||
'settings.hideSpoilers' => 'Masquer les spoilers des épisodes non vus',
|
||||
'settings.hideSpoilersDescription' => 'Flouter les miniatures et descriptions des épisodes non vus',
|
||||
'settings.playerBackend' => 'Moteur de lecture',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsFr {
|
||||
'subtitlingStyling.text' => 'Texte',
|
||||
'subtitlingStyling.border' => 'Bordure',
|
||||
'subtitlingStyling.background' => 'Arrière-plan',
|
||||
'subtitlingStyling.fontSize' => 'Taille de la police',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => 'Taille de la police',
|
||||
'subtitlingStyling.textColor' => 'Couleur du texte',
|
||||
'subtitlingStyling.borderSize' => 'Taille de la bordure',
|
||||
'subtitlingStyling.borderColor' => 'Couleur de la bordure',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsFr {
|
||||
'subtitlingStyling.assOverride' => 'Remplacement ASS',
|
||||
'subtitlingStyling.bold' => 'Gras',
|
||||
'subtitlingStyling.italic' => 'Italique',
|
||||
'subtitlingStyling.renderResolution' => 'Résolution de rendu',
|
||||
'subtitlingStyling.renderResolutionScreen' => 'Résolution de l\'écran',
|
||||
'subtitlingStyling.renderResolutionVideo' => 'Résolution de la vidéo',
|
||||
'mpvConfig.title' => 'Configuration mpv',
|
||||
'mpvConfig.description' => 'Paramètres avancés du lecteur vidéo',
|
||||
'mpvConfig.presets' => 'Préréglages',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsFr {
|
||||
'companionRemote.remote.retryNow' => 'Réessayer maintenant',
|
||||
'companionRemote.remote.tabRemote' => 'Télécommande',
|
||||
'companionRemote.remote.tabPlay' => 'Lecture',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => 'Plus',
|
||||
'companionRemote.remote.menu' => 'Menu',
|
||||
'companionRemote.remote.tabNavigation' => 'Navigation par onglets',
|
||||
'companionRemote.remote.tabDiscover' => 'Découvrir',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'Bibliothèques',
|
||||
'companionRemote.remote.tabSearch' => 'Rechercher',
|
||||
'companionRemote.remote.tabDownloads' => 'Téléchargements',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsFr {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => 'Cache utilisé',
|
||||
'performanceOverlay.cacheLimit' => 'Limite du cache',
|
||||
'performanceOverlay.speed' => 'Vitesse',
|
||||
'performanceOverlay.player' => 'Lecteur',
|
||||
'performanceOverlay.memory' => 'Mémoire',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsFr {
|
||||
'trackers.libraryFilter.libraries' => 'Bibliothèques',
|
||||
'trackers.libraryFilter.noLibraries' => 'Aucune bibliothèque disponible',
|
||||
'addServer.addJellyfinTitle' => 'Ajouter un serveur Jellyfin',
|
||||
'addServer.jellyfinUrlIntro' => 'Saisissez l\'URL du serveur, par ex. `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => 'Saisissez une ou plusieurs URL de serveur, séparées par des virgules. Plezy utilisera l\'URL joignable avec la latence la plus faible.',
|
||||
'addServer.serverUrl' => 'URL du serveur',
|
||||
'addServer.serverUrls' => 'URL du serveur',
|
||||
'addServer.serverUrlsHelper' => 'Plusieurs URL possibles, séparées par des virgules.',
|
||||
'addServer.findServer' => 'Rechercher un serveur',
|
||||
'addServer.searchingLocalServers' => 'Recherche de serveurs Jellyfin locaux...',
|
||||
'addServer.localServers' => 'Serveurs Jellyfin locaux',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsFr {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'Échec de la connexion : ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Échec de Quick Connect : ${error}',
|
||||
'addServer.addPlexTitle' => 'Se connecter avec Plex',
|
||||
'addServer.plexAuthIntro' => 'Connectez-vous avec un navigateur ou un code QR.',
|
||||
'addServer.plexQRPrompt' => 'Scannez ce QR code pour vous connecter.',
|
||||
'addServer.waitingForPlexConfirmation' => 'En attente de la confirmation de plex.tv…',
|
||||
'addServer.pinExpired' => 'Le PIN a expiré avant la connexion. Veuillez réessayer.',
|
||||
'addServer.duplicatePlexAccount' => 'Déjà connecté à Plex. Déconnectez-vous pour changer de compte.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'Échec de l\'enregistrement du compte : ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Saisissez l\'URL de votre serveur Jellyfin',
|
||||
'addServer.addConnectionTitle' => 'Ajouter une connexion',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => 'Ajouter à ${name}',
|
||||
'addServer.addConnectionIntroGlobal' => 'Ajoutez un autre serveur multimédia. Plex et Jellyfin apparaissent ensemble sur Accueil.',
|
||||
'addServer.addConnectionIntroScoped' => 'Ajoutez un nouveau serveur, ou empruntez-en un à un autre profil.',
|
||||
'addServer.signInWithPlexCard' => 'Se connecter avec Plex',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'Autorisez cet appareil. Les serveurs partagés sont ajoutés.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Autorisez un compte Plex. Les utilisateurs Home deviennent des profils.',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthIt extends TranslationsAuthEn {
|
||||
@override String get or => 'o';
|
||||
@override String get connectToJellyfin => 'Connetti a Jellyfin';
|
||||
@override String get useQuickConnect => 'Usa Quick Connect';
|
||||
@override String get quickConnectCode => 'Codice Quick Connect';
|
||||
@override String get quickConnectInstructions => 'Apri Quick Connect in Jellyfin e inserisci questo codice.';
|
||||
@override String get quickConnectWaiting => 'In attesa di approvazione…';
|
||||
@override String get quickConnectCancel => 'Annulla';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsIt extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => 'Mostra il poster di ogni stagione sopra la sua scheda';
|
||||
@override String get tvFullCardLayout => 'Schede TV piene';
|
||||
@override String get tvFullCardLayoutDescription => 'Usa schede TV solo immagine con i nomi degli attori sovrapposti';
|
||||
@override String get focusGlow => 'Bagliore di selezione';
|
||||
@override String get focusGlowDescription => 'Mostra un leggero bagliore attorno alla scheda selezionata';
|
||||
@override String get hideSpoilers => 'Nascondi spoiler per episodi non visti';
|
||||
@override String get hideSpoilersDescription => 'Sfoca miniature e descrizioni degli episodi non visti';
|
||||
@override String get playerBackend => 'Motore di riproduzione';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingIt extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'Sovrascrittura ASS';
|
||||
@override String get bold => 'Grassetto';
|
||||
@override String get italic => 'Corsivo';
|
||||
@override String get renderResolution => 'Risoluzione di rendering';
|
||||
@override String get renderResolutionScreen => 'Risoluzione dello schermo';
|
||||
@override String get renderResolutionVideo => 'Risoluzione del video';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayIt extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => 'Cache usata';
|
||||
@override String get cacheLimit => 'Limite cache';
|
||||
@override String get speed => 'Velocità';
|
||||
@override String get player => 'Player';
|
||||
@override String get memory => 'Memoria';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerIt extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Aggiungi server Jellyfin';
|
||||
@override String get jellyfinUrlIntro => 'Inserisci l\'URL del server, es. `https://jellyfin.example.com`.';
|
||||
@override String get jellyfinUrlsIntro => 'Inserisci uno o più URL del server, separati da virgole. Plezy userà l\'URL raggiungibile con la latenza più bassa.';
|
||||
@override String get serverUrl => 'URL del server';
|
||||
@override String get serverUrls => 'URL del server';
|
||||
@override String get serverUrlsHelper => 'Sono consentiti più URL, separati da virgole.';
|
||||
@override String get findServer => 'Trova server';
|
||||
@override String get searchingLocalServers => 'Ricerca server Jellyfin locali...';
|
||||
@override String get localServers => 'Server Jellyfin locali';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerIt extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => 'Accesso non riuscito: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connect non riuscito: ${error}';
|
||||
@override String get addPlexTitle => 'Accedi con Plex';
|
||||
@override String get plexAuthIntro => 'Accedi con un browser o un codice QR.';
|
||||
@override String get plexQRPrompt => 'Scansiona questo QR code per accedere.';
|
||||
@override String get waitingForPlexConfirmation => 'In attesa della conferma da plex.tv…';
|
||||
@override String get pinExpired => 'PIN scaduto prima dell\'accesso. Riprova.';
|
||||
@override String get duplicatePlexAccount => 'Accesso a Plex già effettuato. Esci per cambiare account.';
|
||||
@override String failedToRegisterAccount({required Object error}) => 'Registrazione account non riuscita: ${error}';
|
||||
@override String get enterJellyfinUrlError => 'Inserisci l\'URL del tuo server Jellyfin';
|
||||
@override String get addConnectionTitle => 'Aggiungi connessione';
|
||||
@override String addConnectionTitleScoped({required Object name}) => 'Aggiungi a ${name}';
|
||||
@override String get addConnectionIntroGlobal => 'Aggiungi un altro server multimediale. Plex e Jellyfin appaiono insieme in Home.';
|
||||
@override String get addConnectionIntroScoped => 'Aggiungi un nuovo server, o prendine in prestito uno da un altro profilo.';
|
||||
@override String get signInWithPlexCard => 'Accedi con Plex';
|
||||
@override String get signInWithPlexCardSubtitle => 'Autorizza questo dispositivo. I server condivisi vengono aggiunti.';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Autorizza un account Plex. Gli utenti Home diventano profili.';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsIt {
|
||||
'auth.or' => 'o',
|
||||
'auth.connectToJellyfin' => 'Connetti a Jellyfin',
|
||||
'auth.useQuickConnect' => 'Usa Quick Connect',
|
||||
'auth.quickConnectCode' => 'Codice Quick Connect',
|
||||
'auth.quickConnectInstructions' => 'Apri Quick Connect in Jellyfin e inserisci questo codice.',
|
||||
'auth.quickConnectWaiting' => 'In attesa di approvazione…',
|
||||
'auth.quickConnectCancel' => 'Annulla',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsIt {
|
||||
'settings.showSeasonPostersOnTabsDescription' => 'Mostra il poster di ogni stagione sopra la sua scheda',
|
||||
'settings.tvFullCardLayout' => 'Schede TV piene',
|
||||
'settings.tvFullCardLayoutDescription' => 'Usa schede TV solo immagine con i nomi degli attori sovrapposti',
|
||||
'settings.focusGlow' => 'Bagliore di selezione',
|
||||
'settings.focusGlowDescription' => 'Mostra un leggero bagliore attorno alla scheda selezionata',
|
||||
'settings.hideSpoilers' => 'Nascondi spoiler per episodi non visti',
|
||||
'settings.hideSpoilersDescription' => 'Sfoca miniature e descrizioni degli episodi non visti',
|
||||
'settings.playerBackend' => 'Motore di riproduzione',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsIt {
|
||||
'subtitlingStyling.text' => 'Testo',
|
||||
'subtitlingStyling.border' => 'Bordo',
|
||||
'subtitlingStyling.background' => 'Sfondo',
|
||||
'subtitlingStyling.fontSize' => 'Dimensione',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => 'Dimensione',
|
||||
'subtitlingStyling.textColor' => 'Colore testo',
|
||||
'subtitlingStyling.borderSize' => 'Dimensione bordo',
|
||||
'subtitlingStyling.borderColor' => 'Colore bordo',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsIt {
|
||||
'subtitlingStyling.assOverride' => 'Sovrascrittura ASS',
|
||||
'subtitlingStyling.bold' => 'Grassetto',
|
||||
'subtitlingStyling.italic' => 'Corsivo',
|
||||
'subtitlingStyling.renderResolution' => 'Risoluzione di rendering',
|
||||
'subtitlingStyling.renderResolutionScreen' => 'Risoluzione dello schermo',
|
||||
'subtitlingStyling.renderResolutionVideo' => 'Risoluzione del video',
|
||||
'mpvConfig.title' => 'Configurazione mpv',
|
||||
'mpvConfig.description' => 'Impostazioni avanzate del lettore video',
|
||||
'mpvConfig.presets' => 'Preset',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsIt {
|
||||
'companionRemote.remote.retryNow' => 'Riprova ora',
|
||||
'companionRemote.remote.tabRemote' => 'Telecomando',
|
||||
'companionRemote.remote.tabPlay' => 'Riproduci',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => 'Altro',
|
||||
'companionRemote.remote.menu' => 'Menu',
|
||||
'companionRemote.remote.tabNavigation' => 'Navigazione schede',
|
||||
'companionRemote.remote.tabDiscover' => 'Esplora',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'Librerie',
|
||||
'companionRemote.remote.tabSearch' => 'Cerca',
|
||||
'companionRemote.remote.tabDownloads' => 'Download',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsIt {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => 'Cache usata',
|
||||
'performanceOverlay.cacheLimit' => 'Limite cache',
|
||||
'performanceOverlay.speed' => 'Velocità',
|
||||
'performanceOverlay.player' => 'Player',
|
||||
'performanceOverlay.memory' => 'Memoria',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsIt {
|
||||
'trackers.libraryFilter.libraries' => 'Librerie',
|
||||
'trackers.libraryFilter.noLibraries' => 'Nessuna libreria disponibile',
|
||||
'addServer.addJellyfinTitle' => 'Aggiungi server Jellyfin',
|
||||
'addServer.jellyfinUrlIntro' => 'Inserisci l\'URL del server, es. `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => 'Inserisci uno o più URL del server, separati da virgole. Plezy userà l\'URL raggiungibile con la latenza più bassa.',
|
||||
'addServer.serverUrl' => 'URL del server',
|
||||
'addServer.serverUrls' => 'URL del server',
|
||||
'addServer.serverUrlsHelper' => 'Sono consentiti più URL, separati da virgole.',
|
||||
'addServer.findServer' => 'Trova server',
|
||||
'addServer.searchingLocalServers' => 'Ricerca server Jellyfin locali...',
|
||||
'addServer.localServers' => 'Server Jellyfin locali',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsIt {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'Accesso non riuscito: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect non riuscito: ${error}',
|
||||
'addServer.addPlexTitle' => 'Accedi con Plex',
|
||||
'addServer.plexAuthIntro' => 'Accedi con un browser o un codice QR.',
|
||||
'addServer.plexQRPrompt' => 'Scansiona questo QR code per accedere.',
|
||||
'addServer.waitingForPlexConfirmation' => 'In attesa della conferma da plex.tv…',
|
||||
'addServer.pinExpired' => 'PIN scaduto prima dell\'accesso. Riprova.',
|
||||
'addServer.duplicatePlexAccount' => 'Accesso a Plex già effettuato. Esci per cambiare account.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'Registrazione account non riuscita: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Inserisci l\'URL del tuo server Jellyfin',
|
||||
'addServer.addConnectionTitle' => 'Aggiungi connessione',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => 'Aggiungi a ${name}',
|
||||
'addServer.addConnectionIntroGlobal' => 'Aggiungi un altro server multimediale. Plex e Jellyfin appaiono insieme in Home.',
|
||||
'addServer.addConnectionIntroScoped' => 'Aggiungi un nuovo server, o prendine in prestito uno da un altro profilo.',
|
||||
'addServer.signInWithPlexCard' => 'Accedi con Plex',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'Autorizza questo dispositivo. I server condivisi vengono aggiunti.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Autorizza un account Plex. Gli utenti Home diventano profili.',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthJa extends TranslationsAuthEn {
|
||||
@override String get or => 'または';
|
||||
@override String get connectToJellyfin => 'Jellyfinに接続';
|
||||
@override String get useQuickConnect => 'Quick Connect を使う';
|
||||
@override String get quickConnectCode => 'Quick Connect コード';
|
||||
@override String get quickConnectInstructions => 'JellyfinでQuick Connectを開き、このコードを入力してください。';
|
||||
@override String get quickConnectWaiting => '承認を待っています…';
|
||||
@override String get quickConnectCancel => 'キャンセル';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsJa extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => '各シーズンのポスターをタブの上に表示します';
|
||||
@override String get tvFullCardLayout => 'フルTVカード';
|
||||
@override String get tvFullCardLayoutDescription => 'TVカードを画像のみで表示し、俳優名を重ねて表示します';
|
||||
@override String get focusGlow => 'フォーカス時の光彩';
|
||||
@override String get focusGlowDescription => 'フォーカス中のカードの周りに柔らかい光彩を表示します';
|
||||
@override String get hideSpoilers => '未視聴エピソードのネタバレを非表示';
|
||||
@override String get hideSpoilersDescription => '未視聴エピソードのサムネイルと説明をぼかします';
|
||||
@override String get playerBackend => 'プレーヤーバックエンド';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingJa extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'ASSオーバーライド';
|
||||
@override String get bold => '太字';
|
||||
@override String get italic => '斜体';
|
||||
@override String get renderResolution => 'レンダリング解像度';
|
||||
@override String get renderResolutionScreen => '画面解像度';
|
||||
@override String get renderResolutionVideo => '動画解像度';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayJa extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => '使用キャッシュ';
|
||||
@override String get cacheLimit => 'キャッシュ上限';
|
||||
@override String get speed => '速度';
|
||||
@override String get player => 'プレーヤー';
|
||||
@override String get memory => 'メモリ';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerJa extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Jellyfinサーバーを追加';
|
||||
@override String get jellyfinUrlIntro => 'サーバーURLを入力してください。例: `https://jellyfin.example.com`。';
|
||||
@override String get jellyfinUrlsIntro => 'サーバーURLを1つ以上、カンマで区切って入力してください。Plezyは到達可能なURLのうち最も低遅延のものを使用します。';
|
||||
@override String get serverUrl => 'サーバーURL';
|
||||
@override String get serverUrls => 'サーバーURL';
|
||||
@override String get serverUrlsHelper => '複数のURLをカンマ区切りで入力できます。';
|
||||
@override String get findServer => 'サーバーを検索';
|
||||
@override String get searchingLocalServers => 'ローカル Jellyfin サーバーを検索中...';
|
||||
@override String get localServers => 'ローカル Jellyfin サーバー';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerJa extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => 'サインインに失敗しました: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connectに失敗しました: ${error}';
|
||||
@override String get addPlexTitle => 'Plexでサインイン';
|
||||
@override String get plexAuthIntro => 'ブラウザまたはQRコードでサインインします。';
|
||||
@override String get plexQRPrompt => 'このQRコードをスキャンしてサインインしてください。';
|
||||
@override String get waitingForPlexConfirmation => 'plex.tvがサインインを確認するのを待っています…';
|
||||
@override String get pinExpired => 'サインイン前にPINの有効期限が切れました。もう一度お試しください。';
|
||||
@override String get duplicatePlexAccount => 'すでにPlexにサインインしています。アカウントを切り替えるにはサインアウトしてください。';
|
||||
@override String failedToRegisterAccount({required Object error}) => 'アカウントの登録に失敗しました: ${error}';
|
||||
@override String get enterJellyfinUrlError => 'JellyfinサーバーのURLを入力してください';
|
||||
@override String get addConnectionTitle => '接続を追加';
|
||||
@override String addConnectionTitleScoped({required Object name}) => '${name}に追加';
|
||||
@override String get addConnectionIntroGlobal => '別のメディアサーバーを追加します。PlexとJellyfinはホームに一緒に表示されます。';
|
||||
@override String get addConnectionIntroScoped => '新しいサーバーを追加するか、別のプロファイルから借りてください。';
|
||||
@override String get signInWithPlexCard => 'Plexでサインイン';
|
||||
@override String get signInWithPlexCardSubtitle => 'このデバイスを承認します。共有サーバーが追加されます。';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Plexアカウントを承認します。Homeユーザーはプロフィールになります。';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsJa {
|
||||
'auth.or' => 'または',
|
||||
'auth.connectToJellyfin' => 'Jellyfinに接続',
|
||||
'auth.useQuickConnect' => 'Quick Connect を使う',
|
||||
'auth.quickConnectCode' => 'Quick Connect コード',
|
||||
'auth.quickConnectInstructions' => 'JellyfinでQuick Connectを開き、このコードを入力してください。',
|
||||
'auth.quickConnectWaiting' => '承認を待っています…',
|
||||
'auth.quickConnectCancel' => 'キャンセル',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsJa {
|
||||
'settings.showSeasonPostersOnTabsDescription' => '各シーズンのポスターをタブの上に表示します',
|
||||
'settings.tvFullCardLayout' => 'フルTVカード',
|
||||
'settings.tvFullCardLayoutDescription' => 'TVカードを画像のみで表示し、俳優名を重ねて表示します',
|
||||
'settings.focusGlow' => 'フォーカス時の光彩',
|
||||
'settings.focusGlowDescription' => 'フォーカス中のカードの周りに柔らかい光彩を表示します',
|
||||
'settings.hideSpoilers' => '未視聴エピソードのネタバレを非表示',
|
||||
'settings.hideSpoilersDescription' => '未視聴エピソードのサムネイルと説明をぼかします',
|
||||
'settings.playerBackend' => 'プレーヤーバックエンド',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsJa {
|
||||
'subtitlingStyling.text' => 'テキスト',
|
||||
'subtitlingStyling.border' => '枠線',
|
||||
'subtitlingStyling.background' => '背景',
|
||||
'subtitlingStyling.fontSize' => 'フォントサイズ',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => 'フォントサイズ',
|
||||
'subtitlingStyling.textColor' => 'テキストの色',
|
||||
'subtitlingStyling.borderSize' => '枠線サイズ',
|
||||
'subtitlingStyling.borderColor' => '枠線の色',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsJa {
|
||||
'subtitlingStyling.assOverride' => 'ASSオーバーライド',
|
||||
'subtitlingStyling.bold' => '太字',
|
||||
'subtitlingStyling.italic' => '斜体',
|
||||
'subtitlingStyling.renderResolution' => 'レンダリング解像度',
|
||||
'subtitlingStyling.renderResolutionScreen' => '画面解像度',
|
||||
'subtitlingStyling.renderResolutionVideo' => '動画解像度',
|
||||
'mpvConfig.title' => 'mpv.conf',
|
||||
'mpvConfig.description' => '高度な動画プレーヤー設定',
|
||||
'mpvConfig.presets' => 'プリセット',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsJa {
|
||||
'companionRemote.remote.retryNow' => '今すぐ再試行',
|
||||
'companionRemote.remote.tabRemote' => 'リモート',
|
||||
'companionRemote.remote.tabPlay' => '再生',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => 'その他',
|
||||
'companionRemote.remote.menu' => 'メニュー',
|
||||
'companionRemote.remote.tabNavigation' => 'タブナビゲーション',
|
||||
'companionRemote.remote.tabDiscover' => '探す',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'ライブラリ',
|
||||
'companionRemote.remote.tabSearch' => '検索',
|
||||
'companionRemote.remote.tabDownloads' => 'ダウンロード',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsJa {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => '使用キャッシュ',
|
||||
'performanceOverlay.cacheLimit' => 'キャッシュ上限',
|
||||
'performanceOverlay.speed' => '速度',
|
||||
'performanceOverlay.player' => 'プレーヤー',
|
||||
'performanceOverlay.memory' => 'メモリ',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsJa {
|
||||
'trackers.libraryFilter.libraries' => 'ライブラリ',
|
||||
'trackers.libraryFilter.noLibraries' => '利用できるライブラリがありません',
|
||||
'addServer.addJellyfinTitle' => 'Jellyfinサーバーを追加',
|
||||
'addServer.jellyfinUrlIntro' => 'サーバーURLを入力してください。例: `https://jellyfin.example.com`。',
|
||||
'addServer.jellyfinUrlsIntro' => 'サーバーURLを1つ以上、カンマで区切って入力してください。Plezyは到達可能なURLのうち最も低遅延のものを使用します。',
|
||||
'addServer.serverUrl' => 'サーバーURL',
|
||||
'addServer.serverUrls' => 'サーバーURL',
|
||||
'addServer.serverUrlsHelper' => '複数のURLをカンマ区切りで入力できます。',
|
||||
'addServer.findServer' => 'サーバーを検索',
|
||||
'addServer.searchingLocalServers' => 'ローカル Jellyfin サーバーを検索中...',
|
||||
'addServer.localServers' => 'ローカル Jellyfin サーバー',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsJa {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'サインインに失敗しました: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connectに失敗しました: ${error}',
|
||||
'addServer.addPlexTitle' => 'Plexでサインイン',
|
||||
'addServer.plexAuthIntro' => 'ブラウザまたはQRコードでサインインします。',
|
||||
'addServer.plexQRPrompt' => 'このQRコードをスキャンしてサインインしてください。',
|
||||
'addServer.waitingForPlexConfirmation' => 'plex.tvがサインインを確認するのを待っています…',
|
||||
'addServer.pinExpired' => 'サインイン前にPINの有効期限が切れました。もう一度お試しください。',
|
||||
'addServer.duplicatePlexAccount' => 'すでにPlexにサインインしています。アカウントを切り替えるにはサインアウトしてください。',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'アカウントの登録に失敗しました: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'JellyfinサーバーのURLを入力してください',
|
||||
'addServer.addConnectionTitle' => '接続を追加',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => '${name}に追加',
|
||||
'addServer.addConnectionIntroGlobal' => '別のメディアサーバーを追加します。PlexとJellyfinはホームに一緒に表示されます。',
|
||||
'addServer.addConnectionIntroScoped' => '新しいサーバーを追加するか、別のプロファイルから借りてください。',
|
||||
'addServer.signInWithPlexCard' => 'Plexでサインイン',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'このデバイスを承認します。共有サーバーが追加されます。',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Plexアカウントを承認します。Homeユーザーはプロフィールになります。',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthKo extends TranslationsAuthEn {
|
||||
@override String get or => '또는';
|
||||
@override String get connectToJellyfin => 'Jellyfin에 연결';
|
||||
@override String get useQuickConnect => 'Quick Connect 사용';
|
||||
@override String get quickConnectCode => 'Quick Connect 코드';
|
||||
@override String get quickConnectInstructions => 'Jellyfin에서 Quick Connect를 열고 이 코드를 입력하세요.';
|
||||
@override String get quickConnectWaiting => '승인 대기 중…';
|
||||
@override String get quickConnectCancel => '취소';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsKo extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => '각 시즌 포스터를 탭 위에 표시';
|
||||
@override String get tvFullCardLayout => '전체 TV 카드';
|
||||
@override String get tvFullCardLayoutDescription => 'TV 카드에 이미지만 표시하고 배우 이름을 오버레이로 표시';
|
||||
@override String get focusGlow => '포커스 글로우';
|
||||
@override String get focusGlowDescription => '포커스된 카드 주위에 은은한 빛 효과를 표시';
|
||||
@override String get hideSpoilers => '미시청 에피소드 스포일러 숨기기';
|
||||
@override String get hideSpoilersDescription => '시청하지 않은 에피소드의 썸네일과 설명을 흐리게 처리';
|
||||
@override String get playerBackend => '플레이어 백엔드';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingKo extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'ASS 오버라이드';
|
||||
@override String get bold => '굵게';
|
||||
@override String get italic => '기울임꼴';
|
||||
@override String get renderResolution => '렌더링 해상도';
|
||||
@override String get renderResolutionScreen => '화면 해상도';
|
||||
@override String get renderResolutionVideo => '영상 해상도';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayKo extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => '사용 캐시';
|
||||
@override String get cacheLimit => '캐시 제한';
|
||||
@override String get speed => '속도';
|
||||
@override String get player => '플레이어';
|
||||
@override String get memory => '메모리';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerKo extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Jellyfin 서버 추가';
|
||||
@override String get jellyfinUrlIntro => '서버 URL을 입력하세요. 예: `https://jellyfin.example.com`.';
|
||||
@override String get jellyfinUrlsIntro => '서버 URL을 하나 이상 쉼표로 구분해 입력하세요. Plezy는 연결 가능한 URL 중 지연 시간이 가장 낮은 URL을 사용합니다.';
|
||||
@override String get serverUrl => '서버 URL';
|
||||
@override String get serverUrls => '서버 URL';
|
||||
@override String get serverUrlsHelper => '쉼표로 구분하여 여러 URL을 입력할 수 있습니다.';
|
||||
@override String get findServer => '서버 찾기';
|
||||
@override String get searchingLocalServers => '로컬 Jellyfin 서버 검색 중...';
|
||||
@override String get localServers => '로컬 Jellyfin 서버';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerKo extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => '로그인 실패: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connect 실패: ${error}';
|
||||
@override String get addPlexTitle => 'Plex로 로그인';
|
||||
@override String get plexAuthIntro => '브라우저 또는 QR 코드로 로그인하세요.';
|
||||
@override String get plexQRPrompt => '이 QR 코드를 스캔하여 로그인하세요.';
|
||||
@override String get waitingForPlexConfirmation => 'plex.tv에서 로그인을 확인하는 중…';
|
||||
@override String get pinExpired => '로그인 전에 PIN이 만료되었습니다. 다시 시도하세요.';
|
||||
@override String get duplicatePlexAccount => '이미 Plex에 로그인되어 있습니다. 계정을 전환하려면 로그아웃하세요.';
|
||||
@override String failedToRegisterAccount({required Object error}) => '계정 등록 실패: ${error}';
|
||||
@override String get enterJellyfinUrlError => 'Jellyfin 서버 URL을 입력하세요';
|
||||
@override String get addConnectionTitle => '연결 추가';
|
||||
@override String addConnectionTitleScoped({required Object name}) => '${name}에 추가';
|
||||
@override String get addConnectionIntroGlobal => '다른 미디어 서버를 추가합니다. Plex와 Jellyfin이 홈에 함께 표시됩니다.';
|
||||
@override String get addConnectionIntroScoped => '새 서버를 추가하거나 다른 프로필에서 빌리세요.';
|
||||
@override String get signInWithPlexCard => 'Plex로 로그인';
|
||||
@override String get signInWithPlexCardSubtitle => '이 기기를 승인합니다. 공유 서버가 추가됩니다.';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Plex 계정을 승인합니다. Home 사용자는 프로필이 됩니다.';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsKo {
|
||||
'auth.or' => '또는',
|
||||
'auth.connectToJellyfin' => 'Jellyfin에 연결',
|
||||
'auth.useQuickConnect' => 'Quick Connect 사용',
|
||||
'auth.quickConnectCode' => 'Quick Connect 코드',
|
||||
'auth.quickConnectInstructions' => 'Jellyfin에서 Quick Connect를 열고 이 코드를 입력하세요.',
|
||||
'auth.quickConnectWaiting' => '승인 대기 중…',
|
||||
'auth.quickConnectCancel' => '취소',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsKo {
|
||||
'settings.showSeasonPostersOnTabsDescription' => '각 시즌 포스터를 탭 위에 표시',
|
||||
'settings.tvFullCardLayout' => '전체 TV 카드',
|
||||
'settings.tvFullCardLayoutDescription' => 'TV 카드에 이미지만 표시하고 배우 이름을 오버레이로 표시',
|
||||
'settings.focusGlow' => '포커스 글로우',
|
||||
'settings.focusGlowDescription' => '포커스된 카드 주위에 은은한 빛 효과를 표시',
|
||||
'settings.hideSpoilers' => '미시청 에피소드 스포일러 숨기기',
|
||||
'settings.hideSpoilersDescription' => '시청하지 않은 에피소드의 썸네일과 설명을 흐리게 처리',
|
||||
'settings.playerBackend' => '플레이어 백엔드',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsKo {
|
||||
'subtitlingStyling.text' => '텍스트',
|
||||
'subtitlingStyling.border' => '테두리',
|
||||
'subtitlingStyling.background' => '배경',
|
||||
'subtitlingStyling.fontSize' => '글자 크기',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => '글자 크기',
|
||||
'subtitlingStyling.textColor' => '텍스트 색상',
|
||||
'subtitlingStyling.borderSize' => '테두리 크기',
|
||||
'subtitlingStyling.borderColor' => '테두리 색상',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsKo {
|
||||
'subtitlingStyling.assOverride' => 'ASS 오버라이드',
|
||||
'subtitlingStyling.bold' => '굵게',
|
||||
'subtitlingStyling.italic' => '기울임꼴',
|
||||
'subtitlingStyling.renderResolution' => '렌더링 해상도',
|
||||
'subtitlingStyling.renderResolutionScreen' => '화면 해상도',
|
||||
'subtitlingStyling.renderResolutionVideo' => '영상 해상도',
|
||||
'mpvConfig.title' => 'mpv 설정',
|
||||
'mpvConfig.description' => '고급 비디오 플레이어 설정',
|
||||
'mpvConfig.presets' => '사전 설정',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsKo {
|
||||
'companionRemote.remote.retryNow' => '지금 재시도',
|
||||
'companionRemote.remote.tabRemote' => '리모컨',
|
||||
'companionRemote.remote.tabPlay' => '재생',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => '더 보기',
|
||||
'companionRemote.remote.menu' => '메뉴',
|
||||
'companionRemote.remote.tabNavigation' => '탭 탐색',
|
||||
'companionRemote.remote.tabDiscover' => '발견',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => '미디어 라이브러리',
|
||||
'companionRemote.remote.tabSearch' => '검색',
|
||||
'companionRemote.remote.tabDownloads' => '다운로드',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsKo {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => '사용 캐시',
|
||||
'performanceOverlay.cacheLimit' => '캐시 제한',
|
||||
'performanceOverlay.speed' => '속도',
|
||||
'performanceOverlay.player' => '플레이어',
|
||||
'performanceOverlay.memory' => '메모리',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsKo {
|
||||
'trackers.libraryFilter.libraries' => '라이브러리',
|
||||
'trackers.libraryFilter.noLibraries' => '사용 가능한 라이브러리가 없습니다',
|
||||
'addServer.addJellyfinTitle' => 'Jellyfin 서버 추가',
|
||||
'addServer.jellyfinUrlIntro' => '서버 URL을 입력하세요. 예: `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => '서버 URL을 하나 이상 쉼표로 구분해 입력하세요. Plezy는 연결 가능한 URL 중 지연 시간이 가장 낮은 URL을 사용합니다.',
|
||||
'addServer.serverUrl' => '서버 URL',
|
||||
'addServer.serverUrls' => '서버 URL',
|
||||
'addServer.serverUrlsHelper' => '쉼표로 구분하여 여러 URL을 입력할 수 있습니다.',
|
||||
'addServer.findServer' => '서버 찾기',
|
||||
'addServer.searchingLocalServers' => '로컬 Jellyfin 서버 검색 중...',
|
||||
'addServer.localServers' => '로컬 Jellyfin 서버',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsKo {
|
||||
'addServer.signInFailed' => ({required Object error}) => '로그인 실패: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect 실패: ${error}',
|
||||
'addServer.addPlexTitle' => 'Plex로 로그인',
|
||||
'addServer.plexAuthIntro' => '브라우저 또는 QR 코드로 로그인하세요.',
|
||||
'addServer.plexQRPrompt' => '이 QR 코드를 스캔하여 로그인하세요.',
|
||||
'addServer.waitingForPlexConfirmation' => 'plex.tv에서 로그인을 확인하는 중…',
|
||||
'addServer.pinExpired' => '로그인 전에 PIN이 만료되었습니다. 다시 시도하세요.',
|
||||
'addServer.duplicatePlexAccount' => '이미 Plex에 로그인되어 있습니다. 계정을 전환하려면 로그아웃하세요.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => '계정 등록 실패: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Jellyfin 서버 URL을 입력하세요',
|
||||
'addServer.addConnectionTitle' => '연결 추가',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => '${name}에 추가',
|
||||
'addServer.addConnectionIntroGlobal' => '다른 미디어 서버를 추가합니다. Plex와 Jellyfin이 홈에 함께 표시됩니다.',
|
||||
'addServer.addConnectionIntroScoped' => '새 서버를 추가하거나 다른 프로필에서 빌리세요.',
|
||||
'addServer.signInWithPlexCard' => 'Plex로 로그인',
|
||||
'addServer.signInWithPlexCardSubtitle' => '이 기기를 승인합니다. 공유 서버가 추가됩니다.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Plex 계정을 승인합니다. Home 사용자는 프로필이 됩니다.',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthNb extends TranslationsAuthEn {
|
||||
@override String get or => 'eller';
|
||||
@override String get connectToJellyfin => 'Koble til Jellyfin';
|
||||
@override String get useQuickConnect => 'Bruk Quick Connect';
|
||||
@override String get quickConnectCode => 'Quick Connect-kode';
|
||||
@override String get quickConnectInstructions => 'Åpne Quick Connect i Jellyfin og skriv inn denne koden.';
|
||||
@override String get quickConnectWaiting => 'Venter på godkjenning…';
|
||||
@override String get quickConnectCancel => 'Avbryt';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsNb extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => 'Vis hver sesongs plakat over fanen';
|
||||
@override String get tvFullCardLayout => 'Fulle TV-kort';
|
||||
@override String get tvFullCardLayoutDescription => 'Bruk bildebaserte TV-kort med skuespillernavn lagt over';
|
||||
@override String get focusGlow => 'Fokusglød';
|
||||
@override String get focusGlowDescription => 'Vis en myk glød rundt kortet i fokus';
|
||||
@override String get hideSpoilers => 'Skjul spoilere for usette episoder';
|
||||
@override String get hideSpoilersDescription => 'Slør miniatyrbilder og beskrivelser for usette episoder';
|
||||
@override String get playerBackend => 'Spillermotor';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingNb extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'ASS-overstyring';
|
||||
@override String get bold => 'Fet';
|
||||
@override String get italic => 'Kursiv';
|
||||
@override String get renderResolution => 'Gjengivelsesoppløsning';
|
||||
@override String get renderResolutionScreen => 'Skjermoppløsning';
|
||||
@override String get renderResolutionVideo => 'Videooppløsning';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayNb extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => 'Cache brukt';
|
||||
@override String get cacheLimit => 'Cachegrense';
|
||||
@override String get speed => 'Hastighet';
|
||||
@override String get player => 'Spiller';
|
||||
@override String get memory => 'Minne';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerNb extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Legg til Jellyfin-server';
|
||||
@override String get jellyfinUrlIntro => 'Skriv inn server-URL-en, f.eks. `https://jellyfin.example.com`.';
|
||||
@override String get jellyfinUrlsIntro => 'Skriv inn én eller flere server-URL-er, adskilt med kommaer. Plezy bruker den tilgjengelige URL-en med lavest forsinkelse.';
|
||||
@override String get serverUrl => 'Server-URL';
|
||||
@override String get serverUrls => 'Server-URL-er';
|
||||
@override String get serverUrlsHelper => 'Flere URL-er er tillatt, atskilt med komma.';
|
||||
@override String get findServer => 'Finn server';
|
||||
@override String get searchingLocalServers => 'Søker etter lokale Jellyfin-servere...';
|
||||
@override String get localServers => 'Lokale Jellyfin-servere';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerNb extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => 'Pålogging mislyktes: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connect mislyktes: ${error}';
|
||||
@override String get addPlexTitle => 'Logg på med Plex';
|
||||
@override String get plexAuthIntro => 'Logg inn med en nettleser eller QR-kode.';
|
||||
@override String get plexQRPrompt => 'Skann denne QR-koden for å logge på.';
|
||||
@override String get waitingForPlexConfirmation => 'Venter på at plex.tv bekrefter påloggingen…';
|
||||
@override String get pinExpired => 'PIN-koden gikk ut før pålogging. Prøv igjen.';
|
||||
@override String get duplicatePlexAccount => 'Allerede logget inn på Plex. Logg ut for å bytte konto.';
|
||||
@override String failedToRegisterAccount({required Object error}) => 'Kunne ikke registrere kontoen: ${error}';
|
||||
@override String get enterJellyfinUrlError => 'Oppgi URL-en til Jellyfin-serveren din';
|
||||
@override String get addConnectionTitle => 'Legg til tilkobling';
|
||||
@override String addConnectionTitleScoped({required Object name}) => 'Legg til i ${name}';
|
||||
@override String get addConnectionIntroGlobal => 'Legg til en annen medieserver. Plex og Jellyfin vises sammen på Hjem.';
|
||||
@override String get addConnectionIntroScoped => 'Legg til en ny server, eller lån en fra en annen profil.';
|
||||
@override String get signInWithPlexCard => 'Logg på med Plex';
|
||||
@override String get signInWithPlexCardSubtitle => 'Autoriser denne enheten. Delte servere legges til.';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Autoriser en Plex-konto. Home-brukere blir profiler.';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsNb {
|
||||
'auth.or' => 'eller',
|
||||
'auth.connectToJellyfin' => 'Koble til Jellyfin',
|
||||
'auth.useQuickConnect' => 'Bruk Quick Connect',
|
||||
'auth.quickConnectCode' => 'Quick Connect-kode',
|
||||
'auth.quickConnectInstructions' => 'Åpne Quick Connect i Jellyfin og skriv inn denne koden.',
|
||||
'auth.quickConnectWaiting' => 'Venter på godkjenning…',
|
||||
'auth.quickConnectCancel' => 'Avbryt',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsNb {
|
||||
'settings.showSeasonPostersOnTabsDescription' => 'Vis hver sesongs plakat over fanen',
|
||||
'settings.tvFullCardLayout' => 'Fulle TV-kort',
|
||||
'settings.tvFullCardLayoutDescription' => 'Bruk bildebaserte TV-kort med skuespillernavn lagt over',
|
||||
'settings.focusGlow' => 'Fokusglød',
|
||||
'settings.focusGlowDescription' => 'Vis en myk glød rundt kortet i fokus',
|
||||
'settings.hideSpoilers' => 'Skjul spoilere for usette episoder',
|
||||
'settings.hideSpoilersDescription' => 'Slør miniatyrbilder og beskrivelser for usette episoder',
|
||||
'settings.playerBackend' => 'Spillermotor',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsNb {
|
||||
'subtitlingStyling.text' => 'Tekst',
|
||||
'subtitlingStyling.border' => 'Kantlinje',
|
||||
'subtitlingStyling.background' => 'Bakgrunn',
|
||||
'subtitlingStyling.fontSize' => 'Skriftstørrelse',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => 'Skriftstørrelse',
|
||||
'subtitlingStyling.textColor' => 'Tekstfarge',
|
||||
'subtitlingStyling.borderSize' => 'Kantstørrelse',
|
||||
'subtitlingStyling.borderColor' => 'Kantfarge',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsNb {
|
||||
'subtitlingStyling.assOverride' => 'ASS-overstyring',
|
||||
'subtitlingStyling.bold' => 'Fet',
|
||||
'subtitlingStyling.italic' => 'Kursiv',
|
||||
'subtitlingStyling.renderResolution' => 'Gjengivelsesoppløsning',
|
||||
'subtitlingStyling.renderResolutionScreen' => 'Skjermoppløsning',
|
||||
'subtitlingStyling.renderResolutionVideo' => 'Videooppløsning',
|
||||
'mpvConfig.title' => 'mpv.conf',
|
||||
'mpvConfig.description' => 'Avanserte videospillerinnstillinger',
|
||||
'mpvConfig.presets' => 'Forhåndsinnstillinger',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsNb {
|
||||
'companionRemote.remote.retryNow' => 'Prøv nå',
|
||||
'companionRemote.remote.tabRemote' => 'Fjernkontroll',
|
||||
'companionRemote.remote.tabPlay' => 'Spill av',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => 'Mer',
|
||||
'companionRemote.remote.menu' => 'Meny',
|
||||
'companionRemote.remote.tabNavigation' => 'Fanenavigering',
|
||||
'companionRemote.remote.tabDiscover' => 'Oppdag',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'Biblioteker',
|
||||
'companionRemote.remote.tabSearch' => 'Søk',
|
||||
'companionRemote.remote.tabDownloads' => 'Nedlastinger',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsNb {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => 'Cache brukt',
|
||||
'performanceOverlay.cacheLimit' => 'Cachegrense',
|
||||
'performanceOverlay.speed' => 'Hastighet',
|
||||
'performanceOverlay.player' => 'Spiller',
|
||||
'performanceOverlay.memory' => 'Minne',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsNb {
|
||||
'trackers.libraryFilter.libraries' => 'Biblioteker',
|
||||
'trackers.libraryFilter.noLibraries' => 'Ingen biblioteker tilgjengelige',
|
||||
'addServer.addJellyfinTitle' => 'Legg til Jellyfin-server',
|
||||
'addServer.jellyfinUrlIntro' => 'Skriv inn server-URL-en, f.eks. `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => 'Skriv inn én eller flere server-URL-er, adskilt med kommaer. Plezy bruker den tilgjengelige URL-en med lavest forsinkelse.',
|
||||
'addServer.serverUrl' => 'Server-URL',
|
||||
'addServer.serverUrls' => 'Server-URL-er',
|
||||
'addServer.serverUrlsHelper' => 'Flere URL-er er tillatt, atskilt med komma.',
|
||||
'addServer.findServer' => 'Finn server',
|
||||
'addServer.searchingLocalServers' => 'Søker etter lokale Jellyfin-servere...',
|
||||
'addServer.localServers' => 'Lokale Jellyfin-servere',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsNb {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'Pålogging mislyktes: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect mislyktes: ${error}',
|
||||
'addServer.addPlexTitle' => 'Logg på med Plex',
|
||||
'addServer.plexAuthIntro' => 'Logg inn med en nettleser eller QR-kode.',
|
||||
'addServer.plexQRPrompt' => 'Skann denne QR-koden for å logge på.',
|
||||
'addServer.waitingForPlexConfirmation' => 'Venter på at plex.tv bekrefter påloggingen…',
|
||||
'addServer.pinExpired' => 'PIN-koden gikk ut før pålogging. Prøv igjen.',
|
||||
'addServer.duplicatePlexAccount' => 'Allerede logget inn på Plex. Logg ut for å bytte konto.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'Kunne ikke registrere kontoen: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Oppgi URL-en til Jellyfin-serveren din',
|
||||
'addServer.addConnectionTitle' => 'Legg til tilkobling',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => 'Legg til i ${name}',
|
||||
'addServer.addConnectionIntroGlobal' => 'Legg til en annen medieserver. Plex og Jellyfin vises sammen på Hjem.',
|
||||
'addServer.addConnectionIntroScoped' => 'Legg til en ny server, eller lån en fra en annen profil.',
|
||||
'addServer.signInWithPlexCard' => 'Logg på med Plex',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'Autoriser denne enheten. Delte servere legges til.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Autoriser en Plex-konto. Home-brukere blir profiler.',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthNl extends TranslationsAuthEn {
|
||||
@override String get or => 'of';
|
||||
@override String get connectToJellyfin => 'Verbinden met Jellyfin';
|
||||
@override String get useQuickConnect => 'Quick Connect gebruiken';
|
||||
@override String get quickConnectCode => 'Quick Connect-code';
|
||||
@override String get quickConnectInstructions => 'Open Quick Connect in Jellyfin en voer deze code in.';
|
||||
@override String get quickConnectWaiting => 'Wachten op goedkeuring…';
|
||||
@override String get quickConnectCancel => 'Annuleren';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsNl extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => 'Toon de poster van elk seizoen boven het tabblad';
|
||||
@override String get tvFullCardLayout => 'Volledige tv-kaarten';
|
||||
@override String get tvFullCardLayoutDescription => 'Gebruik tv-kaarten met alleen afbeeldingen en namen van acteurs als overlay';
|
||||
@override String get focusGlow => 'Focusgloed';
|
||||
@override String get focusGlowDescription => 'Toon een zachte gloed rond de kaart met focus';
|
||||
@override String get hideSpoilers => 'Spoilers voor ongekeken afleveringen verbergen';
|
||||
@override String get hideSpoilersDescription => 'Vervaag miniaturen en beschrijvingen voor niet-bekeken afleveringen';
|
||||
@override String get playerBackend => 'Speler backend';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingNl extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'ASS-overschrijving';
|
||||
@override String get bold => 'Vet';
|
||||
@override String get italic => 'Cursief';
|
||||
@override String get renderResolution => 'Renderresolutie';
|
||||
@override String get renderResolutionScreen => 'Schermresolutie';
|
||||
@override String get renderResolutionVideo => 'Videoresolutie';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayNl extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => 'Cache gebruikt';
|
||||
@override String get cacheLimit => 'Cachelimiet';
|
||||
@override String get speed => 'Snelheid';
|
||||
@override String get player => 'Speler';
|
||||
@override String get memory => 'Geheugen';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerNl extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Jellyfin-server toevoegen';
|
||||
@override String get jellyfinUrlIntro => 'Voer de server-URL in, bijv. `https://jellyfin.example.com`.';
|
||||
@override String get jellyfinUrlsIntro => 'Voer een of meer server-URL\'s in, gescheiden door komma\'s. Plezy gebruikt de bereikbare URL met de laagste latentie.';
|
||||
@override String get serverUrl => 'Server-URL';
|
||||
@override String get serverUrls => 'Server-URL\'s';
|
||||
@override String get serverUrlsHelper => 'Meerdere URL\'s toegestaan, gescheiden door komma\'s.';
|
||||
@override String get findServer => 'Server zoeken';
|
||||
@override String get searchingLocalServers => 'Lokale Jellyfin-servers zoeken...';
|
||||
@override String get localServers => 'Lokale Jellyfin-servers';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerNl extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => 'Inloggen mislukt: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connect mislukt: ${error}';
|
||||
@override String get addPlexTitle => 'Inloggen met Plex';
|
||||
@override String get plexAuthIntro => 'Meld je aan met een browser of QR-code.';
|
||||
@override String get plexQRPrompt => 'Scan deze QR-code om in te loggen.';
|
||||
@override String get waitingForPlexConfirmation => 'Wachten tot plex.tv je inloggen bevestigt…';
|
||||
@override String get pinExpired => 'PIN verlopen vóór inloggen. Probeer opnieuw.';
|
||||
@override String get duplicatePlexAccount => 'Al aangemeld bij Plex. Meld je af om van account te wisselen.';
|
||||
@override String failedToRegisterAccount({required Object error}) => 'Account registreren mislukt: ${error}';
|
||||
@override String get enterJellyfinUrlError => 'Voer de URL van je Jellyfin-server in';
|
||||
@override String get addConnectionTitle => 'Verbinding toevoegen';
|
||||
@override String addConnectionTitleScoped({required Object name}) => 'Toevoegen aan ${name}';
|
||||
@override String get addConnectionIntroGlobal => 'Voeg een andere mediaserver toe. Plex en Jellyfin verschijnen samen op Home.';
|
||||
@override String get addConnectionIntroScoped => 'Voeg een nieuwe server toe, of leen er een van een ander profiel.';
|
||||
@override String get signInWithPlexCard => 'Inloggen met Plex';
|
||||
@override String get signInWithPlexCardSubtitle => 'Autoriseer dit apparaat. Gedeelde servers worden toegevoegd.';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Autoriseer een Plex-account. Home-gebruikers worden profielen.';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsNl {
|
||||
'auth.or' => 'of',
|
||||
'auth.connectToJellyfin' => 'Verbinden met Jellyfin',
|
||||
'auth.useQuickConnect' => 'Quick Connect gebruiken',
|
||||
'auth.quickConnectCode' => 'Quick Connect-code',
|
||||
'auth.quickConnectInstructions' => 'Open Quick Connect in Jellyfin en voer deze code in.',
|
||||
'auth.quickConnectWaiting' => 'Wachten op goedkeuring…',
|
||||
'auth.quickConnectCancel' => 'Annuleren',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsNl {
|
||||
'settings.showSeasonPostersOnTabsDescription' => 'Toon de poster van elk seizoen boven het tabblad',
|
||||
'settings.tvFullCardLayout' => 'Volledige tv-kaarten',
|
||||
'settings.tvFullCardLayoutDescription' => 'Gebruik tv-kaarten met alleen afbeeldingen en namen van acteurs als overlay',
|
||||
'settings.focusGlow' => 'Focusgloed',
|
||||
'settings.focusGlowDescription' => 'Toon een zachte gloed rond de kaart met focus',
|
||||
'settings.hideSpoilers' => 'Spoilers voor ongekeken afleveringen verbergen',
|
||||
'settings.hideSpoilersDescription' => 'Vervaag miniaturen en beschrijvingen voor niet-bekeken afleveringen',
|
||||
'settings.playerBackend' => 'Speler backend',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsNl {
|
||||
'subtitlingStyling.text' => 'Tekst',
|
||||
'subtitlingStyling.border' => 'Rand',
|
||||
'subtitlingStyling.background' => 'Achtergrond',
|
||||
'subtitlingStyling.fontSize' => 'Lettergrootte',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => 'Lettergrootte',
|
||||
'subtitlingStyling.textColor' => 'Tekstkleur',
|
||||
'subtitlingStyling.borderSize' => 'Rand grootte',
|
||||
'subtitlingStyling.borderColor' => 'Randkleur',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsNl {
|
||||
'subtitlingStyling.assOverride' => 'ASS-overschrijving',
|
||||
'subtitlingStyling.bold' => 'Vet',
|
||||
'subtitlingStyling.italic' => 'Cursief',
|
||||
'subtitlingStyling.renderResolution' => 'Renderresolutie',
|
||||
'subtitlingStyling.renderResolutionScreen' => 'Schermresolutie',
|
||||
'subtitlingStyling.renderResolutionVideo' => 'Videoresolutie',
|
||||
'mpvConfig.title' => 'mpv-configuratie',
|
||||
'mpvConfig.description' => 'Geavanceerde videospeler-instellingen',
|
||||
'mpvConfig.presets' => 'Voorinstellingen',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsNl {
|
||||
'companionRemote.remote.retryNow' => 'Nu opnieuw proberen',
|
||||
'companionRemote.remote.tabRemote' => 'Afstandsbediening',
|
||||
'companionRemote.remote.tabPlay' => 'Afspelen',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => 'Meer',
|
||||
'companionRemote.remote.menu' => 'Menu',
|
||||
'companionRemote.remote.tabNavigation' => 'Tabnavigatie',
|
||||
'companionRemote.remote.tabDiscover' => 'Ontdekken',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'Bibliotheken',
|
||||
'companionRemote.remote.tabSearch' => 'Zoeken',
|
||||
'companionRemote.remote.tabDownloads' => 'Downloads',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsNl {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => 'Cache gebruikt',
|
||||
'performanceOverlay.cacheLimit' => 'Cachelimiet',
|
||||
'performanceOverlay.speed' => 'Snelheid',
|
||||
'performanceOverlay.player' => 'Speler',
|
||||
'performanceOverlay.memory' => 'Geheugen',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsNl {
|
||||
'trackers.libraryFilter.libraries' => 'Bibliotheken',
|
||||
'trackers.libraryFilter.noLibraries' => 'Geen bibliotheken beschikbaar',
|
||||
'addServer.addJellyfinTitle' => 'Jellyfin-server toevoegen',
|
||||
'addServer.jellyfinUrlIntro' => 'Voer de server-URL in, bijv. `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => 'Voer een of meer server-URL\'s in, gescheiden door komma\'s. Plezy gebruikt de bereikbare URL met de laagste latentie.',
|
||||
'addServer.serverUrl' => 'Server-URL',
|
||||
'addServer.serverUrls' => 'Server-URL\'s',
|
||||
'addServer.serverUrlsHelper' => 'Meerdere URL\'s toegestaan, gescheiden door komma\'s.',
|
||||
'addServer.findServer' => 'Server zoeken',
|
||||
'addServer.searchingLocalServers' => 'Lokale Jellyfin-servers zoeken...',
|
||||
'addServer.localServers' => 'Lokale Jellyfin-servers',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsNl {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'Inloggen mislukt: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect mislukt: ${error}',
|
||||
'addServer.addPlexTitle' => 'Inloggen met Plex',
|
||||
'addServer.plexAuthIntro' => 'Meld je aan met een browser of QR-code.',
|
||||
'addServer.plexQRPrompt' => 'Scan deze QR-code om in te loggen.',
|
||||
'addServer.waitingForPlexConfirmation' => 'Wachten tot plex.tv je inloggen bevestigt…',
|
||||
'addServer.pinExpired' => 'PIN verlopen vóór inloggen. Probeer opnieuw.',
|
||||
'addServer.duplicatePlexAccount' => 'Al aangemeld bij Plex. Meld je af om van account te wisselen.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'Account registreren mislukt: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Voer de URL van je Jellyfin-server in',
|
||||
'addServer.addConnectionTitle' => 'Verbinding toevoegen',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => 'Toevoegen aan ${name}',
|
||||
'addServer.addConnectionIntroGlobal' => 'Voeg een andere mediaserver toe. Plex en Jellyfin verschijnen samen op Home.',
|
||||
'addServer.addConnectionIntroScoped' => 'Voeg een nieuwe server toe, of leen er een van een ander profiel.',
|
||||
'addServer.signInWithPlexCard' => 'Inloggen met Plex',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'Autoriseer dit apparaat. Gedeelde servers worden toegevoegd.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Autoriseer een Plex-account. Home-gebruikers worden profielen.',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthPl extends TranslationsAuthEn {
|
||||
@override String get or => 'lub';
|
||||
@override String get connectToJellyfin => 'Połącz z Jellyfin';
|
||||
@override String get useQuickConnect => 'Użyj Quick Connect';
|
||||
@override String get quickConnectCode => 'Kod Quick Connect';
|
||||
@override String get quickConnectInstructions => 'Otwórz Quick Connect w Jellyfin i wpisz ten kod.';
|
||||
@override String get quickConnectWaiting => 'Oczekiwanie na zatwierdzenie…';
|
||||
@override String get quickConnectCancel => 'Anuluj';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsPl extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => 'Pokazuj plakat każdego sezonu nad jego kartą';
|
||||
@override String get tvFullCardLayout => 'Pełne karty TV';
|
||||
@override String get tvFullCardLayoutDescription => 'Używaj kart TV tylko z obrazem i nałożonymi nazwiskami aktorów';
|
||||
@override String get focusGlow => 'Poświata zaznaczenia';
|
||||
@override String get focusGlowDescription => 'Wyświetlaj delikatną poświatę wokół zaznaczonej karty';
|
||||
@override String get hideSpoilers => 'Ukryj spoilery nieobejrzanych odcinków';
|
||||
@override String get hideSpoilersDescription => 'Rozmywaj miniatury i opisy nieobejrzanych odcinków';
|
||||
@override String get playerBackend => 'Backend odtwarzacza';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingPl extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'Nadpisywanie ASS';
|
||||
@override String get bold => 'Pogrubienie';
|
||||
@override String get italic => 'Kursywa';
|
||||
@override String get renderResolution => 'Rozdzielczość renderowania';
|
||||
@override String get renderResolutionScreen => 'Rozdzielczość ekranu';
|
||||
@override String get renderResolutionVideo => 'Rozdzielczość wideo';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayPl extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => 'Użyty cache';
|
||||
@override String get cacheLimit => 'Limit cache\'u';
|
||||
@override String get speed => 'Szybkość';
|
||||
@override String get player => 'Odtwarzacz';
|
||||
@override String get memory => 'Pamięć';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerPl extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Dodaj serwer Jellyfin';
|
||||
@override String get jellyfinUrlIntro => 'Wpisz URL serwera, np. `https://jellyfin.example.com`.';
|
||||
@override String get jellyfinUrlsIntro => 'Wpisz co najmniej jeden URL serwera, oddzielając je przecinkami. Plezy użyje osiągalnego URL-a o najniższym opóźnieniu.';
|
||||
@override String get serverUrl => 'URL serwera';
|
||||
@override String get serverUrls => 'URL-e serwera';
|
||||
@override String get serverUrlsHelper => 'Można podać wiele adresów URL, rozdzielonych przecinkami.';
|
||||
@override String get findServer => 'Znajdź serwer';
|
||||
@override String get searchingLocalServers => 'Szukanie lokalnych serwerów Jellyfin...';
|
||||
@override String get localServers => 'Lokalne serwery Jellyfin';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerPl extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => 'Logowanie nie powiodło się: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connect nie powiodło się: ${error}';
|
||||
@override String get addPlexTitle => 'Zaloguj się przez Plex';
|
||||
@override String get plexAuthIntro => 'Zaloguj się przez przeglądarkę lub kod QR.';
|
||||
@override String get plexQRPrompt => 'Zeskanuj ten kod QR, aby się zalogować.';
|
||||
@override String get waitingForPlexConfirmation => 'Czekam na potwierdzenie logowania przez plex.tv…';
|
||||
@override String get pinExpired => 'PIN wygasł przed zalogowaniem. Spróbuj ponownie.';
|
||||
@override String get duplicatePlexAccount => 'Już zalogowano do Plex. Wyloguj się, aby zmienić konto.';
|
||||
@override String failedToRegisterAccount({required Object error}) => 'Nie udało się zarejestrować konta: ${error}';
|
||||
@override String get enterJellyfinUrlError => 'Podaj URL serwera Jellyfin';
|
||||
@override String get addConnectionTitle => 'Dodaj połączenie';
|
||||
@override String addConnectionTitleScoped({required Object name}) => 'Dodaj do ${name}';
|
||||
@override String get addConnectionIntroGlobal => 'Dodaj kolejny serwer multimediów. Plex i Jellyfin pojawią się razem na ekranie głównym.';
|
||||
@override String get addConnectionIntroScoped => 'Dodaj nowy serwer lub pożycz z innego profilu.';
|
||||
@override String get signInWithPlexCard => 'Zaloguj się przez Plex';
|
||||
@override String get signInWithPlexCardSubtitle => 'Autoryzuj to urządzenie. Serwery udostępnione zostaną dodane.';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Autoryzuj konto Plex. Użytkownicy Home staną się profilami.';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsPl {
|
||||
'auth.or' => 'lub',
|
||||
'auth.connectToJellyfin' => 'Połącz z Jellyfin',
|
||||
'auth.useQuickConnect' => 'Użyj Quick Connect',
|
||||
'auth.quickConnectCode' => 'Kod Quick Connect',
|
||||
'auth.quickConnectInstructions' => 'Otwórz Quick Connect w Jellyfin i wpisz ten kod.',
|
||||
'auth.quickConnectWaiting' => 'Oczekiwanie na zatwierdzenie…',
|
||||
'auth.quickConnectCancel' => 'Anuluj',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsPl {
|
||||
'settings.showSeasonPostersOnTabsDescription' => 'Pokazuj plakat każdego sezonu nad jego kartą',
|
||||
'settings.tvFullCardLayout' => 'Pełne karty TV',
|
||||
'settings.tvFullCardLayoutDescription' => 'Używaj kart TV tylko z obrazem i nałożonymi nazwiskami aktorów',
|
||||
'settings.focusGlow' => 'Poświata zaznaczenia',
|
||||
'settings.focusGlowDescription' => 'Wyświetlaj delikatną poświatę wokół zaznaczonej karty',
|
||||
'settings.hideSpoilers' => 'Ukryj spoilery nieobejrzanych odcinków',
|
||||
'settings.hideSpoilersDescription' => 'Rozmywaj miniatury i opisy nieobejrzanych odcinków',
|
||||
'settings.playerBackend' => 'Backend odtwarzacza',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsPl {
|
||||
'subtitlingStyling.text' => 'Tekst',
|
||||
'subtitlingStyling.border' => 'Obramowanie',
|
||||
'subtitlingStyling.background' => 'Tło',
|
||||
'subtitlingStyling.fontSize' => 'Rozmiar czcionki',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => 'Rozmiar czcionki',
|
||||
'subtitlingStyling.textColor' => 'Kolor tekstu',
|
||||
'subtitlingStyling.borderSize' => 'Rozmiar obramowania',
|
||||
'subtitlingStyling.borderColor' => 'Kolor obramowania',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsPl {
|
||||
'subtitlingStyling.assOverride' => 'Nadpisywanie ASS',
|
||||
'subtitlingStyling.bold' => 'Pogrubienie',
|
||||
'subtitlingStyling.italic' => 'Kursywa',
|
||||
'subtitlingStyling.renderResolution' => 'Rozdzielczość renderowania',
|
||||
'subtitlingStyling.renderResolutionScreen' => 'Rozdzielczość ekranu',
|
||||
'subtitlingStyling.renderResolutionVideo' => 'Rozdzielczość wideo',
|
||||
'mpvConfig.title' => 'mpv.conf',
|
||||
'mpvConfig.description' => 'Zaawansowane ustawienia odtwarzacza wideo',
|
||||
'mpvConfig.presets' => 'Presety',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsPl {
|
||||
'companionRemote.remote.retryNow' => 'Ponów teraz',
|
||||
'companionRemote.remote.tabRemote' => 'Pilot',
|
||||
'companionRemote.remote.tabPlay' => 'Odtwórz',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => 'Więcej',
|
||||
'companionRemote.remote.menu' => 'Menu',
|
||||
'companionRemote.remote.tabNavigation' => 'Nawigacja',
|
||||
'companionRemote.remote.tabDiscover' => 'Odkryj',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'Biblioteki',
|
||||
'companionRemote.remote.tabSearch' => 'Szukaj',
|
||||
'companionRemote.remote.tabDownloads' => 'Pobrania',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsPl {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => 'Użyty cache',
|
||||
'performanceOverlay.cacheLimit' => 'Limit cache\'u',
|
||||
'performanceOverlay.speed' => 'Szybkość',
|
||||
'performanceOverlay.player' => 'Odtwarzacz',
|
||||
'performanceOverlay.memory' => 'Pamięć',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsPl {
|
||||
'trackers.libraryFilter.libraries' => 'Biblioteki',
|
||||
'trackers.libraryFilter.noLibraries' => 'Brak dostępnych bibliotek',
|
||||
'addServer.addJellyfinTitle' => 'Dodaj serwer Jellyfin',
|
||||
'addServer.jellyfinUrlIntro' => 'Wpisz URL serwera, np. `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => 'Wpisz co najmniej jeden URL serwera, oddzielając je przecinkami. Plezy użyje osiągalnego URL-a o najniższym opóźnieniu.',
|
||||
'addServer.serverUrl' => 'URL serwera',
|
||||
'addServer.serverUrls' => 'URL-e serwera',
|
||||
'addServer.serverUrlsHelper' => 'Można podać wiele adresów URL, rozdzielonych przecinkami.',
|
||||
'addServer.findServer' => 'Znajdź serwer',
|
||||
'addServer.searchingLocalServers' => 'Szukanie lokalnych serwerów Jellyfin...',
|
||||
'addServer.localServers' => 'Lokalne serwery Jellyfin',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsPl {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'Logowanie nie powiodło się: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect nie powiodło się: ${error}',
|
||||
'addServer.addPlexTitle' => 'Zaloguj się przez Plex',
|
||||
'addServer.plexAuthIntro' => 'Zaloguj się przez przeglądarkę lub kod QR.',
|
||||
'addServer.plexQRPrompt' => 'Zeskanuj ten kod QR, aby się zalogować.',
|
||||
'addServer.waitingForPlexConfirmation' => 'Czekam na potwierdzenie logowania przez plex.tv…',
|
||||
'addServer.pinExpired' => 'PIN wygasł przed zalogowaniem. Spróbuj ponownie.',
|
||||
'addServer.duplicatePlexAccount' => 'Już zalogowano do Plex. Wyloguj się, aby zmienić konto.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'Nie udało się zarejestrować konta: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Podaj URL serwera Jellyfin',
|
||||
'addServer.addConnectionTitle' => 'Dodaj połączenie',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => 'Dodaj do ${name}',
|
||||
'addServer.addConnectionIntroGlobal' => 'Dodaj kolejny serwer multimediów. Plex i Jellyfin pojawią się razem na ekranie głównym.',
|
||||
'addServer.addConnectionIntroScoped' => 'Dodaj nowy serwer lub pożycz z innego profilu.',
|
||||
'addServer.signInWithPlexCard' => 'Zaloguj się przez Plex',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'Autoryzuj to urządzenie. Serwery udostępnione zostaną dodane.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Autoryzuj konto Plex. Użytkownicy Home staną się profilami.',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthPt extends TranslationsAuthEn {
|
||||
@override String get or => 'ou';
|
||||
@override String get connectToJellyfin => 'Conectar ao Jellyfin';
|
||||
@override String get useQuickConnect => 'Usar Quick Connect';
|
||||
@override String get quickConnectCode => 'Código do Quick Connect';
|
||||
@override String get quickConnectInstructions => 'Abra o Quick Connect no Jellyfin e insira este código.';
|
||||
@override String get quickConnectWaiting => 'A aguardar aprovação…';
|
||||
@override String get quickConnectCancel => 'Cancelar';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsPt extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => 'Mostrar o pôster de cada temporada acima da aba';
|
||||
@override String get tvFullCardLayout => 'Cartões TV completos';
|
||||
@override String get tvFullCardLayoutDescription => 'Usar cartões de TV só com imagem e nomes dos atores sobrepostos';
|
||||
@override String get focusGlow => 'Brilho de foco';
|
||||
@override String get focusGlowDescription => 'Mostrar um brilho suave à volta do cartão em foco';
|
||||
@override String get hideSpoilers => 'Ocultar Spoilers de Episódios Não Assistidos';
|
||||
@override String get hideSpoilersDescription => 'Desfocar miniaturas e descrições de episódios não vistos';
|
||||
@override String get playerBackend => 'Backend do Player';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingPt extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'Substituição ASS';
|
||||
@override String get bold => 'Negrito';
|
||||
@override String get italic => 'Itálico';
|
||||
@override String get renderResolution => 'Resolução de renderização';
|
||||
@override String get renderResolutionScreen => 'Resolução da tela';
|
||||
@override String get renderResolutionVideo => 'Resolução do vídeo';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayPt extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => 'Cache usado';
|
||||
@override String get cacheLimit => 'Limite do cache';
|
||||
@override String get speed => 'Velocidade';
|
||||
@override String get player => 'Player';
|
||||
@override String get memory => 'Memória';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerPt extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Adicionar servidor Jellyfin';
|
||||
@override String get jellyfinUrlIntro => 'Insira a URL do servidor, ex. `https://jellyfin.example.com`.';
|
||||
@override String get jellyfinUrlsIntro => 'Insira uma ou mais URLs do servidor, separadas por vírgulas. O Plezy usará a URL acessível com a menor latência.';
|
||||
@override String get serverUrl => 'URL do servidor';
|
||||
@override String get serverUrls => 'URLs do servidor';
|
||||
@override String get serverUrlsHelper => 'Vários URLs permitidos, separados por vírgulas.';
|
||||
@override String get findServer => 'Encontrar servidor';
|
||||
@override String get searchingLocalServers => 'A procurar servidores Jellyfin locais...';
|
||||
@override String get localServers => 'Servidores Jellyfin locais';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerPt extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => 'Falha ao entrar: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connect falhou: ${error}';
|
||||
@override String get addPlexTitle => 'Entrar com Plex';
|
||||
@override String get plexAuthIntro => 'Entre com um navegador ou código QR.';
|
||||
@override String get plexQRPrompt => 'Escaneie este código QR para entrar.';
|
||||
@override String get waitingForPlexConfirmation => 'Aguardando o plex.tv confirmar o login…';
|
||||
@override String get pinExpired => 'O PIN expirou antes do login. Tente novamente.';
|
||||
@override String get duplicatePlexAccount => 'Você já entrou no Plex. Saia para trocar de conta.';
|
||||
@override String failedToRegisterAccount({required Object error}) => 'Falha ao registrar a conta: ${error}';
|
||||
@override String get enterJellyfinUrlError => 'Insira a URL do seu servidor Jellyfin';
|
||||
@override String get addConnectionTitle => 'Adicionar conexão';
|
||||
@override String addConnectionTitleScoped({required Object name}) => 'Adicionar a ${name}';
|
||||
@override String get addConnectionIntroGlobal => 'Adicione outro servidor de mídia. Plex e Jellyfin aparecem juntos no Início.';
|
||||
@override String get addConnectionIntroScoped => 'Adicione um novo servidor ou pegue um emprestado de outro perfil.';
|
||||
@override String get signInWithPlexCard => 'Entrar com Plex';
|
||||
@override String get signInWithPlexCardSubtitle => 'Autorize este dispositivo. Servidores compartilhados são adicionados.';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Autorize uma conta Plex. Usuários Home viram perfis.';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsPt {
|
||||
'auth.or' => 'ou',
|
||||
'auth.connectToJellyfin' => 'Conectar ao Jellyfin',
|
||||
'auth.useQuickConnect' => 'Usar Quick Connect',
|
||||
'auth.quickConnectCode' => 'Código do Quick Connect',
|
||||
'auth.quickConnectInstructions' => 'Abra o Quick Connect no Jellyfin e insira este código.',
|
||||
'auth.quickConnectWaiting' => 'A aguardar aprovação…',
|
||||
'auth.quickConnectCancel' => 'Cancelar',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsPt {
|
||||
'settings.showSeasonPostersOnTabsDescription' => 'Mostrar o pôster de cada temporada acima da aba',
|
||||
'settings.tvFullCardLayout' => 'Cartões TV completos',
|
||||
'settings.tvFullCardLayoutDescription' => 'Usar cartões de TV só com imagem e nomes dos atores sobrepostos',
|
||||
'settings.focusGlow' => 'Brilho de foco',
|
||||
'settings.focusGlowDescription' => 'Mostrar um brilho suave à volta do cartão em foco',
|
||||
'settings.hideSpoilers' => 'Ocultar Spoilers de Episódios Não Assistidos',
|
||||
'settings.hideSpoilersDescription' => 'Desfocar miniaturas e descrições de episódios não vistos',
|
||||
'settings.playerBackend' => 'Backend do Player',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsPt {
|
||||
'subtitlingStyling.text' => 'Texto',
|
||||
'subtitlingStyling.border' => 'Borda',
|
||||
'subtitlingStyling.background' => 'Fundo',
|
||||
'subtitlingStyling.fontSize' => 'Tamanho da Fonte',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => 'Tamanho da Fonte',
|
||||
'subtitlingStyling.textColor' => 'Cor do Texto',
|
||||
'subtitlingStyling.borderSize' => 'Tamanho da Borda',
|
||||
'subtitlingStyling.borderColor' => 'Cor da Borda',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsPt {
|
||||
'subtitlingStyling.assOverride' => 'Substituição ASS',
|
||||
'subtitlingStyling.bold' => 'Negrito',
|
||||
'subtitlingStyling.italic' => 'Itálico',
|
||||
'subtitlingStyling.renderResolution' => 'Resolução de renderização',
|
||||
'subtitlingStyling.renderResolutionScreen' => 'Resolução da tela',
|
||||
'subtitlingStyling.renderResolutionVideo' => 'Resolução do vídeo',
|
||||
'mpvConfig.title' => 'mpv.conf',
|
||||
'mpvConfig.description' => 'Configurações avançadas do player de vídeo',
|
||||
'mpvConfig.presets' => 'Predefinições',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsPt {
|
||||
'companionRemote.remote.retryNow' => 'Tentar Agora',
|
||||
'companionRemote.remote.tabRemote' => 'Remoto',
|
||||
'companionRemote.remote.tabPlay' => 'Reproduzir',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => 'Mais',
|
||||
'companionRemote.remote.menu' => 'Menu',
|
||||
'companionRemote.remote.tabNavigation' => 'Navegação',
|
||||
'companionRemote.remote.tabDiscover' => 'Descobrir',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'Bibliotecas',
|
||||
'companionRemote.remote.tabSearch' => 'Buscar',
|
||||
'companionRemote.remote.tabDownloads' => 'Downloads',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsPt {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => 'Cache usado',
|
||||
'performanceOverlay.cacheLimit' => 'Limite do cache',
|
||||
'performanceOverlay.speed' => 'Velocidade',
|
||||
'performanceOverlay.player' => 'Player',
|
||||
'performanceOverlay.memory' => 'Memória',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsPt {
|
||||
'trackers.libraryFilter.libraries' => 'Bibliotecas',
|
||||
'trackers.libraryFilter.noLibraries' => 'Nenhuma biblioteca disponível',
|
||||
'addServer.addJellyfinTitle' => 'Adicionar servidor Jellyfin',
|
||||
'addServer.jellyfinUrlIntro' => 'Insira a URL do servidor, ex. `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => 'Insira uma ou mais URLs do servidor, separadas por vírgulas. O Plezy usará a URL acessível com a menor latência.',
|
||||
'addServer.serverUrl' => 'URL do servidor',
|
||||
'addServer.serverUrls' => 'URLs do servidor',
|
||||
'addServer.serverUrlsHelper' => 'Vários URLs permitidos, separados por vírgulas.',
|
||||
'addServer.findServer' => 'Encontrar servidor',
|
||||
'addServer.searchingLocalServers' => 'A procurar servidores Jellyfin locais...',
|
||||
'addServer.localServers' => 'Servidores Jellyfin locais',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsPt {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'Falha ao entrar: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect falhou: ${error}',
|
||||
'addServer.addPlexTitle' => 'Entrar com Plex',
|
||||
'addServer.plexAuthIntro' => 'Entre com um navegador ou código QR.',
|
||||
'addServer.plexQRPrompt' => 'Escaneie este código QR para entrar.',
|
||||
'addServer.waitingForPlexConfirmation' => 'Aguardando o plex.tv confirmar o login…',
|
||||
'addServer.pinExpired' => 'O PIN expirou antes do login. Tente novamente.',
|
||||
'addServer.duplicatePlexAccount' => 'Você já entrou no Plex. Saia para trocar de conta.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'Falha ao registrar a conta: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Insira a URL do seu servidor Jellyfin',
|
||||
'addServer.addConnectionTitle' => 'Adicionar conexão',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => 'Adicionar a ${name}',
|
||||
'addServer.addConnectionIntroGlobal' => 'Adicione outro servidor de mídia. Plex e Jellyfin aparecem juntos no Início.',
|
||||
'addServer.addConnectionIntroScoped' => 'Adicione um novo servidor ou pegue um emprestado de outro perfil.',
|
||||
'addServer.signInWithPlexCard' => 'Entrar com Plex',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'Autorize este dispositivo. Servidores compartilhados são adicionados.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Autorize uma conta Plex. Usuários Home viram perfis.',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthRu extends TranslationsAuthEn {
|
||||
@override String get or => 'или';
|
||||
@override String get connectToJellyfin => 'Подключиться к Jellyfin';
|
||||
@override String get useQuickConnect => 'Использовать Quick Connect';
|
||||
@override String get quickConnectCode => 'Код Quick Connect';
|
||||
@override String get quickConnectInstructions => 'Откройте Quick Connect в Jellyfin и введите этот код.';
|
||||
@override String get quickConnectWaiting => 'Ожидание подтверждения…';
|
||||
@override String get quickConnectCancel => 'Отмена';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsRu extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => 'Показывать постер каждого сезона над его вкладкой';
|
||||
@override String get tvFullCardLayout => 'Полные TV-карточки';
|
||||
@override String get tvFullCardLayoutDescription => 'Использовать TV-карточки только с изображением и именами актёров поверх него';
|
||||
@override String get focusGlow => 'Свечение при фокусе';
|
||||
@override String get focusGlowDescription => 'Показывать мягкое свечение вокруг карточки в фокусе';
|
||||
@override String get hideSpoilers => 'Скрыть спойлеры непросмотренных эпизодов';
|
||||
@override String get hideSpoilersDescription => 'Размывать миниатюры и описания непросмотренных серий';
|
||||
@override String get playerBackend => 'Бэкенд плеера';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingRu extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'Переопределение ASS';
|
||||
@override String get bold => 'Жирный';
|
||||
@override String get italic => 'Курсив';
|
||||
@override String get renderResolution => 'Разрешение отрисовки';
|
||||
@override String get renderResolutionScreen => 'Разрешение экрана';
|
||||
@override String get renderResolutionVideo => 'Разрешение видео';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayRu extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => 'Кэш использован';
|
||||
@override String get cacheLimit => 'Лимит кэша';
|
||||
@override String get speed => 'Скорость';
|
||||
@override String get player => 'Плеер';
|
||||
@override String get memory => 'Память';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerRu extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Добавить сервер Jellyfin';
|
||||
@override String get jellyfinUrlIntro => 'Введите URL сервера, например `https://jellyfin.example.com`.';
|
||||
@override String get jellyfinUrlsIntro => 'Введите один или несколько URL сервера, разделяя их запятыми. Plezy будет использовать доступный URL с минимальной задержкой.';
|
||||
@override String get serverUrl => 'URL сервера';
|
||||
@override String get serverUrls => 'URL сервера';
|
||||
@override String get serverUrlsHelper => 'Можно указать несколько URL через запятую.';
|
||||
@override String get findServer => 'Найти сервер';
|
||||
@override String get searchingLocalServers => 'Поиск локальных серверов Jellyfin...';
|
||||
@override String get localServers => 'Локальные серверы Jellyfin';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerRu extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => 'Не удалось войти: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connect не удался: ${error}';
|
||||
@override String get addPlexTitle => 'Войти через Plex';
|
||||
@override String get plexAuthIntro => 'Войдите через браузер или QR-код.';
|
||||
@override String get plexQRPrompt => 'Отсканируйте этот QR-код, чтобы войти.';
|
||||
@override String get waitingForPlexConfirmation => 'Ожидание подтверждения от plex.tv…';
|
||||
@override String get pinExpired => 'Срок действия PIN истёк до входа. Попробуйте снова.';
|
||||
@override String get duplicatePlexAccount => 'В Plex уже выполнен вход. Выйдите, чтобы сменить аккаунт.';
|
||||
@override String failedToRegisterAccount({required Object error}) => 'Не удалось зарегистрировать учётную запись: ${error}';
|
||||
@override String get enterJellyfinUrlError => 'Введите URL вашего сервера Jellyfin';
|
||||
@override String get addConnectionTitle => 'Добавить подключение';
|
||||
@override String addConnectionTitleScoped({required Object name}) => 'Добавить в ${name}';
|
||||
@override String get addConnectionIntroGlobal => 'Добавьте еще один медиасервер. Plex и Jellyfin появятся вместе на главной.';
|
||||
@override String get addConnectionIntroScoped => 'Добавьте новый сервер или одолжите из другого профиля.';
|
||||
@override String get signInWithPlexCard => 'Войти через Plex';
|
||||
@override String get signInWithPlexCardSubtitle => 'Авторизуйте это устройство. Общие серверы будут добавлены.';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Авторизуйте аккаунт Plex. Пользователи Home станут профилями.';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsRu {
|
||||
'auth.or' => 'или',
|
||||
'auth.connectToJellyfin' => 'Подключиться к Jellyfin',
|
||||
'auth.useQuickConnect' => 'Использовать Quick Connect',
|
||||
'auth.quickConnectCode' => 'Код Quick Connect',
|
||||
'auth.quickConnectInstructions' => 'Откройте Quick Connect в Jellyfin и введите этот код.',
|
||||
'auth.quickConnectWaiting' => 'Ожидание подтверждения…',
|
||||
'auth.quickConnectCancel' => 'Отмена',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsRu {
|
||||
'settings.showSeasonPostersOnTabsDescription' => 'Показывать постер каждого сезона над его вкладкой',
|
||||
'settings.tvFullCardLayout' => 'Полные TV-карточки',
|
||||
'settings.tvFullCardLayoutDescription' => 'Использовать TV-карточки только с изображением и именами актёров поверх него',
|
||||
'settings.focusGlow' => 'Свечение при фокусе',
|
||||
'settings.focusGlowDescription' => 'Показывать мягкое свечение вокруг карточки в фокусе',
|
||||
'settings.hideSpoilers' => 'Скрыть спойлеры непросмотренных эпизодов',
|
||||
'settings.hideSpoilersDescription' => 'Размывать миниатюры и описания непросмотренных серий',
|
||||
'settings.playerBackend' => 'Бэкенд плеера',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsRu {
|
||||
'subtitlingStyling.text' => 'Текст',
|
||||
'subtitlingStyling.border' => 'Обводка',
|
||||
'subtitlingStyling.background' => 'Фон',
|
||||
'subtitlingStyling.fontSize' => 'Размер шрифта',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => 'Размер шрифта',
|
||||
'subtitlingStyling.textColor' => 'Цвет текста',
|
||||
'subtitlingStyling.borderSize' => 'Размер обводки',
|
||||
'subtitlingStyling.borderColor' => 'Цвет обводки',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsRu {
|
||||
'subtitlingStyling.assOverride' => 'Переопределение ASS',
|
||||
'subtitlingStyling.bold' => 'Жирный',
|
||||
'subtitlingStyling.italic' => 'Курсив',
|
||||
'subtitlingStyling.renderResolution' => 'Разрешение отрисовки',
|
||||
'subtitlingStyling.renderResolutionScreen' => 'Разрешение экрана',
|
||||
'subtitlingStyling.renderResolutionVideo' => 'Разрешение видео',
|
||||
'mpvConfig.title' => 'mpv.conf',
|
||||
'mpvConfig.description' => 'Расширенные настройки видеоплеера',
|
||||
'mpvConfig.presets' => 'Пресеты',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsRu {
|
||||
'companionRemote.remote.retryNow' => 'Повторить сейчас',
|
||||
'companionRemote.remote.tabRemote' => 'Пульт',
|
||||
'companionRemote.remote.tabPlay' => 'Воспроизведение',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => 'Ещё',
|
||||
'companionRemote.remote.menu' => 'Меню',
|
||||
'companionRemote.remote.tabNavigation' => 'Навигация',
|
||||
'companionRemote.remote.tabDiscover' => 'Обзор',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'Библиотеки',
|
||||
'companionRemote.remote.tabSearch' => 'Поиск',
|
||||
'companionRemote.remote.tabDownloads' => 'Загрузки',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsRu {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => 'Кэш использован',
|
||||
'performanceOverlay.cacheLimit' => 'Лимит кэша',
|
||||
'performanceOverlay.speed' => 'Скорость',
|
||||
'performanceOverlay.player' => 'Плеер',
|
||||
'performanceOverlay.memory' => 'Память',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsRu {
|
||||
'trackers.libraryFilter.libraries' => 'Библиотеки',
|
||||
'trackers.libraryFilter.noLibraries' => 'Библиотеки недоступны',
|
||||
'addServer.addJellyfinTitle' => 'Добавить сервер Jellyfin',
|
||||
'addServer.jellyfinUrlIntro' => 'Введите URL сервера, например `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => 'Введите один или несколько URL сервера, разделяя их запятыми. Plezy будет использовать доступный URL с минимальной задержкой.',
|
||||
'addServer.serverUrl' => 'URL сервера',
|
||||
'addServer.serverUrls' => 'URL сервера',
|
||||
'addServer.serverUrlsHelper' => 'Можно указать несколько URL через запятую.',
|
||||
'addServer.findServer' => 'Найти сервер',
|
||||
'addServer.searchingLocalServers' => 'Поиск локальных серверов Jellyfin...',
|
||||
'addServer.localServers' => 'Локальные серверы Jellyfin',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsRu {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'Не удалось войти: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect не удался: ${error}',
|
||||
'addServer.addPlexTitle' => 'Войти через Plex',
|
||||
'addServer.plexAuthIntro' => 'Войдите через браузер или QR-код.',
|
||||
'addServer.plexQRPrompt' => 'Отсканируйте этот QR-код, чтобы войти.',
|
||||
'addServer.waitingForPlexConfirmation' => 'Ожидание подтверждения от plex.tv…',
|
||||
'addServer.pinExpired' => 'Срок действия PIN истёк до входа. Попробуйте снова.',
|
||||
'addServer.duplicatePlexAccount' => 'В Plex уже выполнен вход. Выйдите, чтобы сменить аккаунт.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'Не удалось зарегистрировать учётную запись: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Введите URL вашего сервера Jellyfin',
|
||||
'addServer.addConnectionTitle' => 'Добавить подключение',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => 'Добавить в ${name}',
|
||||
'addServer.addConnectionIntroGlobal' => 'Добавьте еще один медиасервер. Plex и Jellyfin появятся вместе на главной.',
|
||||
'addServer.addConnectionIntroScoped' => 'Добавьте новый сервер или одолжите из другого профиля.',
|
||||
'addServer.signInWithPlexCard' => 'Войти через Plex',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'Авторизуйте это устройство. Общие серверы будут добавлены.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Авторизуйте аккаунт Plex. Пользователи Home станут профилями.',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthSv extends TranslationsAuthEn {
|
||||
@override String get or => 'eller';
|
||||
@override String get connectToJellyfin => 'Anslut till Jellyfin';
|
||||
@override String get useQuickConnect => 'Använd Quick Connect';
|
||||
@override String get quickConnectCode => 'Quick Connect-kod';
|
||||
@override String get quickConnectInstructions => 'Öppna Quick Connect i Jellyfin och ange den här koden.';
|
||||
@override String get quickConnectWaiting => 'Väntar på godkännande…';
|
||||
@override String get quickConnectCancel => 'Avbryt';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsSv extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => 'Visa varje säsongs affisch ovanför fliken';
|
||||
@override String get tvFullCardLayout => 'Heltäckande TV-kort';
|
||||
@override String get tvFullCardLayoutDescription => 'Använd TV-kort med enbart bild och skådespelarnamn ovanpå';
|
||||
@override String get focusGlow => 'Fokusglöd';
|
||||
@override String get focusGlowDescription => 'Visa en mjuk glöd runt kortet i fokus';
|
||||
@override String get hideSpoilers => 'Dölj spoilers för osedda avsnitt';
|
||||
@override String get hideSpoilersDescription => 'Sudda miniatyrbilder och beskrivningar för osedda avsnitt';
|
||||
@override String get playerBackend => 'Spelarmotor';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingSv extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'ASS-åsidosättning';
|
||||
@override String get bold => 'Fet';
|
||||
@override String get italic => 'Kursiv';
|
||||
@override String get renderResolution => 'Renderingsupplösning';
|
||||
@override String get renderResolutionScreen => 'Skärmupplösning';
|
||||
@override String get renderResolutionVideo => 'Videoupplösning';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlaySv extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => 'Cache använd';
|
||||
@override String get cacheLimit => 'Cachegräns';
|
||||
@override String get speed => 'Hastighet';
|
||||
@override String get player => 'Spelare';
|
||||
@override String get memory => 'Minne';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerSv extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => 'Lägg till Jellyfin-server';
|
||||
@override String get jellyfinUrlIntro => 'Ange server-URL, t.ex. `https://jellyfin.example.com`.';
|
||||
@override String get jellyfinUrlsIntro => 'Ange en eller flera server-URL:er, separerade med kommatecken. Plezy använder den nåbara URL:en med lägst latens.';
|
||||
@override String get serverUrl => 'Server-URL';
|
||||
@override String get serverUrls => 'Server-URL:er';
|
||||
@override String get serverUrlsHelper => 'Flera URL:er tillåtna, separerade med kommatecken.';
|
||||
@override String get findServer => 'Hitta server';
|
||||
@override String get searchingLocalServers => 'Söker efter lokala Jellyfin-servrar...';
|
||||
@override String get localServers => 'Lokala Jellyfin-servrar';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerSv extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => 'Inloggning misslyckades: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connect misslyckades: ${error}';
|
||||
@override String get addPlexTitle => 'Logga in med Plex';
|
||||
@override String get plexAuthIntro => 'Logga in med en webbläsare eller QR-kod.';
|
||||
@override String get plexQRPrompt => 'Skanna denna QR-kod för att logga in.';
|
||||
@override String get waitingForPlexConfirmation => 'Väntar på att plex.tv ska bekräfta inloggningen…';
|
||||
@override String get pinExpired => 'PIN-koden gick ut innan inloggning. Försök igen.';
|
||||
@override String get duplicatePlexAccount => 'Redan inloggad på Plex. Logga ut för att byta konto.';
|
||||
@override String failedToRegisterAccount({required Object error}) => 'Kunde inte registrera kontot: ${error}';
|
||||
@override String get enterJellyfinUrlError => 'Ange URL till din Jellyfin-server';
|
||||
@override String get addConnectionTitle => 'Lägg till anslutning';
|
||||
@override String addConnectionTitleScoped({required Object name}) => 'Lägg till i ${name}';
|
||||
@override String get addConnectionIntroGlobal => 'Lägg till en annan medieserver. Plex och Jellyfin visas tillsammans på Hem.';
|
||||
@override String get addConnectionIntroScoped => 'Lägg till en ny server, eller låna en från en annan profil.';
|
||||
@override String get signInWithPlexCard => 'Logga in med Plex';
|
||||
@override String get signInWithPlexCardSubtitle => 'Auktorisera den här enheten. Delade servrar läggs till.';
|
||||
@override String get signInWithPlexCardSubtitleScoped => 'Auktorisera ett Plex-konto. Home-användare blir profiler.';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsSv {
|
||||
'auth.or' => 'eller',
|
||||
'auth.connectToJellyfin' => 'Anslut till Jellyfin',
|
||||
'auth.useQuickConnect' => 'Använd Quick Connect',
|
||||
'auth.quickConnectCode' => 'Quick Connect-kod',
|
||||
'auth.quickConnectInstructions' => 'Öppna Quick Connect i Jellyfin och ange den här koden.',
|
||||
'auth.quickConnectWaiting' => 'Väntar på godkännande…',
|
||||
'auth.quickConnectCancel' => 'Avbryt',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsSv {
|
||||
'settings.showSeasonPostersOnTabsDescription' => 'Visa varje säsongs affisch ovanför fliken',
|
||||
'settings.tvFullCardLayout' => 'Heltäckande TV-kort',
|
||||
'settings.tvFullCardLayoutDescription' => 'Använd TV-kort med enbart bild och skådespelarnamn ovanpå',
|
||||
'settings.focusGlow' => 'Fokusglöd',
|
||||
'settings.focusGlowDescription' => 'Visa en mjuk glöd runt kortet i fokus',
|
||||
'settings.hideSpoilers' => 'Dölj spoilers för osedda avsnitt',
|
||||
'settings.hideSpoilersDescription' => 'Sudda miniatyrbilder och beskrivningar för osedda avsnitt',
|
||||
'settings.playerBackend' => 'Spelarmotor',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsSv {
|
||||
'subtitlingStyling.text' => 'Text',
|
||||
'subtitlingStyling.border' => 'Kantlinje',
|
||||
'subtitlingStyling.background' => 'Bakgrund',
|
||||
'subtitlingStyling.fontSize' => 'Teckenstorlek',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => 'Teckenstorlek',
|
||||
'subtitlingStyling.textColor' => 'Textfärg',
|
||||
'subtitlingStyling.borderSize' => 'Kantstorlek',
|
||||
'subtitlingStyling.borderColor' => 'Kantfärg',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsSv {
|
||||
'subtitlingStyling.assOverride' => 'ASS-åsidosättning',
|
||||
'subtitlingStyling.bold' => 'Fet',
|
||||
'subtitlingStyling.italic' => 'Kursiv',
|
||||
'subtitlingStyling.renderResolution' => 'Renderingsupplösning',
|
||||
'subtitlingStyling.renderResolutionScreen' => 'Skärmupplösning',
|
||||
'subtitlingStyling.renderResolutionVideo' => 'Videoupplösning',
|
||||
'mpvConfig.title' => 'mpv-konfiguration',
|
||||
'mpvConfig.description' => 'Avancerade videospelares inställningar',
|
||||
'mpvConfig.presets' => 'Förval',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsSv {
|
||||
'companionRemote.remote.retryNow' => 'Försök nu',
|
||||
'companionRemote.remote.tabRemote' => 'Fjärrkontroll',
|
||||
'companionRemote.remote.tabPlay' => 'Spela',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => 'Mer',
|
||||
'companionRemote.remote.menu' => 'Meny',
|
||||
'companionRemote.remote.tabNavigation' => 'Fliknavigering',
|
||||
'companionRemote.remote.tabDiscover' => 'Upptäck',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => 'Bibliotek',
|
||||
'companionRemote.remote.tabSearch' => 'Sök',
|
||||
'companionRemote.remote.tabDownloads' => 'Nedladdningar',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsSv {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => 'Cache använd',
|
||||
'performanceOverlay.cacheLimit' => 'Cachegräns',
|
||||
'performanceOverlay.speed' => 'Hastighet',
|
||||
'performanceOverlay.player' => 'Spelare',
|
||||
'performanceOverlay.memory' => 'Minne',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsSv {
|
||||
'trackers.libraryFilter.libraries' => 'Bibliotek',
|
||||
'trackers.libraryFilter.noLibraries' => 'Inga bibliotek tillgängliga',
|
||||
'addServer.addJellyfinTitle' => 'Lägg till Jellyfin-server',
|
||||
'addServer.jellyfinUrlIntro' => 'Ange server-URL, t.ex. `https://jellyfin.example.com`.',
|
||||
'addServer.jellyfinUrlsIntro' => 'Ange en eller flera server-URL:er, separerade med kommatecken. Plezy använder den nåbara URL:en med lägst latens.',
|
||||
'addServer.serverUrl' => 'Server-URL',
|
||||
'addServer.serverUrls' => 'Server-URL:er',
|
||||
'addServer.serverUrlsHelper' => 'Flera URL:er tillåtna, separerade med kommatecken.',
|
||||
'addServer.findServer' => 'Hitta server',
|
||||
'addServer.searchingLocalServers' => 'Söker efter lokala Jellyfin-servrar...',
|
||||
'addServer.localServers' => 'Lokala Jellyfin-servrar',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsSv {
|
||||
'addServer.signInFailed' => ({required Object error}) => 'Inloggning misslyckades: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect misslyckades: ${error}',
|
||||
'addServer.addPlexTitle' => 'Logga in med Plex',
|
||||
'addServer.plexAuthIntro' => 'Logga in med en webbläsare eller QR-kod.',
|
||||
'addServer.plexQRPrompt' => 'Skanna denna QR-kod för att logga in.',
|
||||
'addServer.waitingForPlexConfirmation' => 'Väntar på att plex.tv ska bekräfta inloggningen…',
|
||||
'addServer.pinExpired' => 'PIN-koden gick ut innan inloggning. Försök igen.',
|
||||
'addServer.duplicatePlexAccount' => 'Redan inloggad på Plex. Logga ut för att byta konto.',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => 'Kunde inte registrera kontot: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => 'Ange URL till din Jellyfin-server',
|
||||
'addServer.addConnectionTitle' => 'Lägg till anslutning',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => 'Lägg till i ${name}',
|
||||
'addServer.addConnectionIntroGlobal' => 'Lägg till en annan medieserver. Plex och Jellyfin visas tillsammans på Hem.',
|
||||
'addServer.addConnectionIntroScoped' => 'Lägg till en ny server, eller låna en från en annan profil.',
|
||||
'addServer.signInWithPlexCard' => 'Logga in med Plex',
|
||||
'addServer.signInWithPlexCardSubtitle' => 'Auktorisera den här enheten. Delade servrar läggs till.',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => 'Auktorisera ett Plex-konto. Home-användare blir profiler.',
|
||||
|
||||
+17
-21
@@ -115,7 +115,6 @@ class _TranslationsAuthZh extends TranslationsAuthEn {
|
||||
@override String get or => '或';
|
||||
@override String get connectToJellyfin => '连接到 Jellyfin';
|
||||
@override String get useQuickConnect => '使用 Quick Connect';
|
||||
@override String get quickConnectCode => 'Quick Connect 代码';
|
||||
@override String get quickConnectInstructions => '在 Jellyfin 中打开 Quick Connect 并输入此代码。';
|
||||
@override String get quickConnectWaiting => '等待批准…';
|
||||
@override String get quickConnectCancel => '取消';
|
||||
@@ -264,6 +263,8 @@ class _TranslationsSettingsZh extends TranslationsSettingsEn {
|
||||
@override String get showSeasonPostersOnTabsDescription => '在每季标签上方显示该季海报';
|
||||
@override String get tvFullCardLayout => '完整 TV 卡片';
|
||||
@override String get tvFullCardLayoutDescription => '使用仅显示图片的 TV 卡片,并叠加演员姓名';
|
||||
@override String get focusGlow => '焦点光晕';
|
||||
@override String get focusGlowDescription => '在获得焦点的卡片周围显示柔和的光晕';
|
||||
@override String get hideSpoilers => '隐藏未看剧集的剧透内容';
|
||||
@override String get hideSpoilersDescription => '模糊未观看剧集的缩略图和描述';
|
||||
@override String get playerBackend => '播放器引擎';
|
||||
@@ -729,6 +730,9 @@ class _TranslationsSubtitlingStylingZh extends TranslationsSubtitlingStylingEn {
|
||||
@override String get assOverride => 'ASS 样式覆盖';
|
||||
@override String get bold => '粗体';
|
||||
@override String get italic => '斜体';
|
||||
@override String get renderResolution => '渲染分辨率';
|
||||
@override String get renderResolutionScreen => '屏幕分辨率';
|
||||
@override String get renderResolutionVideo => '视频分辨率';
|
||||
}
|
||||
|
||||
// Path: mpvConfig
|
||||
@@ -1405,6 +1409,7 @@ class _TranslationsPerformanceOverlayZh extends TranslationsPerformanceOverlayEn
|
||||
@override String get maxCll => 'MaxCLL';
|
||||
@override String get maxFall => 'MaxFALL';
|
||||
@override String get cacheUsed => '已用缓存';
|
||||
@override String get cacheLimit => '缓存限制';
|
||||
@override String get speed => '速度';
|
||||
@override String get player => '播放器';
|
||||
@override String get memory => '内存';
|
||||
@@ -1600,10 +1605,8 @@ class _TranslationsAddServerZh extends TranslationsAddServerEn {
|
||||
|
||||
// Translations
|
||||
@override String get addJellyfinTitle => '添加 Jellyfin 服务器';
|
||||
@override String get jellyfinUrlIntro => '输入服务器 URL,例如 `https://jellyfin.example.com`。';
|
||||
@override String get jellyfinUrlsIntro => '输入一个或多个服务器 URL,用逗号分隔。Plezy 会使用可访问且延迟最低的 URL。';
|
||||
@override String get serverUrl => '服务器 URL';
|
||||
@override String get serverUrls => '服务器 URL';
|
||||
@override String get serverUrlsHelper => '可输入多个 URL,以逗号分隔。';
|
||||
@override String get findServer => '查找服务器';
|
||||
@override String get searchingLocalServers => '正在查找本地 Jellyfin 服务器...';
|
||||
@override String get localServers => '本地 Jellyfin 服务器';
|
||||
@@ -1616,17 +1619,12 @@ class _TranslationsAddServerZh extends TranslationsAddServerEn {
|
||||
@override String signInFailed({required Object error}) => '登录失败: ${error}';
|
||||
@override String quickConnectFailed({required Object error}) => 'Quick Connect 失败: ${error}';
|
||||
@override String get addPlexTitle => '使用 Plex 登录';
|
||||
@override String get plexAuthIntro => '使用浏览器或二维码登录。';
|
||||
@override String get plexQRPrompt => '扫描此 QR 码以登录。';
|
||||
@override String get waitingForPlexConfirmation => '等待 plex.tv 确认登录…';
|
||||
@override String get pinExpired => 'PIN 在登录前已过期。请重试。';
|
||||
@override String get duplicatePlexAccount => '已登录 Plex。请退出登录以切换账号。';
|
||||
@override String failedToRegisterAccount({required Object error}) => '注册帐户失败: ${error}';
|
||||
@override String get enterJellyfinUrlError => '输入你的 Jellyfin 服务器 URL';
|
||||
@override String get addConnectionTitle => '添加连接';
|
||||
@override String addConnectionTitleScoped({required Object name}) => '添加到 ${name}';
|
||||
@override String get addConnectionIntroGlobal => '添加另一个媒体服务器。Plex 和 Jellyfin 会一起显示在主页。';
|
||||
@override String get addConnectionIntroScoped => '添加新服务器,或从另一个配置文件借用。';
|
||||
@override String get signInWithPlexCard => '使用 Plex 登录';
|
||||
@override String get signInWithPlexCardSubtitle => '授权此设备。共享服务器会被添加。';
|
||||
@override String get signInWithPlexCardSubtitleScoped => '授权一个 Plex 账号。Home 用户会成为个人资料。';
|
||||
@@ -1935,7 +1933,6 @@ extension on TranslationsZh {
|
||||
'auth.or' => '或',
|
||||
'auth.connectToJellyfin' => '连接到 Jellyfin',
|
||||
'auth.useQuickConnect' => '使用 Quick Connect',
|
||||
'auth.quickConnectCode' => 'Quick Connect 代码',
|
||||
'auth.quickConnectInstructions' => '在 Jellyfin 中打开 Quick Connect 并输入此代码。',
|
||||
'auth.quickConnectWaiting' => '等待批准…',
|
||||
'auth.quickConnectCancel' => '取消',
|
||||
@@ -2048,6 +2045,8 @@ extension on TranslationsZh {
|
||||
'settings.showSeasonPostersOnTabsDescription' => '在每季标签上方显示该季海报',
|
||||
'settings.tvFullCardLayout' => '完整 TV 卡片',
|
||||
'settings.tvFullCardLayoutDescription' => '使用仅显示图片的 TV 卡片,并叠加演员姓名',
|
||||
'settings.focusGlow' => '焦点光晕',
|
||||
'settings.focusGlowDescription' => '在获得焦点的卡片周围显示柔和的光晕',
|
||||
'settings.hideSpoilers' => '隐藏未看剧集的剧透内容',
|
||||
'settings.hideSpoilersDescription' => '模糊未观看剧集的缩略图和描述',
|
||||
'settings.playerBackend' => '播放器引擎',
|
||||
@@ -2434,9 +2433,9 @@ extension on TranslationsZh {
|
||||
'subtitlingStyling.text' => '文本',
|
||||
'subtitlingStyling.border' => '边框',
|
||||
'subtitlingStyling.background' => '背景',
|
||||
'subtitlingStyling.fontSize' => '字号',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'subtitlingStyling.fontSize' => '字号',
|
||||
'subtitlingStyling.textColor' => '文本颜色',
|
||||
'subtitlingStyling.borderSize' => '边框大小',
|
||||
'subtitlingStyling.borderColor' => '边框颜色',
|
||||
@@ -2446,6 +2445,9 @@ extension on TranslationsZh {
|
||||
'subtitlingStyling.assOverride' => 'ASS 样式覆盖',
|
||||
'subtitlingStyling.bold' => '粗体',
|
||||
'subtitlingStyling.italic' => '斜体',
|
||||
'subtitlingStyling.renderResolution' => '渲染分辨率',
|
||||
'subtitlingStyling.renderResolutionScreen' => '屏幕分辨率',
|
||||
'subtitlingStyling.renderResolutionVideo' => '视频分辨率',
|
||||
'mpvConfig.title' => 'mpv 配置',
|
||||
'mpvConfig.description' => '高级视频播放器设置',
|
||||
'mpvConfig.presets' => '预设',
|
||||
@@ -2945,12 +2947,12 @@ extension on TranslationsZh {
|
||||
'companionRemote.remote.retryNow' => '立即重试',
|
||||
'companionRemote.remote.tabRemote' => '遥控',
|
||||
'companionRemote.remote.tabPlay' => '播放',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabMore' => '更多',
|
||||
'companionRemote.remote.menu' => '菜单',
|
||||
'companionRemote.remote.tabNavigation' => '标签导航',
|
||||
'companionRemote.remote.tabDiscover' => '发现',
|
||||
_ => null,
|
||||
} ?? switch (path) {
|
||||
'companionRemote.remote.tabLibraries' => '媒体库',
|
||||
'companionRemote.remote.tabSearch' => '搜索',
|
||||
'companionRemote.remote.tabDownloads' => '下载',
|
||||
@@ -3014,6 +3016,7 @@ extension on TranslationsZh {
|
||||
'performanceOverlay.maxCll' => 'MaxCLL',
|
||||
'performanceOverlay.maxFall' => 'MaxFALL',
|
||||
'performanceOverlay.cacheUsed' => '已用缓存',
|
||||
'performanceOverlay.cacheLimit' => '缓存限制',
|
||||
'performanceOverlay.speed' => '速度',
|
||||
'performanceOverlay.player' => '播放器',
|
||||
'performanceOverlay.memory' => '内存',
|
||||
@@ -3166,10 +3169,8 @@ extension on TranslationsZh {
|
||||
'trackers.libraryFilter.libraries' => '媒体库',
|
||||
'trackers.libraryFilter.noLibraries' => '没有可用的媒体库',
|
||||
'addServer.addJellyfinTitle' => '添加 Jellyfin 服务器',
|
||||
'addServer.jellyfinUrlIntro' => '输入服务器 URL,例如 `https://jellyfin.example.com`。',
|
||||
'addServer.jellyfinUrlsIntro' => '输入一个或多个服务器 URL,用逗号分隔。Plezy 会使用可访问且延迟最低的 URL。',
|
||||
'addServer.serverUrl' => '服务器 URL',
|
||||
'addServer.serverUrls' => '服务器 URL',
|
||||
'addServer.serverUrlsHelper' => '可输入多个 URL,以逗号分隔。',
|
||||
'addServer.findServer' => '查找服务器',
|
||||
'addServer.searchingLocalServers' => '正在查找本地 Jellyfin 服务器...',
|
||||
'addServer.localServers' => '本地 Jellyfin 服务器',
|
||||
@@ -3182,17 +3183,12 @@ extension on TranslationsZh {
|
||||
'addServer.signInFailed' => ({required Object error}) => '登录失败: ${error}',
|
||||
'addServer.quickConnectFailed' => ({required Object error}) => 'Quick Connect 失败: ${error}',
|
||||
'addServer.addPlexTitle' => '使用 Plex 登录',
|
||||
'addServer.plexAuthIntro' => '使用浏览器或二维码登录。',
|
||||
'addServer.plexQRPrompt' => '扫描此 QR 码以登录。',
|
||||
'addServer.waitingForPlexConfirmation' => '等待 plex.tv 确认登录…',
|
||||
'addServer.pinExpired' => 'PIN 在登录前已过期。请重试。',
|
||||
'addServer.duplicatePlexAccount' => '已登录 Plex。请退出登录以切换账号。',
|
||||
'addServer.failedToRegisterAccount' => ({required Object error}) => '注册帐户失败: ${error}',
|
||||
'addServer.enterJellyfinUrlError' => '输入你的 Jellyfin 服务器 URL',
|
||||
'addServer.addConnectionTitle' => '添加连接',
|
||||
'addServer.addConnectionTitleScoped' => ({required Object name}) => '添加到 ${name}',
|
||||
'addServer.addConnectionIntroGlobal' => '添加另一个媒体服务器。Plex 和 Jellyfin 会一起显示在主页。',
|
||||
'addServer.addConnectionIntroScoped' => '添加新服务器,或从另一个配置文件借用。',
|
||||
'addServer.signInWithPlexCard' => '使用 Plex 登录',
|
||||
'addServer.signInWithPlexCardSubtitle' => '授权此设备。共享服务器会被添加。',
|
||||
'addServer.signInWithPlexCardSubtitleScoped' => '授权一个 Plex 账号。Home 用户会成为个人资料。',
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "eller",
|
||||
"connectToJellyfin": "Anslut till Jellyfin",
|
||||
"useQuickConnect": "Använd Quick Connect",
|
||||
"quickConnectCode": "Quick Connect-kod",
|
||||
"quickConnectInstructions": "Öppna Quick Connect i Jellyfin och ange den här koden.",
|
||||
"quickConnectWaiting": "Väntar på godkännande…",
|
||||
"quickConnectCancel": "Avbryt",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "Visa varje säsongs affisch ovanför fliken",
|
||||
"tvFullCardLayout": "Heltäckande TV-kort",
|
||||
"tvFullCardLayoutDescription": "Använd TV-kort med enbart bild och skådespelarnamn ovanpå",
|
||||
"focusGlow": "Fokusglöd",
|
||||
"focusGlowDescription": "Visa en mjuk glöd runt kortet i fokus",
|
||||
"hideSpoilers": "Dölj spoilers för osedda avsnitt",
|
||||
"hideSpoilersDescription": "Sudda miniatyrbilder och beskrivningar för osedda avsnitt",
|
||||
"playerBackend": "Spelarmotor",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "Position",
|
||||
"assOverride": "ASS-åsidosättning",
|
||||
"bold": "Fet",
|
||||
"italic": "Kursiv"
|
||||
"italic": "Kursiv",
|
||||
"renderResolution": "Renderingsupplösning",
|
||||
"renderResolutionScreen": "Skärmupplösning",
|
||||
"renderResolutionVideo": "Videoupplösning"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv-konfiguration",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "Cache använd",
|
||||
"cacheLimit": "Cachegräns",
|
||||
"speed": "Hastighet",
|
||||
"player": "Spelare",
|
||||
"memory": "Minne",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "Lägg till Jellyfin-server",
|
||||
"jellyfinUrlIntro": "Ange server-URL, t.ex. `https://jellyfin.example.com`.",
|
||||
"jellyfinUrlsIntro": "Ange en eller flera server-URL:er, separerade med kommatecken. Plezy använder den nåbara URL:en med lägst latens.",
|
||||
"serverUrl": "Server-URL",
|
||||
"serverUrls": "Server-URL:er",
|
||||
"serverUrlsHelper": "Flera URL:er tillåtna, separerade med kommatecken.",
|
||||
"findServer": "Hitta server",
|
||||
"searchingLocalServers": "Söker efter lokala Jellyfin-servrar...",
|
||||
"localServers": "Lokala Jellyfin-servrar",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "Inloggning misslyckades: ${error}",
|
||||
"quickConnectFailed": "Quick Connect misslyckades: ${error}",
|
||||
"addPlexTitle": "Logga in med Plex",
|
||||
"plexAuthIntro": "Logga in med en webbläsare eller QR-kod.",
|
||||
"plexQRPrompt": "Skanna denna QR-kod för att logga in.",
|
||||
"waitingForPlexConfirmation": "Väntar på att plex.tv ska bekräfta inloggningen…",
|
||||
"pinExpired": "PIN-koden gick ut innan inloggning. Försök igen.",
|
||||
"duplicatePlexAccount": "Redan inloggad på Plex. Logga ut för att byta konto.",
|
||||
"failedToRegisterAccount": "Kunde inte registrera kontot: ${error}",
|
||||
"enterJellyfinUrlError": "Ange URL till din Jellyfin-server",
|
||||
"addConnectionTitle": "Lägg till anslutning",
|
||||
"addConnectionTitleScoped": "Lägg till i ${name}",
|
||||
"addConnectionIntroGlobal": "Lägg till en annan medieserver. Plex och Jellyfin visas tillsammans på Hem.",
|
||||
"addConnectionIntroScoped": "Lägg till en ny server, eller låna en från en annan profil.",
|
||||
"signInWithPlexCard": "Logga in med Plex",
|
||||
"signInWithPlexCardSubtitle": "Auktorisera den här enheten. Delade servrar läggs till.",
|
||||
"signInWithPlexCardSubtitleScoped": "Auktorisera ett Plex-konto. Home-användare blir profiler.",
|
||||
|
||||
+8
-10
@@ -14,7 +14,6 @@
|
||||
"or": "或",
|
||||
"connectToJellyfin": "连接到 Jellyfin",
|
||||
"useQuickConnect": "使用 Quick Connect",
|
||||
"quickConnectCode": "Quick Connect 代码",
|
||||
"quickConnectInstructions": "在 Jellyfin 中打开 Quick Connect 并输入此代码。",
|
||||
"quickConnectWaiting": "等待批准…",
|
||||
"quickConnectCancel": "取消",
|
||||
@@ -135,6 +134,8 @@
|
||||
"showSeasonPostersOnTabsDescription": "在每季标签上方显示该季海报",
|
||||
"tvFullCardLayout": "完整 TV 卡片",
|
||||
"tvFullCardLayoutDescription": "使用仅显示图片的 TV 卡片,并叠加演员姓名",
|
||||
"focusGlow": "焦点光晕",
|
||||
"focusGlowDescription": "在获得焦点的卡片周围显示柔和的光晕",
|
||||
"hideSpoilers": "隐藏未看剧集的剧透内容",
|
||||
"hideSpoilersDescription": "模糊未观看剧集的缩略图和描述",
|
||||
"playerBackend": "播放器引擎",
|
||||
@@ -556,7 +557,10 @@
|
||||
"position": "位置",
|
||||
"assOverride": "ASS 样式覆盖",
|
||||
"bold": "粗体",
|
||||
"italic": "斜体"
|
||||
"italic": "斜体",
|
||||
"renderResolution": "渲染分辨率",
|
||||
"renderResolutionScreen": "屏幕分辨率",
|
||||
"renderResolutionVideo": "视频分辨率"
|
||||
},
|
||||
"mpvConfig": {
|
||||
"title": "mpv 配置",
|
||||
@@ -1183,6 +1187,7 @@
|
||||
"maxCll": "MaxCLL",
|
||||
"maxFall": "MaxFALL",
|
||||
"cacheUsed": "已用缓存",
|
||||
"cacheLimit": "缓存限制",
|
||||
"speed": "速度",
|
||||
"player": "播放器",
|
||||
"memory": "内存",
|
||||
@@ -1357,10 +1362,8 @@
|
||||
},
|
||||
"addServer": {
|
||||
"addJellyfinTitle": "添加 Jellyfin 服务器",
|
||||
"jellyfinUrlIntro": "输入服务器 URL,例如 `https://jellyfin.example.com`。",
|
||||
"jellyfinUrlsIntro": "输入一个或多个服务器 URL,用逗号分隔。Plezy 会使用可访问且延迟最低的 URL。",
|
||||
"serverUrl": "服务器 URL",
|
||||
"serverUrls": "服务器 URL",
|
||||
"serverUrlsHelper": "可输入多个 URL,以逗号分隔。",
|
||||
"findServer": "查找服务器",
|
||||
"searchingLocalServers": "正在查找本地 Jellyfin 服务器...",
|
||||
"localServers": "本地 Jellyfin 服务器",
|
||||
@@ -1373,17 +1376,12 @@
|
||||
"signInFailed": "登录失败: ${error}",
|
||||
"quickConnectFailed": "Quick Connect 失败: ${error}",
|
||||
"addPlexTitle": "使用 Plex 登录",
|
||||
"plexAuthIntro": "使用浏览器或二维码登录。",
|
||||
"plexQRPrompt": "扫描此 QR 码以登录。",
|
||||
"waitingForPlexConfirmation": "等待 plex.tv 确认登录…",
|
||||
"pinExpired": "PIN 在登录前已过期。请重试。",
|
||||
"duplicatePlexAccount": "已登录 Plex。请退出登录以切换账号。",
|
||||
"failedToRegisterAccount": "注册帐户失败: ${error}",
|
||||
"enterJellyfinUrlError": "输入你的 Jellyfin 服务器 URL",
|
||||
"addConnectionTitle": "添加连接",
|
||||
"addConnectionTitleScoped": "添加到 ${name}",
|
||||
"addConnectionIntroGlobal": "添加另一个媒体服务器。Plex 和 Jellyfin 会一起显示在主页。",
|
||||
"addConnectionIntroScoped": "添加新服务器,或从另一个配置文件借用。",
|
||||
"signInWithPlexCard": "使用 Plex 登录",
|
||||
"signInWithPlexCardSubtitle": "授权此设备。共享服务器会被添加。",
|
||||
"signInWithPlexCardSubtitleScoped": "授权一个 Plex 账号。Home 用户会成为个人资料。",
|
||||
|
||||
+184
-170
@@ -27,6 +27,7 @@ import 'screens/auth_screen.dart';
|
||||
import 'screens/profile/pin_entry_dialog.dart';
|
||||
import 'screens/profile/profile_switch_screen.dart';
|
||||
import 'services/storage_service.dart';
|
||||
import 'services/device_performance.dart';
|
||||
import 'services/macos_window_service.dart';
|
||||
import 'services/native_window_service.dart';
|
||||
import 'services/fullscreen_state_manager.dart';
|
||||
@@ -47,6 +48,7 @@ import 'providers/multi_server_provider.dart';
|
||||
import 'providers/theme_provider.dart';
|
||||
import 'providers/hidden_libraries_provider.dart';
|
||||
import 'providers/libraries_provider.dart';
|
||||
import 'providers/discover_provider.dart';
|
||||
import 'providers/playback_state_provider.dart';
|
||||
import 'providers/download_provider.dart';
|
||||
import 'providers/offline_mode_provider.dart';
|
||||
@@ -93,13 +95,13 @@ const String _sentryDist = String.fromEnvironment('SENTRY_DIST');
|
||||
bool _zeroOffsetPointerGuardInstalled = false;
|
||||
|
||||
void _installZeroOffsetPointerGuard() {
|
||||
if (_zeroOffsetPointerGuardInstalled) return;
|
||||
if (_zeroOffsetPointerGuardInstalled || !Platform.isIOS) return;
|
||||
GestureBinding.instance.pointerRouter.addGlobalRoute(_absorbZeroOffsetPointerEvent);
|
||||
_zeroOffsetPointerGuardInstalled = true;
|
||||
}
|
||||
|
||||
void _absorbZeroOffsetPointerEvent(PointerEvent event) {
|
||||
if (event.position == Offset.zero) {
|
||||
if (event is PointerDownEvent && event.position == Offset.zero) {
|
||||
GestureBinding.instance.cancelPointer(event.pointer);
|
||||
}
|
||||
}
|
||||
@@ -176,15 +178,6 @@ Future<void> _bootstrapApp() async {
|
||||
await settings.write(SettingsService.cleanedOldImageCache, true);
|
||||
}
|
||||
|
||||
// Configure image cache — keep budget modest to leave headroom for Skia decode buffers
|
||||
if (PlatformDetector.isDesktopOS()) {
|
||||
PaintingBinding.instance.imageCache.maximumSize = 1000;
|
||||
PaintingBinding.instance.imageCache.maximumSizeBytes = 150 << 20; // 150MB
|
||||
} else {
|
||||
PaintingBinding.instance.imageCache.maximumSize = 800;
|
||||
PaintingBinding.instance.imageCache.maximumSizeBytes = 100 << 20; // 100MB
|
||||
}
|
||||
|
||||
final futures = <Future<void>>[];
|
||||
|
||||
if (PlatformDetector.isDesktopOS()) {
|
||||
@@ -199,6 +192,8 @@ Future<void> _bootstrapApp() async {
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
futures.add(TvDetectionService.getInstance(forceTv: settings.read(SettingsService.forceTvMode)));
|
||||
}
|
||||
// Visual-effects tier (auto-detects low-end Android; full elsewhere).
|
||||
futures.add(DevicePerformance.getInstance(override: settings.read(SettingsService.visualEffects)));
|
||||
if (Platform.isAndroid) {
|
||||
PipService();
|
||||
}
|
||||
@@ -212,6 +207,10 @@ Future<void> _bootstrapApp() async {
|
||||
await Future.wait(futures);
|
||||
final storage = await storageFuture;
|
||||
|
||||
// Configure image cache — keep budget modest to leave headroom for Skia
|
||||
// decode buffers. Runs after the futures so the effects tier is resolved.
|
||||
DevicePerformance.applyImageCacheBudget();
|
||||
|
||||
// The PLEX_TOKEN dart-define (screenshot automation) is consumed by
|
||||
// [ConnectionBootstrap.seedFromDevTokenDefine] later, when the registry
|
||||
// is available — keeps the deprecated legacy slots out of runtime paths.
|
||||
@@ -225,7 +224,10 @@ Future<void> _bootstrapApp() async {
|
||||
if (Platform.isAndroid) {
|
||||
renderer = ' [${await const MethodChannel('com.plezy/theme').invokeMethod<String>('getRenderer')}]';
|
||||
}
|
||||
appLogger.i('Plezy v${packageInfo.version}+${packageInfo.buildNumber}$commitSuffix$renderer');
|
||||
appLogger.i(
|
||||
'Plezy v${packageInfo.version}+${packageInfo.buildNumber}$commitSuffix$renderer'
|
||||
' [effects: ${DevicePerformance.describeSync()}]',
|
||||
);
|
||||
|
||||
await DownloadStorageService.instance.initialize(settings);
|
||||
|
||||
@@ -285,10 +287,17 @@ FutureOr<SentryEvent?> _beforeSend(SentryEvent event, Hint _) {
|
||||
if (exceptions != null) {
|
||||
bool shouldDrop(SentryException e) {
|
||||
final v = e.value;
|
||||
final lowerValue = v?.toLowerCase();
|
||||
// Windows file-lock errors from cache manager cleanup
|
||||
if (e.type == 'FileSystemException' && v != null && v.contains('plexImageCache') && v.contains('errno = 32')) {
|
||||
return true;
|
||||
}
|
||||
if (e.type == 'FileSystemException' &&
|
||||
lowerValue != null &&
|
||||
lowerValue.contains('cached_network_image_ce') &&
|
||||
(lowerValue.contains('lock failed') || lowerValue.contains('writefrom failed'))) {
|
||||
return true;
|
||||
}
|
||||
// Linux without DBus/NetworkManager
|
||||
if (e.type == 'DBusServiceUnknownException' || (v != null && v.contains('system_bus_socket'))) {
|
||||
return true;
|
||||
@@ -443,7 +452,11 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
|
||||
late final OfflineWatchSyncService _offlineWatchSyncService;
|
||||
late final AppLifecycleListener _appLifecycleListener;
|
||||
StreamSubscription<WatchStateEvent>? _watchStateSubscription;
|
||||
StreamSubscription<List<ConnectivityResult>>? _connectivitySubscription;
|
||||
|
||||
/// WiFi-reconnect sync trigger, listening on [OfflineModeProvider] — the
|
||||
/// app's single connectivity subscription lives there.
|
||||
VoidCallback? _connectivitySyncListener;
|
||||
OfflineModeProvider? _connectivitySyncProvider;
|
||||
Timer? _syncDebounce;
|
||||
final Set<String> _pendingSyncKeys = <String>{};
|
||||
bool _isAutoDeleteRunning = false;
|
||||
@@ -479,13 +492,11 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
|
||||
PlexApiCache.initialize(_appDatabase);
|
||||
JellyfinApiCache.initialize(_appDatabase);
|
||||
|
||||
_downloadManager = DownloadManagerService(database: _appDatabase, storageService: DownloadStorageService.instance);
|
||||
_downloadManager.setClientResolver((serverId, {clientScopeId}) {
|
||||
if (clientScopeId != null && clientScopeId.isNotEmpty) {
|
||||
return _serverManager.getJellyfinClientByCompoundId(clientScopeId) ?? _serverManager.getClient(serverId);
|
||||
}
|
||||
return _serverManager.getClient(serverId);
|
||||
});
|
||||
_downloadManager = DownloadManagerService(
|
||||
database: _appDatabase,
|
||||
storageService: DownloadStorageService.instance,
|
||||
clientResolver: _serverManager.resolveDownloadClient,
|
||||
);
|
||||
_downloadManager.recoveryFuture = _downloadManager.recoverInterruptedDownloads();
|
||||
|
||||
_offlineWatchSyncService = OfflineWatchSyncService(database: _appDatabase, serverManager: _serverManager);
|
||||
@@ -493,6 +504,9 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
|
||||
// Trakt sync service (subscribes to WatchStateNotifier, requires serverManager
|
||||
// to resolve PlexClients for GUID lookups).
|
||||
TraktSyncService.instance.initialize(serverManager: _serverManager);
|
||||
// Tracker singletons init once per app; per-profile hydration happens in
|
||||
// the profile-scoped provider subtree's create callbacks.
|
||||
unawaited(TrackerCoordinator.instance.initialize());
|
||||
|
||||
_appLifecycleListener = AppLifecycleListener(
|
||||
onExitRequested: () async {
|
||||
@@ -508,7 +522,7 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
|
||||
|
||||
_syncDebounce?.cancel();
|
||||
await _watchStateSubscription?.cancel();
|
||||
await _connectivitySubscription?.cancel();
|
||||
_removeConnectivitySyncListener();
|
||||
_memoryCheckTimer?.cancel();
|
||||
|
||||
_downloadManager.dispose();
|
||||
@@ -529,7 +543,7 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
|
||||
void dispose() {
|
||||
_syncDebounce?.cancel();
|
||||
_watchStateSubscription?.cancel();
|
||||
_connectivitySubscription?.cancel();
|
||||
_removeConnectivitySyncListener();
|
||||
_memoryCheckTimer?.cancel();
|
||||
_appLifecycleListener.dispose();
|
||||
if (!_shutdownStarted) {
|
||||
@@ -553,38 +567,32 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
|
||||
}
|
||||
|
||||
/// Fires [_autoDeleteAndSync] on each WiFi/Ethernet reconnect so rules run
|
||||
/// as soon as the device is back online. Rapid flapping is bounded by the
|
||||
/// executor's cooldown.
|
||||
void _startConnectivitySyncTrigger(DownloadProvider downloadProvider) {
|
||||
Future<void> setup() async {
|
||||
try {
|
||||
final initial = await Connectivity().checkConnectivity();
|
||||
_lastConnectivityWasWifi = _hasWifiOrEthernet(initial);
|
||||
} catch (e) {
|
||||
appLogger.w('Initial connectivity read failed, defaulting to false: $e');
|
||||
_lastConnectivityWasWifi = false;
|
||||
/// as soon as the device is back online. Listens on [OfflineModeProvider],
|
||||
/// which owns the app's single connectivity subscription and notifies on
|
||||
/// connection-type changes. Rapid flapping is bounded by the executor's
|
||||
/// cooldown.
|
||||
void _startConnectivitySyncTrigger(DownloadProvider downloadProvider, OfflineModeProvider offlineModeProvider) {
|
||||
_removeConnectivitySyncListener();
|
||||
_lastConnectivityWasWifi = offlineModeProvider.hasWifiOrEthernet;
|
||||
_connectivitySyncProvider = offlineModeProvider;
|
||||
_connectivitySyncListener = () {
|
||||
final hasWifi = offlineModeProvider.hasWifiOrEthernet;
|
||||
final transitioned = hasWifi && !_lastConnectivityWasWifi;
|
||||
_lastConnectivityWasWifi = hasWifi;
|
||||
if (transitioned) {
|
||||
appLogger.d('Connectivity moved onto WiFi/Ethernet — triggering sync pass');
|
||||
_autoDeleteAndSync(downloadProvider);
|
||||
}
|
||||
|
||||
try {
|
||||
_connectivitySubscription = Connectivity().onConnectivityChanged.listen((results) {
|
||||
final hasWifi = _hasWifiOrEthernet(results);
|
||||
final transitioned = hasWifi && !_lastConnectivityWasWifi;
|
||||
_lastConnectivityWasWifi = hasWifi;
|
||||
if (transitioned) {
|
||||
appLogger.d('Connectivity moved onto WiFi/Ethernet — triggering sync pass');
|
||||
_autoDeleteAndSync(downloadProvider);
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
appLogger.w('Could not subscribe to connectivity changes: $e');
|
||||
}
|
||||
}
|
||||
|
||||
setup();
|
||||
};
|
||||
offlineModeProvider.addListener(_connectivitySyncListener!);
|
||||
}
|
||||
|
||||
static bool _hasWifiOrEthernet(List<ConnectivityResult> results) =>
|
||||
results.contains(ConnectivityResult.wifi) || results.contains(ConnectivityResult.ethernet);
|
||||
void _removeConnectivitySyncListener() {
|
||||
final listener = _connectivitySyncListener;
|
||||
if (listener != null) _connectivitySyncProvider?.removeListener(listener);
|
||||
_connectivitySyncListener = null;
|
||||
_connectivitySyncProvider = null;
|
||||
}
|
||||
|
||||
/// Run auto-delete (if enabled) and then a sync-rule pass.
|
||||
///
|
||||
@@ -775,18 +783,6 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
|
||||
return provider;
|
||||
},
|
||||
),
|
||||
ChangeNotifierProxyProvider2<ActiveProfileProvider, MultiServerProvider, WatchStateStore>(
|
||||
create: (_) => WatchStateStore(),
|
||||
update: (_, activeProfile, multiServer, previous) {
|
||||
final provider = previous ?? WatchStateStore();
|
||||
provider.setActiveProfileId(activeProfile.activeId);
|
||||
provider.setActiveClientScopesByServer({
|
||||
for (final serverId in multiServer.serverManager.serverIds)
|
||||
serverId: multiServer.serverManager.getClient(ServerId(serverId))?.cacheServerId,
|
||||
});
|
||||
return provider;
|
||||
},
|
||||
),
|
||||
ChangeNotifierProxyProvider<ActiveProfileProvider, OfflineWatchSyncService>(
|
||||
create: (context) {
|
||||
final offlineModeProvider = context.read<OfflineModeProvider>();
|
||||
@@ -821,7 +817,7 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
|
||||
});
|
||||
});
|
||||
|
||||
_startConnectivitySyncTrigger(downloadProvider);
|
||||
_startConnectivitySyncTrigger(downloadProvider, offlineModeProvider);
|
||||
|
||||
// Thread the offline flag into services so queue/resume paths can
|
||||
// short-circuit instead of hitting the network and failing.
|
||||
@@ -859,41 +855,110 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
|
||||
},
|
||||
),
|
||||
ChangeNotifierProvider(create: (context) => ThemeProvider()),
|
||||
// Tracker accounts — depend on UserProfileProvider for per-profile
|
||||
// session scoping. Hydrated and rebound by `_TrackerProfileBootstrap`.
|
||||
ChangeNotifierProvider(create: (context) => TraktAccountProvider()),
|
||||
ChangeNotifierProvider(create: (context) => TrackersProvider()),
|
||||
ChangeNotifierProvider(
|
||||
create: (context) => HiddenLibrariesProvider(storageService: context.read<StorageService>()),
|
||||
lazy: true,
|
||||
),
|
||||
ChangeNotifierProvider(
|
||||
create: (context) {
|
||||
final provider = LibrariesProvider(storageService: context.read<StorageService>());
|
||||
// Reload libraries when a new server comes online. Servers bind in
|
||||
// waves on sign-in / profile switch and slow ones reconnect after
|
||||
// the initial load; without this they stay missing from the sidebar
|
||||
// until a profile re-switch or restart.
|
||||
context.read<MultiServerProvider>().onOnlineServersChanged = provider.syncToOnlineServers;
|
||||
return provider;
|
||||
},
|
||||
),
|
||||
ChangeNotifierProvider(create: (context) => PlaybackStateProvider()),
|
||||
ChangeNotifierProvider(create: (context) => WatchTogetherProvider()),
|
||||
ChangeNotifierProvider(create: (context) => CompanionRemoteProvider()),
|
||||
// Shader presets are app-global — deliberately outside the
|
||||
// profile-scoped subtree below.
|
||||
ChangeNotifierProvider(create: (context) => ShaderProvider()),
|
||||
],
|
||||
child: Consumer<ThemeProvider>(
|
||||
builder: (context, themeProvider, child) {
|
||||
return TranslationProvider(
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final trakt = context.read<TraktAccountProvider>();
|
||||
final trackers = context.read<TrackersProvider>();
|
||||
return _TrackerProfileBootstrap(
|
||||
onProfileChanged: [trakt.onActiveProfileChanged, trackers.onActiveProfileChanged],
|
||||
onFirstMount: TrackerCoordinator.instance.initialize,
|
||||
child: Listener(
|
||||
// Profile boundary: everything below is profile-scoped BY TREE
|
||||
// POSITION. Switching the active profile changes the KeyedSubtree key,
|
||||
// which disposes and recreates the inner providers and the whole app
|
||||
// shell — including navigation, so routes showing the previous
|
||||
// profile's content cannot survive into the next. A provider belongs in
|
||||
// the inner list when its state is per-profile; app-global state
|
||||
// (theme, shader presets, downloads, server manager) stays above.
|
||||
// Shared singletons that span profiles (DownloadProvider's sync rules,
|
||||
// OfflineWatchSyncService) keep their explicit setActiveProfileId
|
||||
// wiring instead.
|
||||
child: Consumer<ActiveProfileProvider>(
|
||||
builder: (context, activeProfile, _) {
|
||||
final activeId = activeProfile.activeId;
|
||||
return KeyedSubtree(
|
||||
key: ValueKey<String?>(activeId),
|
||||
child: MultiProvider(
|
||||
providers: [
|
||||
ChangeNotifierProxyProvider<MultiServerProvider, WatchStateStore>(
|
||||
create: (_) => WatchStateStore(),
|
||||
update: (_, multiServer, previous) {
|
||||
final provider = previous ?? WatchStateStore();
|
||||
provider.setActiveProfileId(activeId);
|
||||
provider.setActiveClientScopesByServer({
|
||||
for (final serverId in multiServer.serverManager.serverIds)
|
||||
serverId: multiServer.serverManager.getClient(ServerId(serverId))?.cacheServerId,
|
||||
});
|
||||
return provider;
|
||||
},
|
||||
),
|
||||
// Tracker accounts hydrate for the active profile on create —
|
||||
// the subtree remount on profile switch is the rebind.
|
||||
ChangeNotifierProvider(
|
||||
create: (context) {
|
||||
final provider = TraktAccountProvider();
|
||||
unawaited(
|
||||
provider.onActiveProfileChanged(activeId).catchError((Object e, StackTrace s) {
|
||||
appLogger.w('Trakt profile hydrate failed', error: e, stackTrace: s);
|
||||
}),
|
||||
);
|
||||
return provider;
|
||||
},
|
||||
),
|
||||
ChangeNotifierProvider(
|
||||
create: (context) {
|
||||
final provider = TrackersProvider();
|
||||
unawaited(
|
||||
provider.onActiveProfileChanged(activeId).catchError((Object e, StackTrace s) {
|
||||
appLogger.w('Trackers profile hydrate failed', error: e, stackTrace: s);
|
||||
}),
|
||||
);
|
||||
return provider;
|
||||
},
|
||||
),
|
||||
ChangeNotifierProvider(
|
||||
create: (context) => HiddenLibrariesProvider(storageService: context.read<StorageService>()),
|
||||
lazy: true,
|
||||
),
|
||||
ChangeNotifierProvider(
|
||||
create: (context) => LibrariesProvider(
|
||||
storageService: context.read<StorageService>(),
|
||||
multiServer: context.read<MultiServerProvider>(),
|
||||
),
|
||||
),
|
||||
ChangeNotifierProvider(
|
||||
create: (context) {
|
||||
final activeProfile = context.read<ActiveProfileProvider>();
|
||||
return DiscoverProvider(
|
||||
context.read<MultiServerProvider>(),
|
||||
context.read<HiddenLibrariesProvider>(),
|
||||
context.read<LibrariesProvider>(),
|
||||
isProfileBinding: () => activeProfile.isBinding,
|
||||
);
|
||||
},
|
||||
),
|
||||
ChangeNotifierProvider(create: (context) => PlaybackStateProvider()),
|
||||
ChangeNotifierProvider(create: (context) => WatchTogetherProvider()),
|
||||
ChangeNotifierProvider(create: (context) => CompanionRemoteProvider()),
|
||||
],
|
||||
child: const _AppShell(),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// The app shell below the profile boundary: theme consumer, translations,
|
||||
/// global input handling, and the MaterialApp.
|
||||
class _AppShell extends StatelessWidget {
|
||||
const _AppShell();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Consumer<ThemeProvider>(
|
||||
builder: (context, themeProvider, child) {
|
||||
return TranslationProvider(
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
return Listener(
|
||||
onPointerDown: (event) {
|
||||
if ((event.buttons & kBackMouseButton) != 0) {
|
||||
rootNavigatorKey.currentState?.maybePop();
|
||||
@@ -933,14 +998,12 @@ class _MainAppState extends State<MainApp> with WidgetsBindingObserver {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -993,69 +1056,6 @@ class _AppleTvScale extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
/// Hydrates Trakt and MAL/AniList/Simkl providers with the active profile's
|
||||
/// sessions and rebinds their services whenever the user switches profiles.
|
||||
///
|
||||
/// Lives high in the widget tree (above MaterialApp) so the listener survives
|
||||
/// route changes. [onFirstMount] runs exactly once after the first
|
||||
/// `didChangeDependencies`.
|
||||
class _TrackerProfileBootstrap extends StatefulWidget {
|
||||
final Widget child;
|
||||
final List<Future<void> Function(String? profileId)> onProfileChanged;
|
||||
final VoidCallback? onFirstMount;
|
||||
|
||||
const _TrackerProfileBootstrap({required this.child, required this.onProfileChanged, this.onFirstMount});
|
||||
|
||||
@override
|
||||
State<_TrackerProfileBootstrap> createState() => _TrackerProfileBootstrapState();
|
||||
}
|
||||
|
||||
class _TrackerProfileBootstrapState extends State<_TrackerProfileBootstrap> {
|
||||
ActiveProfileProvider? _provider;
|
||||
String? _lastId;
|
||||
bool _initialized = false;
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
final provider = context.read<ActiveProfileProvider>();
|
||||
|
||||
if (!identical(_provider, provider)) {
|
||||
_provider?.removeListener(_onProfileChanged);
|
||||
_provider = provider;
|
||||
_provider!.addListener(_onProfileChanged);
|
||||
}
|
||||
|
||||
if (!_initialized) {
|
||||
_initialized = true;
|
||||
widget.onFirstMount?.call();
|
||||
_onProfileChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void _onProfileChanged() {
|
||||
final id = _provider?.activeId;
|
||||
if (id == _lastId) return;
|
||||
_lastId = id;
|
||||
for (final fn in widget.onProfileChanged) {
|
||||
unawaited(
|
||||
fn(id).catchError((Object e, StackTrace s) {
|
||||
appLogger.w('Tracker profile bootstrap failed', error: e, stackTrace: s);
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_provider?.removeListener(_onProfileChanged);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => widget.child;
|
||||
}
|
||||
|
||||
class OrientationAwareSetup extends StatefulWidget {
|
||||
const OrientationAwareSetup({super.key});
|
||||
|
||||
@@ -1308,13 +1308,26 @@ class _SetupScreenState extends State<SetupScreen> with MountedSetStateMixin {
|
||||
|
||||
/// Wire per-server status updates from [MultiServerManager] into the
|
||||
/// splash list so the user sees check/cross marks land as the binder
|
||||
/// brings each client online. Best-effort: stops listening when the
|
||||
/// state goes away.
|
||||
/// brings each client online. [MultiServerManager.connectProgressStream]
|
||||
/// fires as each individual server settles; [MultiServerManager.statusStream]
|
||||
/// emits once per connect pass and back-fills anything the progress stream
|
||||
/// missed (e.g. servers torn down by the binder's visibility sweep).
|
||||
/// Best-effort: stops listening when the state goes away.
|
||||
StreamSubscription<Map<String, bool>>? _statusSub;
|
||||
StreamSubscription<({String serverId, bool online})>? _connectProgressSub;
|
||||
|
||||
void _bindServerStatusListener(ActiveProfileProvider _, MultiServerManager Function() resolveManager) {
|
||||
_statusSub?.cancel();
|
||||
_connectProgressSub?.cancel();
|
||||
final manager = resolveManager();
|
||||
_connectProgressSub = manager.connectProgressStream.listen((progress) {
|
||||
if (!mounted) return;
|
||||
final existing = _serverStatus[progress.serverId];
|
||||
if (existing == null) return;
|
||||
setState(() {
|
||||
_serverStatus[progress.serverId] = (existing.$1, progress.online);
|
||||
});
|
||||
});
|
||||
_statusSub = manager.statusStream.listen((status) {
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
@@ -1333,6 +1346,7 @@ class _SetupScreenState extends State<SetupScreen> with MountedSetStateMixin {
|
||||
@override
|
||||
void dispose() {
|
||||
_statusSub?.cancel();
|
||||
_connectProgressSub?.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import '../models/livetv_capture_buffer.dart';
|
||||
import '../models/livetv_channel.dart';
|
||||
import '../models/livetv_dvr.dart';
|
||||
import '../models/livetv_lineup.dart';
|
||||
@@ -16,6 +17,74 @@ class LiveTvActivityResult<T> {
|
||||
const LiveTvActivityResult({required this.value, this.activityUuid});
|
||||
}
|
||||
|
||||
/// Program info captured when a live session starts. Plex's tune response
|
||||
/// carries the airing program; Jellyfin streams the channel without a
|
||||
/// program-scoped session, so its sessions report [none].
|
||||
class LiveProgramInfo {
|
||||
/// Program identifier for timeline reporting (Plex program ratingKey).
|
||||
final String? id;
|
||||
final int? durationMs;
|
||||
|
||||
/// Program start, epoch seconds.
|
||||
final int? beginsAt;
|
||||
|
||||
const LiveProgramInfo({this.id, this.durationMs, this.beginsAt});
|
||||
|
||||
static const none = LiveProgramInfo();
|
||||
}
|
||||
|
||||
/// One live-TV playback session, produced by [LiveTvSupport.startPlayback].
|
||||
///
|
||||
/// This is the backend-neutral handle the player drives; the
|
||||
/// `client is PlexClient` branches that used to live in the player's live
|
||||
/// methods are the per-backend implementations of this interface:
|
||||
///
|
||||
/// - **Plex** tunes a DVR transcode session ([captureBuffer] non-null when
|
||||
/// the server has seekable history) and rebuilds its stream URL for
|
||||
/// time-shift; heartbeats go to `/:/timeline` and return capture-buffer
|
||||
/// updates.
|
||||
/// - **Jellyfin** negotiates one direct stream URL up front; no time-shift,
|
||||
/// heartbeats go through `/Sessions/Playing*`, and [recover] re-uses the
|
||||
/// same URL.
|
||||
///
|
||||
/// Sessions are immutable handles: every operation that changes the playable
|
||||
/// stream returns a URL or a fresh session for the caller to adopt, so the
|
||||
/// player's runtime state has a single adoption point.
|
||||
///
|
||||
/// Sessions are pinned to the client that created them. If that server is
|
||||
/// removed/signed out mid-playback, [recover] and heartbeats fail against the
|
||||
/// closed client by design — the player surfaces the error and backs out.
|
||||
abstract class LiveTvPlaybackSession {
|
||||
LiveProgramInfo get program;
|
||||
|
||||
/// Seekable-history snapshot from session start. Heartbeats may return
|
||||
/// fresher ones ([reportTimeline]); the caller owns tracking the current
|
||||
/// value.
|
||||
CaptureBuffer? get captureBuffer;
|
||||
|
||||
/// Whether [streamUrlAt] supports a non-null offset.
|
||||
bool get canTimeShift;
|
||||
|
||||
/// Build the playable stream URL. [offsetSeconds] positions the stream
|
||||
/// that many seconds from the capture-buffer origin — watch-from-start and
|
||||
/// time-shift seek are the same operation; `null` plays the live edge.
|
||||
/// Returns `null` on failure, or when an offset is requested but
|
||||
/// unsupported.
|
||||
Future<String?> streamUrlAt({int? offsetSeconds});
|
||||
|
||||
/// Send a playback heartbeat (`'playing'` / `'paused'` / `'stopped'`).
|
||||
/// [positionMs] is elapsed playback time; [durationMs] the program
|
||||
/// duration when known. Returns an updated capture buffer when the backend
|
||||
/// supplies one, null otherwise.
|
||||
Future<CaptureBuffer?> reportTimeline({required String state, required int positionMs, required int durationMs});
|
||||
|
||||
/// Re-establish playback after stream death. Plex re-tunes (the previous
|
||||
/// capture session expires while the player exhausts its reconnect
|
||||
/// attempts) applying the degradation flags; Jellyfin returns itself —
|
||||
/// the session-less URL is simply re-opened. Returns `null` on failure.
|
||||
Future<LiveTvPlaybackSession?> recover({required bool directStream, required bool directStreamAudio});
|
||||
}
|
||||
|
||||
enum FavoriteChannelPersistenceMode {
|
||||
/// A single write replaces the full backend account's favorite list.
|
||||
sharedFullList,
|
||||
@@ -42,10 +111,9 @@ class LiveTvStreamResolution {
|
||||
/// [lineup] (Plex provider identifier) to [fetchChannels].
|
||||
///
|
||||
/// Stream URL resolution differs sharply by backend: Plex's DVR allocates a
|
||||
/// transcode session and returns a session-scoped path that requires
|
||||
/// follow-up calls (`tuneChannel` + `buildLiveStreamPath`). Jellyfin returns a
|
||||
/// direct-play URL. [resolveStreamUrl] returns the Jellyfin URL directly;
|
||||
/// Plex callers use the existing `client + dvrKey` plumbing inside the player.
|
||||
/// transcode session and returns a session-scoped path; Jellyfin negotiates
|
||||
/// a direct-play URL. [startPlayback] owns that difference behind
|
||||
/// [LiveTvPlaybackSession] — it is the only entry playback callers use.
|
||||
abstract class LiveTvSupport {
|
||||
/// Fast probe — `true` when this server has live-TV configured. Plex calls
|
||||
/// `/livetv/dvrs` and returns true when any DVR exists; Jellyfin probes
|
||||
@@ -68,10 +136,16 @@ abstract class LiveTvSupport {
|
||||
/// Resolve a playable stream URL for [channelKey].
|
||||
///
|
||||
/// Jellyfin returns a negotiated stream URL plus the play session id. Plex
|
||||
/// returns `null` because its stream URL is only valid after a `tuneChannel`
|
||||
/// call; the player's Plex branch uses `client + dvrKey` instead.
|
||||
/// returns `null` because its stream URL is only valid after a tune;
|
||||
/// playback callers use [startPlayback], which owns that difference.
|
||||
Future<LiveTvStreamResolution?> resolveStreamUrl(String channelKey, {String? dvrKey});
|
||||
|
||||
/// Start a playback session for [channelKey] — the single entry the player
|
||||
/// uses for initial launch and channel switching. Plex requires [dvrKey]
|
||||
/// (tune + transcode-session setup); Jellyfin ignores it and negotiates a
|
||||
/// direct stream URL. Returns `null` when the channel can't be started.
|
||||
Future<LiveTvPlaybackSession?> startPlayback(String channelKey, {String? dvrKey});
|
||||
|
||||
/// Source URI to stamp into [FavoriteChannel] entries. Plex uses
|
||||
/// `server://{machineId}/{providerId}` so its cloud-synced favorites are
|
||||
/// keyed per EPG provider. Jellyfin uses `server://{serverId}/jellyfin`
|
||||
|
||||
@@ -44,6 +44,21 @@ class MediaHub {
|
||||
this.serverName,
|
||||
});
|
||||
|
||||
/// True for hubs that represent the user's resumable Continue Watching row.
|
||||
bool get isContinueWatchingHub => _anySemanticKey(_isContinueWatchingKey);
|
||||
|
||||
/// True when selecting an item should honor the Continue Watching action
|
||||
/// preference. This is intentionally broader than [isContinueWatchingHub]:
|
||||
/// backend "Next Up" rows should use the same activation preference without
|
||||
/// inheriting remove-from-Continue-Watching menu semantics.
|
||||
bool get usesContinueWatchingAction => isContinueWatchingHub || _anySemanticKey(_usesContinueWatchingActionKey);
|
||||
|
||||
bool _anySemanticKey(bool Function(String key) matches) {
|
||||
if (matches(id)) return true;
|
||||
final hubIdentifier = identifier;
|
||||
return hubIdentifier != null && matches(hubIdentifier);
|
||||
}
|
||||
|
||||
MediaHub copyWith({
|
||||
String? id,
|
||||
String? identifier,
|
||||
@@ -70,3 +85,24 @@ class MediaHub {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
bool _isContinueWatchingKey(String rawKey) {
|
||||
final compactKey = _compactHubKey(rawKey);
|
||||
if (compactKey == 'continuewatching') return true;
|
||||
|
||||
final tokens = _hubKeyTokens(rawKey);
|
||||
return tokens.contains('inprogress') || _hasTailToken(tokens, 'continue');
|
||||
}
|
||||
|
||||
bool _usesContinueWatchingActionKey(String rawKey) {
|
||||
final tokens = _hubKeyTokens(rawKey);
|
||||
return _hasTailToken(tokens, 'nextup') || tokens.contains('ondeck');
|
||||
}
|
||||
|
||||
List<String> _hubKeyTokens(String rawKey) {
|
||||
return rawKey.toLowerCase().split(RegExp(r'[^a-z0-9]+')).where((part) => part.isNotEmpty).toList(growable: false);
|
||||
}
|
||||
|
||||
String _compactHubKey(String rawKey) => rawKey.toLowerCase().replaceAll(RegExp(r'[^a-z0-9]+'), '');
|
||||
|
||||
bool _hasTailToken(List<String> tokens, String token) => tokens.isNotEmpty && tokens.last == token;
|
||||
|
||||
@@ -10,7 +10,6 @@ import 'media_backend.dart';
|
||||
import 'media_kind.dart';
|
||||
import 'media_role.dart';
|
||||
import 'media_version.dart';
|
||||
import 'season_title.dart';
|
||||
|
||||
part 'media_item.freezed.dart';
|
||||
part 'media_item.g.dart';
|
||||
@@ -79,6 +78,7 @@ sealed class MediaItem with _$MediaItem {
|
||||
int? subtitleMode,
|
||||
String? serverId,
|
||||
String? serverName,
|
||||
String? backendFolderKey,
|
||||
Map<String, Object?>? raw,
|
||||
}) {
|
||||
return switch (backend) {
|
||||
@@ -137,6 +137,7 @@ sealed class MediaItem with _$MediaItem {
|
||||
subtitleMode: subtitleMode,
|
||||
serverId: serverId,
|
||||
serverName: serverName,
|
||||
backendFolderKey: backendFolderKey,
|
||||
raw: raw,
|
||||
),
|
||||
MediaBackend.jellyfin => JellyfinMediaItem(
|
||||
@@ -192,6 +193,7 @@ sealed class MediaItem with _$MediaItem {
|
||||
audioLanguage: audioLanguage,
|
||||
serverId: serverId,
|
||||
serverName: serverName,
|
||||
backendFolderKey: backendFolderKey,
|
||||
raw: raw,
|
||||
),
|
||||
};
|
||||
@@ -266,6 +268,11 @@ sealed class MediaItem with _$MediaItem {
|
||||
@JsonKey(fromJson: flexibleInt) int? extraType,
|
||||
String? serverId,
|
||||
String? serverName,
|
||||
|
||||
/// Relative folder key (`/library/sections/{id}/folder?parent=…`) for
|
||||
/// [MediaKind.folder] rows — what [MediaServerClient.fetchFolderChildren]
|
||||
/// tunes into. Stamped by the folder fetchers, null elsewhere.
|
||||
String? backendFolderKey,
|
||||
@JsonKey(fromJson: _mediaItemRawFromJson) Map<String, Object?>? raw,
|
||||
}) = PlexMediaItem;
|
||||
|
||||
@@ -328,6 +335,10 @@ sealed class MediaItem with _$MediaItem {
|
||||
String? playlistItemId,
|
||||
String? serverId,
|
||||
String? serverName,
|
||||
|
||||
/// Always null on Jellyfin — folder children are fetched by [id]. Exists
|
||||
/// on both variants so the union exposes one neutral getter.
|
||||
String? backendFolderKey,
|
||||
@JsonKey(fromJson: _mediaItemRawFromJson) Map<String, Object?>? raw,
|
||||
}) = JellyfinMediaItem;
|
||||
|
||||
@@ -389,6 +400,15 @@ sealed class MediaItem with _$MediaItem {
|
||||
return viewCount != null && viewCount! > 0;
|
||||
}
|
||||
|
||||
/// Unwatched leaf count for container badges. Falls back to Jellyfin's
|
||||
/// `UserData.UnplayedItemCount` when leaf totals weren't requested
|
||||
/// (e.g. the folder tree's slim field set).
|
||||
int? get unwatchedCount {
|
||||
if (leafCount != null && viewedLeafCount != null) return leafCount! - viewedLeafCount!;
|
||||
final userData = raw?['UserData'];
|
||||
return userData is Map<String, dynamic> ? userData['UnplayedItemCount'] as int? : null;
|
||||
}
|
||||
|
||||
/// Copy with the watched flag applied so [isWatched] reflects it for every
|
||||
/// kind: containers need their leaf counts patched, not just [viewCount].
|
||||
MediaItem withWatchedFlag(bool isWatched) {
|
||||
@@ -412,14 +432,8 @@ sealed class MediaItem with _$MediaItem {
|
||||
|
||||
/// Subtitle line shown below [displayTitle] for episodes/seasons.
|
||||
String? get displaySubtitle {
|
||||
if (kind == MediaKind.season) {
|
||||
if (grandparentTitle != null || parentTitle != null) {
|
||||
// Re-localize a server's generic English "Season N" (see #1271).
|
||||
final label = localizedSeasonLabel(title: title, index: index);
|
||||
return label.isNotEmpty ? label : title;
|
||||
}
|
||||
} else if (kind == MediaKind.episode) {
|
||||
if (grandparentTitle != null) {
|
||||
if (kind == MediaKind.episode || kind == MediaKind.season) {
|
||||
if (grandparentTitle != null || (kind == MediaKind.season && parentTitle != null)) {
|
||||
return title;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -71,6 +71,7 @@ PlexMediaItem _$PlexMediaItemFromJson(Map<String, dynamic> json) =>
|
||||
extraType: flexibleInt(json['extraType']),
|
||||
serverId: json['serverId'] as String?,
|
||||
serverName: json['serverName'] as String?,
|
||||
backendFolderKey: json['backendFolderKey'] as String?,
|
||||
raw: _mediaItemRawFromJson(json['raw']),
|
||||
);
|
||||
|
||||
@@ -139,6 +140,7 @@ Map<String, dynamic> _$PlexMediaItemToJson(PlexMediaItem instance) =>
|
||||
'extraType': ?instance.extraType,
|
||||
'serverId': ?instance.serverId,
|
||||
'serverName': ?instance.serverName,
|
||||
'backendFolderKey': ?instance.backendFolderKey,
|
||||
'raw': ?instance.raw,
|
||||
};
|
||||
|
||||
@@ -197,6 +199,7 @@ JellyfinMediaItem _$JellyfinMediaItemFromJson(Map<String, dynamic> json) =>
|
||||
playlistItemId: json['playlistItemId'] as String?,
|
||||
serverId: json['serverId'] as String?,
|
||||
serverName: json['serverName'] as String?,
|
||||
backendFolderKey: json['backendFolderKey'] as String?,
|
||||
raw: _mediaItemRawFromJson(json['raw']),
|
||||
);
|
||||
|
||||
@@ -255,5 +258,6 @@ Map<String, dynamic> _$JellyfinMediaItemToJson(JellyfinMediaItem instance) =>
|
||||
'playlistItemId': ?instance.playlistItemId,
|
||||
'serverId': ?instance.serverId,
|
||||
'serverName': ?instance.serverName,
|
||||
'backendFolderKey': ?instance.backendFolderKey,
|
||||
'raw': ?instance.raw,
|
||||
};
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'media_item.dart';
|
||||
import 'media_kind.dart';
|
||||
import 'season_title.dart';
|
||||
|
||||
/// Convenience type-check getters and spoiler helpers on [MediaItem]. These
|
||||
/// give consumers a Plex-style fluent API (e.g. `item.isShow`) while keeping
|
||||
@@ -28,9 +27,4 @@ extension MediaItemTypes on MediaItem {
|
||||
|
||||
/// Non-spoiler art path for episodes (show/season background).
|
||||
String? get spoilerSafeArt => grandparentArtPath ?? artPath;
|
||||
|
||||
/// Localized season label for this item. Re-localizes a server's generic
|
||||
/// English "Season N" to the app locale (see [localizedSeasonLabel]); falls
|
||||
/// back to [displayTitle] when there is no usable title or index.
|
||||
String get localizedSeasonTitle => localizedSeasonLabel(title: title, index: index, fallback: displayTitle);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,12 @@ enum MediaKind {
|
||||
playlist,
|
||||
clip,
|
||||
photo,
|
||||
|
||||
/// Filesystem-style directory row in folder browsing (Plex `/folder`
|
||||
/// listings, Jellyfin `Folder`/`CollectionFolder` items). Not playable
|
||||
/// media itself — children are fetched via
|
||||
/// `MediaServerClient.fetchFolderChildren`.
|
||||
folder,
|
||||
unknown;
|
||||
|
||||
bool get isVideo => this == movie || this == episode || this == clip;
|
||||
@@ -40,6 +46,7 @@ enum MediaKind {
|
||||
MediaKind.playlist => 'playlist',
|
||||
MediaKind.clip => 'clip',
|
||||
MediaKind.photo => 'photo',
|
||||
MediaKind.folder => 'folder',
|
||||
MediaKind.unknown => 'unknown',
|
||||
};
|
||||
|
||||
@@ -57,6 +64,7 @@ enum MediaKind {
|
||||
'playlist' => MediaKind.playlist,
|
||||
'clip' || 'trailer' || 'video' || 'musicvideo' => MediaKind.clip,
|
||||
'photo' => MediaKind.photo,
|
||||
'folder' || 'collectionfolder' => MediaKind.folder,
|
||||
_ => MediaKind.unknown,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -173,6 +173,24 @@ abstract class MediaServerClient {
|
||||
/// show, tracks of an album, items of a collection.
|
||||
Future<List<MediaItem>> fetchChildren(String parentId);
|
||||
|
||||
/// Top-level rows of a library in folder-browsing mode. Directory rows come
|
||||
/// back as [MediaKind.folder] (Plex additionally stamps
|
||||
/// [MediaItem.backendFolderKey]). [onPage] surfaces accumulated items after
|
||||
/// each intermediate page on backends that paginate (Jellyfin); single-shot
|
||||
/// backends (Plex) never call it.
|
||||
Future<List<MediaItem>> fetchLibraryFolders(String libraryId, {void Function(List<MediaItem> itemsSoFar)? onPage});
|
||||
|
||||
/// Children of a [MediaKind.folder] row from [fetchLibraryFolders] /
|
||||
/// [fetchFolderChildren] — or, on Jellyfin, of a show/season row, which act
|
||||
/// as expandable folders in folder browsing. Same [onPage] semantics as
|
||||
/// [fetchLibraryFolders].
|
||||
Future<List<MediaItem>> fetchFolderChildren(
|
||||
MediaItem folder, {
|
||||
String? libraryId,
|
||||
String? libraryTitle,
|
||||
void Function(List<MediaItem> itemsSoFar)? onPage,
|
||||
});
|
||||
|
||||
/// Page through direct children of [parentId]. Unlike
|
||||
/// [fetchPlayableDescendantsPage], this preserves container shape and is used
|
||||
/// for large season episode lists where the children endpoint is the correct
|
||||
@@ -270,11 +288,14 @@ abstract class MediaServerClient {
|
||||
/// endpoint. Backends without true hub pagination may return a single page.
|
||||
Future<LibraryPage<MediaItem>> fetchMoreHubItemsPage(String hubId, {int? start, int? size, AbortController? abort});
|
||||
|
||||
/// Mark [item] as watched. The full item is passed (not just an id) so
|
||||
/// implementations can fire a [WatchStateEvent] on [WatchStateNotifier]
|
||||
/// for UI invalidation — episode/season/show parent chain, library
|
||||
/// section etc. live on the item.
|
||||
/// Mark [item] as watched. Transport only: no [WatchStateEvent] is emitted
|
||||
/// here — UI surfaces go through `WatchActions`, which owns the single
|
||||
/// emission (and tracker fan-out); the offline sync replay calls this
|
||||
/// directly precisely because the event already fired when the action was
|
||||
/// queued.
|
||||
Future<void> markWatched(MediaItem item);
|
||||
|
||||
/// Mark [item] as unwatched. Transport only — see [markWatched].
|
||||
Future<void> markUnwatched(MediaItem item);
|
||||
|
||||
/// Hide an item from Continue Watching without changing watched status or
|
||||
@@ -568,6 +589,14 @@ abstract class MediaServerClient {
|
||||
/// media version's part path; Jellyfin returns its `/Videos/{id}/stream`
|
||||
/// endpoint with `Static=true` so transcoding is bypassed. Returns null
|
||||
/// when the backend can't resolve a playable URL for the item.
|
||||
///
|
||||
/// Deliberately separate from the in-app playback funnel
|
||||
/// (`PlaybackSourceResolver`): external players can't send custom headers,
|
||||
/// so the URL must be self-contained (token in the query string), and
|
||||
/// there's no session/transcode negotiation to carry. Likewise their
|
||||
/// progress reporting is a one-shot started/stopped pair in
|
||||
/// `ExternalPlayerService` — an external app exposes no live position
|
||||
/// stream for the in-player tracker to follow.
|
||||
Future<String?> resolveExternalPlaybackUrl(MediaItem item, {int mediaIndex = 0, String? mediaSourceId});
|
||||
}
|
||||
|
||||
@@ -589,17 +618,16 @@ extension MediaServerClientScope on MediaServerClient {
|
||||
/// Mark [item] watched because it crossed [watchedThreshold] during playback,
|
||||
/// when a playback-stopped report is/was also sent for the same playback.
|
||||
/// Backends that mark played from the stop report
|
||||
/// ([marksWatchedOnPlaybackStopped]) only emit the local watch event —
|
||||
/// issuing [markWatched] too would double-scrobble via the Jellyfin Trakt
|
||||
/// plugin (#1287). The local event still keeps the UI and Plezy's own Trakt
|
||||
/// sync (which key on `watched` events, not progress) in sync; the stop
|
||||
/// report syncs the server.
|
||||
/// ([marksWatchedOnPlaybackStopped]) skip the server call — issuing
|
||||
/// [markWatched] too would double-scrobble via the Jellyfin Trakt plugin
|
||||
/// (#1287). The single local event emitted here keeps the UI and Plezy's
|
||||
/// own Trakt sync (which key on `watched` events, not progress) in sync;
|
||||
/// the stop report syncs the server.
|
||||
Future<void> markWatchedFromPlaybackStop(MediaItem item) async {
|
||||
if (marksWatchedOnPlaybackStopped) {
|
||||
WatchStateNotifier().notifyWatched(item: item, isNowWatched: true, cacheServerId: cacheServerId);
|
||||
} else {
|
||||
if (!marksWatchedOnPlaybackStopped) {
|
||||
await markWatched(item);
|
||||
}
|
||||
WatchStateNotifier().notifyWatched(item: item, isNowWatched: true, cacheServerId: cacheServerId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import '../i18n/strings.g.dart';
|
||||
import '../utils/codec_utils.dart';
|
||||
import '../utils/track_label_builder.dart' show TrackLabelBuilder, buildTrackLabel;
|
||||
import '../utils/track_label_builder.dart' show TrackLabel, TrackLabelBuilder;
|
||||
import 'media_display_criteria.dart';
|
||||
|
||||
class MediaSourceInfo {
|
||||
@@ -67,21 +66,15 @@ class TrickplayInfo {
|
||||
});
|
||||
}
|
||||
|
||||
/// Mixin for building track labels with a consistent pattern.
|
||||
///
|
||||
/// Used by [MediaAudioTrack] and [MediaSubtitleTrack] to provide a [buildLabel]
|
||||
/// method that delegates to the shared [buildTrackLabel] function.
|
||||
/// Shared fallback-index math for [MediaAudioTrack] and [MediaSubtitleTrack]
|
||||
/// labels; the label content itself is built by [TrackLabelBuilder].
|
||||
mixin _TrackLabelMixin {
|
||||
int get id;
|
||||
int? get index;
|
||||
String? get displayTitle;
|
||||
String? get language;
|
||||
|
||||
String buildLabel(List<String> additionalParts) {
|
||||
if (displayTitle != null && displayTitle!.isNotEmpty) {
|
||||
return displayTitle!;
|
||||
}
|
||||
return buildTrackLabel(language: language, extraParts: additionalParts, index: (index ?? id) - 1);
|
||||
int get _fallbackLabelIndex {
|
||||
final streamIndex = index ?? id;
|
||||
return streamIndex > 0 ? streamIndex - 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,11 +84,9 @@ class MediaAudioTrack with _TrackLabelMixin {
|
||||
@override
|
||||
final int? index;
|
||||
final String? codec;
|
||||
@override
|
||||
final String? language;
|
||||
final String? languageCode;
|
||||
final String? title;
|
||||
@override
|
||||
final String? displayTitle;
|
||||
final int? channels;
|
||||
final bool selected;
|
||||
@@ -116,11 +107,16 @@ class MediaAudioTrack with _TrackLabelMixin {
|
||||
|
||||
bool get isExternal => external;
|
||||
|
||||
String get label {
|
||||
final additionalParts = <String>[];
|
||||
if (codec != null) additionalParts.add(CodecUtils.formatAudioCodec(codec!));
|
||||
if (channels != null) additionalParts.add('${channels!}ch');
|
||||
return buildLabel(additionalParts);
|
||||
TrackLabel get label {
|
||||
return TrackLabelBuilder.audioLabel(
|
||||
title: title,
|
||||
language: language,
|
||||
languageCode: languageCode,
|
||||
codec: codec,
|
||||
channels: channels,
|
||||
displayTitle: displayTitle,
|
||||
index: _fallbackLabelIndex,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,11 +126,9 @@ class MediaSubtitleTrack with _TrackLabelMixin {
|
||||
@override
|
||||
final int? index;
|
||||
final String? codec;
|
||||
@override
|
||||
final String? language;
|
||||
final String? languageCode;
|
||||
final String? title;
|
||||
@override
|
||||
final String? displayTitle;
|
||||
final bool selected;
|
||||
final bool forced;
|
||||
@@ -157,31 +151,22 @@ class MediaSubtitleTrack with _TrackLabelMixin {
|
||||
this.usesExternalDelivery = false,
|
||||
});
|
||||
|
||||
String get label {
|
||||
TrackLabel get label {
|
||||
return labelForIndex(_fallbackLabelIndex);
|
||||
}
|
||||
|
||||
String labelForIndex(int visibleIndex) {
|
||||
return TrackLabelBuilder.buildSubtitleLabel(
|
||||
title: _labelTitle,
|
||||
language: languageCode ?? language,
|
||||
TrackLabel labelForIndex(int visibleIndex) {
|
||||
return TrackLabelBuilder.subtitleLabel(
|
||||
title: title,
|
||||
language: language,
|
||||
languageCode: languageCode,
|
||||
codec: codec,
|
||||
forced: forced,
|
||||
displayTitle: displayTitle,
|
||||
index: visibleIndex,
|
||||
);
|
||||
}
|
||||
|
||||
String? get _labelTitle {
|
||||
final explicitTitle = title;
|
||||
if (explicitTitle != null && explicitTitle.trim().isNotEmpty) return explicitTitle;
|
||||
return displayTitle;
|
||||
}
|
||||
|
||||
int get _fallbackLabelIndex {
|
||||
final streamIndex = index ?? id;
|
||||
return streamIndex > 0 ? streamIndex - 1 : 0;
|
||||
}
|
||||
|
||||
/// Returns true if this subtitle track is an external file (sidecar subtitle).
|
||||
/// Some backends provide a direct key/URL, others require constructing one
|
||||
/// from stream metadata.
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
import '../i18n/strings.g.dart';
|
||||
|
||||
/// Matches a media server's generic English season title, e.g. "Season 1".
|
||||
///
|
||||
/// Plex and Jellyfin return this verbatim when they have no localized name for a
|
||||
/// season (or when the request language resolves to English), which leaks
|
||||
/// untranslated "Season N" labels into otherwise-localized UI (see #1271).
|
||||
final RegExp _genericSeasonTitle = RegExp(r'^season\s+(\d+)$', caseSensitive: false);
|
||||
|
||||
/// Localized season label.
|
||||
///
|
||||
/// Replaces a generic English "Season N" (or an empty title) with the app-locale
|
||||
/// `t.common.seasonNumber`, while preserving custom names ("Specials", …) and
|
||||
/// titles the server already localized ("Saison 1").
|
||||
///
|
||||
/// Prefers [index] for the number; falls back to the digits parsed from a
|
||||
/// generic title, then to [fallback] when there is nothing usable to show.
|
||||
String localizedSeasonLabel({String? title, int? index, String? fallback}) {
|
||||
final raw = title?.trim() ?? '';
|
||||
final match = _genericSeasonTitle.firstMatch(raw);
|
||||
final number = index ?? (match != null ? int.tryParse(match.group(1)!) : null);
|
||||
if ((match != null || raw.isEmpty) && number != null) {
|
||||
return t.common.seasonNumber(number: number);
|
||||
}
|
||||
return raw.isNotEmpty ? raw : (fallback ?? '');
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/// Single source of truth for the "progress crossed the watched threshold"
|
||||
/// decision. All comparison sites (online progress events, external-player
|
||||
/// returns, offline queueing) must route through this so edge-case handling
|
||||
/// (zero/unknown duration, exact-threshold) can't drift between paths.
|
||||
bool isWatchedProgress({required int positionMs, required int durationMs, required double threshold}) {
|
||||
if (durationMs <= 0) return false;
|
||||
return positionMs / durationMs >= threshold;
|
||||
}
|
||||
@@ -12,6 +12,10 @@ mixin ContextMenuTapMixin<T extends StatefulWidget> on State<T> {
|
||||
_tapPosition = details.globalPosition;
|
||||
}
|
||||
|
||||
/// Last stored tap position, for menus shown outside [MediaContextMenu]
|
||||
/// (null when activated via keyboard/gamepad).
|
||||
Offset? get lastTapPosition => _tapPosition;
|
||||
|
||||
bool get isContextMenuOpen => contextMenuKey.currentState?.isContextMenuOpen ?? false;
|
||||
|
||||
/// Show at the last tap position (long-press, mouse).
|
||||
|
||||
@@ -83,7 +83,7 @@ Future<bool> _launchWithUrl(String url) {
|
||||
return launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication);
|
||||
}
|
||||
|
||||
Future<bool> _launchAndroidIntent(String url, {required String package}) async {
|
||||
Future<bool> _launchAndroidIntent(String url, {required String package, bool fallbackToUrl = true}) async {
|
||||
final intentUri = Uri.parse(
|
||||
'intent:$url#Intent;'
|
||||
'action=android.intent.action.VIEW;'
|
||||
@@ -94,10 +94,17 @@ Future<bool> _launchAndroidIntent(String url, {required String package}) async {
|
||||
try {
|
||||
return await launchUrl(intentUri, mode: LaunchMode.externalApplication);
|
||||
} catch (_) {
|
||||
return _launchWithUrl(url);
|
||||
return fallbackToUrl ? _launchWithUrl(url) : false;
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> _launchAndroidIntentCandidates(String url, Iterable<String> packages) async {
|
||||
for (final package in packages) {
|
||||
if (await _launchAndroidIntent(url, package: package, fallbackToUrl: false)) return true;
|
||||
}
|
||||
return _launchWithUrl(url);
|
||||
}
|
||||
|
||||
Future<bool> _launchUrlScheme(String scheme, String url) async {
|
||||
final playerUrl = scheme.contains('url=') ? '$scheme${Uri.encodeComponent(url)}' : '$scheme$url';
|
||||
final uri = Uri.parse(playerUrl);
|
||||
@@ -192,6 +199,27 @@ Future<bool> _launchCustom(String value, String url, CustomPlayerType type) asyn
|
||||
class KnownPlayers {
|
||||
static final systemDefault = ExternalPlayer(id: 'system_default', name: 'System Default', launch: _launchWithUrl);
|
||||
|
||||
static const _androidPackageMap = <String, List<String>>{
|
||||
'vlc': ['org.videolan.vlc'],
|
||||
'mpv': ['is.xyz.mpv'],
|
||||
'mx_player': ['com.mxtech.videoplayer.ad', 'com.mxtech.videoplayer.pro'],
|
||||
'just_player': ['com.brouken.player'],
|
||||
};
|
||||
|
||||
static List<String> _androidPackageCandidatesForId(String id) {
|
||||
return _androidPackageMap[id] ?? const [];
|
||||
}
|
||||
|
||||
static List<String> androidPackageCandidates(ExternalPlayer player) {
|
||||
final knownPackages = _androidPackageCandidatesForId(player.id);
|
||||
if (knownPackages.isNotEmpty) return knownPackages;
|
||||
if (player.isCustom && player.customType == CustomPlayerType.command) {
|
||||
final package = player.customValue?.trim();
|
||||
return package == null || package.isEmpty ? const [] : [package];
|
||||
}
|
||||
return const [];
|
||||
}
|
||||
|
||||
static final _allPlayers = <ExternalPlayer>[
|
||||
systemDefault,
|
||||
ExternalPlayer(
|
||||
@@ -200,7 +228,7 @@ class KnownPlayers {
|
||||
iconAsset: 'assets/player_icons/vlc.svg',
|
||||
isAvailable: Platform.isAndroid || Platform.isIOS || Platform.isMacOS || Platform.isLinux || Platform.isWindows,
|
||||
launch: (url) {
|
||||
if (Platform.isAndroid) return _launchAndroidIntent(url, package: 'org.videolan.vlc');
|
||||
if (Platform.isAndroid) return _launchAndroidIntentCandidates(url, _androidPackageCandidatesForId('vlc'));
|
||||
if (Platform.isIOS) return _launchUrlScheme('vlc://', url);
|
||||
if (Platform.isMacOS) return _launchMacApp('VLC', url);
|
||||
if (Platform.isWindows) return _launchWindowsVlc(url);
|
||||
@@ -213,7 +241,7 @@ class KnownPlayers {
|
||||
iconAsset: 'assets/player_icons/mpv.svg',
|
||||
isAvailable: Platform.isAndroid || Platform.isMacOS || Platform.isLinux || Platform.isWindows,
|
||||
launch: (url) {
|
||||
if (Platform.isAndroid) return _launchAndroidIntent(url, package: 'is.xyz.mpv');
|
||||
if (Platform.isAndroid) return _launchAndroidIntentCandidates(url, _androidPackageCandidatesForId('mpv'));
|
||||
return _launchCommand('mpv', url);
|
||||
},
|
||||
),
|
||||
@@ -229,14 +257,14 @@ class KnownPlayers {
|
||||
name: 'MX Player',
|
||||
iconAsset: 'assets/player_icons/mx_player.svg',
|
||||
isAvailable: Platform.isAndroid,
|
||||
launch: (url) => _launchAndroidIntent(url, package: 'com.mxtech.videoplayer.ad'),
|
||||
launch: (url) => _launchAndroidIntentCandidates(url, _androidPackageCandidatesForId('mx_player')),
|
||||
),
|
||||
ExternalPlayer(
|
||||
id: 'just_player',
|
||||
name: 'Just Player',
|
||||
iconAsset: 'assets/player_icons/just_player.png',
|
||||
isAvailable: Platform.isAndroid,
|
||||
launch: (url) => _launchAndroidIntent(url, package: 'com.brouken.player'),
|
||||
launch: (url) => _launchAndroidIntentCandidates(url, _androidPackageCandidatesForId('just_player')),
|
||||
),
|
||||
ExternalPlayer(
|
||||
id: 'infuse',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user