Re: How to shift one channel's programs by an hour

Geoff Westcott via xmltv-users <[email protected]> Tue, 07 Mar 2023 09:04:26 +0000
Newsgroups gmane.comp.tv.xmltv.general
Message-ID <[email protected]>
On Mon, 6 Mar 2023 18:24:49 +0100, Jan Ceuleers wrote:

> Dear list,
> 
> The source of one of the grabbers I use provides incorrect information
> for one of the channels that are of interest to me, in that all programs
> are listed as starting an hour earlier than they actually do.
> 
> Obviously this needs to be corrected at source, but since I have no
> influence over that I would like (at least temporarily) to postprocess
> the xmltv file to shift the time stamps for this particular channel by
> an hour, leaving all other channels in the file alone.
> 
> Do you have any recommendations for how to achieve that?
> 
> Many thanks, Jan


You might be able to use tv_augment_tz to do this by shifting the timezone of the offending programmes one hour forward/backward as needed.

If you just need one channel from a mixed file then tv_grep will extract by channel-id or channel-name. You can then pipe the output from tv_grep into tv_augment_tz

Something like this:

tv_grep  --channel-id  '631.tvguide.co.uk'  wrongdata.xml  |  tv_augment_tz  --tz  'Europe/Brussels'  --output  rightdata.xml

If needed, you could then also use tv_grep to remove the offending channel from your main file (i.e. extract everything that is *not* '631.tvguide.co.uk')

Cheers,
Geoff