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;
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;