Discussion:
[Xmltv-devel] channel names in conf files
Kevin Groeneveld
2016-05-27 00:12:09 UTC
Permalink
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?


Kevin
Nick Morrott
2016-05-27 00:57:00 UTC
Permalink
Post by Kevin Groeneveld
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.
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
Kevin Groeneveld
2016-07-07 00:27:49 UTC
Permalink
Post by Kevin Groeneveld
Post by Kevin Groeneveld
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
Post by Kevin Groeneveld
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.
...
Not as a default setting, IMO.
Maybe a sub that takes an optional comment flag but preserves the
current functionality to leave it up to the grabber author
So how exactly would that work? Maybe add an option to ParseOptions which
can be passed to Configure which can be passed to select_channels?

I think some people are having a more difficult time than necessary trying
to configure tv_grab_sd_json because the config file just contains somewhat
meaningless IDs.


Kevin

Loading...