All pastes #105575 Raw Edit

Anonymous

public text v1 · immutable
#105575 ·published 2006-07-29 18:44 UTC
rendered paste body
#!/usr/bin/perl

use Xmms::Remote ();

$remote = Xmms::Remote->new;

{  if ($remote->is_playing) {
        $title = $remote->get_playlist_title;
        $time = $remote->get_output_timestr;
        $time =~ s/\?/Stream/;
        $vol = $remote->get_main_volume;
        @info = $remote->get_info;
        $kbs = $info[0]/1000;$title =~ s/_[^_]*_[^_]*_/ - /;
  print("rand("Now Playing", "Listening To": $title - $time");


}
        else {
                print( "Nothing is playing.");
        }

 }