xmltv icon indicating copy to clipboard operation
xmltv copied to clipboard

tv_grab_zz_sdjson_sqlite: Select channels using the config file

Open honir opened this issue 2 years ago • 4 comments

There are valid use cases where downloading a single channel is desired. The existing procedure to unset all existing channels, and set a single channel for xml output is lengthy and prone to user-error.

A simple method to select one (or several) lineup-channels is desired.

Most (if not all?) other xmltv-project grabbers allow this selection via simple text editing of the config file.

This could be achieved by optionally allowing channels to be specified in the config file which would override the corresponding value in the db.

(So to download a single channel, one could switch OFF all channels in the db but then, selectively, switch ON individual channels in the config file.)

honir avatar May 24 '22 13:05 honir

This was discussed on the upstream repo. The fundamental issue is that the XMLTV definition of channels and stations is confused. Here is the discussion from the grabber itself.

=head1 XMLTV STATIONS vs CHANNELS

XMLTV (despite a couple of proposals to update the specifications)
has a legacy confusion regarding the differences between a "station",
which is a supplier of content (programs) and schedules, and a
"channel" which is method of delivery/transport.  XMLTV uses the
term <channel> where they likely should be using the term <station>,
because they deal with programming, not transport.  Regardless,
such a transition would be understandably be a challenge, and
the lineup proposals to extend the capability to provide a
mechanism to support "channels" has not progressed in years.

This also results in a failing of the configuration capability
which treats the selecting of content as being station based,
which is not always the same thing as a <channel> (for example,
for Cable providers, a "station" may be transmitted on many
"channels" (perhaps in different resolutions), but an individual
may only be authorized to receive some of the "channels").  One
may want the "station" schedules and programs, but not to see
the "channel" returned because they cannot tune it.

garybuhrmaster avatar May 24 '22 16:05 garybuhrmaster

It should be noted that an applications should be capable of disabling loading of data, or selecting which data they display, to users. If not, filters (including tools such as xsltproc) can be used to do so.

Furthermore, applications can be enhanced to support --get-lineup output (which is more descriptive than --list-channels) to be better able to select what channels/stations they define/display. The tv_grab_zz_sdjson_sqlite grabber supports --get-lineup, and at least one 3rd party application has tools to be able to use it.

garybuhrmaster avatar May 24 '22 16:05 garybuhrmaster

Depends on #184

garybuhrmaster avatar May 24 '22 16:05 garybuhrmaster

I'm not sure what relevance the station vs. channel debate has on this feature request.

Creating an XML file containing 1,000 stations and 30,000 showings (40MB) when I only want 1 station and 100 programme showings (75kB) is needless. Instead of simply displaying the contents of the output xml as a viewing schedule (there are many free apps which do just this), it forces a consuming app to build its own selection and filtering process (replicating, to a large extent, what the grabber already does).

You already have a station selection mechanism as part of the --manage-lineups workflow, and --list-channels contains the stationID as its reference.

Adding a stationID to the config file would facilitate a simple way of selecting which stations to output (by coalescing the config file with the stations 'selected' in the channels table).

Even if one uses a text editor to maintain the file outside of the grabber itself, I think this will still offer a notable enhancement to grabber usability.

honir avatar May 24 '22 19:05 honir