Posts by StitchedChin

    Sure thing:

    Zip: 92131

    Lineup is blank in zap2epg, but in tvheadend I have 18 stations enabled, KFMB (8.1-8.3), KGTV (10.1-10.4), KPBS (15.1-15.4), KNSD (39.1-39.2), KUSI (51.1), KSWB (69.1-69.4). xmltv file has about 8500 episodes for 14 days.

    When I run Change Current Location, first popup says No Lineup Configured! You need to configure your lineup before running zap2epg. Would you like to setup your lineup. I click Yes and use USA and 92131. It pops up again and says No Lineup Configured! Please configure your zipcode and lineup under Change Current Location.

    The log file used to show the above, before exiting without downloading. Now it completes though the lineup is set to None, all my channels are getting data in tvheadend.

    Here's the abbreviated log:

    2019/04/11 22:08:00 Kodi settings version is: 2

    2019/04/11 22:08:00 Running zap2epg-0.7.4 for zipcode: 92131 and lineup: None

    2019/04/11 22:08:00 Checking for old cache files...

    2019/04/11 22:08:00 Deleting old cache: 1555077600.json.gz

    2019/04/11 22:08:00 Deleting old cache: 1555120800.json.gz

    2019/04/11 22:08:00 Deleting old cache: 1555099200.json.gz

    2019/04/11 22:08:00 Deleting old cache: 1555045200.json.gz

    2019/04/11 22:08:00 Deleting old cache: 1555034400.json.gz

    2019/04/11 22:08:00 Deleting old cache: 1555110000.json.gz

    2019/04/11 22:08:00 Deleting old cache: 1555066800.json.gz

    2019/04/11 22:08:00 Deleting old cache: 1555128000.json.gz

    2019/04/11 22:08:00 Deleting old cache: 1555056000.json.gz

    2019/04/11 22:08:00 Deleting old cache: 1555088400.json.gz

    2019/04/11 22:08:00 Deleting old cache: 1555124400.json.gz

    2019/04/11 22:08:00 Downloading guide data for: 1555045200

    2019/04/11 22:08:00 Parsing 1555045200.json.gz

    2019/04/11 22:08:00 Downloading guide data for: 1555056000

    2019/04/11 22:08:01 Parsing 1555056000.json.gz

    2019/04/11 22:08:01 Downloading guide data for: 1555066800

    2019/04/11 22:08:01 Parsing 1555066800.json.gz

    2019/04/11 22:08:01 Downloading guide data for: 1555077600

    2019/04/11 22:08:02 Parsing 1555077600.json.gz

    2019/04/11 22:08:02 Downloading guide data for: 1555088400

    2019/04/11 22:08:02 Parsing 1555088400.json.gz

    2019/04/11 22:08:02 Downloading guide data for: 1555099200

    2019/04/11 22:08:03 Parsing 1555099200.json.gz

    2019/04/11 22:08:03 Downloading guide data for: 1555110000

    2019/04/11 22:08:03 Parsing 1555110000.json.gz

    2019/04/11 22:08:03 Downloading guide data for: 1555120800


    2019/04/11 22:10:29 zap2epg completed in 149.7 seconds.

    2019/04/11 22:10:29 18 Stations and 8516 Episodes written to xmltv.xml file.

    Let me know if you need anything else, thanks!

    Let's see if I'm the right track, the url concatenation can't handle a blank for lineupcode because it gets assigned None, throwing an error when it tries to concatenate the url string. I assigned lineupcode to an empty string in the code, looks like that got it back working again, using your version 1.2. I couldn't figure out a character to use in the kodi settings that would work, so looks like you might have to catch None assignments for strings so the url gets what it needs. I'm not sure what the lineupcode is, looks like you are grabbing it from tvh? If that is something that should be set, that'd probably fix it too. Is that a new parameter for gracenote's API, maybe, the headendId parameter? I tried to find some docs on their API, but looks like they have it locked down. Is the gracenote API new to your code? I probably missed that change a few versions ago.

    Fun with kodi, it was probably a good time for some spring cleaning anyway, so now my tvheadend is wiped out and everything is reinstalled fresh, now I get to setup all my recordings again, haha.

    Thanks again!

    Yeah, I'm feeling like I'm missing deleting something, somewhere, but I've made sure nothing is in the Kodi and userdata folders. I've tried a bunch of variations, uninstall, reboot, delete, reboot, different zip codes, different settings. Does something usually fill in for lineup I'm wondering? Maybe something earlier in the process is getting hung up because I do get a lot of repeated popups asking to setup lineup, the process that asks for country and zip. That does not seem to show completed after typing it in. Would tvheadend be causing any issues? It is grabbing my enabled lineup, so looks like it connects. I know python versions can run into issues, libreelec is probably still running 2.7 or was it 2.6 maybe?

    Thanks again for the work on the addon!

    Hi edit4ever,

    It was that time to do some refreshing, so fixed my OTA, fixed tvheadend and finally decided to look into fixing the Record Series issue since I've been on your Nov 2017 zap2epg from the beginning and everything else was working great except that record series. I haven't been able to get 0.74 on up to 1.2 working though, I'm getting the below error in the log file. It grabs my channels from tvheadend, so not sure why the lineup is coming back as None.

    2019/04/08 19:30:56 Kodi settings version is: 2

    2019/04/08 19:30:56 Running zap2epg-0.7.4 for zipcode: 92131 and lineup: None

    2019/04/08 19:30:56 Checking for old cache files...

    2019/04/08 19:30:56 Downloading guide data for: 1554775200

    2019/04/08 19:30:56 Could not download guide data for: 1554775200

    2019/04/08 19:30:56 Exception: main

    Traceback (most recent call last):

    File "/storage/.kodi/addons/script.module.zap2epg/", line 766, in mainRun

    logging.warn('URL: %s', url)

    UnboundLocalError: local variable 'url' referenced before assignment

    I'm hoping it isn't a LibreElec Odroid C2 issue. I was on 8.2 Kodi 17.6, I'm trying 9.01 Kodi 18.1 now, but getting the same issue. Anyone have an idea what may be causing it? Not sure what that download guide data code for 1554775200 is trying to do.


    Hey zaphod24, you have almost the same build as me, instead of myth, I'm running the tvheadend client/server with hdhomerun tuners on the C2. I've had a bunch of trouble with 7.9, just upgraded on the weekend. I think I have the liveTV working better for now at least. Under Hardware Acceleration, I switched all those to Always. I think they were on HD and Up and I tried None, but Always works the best. For tvheadend, it also likes the htsp stream, but not sure if myth has similar settings for that. Good luck.

    Happy New Year all, what better way to spend the holiday than working on kodi. I just upgraded to 7.9 from 7.1 on an Odroid C2, and that has kept me nice and busy trying to get it back to the way I had it. The Pandora add-on from spbogie was working well in 7.1, but I'm getting an error which looks like it is a python player issue, the Pandora script uses xbmc.PLAYER_CORE_MPLAYER. I'm still trying to learn how everything is related, so that's my rookie guess so far. I'm figuring the python script needs to be updated or I need to update a library somewhere which may had gotten lost in the upgrade. Putty shows I'm running Python 2.7.13. Here is the error message from kodi.log:

    Error Type: <type 'exceptions.AttributeError'>
    Error Contents: 'module' object has no attribute 'PLAYER_CORE_MPLAYER'
    Traceback (most recent call last):
    File "/storage/.kodi/addons/script.xbmc.pandora/", line 246, in <module>
        panda = Panda()
    File "/storage/.kodi/addons/script.xbmc.pandora/", line 97, in __init__
        self.player = PandaPlayer( panda = self )
    File "/storage/.kodi/addons/script.xbmc.pandora/", line 7, in __init__
        xbmc.Player.__init__( self, xbmc.PLAYER_CORE_MPLAYER )
    AttributeError: 'module' object has no attribute 'PLAYER_CORE_MPLAYER'

    Here is the python code from

    Well, nevermind, I think I have a working Pandora addon again. I initially got it working again by using rivy's and in place of spbogie's, but then decided to wipe out spbogie's and go with rivy's entirely. I haven't really wrapped my head around all the different addons out there.

    The one line that needs to be updated in rivy's is in the which I found fritsch posted the change for rivy. So in case this helps anyone else that wanted the Pandora add-on for LE, download the zip from rivy here:
    GitHub - rivy/xbmc-pandora: Pandora Radio plugin for XBMC

    Install the add-on from zip. Browse to the python file kodi/addons/script.audo.pandora/resources/lib/ and update the line under the procedure "def play" from
    xbmc.Player( xbmc.PLAYER_CORE_MPLAYER ).play( url, item )
    xbmc.Player().play( url, item )

    Here's fritsch's post
    API change in upcoming kodi v17 · Issue #23 · rivy/ · GitHub

    Thanks to all the developers with the work on the Pandora addon. Took some hunting and a small update, but looks like it is still working for kodi after all these years.

    That worked, channels are back to normal, thanks! I'll have to keep learning python to see what those files are doing. I made the samba file adjustment, too, definitely much easier to double check the addons and installation. Thanks again!

    Haha, wow, that was a painful learning experience. I installed python at work on a Windows machine, at least I can say a learned a bit more about python. Compatibility between python 2 and 3 sure does break a lot of things. edit4ever is definitely a fitting title for a programmer. Once I finally got the xmltv file to generate, the channel numbers did show up here, so I'll do a fresh install at home on the odroid. I have a feeling I didn't delete the zap2xml script folders before I installed 0.4.6. Usually something I like to do, but not a habit. I think the cache folder is hidden when browsing from Windows explorer, too, so I may had missed what had built up in there. I'll check that out before I delete everything. Thanks for the help and patience!

    Oh, and some titles were still coming back with episode # only from last night's recordings, but much less than before. I'll see if I have a guess on why when I take a closer look.

    Yeah, I swapped between those options just to see what they would do, but it just changed those entries from 0 KGTVDT to KGTVDT 0. I had it setup originally how you suggested.

    I was thinking tvheadend was throwing in extra parameters, so ran zap2xml manually in Putty. I still got 0s for the channels. I'm not too familiar with python or perl, but looks like the zap2xml perl script still grabs the channel with similar code, but python isn't catching it. If zap2it's website made any slight changes, I would expect the perl script would have the same issue, but that's only me right clicking and viewing the source on the zap2it website and not following exactly how the python script does it. It looks like channel is still being labeled and pointing to the channel numbers in the html, but not sure if that has changed any.

    This looks like where the 0s are being recorded in the python script, but I'm no where comfortable with the language.

    # match '.' or alphanumeric one or more time followed by anything
                    tmp =".*channel=([.\w]+).*",tnum)
                    if tmp:
                        tnum =
                    else: tnum = "0"

    Great, that does look like it is working more smoothly. Emby and tvheadend are picking it up, converting and filing it away it on the first try again. Thanks!

    I think the last little issue is the channel display-name are missing the channel number in the xmltv. Would that be a change in the py script?

    Here's what the entry looks like from 0.4.6
    <channel id="">
    <display-name>0 KGTVDT</display-name>

    Here's what it looks like from a windows install of zap2xml.exe
    <channel id="">
    <display-name>10.1 KGTVDT</display-name>
    <icon src="" />

    I'm on your latest 0.4.6 version.

    Oh yeah, I think I checked off the first option for extended details, but not the one that runs the -D parameter for program details. I think the other option just did the series category, -j? That should do the trick. With only 13 stations, it still works well for a 14 day grab. I'll try that later today and give an update, thanks!

    Issue I'm running into is the recording naming from tvheadend is not playing nice with MCEBuddy or Emby. It looks like tvheadend can't get the season and episode data from the xmltv file, so I just get "title-e#-subtitle". Maybe there is a setting I'm missing? Looks like they can't find show information with just the episode number, so the long running shows will be labeled E73 which might be season 4 episode 13. If I manually change the recording to title-S04E13-subtitle, it looks like it works properly again. Emby creates the NFO and MCEBuddy coverts and files it into the correct folder by show title. For now I'm getting tons of new folders based on the the full name of the recording and not just the show title.

    The season and episodes are listed on the zap2it tvschedule, but not sure what it looks like through the parser. Perhaps another tag is available besides this one?
    <episode-num system="dd_progid">EP02433645.0007</episode-num>

    I'll try to take a closer look at the py file tomorrow.

    Awesome, thanks edit4ever, it looks to be working with that 0.4.6 update running tvheadend 4.2 on my odroid c2 with libreelec 7.1. I slowly narrowed my original error to that "3 login attempt, try logging out of zap2it" error before, even when I manually tried running it. Even when I went to the web address in a browser, zap2it was having issues unless I logged out and went back in, perhaps a cookie issue, but I was thinking they were cracking down on programs like this. Definitely working much better than manually copying over that xml file. Tvheadend 4.2 picked it up, couple reboots and the EPG was there to map and get going, much nicer than my earlier attempts. Now a few refining touches to tvheadend, ability to install emby on the odroid c2, maybe some native file conversion and I think it can be a complete stand alone solution. Thanks again!

    Thanks, I downloaded the latest, uninstalled and deleted the directories and reinstalled. It created the addons folder and the userdata addon_data folder with the settings.xml file, but now it isn't showing up in tvheadend, so I think that is the tv_grab file not being triggered. It seems like the initial run isn't going through, so not sure if that is kodi or the add-on. I'm still not used to the log files, but I didn't see any obvious errors. I know how to run zap2xml manually in ubuntu and windows, but haven't figured out how to do it in kodi yet. I tried running the, but it isn't grabbing the settings.xml file so it can't log into zap2it. Any idea which log file would show where kodi is having trouble with the add-on or maybe it is something else. Thanks again, no rush

    Edit: Here's the add-on log part where it says it is running the things needed, but no xmltv.xml file is created and the tv_grab entry isn't in tvheadend, in case that helps.

    Thanks for your patience and work edit4ever, I think we're all inching closer and closer to a stand-alone system. I have the odroid c2, LE 7.1, tvheadend 4.0.9, emby still on separate desktop, and been trying like crazy to get zap2xml working smoothly.

    I had a question on what I may had done wrong. With the latest dropbox zip file, it installed a script.module.zap2xml-master directory in addons and the userdata/addon_data directory only had the settings.xml file in it. The log file returned the no directory exists error, so I putty'd in and renamed the ...zap2xml-master directory to just ...zap2xml. It still didn't seem to work, so I then manually copied everything to the userdata/addon_data/script_module.zap2xml directory. Once I rebooted, the xmltv.xml file was created, but it stopped after the first program was written. All the channels were written right.

    Here is the exception error in the log file, thanks again: