You are not logged in.
Hi!
I was using this perl file, to announce theme information in xchat...
but do not works with the latest audacious version...
maybe someone knows where to change to solve it?
#!/usr/bin/perl -w
# Audacious XChat Announcer 0.1
# (C) Copyright 2007 - Milad Rastian <rastian AT gmail dot com>
# Thanks to Tim Denholm for his Rhythmbox XChat Announcer Plugin
# With this script you can control your Audacious playe from XChat
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#How To Use ?
#1.Rename this file to xchat_audacious.pl
#2.Just copy this file in ~/.xchat2 and in IRC write /ab_help to more help ;)
use POSIX qw(strftime);
$script_name = "Audacious XChat Announcer";
$script_version = "0.1";
$script_description = "Announces the current playing song information from Audacious in XChat.";
$audacious_version = `audacious --version`;
$audacious_version =~ s/Gnome\saudacious\s//;
chop $audacious_version;
IRC::register($script_name,$script_version,$script_description,"");
IRC::print("Loaded \002".$script_name."\002:");
IRC::print("Use \002/ab_help\002 to display a list of commands.");
IRC::add_command_handler("ab_announce","ab_announce");
IRC::add_command_handler("ab_next","ab_next");
IRC::add_command_handler("ab_prev","ab_prev");
IRC::add_command_handler("ab_play","ab_play");
IRC::add_command_handler("ab_pause","ab_pause");
IRC::add_command_handler("ab_version","ab_version");
IRC::add_command_handler("ab_help","ab_help");
sub ab_announce
{
if (`ps -C audacious` =~ /audacious/) {
# Get current playing song information.
$song_info = `audtool --current-song `;
chop $song_info;
IRC::command("/me np: ".$song_info." ♬");
} else {
IRC::print("Audacious is not currently running, you bastard.");
}
return 1;
}
sub ab_next
{
# Skip to the next track.
eval `audtool --playlist-advance`;
IRC::print("Skipped to next track.");
return 1;
}
sub ab_prev
{
# Skip to the previous track.
eval `audtool --playlist-reverse`;
IRC::print("Skipped to previous track.");
return 1;
}
sub ab_play
{
# Start playback.
eval `audtool --playback-play`;
IRC::print("Started playback.");
return 1;
}
sub ab_pause
{
# Pause playback.
eval `audtool playback-pause`;
IRC::print("Paused playback.");
return 1;
}
sub ab_version
{
# Display version information to a channel.
IRC::command("/me is using ".$script_name." ".$script_version." with Audacious ".$audacious_version." and XChat ".IRC::get_info(0));
return 1;
}
sub ab_help
{
# Display help screen.
IRC::print("\002\037".$script_name." Help:\037\002");
IRC::print(" \002About:\002");
IRC::print(" * Author: Milad Rastian <rastian AT gmail DOT com>");
IRC::print(" * URL: http://fritux.com/");
IRC::print(" * Script Version: ".$script_version);
IRC::print(" * Audacious Version: ".$rhythmbox_version);
IRC::print(" * XChat Version: ".IRC::get_info(0));
IRC::print(" \002Commands:\002");
IRC::print(" * /ab_announce - Display the current song playing to a channel.");
IRC::print(" * /ab_next - Skip to the next track.");
IRC::print(" * /ab_prev - Skip to the previous track.");
IRC::print(" * /ab_play - Start playback.");
IRC::print(" * /ab_pause - Pause playback.");
IRC::print(" * /ab_version - Display version information for the script, Rhythmbox and XChat to a channel.");
IRC::print(" * /ab_help - Display this help screen.");
return 1;
}
<{
Last edited by luuuciano (2009-08-23 16:42:16)
I arch, you arch, he arch, she arch, we arch, they arch...
Offline
Hello luuuciano!
Can you produce any error log/output about the behaviour of it ?
Offline
well, it always shows the "Audacious is not currently running, you bastard." string
maybe audacious changed his way to show information....
I arch, you arch, he arch, she arch, we arch, they arch...
Offline
You can check it from the Changelog, if you feel that.
Offline
I asked it in the audacious irc channel, really helpful pleople in there... in two minutes it was solved
here it is a working version:
#!/usr/bin/perl -w
# Audacious XChat Announcer 0.1
# (C) Copyright 2007 - Milad Rastian <rastian AT gmail dot com>
# Thanks to Tim Denholm for his Rhythmbox XChat Announcer Plugin
# With this script you can control your Audacious playe from XChat
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#How To Use ?
#1.Rename this file to xchat_audacious.pl
#2.Just copy this file in ~/.xchat2 and in IRC write /ab_help to more help ;)
use POSIX qw(strftime);
$script_name = "Audacious XChat Announcer";
$script_version = "0.1";
$script_description = "Announces the current playing song information from Audacious in XChat.";
$audacious_version = `audacious2 --version`;
$audacious_version =~ s/Gnome\saudacious\s//;
chop $audacious_version;
IRC::register($script_name,$script_version,$script_description,"");
IRC::print("Loaded \002".$script_name."\002:");
IRC::print("Use \002/ab_help\002 to display a list of commands.");
IRC::add_command_handler("ab_announce","ab_announce");
IRC::add_command_handler("ab_next","ab_next");
IRC::add_command_handler("ab_prev","ab_prev");
IRC::add_command_handler("ab_play","ab_play");
IRC::add_command_handler("ab_pause","ab_pause");
IRC::add_command_handler("ab_version","ab_version");
IRC::add_command_handler("ab_help","ab_help");
sub ab_announce
{
if (`ps -C audacious2` =~ /audacious2/) {
# Get current playing song information.
$song_info = `audtool2 --current-song `;
chop $song_info;
IRC::command("/me np: ".$song_info." ♬");
} else {
IRC::print("Audacious is not currently running, you bastard.");
}
return 1;
}
sub ab_next
{
# Skip to the next track.
eval `audtool2 --playlist-advance`;
IRC::print("Skipped to next track.");
return 1;
}
sub ab_prev
{
# Skip to the previous track.
eval `audtool2 --playlist-reverse`;
IRC::print("Skipped to previous track.");
return 1;
}
sub ab_play
{
# Start playback.
eval `audtool2 --playback-play`;
IRC::print("Started playback.");
return 1;
}
sub ab_pause
{
# Pause playback.
eval `audtool2 playback-pause`;
IRC::print("Paused playback.");
return 1;
}
sub ab_version
{
# Display version information to a channel.
IRC::command("/me is using ".$script_name." ".$script_version." with Audacious ".$audacious_version." and XChat ".IRC::get_info(0));
return 1;
}
sub ab_help
{
# Display help screen.
IRC::print("\002\037".$script_name." Help:\037\002");
IRC::print(" \002About:\002");
IRC::print(" * Author: Milad Rastian <rastian AT gmail DOT com>");
IRC::print(" * URL: http://fritux.com/");
IRC::print(" * Script Version: ".$script_version);
IRC::print(" * Audacious Version: ".$rhythmbox_version);
IRC::print(" * XChat Version: ".IRC::get_info(0));
IRC::print(" \002Commands:\002");
IRC::print(" * /ab_announce - Display the current song playing to a channel.");
IRC::print(" * /ab_next - Skip to the next track.");
IRC::print(" * /ab_prev - Skip to the previous track.");
IRC::print(" * /ab_play - Start playback.");
IRC::print(" * /ab_pause - Pause playback.");
IRC::print(" * /ab_version - Display version information for the script, Rhythmbox and XChat to a channel.");
IRC::print(" * /ab_help - Display this help screen.");
return 1;
}
just changed audtool2 and audacious2 at some places
enjoy it
Last edited by luuuciano (2009-08-22 23:28:58)
I arch, you arch, he arch, she arch, we arch, they arch...
Offline
You can mark the topic with 'SOLVED'.
Offline
Here the code for a something.pl file at ~/.xchat2, that works with the current audacious version
#!/usr/bin/perl -w
# Audacious XChat Announcer 0.1
# (C) Copyright 2007 - Milad Rastian <rastian AT gmail dot com>
# Thanks to Tim Denholm for his Rhythmbox XChat Announcer Plugin
# With this script you can control your Audacious playe from XChat
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#How To Use ?
#1.Rename this file to xchat_audacious.pl
#2.Just copy this file in ~/.xchat2 and in IRC write /ab_help to more help ;)
use POSIX qw(strftime);
$script_name = "Audacious XChat Announcer";
$script_version = "0.1";
$script_description = "Announces the current playing song information from Audacious in XChat.";
$audacious_version = `audacious --version`;
$audacious_version =~ s/Gnome\saudacious\s//;
chop $audacious_version;
IRC::register($script_name,$script_version,$script_description,"");
IRC::print("Loaded \002".$script_name."\002:");
IRC::print("Use \002/ab_help\002 to display a list of commands.");
IRC::add_command_handler("ab_announce","ab_announce");
IRC::add_command_handler("ab_next","ab_next");
IRC::add_command_handler("ab_prev","ab_prev");
IRC::add_command_handler("ab_play","ab_play");
IRC::add_command_handler("ab_pause","ab_pause");
IRC::add_command_handler("ab_version","ab_version");
IRC::add_command_handler("ab_help","ab_help");
sub ab_announce
{
if (`ps -C audacious` =~ /audacious/) {
# Get current playing song information.
$song_info = `audtool --current-song `;
chop $song_info;
IRC::command("/me np: ".$song_info." ♬");
} else {
IRC::print("Audacious is not currently running, you bastard.");
}
return 1;
}
sub ab_next
{
# Skip to the next track.
eval `audtool --playlist-advance`;
IRC::print("Skipped to next track.");
return 1;
}
sub ab_prev
{
# Skip to the previous track.
eval `audtool --playlist-reverse`;
IRC::print("Skipped to previous track.");
return 1;
}
sub ab_play
{
# Start playback.
eval `audtool --playback-play`;
IRC::print("Started playback.");
return 1;
}
sub ab_pause
{
# Pause playback.
eval `audtool playback-pause`;
IRC::print("Paused playback.");
return 1;
}
sub ab_version
{
# Display version information to a channel.
IRC::command("/me is using ".$script_name." ".$script_version." with Audacious ".$audacious_version." and XChat ".IRC::get_info(0));
return 1;
}
sub ab_help
{
# Display help screen.
IRC::print("\002\037".$script_name." Help:\037\002");
IRC::print(" \002About:\002");
IRC::print(" * Author: Milad Rastian <rastian AT gmail DOT com>");
IRC::print(" * URL: http://fritux.com/");
IRC::print(" * Script Version: ".$script_version);
IRC::print(" * Audacious Version: ".$rhythmbox_version);
IRC::print(" * XChat Version: ".IRC::get_info(0));
IRC::print(" \002Commands:\002");
IRC::print(" * /ab_announce - Display the current song playing to a channel.");
IRC::print(" * /ab_next - Skip to the next track.");
IRC::print(" * /ab_prev - Skip to the previous track.");
IRC::print(" * /ab_play - Start playback.");
IRC::print(" * /ab_pause - Pause playback.");
IRC::print(" * /ab_version - Display version information for the script, Rhythmbox and XChat to a channel.");
IRC::print(" * /ab_help - Display this help screen.");
return 1;
}
I arch, you arch, he arch, she arch, we arch, they arch...
Offline
Here the code for a something.pl file at ~/.xchat2, that works with the current audacious version
Thank you Very Much!
this worked on Xubuntu 12.04 just now.
Again, Thanks.
Offline