the order was causing a major bug which lead to addition of all the songs to the playlist as empty map was returned

This commit is contained in:
aditya-K2 2021-11-16 20:00:04 +05:30
parent 46fed215b9
commit ab9f2c55f5

View File

@ -249,10 +249,10 @@ to add tracks to the playlist */
func QueryArtistTreeForTracks(a map[string]map[string]map[string]string, track string) map[[3]string]string {
TrackMap := make(map[[3]string]string)
for artistName, albumMap := range a {
for albumNam, trackList := range albumMap {
for albumName, trackList := range albumMap {
for trackName, path := range trackList {
if trackName == track {
TrackMap[[3]string{artistName, albumNam, trackName}] = path
TrackMap[[3]string{trackName, artistName, albumName}] = path
}
}
}