xmltv/lib Augment.pm,1.19,1.20
Nick Morrott <[email protected]> Tue, 12 Jul 2016 01:30:10 +0000
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/lib
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv26134/lib
Modified Files:
Augment.pm
Log Message:
Update tidy_desc_text()
* remove empty <desc> before writing
There is the potential for rules to remove all existing text from the
description field, leaving an empty - but defined - field.
Index: Augment.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/Augment.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** Augment.pm 12 Jul 2016 01:29:56 -0000 1.19
--- Augment.pm 12 Jul 2016 01:30:08 -0000 1.20
***************
*** 371,374 ****
--- 371,375 ----
# Tidy <desc> description text
+ # Remove <desc> if empty/whitespace
sub tidy_desc_text () {
my ($self, $prog) = @_;
***************
*** 384,387 ****
--- 385,399 ----
}
}
+
+ # delete desc if now empty
+ # TODO: needs modifying to properly handle multiple descriptions
+ if (defined $prog->{'desc'}) {
+ if ( $prog->{'desc'}[0][0] =~ m/^\s*$/ ) {
+ splice(@{$prog->{'desc'}},0,1);
+ if (scalar @{$prog->{'desc'}} == 0) {
+ delete $prog->{'desc'};
+ }
+ }
+ }
}
***************
*** 860,864 ****
s{
(?:
! [\s.,:;-]*
\(?
(?:
--- 872,876 ----
s{
(?:
! [\s,:;-]*
\(?
(?:
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev