musikr: fix stuck evaluate step

This commit is contained in:
Alexander Capehart 2024-12-17 11:27:14 -05:00
parent 6850a3443f
commit 8bbb7497a6
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47

View file

@ -69,16 +69,17 @@ private class EvaluateStepImpl(
val preSongs =
rawSongs
.map { tagInterpreter.interpret(it, interpretation) }
.flowOn(Dispatchers.Main)
.flowOn(Dispatchers.Default)
.buffer(Channel.UNLIMITED)
val prePlaylists =
filterFlow.left
.map { playlistInterpreter.interpret(it, interpretation) }
.flowOn(Dispatchers.Main)
.flowOn(Dispatchers.Default)
.buffer(Channel.UNLIMITED)
val graphBuilder = MusicGraph.builder()
val graphBuild =
merge(
filterFlow.manager,
preSongs.onEach { graphBuilder.add(it) },
prePlaylists.onEach { graphBuilder.add(it) })
graphBuild.collect()