diff --git a/internal/commands/commands.go b/internal/commands/commands.go index 846d088..50c3fff 100644 --- a/internal/commands/commands.go +++ b/internal/commands/commands.go @@ -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 } diff --git a/internal/tui/handlers.go b/internal/tui/handlers.go index d788d6c..d6a5fc6 100644 --- a/internal/tui/handlers.go +++ b/internal/tui/handlers.go @@ -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 } }