Skip to content
Snippets Groups Projects
Commit c0d0cfcb authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Duncan McNamara
Browse files

Fix race condition while sending the sleep timer value to the remote access

parent 90bb1f59
No related branches found
No related tags found
1 merge request!1960Remote access advanced options
......@@ -588,7 +588,7 @@ class RemoteAccessServer(private val context: Context) : PlaybackService.Callbac
val chapters = withContext(Dispatchers.IO) { service.getChapters(-1) ?: arrayOf() }
val speed = String.format(Locale.US, "%.2f", service.speed).toFloat()
var sleepTimer = 0L
scope.launch(Dispatchers.Main) {
withContext(Dispatchers.Main) {
sleepTimer = playerSleepTime.value?.time?.time ?: 0L
}
val waitForMediaEnd = service.waitForMediaEnd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment