Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

A better random play

A better random play

My frustration is I want Spotify to play my playlist randomly but not play a track more than once. I work in IT but not a developer but can code simply for Systems tasks in Powershell. This below does what I am after - maybe it could be adapted to work in Spotify ?

cls
$tunes = New-Object System.Collections.ArrayList
$tracks = 24
#populate 
For ($i=1;$i -le $tracks;$i++)
{
$out = "tune " + $i
$tunes.add($out)
}
#"play" then remove from list
For ($i=1;$i -le $tracks;$i++)
{
$index = Get-Random -Maximum $tunes.Count
$tunes[$index]
$tunes.Remove($tunes[$index])
}
"End = " + $tunes

 

Reply
0 Replies

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random