Die Tonspur wird jetzt bestellt, nicht abgewartet
Der Befund, der die ganze Umsetzung bestimmt: `AudioStreamIndex` kam in der PlaybackInfo-Anfrage **nicht vor**. Der Server wählte, wir nahmen was kam — und bei einem umgerechneten Stream kommt danach nur noch diese eine Tonspur an. `selectAudioTrack` schob seither ins Leere, weil im Player eine Liste mit einem Eintrag stand. Damit ist auch erklärt, warum die Spracheinstellung beim ZDF-Fall nichts ausrichten konnte: sie lief auf einer Auswahl, die es gar nicht gab. `PlaybackIntent` trägt die Spurnummer jetzt mit, und die Aushandlung nennt sie ausdrücklich. Zwei Tests halten fest, dass sie ankommt — und dass sie ohne Wunsch weggelassen wird, statt eine Null zu schicken. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
afb4a63655
commit
e61cb0403d
@@ -19,6 +19,14 @@ public struct PlaybackIntent: Sendable, Equatable {
|
||||
public let startTime: Duration
|
||||
/// Ob der Server im selben Netz steht. Plex rechnet dann anders.
|
||||
public let isLocalConnection: Bool
|
||||
/// Welche Tonspur gespielt werden soll.
|
||||
///
|
||||
/// **Ohne diese Angabe wählt der Server.** Bei einem umgerechneten Stream
|
||||
/// gibt es danach nur noch *eine* Tonspur — was hier nicht gesagt wird,
|
||||
/// lässt sich später nicht mehr umstellen, weil im Player schlicht keine
|
||||
/// zweite ankommt. Genau daran scheiterte die Sprachwahl bisher: sie lief
|
||||
/// auf einer Liste mit einem Eintrag.
|
||||
public let audioStreamIndex: Int?
|
||||
|
||||
public init(
|
||||
itemID: String,
|
||||
@@ -26,7 +34,8 @@ public struct PlaybackIntent: Sendable, Equatable {
|
||||
file: MediaFile,
|
||||
transcode: TranscodeSettings? = nil,
|
||||
startTime: Duration = .zero,
|
||||
isLocalConnection: Bool = false
|
||||
isLocalConnection: Bool = false,
|
||||
audioStreamIndex: Int? = nil
|
||||
) {
|
||||
self.itemID = itemID
|
||||
self.versionIndex = versionIndex
|
||||
@@ -34,6 +43,7 @@ public struct PlaybackIntent: Sendable, Equatable {
|
||||
self.transcode = transcode
|
||||
self.startTime = startTime
|
||||
self.isLocalConnection = isLocalConnection
|
||||
self.audioStreamIndex = audioStreamIndex
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user