Call done function even if the playlist or album is cached

This commit is contained in:
aditya-K2
2023-04-11 05:03:22 +05:30
parent bea42babd6
commit d15f2fd7b2

View File

@@ -71,6 +71,7 @@ func GetPlaylist(playlistId spotify.ID, done func(bool, error)) (*Playlist, erro
playlistCache[fp.ID] = p
return p, nil
} else {
done(true, nil)
return playlistCache[fp.ID], nil
}
}
@@ -112,6 +113,7 @@ func GetAlbum(albumID spotify.ID, done func(bool, error)) (*Album, error) {
albumCache[fa.ID] = p
return p, nil
} else {
done(true, nil)
return albumCache[albumID], nil
}