October 28, 2009
challenge done: a 6 line playlist.com WPF player using powershell and powerboots

Here is a quick version. It only works if the original song is still around. Maybe i’ll fix that another day but it was a nice little proof of concept.

ps code

$pl = 3040381707
$xml = [xml](new-object system.net.webclient).downloadstring(“http://pl.playlist.com/pl.php?playlist=$([int]($pl/256))”)
Boots -MaxHeight 600 { stackpanel -width 300 { Label -HorizontalAlignment center -FontSize 30 “Song Title” | Tee -Variable global:title;
MediaElement -loadedbehavior “Manual”  -Width 150 -height 1 - | Tee -Variable global:mp;Image -MaxWidth 180  | Tee -variable global:myimage}
ScrollViewer { stackpanel   {$xml.playlist.tracklist.track | foreach { button  $_.annotation -tooltip “$($_.tracktitle) `r`n by $($_.artist) `r`n on $($_.album)” -Tag $_ -On_Click {
if ($this.tag.image.length -gt 0){ $myimage.source = $this.tag.image }; $title.Content = $this.tag.tracktitle ; $mp.stop(); $mp.source = $this.tag.originallocation;$mp.play() }
if ($_.image.length -gt 0) { Image $_.image  -Height 50 -Width 50 ; }} }}}

screenie