X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=ardmediathek%2Fsrc%2Fplugin.py;fp=ardmediathek%2Fsrc%2Fplugin.py;h=38fc408898d6ee0e9dc6a498429bb4cc69f20564;hb=3ebb23cffc2c3255eead1651851a189a66a7e7cf;hp=026cff61096950fa61ce83a5c67ffb4cf861f7e9;hpb=4d9d0ef24547aa6b7f2439cec6b9b8f71202bc25;p=vuplus_dvbapp-plugin
diff --git a/ardmediathek/src/plugin.py b/ardmediathek/src/plugin.py
index 026cff6..38fc408 100755
--- a/ardmediathek/src/plugin.py
+++ b/ardmediathek/src/plugin.py
@@ -85,19 +85,16 @@ class ChangedMoviePlayer(MoviePlayer):
def getCategories(html):
list = []
- start = """"""
- end = ' '
+ start = """
"""
+ end = '
'
if start and end in html:
idx = html.index(start)
html = html[idx:]
idx = html.index(end)
html = html[:idx]
- lines = html.split("\n")
- for line in lines:
- if ('', re.DOTALL)
- for url, name in reonecat.findall(line):
- list.append([MAIN_PAGE + "/ard/servlet/content/1214?moduleId=" + url, encodeHtml(name)])
+ reonecat = re.compile(r'(.+?) ', re.DOTALL)
+ for url, name in reonecat.findall(html):
+ list.append([MAIN_PAGE + url, encodeHtml(name)])
return list
def getMovies(html):
@@ -316,7 +313,9 @@ class ARDMediathek(Screen):
def getPage(self, url=None):
self.working = True
self.cacheDialog.start()
+ self.mainpage = False
if not url:
+ self.mainpage = True
url = MAIN_PAGE + "/ard/servlet/"
getPage(url).addCallback(self.gotPage).addErrback(self.error)
@@ -327,8 +326,7 @@ class ARDMediathek(Screen):
def gotPage(self, html=""):
list = []
- if not """onchange="submitValue(this.value,'tv_form')">""" in html:
- self.mainpage = False
+ if not self.mainpage:
del self.movies
del self.listMovies
self.listMovies = []
@@ -345,7 +343,6 @@ class ARDMediathek(Screen):
self["pageNavigation"].show()
self.buildList()
else:
- self.mainpage = True
categories = getCategories(html)
for category in categories:
list.append(ARDMenuListEntry(category[0], category[1]))