Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
Scoop Box Exchange - Show Box: music 1.00

Author: b1o [Info]

Description:

Will display information about the song currently playing on XMMS. Requires xmms info pipe

Box Code:

# code used from xmms InfoPipe by Weyfor WWWWolf
# additions/modifications by b1o
# requires xmms and xmms InfoPipe

use vars qw($tune $pos $status $time $total $current);

sub htmlescape {
my $string = shift;

$string =~ s/&/&/gi;
$string =~ s/</</gi;
$string =~ s/>/>/gi;

return $string;
}

open(INFO,"/tmp/xmms-info") or do {
print header();
exit(0);
};

while(<INFO>) {
chomp;
if(/^Status: (.*)$/)
{
$status = htmlescape($1);
}

if(/^Time: (.*)$/)
{
$time = htmlescape($1);
}

if(/^Tunes in playlist: (.*)$/)
{
$total = htmlescape($1);
}

if(/^Currently playing: (.*)$/)
{
$current = htmlescape($1);
}

if(/^Title: (.*)$/)
{
$tune = htmlescape($1);
}

if(/^Position: (.*)$/)
{
$pos = htmlescape($1);
}
}


close INFO;

my $content .= "$tune <br> status :: $status <br> total time :: $time <br> elapsed :: $pos <br> song :: $current of $total ";

return $content
Display: Sort:
Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Scoop Site Scroller: Get one yourself!
Kuro5hin.org
Cooler than Adequacy.org

Login
Make a new account
Username:
Password:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

create account | faq | search