|
From: <pf...@us...> - 2012-05-26 07:01:00
|
Revision: 838
http://openautomation.svn.sourceforge.net/openautomation/?rev=838&view=rev
Author: pfry
Date: 2012-05-26 07:00:53 +0000 (Sat, 26 May 2012)
Log Message:
-----------
Initialisierung verbessert, gibt jetzt auch was im Log aus
Modified Paths:
--------------
wiregate/plugin/generic/Ansagen.pl
Modified: wiregate/plugin/generic/Ansagen.pl
===================================================================
--- wiregate/plugin/generic/Ansagen.pl 2012-05-25 07:14:08 UTC (rev 837)
+++ wiregate/plugin/generic/Ansagen.pl 2012-05-26 07:00:53 UTC (rev 838)
@@ -61,29 +61,43 @@
my $name=$eibgaconf{$ga}{name};
next unless defined $name;
+ my $channel_found=undef;
for my $pat (keys %channels)
{
next if $pat eq 'default' || $name!~/$pat/;
- $plugin_subscribe{$ga}{$plugname}=1;
- $gas{$channels{$pat}}++;
-
- if($name=~/$radioga/)
- {
- speak($channels{$pat},$name,'AUS');
- }
+ $channel_found=$channels{$pat};
+ last;
}
+ next unless $channel_found;
- }
+ $gas{$channel_found}++;
+ $plugin_subscribe{$ga}{$plugname}=1;
- for my $channel (values %channels)
- {
- $plugin_info{$plugname.'_radio_'.$channel}='AUS';
+ if($name=~/$radioga/)
+ {
+ speak($channel_found,$name,'AUS');
+ $plugin_info{$plugname.'_radio_'.$channel_found}='AUS';
+ plugin_log($plugname, 'Internetradio auf Kanal '.$channel_found.', GA='.$ga);
+ }
}
- for my $ga (@additional_subscriptions)
+ my $channel_found=$channels{'default'};
+ if($channel_found)
{
- $plugin_subscribe{$ga}{$plugname}=1;
- $gas{$channels{default}}++;
+ for my $ga (@additional_subscriptions)
+ {
+ my $name=$eibgaconf{$ga}{name};
+
+ $gas{$channel_found}++;
+ $plugin_subscribe{$ga}{$plugname}=1;
+
+ if($name=~/$radioga/)
+ {
+ speak($channel_found,$name,'AUS');
+ $plugin_info{$plugname.'_radio_'.$channel_found}='AUS';
+ plugin_log($plugname, 'Internetradio auf Kanal '.$channel_found.', GA='.$ga);
+ }
+ }
}
$plugin_info{$plugname.'_cycle'}=0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|