iOS: Use Stem Server switch for Plex-only playback, build 42
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7843ff562b
commit
0516362461
5 files changed
+64
-37
No files matched your search
@@ -50,7 +50,7 @@ final class HomeReach: @unchecked Sendable {
|
||||
let (at, last) = stamp.with { (checkedAt, _last) }
|
||||
if at != 0 && now - at < Self.ttl { return last }
|
||||
let urls = settings.servers.map { $0.base + ($0.kind == .plex ? "/identity" : "/System/Info/Public") }
|
||||
+ [settings.stemUrl.trimmingCharacters(in: CharacterSet(charactersIn: "/")) + "/api/info"]
|
||||
+ (settings.stemServerOff ? [] : [settings.stemUrl.trimmingCharacters(in: CharacterSet(charactersIn: "/")) + "/api/info"])
|
||||
let ok = await withTaskGroup(of: Bool.self) { g in
|
||||
for u in urls { g.addTask { await self.answers(u) } }
|
||||
for await r in g where r { g.cancelAll(); return true }
|
||||
|
||||
Reference in new issue
Block a user