radio fix
This commit is contained in:
parent
1acc255c61
commit
850cc63b7c
@ -643,7 +643,7 @@ func RadioFromPlaylist(ctx *gctx.Context, client *spotify.Client, playlist spoti
|
||||
if pages != 0 {
|
||||
randomPage = rand.Intn(int(pages-1)) + 1
|
||||
}
|
||||
playlistPage, err := client.GetPlaylistItems(ctx, playlist.ID, spotify.Limit(50), spotify.Offset(randomPage*50))
|
||||
playlistPage, err := client.GetPlaylistItems(ctx, playlist.ID, spotify.Limit(50), spotify.Offset((randomPage-1)*50))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ func HandleAlbumArtist(ctx *gctx.Context, client *spotify.Client, id spotify.ID)
|
||||
func HandlePlaylistRadio(ctx *gctx.Context, client *spotify.Client, playlist spotify.SimplePlaylist) {
|
||||
err := commands.RadioFromPlaylist(ctx, client, playlist)
|
||||
if err != nil {
|
||||
fmt.Println("AHHHHHHHHHHHHHHHHHH", err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user