Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Perl Crap

Name: Anonymous 2009-04-02 20:31

Okay I have a Now Playing script for irssi that is for what I am playing in Amarok, the only information it shows is the song title and current time I am at in the song. I would like it to also show what the bitrate is for the song as well. Could anybody help me with this? H

Here is the code to get the song title and current time for reference.

# Get some infos
            $song = `$dcopbin amarok default nowPlaying`;
            chomp($song);
            $timenow = `$dcopbin amarok default trackCurrentTime`;
            # Converting times to a more readable format
            $minutes = ($timenow/60)%60;
            $seconds = $timenow%60;
            # Add the leading zero
            if ($seconds < 10) {
                $seconds = "0" . $seconds;
            }
            $timetotal = `$dcopbin amarok default trackTotalTime`;
            $timetotal = $timetotal/1000;
            $minutestotal = ($timetotal/60)%60;
            $secondstotal = $timetotal%60;
            # Here too
            if ($secondstotal < 10) {
                $secondstotal = "0" . $secondstotal;

Name: Anonymous 2009-04-02 20:36

Fuck off

$bitrate = chomp(``$dcopbin amarok player bitrate`);

Name: Anonymous 2010-12-06 9:41

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2011-02-02 23:56

Name: Anonymous 2011-02-03 6:11

Name: Anonymous 2011-02-03 8:37

<

Don't change these.
Name: Email:
Entire Thread Thread List