mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-09-26 19:29:04 +00:00
Merge branch 'master' of gitlab.futo.org:videostreaming/grayjay
This commit is contained in:
commit
a8921a1aba
2 changed files with 8 additions and 2 deletions
|
@ -62,7 +62,7 @@ class DownloadService : Service() {
|
|||
Logger.i(TAG, "onStartCommand");
|
||||
synchronized(this) {
|
||||
if(_started)
|
||||
return START_STICKY;
|
||||
return START_NOT_STICKY;
|
||||
|
||||
if(!FragmentedStorage.isInitialized) {
|
||||
Logger.i(TAG, "Attempted to start DownloadService without initialized files");
|
||||
|
|
|
@ -78,7 +78,13 @@ class StateSync {
|
|||
onAuthorized = { sess, isNewlyAuthorized, isNewSession ->
|
||||
if (isNewSession) {
|
||||
deviceUpdatedOrAdded.emit(sess.remotePublicKey, sess)
|
||||
StateApp.instance.scope.launch(Dispatchers.IO) { checkForSync(sess) }
|
||||
StateApp.instance.scope.launch(Dispatchers.IO) {
|
||||
try {
|
||||
checkForSync(sess)
|
||||
} catch (e: Throwable) {
|
||||
Logger.e(TAG, "Failed to check for sync.", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue