[Release] Freeview NZ XMLTV EPG Listings for TVHeadend and MythTV


Generated from my own script based on mhegepgsnoop with below changes:
  • Channel number, name, id & image scraped from Freeview website 
  • Scraped channel name matched to MHEG channel names
By using the unique (hopefully non-changing) Freeview website id as XML ID, it shouldn't break when channels change their names or channel numbers.

It should also automatically bring in new channels and update icons when they change as well.
It also has the channel number as the first digit(s) in the channel name.
This allows TvHeadend (4.1 on) to get the channel number automatically.

And here is my recommended EPG Grabber Settings.

If you want to use your own names, or icons, or channel numbers - then un-check the boxes.

The XML file is found here and the compressed file is found here.
Both are updated nightly (around 3.05am).

It is only compatible with my modified tv_grab_nz-py
(This is due to the original tv_grab not playing nice with HTTPS)

Note: In TvHeadend / MythTV - you only need to pull the file a maximum of once per day.

Changelog

29/03/17
- Added raw XML file (for LibreELEC TvHeadend Server usage)
- Changed URL to files.matthuisman.nz/freeview.xml.gz (which redirects to bitbucket file)
- Updated tv_grab_nz-py to work with new URL and follow redirect correctly
- Update generation script to add channel number before channel name (allows for heuristic)

Comments

  1. Thank you.
    Works well using TVHeadend/tv-grab-nz-py on a QNAP NAS.

    ReplyDelete
    Replies
    1. Great to hear John :)
      Thanks for the feedback

      Delete
  2. Hi Matt,

    Thanks for your work. I am having trouble generating the config file for the script now as Maori TV has an illegal character in it. Any chance you could generate the config file and upload it?

    ReplyDelete
    Replies
    1. Not sure what config file your talking about? The one TVNZ grab creates?

      Delete
    2. "You will need to run tv_grab_nz-py --configure after you change the source." The config file that generates. I assume the new format is:



      Etc.

      Delete
    3. channel id="freeviewnz.10"
      channel id="freeviewnz.11"

      Sorry apparently when I had the other characters in the blog thought I was writing html.

      Delete
    4. tv_grab_nz-py --configure
      INFO - Downloading data from files.matthuisman.nz...
      INFO - Done
      INFO - Parsing channel data...
      INFO - Done (38 channels)

      And here is the file it generates in ~/.xmltv/tv_grab_nz-py.conf
      http://pastebin.com/raw/uZJVWfvh

      Delete
    5. Cheers Matt, I'm not sure how you managed to get it working, but exactly what I was looking for.

      Delete
    6. If your default Python intererpter is Python3 then that could be the issue. I had to change tv_grab_nz-py script and change the first line to /usr/bin/python2 as on Arch - /usr/bin/python points to python3 :)

      Delete
    7. Oh. I checked my script and found I had commented out the bit where it asks you if you want that channel (I never see the point in this as you can enable / disable channels in the software)

      I bet when it's trying to print the channel to ask if you want to add it, due to the funny character - it's crashing.

      Try my script from here:
      https://drive.google.com/file/d/0B0_VIhF6xzjpc1hYTnJlM1Zia0U/view

      Delete
    8. That script removes the config step altogether.
      This way, if new channels or channel ID's changed - it will be brought through to TvHeadened / MythTv without needing to run --configure.

      Delete
  3. Hi there. I'm having some issues with the latest change. Sorry, I'm not an expert, I've managed to get things going mainly through trial and error in the past. Everything has been working fine up until the most recent change (14.3.17). I've got the new tv_grab_nz-py but when I run it there's no longer a 'configure' option. I think I read somewhere you'd altered things so this step was no longer necessary? Anyway, running it without --configure on the end seems to do something, it heads off and finds the file at the new location (bitbucket). However, it then prints all the listing to the screen in terminal which it never used to do. My TVHeadEnd isn't picking up any listings. I have blanks for all channels. Sorry if I've just missed something. Like I said before, I've just muddled my way through and been successful up until now.

    ReplyDelete
    Replies
    1. That's correct. If you run the new tv_grab_nz-py - it should just output the listings.
      That's what it is supposed to do. You should never need to run it direct (only TVHeadend will run it)

      Make sure the script is executable chmod +x.
      Also in TvHeadend, you can open the log window at bottom and click corner to enable debug.
      Then go and force the scraper to run and see if you can see it calling the script.

      Delete
  4. Sorry, I deleted my comment as I found where the file should go - /usr/bin worked.

    To answer your (hidden) question: I have a Mac Mini that runs as my home server for various things. This is running tvheadend, and I have that connected to a synology NAS for storage (although I haven't set that up in tvheadend yet).

    One other question - I'm seeing (currently) that some channel icons are missing (e.g. prime, duke, etc). Is this known or an issue just on my end?

    ReplyDelete
    Replies
    1. Yeh, I deleted my comment as it looked funny talking to myself :D

      Make sure you have set EPG Grabber to "Update channel icon".
      I also notice sometimes it needs a reboot to actually bring in the icons.

      I prefer to use /usr/local/bin simply because often /usr/sbin is symlinked to /usr/bin and that makes the script show up twice in TvHeadend. But that's just me being OCD :)

      Delete
    2. Looks like their are synology packages of TvHeadend available.
      http://syno.dierkse.nl/

      Could be worth a shot.
      The server doesn't require a heap of resources unless trans-coding.

      eg. I'm doing that blog post for installing the server & client in LibreELEC on Pi3 currently and it runs fine.
      TVHeadend using max 5%cpu and kodi about 20% while watching a channel.

      Delete
    3. I generally consider my synology to be under powered and a little too locked down. I should have mentioned my Mac mini is running Ubuntu 😀

      I'm now starting to get things working. Need to do a bit more configuration, and determine why the video is a little jittery on a pi2. But so far so good. Will eventually get a few more USB tuners to replace my TiVo.

      Delete
    4. If your using wifi on the pi2 that could be the issue. The TV streams can be quite demanding.

      You can click a tv listing in the webui and click play and it should open VLC and play.

      It's also a good way to check the icons of the channels :)

      Delete
    5. I hardwired the house to avoid WiFi. I believe performance was better on my laptop earlier (can't check right now with 6 week old on top of me), so I think the pi2 might just be under powered. Will investigate, I have a pi3 here I can try.

      Keep up the great work. BTW, what part of NZ are you in? Palmy here

      Delete
    6. Chch here. I see your a Java Jedi. I dabble in abit of it (mainly for Android apps and modding smali code).

      I was gutted I chose C# as my elective instead of Java.

      Been meaning to go back and do it as had a module on it and really enjoyed it.

      Delete
  5. Quick question - roughly what time of day does your EPG server file get updated? I'm only running your TVH grabber once a day and would like to get the new file when it is reasonably fresh. Currently TVH cron is set to 0030 each day. Cheers

    ReplyDelete
    Replies
    1. 3:05am. So set your TVH cron to 3:30am and should be find :)

      Delete

Post a Comment