summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rwxr-xr-xutils/rhrd-schedules52
1 files changed, 31 insertions, 21 deletions
diff --git a/utils/rhrd-schedules b/utils/rhrd-schedules
index 39546b0..eadef5f 100755
--- a/utils/rhrd-schedules
+++ b/utils/rhrd-schedules
@@ -150,26 +150,30 @@ sub show__day_entry
${$show}{'DOW'} = 7 if ${$show}{'DOW'} == 0;
my @weeks = split('', ${$show}{'RHYTHM'});
- if (${$show}{'TYPE'} ne "s" && $title ne ${$show}{'TITLE'}) {
- print "WARNING: title mismatch (PV: '$title' != RD: '" . ${$show}{'TITLE'} . "') -- PV-id: $pvid\n";
- return 1;
- }
- if ($dow != ${$show}{'DOW'}) {
- print "WARNING: wrong day of week (PV: " . Date::Calc::Day_of_Week_to_Text($dow) . " != RD: " . Date::Calc::Day_of_Week_to_Text(${$show}{'DOW'}) . ") -- PV-id: $pvid\n";
- return 1;
- }
- if ($weeks[$week-1] != '1') {
- print "WARNING: this is week $week but show rhythm is: " . ${$show}{'RHYTHM'} . " -> show shouldn't air in this week. -- PV-id: $pvid\n";
- return 1
- }
- if ($duration->{'minutes'} != ${$show}{'LEN'}) {
- print "WARNING: wrong show length (PV: " . $duration->{'minutes'} . " != RD: " . ${$show}{'LEN'} . ") -- PV-id: $pvid\n";
- return 1
- }
- if ($start_short ne ${$show}{'STARTTIME'}) {
- print "WARNING: wrong show start-time (PV: " . $start_short . " != RD: " . ${$show}{'STARTTIME'} . ") -- PV-id: $pvid\n";
- return 1
+ if(${$show}{'TYPE'} ne "s") {
+ if($title ne ${$show}{'TITLE'}) {
+ print "WARNING: title mismatch (PV: '$title' != RD: '" . ${$show}{'TITLE'} . "') -- PV-id: $pvid\n";
+ return 1;
+ }
+ if($dow != ${$show}{'DOW'}) {
+ print "WARNING: wrong day of week (PV: " . Date::Calc::Day_of_Week_to_Text($dow) . " != RD: " . Date::Calc::Day_of_Week_to_Text(${$show}{'DOW'}) . ") -- PV-id: $pvid\n";
+ return 1;
+ }
+ if($weeks[$week-1] != '1') {
+ print "WARNING: this is week $week but show rhythm is: " . ${$show}{'RHYTHM'} . " -> show shouldn't air in this week. -- PV-id: $pvid\n";
+ return 1
+ }
+ if($duration->{'minutes'} != ${$show}{'LEN'}) {
+ print "WARNING: wrong show length (PV: " . $duration->{'minutes'} . " != RD: " . ${$show}{'LEN'} . ") -- PV-id: $pvid\n";
+ return 1
+ }
+ if($start_short ne ${$show}{'STARTTIME'}) {
+ print "WARNING: wrong show start-time (PV: " . $start_short . " != RD: " . ${$show}{'STARTTIME'} . ") -- PV-id: $pvid\n";
+ return 1
+ }
}
+ $title = $title . " (Wiederholung)" if(${$show}{'TYPE'} eq 'r');
+ $title = $title . " (Sondersendung)" if(${$show}{'TYPE'} eq 's');
print "OK: $title\n";
return 0;
}
@@ -429,7 +433,10 @@ sub orphans
}
if($mshows{$mshowid} == 0) {
- print "$mshowid: " . ${$show}{'TITLE'} . "\n";
+ my $title = ${$show}{'TITLE'};
+ $title = $title . " (Wiederholung)" if(${$show}{'TYPE'} eq 'r');
+ $title = $title . " (Sondersendung)" if(${$show}{'TYPE'} eq 's');
+ print "$mshowid: " . $title . "\n";
}
}
@@ -440,7 +447,10 @@ sub orphans
unless(defined $show) {
print "$status: $errorstring\n";
} elsif(${$show}{'TYPE'} ne 's') {
- print "$showid: " . ${$show}{'TITLE'} . "\n";
+ my $title = ${$show}{'TITLE'};
+ $title = $title . " (Wiederholung)" if(${$show}{'TYPE'} eq 'r');
+ $title = $title . " (Sondersendung)" if(${$show}{'TYPE'} eq 's');
+ print "$showid: " . $title . "\n";
}
}
}