Dashboard settings, game icons, default execution mode, fix native lib linking
- Add AppPreferences for persisted default streaming mode (IN_GAME/APP_STREAMING) - Add GameInfoProvider to resolve package names to icons via PackageManager - Add GameInfoRow composable used across dashboard, plans, and clients screens - Show backend version in dashboard status card - Default execution mode toggle on dashboard, picked up by new plans - Plan edit mode with full CRUD support - Fix CMake IMPORTED_NO_SONAME to prevent absolute Windows paths in DT_NEEDED - Catch Throwable (not just Exception) for UnsatisfiedLinkError in streaming start
This commit is contained in:
@@ -13,6 +13,7 @@ import com.meta.horizon.platform.ovr.Core
|
||||
import com.meta.horizon.platform.ovr.requests.Request
|
||||
import com.meta.horizon.platform.ovr.requests.Users
|
||||
import com.omixlab.lckcontrol.R
|
||||
import com.omixlab.lckcontrol.data.local.AppPreferences
|
||||
import com.omixlab.lckcontrol.data.local.TokenStore
|
||||
import com.omixlab.lckcontrol.data.remote.LckApiService
|
||||
import com.omixlab.lckcontrol.data.remote.MetaCallbackRequest
|
||||
@@ -54,6 +55,7 @@ class LckControlService : Service() {
|
||||
private const val ACTION_BIND_STREAMING = "com.omixlab.lckcontrol.BIND_STREAMING"
|
||||
}
|
||||
|
||||
@Inject lateinit var appPreferences: AppPreferences
|
||||
@Inject lateinit var accountRepository: AccountRepository
|
||||
@Inject lateinit var streamPlanRepository: StreamPlanRepository
|
||||
@Inject lateinit var tokenStore: TokenStore
|
||||
@@ -115,6 +117,8 @@ class LckControlService : Service() {
|
||||
val accounts = accountRepository.getAccounts().filter { it.isEnabled }
|
||||
val gameId = clientTracker.getAll()
|
||||
.find { it.clientName == clientName }?.packageName ?: ""
|
||||
val execMode = appPreferences.getDefaultExecutionMode()
|
||||
Log.d(TAG, "createDefaultPlan: clientName=$clientName, executionMode=$execMode, accounts=${accounts.size}")
|
||||
val destinations = accounts.map { account ->
|
||||
StreamDestination(
|
||||
service = account.serviceId,
|
||||
@@ -126,8 +130,10 @@ class LckControlService : Service() {
|
||||
val plan = streamPlanRepository.createPlan(
|
||||
name = "$clientName Stream",
|
||||
destinations = destinations,
|
||||
executionMode = execMode,
|
||||
gameId = gameId,
|
||||
)
|
||||
Log.d(TAG, "createDefaultPlan: created plan ${plan.planId} with executionMode=${plan.executionMode}")
|
||||
broadcastPlansChanged()
|
||||
plan
|
||||
}
|
||||
@@ -167,7 +173,10 @@ class LckControlService : Service() {
|
||||
|
||||
if (updated != null) broadcastPlanUpdated(updated)
|
||||
true
|
||||
} catch (_: Exception) { false }
|
||||
} catch (e: Throwable) {
|
||||
Log.e(TAG, "startStreamPlan failed", e)
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
override fun endStreamPlan(planId: String): Boolean = runBlocking {
|
||||
|
||||
Reference in New Issue
Block a user