summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-04-30 12:26:19 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-04-30 12:26:23 (GMT)
commitb2e571277916457e59db76ef99a859640fd0f798 (patch)
tree19e78cf4eacdc6ddf60784a61e052fddc11b32ce
parent2aeefd789fbdc131948a9fd6527e659ba1f765bc (diff)
added check for start date in schedule generation
-rwxr-xr-xutils/rhrd-schedules7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/rhrd-schedules b/utils/rhrd-schedules
index 2d509a9..aa67b10 100755
--- a/utils/rhrd-schedules
+++ b/utils/rhrd-schedules
@@ -49,7 +49,11 @@ sub generate
my $title = ${$entry}{'title'};
my $pvid = ${$entry}{'id'};
my $showid = ${$entry}{'automation-id'};
+
next if $pvid == 1; # 'Unmoderiertes Musikprogramm'
+ # maybe only the end is on this day - we don't need this to include in the log since only
+ # start times matter here.
+ next if ($start->year != $year || $start->month != $month || $start->day != $day);
if($start->year != $year || $start->month != $month || $start->day != $day) {
print "WARNING: skipping entry whith invalid start -> $start: $title ($pvid)\n";
@@ -103,6 +107,9 @@ sub show__day
my $showid = ${$entry}{'automation-id'};
next if $pvid == 1; # 'Unmoderiertes Musikprogramm'
+ # maybe only the end is on this day - we don't need this to include in the log since only
+ # start times matter here.
+ next if ($start->year != $year || $start->month != $month || $start->day != $day);
print " " . DateTime::Format::Strptime::strftime("%H:%M:%S", $start) . ": ($showid) -> ";
if($showid > 0) {