Skip to content

Commit 53aa7d5

Browse files
committed
repair seasonvar addon
1 parent 475afcf commit 53aa7d5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
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.6" provider-name="dandy">
3+
version="2.0.7" 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: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -577,13 +577,13 @@ def selectTranslator(self, content, id_season):
577577
def getURLPlayListFromContent(self, content, kind, idseason):
578578
if (kind == 0):
579579
if self.translator == "standard":
580-
playlist = content.split('<script>var pl = {\'0\': "')[-1].split('"};</script>')[0]
580+
playlist = content.split('var pl = {\'0\': "')[-1].split('"};')[0]
581581
else:
582582
playlist = self.selectTranslator(content, idseason)
583583
elif (kind == 2):
584-
playlist = content.split('<script>var pl = {\'0\': "')[-1].split('"};</script>')[0]
584+
playlist = content.split('var pl = {\'0\': "')[-1].split('"};')[0]
585585
else:
586-
playlist = content.split('<script>pl[68] = "')[-1].split('";</script>')[0]
586+
playlist = content.split('pl[68] = "')[-1].split('";')[0]
587587
return self.url + playlist
588588

589589
def getURLPlayList(self, url, content, kind):
@@ -710,7 +710,7 @@ def checkAccessContent(self, content):
710710
# if not bad:
711711
# bad = common.parseDOM(content, 'div', attrs={'class': 'pgs-msg'})
712712
if bad:
713-
self.showErrorMessage("Content unavailable")
713+
self.showErrorMessage("Content unavailable (1)")
714714
return False
715715
else:
716716
return True
@@ -819,7 +819,7 @@ def extractPlaylist(self, url, content=None):
819819
response = common.fetchPage({"link": self.getURLPlayList(url, content, 0), "cookie": self.getCookies()})
820820
json_playlist = json.loads(response["content"].decode("UTF-8"))
821821
except Exception as e:
822-
self.showErrorMessage("Content unavailable")
822+
self.showErrorMessage("Content unavailable (2)")
823823
return []
824824

825825
playlist = json_playlist
@@ -834,10 +834,10 @@ def extractPlaylist(self, url, content=None):
834834
elif type(json_playlist) is list:
835835
playlist = json_playlist
836836
else:
837-
raise ValueError("Content unavailable")
837+
raise ValueError("Content unavailable (3)")
838838

839839
except Exception as e:
840-
self.showErrorMessage("Content unavailable")
840+
self.showErrorMessage("Content unavailable (4)")
841841
return []
842842

843843
return playlist

0 commit comments

Comments
 (0)