summaryrefslogtreecommitdiff
path: root/rhimport-rs
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2013-02-14 18:53:02 (GMT)
committerChristian Pointner <equinox@helsinki.at>2013-02-14 18:53:02 (GMT)
commita3d9ec2f2eca86e89d7e32625982170863fe5eae (patch)
treea7b684fbc7fd078ace72025ffcbc2482b6b725dd /rhimport-rs
parent18701561626d8d4b06629243d54d1134d85a9198 (diff)
fixed radio stimme
Diffstat (limited to 'rhimport-rs')
-rwxr-xr-xrhimport-rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/rhimport-rs b/rhimport-rs
index 2ed45f7..a0c7012 100755
--- a/rhimport-rs
+++ b/rhimport-rs
@@ -76,14 +76,12 @@ if(!$to_cart) {
exit 1;
}
-my $curweek = get("http://airplay/curweek.php");
-if(!defined $curweek || $curweek !~ /Week \d/ ) {
+my $curweek = get("http://airplay/getweek.php");
+if(!defined $curweek || $curweek !~ /\d/ ) {
print "can't fetch current week info!\n";
$dbh->disconnect();
exit 1;
}
-
-$curweek =~ s/^.*Week (\d).*$/$1/;
if($curweek < 1 || $curweek > 4) {
print "current week($curweek) out of bounds!\n";
$dbh->disconnect();
@@ -128,7 +126,7 @@ if(Date::Calc::Delta_Days(@broadcast_date, @today) <= 0) {
exit 0;
}
-my $id = sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2])
+my $id = sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]);
my $bd = sprintf("%04d-%02d-%02d", $broadcast_date[0], $broadcast_date[1], $broadcast_date[2]);
my $bdfile = sprintf("RAST%04d%02d%02dCBA(.*)\.MP3", $broadcast_date[0], $broadcast_date[1], $broadcast_date[2]);