summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2012-07-20 15:15:53 (GMT)
committerChristian Pointner <equinox@helsinki.at>2012-07-20 15:15:53 (GMT)
commite73fe00e57c029476cf729246d0a13747324e9d1 (patch)
tree0a6159414432eca591c7f0cd0d259ba261536b2f
parent938a1d5ab00120204a32a9e9147b7b6bd5f58005 (diff)
fixed raio stimme import
-rwxr-xr-xrhimport-rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/rhimport-rs b/rhimport-rs
index ff3f016..b92d310 100755
--- a/rhimport-rs
+++ b/rhimport-rs
@@ -85,9 +85,9 @@ print "day of Radio Helsinki broadcast: " . Date::Calc::Date_to_Text(@import_dat
print "day of Radio Helsinki rebroadcast: " . Date::Calc::Date_to_Text(@import_date_reb) . "\n";
my $bdtw = sprintf("%04d-%02d-%02d", $broadcast_day[0], $broadcast_day[1], $broadcast_day[2]);
-my $bdtwfile = sprintf("RAST%04d%02d%02dCBA(.*).MP3", $broadcast_day[0], $broadcast_day[1], $broadcast_day[2]);
+my $bdtwfile = sprintf("RAST%04d%02d%02dCBA(.*)\.MP3", $broadcast_day[0], $broadcast_day[1], $broadcast_day[2]);
my $bdlw = sprintf("%04d-%02d-%02d", $broadcast_day_last_week[0], $broadcast_day_last_week[1], $broadcast_day_last_week[2]);
-my $bdlwfile = sprintf("RAST%04d%02d%02dCBA(.*).MP3", $broadcast_day_last_week[0], $broadcast_day_last_week[1], $broadcast_day_last_week[2]);
+my $bdlwfile = sprintf("RAST%04d%02d%02dCBA(.*)\.MP3", $broadcast_day_last_week[0], $broadcast_day_last_week[1], $broadcast_day_last_week[2]);
print "looking for files from $bdtw or $bdlw in RSS Feed\n";
my $feed = XML::Feed->parse(URI->new($RSS_URL))
@@ -103,7 +103,7 @@ while(1) {
for my $entry ($feed->entries) {
if($entry->enclosure && $entry->enclosure->type eq "audio/mpeg") {
my $ff = File::Fetch->new(uri => $entry->enclosure->url);
- next if(uc($ff->output_file) ne $bdfile); # file not from correct day
+ next unless (uc($ff->output_file) =~ $bdfile); # file not from correct day
my $sum_title = $entry->title;
my $sum_text = $entry->content->body;