remove AHHHH
This commit is contained in:
parent
bb7ca37549
commit
9c35d5cf36
@ -461,7 +461,6 @@ func RefillRadio(ctx *gctx.Context, client *spotify.Client) error {
|
|||||||
_, err = client.RemoveTracksFromPlaylist(ctx, radioPlaylist.ID, trackGroups...)
|
_, err = client.RemoveTracksFromPlaylist(ctx, radioPlaylist.ID, trackGroups...)
|
||||||
}
|
}
|
||||||
to_add := 500 - (playlistItems.Total - len(to_remove))
|
to_add := 500 - (playlistItems.Total - len(to_remove))
|
||||||
fmt.Println("TO ADD", to_add)
|
|
||||||
rand.Seed(time.Now().Unix())
|
rand.Seed(time.Now().Unix())
|
||||||
playlistItems, err = client.GetPlaylistItems(ctx, radioPlaylist.ID)
|
playlistItems, err = client.GetPlaylistItems(ctx, radioPlaylist.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -514,12 +513,9 @@ func RefillRadio(ctx *gctx.Context, client *spotify.Client) error {
|
|||||||
all_recs[rec] = struct{}{}
|
all_recs[rec] = struct{}{}
|
||||||
queue = append(queue, rec)
|
queue = append(queue, rec)
|
||||||
}
|
}
|
||||||
fmt.Println("AHHHHHHH", len(queue))
|
|
||||||
to_add -= len(queue)
|
to_add -= len(queue)
|
||||||
_, err = client.AddTracksToPlaylist(ctx, radioPlaylist.ID, queue...)
|
_, err = client.AddTracksToPlaylist(ctx, radioPlaylist.ID, queue...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
||||||
fmt.Println("AHHH ERROR ONE")
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
err = client.Repeat(ctx, "context")
|
err = client.Repeat(ctx, "context")
|
||||||
|
Loading…
Reference in New Issue
Block a user