iTunes Apache Interface

# iTunes Apache Interface { $version }

player state is { $state }.
{ $current ? "current track is $current." : '' }
{ $playlist ? "current playlist is $playlist." : '' }
|| Play || Stop || Pause || Restart ||

<< Previous || Next >>

{ my $str = 'Volume: '; $str .= join ".", map { my $value = $_ * 10; qq|$_| } 0 .. 11; $str; }

Playlists | Tracks
{ require URI::Escape; my $str; foreach my $this ( @playlists ) { if( $this eq $playlist ) { $str .= qq|
$this
\n|; } else { my $encoded = URI::Escape::uri_escape( $this ); $str .= "
"; $str .= qq|$this|; $str .= "
\n"; } } $str; } | { my $str; my $count = 0; my $list = URI::Escape::uri_escape( $playlist ); foreach my $track ( @tracks ) { $count++; if( $track eq $current ) { $str .= qq|
$track
\n|; } else { $str .= "
"; $str .= qq|$track|; $str .= "
\n"; } } $str; }