Skip to content

Commit 8485fc3

Browse files
committed
Fix username password option for tvh
1 parent 5d1a777 commit 8485fc3

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

addon.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="script.module.zap2epg" name="zap2epg" version="2.0.1" provider-name="edit4ever">
2+
<addon id="script.module.zap2epg" name="zap2epg" version="2.0.2" provider-name="edit4ever">
33
<requires>
44
<import addon="xbmc.python" version="3.0.0"/>
55
<import addon="script.module.dateutil" version="2.4.2"/>
@@ -29,8 +29,9 @@ Setup:
2929
<email></email>
3030
<source></source>
3131
<news>
32-
v2.0.1 - Kodi 19 dialog fix
33-
v2.0.0 - Python 3 update
32+
v2.0.2 - fix Tvheadend username and password option (2021-03-29)
33+
v2.0.1 - Kodi 19 dialog fix (2021-02-25)
34+
v2.0.0 - Python 3 update (2020-10-27)
3435
v1.3.0 - fix server issues for lineups (2019-04-12)
3536
v1.2.0 - add option to refresh download cache days (2019-03-04)
3637
v1.1.0 - added ability to refresh TBA episodes (2018-11-20)

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v2.0.2 (2021-03-29)
2+
- fix Tvheadend username and password option
3+
14
v2.0.1 (2021-02-25)
25
- Kodi 19 dialog fix
36

settings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<setting id="lineup">Local Over the Air Broadcast</setting>
55
<setting id="device">-</setting>
66
<setting id="days">1</setting>
7+
<setting id="redays">1</setting>
78
<setting id="slist"></setting>
89
<setting id="xdetails">false</setting>
910
<setting id="xdesc">true</setting>

zap2epg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ def tvhMatchGet():
111111
if usern is not None and passw is not None:
112112
logging.info('Adding Tvheadend username and password to request url...')
113113
request = urllib.request.Request(channels_url)
114-
tvhheader = usern + ':' + passw
115-
tvhheader_encode = 'Basic ' + base64.b64encode(tvhheader.encode()))
116-
request.add_header('Authorization', b(tvhheader_encode))
114+
userpass = (usern + ':' + passw)
115+
userpass_enc = base64.b64encode(userpass.encode('utf-8'))
116+
request.add_header('Authorization', b'Basic ' + userpass_enc)
117117
response = urllib.request.urlopen(request)
118118
else:
119119
response = urllib.request.urlopen(channels_url)

0 commit comments

Comments
 (0)