edit4ever / script.module.zap2epg

zap2epg - EPG grabber for USA/Canada
GNU General Public License v3.0
41 stars 25 forks source link

Zap2epg not working with Tvheadend 4.3 #36

Open oldfish327 opened 3 years ago

oldfish327 commented 3 years ago

I am unable to get Zap2epg in Kodi 19 working with Tvheadend 4.3. Zap2epg worked with tvh 4.2, but startup delays with 4.2 are very long. When I click the Zap2epg icon I get a error dialog box that says it can't reach tvh. The Kodi log shows that Zap2epg is getting a 401 error from tvh. If I enter the URL shown in the error dialog box into Firefox I initially get a Firefox dialog box confirming that I want to log in. After I confirm once, Firefox will repeatedly permit me to log in and will provide the connections data as requested. If I open a terminal window and enter "wget -v http://username:password@127.0.0.1:9981/api/status/connections" I get the text below. Note that Wget also receives a 401 error on first contact, but provides the requested data after some additional contact. Is there any chance you could fix this? I have found Zap2epg much easier to use than Zap2xml. Also, In the default.pl code, after line 79 I believe, there are two dialog box calls as part of the error checking for the http connection. Each dialog box call has too many arguments which causes Zap2epg to crash without direct feedback (errors are posted in the Kodi logs). System info: Ubuntu Mate 20.04, Kodi 19, Tvheadend 4.3-1964, Zap2epg 2.0.2, Python 3.8.5. Thanks, Oldguy327

user@dvr:~$ wget -v http://kodi:kodi19@127.0.0.1:9981/api/status/connections --2021-05-29 16:26:20-- http://kodi:*password*@127.0.0.1:9981/api/status/connections Connecting to 127.0.0.1:9981... connected. HTTP request sent, awaiting response... 401 Unauthorized Authentication selected: Digest realm="tvheadend", qop=auth, nonce="TI759yAmxcyjzL2jtY+qwYl2HLCPedjQGHWzHpICCb4=", opaque="IFZbTCOw8r5diQplF6e00h8z4t7T5qAQQvyKInzZ0F8=" Reusing existing connection to 127.0.0.1:9981. HTTP request sent, awaiting response... 200 OK Length: 181 [text/x-json] Saving to: ‘connections’

connections 100%[===================>] 181 --.-KB/s in 0s

2021-05-29 16:26:20 (17.5 MB/s) - ‘connections’ saved [181/181]

edit4ever commented 3 years ago

I can try to take a look at the password error over the next week or so.

You're right about the dialog errors - looks like Kodi made changes to the dialogs on the number of text lines - so I'll need to adjust that throughout the addon.

edit4ever commented 3 years ago

OK - looks like the issue is they changed the authentication default from basic to digest in 4.3 - so I'm going to have to rework the authentication for user/pass access. In the meantime, the quick workaround is to login to the tvheadend UI and under the GENERAL > BASE tab - change the http authentication from digest to Both plain and digest. That should allow access from the zap2epg addon.

As for the dialog issues - you can test this version to see if it clears them up: https://www.dropbox.com/s/pjpzi18vuldu0bj/script.module.zap2epg-2.04-TEST.zip?dl=0

Thanks!