xmltv/grab/uk_rt tv_grab_uk_rt.in,1.384,1.385
Nick Morrott <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/uk_rt
In directory vz-cvs-3.sog:/tmp/cvs-serv12154/grab/uk_rt
Modified Files:
tv_grab_uk_rt.in
Log Message:
Only exit with a failure status if listings for any complete channels are missing. If channels are all available but some programmes cannot be processed, exit with success but inform user of the fact
Index: tv_grab_uk_rt.in
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/uk_rt/tv_grab_uk_rt.in,v
retrieving revision 1.384
retrieving revision 1.385
diff -C2 -d -r1.384 -r1.385
*** tv_grab_uk_rt.in 8 Jun 2012 05:04:52 -0000 1.384
--- tv_grab_uk_rt.in 8 Jun 2012 07:34:38 -0000 1.385
***************
*** 273,277 ****
# Track problems during listings retrieval. Currently we exit(1) only if
# listings data is missing for any requested channels
! my $warnings = 0;
# Output XMLTV library and grabber versions
--- 273,278 ----
# Track problems during listings retrieval. Currently we exit(1) only if
# listings data is missing for any requested channels
! my $chan_warnings = 0;
! my $prog_warnings = 0;
# Output XMLTV library and grabber versions
***************
*** 325,332 ****
if (! $opt->{quiet}) {
print_empty_listings();
! if ($warnings) {
! say("\nFinished, but listings for some channels/programmes are missing. Check log.\n");
exit(1);
}
else {
say("\nFinished!\n");
--- 326,337 ----
if (! $opt->{quiet}) {
print_empty_listings();
! if ($chan_warnings) {
! say("\nFinished, but listings for some configured channels are missing. Check debug log.\n");
exit(1);
}
+ elsif ($prog_warnings) {
+ say("\nFinished, but listings for some programmes could not be processed. Check debug log.\n");
+ exit(0);
+ }
else {
say("\nFinished!\n");
***************
*** 985,989 ****
say("No listings data available for '$rt_name' ($xmltv_id), skipping");
}
! $warnings++;
next WANTED_CH;
}
--- 990,994 ----
say("No listings data available for '$rt_name' ($xmltv_id), skipping");
}
! $chan_warnings++;
next WANTED_CH;
}
***************
*** 1040,1044 ****
t(" Too few data fields (need at least 23) in line:\n $prog\n");
}
! $warnings++;
t("\n ----\n");
next PROGRAMME;
--- 1045,1049 ----
t(" Too few data fields (need at least 23) in line:\n $prog\n");
}
! $prog_warnings++;
t("\n ----\n");
next PROGRAMME;
***************
*** 1101,1105 ****
# Validate key fields (title/date/time) before processing
if (! validate_key_fields(\%prog)) {
! $warnings++;
t("\n ----\n");
next PROGRAMME;
--- 1106,1110 ----
# Validate key fields (title/date/time) before processing
if (! validate_key_fields(\%prog)) {
! $prog_warnings++;
t("\n ----\n");
next PROGRAMME;
***************
*** 1110,1114 ****
'_deaf_signed','_black_and_white', '_choice', ) {
if (! validate_boolean_field(\%prog, $field) ) {
! $warnings++;
t("\n ----\n");
next PROGRAMME;
--- 1115,1119 ----
'_deaf_signed','_black_and_white', '_choice', ) {
if (! validate_boolean_field(\%prog, $field) ) {
! $prog_warnings++;
t("\n ----\n");
next PROGRAMME;
***************
*** 1188,1192 ****
# Create start/stop timings
if (! generate_start_stop_times(\%prog, $ts_dt)) {
! $warnings++;
t("\n ----\n");
next PROGRAMME;
--- 1193,1197 ----
# Create start/stop timings
if (! generate_start_stop_times(\%prog, $ts_dt)) {
! $prog_warnings++;
t("\n ----\n");
next PROGRAMME;
***************
*** 1280,1284 ****
if ($num_titles < 1) {
$empty_listings{$rt_name} = $rt_listings_uri;
! $warnings++;
t(" No programmes found for '$rt_name' - check source file");
}
--- 1285,1289 ----
if ($num_titles < 1) {
$empty_listings{$rt_name} = $rt_listings_uri;
! $chan_warnings++;
t(" No programmes found for '$rt_name' - check source file");
}
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/