diff options
-rwxr-xr-x | rhimport-rs | 8 |
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]); |