summaryrefslogtreecommitdiff
path: root/rhautoimport-ek
diff options
context:
space:
mode:
Diffstat (limited to 'rhautoimport-ek')
-rwxr-xr-xrhautoimport-ek12
1 files changed, 6 insertions, 6 deletions
diff --git a/rhautoimport-ek b/rhautoimport-ek
index 5302b23..20b2c22 100755
--- a/rhautoimport-ek
+++ b/rhautoimport-ek
@@ -42,7 +42,7 @@ my $RD_GROUP = "eigenklang";
my $PV_ID = '30';
my $TITLE = "Eigenklang";
my $LAST_RUN = 0;
-my $upload_delay_days = -3; # files are usally there at least 3 days before original broadcast
+my $upload_delay_days = -1; # files are sometimes there 1-3 days before original broadcast
binmode(STDIN, ":utf8");
binmode(STDOUT, ":utf8");
@@ -50,7 +50,7 @@ binmode(STDERR, ":utf8");
my $curweek = RHRD::utils::get_rd_week();
-if($curweek == 2) {
+if($curweek == 3) {
if($#ARGV >= 0 && $ARGV[0] eq 'last') {
print "!!!This is the last attempt, there won't be a retry on error!!!\n";
$LAST_RUN = 1;
@@ -68,15 +68,15 @@ $import_date[2] = 2;
my $dow = Date::Calc::Day_of_Week(@today);
if($curweek == 1) {
- @import_date = Date::Calc::Add_Delta_Days(@import_date, 7);
+ @import_date = Date::Calc::Add_Delta_Days(@import_date, 14);
} elsif($curweek == 2) {
+ @import_date = Date::Calc::Add_Delta_Days(@import_date, 7);
+} elsif($curweek == 3) {
if($dow > 2) {
@import_date = Date::Calc::Add_Delta_Days(@import_date, 28);
}
-} elsif($curweek == 3) {
- @import_date = Date::Calc::Add_Delta_Days(@import_date, 21);
} else {
- @import_date = Date::Calc::Add_Delta_Days(@import_date, 14);
+ @import_date = Date::Calc::Add_Delta_Days(@import_date, 21);
}
print "day of next Radio Helsinki broadcast: " . Date::Calc::Date_to_Text(@import_date) . "\n";