Skip to content

Commit 76773d1

Browse files
authored
Merge pull request #4677 from dimkroon/matrix-viwx-162
[plugin.video.viwx] v1.6.2
2 parents fbcfa0c + 08fff12 commit 76773d1

7 files changed

Lines changed: 14 additions & 155 deletions

File tree

plugin.video.viwx/addon.xml

Lines changed: 3 additions & 8 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="plugin.video.viwx" name="viwX" version="1.6.1" provider-name="Dimitri Kroon">
2+
<addon id="plugin.video.viwx" name="viwX" version="1.6.2" provider-name="Dimitri Kroon">
33
<requires>
44
<import addon="xbmc.python" version="3.0.0"/>
55
<import addon="inputstream.adaptive" version="19.0.5"/>
@@ -30,14 +30,9 @@
3030
<fanart>resources/fanart.png</fanart>
3131
</assets>
3232
<news>
33-
[B]v 1.6.1[/B]
33+
[B]v 1.6.2[/B]
3434
[B]Fixes:[/B]
35-
- NO IPTV EPG.
36-
37-
[B]Changes:[/B]
38-
- An attempt to correct some mistakes that are easily made when copying authentication tokens from a web browser.
39-
- More informative error messages and logs when importing tokens fails.
40-
- Some other minor changes.
35+
- Logging in to IVX account with username and password works again.
4136
</news>
4237
<reuselanguageinvoker>true</reuselanguageinvoker>
4338
</extension>

plugin.video.viwx/changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
v 1.6.2
2+
Fixes:
3+
- Logging in to IVX account with username and password works again.
4+
15
v 1.6.1
26
Fixes:
37
- NO IPTV EPG.

plugin.video.viwx/resources/language/resource.language.en_gb/strings.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ msgid "You need to sign in to your itvX account.\n"
196196
msgstr ""
197197

198198
msgctxt "#30612"
199-
msgid "Successfully signed in!"
199+
msgid "Successfully signed in as '{nickname}'"
200200
msgstr ""
201201

202202
msgctxt "#30613"

plugin.video.viwx/resources/lib/itv_account.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ def login(self, uname: str, passw: str):
9898
Raises AuthenticationError if login fails, or other exceptions as they occur, like e.g. FetchError.
9999
"""
100100
import requests
101-
from resources.lib.telemetry_data import telemetry_factory
102101
self.account_data = {}
103102

104103
req_data = {
@@ -121,9 +120,8 @@ def login(self, uname: str, passw: str):
121120
'accept-language': 'en-GB,en;q=0.5',
122121
'accept-encoding': 'gzip, deflate',
123122
'content-type': 'application/json',
124-
'akamai-bm-telemetry': telemetry_factory.get_data(),
125-
'origin': 'https://www.itv.com',
126-
'referer': 'https://www.itv.com/',
123+
'origin': 'https://app.10ft.itv.com',
124+
'referer': 'https://app.10ft.itv.com/',
127125
'sec-fetch-dest': 'empty',
128126
'sec-fetch-mode': 'cors',
129127
'sec-fetch-site': 'same-site',

plugin.video.viwx/resources/lib/kodi_utils.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
TXT_ACCOUNT_ERROR = 30610
2727
MSG_LOGIN = 30611
28-
MSG_LOGIN_SUCCESS = 30612
2928
MSG_LOGGED_OUT_SUCCESS = 30613
3029

3130
TXT_USERNAME = 30614
@@ -72,17 +71,6 @@ def show_msg_not_logged_in():
7271
return result
7372

7473

75-
def show_login_result(success: bool, message: str = None):
76-
if success:
77-
icon = Script.NOTIFY_INFO
78-
if not message:
79-
message = Script.localize(MSG_LOGIN_SUCCESS)
80-
else:
81-
icon = Script.NOTIFY_WARNING
82-
83-
Script.notify(Script.localize(TXT_ITV_ACCOUNT), message, icon)
84-
85-
8674
def ask_login_retry(reason):
8775
"""Show a message that login has failed and ask whether to try again."""
8876

plugin.video.viwx/resources/lib/settings.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
logger = logging.getLogger('.'.join((logger_id, __name__)))
2323

24-
24+
TXT_LOGIN_SUCCESS = 30612
2525
TXT_EXPORT_NOT_SINGED_IN = 30623
2626
TXT_EXPORT_SUCCESS = 30624
2727
TXT_EXPORT_FAIL = 30625
@@ -47,8 +47,9 @@ def login(_=None):
4747
logger.info("Entering login credentials canceled by user")
4848
return
4949
try:
50-
itv_account.itv_session().login(uname, passw)
51-
kodi_utils.show_login_result(success=True)
50+
session = itv_account.itv_session()
51+
session.login(uname, passw)
52+
kodi_utils.msg_dlg(TXT_LOGIN_SUCCESS, nickname=session.user_nickname)
5253
from resources.lib import cache
5354
import xbmc
5455
cache.my_list_programmes = None

plugin.video.viwx/resources/lib/telemetry_data.py

Lines changed: 0 additions & 127 deletions
This file was deleted.

0 commit comments

Comments
 (0)