Force to use endpoint ID in launchMagixService

This commit is contained in:
Alexander Nozik 2024-05-23 16:16:22 +03:00
parent 673a7c89a6
commit 55bcb08668

View File

@ -40,7 +40,7 @@ internal fun generateId(request: MagixMessage): String = if (request.id != null)
*/ */
public fun DeviceManager.launchMagixService( public fun DeviceManager.launchMagixService(
endpoint: MagixEndpoint, endpoint: MagixEndpoint,
endpointID: String = controlsMagixFormat.defaultFormat, endpointID: String,
coroutineContext: CoroutineContext = EmptyCoroutineContext, coroutineContext: CoroutineContext = EmptyCoroutineContext,
): Job = context.launch(coroutineContext) { ): Job = context.launch(coroutineContext) {
endpoint.subscribe(controlsMagixFormat, targetFilter = listOf(endpointID, null)).onEach { (request, payload) -> endpoint.subscribe(controlsMagixFormat, targetFilter = listOf(endpointID, null)).onEach { (request, payload) ->