fix(livetv): keep timeline heartbeat on active endpoint

This commit is contained in:
edde746
2026-06-15 14:59:06 +02:00
parent f602925896
commit 9437956b83
2 changed files with 35 additions and 1 deletions
@@ -23,6 +23,7 @@ mixin _PlexLiveTvClientMethods on MediaServerCacheMixin {
Duration? timeout,
// ignore: unused_element_parameter
AbortController? abort,
bool allowEndpointFailover = true,
});
Map<String, dynamic>? _getMediaContainer(MediaServerResponse response);
@@ -131,6 +132,12 @@ mixin _PlexLiveTvClientMethods on MediaServerCacheMixin {
'playbackTime': playbackTime,
'X-Plex-Session-Identifier': sessionIdentifier,
},
// A live timeline ping is a transcode-session keepalive, not a general
// library fetch. If one ping hits a transient transport/DNS failure,
// endpoint failover can close the client held by the active session; the
// server then expires the tuner a few minutes later. Let the next
// heartbeat retry the current session endpoint instead.
allowEndpointFailover: false,
);
if (response.statusCode != 200) {
appLogger.e('Live timeline returned ${response.statusCode}: ${response.data}');