diff options
author | Christian Pointner <equinox@helsinki.at> | 2014-01-03 19:16:08 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2014-01-03 19:16:08 (GMT) |
commit | 2ed0fc1ba24df52b44f97c5159e13ac96b5bf13f (patch) | |
tree | 4c6051422ddceee4eab194591e4940c7e05ccb13 | |
parent | 130f073f6f66a51675d4b2371b5a11871bbfdea7 (diff) |
fixed btl and oi importer (moved Radio Helsinki broadcast to Tuesday)
-rwxr-xr-x | rhimport-btl | 7 | ||||
-rwxr-xr-x | rhimport-oi | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/rhimport-btl b/rhimport-btl index eee9285..ad177b9 100755 --- a/rhimport-btl +++ b/rhimport-btl @@ -71,10 +71,9 @@ my $to_cart = $allowed_dbs[0]->{'TO_CART'}; my @today = Date::Calc::Today(); -my $dow = Date::Calc::Day_of_Week(@today); my @import_date = Date::Calc::Add_Delta_Days(@today, 7); @import_date = Date::Calc::Standard_to_Business(@import_date); -$import_date[2] = 1; +$import_date[2] = 2; my @broadcast_date = @import_date; $broadcast_date[2] = 5; @@ -85,8 +84,8 @@ print "today: " . Date::Calc::Date_to_Text(@today) . "\n"; print "day of next Radio Helsinki broadcast: " . Date::Calc::Date_to_Text(@import_date) . "\n"; print "ending of current broadcast cycle: " . Date::Calc::Date_to_Text(@broadcast_date) . "\n"; -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 $id = sprintf("%04d-%02d-%02d", @import_date); +my $bd = sprintf("%04d-%02d-%02d", @broadcast_date); my $bdfile = sprintf("%02d%02d%02d-btlv128\.mp3", $broadcast_date[0]%100, $broadcast_date[1], $broadcast_date[2]); print "looking for files like '$bdfile' in RSS Feed\n"; diff --git a/rhimport-oi b/rhimport-oi index cc0adb6..d596c0b 100755 --- a/rhimport-oi +++ b/rhimport-oi @@ -72,10 +72,9 @@ my $to_cart = $allowed_dbs[0]->{'TO_CART'}; my @today = Date::Calc::Today(); -my $dow = Date::Calc::Day_of_Week(@today); my @import_date = Date::Calc::Add_Delta_Days(@today, 7); @import_date = Date::Calc::Standard_to_Business(@import_date); -$import_date[2] = 1; +$import_date[2] = 2; @import_date = Date::Calc::Business_to_Standard(@import_date); my $broadcast_num = `cat $LAST_FILE`; @@ -85,7 +84,7 @@ print "today: " . Date::Calc::Date_to_Text(@today) . "\n"; print "day of next Radio Helsinki broadcast: " . Date::Calc::Date_to_Text(@import_date) . "\n"; print "Number of next broadcast: " . $broadcast_num . "\n"; -my $id = sprintf("%04d-%02d-%02d", $import_date[0], $import_date[1], $import_date[2]); +my $id = sprintf("%04d-%02d-%02d", @import_date); my $bdfile = sprintf('.*ondainfo_%d.*\.mp3$', $broadcast_num); my $current_stat = `cat $STAT_FILE`; |