From 0584384ef80e2f48cc66dbd465f79ca568a859bb Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 26 May 2023 14:07:19 +0200 Subject: update rhautoimport for Eigenklang diff --git a/INFO b/INFO index a8747b8..4b8742d 100644 --- a/INFO +++ b/INFO @@ -62,7 +62,7 @@ https://cba.fro.at/series/eigenklang/feed Original: letzter Montag im Monat - Upload: immer ein paar Tage früher, meistens Mi oder Do davor + Upload: meistens am selben Tag, manchmal ein paar Tage früher aber auch gelegentlich ein paar Tage später Such-Kriterium: cba:broadcastDate RH: 4wöchentlich, Woche 2, Dienstag, 08:30-09:30 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"; -- cgit v0.10.2