Re: channel names in conf files
Nick Morrott <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.devel |
|---|---|
| Message-ID | <CAOQWjw30kbLtyeVZ9FO+66KmT+S4fa247v5hcGFLLomt=bXxww@mail.gmail.com> |
On 27 May 2016 at 01:12, Kevin Groeneveld <[email protected]> wrote: > One suggestion I received > (https://github.com/kgroeneveld/tv_grab_sd_json/issues/5) for the > tv_grab_sd_json grabber was to add a description in a comment to the channel > items in the config file. Since I am using XMLTV::Configure::Writer to > write the config this wasn't something I could easily do in the > tv_grab_sd_json program itself. > > The following patch seems to achieve the desired result: > > Index: Configure.pm > =================================================================== > RCS file: /cvsroot/xmltv/xmltv/lib/Configure.pm,v > retrieving revision 1.10 > diff -u -r1.10 Configure.pm > --- Configure.pm 12 Jul 2015 00:59:01 -0000 1.10 > +++ Configure.pm 26 May 2016 23:57:45 -0000 > @@ -335,11 +335,11 @@ > { > if( $answers[$i] ) > { > - print OUT "channel=$channelid[$i]\n"; > + print OUT "channel=$channelid[$i] # $channelname[$i]\n"; > } > else > { > - print OUT "channel!$channelid[$i]\n"; > + print OUT "channel!$channelid[$i] # $channelname[$i]\n"; > } > > } > > This would impact all grabbers that use XMLTV::Configure::Writer. Does this > seem like a good idea? Not as a default setting, IMO. Some grabbers (e.g. tv_grab_uk_rt) have and continue to use self-describing XMLTV IDs. In such cases there is therefore no need for additional comments, which would produce extra noise in the configuration file and make it less easy to visually parse. That's not to say comments wouldn't be useful when a grabber uses anonymous IDs. Maybe a sub that takes an optional comment flag but preserves the current functionality to leave it up to the grabber author? Nick ------------------------------------------------------------------------------ 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. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e