add HTTP retries for DLNA player

This commit is contained in:
Drew Weymouth
2025-03-29 15:15:13 -07:00
parent 417b1b262d
commit 7828614d91
5 changed files with 18 additions and 4 deletions
+2 -2
View File
@@ -153,16 +153,16 @@ func StartupApp(appName, displayAppName, appVersion, appVersionTag, latestReleas
}
// Periodically scan for remote players
go a.PlaybackManager.ScanRemotePlayers(a.bgrndCtx, 5 /*waitSec*/)
go func() {
t := time.NewTicker(5 * time.Minute)
for {
a.PlaybackManager.ScanRemotePlayers(a.bgrndCtx)
select {
case <-a.bgrndCtx.Done():
t.Stop()
return
case <-t.C:
continue
a.PlaybackManager.ScanRemotePlayers(a.bgrndCtx, 10 /*waitSec*/)
}
}
}()