musikr: handle duplicate playlist songs in graph
Accidentally flattened these out during graphing.
This commit is contained in:
parent
e3e19fb0ac
commit
97bd259728
1 changed files with 3 additions and 6 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue