Re-pick Plex server address on network change, foreground, and stream failure (dev 36)

The address chosen at sign-in (LAN first) was kept forever, so away from
home streams hit a dead LAN address (TLS error) or the relay (503). Store
every address plex.tv lists, probe them all bypassing the offline cache,
and keep the best one that answers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-11-19 15:56:02 -08:00
1 parent 9f68aa588b
commit e02428ab70
7 files changed
+100 -17

No files matched your search

+3
View File
@@ -17,6 +17,9 @@ struct MediaServer: Codable, Hashable, Identifiable {
var machineId = ""
var sections: [String] = []
var sectionTitles = ""
/// Every address plex.tv lists for this server, best first (local, remote, relay).
/// Optional so servers saved before it still decode.
var connections: [String]? = nil
var signedIn: Bool { !token.isEmpty }
var ready: Bool { signedIn && !sections.isEmpty }