Skip to content

Commit 5b0f6e2

Browse files
committed
repair seasonvar addon
1 parent b8ad6d2 commit 5b0f6e2

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

addons/plugin.video.dandy.seasonvar.ru/addon.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<addon id="plugin.video.dandy.seasonvar.ru" name="seasonvar.ru"
3-
version="2.0.7" provider-name="dandy">
3+
version="2.0.8" provider-name="dandy">
44
<requires>
55
<import addon="xbmc.python" version="3.0.0"/>
66
<import addon="script.module.xbmc.helpers" version="3.0.0"/>

addons/plugin.video.dandy.seasonvar.ru/default.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,8 @@ def getParamsForRequestPlayList(self, content):
541541

542542
def selectTranslator(self, content, id_season):
543543

544-
playlist0 = content.split('<script>var pl = {\'0\': "')[-1].split('"};</script>')[0]
544+
playlist0 = content.split('var pl = {\'0\': "')[-1].split('"};')[0]
545+
545546
try:
546547
div = common.parseDOM(content, 'ul', attrs={'class': 'pgs-trans'})[0]
547548
except:
@@ -606,8 +607,8 @@ def getURLPlayList(self, url, content, kind):
606607
"secure": secure
607608
}
608609

609-
request = Request(self.url + "/player.php", urllib.parse.urlencode(values).encode("utf-8"), headers)
610-
content = urllib.request.urlopen(request).read().decode("utf-8")
610+
#request = Request(self.url + "/player.php", urllib.parse.urlencode(values).encode("utf-8"), headers)
611+
#content = urllib.request.urlopen(request).read().decode("utf-8")
611612

612613
return self.getURLPlayListFromContent(content, kind, idseason)
613614

@@ -816,7 +817,8 @@ def extractPlaylist(self, url, content=None):
816817
self.addplaylists = []
817818

818819
try:
819-
response = common.fetchPage({"link": self.getURLPlayList(url, content, 0), "cookie": self.getCookies()})
820+
url__ = self.getURLPlayList(url, content, 0)
821+
response = common.fetchPage({"link": url__, "cookie": self.getCookies()})
820822
json_playlist = json.loads(response["content"].decode("UTF-8"))
821823
except Exception as e:
822824
self.showErrorMessage("Content unavailable (2)")

0 commit comments

Comments
 (0)