musikr: handle duplicate playlist songs in graph
Accidentally flattened these out during graphing.
This commit is contained in:
@@ -141,10 +141,7 @@ private class MusicGraphBuilderImpl : MusicGraph.Builder {
|
|||||||
|
|
||||||
playlistVertices.forEach {
|
playlistVertices.forEach {
|
||||||
val pointer = SongPointer.UID(entry.key)
|
val pointer = SongPointer.UID(entry.key)
|
||||||
val index = it.pointerMap[pointer]
|
it.pointerMap[pointer]?.forEach { index -> it.songVertices[index] = vertex }
|
||||||
if (index != null) {
|
|
||||||
it.songVertices[index] = vertex
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,7 +370,7 @@ internal class PlaylistVertex(val prePlaylist: PrePlaylist) {
|
|||||||
val pointerMap =
|
val pointerMap =
|
||||||
prePlaylist.songPointers
|
prePlaylist.songPointers
|
||||||
.withIndex()
|
.withIndex()
|
||||||
.associateBy { it.value }
|
.groupBy { it.value }
|
||||||
.mapValuesTo(mutableMapOf()) { it.value.index }
|
.mapValuesTo(mutableMapOf()) { entry -> entry.value.map { it.index } }
|
||||||
val tag: Any? = null
|
val tag: Any? = null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user