Kodi Community Forum
Release TV Guide - with XMLTV and streaming support - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: Release TV Guide - with XMLTV and streaming support (/showthread.php?tid=120377)



RE: [RELEASE] TV Guide - with XMLTV and streaming support - jmh2002 - 2013-09-16

Most of the setup/wiki/docs info you need is on the first page of this thread (but useful to read the whole thread anyway, to get a good understanding). This thread isnt intended to teach you how to make an xmltv.xml file, but there are links to it.

If you want some shared files and logos, a very kind user is providing this. Go here (and read the whole thread too): http://www.xbmchub.com/forums/general-video-addon-discussion/11832-using-tv-guide-multiple-add-ons.html


RE: [RELEASE] TV Guide - with XMLTV and streaming support - shess757 - 2013-09-17

@ Legolas not sure where you are or what hardware you have but check out mc2xml. Read through the page info and run a search on this thread for "mc2xml" . It seems intimidating at first but its really simple to set up. PM me if you have questions I just started as well and was able to set it up no problem.


RE: [RELEASE] TV Guide - with XMLTV and streaming support - laconical - 2013-09-17

For anyone who wants the TV Guide addon to apply the timezone information that is included in their xmltv files, here is how I did it. Keep in mind that I am an absolute python novice and this is the first code I've written in this language. Also note that I have only tested this with an Australian xmltv file (+1000) but it should theoretically work for any timezone offset.

In order to get TV Guide to take notice of your timezone information:

1. Delete the source.db file in .xbmc/userdata/addon_data/script.tvguide

2. Change this function in .xbmc/addons/script.tvguide/source.py:

Code:
def parseXMLTVDate(dateString):
    if dateString is not None:
        if dateString.find(' ') != -1:
            # remove timezone information
            dateString = dateString[:dateString.find(' ')]
        t = time.strptime(dateString, '%Y%m%d%H%M%S')
        return datetime.datetime(t.tm_year, t.tm_mon, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec)
    else:
        return None

to this:

Code:
def parseXMLTVDate(dateString):
    from datetime import timedelta
    from datetime import datetime
    from time import mktime
    numHours = None
    subtract = False

    if dateString is not None:
        if dateString.find(' ') != -1:
            # parse timezone information
            if dateString.find('+') != -1:
                numHours = dateString[dateString.find('+')+1:len(dateString)-2]
            else:
                numHours = dateString[:dateString.find('-')+1:len(dateString)-2]
                subtract = True

            dateString = dateString[:dateString.find(' ')]
        
        t = time.strptime(dateString, '%Y%m%d%H%M%S')
        dt = datetime.fromtimestamp(mktime(t))

        if numHours is not None:
            if subtract:
                dt = dt - timedelta(hours=int(numHours))
            else:
                dt = dt + timedelta(hours=int(numHours))
        
        return dt
    else:
        return None

3. Restart TV Guide - it should update with the correct times.


RE: [RELEASE] TV Guide - with XMLTV and streaming support - jmh2002 - 2013-09-17

If you are creating your own xml files then you dont need to make a correction for time zone do you? (At least, that is how it works for me using mc2xml). The grabber will be running locally, and should be outputting in local time aready. Be sure of course that your all your device times are set to the correct local time too (so that the red 'Now' line shows up in the correct place).

I am in France, but my setup is mainly for UK TV, using mc2xml and the Sky Digital BBC London ITV London (SAT) line up. I dont make any correction for time zone and everything works perfectly.

Here you can see part of the .xml file produced - mc2xml is automatically adding the +0200 time offset because it sees that my local computer time has an offset of UTC+2 (which will automatically become UTC+1 when daylight saving ends):

<programme start="20130913084500 +0200" stop="20130913091500 +0200" channel="I989.79.microsoft.com"> (NB: the start= 0845, stop=0915 is already the local time including the +0200)

Here is a sample of my command line for mc2xml:
mc2xml -c gb -g "SW1X 7LA" -s -0 -d 24 -U -F -D mc2xml.dat -C channel.chl -o EPG.xml

-c (country): GB, -g (postcode): London, -s (listings relative start time): 0 (0 = the same local time as when the grabber runs, but you can make it a +/- if you need to), -d (listings duration) 24

I only grab 24 hours worth of EPG to make the .xml file as small as possible. This makes loading super fast when entering TVGuide (especially on my aTV2 and iPad1). I have multiple devices all using the same .xml which is saved on a network drive.

I simply have a windows task setup on the main pc to run the grabber once per day at 4am - with such a small amount of data to grab, it only takes about 20 seconds to run, so its no big deal to run it every day.

Hope this helps Smile


RE: [RELEASE] TV Guide - with XMLTV and streaming support - Legolas - 2013-09-17

(2013-09-16, 21:15)jmh2002 Wrote: Most of the setup/wiki/docs info you need is on the first page of this thread (but useful to read the whole thread anyway, to get a good understanding). This thread isnt intended to teach you how to make an xmltv.xml file, but there are links to it.

If you want some shared files and logos, a very kind user is providing this. Go here (and read the whole thread too): http://www.xbmchub.com/forums/general-video-addon-discussion/11832-using-tv-guide-multiple-add-ons.html

(2013-09-17, 12:17)shess757 Wrote: @ Legolas not sure where you are or what hardware you have but check out mc2xml. Read through the page info and run a search on this thread for "mc2xml" . It seems intimidating at first but its really simple to set up. PM me if you have questions I just started as well and was able to set it up no problem.

Hi Jmh2002 Smile, and Shess
Thanks for the pointer, and offer to get me started. I have been searching for info on XBMC.org and not the HUB!!. The post/thread from Dixie should help a lot. I did generate xmltv file w/ the "free" mc2xml for but is not complete.

My setup details:
-- Win7 based 12.2 Frodo XBMC
-- HDHomeRun Dual for ATSC OTA (FYI, I am in San Jose, CA, USA)
-- Setup nPVR a few days ago to be able to watch liveTV from XBMC (but no EPG!!)
-- I am not very interested in record capabilities , unless I can can get "record to NAS" capability. I have not tried this out yet.


-- Currently, I am trying to experiment w/ WebGrab+, and will decide between this or paid mc2xml.

Any other links to get moving along faster would be most appreciated. Reading 50+ pages will take a long time Smile. I did read the 1st 10 and the last 10 pages of this thread, and need to read the 19 page thread that you have pointed to.

Thanks in advance.


RE: [RELEASE] TV Guide - with XMLTV and streaming support - laconical - 2013-09-18

(2013-09-17, 15:17)jmh2002 Wrote: If you are creating your own xml files then you dont need to make a correction for time zone do you? (At least, that is how it works for me using mc2xml). The grabber will be running locally, and should be outputting in local time aready. Be sure of course that your all your device times are set to the correct local time too (so that the red 'Now' line shows up in the correct place).

I'm not creating my own...the only xmltv files I've been able to find for free-to-air stations in my area are all in UTC. I toyed with the idea of writing an app to change the times in the xml file itself, but ended up modifying the python in TV Guide instead just to see if I could get it to work. And it did, so I figured I'd share the details in case anyone else is in the same boat Smile


RE: [RELEASE] TV Guide - with XMLTV and streaming support - jmh2002 - 2013-09-18

Good stuff Nod


RE: [RELEASE] TV Guide - with XMLTV and streaming support - jmh2002 - 2013-09-18

(2013-09-17, 19:58)Legolas Wrote: ...Thanks for the pointer, and offer to get me started. I have been searching for info on XBMC.org and not the HUB!!. The post/thread from Dixie should help a lot. I did generate xmltv file w/ the "free" mc2xml for but is not complete..


-- Currently, I am trying to experiment w/ WebGrab+, and will decide between this or paid mc2xml.

Any other links to get moving along faster would be most appreciated. Reading 50+ pages will take a long time Smile. I did read the 1st 10 and the last 10 pages of this thread, and need to read the 19 page thread that you have pointed to...

- Reading all the thread takes a short while its true, but it saves you from wasting time (yours and others later).
- The Hub link is an alternative method if you dont wish to grab your own xml, but there is good setup info there too.
- What do you mean by 'the free mc2xml is not complete' ? What seems to be the problem?
- Im not sure what more links to give yet, if you arent prepared to read all of the existing ones... What needs to 'move along faster' for you?
- mc2xml has much easier learning curve than WebGrab+.

Smile


RE: [RELEASE] TV Guide - with XMLTV and streaming support - Legolas - 2013-09-18

(2013-09-18, 09:12)jmh2002 Wrote:
(2013-09-17, 19:58)Legolas Wrote: ...Thanks for the pointer, and offer to get me started. I have been searching for info on XBMC.org and not the HUB!!. The post/thread from Dixie should help a lot. I did generate xmltv file w/ the "free" mc2xml for but is not complete..


-- Currently, I am trying to experiment w/ WebGrab+, and will decide between this or paid mc2xml.

Any other links to get moving along faster would be most appreciated. Reading 50+ pages will take a long time Smile. I did read the 1st 10 and the last 10 pages of this thread, and need to read the 19 page thread that you have pointed to...

- Reading all the thread takes a short while its true, but it saves you from wasting time (yours and others later).
- The Hub link is an alternative method if you dont wish to grab your own xml, but there is good setup info there too.
- What do you mean by 'the free mc2xml is not complete' ? What seems to be the problem?
- Im not sure what more links to give yet, if you arent prepared to read all of the existing ones... What needs to 'move along faster' for you?
- mc2xml has much easier learning curve than WebGrab+.

Smile

Hi
mc2xml free version doesn't have all the info for OTA sub-channels. The premium one supports it. Anyhow, I tried WebGrab+ and I have generate
the guide.xml. Will play around it later to setup the TVGuide modified in the link on Hub you directed me to.

Agree, overall the setup was simpler than I expected. BTW, is there a mechanism that I can map the various HDHomeRun .strm files in bulk? or does this need to happen manually, one-by-one?

And... "move along faster" was in reference to my own effort and not anyone from the Forum. Thanks a lot for the links, etc.


RE: [RELEASE] TV Guide - with XMLTV and streaming support - shess757 - 2013-09-19

I don't know of a way to bulk add the HDHR streams, please share if you find a way. Hopefully you'll only have to do it onceSmile


RE: [RELEASE] TV Guide - with XMLTV and streaming support - jmh2002 - 2013-09-19

I am not familiar at all with HDHR,but is this what you are looking for, on page 24 of this thread?

http://forum.xbmc.org/showthread.php?tid=120377&pid=1177127#pid1177127


RE: [RELEASE] TV Guide - with XMLTV and streaming support - Legolas - 2013-09-19

(2013-09-19, 08:26)shess757 Wrote: I don't know of a way to bulk add the HDHR streams, please share if you find a way. Hopefully you'll only have to do it onceSmile

Thanks. I added a few channels yesterday and got it working. Wish I saw the below post earlier


(2013-09-19, 10:02)jmh2002 Wrote: I am not familiar at all with HDHR,but is this what you are looking for, on page 24 of this thread?

http://forum.xbmc.org/showthread.php?tid=120377&pid=1177127#pid1177127

I wish I saw this tool earlier, should help me anyhow, and I probably have not mapped all the .strm files.


RE: [RELEASE] TV Guide - with XMLTV and streaming support - jmh2002 - 2013-09-19

(2013-09-17, 19:58)Legolas Wrote: I did read the 1st 10 and the last 10 pages of this thread, and need to read the 19 page thread that you have pointed to.

The useful tool was posted on page 24, so I guessed you missed it... Laugh

I think I remember mentioning something about it being useful to read the entire thread Angel


RE: [RELEASE] TV Guide - with XMLTV and streaming support - Nemrod - 2013-09-25

Hi,

I use TV guide with Xperience1080p skin on Frodo & OS X.

I never tried it before, it is excellent, but since i tired to change the display of the TV show i no longer have images displayed.

Here is a LOG.

Thanks Blush

Nemrod


RE: [RELEASE] TV Guide - with XMLTV and streaming support - Takenover83 - 2013-09-26

How do I go about increasing the font? Look's fine on my HD display, but on my SD display it's a little hard to read.
Are there any SD/480p skins available?