Skip to content

Instantly share code, notes, and snippets.

@plamere
Created June 20, 2015 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plamere/2fa839150815f040450d to your computer and use it in GitHub Desktop.
Save plamere/2fa839150815f040450d to your computer and use it in GitHub Desktop.
An example of using PBL to create a cynical radio station where every 4th song is by Sia or Katy Perry
from pbl import *
gold = Concatenate([ArtistTopTracks('Sia'), ArtistTopTracks('Katy Perry')])
norm = PlaylistSource("Today's Top Hits")
radio = Alternate([norm, norm, norm, Shuffler(gold)])
radio = PlaylistSave(radio, 'cynical radio', 'plamere', max_size=40)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment