Re: Can you create +1 channels?

<[email protected]> Sat, 28 Jan 2017 17:54:34 +0000
Newsgroups gmane.comp.tv.xmltv.general
Message-ID <[email protected]>
On Sat, 28 Jan 2017 17:40:34 +0100, Mike Smith wrote:

> It is a bit too big of a step I didn't even know there was a command tv_grep and tv_cat.
> 
> Would be good if channel id could include indication of timeshift hour "12345+1h" would mean channel id 12345 with 1 hour added to times?
> 
> Mike


AFAIK there's nothing in the existing tool set which will do this - you will need to get your hands dirty I'm afraid.

As Robert said, and assuming you have an XMLTV file (not a MythTV file or any other format), you can extract the channel you want to timeshift, manually edit it, and then merge it back into original file as a new channel.

1) Assuming your existing XMLTV file (e.g. tvdatafile.xml) contains multiple channels, you need to extract the one you want to shift.

  tv_grep  --channel-id '12345'  --output tempfile  tvdatafile.xml


2) edit the temporary file to change the time offset and the channel id

  sed  -i  's/12345/12345\+1h/g'  tempfile  
  sed  -i  's/ \+0000"/ \-0001"/g'  tempfile  


3) Append the new +1 channel file onto your original file

  tv_cat  --output  tvdatafileNEW.xml   tvdatafile.xml  tempfile  


All this assumes, of course, that whatever program you are using to display/record programmes handles timezone offsets (some just ignore them!).

Geoff

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot