Help Wizard

Step 1

NEXT STEP

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