# encoding: ascii
# api: powershell
# title: playlist.com music cache
# description: a one liner to download playlist.com music to a cache directory.
# version: 0.1
# license: CC0
# x-poshcode-id: 1429
# x-derived-from-id: 1437
# x-archived: 2011-01-17T07:46:47
#
#

#put the playlist.com playlist number into $pl
$pl = 14870805259;

([xml](new-object system.net.webclient).downloadstring("http://pl.playlist.com/pl.php?playlist=$([int]($pl/256))")).playlist.tracklist.track | % {try { $a= $_.tracktitle;$a;(new-object system.net.webclient).downloadfile($_.originallocation,"c:\musiccache\$a.mp3") } catch { } }
