tvheadend, ATSC and epg...

  • I'm using both a hauppauge 950q and a kworld 435q

    Still working on getting the hauppauge dual-win HD 955D working (dual ATSC tuners) - one tuner is now supported in Linux kernel 4.9...But still waiting for someone to figure out the empia patch needed to get the second tuner working.

  • Hi, I'm having a similar issue. New user for about a month, using version 0.50, running Libreelec 7.0 on Chromebox with TVheadend 4.2.

    Everything initially worked great, but then noticed that the EPG was not updating. I ended up following a prior post suggestion, and cleared out the cache directory. Seemed to restore everything to working again.

    But recently having the same issue, EPG was working great then on Dec 24, the xmltv.xml file had its last update. I have it set for 14 days of EPG data, and nothing past Jan 7 at around 11am is loading up. I looked in the zap2xml.log file, and found this at the end:


    Any ideas on what's going on?

    Thanks for any help, much appreciated. Otherwise great module, thanks for putting this together.

  • Looks like another issue with the program icons. I'm wondering if something has changed at the Screener site that is causing a problem.

    Delete all the files that start with I in your cache folder and turn off the "Download program icons" option.

    Let me know if that brings back the full 14 days.

    Also, I have an updated version that adds additional separator options for the "Aoend extra details" option and also deals with foreign language characters in the guide. I may look at this icon issue before I release that update.

  • Turned off program icons, and deleted the I named files from the cache directory, and it worked. :)

    Thanks for the help. Will let you know if the problem recurs again in a few days, hopeful this takes care of it for now until your next update. Much appreciated.

  • OK here is an updated release: script.module.zap2xml-0.6.0.zip

    This should solve the program icon issue that some people have been seeing. It also fixes issues with foreign language characters.

    In addition, this build contains a new set of separators for the "Append Extra Details" option. You now can choose from the following separators:

    • Bullet
    • Hyphen
    • Line Break
    • Space
    • Colon
    • Vertical Bar
    • Slash
    • Comma


    Unfortunately, this required a rearranging of that option list that will likely mess up your current list and you will need to reconfigure your settings.

    If after upgrading you have issues with the "Append Extra Details" list, you may need to delete your user settings for zap2xml and reconfigure them.

    Please let me know if you have any problems with this build. I'm hoping to release to the LE repo in the next few weeks.

  • I installed the 0.6.0 update of zap2xml. After I fixed a pathing issue (forgot a "/" :( seems to work...for the most part (I like the quotes option for episode title...thx)

    The 1 issue I did notice is that on TV SHows/Guide, I seem to get the same details twice. My program listing info ends with "First Aired" date, HD, etc. and then appears to repeat the details a 2nd time. Don't remember if it's an exact repeat, but close enuf to be redundant output. I checked my tvguide.xml file (where all the listing info is downloaded) and I only see 1 set of details per program listing.

    I also noticed there are 2 settings.xml files. 1 is located under .kodi/addons/script.module.zap2xml/resources/ (this 1 looks more like an sample or template file) and the other is located under .kodi/userdata/addon_data/script.module.zap2xml. That has specific settings. What I noticed in this file is that there is a both a "desc01" and "desc1" (01-09 and 1-9) setting ids (The sample/template file only has the "desc01" (01-09) setting id version. Could this be a source of the double info? If so, what's the best way to resolve this? Is this related to your "delete your user settings for zap2xml and reconfigure them" suggestion?

    Thx for the help and your great work on this.

    Cheers....

    Here's what the .kodi/userdata/addon_data/script.module.zap2xml/settings.xml file looks like:

    <settings>
    <setting id="Pass" value="xxxxxxx" />
    <setting id="User" value="[email protected]" />
    <setting id="allc" value="false" />
    <setting id="cfirst" value="false" />
    <setting id="cicons" value="true" />
    <setting id="days" value="14" />
    <setting id="delay" value="0.000000" />
    <setting id="desc01" value="16" />
    <setting id="desc02" value="8" />
    <setting id="desc03" value="13" />
    <setting id="desc04" value="8" />
    <setting id="desc05" value="18" />
    <setting id="desc06" value="4" />
    <setting id="desc07" value="9" />
    <setting id="desc08" value="8" />
    <setting id="desc09" value="19" />
    <setting id="desc1" value="10" />
    <setting id="desc10" value="3" />
    <setting id="desc11" value="15" />
    <setting id="desc12" value="8" />
    <setting id="desc13" value="11" />
    <setting id="desc14" value="0" />
    <setting id="desc15" value="0" />
    <setting id="desc16" value="0" />
    <setting id="desc17" value="0" />
    <setting id="desc18" value="0" />
    <setting id="desc19" value="0" />
    <setting id="desc2" value="2" />
    <setting id="desc20" value="0" />
    <setting id="desc3" value="7" />
    <setting id="desc4" value="2" />
    <setting id="desc5" value="11" />
    <setting id="desc6" value="15" />
    <setting id="desc7" value="13" />
    <setting id="desc8" value="3" />
    <setting id="desc9" value="9" />
    <setting id="picons" value="true" />
    <setting id="source" value="" />
    <setting id="xdesc" value="false" />
    <setting id="xdetails" value="false" />
    </settings>


  • The issue is the change from using 1,2,3,4... numbers to 01,02,03,04... in the settings file.

    The fix is to either delete your settings file and resetup your settings --- or if you don't want to lose your settings. Edit the settings.xml file and remove the seetting id= lines with single digits in th desc field. In your case the red lines below:

    <settings>
    <setting id="Pass" value="xxxxxxx" />
    <setting id="User" value="[email protected]" />
    <setting id="allc" value="false" />
    <setting id="cfirst" value="false" />
    <setting id="cicons" value="true" />
    <setting id="days" value="14" />
    <setting id="delay" value="0.000000" />
    <setting id="desc01" value="16" />
    <setting id="desc02" value="8" />
    <setting id="desc03" value="13" />
    <setting id="desc04" value="8" />
    <setting id="desc05" value="18" />
    <setting id="desc06" value="4" />
    <setting id="desc07" value="9" />
    <setting id="desc08" value="8" />
    <setting id="desc09" value="19" />
    <setting id="desc1" value="10" />
    <setting id="desc10" value="3" />
    <setting id="desc11" value="15" />
    <setting id="desc12" value="8" />
    <setting id="desc13" value="11" />
    <setting id="desc14" value="0" />
    <setting id="desc15" value="0" />
    <setting id="desc16" value="0" />
    <setting id="desc17" value="0" />
    <setting id="desc18" value="0" />
    <setting id="desc19" value="0" />
    <setting id="desc2" value="2" />
    <setting id="desc20" value="0" />
    <setting id="desc3" value="7" />
    <setting id="desc4" value="2" />
    <setting id="desc5" value="11" />
    <setting id="desc6" value="15" />
    <setting id="desc7" value="13" />
    <setting id="desc8" value="3" />
    <setting id="desc9" value="9" />
    <setting id="picons" value="true" />
    <setting id="source" value="" />
    <setting id="xdesc" value="false" />
    <setting id="xdetails" value="false" />
    </settings>

    Then rerun the internal grabber and it should clean up your listings.

    I probably can update the original settings file to set those lines to 0 for those upgrading...but this can fix it in the meantime.

  • UPDATE: Did the trick. Thx.

    Appreciate the fast response :)

    I kind of assumed that might be the solution so I did exactly that. Haven't had the chance to check it out (coding/editing computer is upstairs from the PVR system) but will check it later and share/confirm the results.

    I assume that once the lines are deleted, they will not return.

    Thx and cheers....

    Edited once, last by stepher (January 3, 2017 at 11:14 PM).

  • edit4ever,

    Brilliant add-on! Works great with my LibreElec RPi 3 setup on TH 4.2. Any suggestions on how to get the channel icon feature to work? Have it enabled in the add-on but doesn't seem to be doing anything. Thanks!


  • Any suggestions on how to get the channel icon feature to work? Have it enabled in the add-on but doesn't seem to be doing anything. Thanks!


    It should have downloaded the icons to the userdata/addon_data/script.module.zap2xml/icons folder. You can tell kodi to use this folder for the channel icons. You can also log into tvheadend and under the channels tab - highlight the channels, click the reset icon button and the save button. This should then read the icon url from the xmltv file.

    I personally think the icons downloaded are low resolution and don't look that good in the interface. I use the icons from the following zip as a starting point to attach the version I like. (In my case the white ones look best)

    Dropbox - tv_channel_icons_pack_by_ati711-d4a0spa.zip

  • It should have downloaded the icons to the userdata/addon_data/script.module.zap2xml/icons folder. You can tell kodi to use this folder for the channel icons. You can also log into tvheadend and under the channels tab - highlight the channels, click the reset icon button and the save button. This should then read the icon url from the xmltv file.

    I personally think the icons downloaded are low resolution and don't look that good in the interface. I use the icons from the following zip as a starting point to attach the version I like. (In my case the white ones look best)

    Dropbox - tv_channel_icons_pack_by_ati711-d4a0spa.zip

    Okay. Mine hasn't even created the folder. I might just go in and add them manually like you suggest. Then I just point the Icon URL to the path? Or the User Icon? Which is which?

    Also what about Picons? What are those and how do I get them in there?

    Thanks!!

  • The system had been working great. But something since 1/4/17 has been acting up again :( I haven't done any updates or made any changes (except for adding a "advancedsettings.xml to solve a streaming buffer issue). There might have been an update to something, but I'm fairly certain I didn't initiate it.

    My tvguide.xml file hasn't been updated since 1/4/17. The zap2xml.log file under ~/.kodi/userdata/addon_data/script.module.zap2xml shows the following (the zap2xml.log file under ~/.kodi/addons/script.module.zap2xml appears to have the same log data):

    ....snip....
    [38/56] Parsing: /home/osmc/.kodi/addons/script.module.zap2xml/cache/1484726400000.html.gz
    [39/56] Parsing: /home/osmc/.kodi/addons/script.module.zap2xml/cache/1484748000000.html.gz
    Exception
    error<type 'exceptions.TypeError'>
    Traceback (most recent call last):
    File "/home/osmc/.kodi/addons/script.module.zap2xml/zap2xml.py", line 2130, in <module>
    main()
    File "/home/osmc/.kodi/addons/script.module.zap2xml/zap2xml.py", line 2040, in main
    parseGrid(fn) #data read in and unicode it
    File "/home/osmc/.kodi/addons/script.module.zap2xml/zap2xml.py", line 1092, in parseGrid
    p.feed(b)
    File "/usr/lib/python2.7/HTMLParser.py", line 117, in feed
    self.goahead(0)
    File "/usr/lib/python2.7/HTMLParser.py", line 161, in goahead
    k = self.parse_starttag(i)
    File "/usr/lib/python2.7/HTMLParser.py", line 327, in parse_starttag
    self.handle_starttag(tag, attrs)
    File "/home/osmc/.kodi/addons/script.module.zap2xml/zap2xml.py", line 714, in handle_starttag
    globals()['on_%s' % tag](self, tag, attrs)
    File "/home/osmc/.kodi/addons/script.module.zap2xml/zap2xml.py", line 350, in on_td
    fn = os.path.join(cacheDir,"I" + cp + ".js.gz")
    TypeError: cannot concatenate 'str' and 'int' objects

    Looks like a variable type issue in the .py file.

    Anything obvious to you?

    Thanks and cheers....

  • File "/home/osmc/.kodi/addons/script.module.zap2xml/zap2xml.py", line 350, in on_td
    fn = os.path.join(cacheDir,"I" + cp + ".js.gz")
    TypeError: cannot concatenate 'str' and 'int' objects

    Disable the "download program icons" setting. I believe something may have changed on the screener site that is messing that up.

    After you disable - you can rerun the internal grabber and it should work again.

    I think I can just convert the the 'cp' to a string and it will work again - but I'll have to do some testing.

    ---
    Try updating to this version and test to see if the program icons download: script.module.zap2xml-0.6.1.zip

    Edited once, last by edit4ever (January 9, 2017 at 2:52 PM).

  • I'll test the update 1st and, if that doesn't work, disable the "download program icons" and let you know the results either way.

    Thanks and cheers....

    Disable the "download program icons" setting. I believe something may have changed on the screener site that is messing that up.

    After you disable - you can rerun the internal grabber and it should work again.

    I think I can just convert the the 'cp' to a string and it will work again - but I'll have to do some testing.

    ---
    Try updating to this version and test to see if the program icons download:

  • I could uninstall 0.6.0 but couldn't get 0.6.1 to install. So I reinstalled 0.6.0 and then extracted zap2xml.py manually, fixed any pathing and then just did a copy over the old zap2xml.py (Hope that didn't miss anything). I ran tv_grab_zap2xml from ssh and also restarted tvheadend. Running manually (from ssh), none of the LEDs on the HDHomerun tuner flashed and my tvguide.xml never got updated. The log file(s) seemed to get updated, but stopped in what looks like an incomplete scanning process somewhere along the way. Restarting tvheadend got the tuner LEDs flashing and filled the log file (incomplete also) but still no update to my tvguide.xml file.

    I'll admit I've been a bit rushed this morning so I'll try another go at it later on today. Haven't had a chance to turn off the program icon update option so I'll try that next.

    Assuming I modified no other files, was copying the zap2xml.py file enuf to solve the problem (since it seemed specific to the zap2xml.py code)? Or is there something else that needs to be updated by doing a more "normal" 0.6.1 script install?

    Thx and cheers.....



    I'll test the update 1st and, if that doesn't work, disable the "download program icons" and let you know the results either way.

    Thanks and cheers....

  • Couldn't get it working using the 0.6.1 update. However, had the chance to disable program icon download and that brought things back to "normal". Things are good again :)

    Thx and cheers....


    I could uninstall 0.6.0 but couldn't get 0.6.1 to install. So I reinstalled 0.6.0 and then extracted zap2xml.py manually, fixed any pathing and then just did a copy over the old zap2xml.py (Hope that didn't miss anything). I ran tv_grab_zap2xml from ssh and also restarted tvheadend. Running manually (from ssh), none of the LEDs on the HDHomerun tuner flashed and my tvguide.xml never got updated. The log file(s) seemed to get updated, but stopped in what looks like an incomplete scanning process somewhere along the way. Restarting tvheadend got the tuner LEDs flashing and filled the log file (incomplete also) but still no update to my tvguide.xml file.

    I'll admit I've been a bit rushed this morning so I'll try another go at it later on today. Haven't had a chance to turn off the program icon update option so I'll try that next.

    Assuming I modified no other files, was copying the zap2xml.py file enuf to solve the problem (since it seemed specific to the zap2xml.py code)? Or is there something else that needs to be updated by doing a more "normal" 0.6.1 script install?

    Thx and cheers.....