import enigma2-plugin-extensions-mediaportal 2020062803 master v2020062803
authorChristian Weiske <cweiske@cweiske.de>
Sun, 28 Jun 2020 23:15:20 +0000 (01:15 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Sun, 28 Jun 2020 23:15:20 +0000 (01:15 +0200)
145 files changed:
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/additions.xml
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/ccc.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/cczwei.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/chefkoch.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/gaskrank_tv.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/hornoxe.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/itunestrailers.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/lachmeister_de.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/lachschon_de.py [deleted file]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/liveleak.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/retrotv.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/twitch.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/ard.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/arte.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/atv.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/brf.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/disneyplus.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/dreisat.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/funk.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/kindertube.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/myspass.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/netflix.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/netzkino.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/orf.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/popcorntimes.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/primevideo.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/servustv.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/southpark.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/srg.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/tvnow.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/youtube.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/youtube_user.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/zdf.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/music/mtvdecharts.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/music/radio.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/music/shoutcast.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/music/tunein.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/newsdoku/autobild.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/newsdoku/dokus4_me.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/newsdoku/focus.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/newsdoku/urknall.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/ahme.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/anyporn.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/beeg.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/bongacams.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/cam4.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/camhub.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/camsoda.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/chaturbate.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/cliphunter.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/crocotube.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/cumlouder.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/dachix.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/daftsex.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/dirtyship.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/drtuber.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/eporner.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/eroprofile.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/extremetube.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/faapy.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/freeones.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/hdzog.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/homemoviestube.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/hotmovs.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/hotscope.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/lovehomeporn.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/manyvids.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/moviefap.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/nsfw247.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/pinflix.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/porn7.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/porndoe.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/porngo.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/pornhat.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/pornhdsexy.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/pornhub.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/pornicom.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/pornid.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/pornone.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/pornoreino.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/pornoxo.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/pornrabbit.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/porntrex.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/porntv.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/pornxio.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/realgfporn.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/redtube.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/sextvx.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/sexu.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/shemalez.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/shesfreaky.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/slutload.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/spankbang.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/spankwire.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/stripchat.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/sunporno.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/teenager365.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/tnaflix.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/tube8.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/tubepornclassic.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/tubewolf.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/txxx.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/upornia.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/vintagetube.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/vjav.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/x2search4porn.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/x3movs.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/x4tube.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/xfreehd.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/xhamster.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/xnxx.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/xpaja.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/xvideos.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/xxxdan.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/xxxfiles.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/youjizz.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/youporn.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/sport/dazn.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/sport/pokerstars.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/locale/de/LC_MESSAGES/MediaPortal.mo
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/locale/de/LC_MESSAGES/MediaPortal.po
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/plugin.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/choiceboxext.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/hosters/gounlimited.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/imports.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/keyboardext.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/mp_globals.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/mpscreen.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/showAsThumb.py [deleted file]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/simplelist.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/simpleplayer.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/streams.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/tmdb.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/update.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/youtubeplayer.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins_1080/clean_fhd/MP_Plugin.xml
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins_1080/clean_fhd/MP_Thumbs.xml [deleted file]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins_1080/clean_fhd/MP_skin.xml
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins_1080/clean_fhd/images/gridselect.png [new file with mode: 0644]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins_1080/clean_fhd/images/select.png [new file with mode: 0644]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins_720/clean_hd/MP_Plugin.xml
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins_720/clean_hd/MP_Thumbs.xml [deleted file]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins_720/clean_hd/MP_skin.xml
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins_720/clean_hd/images/gridselect.png [new file with mode: 0644]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins_720/clean_hd/images/select.png [new file with mode: 0644]

index 2826773..6c1654e 100644 (file)
@@ -23,7 +23,6 @@
                <plugin type="mod" modfile="fun.liveleak" confopt="showLiveLeak" default="False" confcat="fun" gz="0" name="LiveLeak" icon="liveleak" filter="Fun" screen="LiveLeakScreen" param1="" param2=""/>
                <plugin type="mod" modfile="fun.gaskrank_tv" confopt="showGaskrank" default="False" confcat="fun" gz="0" name="Gaskrank.tv" icon="gaskrank_tv" filter="Fun" screen="show_GKTV_Genre" param1="" param2=""/>
                <plugin type="mod" modfile="fun.lachmeister_de" confopt="showLachmeister" default="False" confcat="fun" gz="0" name="Lachmeister" icon="lachmeister_de" filter="Fun" screen="show_LMDE_Genre" param1="" param2=""/>
-               <plugin type="mod" modfile="fun.lachschon_de" confopt="showLachschon" default="True" confcat="fun" gz="0" name="LACHSCHON.DE" icon="lachschon_de" filter="Fun" screen="show_LSDE_Genre" param1="" param2=""/>
                <plugin type="mod" modfile="fun.twitch" confopt="showTwitch" default="True" confcat="fun" gz="0" name="Twitch" icon="twitch" filter="Mediathek/Fun" screen="twitchMainScreen" param1="" param2=""/>
                <plugin type="mod" modfile="fun.chefkoch" confopt="showChefkoch" default="True" confcat="fun" gz="0" name="Chefkoch.de" icon="chefkoch" filter="Fun" screen="chefkochGenreScreen" param1="" param2=""/>
                <!--mediatheken section-->
index 3e51ed2..c0e372a 100644 (file)
@@ -29,7 +29,7 @@ class CccOverviewScreen(MPScreen):
 
                self.keyLocked = True
                self.watchdb = CccWatchDb('ccc-conferences')
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -63,9 +63,9 @@ class CccOverviewScreen(MPScreen):
 
                alls.sort(key=lambda t : t[0].lower())
 
-               self.filmliste = recent + alls
+               self._items = recent + alls
 
-               self.ml.setList(list(map(self._defaultlistleftmarked, self.filmliste)))
+               self.ml.setList(list(map(self._defaultlistleftmarked, self._items)))
                self.keyLocked = False
                self.showInfos()
 
@@ -112,7 +112,7 @@ class CccConferenceScreen(MPScreen):
                self.acronym = acronym
                self.watchdb = CccWatchDb('ccc-videos')
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -120,7 +120,7 @@ class CccConferenceScreen(MPScreen):
                self.onLayoutFinish.append(self.loadEvents)
 
        def loadEvents(self):
-               self.filmliste = []
+               self._items = []
                twAgentGetPage(self.url, agent=std_headers, headers={'Content-Type': 'application/json'}).addCallback(self.parseEvents).addErrback(self.dataError)
 
        def parseEvents(self, data):
@@ -139,16 +139,16 @@ class CccConferenceScreen(MPScreen):
                                        description += ", " + str(event.get('view_count')) + " Abrufe\n"
                                        if event.get('description') != None:
                                                description += decodeHtml(stripAllTags(event.get('description').encode('utf-8')))
-                                       self.filmliste.append((title.strip(), url, self.watchdb.hasBeenWatched(event.get('guid').encode('utf-8')), False, image_url, description));
+                                       self._items.append((title.strip(), url, self.watchdb.hasBeenWatched(event.get('guid').encode('utf-8')), False, image_url, description));
                except:
                        pass
 
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_('No events found!'), '', ''))
+               if len(self._items) == 0:
+                       self._items.append((_('No events found!'), '', ''))
 
-               self.filmliste.sort(key=lambda t : t[0].lower())
+               self._items.sort(key=lambda t : t[0].lower())
 
-               self.ml.setList(list(map(self._defaultlistleftmarked, self.filmliste)))
+               self.ml.setList(list(map(self._defaultlistleftmarked, self._items)))
                self.keyLocked = False
                self.showInfos()
 
index 50d1b3f..0d4a920 100644 (file)
@@ -54,7 +54,7 @@ class cczwei(MPScreen):
 
                self['title'] = Label("CC2.tv")
                self['ContentTitle'] = Label("Folgen:")
-               self.streamList = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -78,8 +78,8 @@ class cczwei(MPScreen):
                                        url = url.group(1)
                                title = title.replace('\r\n<br>', ', ').replace('   ', '').replace('Youtube, HD 1080p', '').replace('<br>', ', ').strip().strip(', ').strip(',')
                                title = "Folge %s - %s" % (folge, stripAllTags(title.replace(', , , ', '').replace(', , ', '').replace('mehr</a>', '')))
-                               self.streamList.append((decodeHtml(title), url.strip()))
-                       self.ml.setList(list(map(self._defaultlistleft, self.streamList)))
+                               self._items.append((decodeHtml(title), url.strip()))
+                       self._setList('_defaultlistleft', True)
                        self.keyLocked = False
 
        def keyOK(self):
index c9c205c..31183aa 100644 (file)
@@ -61,7 +61,7 @@ class chefkochGenreScreen(MPScreen):
                self['name'] = Label(_("Please wait..."))
                self.keyLocked = True
 
-               self.genreliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -78,8 +78,8 @@ class chefkochGenreScreen(MPScreen):
                        for (url, title) in parse:
                                title = decodeHtml(title).strip()
                                if title != "Club of Cooks":
-                                       self.genreliste.append((title, url))
-                       self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+                                       self._items.append((title, url))
+                       self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                        self.ml.moveToIndex(0)
                        self.keyLocked = False
                self['name'].setText('')
@@ -122,12 +122,12 @@ class chefvids(MPScreen):
                twAgentGetPage(self.url).addCallback(self.loadPageData).addErrback(self.dataError)
 
        def loadPageData(self, data):
-               self.filmliste = []
+               self._items = []
                parse = re.findall('class="teaser-box.*?href="/video/artikel/(.*?)".*?img\ssrc="(.*?)".*?<h2>(.*?)</h2>', data, re.S)
                if parse:
                        for (url, pic, title) in parse:
-                               self.filmliste.append((decodeHtml(title).strip(), url, pic))
-                       self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                               self._items.append((decodeHtml(title).strip(), url, pic))
+                       self._setList('_defaultlistleft', True)
                        self.ml.moveToIndex(0)
                        self.keyLocked = False
                        self.showInfos()
index e5f1dcf..95b1fba 100644 (file)
@@ -44,18 +44,16 @@ class show_GKTV_Genre(MenuHelper):
                genreurl = self.mh_baseUrl+self.mh_genreBase+self.mh_genreUrl[0]+self.mh_genreUrl[1]
                self.session.open(GKTV_FilmListeScreen, genreurl, self.mh_genreTitle)
 
-class GKTV_FilmListeScreen(MPScreen, ThumbsHelper):
+class GKTV_FilmListeScreen(MPScreen):
 
        def __init__(self, session, genreLink, genreName):
                self.genreLink = genreLink
                self.genreName = genreName
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions2", "MP_Actions"], {
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -97,7 +95,7 @@ class GKTV_FilmListeScreen(MPScreen, ThumbsHelper):
                self.eventL = threading.Event()
                self.eventP = threading.Event()
                self.keyLocked = True
-               self.dokusListe = []
+               self._items = []
                self.page = 0
                self.pages = 0;
                self.baseUrl = 'http://www.gaskrank.tv'
@@ -134,11 +132,11 @@ class GKTV_FilmListeScreen(MPScreen, ThumbsHelper):
        def dataError(self, error):
                self.eventL.clear()
                printl(error, self, "E")
-               self.dokusListe.append((_("No videos found!"), "", "", ""))
-               self.ml.setList(list(map(self._defaultlistleft, self.dokusListe)))
+               self._items.append((_("No videos found!"), "", "", ""))
+               self._setList('_defaultlistleft', True)
 
        def loadPageData(self, data):
-               self.dokusListe = []
+               self._items = []
                dokus = re.findall('"gkVidImg">.*?<img.*?src="(.*?)".*?href="(.*?)">(.*?)</a>', data, re.S)
                if dokus:
                        if not self.pages:
@@ -153,13 +151,12 @@ class GKTV_FilmListeScreen(MPScreen, ThumbsHelper):
                                self.page = 1
                        self['page'].setText("%d / %d" % (self.page, self.pages))
                        for     (img, url, name) in dokus:
-                               self.dokusListe.append((decodeHtml(name), self.baseUrl+url, img))
-                       self.ml.setList(list(map(self._defaultlistleft, self.dokusListe)))
-                       self.th_ThumbsQuery(self.dokusListe, 0, 1, 2, None, None, self.page, self.pages, mode=1)
+                               self._items.append((decodeHtml(name), self.baseUrl+url, img))
+                       self._setList('_defaultlistleft', True)
                        self.loadPicQueued()
                else:
-                       self.dokusListe.append((_("No videos found!"), "", "", ""))
-                       self.ml.setList(list(map(self._defaultlistleft, self.dokusListe)))
+                       self._items.append((_("No videos found!"), "", "", ""))
+                       self._setList('_defaultlistleft', True)
                        if self.filmQ.empty():
                                self.eventL.clear()
                        else:
@@ -210,7 +207,7 @@ class GKTV_FilmListeScreen(MPScreen, ThumbsHelper):
                        return
                self.session.open(
                        GKTVPlayer,
-                       self.dokusListe,
+                       self._items,
                        playIdx = self['liste'].getSelectedIndex()
                        )
 
index f48b99d..59870bc 100644 (file)
@@ -41,15 +41,13 @@ from Plugins.Extensions.MediaPortal.resources.youtubeplayer import YoutubePlayer
 
 default_cover = "file://%s/hornoxe.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
 
-class hornoxeScreen(MPScreen, ThumbsHelper):
+class hornoxeScreen(MPScreen):
 
        def __init__(self, session):
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0" : self.closeAll,
-                       "5" : self.keyShowThumb,
                        "ok" : self.keyOK,
                        "cancel": self.keyCancel,
                        "up" : self.keyUp,
@@ -69,7 +67,7 @@ class hornoxeScreen(MPScreen, ThumbsHelper):
                self.page = 1
                self.lastpage = 1
 
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -85,16 +83,15 @@ class hornoxeScreen(MPScreen, ThumbsHelper):
                self.getLastPage(data, "class='wp-pagenavi'(.*?)</div>", '.*/page/(\d+)')
                Videos = re.findall('lass="storytitle"><a\shref="((?!http://www.hornoxe.com/den-picdump-von-morgen).*?)".*?img\ssrc="(.*?)".*?alt="(.*?)".*?</a>(.*?)</p', data, re.S)
                if Videos:
-                       self.filmliste = []
+                       self._items = []
                        for (Url, Image, Title, Descr) in Videos:
                                Descr = stripAllTags(Descr).strip()
-                               self.filmliste.append((decodeHtml(Title), Url, Image, decodeHtml(Descr)))
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_('No videos found!'), None, None, ''))
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                               self._items.append((decodeHtml(Title), Url, Image, decodeHtml(Descr)))
+               if len(self._items) == 0:
+                       self._items.append((_('No videos found!'), None, None, ''))
+               self._setList('_defaultlistleft', True)
                self.ml.moveToIndex(0)
                self.keyLocked = False
-               self.th_ThumbsQuery(self.filmliste, 0, 1, 2, None, None, self.page, 999, mode=1)
                self.showInfos()
 
        def showInfos(self):
index 676d48f..40452dc 100644 (file)
@@ -69,25 +69,25 @@ class itunestrailersGenreScreen(MPScreen):
                self.keyLocked = True
                self.suchString = ''
 
-               self.genreliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
                self.onLayoutFinish.append(self.layoutFinished)
 
        def layoutFinished(self):
-               self.genreliste = []
-               self.genreliste.append(("Top Trailers", "https://trailers.apple.com/appletv/us/index.xml"))
-               self.genreliste.append(("Calendar", "https://trailers.apple.com/appletv/us/calendar.xml"))
-               self.genreliste.append(("Genres", "https://trailers.apple.com/appletv/us/browse.xml"))
-               self.genreliste.append(("--- Search ---", "callSuchen"))
-               self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+               self._items = []
+               self._items.append(("Top Trailers", "https://trailers.apple.com/appletv/us/index.xml"))
+               self._items.append(("Calendar", "https://trailers.apple.com/appletv/us/calendar.xml"))
+               self._items.append(("Genres", "https://trailers.apple.com/appletv/us/browse.xml"))
+               self._items.append(("--- Search ---", "callSuchen"))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.keyLocked = False
 
        def SuchenCallback(self, callback = None):
                if callback is not None and len(callback):
-                       self.suchString = urllib.parse.quote(callback).replace(' ', '+')
-                       Link = 'https://trailers.apple.com/trailers/global/atv/search.php?q=%s' % self.suchString
+                       self.suchString = callback
+                       Link = 'https://trailers.apple.com/trailers/global/atv/search.php?q=%s' % urllib.parse.quote(self.suchString).replace(' ', '+')
                        Name = self['liste'].getCurrent()[0][0]
                        self.session.open(itunestrailersFilmScreen, Link, Name, "Search")
 
@@ -141,14 +141,14 @@ class itunestrailersSubGenreScreen(MPScreen):
                self['ContentTitle'] = Label(self.Name+":")
                self.keyLocked = True
 
-               self.genreliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.genreliste = []
+               self._items = []
                twAgentGetPage(self.Link).addCallback(self.parseData).addErrback(self.dataError)
 
        def parseData(self, data):
@@ -156,13 +156,13 @@ class itunestrailersSubGenreScreen(MPScreen):
                        raw = re.findall('<label>(.*?)</label>.*?<link>(.*?)</link>', data, re.S)
                        if raw:
                                for (Title, Url) in raw:
-                                       self.genreliste.append((Title, Url, "Genres"))
+                                       self._items.append((Title, Url, "Genres"))
                else:
                        raw = re.findall('<collectionDivider.*?accessibilityLabel="(.*?)">', data, re.S)
                        if raw:
                                for Label in raw:
-                                       self.genreliste.append((Label, self.Link, self.Name))
-               self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+                                       self._items.append((Label, self.Link, self.Name))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.keyLocked = False
 
        def keyOK(self):
@@ -196,7 +196,7 @@ class itunestrailersFilmScreen(MPScreen):
 
                self.keyLocked = True
 
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -204,7 +204,7 @@ class itunestrailersFilmScreen(MPScreen):
 
        def loadPage(self):
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                url = self.Link
                twAgentGetPage(url).addCallback(self.loadData).addErrback(self.dataError)
 
@@ -218,10 +218,10 @@ class itunestrailersFilmScreen(MPScreen):
                        Movies = re.findall('loadTrailerDetailPage\(\'(.*?)\'\);.*?<title>(.*?)</title>.*?<image>(.*?)</image>', parse.group(1), re.S)
                if Movies:
                        for (Url, Title, Image) in Movies:
-                               self.filmliste.append((decodeHtml(Title).replace('&amp;', '&'), Url, Image))
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_('No movies found!'), None, None))
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                               self._items.append((decodeHtml(Title).replace('&amp;', '&'), Url, Image))
+               if len(self._items) == 0:
+                       self._items.append((_('No movies found!'), None, None))
+               self._setList('_defaultlistleft', True)
                self.keyLocked = False
                self.showInfos()
 
@@ -271,7 +271,7 @@ class itunestrailersSubFilmScreen(MPScreen):
 
                self.keyLocked = True
 
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -279,7 +279,7 @@ class itunestrailersSubFilmScreen(MPScreen):
 
        def loadPage(self):
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                url = self.Link
                twAgentGetPage(url).addCallback(self.loadData).addErrback(self.dataError)
 
@@ -289,8 +289,8 @@ class itunestrailersSubFilmScreen(MPScreen):
                        twAgentGetPage(url.group(1)).addCallback(self.loadData2).addErrback(self.dataError)
                else:
                        url = re.search('id="play".onSelect="atv.loadURL\(\'(.*?)\'\)', data, re.S|re.I)
-                       self.filmliste.append(("Trailer", url.group(1), self.Cover))
-                       self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                       self._items.append(("Trailer", url.group(1), self.Cover))
+                       self._setList('_defaultlistleft', True)
                        self.keyLocked = False
                        self.showInfos()
 
@@ -299,8 +299,8 @@ class itunestrailersSubFilmScreen(MPScreen):
                if Movies:
                        for (Url, Title, Image) in Movies:
                                if Title != "Related":
-                                       self.filmliste.append((decodeHtml(Title).replace('&amp;', '&'), Url, Image))
-                       self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                                       self._items.append((decodeHtml(Title).replace('&amp;', '&'), Url, Image))
+                       self._setList('_defaultlistleft', True)
                self.keyLocked = False
                self.showInfos()
 
index f4e83a7..7fadc33 100644 (file)
@@ -72,18 +72,16 @@ class show_LMDE_Genre(MenuHelper):
                genreurl = self.mh_baseUrl+self.mh_genreUrl[0]+self.mh_genreBase
                self.session.open(LMDE_FilmListeScreen, genreurl, self.mh_genreTitle)
 
-class LMDE_FilmListeScreen(MPScreen, ThumbsHelper):
+class LMDE_FilmListeScreen(MPScreen):
 
        def __init__(self, session, genreLink, genreName):
                self.genreLink = genreLink
                self.genreName = genreName
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions2", "MP_Actions"], {
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -125,7 +123,7 @@ class LMDE_FilmListeScreen(MPScreen, ThumbsHelper):
                self.eventL = threading.Event()
                self.eventP = threading.Event()
                self.keyLocked = True
-               self.dokusListe = []
+               self._items = []
                self.page = 0
                self.pages = 0
 
@@ -158,11 +156,11 @@ class LMDE_FilmListeScreen(MPScreen, ThumbsHelper):
        def dataError(self, error):
                self.eventL.clear()
                printl(error, self, "E")
-               self.dokusListe.append(("Keine Videoclips gefunden!", "", "", ""))
-               self.ml.setList(list(map(self._defaultlistleft, self.dokusListe)))
+               self._items.append(("Keine Videoclips gefunden!", "", "", ""))
+               self._setList('_defaultlistleft', True)
 
        def loadPageData(self, data):
-               self.dokusListe = []
+               self._items = []
                a = 0
                l = len(data)
                while a < l:
@@ -178,10 +176,10 @@ class LMDE_FilmListeScreen(MPScreen, ThumbsHelper):
                                        else:
                                                desc = None
                                                vid = ''
-                                       self.dokusListe.append((decodeHtml(d.group(3)), d.group(1), d.group(2), desc, vid))
+                                       self._items.append((decodeHtml(d.group(3)), d.group(1), d.group(2), desc, vid))
                        else:
                                break
-               if self.dokusListe:
+               if self._items:
                        if not self.page:
                                self.page = 1
                        m = re.findall('link-white">(\d+)</a>', data)
@@ -192,12 +190,11 @@ class LMDE_FilmListeScreen(MPScreen, ThumbsHelper):
 
                        self['page'].setText("%d / %d" % (self.page, self.pages))
 
-                       self.ml.setList(list(map(self._defaultlistleft, self.dokusListe)))
-                       self.th_ThumbsQuery(self.dokusListe, 0, 1, 2, None, None, self.page, self.pages, mode=1)
+                       self._setList('_defaultlistleft', True)
                        self.loadPicQueued()
                else:
-                       self.dokusListe.append(("Keine Videoclips gefunden!", "", "", ""))
-                       self.ml.setList(list(map(self._defaultlistleft, self.dokusListe)))
+                       self._items.append(("Keine Videoclips gefunden!", "", "", ""))
+                       self._setList('_defaultlistleft', True)
                        if self.filmQ.empty():
                                self.eventL.clear()
                        else:
@@ -248,7 +245,7 @@ class LMDE_FilmListeScreen(MPScreen, ThumbsHelper):
                        return
                self.session.open(
                        LMDEPlayer,
-                       self.dokusListe,
+                       self._items,
                        playIdx = self['liste'].getSelectedIndex()
                        )
 
diff --git a/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/lachschon_de.py b/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/fun/lachschon_de.py
deleted file mode 100644 (file)
index 768b002..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-# -*- coding: utf-8 -*-
-#######################################################################################################
-#
-#    MediaPortal for Dreambox OS
-#
-#    Coded by MediaPortal Team (c) 2013-2020
-#
-#  This plugin is open source but it is NOT free software.
-#
-#  This plugin may only be distributed to and executed on hardware which
-#  is licensed by Dream Property GmbH. This includes commercial distribution.
-#  In other words:
-#  It's NOT allowed to distribute any parts of this plugin or its source code in ANY way
-#  to hardware which is NOT licensed by Dream Property GmbH.
-#  It's NOT allowed to execute this plugin and its source code or even parts of it in ANY way
-#  on hardware which is NOT licensed by Dream Property GmbH.
-#
-#  This applies to the source code as a whole as well as to parts of it, unless explicitely
-#  stated otherwise.
-#
-#  If you want to use or modify the code or parts of it, permission from the authors is necessary.
-#  You have to keep OUR license and inform us about any modification, but it may NOT be distributed
-#  other than under the conditions noted above.
-#
-#  As an exception regarding modifcations, you are NOT permitted to remove
-#  any copy protections implemented in this plugin or change them for means of disabling
-#  or working around the copy protections, unless the change has been explicitly permitted
-#  by the original authors. Also decompiling and modification of the closed source
-#  parts is NOT permitted.
-#
-#  Advertising with this plugin is NOT allowed.
-#
-#  For other uses, permission from the authors is necessary.
-#
-#######################################################################################################
-
-from future import standard_library
-standard_library.install_aliases()
-from builtins import map
-from builtins import range
-from Plugins.Extensions.MediaPortal.plugin import _
-from Plugins.Extensions.MediaPortal.resources.imports import *
-from Plugins.Extensions.MediaPortal.resources.keyboardext import VirtualKeyBoardExt
-import queue
-import threading
-from Plugins.Extensions.MediaPortal.resources.youtubelink import YoutubeLink
-from Plugins.Extensions.MediaPortal.resources.menuhelper import MenuHelper
-from Plugins.Extensions.MediaPortal.resources.twagenthelper import twAgentGetPage
-
-default_cover = "file://%s/lachschon_de.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
-
-class show_LSDE_Genre(MenuHelper):
-
-       def __init__(self, session):
-
-               baseUrl = "http://www.lachschon.de"
-               MenuHelper.__init__(self, session, 0, None, baseUrl, "", self._defaultlistcenter, default_cover=default_cover)
-
-               self['title'] = Label("LACHSCHON.DE")
-               self['ContentTitle'] = Label("Genres")
-               self.suchString = ''
-
-               self.onLayoutFinish.append(self.parseCats)
-
-       def parseCats(self):
-               self.mh_parseCategorys(None)
-
-       def mh_parseCategorys(self, data):
-               menu = []
-               menu.append((0, '', 'Kategorien'))
-               menu.append((1, '/gallery/trend/?', 'Trend'))
-               menu.append((1, '/gallery/new/?', 'Neue'))
-               menu.append((1, '/gallery/all/?', 'Alles'))
-               menu.append((1, '/gallery/toprecent/?', 'Top'))
-               menu.append((1, '/gallery/floprecent/?', 'Flop'))
-               menu.append((0, '', 'Top & Flop'))
-               menu.append((1, '/gallery/premium/?', 'Premium'))
-               menu.append((1, '/gallery/trash/?', 'Müllhalde'))
-               menu.append((1, '/gallery/top/?', 'Hall of Fame'))
-               menu.append((1, '/gallery/flop/?', 'Hall of Shame'))
-               menu.append((1, '/gallery/mostvoted/?', 'Stimmen'))
-               menu.append((1, '/gallery/mostfavs/?', 'Favs'))
-               menu.append((0, '/gallery/search_item/?q=%s&x=0&y=0&', 'Suche'))
-               self.mh_genMenu2(menu)
-
-       def mh_callGenreListScreen(self):
-               if re.search('Suche', self.mh_genreTitle):
-                       self.suchen()
-               else:
-                       genreurl = self.mh_baseUrl+self.mh_genreUrl[self.mh_menuLevel]+'set_gallery_type=video'
-                       self.session.open(LSDE_FilmListeScreen, genreurl, self.mh_genreTitle)
-
-       def SuchenCallback(self, callback = None):
-               if callback is not None and len(callback):
-                       self.suchString = callback
-                       qr = urllib.parse.quote(self.suchString).replace(' ', '+')
-                       genreurl = self.mh_baseUrl+(self.mh_genreUrl[self.mh_menuLevel] % qr)+'set_gallery_type=video'
-                       self.session.open(LSDE_FilmListeScreen, genreurl, self.mh_genreTitle)
-
-class LSDE_FilmListeScreen(MPScreen, ThumbsHelper):
-
-       def __init__(self, session, genreLink, genreName):
-               self.genreLink = genreLink
-               self.genreName = genreName
-               MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
-
-               self["actions"] = ActionMap(["MP_Actions2", "MP_Actions"], {
-                       "ok"    : self.keyOK,
-                       "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
-                       "up" : self.keyUp,
-                       "down" : self.keyDown,
-                       "right" : self.keyRight,
-                       "left" : self.keyLeft,
-                       "upUp" : self.key_repeatedUp,
-                       "rightUp" : self.key_repeatedUp,
-                       "leftUp" : self.key_repeatedUp,
-                       "downUp" : self.key_repeatedUp,
-                       "upRepeated" : self.keyUpRepeated,
-                       "downRepeated" : self.keyDownRepeated,
-                       "rightRepeated" : self.keyRightRepeated,
-                       "leftRepeated" : self.keyLeftRepeated,
-                       "nextBouquet" : self.keyPageUp,
-                       "prevBouquet" : self.keyPageDown,
-                       "0"     : self.closeAll
-               }, -1)
-
-               self.sortOrder = 0
-               self.genreTitle = ""
-               self.sortParIMDB = ""
-               self.sortParAZ = ""
-               self.sortOrderStrAZ = ""
-               self.sortOrderStrIMDB = ""
-               self.sortOrderStrGenre = ""
-               self['title'] = Label("LACHSCHON.DE")
-
-               self['Page'] = Label(_("Page:"))
-
-               self.filmQ = queue.Queue(0)
-               self.hanQ = queue.Queue(0)
-               self.picQ = queue.Queue(0)
-               self.updateP = 0
-               self.eventL = threading.Event()
-               self.eventP = threading.Event()
-               self.keyLocked = True
-               self.dokusListe = []
-               self.page = 0
-               self.lastpage = 0
-
-               self.setGenreStrTitle()
-
-               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
-               self['liste'] = self.ml
-
-               self.onLayoutFinish.append(self.loadPage)
-
-       def setGenreStrTitle(self):
-               genreName = "%s%s" % (self.genreTitle, self.genreName)
-               self['ContentTitle'].setText(genreName)
-
-       def loadPage(self):
-               url = "%s&page=%d" % (self.genreLink, max(self.page, 1))
-
-               if self.page:
-                       self['page'].setText("%d / %d" % (self.page, self.lastpage))
-
-               self.filmQ.put(url)
-               if not self.eventL.is_set():
-                       self.eventL.set()
-                       self.loadPageQueued()
-
-       def loadPageQueued(self):
-               self['name'].setText(_('Please wait...'))
-               while not self.filmQ.empty():
-                       url = self.filmQ.get_nowait()
-               twAgentGetPage(url).addCallback(self.loadPageData).addErrback(self.dataError)
-
-       def loadPageData(self, content):
-               m = re.search('="pageselection(.*?)</div>', content, re.S)
-               self.dokusListe = []
-               content = content[content.find('<ul id="itemlist">'):content.find('<p class="advert-notice">')]
-               spl=content.split('<li>')
-               for i in range(1, len(spl), 1):
-                       entry=spl[i]
-                       match=re.compile('<a href="(.+?)"', re.S).findall(entry)
-                       if match:
-                               url=match[0]
-                       else:
-                               continue
-                       match=re.compile('class="previewitem".*?src="(.+?)"', re.S).findall(entry)
-                       if match:
-                               thumb=match[0]
-                               if thumb.startswith('//'):
-                                       thumb = 'http:' + thumb
-                       else:
-                               thumb = None
-                       match=re.compile('<span class="rating">(.+?)</span>', re.S).findall(entry)
-                       rating=-1
-                       if match:
-                               rating=match[0]
-                       match=re.compile('class="title" href="(.+?)"(.+?)title="(.+?)">(.+?)\n', re.S).findall(entry)
-                       title=match[0][3]
-                       title=decodeHtml(title).strip()
-                       if rating!=-1:
-                               title=title+(" (%.1f / 10)" % float(rating))
-                       self.dokusListe.append((title, "http://www.lachschon.de"+url, thumb.replace('-medium', ''), None))
-               if self.dokusListe:
-                       if not self.lastpage:
-                               try:
-                                       pgs = re.findall('"\?page=.*?">(\d+)</a', m.group(1), re.S)
-                                       lastpage = int(pgs[-1])
-                               except:
-                                       lastpage = 1
-
-                               if lastpage > self.lastpage:
-                                       self.lastpage = lastpage
-                       if not self.page:
-                               self.page = 1
-                       self['page'].setText("%d / %d" % (self.page, self.lastpage))
-
-                       self.ml.setList(list(map(self._defaultlistleft, self.dokusListe)))
-                       self['liste'].moveToIndex(0)
-                       self.th_ThumbsQuery(self.dokusListe, 0, 1, 2, None, None, self.page, self.lastpage, mode=1)
-                       self.loadPicQueued()
-               else:
-                       self.dokusListe.append((_("No videos found!"), "", "", ""))
-                       self.ml.setList(list(map(self._defaultlistleft, self.dokusListe)))
-                       self['liste'].moveToIndex(0)
-                       if self.filmQ.empty():
-                               self.eventL.clear()
-                       else:
-                               self.loadPageQueued()
-
-       def loadPic(self):
-               if self.picQ.empty():
-                       self.eventP.clear()
-                       return
-
-               if self.updateP:
-                       return
-
-               while not self.picQ.empty():
-                       self.picQ.get_nowait()
-
-               streamName = self['liste'].getCurrent()[0][0]
-               self['name'].setText(streamName)
-               streamPic = self['liste'].getCurrent()[0][2]
-               self.updateP = 1
-               CoverHelper(self['coverArt'], self.ShowCoverFileExit).getCover(streamPic)
-
-       def setHandlung(self, data):
-               self['handlung'].setText(data)
-
-       def ShowCoverFileExit(self):
-               self.updateP = 0;
-               self.keyLocked  = False
-               if not self.filmQ.empty():
-                       self.loadPageQueued()
-               else:
-                       self.eventL.clear()
-                       self.loadPic()
-
-       def loadPicQueued(self):
-               self.picQ.put(None)
-               if not self.eventP.is_set():
-                       self.eventP.set()
-               desc = self['liste'].getCurrent()[0][3]
-               self.loadPic()
-
-       def keyOK(self):
-               if (self.keyLocked|self.eventL.is_set()):
-                       return
-               self.session.open(
-                       LSDEPlayer,
-                       self.dokusListe,
-                       playIdx = self['liste'].getSelectedIndex()
-                       )
-
-class LSDEPlayer(SimplePlayer):
-
-       def __init__(self, session, playList, playIdx):
-               SimplePlayer.__init__(self, session, playList, playIdx=playIdx, playAll=True, listTitle="LACHSCHON.DE", ltype='lachschon.de')
-
-       def getVideo(self):
-               url = self.playList[self.playIdx][1]
-               twAgentGetPage(url).addCallback(self.parseStream).addErrback(self.dataError)
-
-       def parseStream(self, data):
-               m2 = re.search('//www.youtube.*?com/(embed|v)/(.*?)(\?|" |&amp)', data)
-               if m2:
-                       dhVideoId = m2.group(2)
-                       dhTitle = self.playList[self.playIdx][0]
-                       imgurl =  self.playList[self.playIdx][2]
-                       YoutubeLink(self.session).getLink(self.playStream, self.ytError, dhTitle, dhVideoId, imgurl=imgurl)
-               else:
-                       self.dataError("Kein Videostream gefunden!")
-
-       def ytError(self, error):
-               msg = "Title: %s\n%s" % (self.playList[self.playIdx][0], error)
-               self.dataError(msg)
\ No newline at end of file
index 5fbbe24..cc13d71 100644 (file)
@@ -56,7 +56,7 @@ class LiveLeakScreen(MPScreen):
 
                self['title'] = Label("LiveLeak.com")
                self['ContentTitle'] = Label("Genre:")
-               self.genreliste = []
+               self._items = []
                self.suchString = ''
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
@@ -64,11 +64,11 @@ class LiveLeakScreen(MPScreen):
                self.onLayoutFinish.append(self.layoutFinished)
 
        def layoutFinished(self):
-               self.genreliste.append(("--- Search ---", ""))
-               self.genreliste.append(("Recent Items", "list?page="))
-               self.genreliste.append(("Must See", "list?channel=must+see&page="))
-               self.genreliste.append(("News", "list?channel=news&page="))
-               self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+               self._items.append(("--- Search ---", ""))
+               self._items.append(("Recent Items", "list?page="))
+               self._items.append(("Must See", "list?channel=must+see&page="))
+               self._items.append(("News", "list?channel=news&page="))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
 
        def SuchenCallback(self, callback = None):
                if callback is not None and len(callback):
@@ -85,19 +85,17 @@ class LiveLeakScreen(MPScreen):
                        Link = self['liste'].getCurrent()[0][1]
                        self.session.open(LiveLeakClips, Link, Name)
 
-class LiveLeakClips(MPScreen, ThumbsHelper):
+class LiveLeakClips(MPScreen):
 
        def __init__(self, session, Link, Name):
                self.Link = Link
                self.Name = Name
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "ok"    : self.keyOK,
                        "0" : self.closeAll,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up"    : self.keyUp,
                        "down"  : self.keyDown,
                        "left"  : self.keyLeft,
@@ -123,7 +121,7 @@ class LiveLeakClips(MPScreen, ThumbsHelper):
 
        def loadPage(self):
                self.keyLocked = True
-               self.feedliste = []
+               self._items = []
                self['name'].setText(_('Please wait...'))
                url = "https://www.liveleak.com/%s%s&safe_mode=off" % (self.Link, str(self.page))
                twAgentGetPage(url).addCallback(self.loadPageData).addErrback(self.dataError)
@@ -135,13 +133,12 @@ class LiveLeakClips(MPScreen, ThumbsHelper):
                        for (image, title, url, descr, date, views) in vids:
                                if image.startswith('//'):
                                        image = "https:" + image
-                               self.feedliste.append((decodeHtml(title).strip(), url, image, decodeHtml(stripAllTags(descr)).strip(), date.strip(), views.strip()))
-               if len(self.feedliste) == 0:
-                       self.feedliste.append((_('No videos found!'), None, None, '', '', ''))
-               self.ml.setList(list(map(self._defaultlistleft, self.feedliste)))
+                               self._items.append((decodeHtml(title).strip(), url, image, decodeHtml(stripAllTags(descr)).strip(), date.strip(), views.strip()))
+               if len(self._items) == 0:
+                       self._items.append((_('No videos found!'), None, None, '', '', ''))
+               self._setList('_defaultlistleft', True)
                self.ml.moveToIndex(0)
                self.keyLocked = False
-               self.th_ThumbsQuery(self.feedliste, 0, 1, 2, None, None, self.page, self.lastpage, mode=1)
                self.showInfos()
 
        def showInfos(self):
index a1e5619..415f1c5 100644 (file)
@@ -40,17 +40,15 @@ from Plugins.Extensions.MediaPortal.resources.imports import *
 
 default_cover = "file://%s/retrotv.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
 
-class retrotvFilmListeScreen(MPScreen, ThumbsHelper):
+class retrotvFilmListeScreen(MPScreen):
 
        def __init__(self, session):
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "ok"    : self.keyOK,
                        "0" : self.closeAll,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -70,7 +68,7 @@ class retrotvFilmListeScreen(MPScreen, ThumbsHelper):
 
                self['Page'] = Label(_("Page:"))
 
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -86,15 +84,14 @@ class retrotvFilmListeScreen(MPScreen, ThumbsHelper):
                self.getLastPage(data, 'Gehe zu Seite:(.*?)</div>')
                movies = re.findall('title="(Folge.*?)".*?href="(.*?)"><img\ssrc=".*?".*?<img\ssrc=".*?videos%2F(.*?)".*?td_description', data, re.S)
                if movies:
-                       self.filmliste = []
+                       self._items = []
                        for (title, url, image) in movies:
                                image = 'https://www.retro-tv.de/gfx/videos/' + image
                                url = 'https://www.retro-tv.de/' + url
-                               self.filmliste.append((decodeHtml(title), url, image))
-                       self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                               self._items.append((decodeHtml(title), url, image))
+                       self._setList('_defaultlistleft', True)
                        self.ml.moveToIndex(0)
                        self.keyLocked = False
-                       self.th_ThumbsQuery(self.filmliste, 0, 1, 2, None, None, self.page, self.lastpage, mode=1)
                        self.showInfos()
 
        def showInfos(self):
index 72293a3..135539a 100644 (file)
@@ -63,22 +63,22 @@ class twitchMainScreen(MPScreen):
                self.keyLocked = True
                self.suchString = ''
 
-               self.genreliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
                self.onLayoutFinish.append(self.layoutFinished)
 
        def layoutFinished(self):
-               self.genreliste.append(("Favorites", "favorites"))
-               self.genreliste.append(("Top Games", "topgames"))
-               self.genreliste.append(("Featured Streams", "featuredstreams"))
-               self.genreliste.append(("Streams", "streams"))
-               self.genreliste.append(("Videos", "videos"))
-               self.genreliste.append(("--- Search for Games ---", "searchgames"))
-               self.genreliste.append(("--- Search for Streams ---", "searchstreams"))
-               self.genreliste.append(("--- Search for Channels ---", "searchchannels"))
-               self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+               self._items.append(("Favorites", "favorites"))
+               self._items.append(("Top Games", "topgames"))
+               self._items.append(("Featured Streams", "featuredstreams"))
+               self._items.append(("Streams", "streams"))
+               self._items.append(("Videos", "videos"))
+               self._items.append(("--- Search for Games ---", "searchgames"))
+               self._items.append(("--- Search for Streams ---", "searchstreams"))
+               self._items.append(("--- Search for Channels ---", "searchchannels"))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.ml.moveToIndex(0)
                self.keyLocked = False
 
@@ -96,8 +96,9 @@ class twitchMainScreen(MPScreen):
                if callback is not None and len(callback):
                        Name = self['liste'].getCurrent()[0][0]
                        ID = self['liste'].getCurrent()[0][1]
-                       self.suchString = urllib.parse.quote(callback).replace(' ', '%20')
-                       self.session.open(twitchGames, self.suchString, Name, ID)
+                       self.suchString = callback
+                       Link = urllib.parse.quote(self.suchString).replace(' ', '%20')
+                       self.session.open(twitchGames, Link, Name, ID)
 
 class twitchGames(MPScreen):
 
@@ -149,14 +150,14 @@ class twitchGames(MPScreen):
                self.keyLocked = True
                self.page = 1
 
-               self.gameList = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.gameList = []
+               self._items = []
                self.keyLocked = True
                if self.ID == "searchgames":
                        url = "https://api.twitch.tv/kraken/search/games?query=%s&limit=%s&offset=%s&live=true" % (self.SearchString, str(limit), str((self.page-1) * limit))
@@ -232,30 +233,30 @@ class twitchGames(MPScreen):
                                        if data:
                                                (Title, Name, Id) = data[0]
                                                if Id in self.live:
-                                                       self.gameList.append((Title, '', default_cover, Name, '', Title, Id, 'Live'))
+                                                       self._items.append((Title, '', default_cover, Name, '', Title, Id, 'Live'))
                                                else:
-                                                       self.gameList.append((Title, '', default_cover, Name, '', Title, Id, 'Offline'))
-                               self.gameList.sort()
+                                                       self._items.append((Title, '', default_cover, Name, '', Title, Id, 'Offline'))
+                               self._items.sort()
                                read.close()
-                       if len(self.gameList) == 0:
-                               self.gameList.append((_('No entries found!'), None, default_cover))
-                               self.ml.setList(list(map(self._defaultlistleft, self.gameList)))
+                       if len(self._items) == 0:
+                               self._items.append((_('No entries found!'), None, default_cover))
+                               self._setList('_defaultlistleft', True)
                        else:
-                               self.ml.setList(list(map(self._defaultlistleftmarked, self.gameList)))
+                               self.ml.setList(list(map(self._defaultlistleftmarked, self._items)))
                                self.keyLocked = False
                elif self.ID == "searchgames":
                        try:
                                for node in jsondata["games"]:
                                        title = str(node["name"])
                                        image = str(node["box"]["template"]).replace('{width}x{height}', '600x800')
-                                       self.gameList.append((title, '', image))
+                                       self._items.append((title, '', image))
                        except:
                                pass
-                       if len(self.gameList) == 0:
-                               self.gameList.append((_('No games found!'), None, None))
-                               self.ml.setList(list(map(self._defaultlistleft, self.gameList)))
+                       if len(self._items) == 0:
+                               self._items.append((_('No games found!'), None, None))
+                               self._setList('_defaultlistleft', True)
                        else:
-                               self.ml.setList(list(map(self._defaultlistleft, self.gameList)))
+                               self._setList('_defaultlistleft', True)
                                self.keyLocked = False
                elif (self.ID == "streams" or self.ID == "searchstreams"):
                        for node in jsondata["streams"]:
@@ -265,12 +266,12 @@ class twitchGames(MPScreen):
                                title = str(node["channel"]["display_name"])
                                name = str(node["channel"]["name"])
                                image = str(node["preview"]["template"]).replace('{width}x{height}', '800x450')
-                               self.gameList.append((game + " - " + title, language, image, name, game, title, id))
-                       if len(self.gameList) == 0:
-                               self.gameList.append((_('No streams found!'), None, None))
-                               self.ml.setList(list(map(self._defaultlistleft, self.gameList)))
+                               self._items.append((game + " - " + title, language, image, name, game, title, id))
+                       if len(self._items) == 0:
+                               self._items.append((_('No streams found!'), None, None))
+                               self._setList('_defaultlistleft', True)
                        else:
-                               self.ml.setList(list(map(self.twitchListEntry, self.gameList)))
+                               self.ml.setList(list(map(self.twitchListEntry, self._items)))
                                self.keyLocked = False
                elif self.ID == "featuredstreams":
                        for node in jsondata["featured"]:
@@ -280,23 +281,23 @@ class twitchGames(MPScreen):
                                title = str(node["stream"]["channel"]["display_name"])
                                name = str(node["stream"]["channel"]["name"])
                                image = str(node["stream"]["preview"]["template"]).replace('{width}x{height}', '800x450')
-                               self.gameList.append((game + " - " + title, language, image, name, game, title, id))
-                       if len(self.gameList) == 0:
-                               self.gameList.append((_('No streams found!'), None, None))
-                               self.ml.setList(list(map(self._defaultlistleft, self.gameList)))
+                               self._items.append((game + " - " + title, language, image, name, game, title, id))
+                       if len(self._items) == 0:
+                               self._items.append((_('No streams found!'), None, None))
+                               self._setList('_defaultlistleft', True)
                        else:
-                               self.ml.setList(list(map(self.twitchListEntry, self.gameList)))
+                               self.ml.setList(list(map(self.twitchListEntry, self._items)))
                                self.keyLocked = False
                elif self.ID == "topgames":
                        for node in jsondata["top"]:
                                title = str(node["game"]["name"])
                                image = str(node["game"]["box"]["template"]).replace('{width}x{height}', '600x800')
-                               self.gameList.append((title, '', image))
-                       if len(self.gameList) == 0:
-                               self.gameList.append((_('No games found!'), None, None))
-                               self.ml.setList(list(map(self._defaultlistleft, self.gameList)))
+                               self._items.append((title, '', image))
+                       if len(self._items) == 0:
+                               self._items.append((_('No games found!'), None, None))
+                               self._setList('_defaultlistleft', True)
                        else:
-                               self.ml.setList(list(map(self._defaultlistleft, self.gameList)))
+                               self._setList('_defaultlistleft', True)
                                self.keyLocked = False
                elif self.ID == "videos":
                        for node in jsondata["vods"]:
@@ -309,12 +310,12 @@ class twitchGames(MPScreen):
                                except:
                                        image = None
                                id = str(node["_id"])
-                               self.gameList.append((game + " - " + title + " - " + vidtitle, language, image, id, game, title + " - " + vidtitle))
-                       if len(self.gameList) == 0:
-                               self.gameList.append((_('No videos found!'), None, None))
-                               self.ml.setList(list(map(self._defaultlistleft, self.gameList)))
+                               self._items.append((game + " - " + title + " - " + vidtitle, language, image, id, game, title + " - " + vidtitle))
+                       if len(self._items) == 0:
+                               self._items.append((_('No videos found!'), None, None))
+                               self._setList('_defaultlistleft', True)
                        else:
-                               self.ml.setList(list(map(self.twitchListEntry, self.gameList)))
+                               self.ml.setList(list(map(self.twitchListEntry, self._items)))
                                self.keyLocked = False
                elif self.ID == "channelvideos":
                        for node in jsondata["videos"]:
@@ -327,12 +328,12 @@ class twitchGames(MPScreen):
                                except:
                                        image = None
                                id = str(node["_id"])
-                               self.gameList.append((game + " - " + title + " - " + vidtitle, language, image, id, game, title + " - " + vidtitle))
-                       if len(self.gameList) == 0:
-                               self.gameList.append((_('No videos found!'), None, None))
-                               self.ml.setList(list(map(self._defaultlistleft, self.gameList)))
+                               self._items.append((game + " - " + title + " - " + vidtitle, language, image, id, game, title + " - " + vidtitle))
+                       if len(self._items) == 0:
+                               self._items.append((_('No videos found!'), None, None))
+                               self._setList('_defaultlistleft', True)
                        else:
-                               self.ml.setList(list(map(self.twitchListEntry, self.gameList)))
+                               self.ml.setList(list(map(self.twitchListEntry, self._items)))
                                self.keyLocked = False
                elif self.ID == "searchchannels":
                        for node in jsondata["channels"]:
@@ -342,12 +343,12 @@ class twitchGames(MPScreen):
                                title = str(node["display_name"])
                                name = str(node["name"])
                                image = str(node["logo"])
-                               self.gameList.append((title, language, image, name, game, title, id))
-                       if len(self.gameList) == 0:
-                               self.gameList.append((_('No channels found!'), None, None))
-                               self.ml.setList(list(map(self._defaultlistleft, self.gameList)))
+                               self._items.append((title, language, image, name, game, title, id))
+                       if len(self._items) == 0:
+                               self._items.append((_('No channels found!'), None, None))
+                               self._setList('_defaultlistleft', True)
                        else:
-                               self.ml.setList(list(map(self.twitchListEntry, self.gameList)))
+                               self.ml.setList(list(map(self.twitchListEntry, self._items)))
                                self.keyLocked = False
                self.ml.moveToIndex(0)
                self.showInfos()
@@ -429,13 +430,13 @@ class twitchGames(MPScreen):
                                return
                        i = self['liste'].getSelectedIndex()
                        j = 0
-                       l = len(self.gameList)
+                       l = len(self._items)
                        fn = config_mp.mediaportal.watchlistpath.value+"mp_twitch_favorites"
                        try:
                                f1 = open(fn, 'w')
                                while j < l:
                                        if j != i:
-                                               (Title, x1, x2, Name, x3, x4, Id, Status) = self.gameList[j]
+                                               (Title, x1, x2, Name, x3, x4, Id, Status) = self._items[j]
                                                f1.write('"%s" "%s" "%s"\n' % (Title, Name, Id))
                                        j += 1
                                f1.close()
index 6911224..d4276c6 100644 (file)
@@ -66,24 +66,24 @@ class ARDGenreScreen(MPScreen):
                self['title'] = Label("ARD Mediathek")
                self['ContentTitle'] = Label("Genre:")
 
-               self.genreliste = []
+               self._items = []
                self.suchString = ''
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.genreliste = []
-               self.genreliste.append(("Suche - TV", "1"))
-               self.genreliste.append(("Sendungen A bis Z - TV", "2"))
-               self.genreliste.append(("Sendung verpasst!? - TV", "3"))
-               self.genreliste.append(("Kategorien - TV", "4"))
-               self.genreliste.append(("Tagesschau - TV", "11"))
-               self.genreliste.append((400 * "—", "99"))
-               self.genreliste.append(("Suche - Radio", "6"))
-               self.genreliste.append(("Sendungen A bis Z - Radio", "7"))
-               self.genreliste.append(("Kategorien - Radio", "8"))
-               self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+               self._items = []
+               self._items.append(("Suche - TV", "1"))
+               self._items.append(("Sendungen A bis Z - TV", "2"))
+               self._items.append(("Sendung verpasst!? - TV", "3"))
+               self._items.append(("Kategorien - TV", "4"))
+               self._items.append(("Tagesschau - TV", "11"))
+               self._items.append((400 * "—", "99"))
+               self._items.append(("Suche - Radio", "6"))
+               self._items.append(("Sendungen A bis Z - Radio", "7"))
+               self._items.append(("Kategorien - Radio", "8"))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
 
        def keyOK(self):
                self.gN = self['liste'].getCurrent()[0][0]
@@ -128,64 +128,64 @@ class ARDPreSelect(MPScreen):
                self['title'] = Label("ARD Mediathek")
                self['ContentTitle'] = Label(_("Selection:") + " %s" % self.gN)
 
-               self.genreliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
                if self.gF == "2" or self.gF == "7":
-                       self.genreliste = []
+                       self._items = []
                        for c in range(26): # ABC, Radio & TV
-                               self.genreliste.append((chr(ord('A') + c), None))
-                       self.genreliste.insert(0, ('0-9', None))
+                               self._items.append((chr(ord('A') + c), None))
+                       self._items.insert(0, ('0-9', None))
                elif self.gF == "4" or self.gF == "8":
-                       self.genreliste = []
+                       self._items = []
                        if self.gF == "4": # Extra-Kategorien, Radio & TV
-                               self.genreliste.append(("TOP von Seite 1 - TV", "1"))
-                               self.genreliste.append(("Neueste Videos", "2"))
-                               self.genreliste.append(("Am besten bewertete Videos", "3"))
-                               self.genreliste.append(("Meistabgerufene Videos", "4"))
-                               self.genreliste.append(("Ausgewählte Filme", "5"))
-                               self.genreliste.append(("Ausgewählte Dokus", "6"))
-                               self.genreliste.append((400 * "—", "99"))
-                               self.genreliste.append(("Kinder & Familie", "7"))
-                               self.genreliste.append(('"Must see" - was die Redaktion schaut', "8"))
-                               self.genreliste.append(("Kurzes für Zwischendurch", "9"))
-                               self.genreliste.append(("Unterhaltung & Comedy", "10"))
-                               self.genreliste.append(("Wissen", "11"))
-                               self.genreliste.append(("Politik", "12"))
-                               self.genreliste.append(("Kultur", "13"))
-                               self.genreliste.append(("Ratgeber", "14"))
-                               self.genreliste.append(("Sport", "15"))
-                               self.genreliste.append(("Sportreportagen", "16"))
-                               self.genreliste.append(("Reise", "17"))
-                               self.genreliste.append(("Alle Filme", "18"))
-                               self.genreliste.append(("Alle Dokus & Reportagen", "19"))
+                               self._items.append(("TOP von Seite 1 - TV", "1"))
+                               self._items.append(("Neueste Videos", "2"))
+                               self._items.append(("Am besten bewertete Videos", "3"))
+                               self._items.append(("Meistabgerufene Videos", "4"))
+                               self._items.append(("Ausgewählte Filme", "5"))
+                               self._items.append(("Ausgewählte Dokus", "6"))
+                               self._items.append((400 * "—", "99"))
+                               self._items.append(("Kinder & Familie", "7"))
+                               self._items.append(('"Must see" - was die Redaktion schaut', "8"))
+                               self._items.append(("Kurzes für Zwischendurch", "9"))
+                               self._items.append(("Unterhaltung & Comedy", "10"))
+                               self._items.append(("Wissen", "11"))
+                               self._items.append(("Politik", "12"))
+                               self._items.append(("Kultur", "13"))
+                               self._items.append(("Ratgeber", "14"))
+                               self._items.append(("Sport", "15"))
+                               self._items.append(("Sportreportagen", "16"))
+                               self._items.append(("Reise", "17"))
+                               self._items.append(("Alle Filme", "18"))
+                               self._items.append(("Alle Dokus & Reportagen", "19"))
                        if self.gF == "8": # Extra-Kategorien, nur Radio
-                               self.genreliste.append(("Neueste Clips", "1"))
-                               self.genreliste.append(("Meistabgerufene Clips", "2"))
-                               self.genreliste.append((400 * "—", "99"))
-                               self.genreliste.append(("Tipps der Redaktion", "3"))
-                               self.genreliste.append(("Hörspiel", "4"))
-                               self.genreliste.append(("Kabarett & Comedy", "5"))
-                               self.genreliste.append(("Feature & Hintergrund", "6"))
-                               self.genreliste.append(("Wissen", "7"))
-                               self.genreliste.append(("Gespräch", "8"))
+                               self._items.append(("Neueste Clips", "1"))
+                               self._items.append(("Meistabgerufene Clips", "2"))
+                               self._items.append((400 * "—", "99"))
+                               self._items.append(("Tipps der Redaktion", "3"))
+                               self._items.append(("Hörspiel", "4"))
+                               self._items.append(("Kabarett & Comedy", "5"))
+                               self._items.append(("Feature & Hintergrund", "6"))
+                               self._items.append(("Wissen", "7"))
+                               self._items.append(("Gespräch", "8"))
                elif self.gF == "3":    # Sendung verpasst?
                        for q in range (0, 7):
                                s2 = (datetime.date.today()+datetime.timedelta(days=-q)).strftime("%A %d. %B %Y")
                                s3 = str(q)
-                               self.genreliste.append((s2, s3))
+                               self._items.append((s2, s3))
                elif self.gF == "11":
-                       self.genreliste = []
-                       self.genreliste.append(("Tagesschau", "1"))
-                       self.genreliste.append(("Tagesschau mit Gebärdensprache", "2"))
-                       self.genreliste.append(("Tagesthemen", "3"))
-                       self.genreliste.append(("Tagesschau24", "4"))
+                       self._items = []
+                       self._items.append(("Tagesschau", "1"))
+                       self._items.append(("Tagesschau mit Gebärdensprache", "2"))
+                       self._items.append(("Tagesthemen", "3"))
+                       self._items.append(("Tagesschau24", "4"))
 
                self.keyLocked = False
-               self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.showInfos()
 
        def keyOK(self):
@@ -294,34 +294,34 @@ class ARDPreSelectSender(MPScreen):
                self['title'] = Label("ARD Mediathek")
                self['ContentTitle'] = Label(_("Selection:") + " %s" % self.gN)
 
-               self.genreliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.genreliste.append(("Das Erste", "208"))
-               self.genreliste.append(("BR", "2224"))
-               self.genreliste.append(("HR", "5884"))
-               self.genreliste.append(("MDR", "5882"))
-               self.genreliste.append(("MDR Thüringen", "1386988"))
-               self.genreliste.append(("MDR Sachsen-Anhalt", "1386898"))
-               self.genreliste.append(("MDR Sachsen", "1386804"))
-               self.genreliste.append(("NDR", "5906"))
-               self.genreliste.append(("RB", "5898"))
-               self.genreliste.append(("RBB", "5874"))
-               self.genreliste.append(("RBB Brandenburg", "21518356"))
-               self.genreliste.append(("RBB Berlin", "21518358"))
-               self.genreliste.append(("SR", "5870"))
-               self.genreliste.append(("SWR", "5310"))
-               self.genreliste.append(("SWR Rheinland-Pfalz", "5872"))
-               self.genreliste.append(("SWR Baden-Württemberg", "5904"))
-               self.genreliste.append(("WDR", "5902"))
-               self.genreliste.append(("tagesschau24", "5878"))
-               self.genreliste.append(("ARD alpha", "5868"))
-               self.genreliste.append(("ONE", "673348"))
-               self.genreliste.append(("KiKA", "5886"))
-               self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+               self._items.append(("Das Erste", "208"))
+               self._items.append(("BR", "2224"))
+               self._items.append(("HR", "5884"))
+               self._items.append(("MDR", "5882"))
+               self._items.append(("MDR Thüringen", "1386988"))
+               self._items.append(("MDR Sachsen-Anhalt", "1386898"))
+               self._items.append(("MDR Sachsen", "1386804"))
+               self._items.append(("NDR", "5906"))
+               self._items.append(("RB", "5898"))
+               self._items.append(("RBB", "5874"))
+               self._items.append(("RBB Brandenburg", "21518356"))
+               self._items.append(("RBB Berlin", "21518358"))
+               self._items.append(("SR", "5870"))
+               self._items.append(("SWR", "5310"))
+               self._items.append(("SWR Rheinland-Pfalz", "5872"))
+               self._items.append(("SWR Baden-Württemberg", "5904"))
+               self._items.append(("WDR", "5902"))
+               self._items.append(("tagesschau24", "5878"))
+               self._items.append(("ARD alpha", "5868"))
+               self._items.append(("ONE", "673348"))
+               self._items.append(("KiKA", "5886"))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.showInfos()
 
        def keyOK(self):
@@ -330,20 +330,18 @@ class ARDPreSelectSender(MPScreen):
                url = "%s/tv/sendungVerpasst?tag=%s&kanal=%s" % (BASE_URL, self.sender, extra)  # "self.sender" kein Tippfehler!
                self.session.open(ARDStreamScreen, url, auswahl, self.gF)
 
-class ARDPostSelect(MPScreen, ThumbsHelper):
+class ARDPostSelect(MPScreen):
 
        def __init__(self, session, auswahl, genreName, genreFlag):
                self.auswahl = auswahl
                self.gN = genreName
                self.gF = genreFlag
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0"             : self.closeAll,
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -354,7 +352,7 @@ class ARDPostSelect(MPScreen, ThumbsHelper):
                self['title'] = Label("ARD Mediathek")
                self['ContentTitle'] = Label(_("Selection:") + " %s" % self.gN)
 
-               self.genreliste = []
+               self._items = []
                self.sendungen = ""
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
@@ -368,19 +366,18 @@ class ARDPostSelect(MPScreen, ThumbsHelper):
                twAgentGetPage(url, agent=agent).addCallback(self.loadPageData).addErrback(self.dataError)
 
        def loadPageData(self, data):
-               self.genreliste = []
+               self._items = []
                self.sendungen = re.findall('<div class="box" .*?textWrapper.*?<a\shref="(.*?)".*?headline">(.*?)<', data, re.S)
                if self.sendungen:
                        for (url, title) in self.sendungen:
                                url = BASE_URL+url.replace("&amp;", "&")
                                if "|" in title:
                                        title = title.replace("|", "-")
-                               self.genreliste.append((decodeHtml(title), url))
+                               self._items.append((decodeHtml(title), url))
                        self.keyLocked = False
                else:
-                       self.genreliste.append((isWeg, None))
-               self.ml.setList(list(map(self._defaultlistleft, self.genreliste)))
-               self.th_ThumbsQuery(self.genreliste, 0, 1, None, None, '<meta name="gsaimg512" content="(.*?)"', 1, 1, mode=1)
+                       self._items.append((isWeg, None))
+               self._setList('_defaultlistleft', True)
                if self['liste'].getCurrent()[0][0] != isWeg:
                        self.showInfos()
 
@@ -432,20 +429,18 @@ class ARDPostSelect(MPScreen, ThumbsHelper):
                        return
                self.session.open(ARDStreamScreen, streamLink, self.gN, self.gF)
 
-class ARDStreamScreen(MPScreen, ThumbsHelper):
+class ARDStreamScreen(MPScreen):
 
        def __init__(self, session, streamLink, genreName, genreFlag):
                self.streamLink = streamLink
                self.gN = genreName
                self.gF = genreFlag
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0"             : self.closeAll,
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -474,7 +469,7 @@ class ARDStreamScreen(MPScreen, ThumbsHelper):
                self.blueMemory = [0, 0, 0]
                self.blueIdx = 0
                self.folgen = ""
-               self.filmliste = []
+               self._items = []
                self.sendung = ""
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
@@ -521,7 +516,7 @@ class ARDStreamScreen(MPScreen, ThumbsHelper):
        def loadPageData(self, data):
                if self.gN == "Sport":
                        data = re.search('(.*?)Ausgewählte Dokus', data, re.S).group(1)
-               self.filmliste = []
+               self._items = []
                if self.blueTrigger == 0:
                        if self.page == 1:      # Gleich bei Seite 1 die maximale Seite merken. Danach nicht nochmal berechnen
                                if "Loader-source" in data:
@@ -566,14 +561,13 @@ class ARDStreamScreen(MPScreen, ThumbsHelper):
                                        sub = re.search('documentId=(.*?)($|&)', url, re.S)
                                        if sub:
                                                iD = sub.group(1)
-                                               self.filmliste.append((decodeHtml(title), url, iD))
-                                               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                                               self._items.append((decodeHtml(title), url, iD))
+                                               self._setList('_defaultlistleft', True)
                                                self.ml.moveToIndex(self.blueIdx)
                        self.keyLocked = False
                else:
-                       self.filmliste.append((isWeg, None, None, None))
-                       self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
-               self.th_ThumbsQuery(self.filmliste, 0, 1, None, None, '<meta name="gsaimg512" content="(.*?)"', self.page, self.lastpage, mode=1)
+                       self._items.append((isWeg, None, None, None))
+                       self._setList('_defaultlistleft', True)
                if self['liste'].getCurrent()[0][0] != isWeg:
                        self.showInfos()
 
index d829de2..3cb1111 100644 (file)
@@ -59,7 +59,7 @@ class arteFirstScreen(MPScreen):
 
                self.keyLocked = True
                self.suchString = ''
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -67,13 +67,13 @@ class arteFirstScreen(MPScreen):
 
 
        def genreData(self):
-               self.filmliste.append(("Suche", "search"))
-               self.filmliste.append(("Meistgesehen", "http://www.arte.tv/hbbtvv2/services/web/index.php/OPA/v3/videos/mostViewed/page/%%PAGE%%/limit/50/de"))
-               self.filmliste.append(("Letzte Chance", "http://www.arte.tv/hbbtvv2/services/web/index.php/OPA/v3/videos/lastChance/page/%%PAGE%%/limit/50/de"))
-               self.filmliste.append(("Sendungen A-Z", "http://www.arte.tv/hbbtvv2/services/web/index.php/OPA/v3/magazines/de"))
-               self.filmliste.append(("Themen", "by_channel"))
-               self.filmliste.append(("Datum", "by_date"))
-               self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+               self._items.append(("Suche", "search"))
+               self._items.append(("Meistgesehen", "http://www.arte.tv/hbbtvv2/services/web/index.php/OPA/v3/videos/mostViewed/page/%%PAGE%%/limit/50/de"))
+               self._items.append(("Letzte Chance", "http://www.arte.tv/hbbtvv2/services/web/index.php/OPA/v3/videos/lastChance/page/%%PAGE%%/limit/50/de"))
+               self._items.append(("Sendungen A-Z", "http://www.arte.tv/hbbtvv2/services/web/index.php/OPA/v3/magazines/de"))
+               self._items.append(("Themen", "by_channel"))
+               self._items.append(("Datum", "by_date"))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.keyLocked = False
 
        def keyOK(self):
@@ -113,7 +113,7 @@ class arteSubGenreScreen(MPScreen):
                self['name'] = Label(_("Selection:"))
 
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -126,21 +126,21 @@ class arteSubGenreScreen(MPScreen):
                                day1 = today -datetime.timedelta(days=daynr)
                                dateselect =  day1.strftime('%Y-%m-%d')
                                link = 'http://www.arte.tv/hbbtvv2/services/web/index.php/OPA/v3/programs/%s/de' % dateselect
-                               self.filmliste.append((dateselect, link))
-                       self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+                               self._items.append((dateselect, link))
+                       self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                        self.ml.moveToIndex(21)
                elif self.Name == "Themen":
                        # http://www.arte.tv/hbbtvv2/services/web/index.php/EMAC/teasers/categories/v2/de
                        link = 'http://www.arte.tv/hbbtvv2/services/web/index.php/EMAC/teasers/category/%s/de'
-                       self.filmliste.append(('Aktuelles und Gesellschaft', link % 'ACT'))
-                       self.filmliste.append(('Kino', link % 'CIN'))
-                       self.filmliste.append(('Fernsehfilme und Serien', link % 'SER'))
-                       self.filmliste.append(('Kultur und Pop', link % 'CPO'))
-                       self.filmliste.append(('ARTE Concert', link % 'ARS'))
-                       self.filmliste.append(('Wissenschaft', link % 'SCI'))
-                       self.filmliste.append(('Entdeckung der Welt', link % 'DEC'))
-                       self.filmliste.append(('Geschichte', link % 'HIS'))
-                       self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+                       self._items.append(('Aktuelles und Gesellschaft', link % 'ACT'))
+                       self._items.append(('Kino', link % 'CIN'))
+                       self._items.append(('Fernsehfilme und Serien', link % 'SER'))
+                       self._items.append(('Kultur und Pop', link % 'CPO'))
+                       self._items.append(('ARTE Concert', link % 'ARS'))
+                       self._items.append(('Wissenschaft', link % 'SCI'))
+                       self._items.append(('Entdeckung der Welt', link % 'DEC'))
+                       self._items.append(('Geschichte', link % 'HIS'))
+                       self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.keyLocked = False
 
        def keyOK(self):
@@ -150,19 +150,17 @@ class arteSubGenreScreen(MPScreen):
                Link = self['liste'].getCurrent()[0][1]
                self.session.open(arteSecondScreen, Link, Name)
 
-class arteSecondScreen(MPScreen, ThumbsHelper):
+class arteSecondScreen(MPScreen):
 
        def __init__(self, session, Link, Name):
                self.Link = Link
                self.Name = Name
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0": self.closeAll,
                        "ok": self.keyOK,
                        "cancel": self.keyCancel,
-                       "5": self.keyShowThumb,
                        "up": self.keyUp,
                        "down": self.keyDown,
                        "right": self.keyRight,
@@ -177,13 +175,13 @@ class arteSecondScreen(MPScreen, ThumbsHelper):
                self.page = 1
                self.lastpage = 1
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.filmliste = []
+               self._items = []
                self['name'].setText(_('Please wait...'))
                url = self.Link
                if self.Name == "Suche":
@@ -205,8 +203,8 @@ class arteSecondScreen(MPScreen, ThumbsHelper):
                                                title = "Thema: " + str(node["title"])
                                                code = str(node["code"])
                                                url = 'http://www.arte.tv/hbbtvv2/services/web/index.php/OPA/v3/videos/subcategory/%s/page/1/limit/100/de' % code
-                                               self.filmliste.append((decodeHtml(title), url, default_cover, "", "subcat"))
-                               self.filmliste.sort()
+                                               self._items.append((decodeHtml(title), url, default_cover, "", "subcat"))
+                               self._items.sort()
                        if 'teasers' in json_data:
                                if 'highlights' in json_data["teasers"] and len(json_data["teasers"]["highlights"]) > 0:
                                        for node in json_data["teasers"]["highlights"]:
@@ -225,8 +223,8 @@ class arteSecondScreen(MPScreen, ThumbsHelper):
                                                        descr = str(node['teaserText'])
                                                else:
                                                        descr = ""
-                                               self.filmliste.append((decodeHtml(title), url, image, descr, kind))
-                                       self.filmliste.sort()
+                                               self._items.append((decodeHtml(title), url, image, descr, kind))
+                                       self._items.sort()
                                if 'collections' in json_data["teasers"] and len(json_data["teasers"]["collections"]) > 0:
                                        for node in json_data["teasers"]["collections"]:
                                                kind = str(node['kind'])
@@ -241,8 +239,8 @@ class arteSecondScreen(MPScreen, ThumbsHelper):
                                                        descr = str(node['teaserText'])
                                                else:
                                                        descr = ""
-                                               self.filmliste.append((decodeHtml(title), programid, image, descr, kind))
-                                       self.filmliste.sort()
+                                               self._items.append((decodeHtml(title), programid, image, descr, kind))
+                                       self._items.sort()
                                if 'playlists' in json_data["teasers"] and len(json_data["teasers"]["playlists"]) > 0:
                                        for node in json_data["teasers"]["playlists"]:
                                                kind = str(node['kind'])
@@ -257,15 +255,15 @@ class arteSecondScreen(MPScreen, ThumbsHelper):
                                                        descr = str(node['teaserText'])
                                                else:
                                                        descr = ""
-                                               self.filmliste.append((decodeHtml(title), programid, image, descr, kind))
-                                       self.filmliste.sort()
+                                               self._items.append((decodeHtml(title), programid, image, descr, kind))
+                                       self._items.sort()
                                if 'magazines' in json_data["teasers"] and len(json_data["teasers"]["magazines"]) > 0:
                                        for node in json_data["teasers"]["magazines"]:
                                                title = "Sendung: " + str(node["label"]["de"])
                                                url = str(node["url"])
                                                image = default_cover
-                                               self.filmliste.append((decodeHtml(title), url, image, "", "sendung"))
-                                       self.filmliste.sort()
+                                               self._items.append((decodeHtml(title), url, image, "", "sendung"))
+                                       self._items.sort()
                else:
                        if 'programs' in json_data:
                                for node in json_data["programs"]:
@@ -298,7 +296,7 @@ class arteSecondScreen(MPScreen, ThumbsHelper):
                                                handlung = "%s%s\n\n%s" % (date, Runtime, descr)
                                                image = str(node['video']['imageUrl'])
                                                url = "https://api.arte.tv/api/player/v1/config/de/%s" % str(node['video']['programId'])
-                                               self.filmliste.append((decodeHtml(title), url, image, handlung, ""))
+                                               self._items.append((decodeHtml(title), url, image, handlung, ""))
                        elif 'videos' in json_data:
                                if 'meta' in json_data:
                                        self.lastpage = json_data["meta"]["pages"]
@@ -332,7 +330,7 @@ class arteSecondScreen(MPScreen, ThumbsHelper):
                                        handlung = "%s%s\n\n%s" % (date, Runtime, descr)
                                        image = str(node['imageUrl'])
                                        url = "https://api.arte.tv/api/player/v1/config/de/%s" % str(node['programId'])
-                                       self.filmliste.append((decodeHtml(title), url, image, handlung, ""))
+                                       self._items.append((decodeHtml(title), url, image, handlung, ""))
                        elif 'magazines' in json_data:
                                for node in json_data["magazines"]:
                                        if node['subtitle']:
@@ -346,7 +344,7 @@ class arteSecondScreen(MPScreen, ThumbsHelper):
                                        image = str(node['imageUrl'])
                                        kind = str(node['kind'])
                                        url = str(node['programId'])
-                                       self.filmliste.append((decodeHtml(title), url, image, descr, kind))
+                                       self._items.append((decodeHtml(title), url, image, descr, kind))
                        elif 'data' in json_data:
                                if 'nextPage' in json_data:
                                        if json_data["nextPage"]:
@@ -366,14 +364,13 @@ class arteSecondScreen(MPScreen, ThumbsHelper):
                                                continue
                                        handlung = "%s\n\n%s" % (Runtime, str(node['description']))
                                        url = "https://api.arte.tv/api/player/v1/config/de/%s" % str(node['programId'])
-                                       self.filmliste.append((decodeHtml(title), url, str(node['images']['landscape']['resolutions'][-1]['url']), handlung, ""))
+                                       self._items.append((decodeHtml(title), url, str(node['images']['landscape']['resolutions'][-1]['url']), handlung, ""))
 
-                       if len(self.filmliste) == 0:
-                               self.filmliste.append((_("No videos found!"), '', '', '', '', ''))
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                       if len(self._items) == 0:
+                               self._items.append((_("No videos found!"), '', '', '', '', ''))
+               self._setList('_defaultlistleft', True)
                self.ml.moveToIndex(0)
                self.keyLocked = False
-               self.th_ThumbsQuery(self.filmliste, 0, 1, 2, None, None, self.page, self.lastpage, mode=1)
                self.showInfos()
 
        def showInfos(self):
index e7fb473..57cb91d 100644 (file)
@@ -41,17 +41,15 @@ from Plugins.Extensions.MediaPortal.plugin import _
 from Plugins.Extensions.MediaPortal.resources.imports import *
 default_cover = "file://%s/atv.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
 
-class atvGenreScreen(MPScreen, ThumbsHelper):
+class atvGenreScreen(MPScreen):
 
        def __init__(self, session):
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0"             : self.closeAll,
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -69,7 +67,7 @@ class atvGenreScreen(MPScreen, ThumbsHelper):
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.filmliste = []
+               self._items = []
                url = "http://atv.at/mediathek"
                twAgentGetPage(url).addCallback(self.parseData).addErrback(self.dataError)
 
@@ -80,10 +78,9 @@ class atvGenreScreen(MPScreen, ThumbsHelper):
                        if raw:
                                for (Url, ImageId, Title) in raw:
                                        Image = "https://static.atv.cdn.tvnext.tv/static/assets/cms/%s" % urllib.parse.unquote(ImageId)
-                                       self.filmliste.append((decodeHtml(Title), Url, Image))
-                               self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+                                       self._items.append((decodeHtml(Title), Url, Image))
+                               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                                self.keyLocked = False
-                               self.th_ThumbsQuery(self.filmliste, 0, 1, 2, None, None, 1, 1, mode=1)
                                self.showInfos()
 
        def showInfos(self):
@@ -97,19 +94,17 @@ class atvGenreScreen(MPScreen, ThumbsHelper):
                Link = self['liste'].getCurrent()[0][1]
                self.session.open(atvListScreen, Link, Name)
 
-class atvListScreen(MPScreen, ThumbsHelper):
+class atvListScreen(MPScreen):
 
        def __init__(self, session, Link, Name):
                self.Link = Link
                self.Name = Name
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0"             : self.closeAll,
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -120,7 +115,7 @@ class atvListScreen(MPScreen, ThumbsHelper):
                self['ContentTitle'] = Label("Genre: %s" % self.Name)
                self['name'] = Label(_("Please wait..."))
 
-               self.filmliste = []
+               self._items = []
                self.handlung = ''
                self.keyLocked = True
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
@@ -144,17 +139,16 @@ class atvListScreen(MPScreen, ThumbsHelper):
                        if raw:
                                for (Url, ImageId, Title) in raw:
                                        Image = "https://static.atv.cdn.tvnext.tv/static/assets/cms/%s" % urllib.parse.unquote(ImageId)
-                                       self.filmliste.append((decodeHtml(Title), Url, Image))
+                                       self._items.append((decodeHtml(Title), Url, str(Image)))
                nextpage = re.search('data-jsb="url=(.*?)" style=.*?Weitere Folgen', data, re.S)
                if nextpage:
                        self.Link = urllib.parse.unquote_plus(nextpage.group(1))
                        self.loadPage()
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_("No videos found!"), "", ""))
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+               if len(self._items) == 0:
+                       self._items.append((_("No videos found!"), "", ""))
+               self._setList('_defaultlistleft', True)
                self.ml.moveToIndex(0)
                self.keyLocked = False
-               self.th_ThumbsQuery(self.filmliste, 0, 1, 2, None, None, 1, 1, mode=1)
                self.showInfos()
 
        def showInfos(self):
index ea32678..ae34c52 100644 (file)
@@ -61,18 +61,18 @@ class brfGenreScreen(MPScreen):
                self['ContentTitle'] = Label("Genre:")
 
                self.suchString = ''
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
                self.onLayoutFinish.append(self.genreData)
 
        def genreData(self):
-               self.filmliste.append(("Suche", '', default_cover))
-               self.filmliste.append(("Blickpunkt", 'https://m.brf.be/blickpunkt/page/'))
-               self.filmliste.append(("Beiträge", 'https://m.brf.be/beitraege/page/'))
-               self.filmliste.append(("Reportagen", 'https://m.brf.be/reportagen/page/'))
-               self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+               self._items.append(("Suche", '', default_cover))
+               self._items.append(("Blickpunkt", 'https://m.brf.be/blickpunkt/page/'))
+               self._items.append(("Beiträge", 'https://m.brf.be/beitraege/page/'))
+               self._items.append(("Reportagen", 'https://m.brf.be/reportagen/page/'))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.showInfos()
 
        def keyOK(self):
@@ -92,19 +92,17 @@ class brfGenreScreen(MPScreen):
                        Link = urllib.parse.quote(callback).replace(' ', '+')
                        self.session.open(brfListScreen, Link, Name)
 
-class brfListScreen(MPScreen, ThumbsHelper):
+class brfListScreen(MPScreen):
 
        def __init__(self, session, Link, Name):
                self.Link = Link
                self.Name = Name
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0"             : self.closeAll,
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -128,7 +126,7 @@ class brfListScreen(MPScreen, ThumbsHelper):
 
        def loadPage(self):
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                if self.Name == "Suche":
                        url = "https://m.brf.be/page/%s?s=%s" % (str(self.page), self.Link)
                else:
@@ -143,13 +141,12 @@ class brfListScreen(MPScreen, ThumbsHelper):
                if raw:
                        for (Url, Title, Image, Date) in raw:
                                Image = Image + ".jpg"
-                               self.filmliste.append((decodeHtml(Title), Url, Image, Date))
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_("No videos found!"), None, default_cover, ""))
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                               self._items.append((decodeHtml(Title), Url, Image, Date))
+               if len(self._items) == 0:
+                       self._items.append((_("No videos found!"), None, default_cover, ""))
+               self._setList('_defaultlistleft', True)
                self.ml.moveToIndex(0)
                self.keyLocked = False
-               self.th_ThumbsQuery(self.filmliste, 0, 1, 2, None, None, self.page+1, self.lastpage, mode=1, pagefix=-1)
                self.showInfos()
 
        def showInfos(self):
index 5bc73b2..07484ac 100644 (file)
@@ -59,7 +59,7 @@ class disneyplusScreen(MPScreen):
 
                self['title'] = Label("Disney+")
 
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
                self.StartTimer = eTimer()
@@ -68,7 +68,7 @@ class disneyplusScreen(MPScreen):
                self.onLayoutFinish.append(self.start)
 
        def start(self):
-               self.filmliste.append(("",))
+               self._items.append(("",))
                if mp_globals.model in ["one", "two"]:
                        try:
                                self.player_org = config.vod.disney.player.value
@@ -76,12 +76,12 @@ class disneyplusScreen(MPScreen):
                                pass
                        self.StartTimer_conn = self.StartTimer.timeout.connect(self.keyOK)
                        self.StartTimer.start(1000, False)
-                       self.filmliste.append((_("Please wait while Disney+ is started..."),))
+                       self._items.append((_("Please wait while Disney+ is started..."),))
                        self.keyLocked = False
                else:
-                       self.filmliste.append((_("This plugin is only available for Dreambox One and Two!"),))
+                       self._items.append((_("This plugin is only available for Dreambox One and Two!"),))
                        self['handlung'].setText('')
-               self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.ml.moveToIndex(0)
                self.ml.selectionEnabled(False)
 
index 2ffd5a4..937e0e0 100644 (file)
@@ -66,24 +66,24 @@ class dreisatGenreScreen(MPScreen):
 
                self.keyLocked = True
                self.suchString = ''
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
                self.onLayoutFinish.append(self.parseData)
 
        def parseData(self):
-               self.filmliste.append(("Suche", '', default_cover))
-               self.filmliste.append(("Sendung verpasst!?", '', default_cover))
-               self.filmliste.append(("Sendungen A-Z", '/sendungen-a-z', default_cover))
-               self.filmliste.append(("Themen", '/themen', default_cover))
-               self.filmliste.append(("Kultur", '/kultur', default_cover))
-               self.filmliste.append(("Wissen", '/wissen', default_cover))
-               self.filmliste.append(("Gesellschaft", '/gesellschaft', default_cover))
-               self.filmliste.append(("Film", '/film', default_cover))
-               self.filmliste.append(("Dokumentation", '/dokumentation', default_cover))
-               self.filmliste.append(("Kabarett", '/kabarett', default_cover))
-               self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+               self._items.append(("Suche", '', default_cover))
+               self._items.append(("Sendung verpasst!?", '', default_cover))
+               self._items.append(("Sendungen A-Z", '/sendungen-a-z', default_cover))
+               self._items.append(("Themen", '/themen', default_cover))
+               self._items.append(("Kultur", '/kultur', default_cover))
+               self._items.append(("Wissen", '/wissen', default_cover))
+               self._items.append(("Gesellschaft", '/gesellschaft', default_cover))
+               self._items.append(("Film", '/film', default_cover))
+               self._items.append(("Dokumentation", '/dokumentation', default_cover))
+               self._items.append(("Kabarett", '/kabarett', default_cover))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.keyLocked = False
                self.showInfos()
 
@@ -134,7 +134,7 @@ class dreisatGenreSubScreen(MPScreen):
 
                self.keyLocked = True
                self.suchString = ''
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -150,24 +150,24 @@ class dreisatGenreSubScreen(MPScreen):
                        if raw:
                                for (Url, Title) in raw:
                                        Url = baseurl + Url
-                                       self.filmliste.append((decodeHtml(Title), Url, default_cover, None))
+                                       self._items.append((decodeHtml(Title), Url, default_cover, None))
                else:
                        raw = re.findall('class="m--content-module.*?data-src="(.*?)".*?href="(.*?)".*?headline level-4\s+">(.*?)</h3>.*?paragraph-large\s{0,2}">(.*?)</p>', data, re.S)
                        if raw:
                                for (Image, Url, Title, Handlung) in raw:
                                        Url = baseurl + Url
-                                       self.filmliste.append((decodeHtml(Title), Url, Image, Handlung))
+                                       self._items.append((decodeHtml(Title), Url, Image, Handlung))
                        raw = re.findall('class="m--teaser-topic.*?data-src="(.*?)".*?href="(.*?)".*?class="a--headline.*?>(.*?)</h3>.*?class="a--subheadline.*?>(.*?)</p>', data, re.S)
                        if raw:
                                for (Image, Url, Title, Handlung) in raw:
                                        Url = baseurl + Url
-                                       self.filmliste.append((decodeHtml(Title), Url, Image, Handlung))
-                       raw = re.findall('class="m--teaser-small.*?data-src="(.*?)".*?href="(.*?)".*?class="a--headline.*?clickarea-link">(.*?)</p>.*?class="a--subheadline.*?>(.*?)</p>', data, re.S)
+                                       self._items.append((decodeHtml(Title), Url, Image, Handlung))
+                       raw = re.findall('class="m--teaser-small.*?data-src="(.*?)".*?href="(.*?)".*?class="a--headline.*?clickarea-link.*?>(.*?)</p>.*?class="a--subheadline.*?>(.*?)</p>', data, re.S)
                        if raw:
                                for (Image, Url, Title, Handlung) in raw:
                                        Url = baseurl + Url
-                                       self.filmliste.append((decodeHtml(Title), Url, Image, Handlung))
-               self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+                                       self._items.append((decodeHtml(Title), Url, Image, Handlung))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.keyLocked = False
                self.showInfos()
 
@@ -210,7 +210,7 @@ class dreisatDateScreen(MPScreen):
                self['name'] = Label(_("Selection:"))
 
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -222,8 +222,8 @@ class dreisatDateScreen(MPScreen):
                        day1 = today - datetime.timedelta(days=daynr)
                        dateselect = day1.strftime('%Y-%m-%d')
                        link = '%s/programm?airtimeDate=%s' % (baseurl, dateselect)
-                       self.filmliste.append((dateselect, link, ''))
-               self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+                       self._items.append((dateselect, link, ''))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.ml.moveToIndex(21)
                self.keyLocked = False
 
@@ -257,7 +257,7 @@ class dreisatAZScreen(MPScreen):
                self['name'] = Label(_("Please wait..."))
 
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
                self.onLayoutFinish.append(self.loadPage)
@@ -267,13 +267,13 @@ class dreisatAZScreen(MPScreen):
                twAgentGetPage(self.Link, agent=agent).addCallback(self.parseData).addErrback(self.dataError)
 
        def parseData(self, data):
-               raw = re.findall('data-module="teaser-small".*?data-src="(.*?)".*?href="(.*?)".*?clickarea-link">(.*?)</p>.*?class="a--subheadline.*?>(.*?)</p>', data, re.S)
+               raw = re.findall('data-module="teaser-small".*?data-src="(.*?)".*?href="(.*?)".*?clickarea-link.*?>(.*?)</p>.*?class="a--subheadline.*?>(.*?)</p>', data, re.S)
                if raw:
                        for (Image, Url, Title, Handlung) in raw:
-                               self.filmliste.append((decodeHtml(Title), Url, Image, Handlung))
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_("No contents / results found!"), None, default_cover))
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                               self._items.append((decodeHtml(Title), Url, Image, Handlung))
+               if len(self._items) == 0:
+                       self._items.append((_("No contents / results found!"), None, default_cover))
+               self._setList('_defaultlistleft', True)
                self.keyLocked = False
                self.showInfos()
 
@@ -321,7 +321,7 @@ class dreisatListScreen(MPScreen):
                self['name'] = Label(_("Please wait..."))
 
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                self.page = 1
                self.lastpage = 1
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
@@ -331,7 +331,7 @@ class dreisatListScreen(MPScreen):
        def loadPage(self):
                self.keyLocked = True
                if re.match(".*Suche", self.Name):
-                       self.filmliste = []
+                       self._items = []
                        self.lastpage = 999
                        self['Page'].setText(_("Page:"))
                        self['page'].setText(str(self.page))
@@ -347,7 +347,7 @@ class dreisatListScreen(MPScreen):
                                for (Image, Airtime, Title, Runtime, Handlung, Url) in raw:
                                        Title = Airtime + " - " + decodeHtml(Title)
                                        Handlung = "Laufzeit: " + Runtime + "\n\n" + decodeHtml(Handlung).replace('<b>', '').replace('</b>', '').strip()
-                                       self.filmliste.append((Title, Url, Image, Handlung))
+                                       self._items.append((Title, Url, Image, Handlung))
                else:
                        raw = re.findall('class="m--content-module.*?title":\s"(.*?)",.*?"duration":\s"(.*?)".*?"embed_content":\s"(.*?)",.*?teaser-image="\[(.*?),(.*?)class="teaser-info', decodeHtml(data), re.S)
                        if raw:
@@ -359,20 +359,20 @@ class dreisatListScreen(MPScreen):
                                                Url = Embed + ".html"
                                        handlung = re.findall('paragraph-large\s{0,2}">(.*?)</p>', Meta, re.S)
                                        Handlung = "Laufzeit: " + Runtime + "\n\n" + decodeHtml(handlung[0]).strip()
-                                       self.filmliste.append((decodeHtml(Title).replace('\/', '/'), Url, Image, Handlung))
+                                       self._items.append((decodeHtml(Title).replace('\/', '/'), Url, Image, Handlung))
                        raw = re.findall('class="video-carousel-item">.*?"title":\s"(.*?)",.*?duration":\s"(.*?)",.*?"embed_content":\s"(.*?)",.*?teaser-image-overwrite=[\"|\']\{"\d+x\d+":"(.*?)",', decodeHtml(data), re.S)
                        if raw:
                                for (Title, Runtime, Url, Image) in raw:
                                        Url = Url + ".html"
                                        Runtime = "Laufzeit: " + Runtime
-                                       self.filmliste.append((decodeHtml(Title).strip().replace('\\"', '"').replace('\/', '/'), Url, Image.replace('\/', '/'), Runtime))
+                                       self._items.append((decodeHtml(Title).strip().replace('\\"', '"').replace('\/', '/'), Url, Image.replace('\/', '/'), Runtime))
                        raw = re.findall('<article class="m--teaser-small.*?data-src="(.*?)".*?href="(.*?)".*?<h3(.*?)</article>', data, re.S)
                        if raw:
                                for (Image, Url, Meta) in raw:
-                                       meta = re.findall('clickarea-link">(.*?)</p>.*?class="label">(.*?)</span>.*?clickarea-link"\s{0,1}>(.*?)</p>', Meta, re.S)
+                                       meta = re.findall('clickarea-link.*?>(.*?)</p>.*?class="label">(.*?)</span>.*?clickarea-link"\s{0,1}>(.*?)</p>', Meta, re.S)
                                        if meta:
                                                Handlung = "Laufzeit: " + meta[0][1] + "\n\n" + decodeHtml(meta[0][2]).strip()
-                                               self.filmliste.append((decodeHtml(meta[0][0]), Url, Image, Handlung))
+                                               self._items.append((decodeHtml(meta[0][0]), Url, Image, Handlung))
                        raw = re.findall('sophoraId":\s"(.*?)",.*?teaserHeadline":\s"(.*?)",.*?teasertext":\s"(.*?)",', decodeHtml(data), re.S)
                        if raw:
                                topurl = re.search('class="cluster-skip js-rb-click js-track-click" href="(.*?)#skip', decodeHtml(data), re.S)
@@ -380,10 +380,10 @@ class dreisatListScreen(MPScreen):
                                        for (Id, Title, Handlung) in raw:
                                                Url = topurl.group(1) + "/" + Id + ".html"
                                                Image = None
-                                               self.filmliste.append((decodeHtml(Title).strip().replace('\\"', '"').replace('\/', '/'), Url, Image, decodeHtml(Handlung).strip().replace('\\"', '"'), Id))
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_("No videos found!"), None, default_cover, ""))
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                                               self._items.append((decodeHtml(Title).strip().replace('\\"', '"').replace('\/', '/'), Url, Image, decodeHtml(Handlung).strip().replace('\\"', '"'), Id))
+               if len(self._items) == 0:
+                       self._items.append((_("No videos found!"), None, default_cover, ""))
+               self._setList('_defaultlistleft', True)
                self.ml.moveToIndex(0)
                self.keyLocked = False
                self.showInfos()
index ea029d7..92f9510 100644 (file)
@@ -69,7 +69,7 @@ class funkGenreScreen(MPScreen):
 
                self.keyLocked = True
 
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -79,7 +79,7 @@ class funkGenreScreen(MPScreen):
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.filmliste = []
+               self._items = []
                self.keyLocked = True
                url = BASE_URL + "/channels/?size=100&page=%s" % str(self.page-1)
                twAgentGetPage(url, headers=headers).addCallback(self.genreData).addErrback(self.dataError)
@@ -109,16 +109,16 @@ class funkGenreScreen(MPScreen):
                                descr = ""
                        url = BASE_URL + "/playlists/byChannelAlias/" + str(item["alias"]) + "?sort=language,ASC"
                        if title not in ("Doctor Who", "Uncle", "Threesome", "Orange is the new Black", "The Job Lot"):
-                               self.filmliste.append((title, image, url, descr))
-               self.filmliste.sort(key=lambda t : t[0].lower())
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                               self._items.append((title, url, image, descr))
+               self._items.sort(key=lambda t : t[0].lower())
+               self._setList('_defaultlistleft', True)
                self.ml.moveToIndex(0)
                self.keyLocked = False
                self.showInfos()
 
        def showInfos(self):
                Title = self['liste'].getCurrent()[0][0]
-               Image = self['liste'].getCurrent()[0][1]
+               Image = self['liste'].getCurrent()[0][2]
                descr = self['liste'].getCurrent()[0][3]
                self['name'].setText(Title)
                self['handlung'].setText(descr)
@@ -128,7 +128,7 @@ class funkGenreScreen(MPScreen):
                if self.keyLocked:
                        return
                Name = self['liste'].getCurrent()[0][0]
-               url = self['liste'].getCurrent()[0][2]
+               url = self['liste'].getCurrent()[0][1]
                self.session.open(funkSeasonsScreen, url, Name)
 
 class funkSeasonsScreen(MPScreen):
@@ -156,7 +156,7 @@ class funkSeasonsScreen(MPScreen):
 
                self.keyLocked = True
 
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -166,7 +166,7 @@ class funkSeasonsScreen(MPScreen):
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.filmliste = []
+               self._items = []
                self.keyLocked = True
                url = self.url + "&page=%s" % str(self.page-1)
                twAgentGetPage(url, headers=headers).addCallback(self.genreData).addErrback(self.dataError)
@@ -195,7 +195,7 @@ class funkSeasonsScreen(MPScreen):
                        else:
                                descr = ""
                        url = BASE_URL + "/videos/byChannelAlias/" + str(json_data["parent"]["alias"]) + "?filterFsk=false&sort=creationDate,desc&size=100"
-                       self.filmliste.append((title, image, url, descr))
+                       self._items.append((title, url, image, descr))
                else:
                        for item in json_data["_embedded"]["playlistDTOList"]:
                                if 'imageUrlOrigin' in item and not "8415ad90686d2c75aca239372903a45e" in item["imageUrlOrigin"]:
@@ -214,15 +214,15 @@ class funkSeasonsScreen(MPScreen):
                                else:
                                        descr = ""
                                url = BASE_URL + "/videos/byPlaylistAlias/" + str(item["alias"]) + "?filterFsk=false&size=100&sort=episodeNr,ASC"
-                               self.filmliste.append((title, image, url, descr))
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                               self._items.append((title, url, image, descr))
+               self._setList('_defaultlistleft', True)
                self.ml.moveToIndex(0)
                self.keyLocked = False
                self.showInfos()
 
        def showInfos(self):
                Title = self['liste'].getCurrent()[0][0]
-               Image = self['liste'].getCurrent()[0][1]
+               Image = self['liste'].getCurrent()[0][2]
                descr = self['liste'].getCurrent()[0][3]
                self['name'].setText(Title)
                self['handlung'].setText(descr)
@@ -230,7 +230,7 @@ class funkSeasonsScreen(MPScreen):
 
        def keyOK(self):
                Name = self['liste'].getCurrent()[0][0]
-               url = self['liste'].getCurrent()[0][2]
+               url = self['liste'].getCurrent()[0][1]
                self.session.open(funkEpisodesScreen, url, Name)
 
 class funkEpisodesScreen(MPScreen):
@@ -258,7 +258,7 @@ class funkEpisodesScreen(MPScreen):
 
                self.keyLocked = True
 
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -268,7 +268,7 @@ class funkEpisodesScreen(MPScreen):
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.filmliste = []
+               self._items = []
                self.keyLocked = True
                url = self.url + "&page=%s" % str(self.page-1)
                twAgentGetPage(url, headers=headers).addCallback(self.genreData).addErrback(self.dataError)
@@ -327,19 +327,19 @@ class funkEpisodesScreen(MPScreen):
                                else:
                                        downld = None
 
-                               self.filmliste.append((title, image, id, descr, epi, duration, downld))
+                               self._items.append((title, id, image, descr, epi, duration, downld))
                except Exception as e:
                        printl(e, self, "E")
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_('No episodes found!'), None, None, "", "", "", None))
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+               if len(self._items) == 0:
+                       self._items.append((_('No episodes found!'), None, None, "", "", "", None))
+               self._setList('_defaultlistleft', True)
                self.ml.moveToIndex(0)
                self.keyLocked = False
                self.showInfos()
 
        def showInfos(self):
                Title = self['liste'].getCurrent()[0][0]
-               Image = self['liste'].getCurrent()[0][1]
+               Image = self['liste'].getCurrent()[0][2]
                descr = self['liste'].getCurrent()[0][3]
                epi = self['liste'].getCurrent()[0][4]
                dur = self['liste'].getCurrent()[0][5]
@@ -350,7 +350,7 @@ class funkEpisodesScreen(MPScreen):
        def keyOK(self):
                if self.keyLocked:
                        return
-               id = self['liste'].getCurrent()[0][2]
+               id = self['liste'].getCurrent()[0][1]
                Title = self['liste'].getCurrent()[0][0]
                downld = self['liste'].getCurrent()[0][6]
                videourl = None
index 2f5f121..4c26be6 100644 (file)
@@ -61,20 +61,20 @@ class kindertubeMain(MPScreen):
                self['title'] = Label("KinderTube")
                self['ContentTitle'] = Label(_("Genre Selection"))
 
-               self.streamList = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
                self.onLayoutFinish.append(self.layoutFinished)
 
        def layoutFinished(self):
-               self.streamList.append(("0-2 jährige", BASE_URL+'/kleinkind-filme-0-2-jahre.html'))
-               self.streamList.append(("Kleinkinder", BASE_URL+'/serien-für-kleinkinder.html'))
-               self.streamList.append(("Lehrfilme", BASE_URL+'/lehrfilme-für-kinder.html'))
-               self.streamList.append(("Musik", BASE_URL+'/musik-für-kinder.html'))
-               self.streamList.append(("Alle Filme", BASE_URL+'/alle-filme-und-serien.html'))
-               self.streamList.append(("Serien von früher", BASE_URL+'/alte-kinderserien.html'))
-               self.ml.setList(list(map(self._defaultlistcenter, self.streamList)))
+               self._items.append(("0-2 jährige", BASE_URL+'/kleinkind-filme-0-2-jahre.html'))
+               self._items.append(("Kleinkinder", BASE_URL+'/serien-für-kleinkinder.html'))
+               self._items.append(("Lehrfilme", BASE_URL+'/lehrfilme-für-kinder.html'))
+               self._items.append(("Musik", BASE_URL+'/musik-für-kinder.html'))
+               self._items.append(("Alle Filme", BASE_URL+'/alle-filme-und-serien.html'))
+               self._items.append(("Serien von früher", BASE_URL+'/alte-kinderserien.html'))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.showInfos()
 
        def keyOK(self):
@@ -82,17 +82,15 @@ class kindertubeMain(MPScreen):
                url = self['liste'].getCurrent()[0][1]
                self.session.open(kindertubeParsing, auswahl, url)
 
-class kindertubeParsing(MPScreen, ThumbsHelper):
+class kindertubeParsing(MPScreen):
 
        def __init__(self, session, genre, url):
                self.genre = genre
                self.url = url
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0": self.closeAll,
-                       "5" : self.keyShowThumb,
                        "ok" : self.keyOK,
                        "cancel": self.keyCancel,
                        "up" : self.keyUp,
@@ -104,7 +102,7 @@ class kindertubeParsing(MPScreen, ThumbsHelper):
                self['title'] = Label("KinderTube")
                self['ContentTitle'] = Label("%s" % self.genre)
 
-               self.streamList = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -112,9 +110,9 @@ class kindertubeParsing(MPScreen, ThumbsHelper):
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.streamList.append((_('Please wait...'), None))
-               self.ml.setList(list(map(self._defaultlistcenter, self.streamList)))
-               self.streamList = []
+               self._items.append((_('Please wait...'), None))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
+               self._items = []
                twAgentGetPage(self.url).addCallback(self.parseData).addErrback(self.dataError)
 
        def parseData(self, data):
@@ -123,17 +121,16 @@ class kindertubeParsing(MPScreen, ThumbsHelper):
                        for (url, image, title) in pls:
                                title = title.replace(' - alte kinderserien', '')
                                image = BASE_URL+'/'+image
-                               self.streamList.append((decodeHtml(title), url, image))
+                               self._items.append((decodeHtml(title), url, image))
 
-               if len(self.streamList) == 0:
-                       self.streamList.append((_('Parsing error!'), None, None))
+               if len(self._items) == 0:
+                       self._items.append((_('Parsing error!'), None, None))
                        self.keyLocked = True
                else:
                        self.keyLocked = False
 
-               self.ml.setList(list(map(self._defaultlistleft, self.streamList)))
+               self._setList('_defaultlistleft', True)
                self.ml.moveToIndex(0)
-               self.th_ThumbsQuery(self.streamList, 0, 1, 2, None, None, 1, 1)
                self.showInfos()
 
        def keyOK(self):
@@ -149,14 +146,13 @@ class kindertubeParsing(MPScreen, ThumbsHelper):
                filmName = self['liste'].getCurrent()[0][0]
                self['name'].setText(filmName)
 
-class kindertubeEpisoden(MPScreen, ThumbsHelper):
+class kindertubeEpisoden(MPScreen):
 
        def __init__(self, session, genre, url, cover):
                self.genre = genre
                self.url = url
                self.cover = cover
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0": self.closeAll,
@@ -171,7 +167,7 @@ class kindertubeEpisoden(MPScreen, ThumbsHelper):
                self['title'] = Label("KinderTube")
                self['ContentTitle'] = Label("%s" % self.genre)
 
-               self.streamList = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -180,26 +176,25 @@ class kindertubeEpisoden(MPScreen, ThumbsHelper):
 
        def loadPage(self):
                CoverHelper(self['coverArt']).getCover(self.cover)
-               self.streamList.append((_('Please wait...'), None))
-               self.ml.setList(list(map(self._defaultlistcenter, self.streamList)))
+               self._items.append((_('Please wait...'), None))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                twAgentGetPage(self.url).addCallback(self.parseData).addErrback(self.dataError)
 
        def parseData(self, data):
-               self.streamList = []
+               self._items = []
                videos = re.findall('<a href="#" data-video="(.*?)" data-video-site="(.*?)" class=".*?"> <div class="thumb"><img src="(.*?)" class="img-thumbnail"></div><span class="title">(.*?)\n</span></a>', data)
                if videos:
                        # ('xuF0AGaUhb8', 'yt', 'images/xuF0AGaUhb8.jpg', 'Der Kuckuck und der Esel - Kinderlieder zum Mitsingen | Sing Kinderlieder')
                        for (id, type, image, title) in videos:
                                image = BASE_URL+'/'+image
-                               self.streamList.append((title, id, image, type))
-               if len(self.streamList) == 0:
-                       self.streamList.append((_('Parsing error!'), None, '', ''))
+                               self._items.append((title, id, image, type))
+               if len(self._items) == 0:
+                       self._items.append((_('Parsing error!'), None, '', ''))
                        self.keyLocked = True
                else:
                        self.keyLocked = False
-               self.ml.setList(list(map(self._defaultlistleft, self.streamList)))
+               self._setList('_defaultlistleft', True)
                self.ml.moveToIndex(0)
-               self.th_ThumbsQuery(self.streamList, 0, 1, 2, None, None, 1, 1)
                self.showInfos()
 
        def keyOK(self):
index 96a2f77..b4839ce 100644 (file)
@@ -59,14 +59,14 @@ class myspassGenreScreen(MPScreen):
                self['title'] = Label("MySpass.de")
                self['ContentTitle'] = Label("Sendungen A-Z:")
 
-               self.genreliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.genreliste = []
+               self._items = []
                self.count = 2
                url = "http://www.myspass.de/ganze-folgen/"
                twAgentGetPage(url, agent=agent).addCallback(self.loadPageData).addErrback(self.dataError)
@@ -80,14 +80,14 @@ class myspassGenreScreen(MPScreen):
                        for (link, image, name) in ganze:
                                link = "http://www.myspass.de" + link
                                image = "http://www.myspass.de" + image
-                               self.genreliste.append((decodeHtml(name), link, image))
+                               self._items.append((decodeHtml(name), link, image))
                if self.count == 0:
                        # remove duplicates
-                       self.genreliste = list(set(self.genreliste))
-                       self.genreliste.sort(key=lambda t : t[0].lower())
-                       if len(self.genreliste) == 0:
-                               self.genreliste.append((_("No shows found!"), None, None))
-                       self.ml.setList(list(map(self._defaultlistleft, self.genreliste)))
+                       self._items = list(set(self._items))
+                       self._items.sort(key=lambda t : t[0].lower())
+                       if len(self._items) == 0:
+                               self._items.append((_("No shows found!"), None, None))
+                       self._setList('_defaultlistleft', True)
                        self.keyLocked = False
                        self.showInfos()
 
@@ -187,7 +187,7 @@ class myspassFolgenListeScreen(MPScreen):
                self['title'] = Label("MySpass.de")
                self['ContentTitle'] = Label(self.season + " Episoden:")
 
-               self.folgenliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -207,8 +207,8 @@ class myspassFolgenListeScreen(MPScreen):
                                episode = re.search("(Folge.*?\|.*?)\|", str(meta), re.S).group(1).strip().replace(' | ', ' - ')
                                runtime = re.search(".*\|(.*?)$", str(meta), re.S).group(1).strip()
                                title = episode + " - " + decodeHtml(stripAllTags(str(title)))
-                               self.folgenliste.append((title, link, image, str(desc), runtime))
-                       self.ml.setList(list(map(self._defaultlistleft, self.folgenliste)))
+                               self._items.append((title, link, image, str(desc), runtime))
+                       self._setList('_defaultlistleft', True)
                        self.keyLocked = False
                        self.showInfos()
 
index d54f9ef..21db37b 100644 (file)
@@ -59,7 +59,7 @@ class netflixScreen(MPScreen):
 
                self['title'] = Label("Netflix")
 
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
                self.StartTimer = eTimer()
@@ -68,7 +68,7 @@ class netflixScreen(MPScreen):
                self.onLayoutFinish.append(self.start)
 
        def start(self):
-               self.filmliste.append(("",))
+               self._items.append(("",))
                if mp_globals.model in ["one", "two"]:
                        try:
                                self.player_org = config.vod.netflix.player.value
@@ -76,12 +76,12 @@ class netflixScreen(MPScreen):
                                pass
                        self.StartTimer_conn = self.StartTimer.timeout.connect(self.keyOK)
                        self.StartTimer.start(1000, False)
-                       self.filmliste.append((_("Please wait while Netflix is started..."),))
+                       self._items.append((_("Please wait while Netflix is started..."),))
                        self.keyLocked = False
                else:
-                       self.filmliste.append((_("This plugin is only available for Dreambox One and Two!"),))
+                       self._items.append((_("This plugin is only available for Dreambox One and Two!"),))
                        self['handlung'].setText('')
-               self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.ml.moveToIndex(0)
                self.ml.selectionEnabled(False)
 
index de15e9b..f3b2751 100644 (file)
@@ -56,7 +56,7 @@ class netzKinoGenreScreen(MPScreen):
                self['title'] = Label("Netzkino")
                self['ContentTitle'] = Label("Genre:")
 
-               self.genreliste = []
+               self._items = []
                self.suchString = ''
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
@@ -64,37 +64,37 @@ class netzKinoGenreScreen(MPScreen):
                self.onLayoutFinish.append(self.layoutFinished)
 
        def layoutFinished(self):
-               self.genreliste.append(('Suche', 'search'))
-               self.genreliste.append(('Neu bei Netzkino', 'neu'))
-               #self.genreliste.append(('Netzkino Exklusiv', 'netzkino-exklusiv'))
-               self.genreliste.append(('NetzkinoPlus Highlights', 'netzkinoplus-highlights'))
-               self.genreliste.append(('Unsere Empfehlungen der Woche', 'empfehlungen_woche'))
-               self.genreliste.append(('Highlights', 'highlights'))
-               self.genreliste.append(('Beste Bewertung', 'beste-bewertung'))
-               self.genreliste.append(('Meistgesehene Filme', 'meisgesehene_filme'))
-               self.genreliste.append(('Filme mit Auszeichnungen', 'filme_mit_auszeichnungen'))
-               self.genreliste.append(('Letzte Chance - Nur noch kurze Zeit verfügbar', 'letzte-chance'))
-               self.genreliste.append(('Top 20', 'top-20-frontpage'))
-               self.genreliste.append(('Beliebte Animes', 'beliebte-animes'))
-               #self.genreliste.append(('Kurzfilme', 'frontpage-kurzfilme'))
-               self.genreliste.append(('Starkino', 'starkino-frontpage'))
-               self.genreliste.append(('Themenkino', 'themenkino-frontpage'))
-               self.genreliste.append(('HD-Kino', 'hdkino'))
-               self.genreliste.append(('Animekino', 'animekino'))
-               self.genreliste.append(('Actionkino', 'actionkino'))
-               self.genreliste.append(('Dramakino', 'dramakino'))
-               self.genreliste.append(('Thrillerkino', 'thrillerkino'))
-               self.genreliste.append(('Liebesfilmkino', 'liebesfilmkino'))
-               self.genreliste.append(('Scifikino', 'scifikino'))
-               self.genreliste.append(('Arthousekino', 'arthousekino'))
-               self.genreliste.append(('Queerkino', 'queerkino'))
-               self.genreliste.append(('Spaßkino', 'spasskino'))
-               self.genreliste.append(('Asiakino', 'asiakino'))
-               self.genreliste.append(('Horrorkino', 'horrorkino'))
-               self.genreliste.append(('Kinderkino', 'kinderkino'))
-               self.genreliste.append(('Prickelkino', 'prickelkino'))
-               self.genreliste.append(('Kino ab 18', 'kinoab18'))
-               self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+               self._items.append(('Suche', 'search'))
+               self._items.append(('Neu bei Netzkino', 'neu'))
+               #self._items.append(('Netzkino Exklusiv', 'netzkino-exklusiv'))
+               self._items.append(('NetzkinoPlus Highlights', 'netzkinoplus-highlights'))
+               self._items.append(('Unsere Empfehlungen der Woche', 'empfehlungen_woche'))
+               self._items.append(('Highlights', 'highlights'))
+               self._items.append(('Beste Bewertung', 'beste-bewertung'))
+               self._items.append(('Meistgesehene Filme', 'meisgesehene_filme'))
+               self._items.append(('Filme mit Auszeichnungen', 'filme_mit_auszeichnungen'))
+               self._items.append(('Letzte Chance - Nur noch kurze Zeit verfügbar', 'letzte-chance'))
+               self._items.append(('Top 20', 'top-20-frontpage'))
+               self._items.append(('Beliebte Animes', 'beliebte-animes'))
+               #self._items.append(('Kurzfilme', 'frontpage-kurzfilme'))
+               self._items.append(('Starkino', 'starkino-frontpage'))
+               self._items.append(('Themenkino', 'themenkino-frontpage'))
+               self._items.append(('HD-Kino', 'hdkino'))
+               self._items.append(('Animekino', 'animekino'))
+               self._items.append(('Actionkino', 'actionkino'))
+               self._items.append(('Dramakino', 'dramakino'))
+               self._items.append(('Thrillerkino', 'thrillerkino'))
+               self._items.append(('Liebesfilmkino', 'liebesfilmkino'))
+               self._items.append(('Scifikino', 'scifikino'))
+               self._items.append(('Arthousekino', 'arthousekino'))
+               self._items.append(('Queerkino', 'queerkino'))
+               self._items.append(('Spaßkino', 'spasskino'))
+               self._items.append(('Asiakino', 'asiakino'))
+               self._items.append(('Horrorkino', 'horrorkino'))
+               self._items.append(('Kinderkino', 'kinderkino'))
+               self._items.append(('Prickelkino', 'prickelkino'))
+               self._items.append(('Kino ab 18', 'kinoab18'))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
 
        def keyOK(self):
                Name = self['liste'].getCurrent()[0][0]
@@ -111,19 +111,17 @@ class netzKinoGenreScreen(MPScreen):
                        Link = urllib.parse.quote(self.suchString).replace(' ', '%20')
                        self.session.open(netzKinoFilmeScreen, Link, Name)
 
-class netzKinoFilmeScreen(MPScreen, ThumbsHelper):
+class netzKinoFilmeScreen(MPScreen):
 
        def __init__(self, session, genreID, Name):
                self.genreID = genreID
                self.Name = Name
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0"             : self.closeAll,
                        "ok" : self.keyOK,
                        "cancel" : self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -136,7 +134,7 @@ class netzKinoFilmeScreen(MPScreen, ThumbsHelper):
 
                self.keyLocked = True
 
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -177,17 +175,16 @@ class netzKinoFilmeScreen(MPScreen, ThumbsHelper):
                                        Stars = "---"
                                Descr = "Jahr: "+Jahr+"\nIMDb-Rating: "+IMDb+"\nFSK: "+FSK+"\nRegie: "+Regie+"\nStars: "+Stars+"\n\n"+Inhalt
                                Url = "http://pmd.netzkino-seite.netzkino.de/%s.mp4" % Stream
-                               self.filmliste.append((Title, Image, Url, Descr))
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_("No videos found!"), default_cover, None, ""))
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                               self._items.append((Title, Url, Image, Descr))
+               if len(self._items) == 0:
+                       self._items.append((_("No videos found!"), None, default_cover, ""))
+               self._setList('_defaultlistleft', True)
                self.keyLocked = False
-               self.th_ThumbsQuery(self.filmliste, 0, 2, 1, None, None, 1, 1)
                self.showInfos()
 
        def showInfos(self):
                Title = self['liste'].getCurrent()[0][0]
-               Image = self['liste'].getCurrent()[0][1]
+               Image = self['liste'].getCurrent()[0][2]
                Descr = self['liste'].getCurrent()[0][3]
                self['name'].setText(Title)
                self['handlung'].setText(Descr)
@@ -196,8 +193,8 @@ class netzKinoFilmeScreen(MPScreen, ThumbsHelper):
        def keyOK(self):
                if self.keyLocked:
                        return
-               Link = self['liste'].getCurrent()[0][2]
+               Link = self['liste'].getCurrent()[0][1]
                Title = self['liste'].getCurrent()[0][0]
-               Image = self['liste'].getCurrent()[0][1]
+               Image = self['liste'].getCurrent()[0][2]
                if Link:
                        self.session.open(SimplePlayer, [(Title, Link, Image)], showPlaylist=False, ltype='netzkino', cover=True)
\ No newline at end of file
index a5b25fb..e9ece8a 100644 (file)
@@ -57,7 +57,7 @@ class ORFGenreScreen(MPScreen):
                self['title'] = Label("ORF TVthek")
                self['ContentTitle'] = Label(_("Genre:"))
 
-               self.genreliste = []
+               self._items = []
                self.keyLocked = True
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
@@ -65,24 +65,24 @@ class ORFGenreScreen(MPScreen):
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.genreliste.append(('Sendungen A-Z', 'https://tvthek.orf.at/profiles'))
-               self.genreliste.append(('Film & Serie', 'https://tvthek.orf.at/profiles/genre/Film-Serie/2703833'))
-               self.genreliste.append(('Doku & Reportage', 'https://tvthek.orf.at/profiles/genre/Doku-Reportage/1173'))
-               self.genreliste.append(('Information', 'https://tvthek.orf.at/profiles/genre/Information/2703825'))
-               self.genreliste.append(('Kultur', 'https://tvthek.orf.at/profiles/genre/Kultur/1175'))
-               self.genreliste.append(('Religion', 'https://tvthek.orf.at/profiles/genre/Religion/1655'))
-               self.genreliste.append(('Regionales', 'https://tvthek.orf.at/profiles/genre/Regionales/3309573'))
-               self.genreliste.append(('Wissenschaft', 'https://tvthek.orf.at/profiles/genre/Wissenschaft/13776490'))
-               self.genreliste.append(('Wetter', 'https://tvthek.orf.at/profiles/genre/Wetter/2703827'))
-               self.genreliste.append(('Volksgruppen', 'https://tvthek.orf.at/profiles/genre/Volksgruppen/70443'))
-               self.genreliste.append(('Magazin', 'https://tvthek.orf.at/profiles/genre/Magazin/1176'))
-               self.genreliste.append(('Unterhaltung', 'https://tvthek.orf.at/profiles/genre/Unterhaltung/13776489'))
-               self.genreliste.append(('Talk', 'https://tvthek.orf.at/profiles/genre/Talk/13776488'))
-               self.genreliste.append(('Sport', 'https://tvthek.orf.at/profiles/genre/Sport/1178'))
-               self.genreliste.append(('Kinder', 'https://tvthek.orf.at/profiles/genre/Kinder/2703801'))
-               self.genreliste.append(('Comedy & Satire', 'https://tvthek.orf.at/profiles/genre/Comedy-Satire/2703835'))
-               self.genreliste.append(('Diskussion', 'https://tvthek.orf.at/profiles/genre/Diskussion/2703831'))
-               self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+               self._items.append(('Sendungen A-Z', 'https://tvthek.orf.at/profiles'))
+               self._items.append(('Film & Serie', 'https://tvthek.orf.at/profiles/genre/Film-Serie/2703833'))
+               self._items.append(('Doku & Reportage', 'https://tvthek.orf.at/profiles/genre/Doku-Reportage/1173'))
+               self._items.append(('Information', 'https://tvthek.orf.at/profiles/genre/Information/2703825'))
+               self._items.append(('Kultur', 'https://tvthek.orf.at/profiles/genre/Kultur/1175'))
+               self._items.append(('Religion', 'https://tvthek.orf.at/profiles/genre/Religion/1655'))
+               self._items.append(('Regionales', 'https://tvthek.orf.at/profiles/genre/Regionales/3309573'))
+               self._items.append(('Wissenschaft', 'https://tvthek.orf.at/profiles/genre/Wissenschaft/13776490'))
+               self._items.append(('Wetter', 'https://tvthek.orf.at/profiles/genre/Wetter/2703827'))
+               self._items.append(('Volksgruppen', 'https://tvthek.orf.at/profiles/genre/Volksgruppen/70443'))
+               self._items.append(('Magazin', 'https://tvthek.orf.at/profiles/genre/Magazin/1176'))
+               self._items.append(('Unterhaltung', 'https://tvthek.orf.at/profiles/genre/Unterhaltung/13776489'))
+               self._items.append(('Talk', 'https://tvthek.orf.at/profiles/genre/Talk/13776488'))
+               self._items.append(('Sport', 'https://tvthek.orf.at/profiles/genre/Sport/1178'))
+               self._items.append(('Kinder', 'https://tvthek.orf.at/profiles/genre/Kinder/2703801'))
+               self._items.append(('Comedy & Satire', 'https://tvthek.orf.at/profiles/genre/Comedy-Satire/2703835'))
+               self._items.append(('Diskussion', 'https://tvthek.orf.at/profiles/genre/Diskussion/2703831'))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.keyLocked = False
 
        def keyOK(self):
@@ -113,7 +113,7 @@ class ORFSubGenreScreen(MPScreen):
                self['ContentTitle'] = Label(_("Genre:") + " %s" % self.Name)
 
 
-               self.genreliste = []
+               self._items = []
                self.keyLocked = True
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
@@ -128,14 +128,14 @@ class ORFSubGenreScreen(MPScreen):
        def loadPageData(self, data):
                sendungen = re.findall('<article.*?title="(.*?)".*?href="(.*?)".*?img\sdata-src="(.*?)"', data, re.S)
                if sendungen:
-                       self.genreliste = []
+                       self._items = []
                        for (title, url, image) in sendungen:
                                if not "AD | " in title and not "(ÖGS)" in title:
-                                       self.genreliste.append((decodeHtml(title), url, title, image))
-                       self.genreliste.sort(key=lambda t : t[0].lower())
-               if len(self.genreliste) == 0:
-                       self.genreliste.append(('Keine Sendungen gefunden!', None, None, None))
-               self.ml.setList(list(map(self._defaultlistleft, self.genreliste)))
+                                       self._items.append((decodeHtml(title), url, title, image))
+                       self._items.sort(key=lambda t : t[0].lower())
+               if len(self._items) == 0:
+                       self._items.append(('Keine Sendungen gefunden!', None, None, None))
+               self._setList('_defaultlistleft', True)
                self.keyLocked = False
                self.showInfos()
 
@@ -171,7 +171,7 @@ class ORFFilmeListeScreen(MPScreen):
                self['ContentTitle'] = Label(_("Genre:") + " %s" % self.Name)
 
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -187,18 +187,18 @@ class ORFFilmeListeScreen(MPScreen):
                        folgen = re.findall('<article.*?href="(.*?)".*?class="time">(.*?)</span.*?class="date-as-string">(.*?)</p>', data, re.S)
                        if folgen:
                                for (url, time, date) in folgen:
-                                       self.filmliste.append((decodeHtml(date + ', ' + time), url))
+                                       self._items.append((decodeHtml(date + ', ' + time), url))
                else:
                        folgen = re.findall('class="date">(.*?)</span.*?class="time">(.*?)</span', data, re.S)
                        if folgen:
                                for (date, time) in folgen:
-                                       self.filmliste.append((decodeHtml(date + ', ' + time), self.Link))
+                                       self._items.append((decodeHtml(date + ', ' + time), self.Link))
                                more = re.findall('class="related-videos">.*?&quot;(.*?)&quot;', data, re.S)
                                self.Link = "https://tvthek.orf.at" + more[0].replace('&amp;', '&').replace('\/', '/')
                                self.loadPage()
                        else:
-                               self.filmliste.append(('Momentan ist keine Sendung in der TVthek vorhanden.', None))
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                               self._items.append(('Momentan ist keine Sendung in der TVthek vorhanden.', None))
+               self._setList('_defaultlistleft', True)
                self.keyLocked = False
                self['name'].setText('')
 
@@ -230,7 +230,7 @@ class ORFStreamListeScreen(MPScreen):
 
 
                self.keyLocked = True
-               self.streamliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -244,7 +244,7 @@ class ORFStreamListeScreen(MPScreen):
                parse = re.search('jsb_VideoPlaylist" data-jsb="(.*?)"></div>', data, re.S)
                folgen = re.findall('episode_id.*?title":"(.*?)","description":(.*?),".*?preview_image_url":"(.*?)","sources":(\[.*?\])', parse.group(1).replace('&quot;', '"').replace('\/', '/'), re.S)
                if folgen:
-                       self.streamliste = []
+                       self._items = []
                        for (title, desc, image, urls) in folgen[:-1]:
                                url = re.search('"quality":"Q8C","quality_string":"Sehr hoch(?: \(HD\)|)","src":"(http[s]?://apasfiis.sf.apa.at/ipad/.*?)"', urls, re.S)
                                if not url:
@@ -254,8 +254,8 @@ class ORFStreamListeScreen(MPScreen):
                                        desc = ""
                                else:
                                        desc = desc.strip('"')
-                               self.streamliste.append((decodeHtml(title), url.group(1).replace('\/', '/'), image.replace('\/', '/'), desc))
-                       self.ml.setList(list(map(self._defaultlistleft, self.streamliste)))
+                               self._items.append((decodeHtml(title), url.group(1).replace('\/', '/'), image.replace('\/', '/'), desc))
+                       self._setList('_defaultlistleft', True)
                        self.keyLocked = False
                        self.showInfos()
 
@@ -264,7 +264,7 @@ class ORFStreamListeScreen(MPScreen):
                        return
                title = self['liste'].getCurrent()[0][0]
                url = self['liste'].getCurrent()[0][1]
-               self.session.open(SimplePlayer, self.streamliste, playIdx=self['liste'].getSelectedIndex(), playAll=True, showPlaylist=False, ltype='orf')
+               self.session.open(SimplePlayer, self._items, playIdx=self['liste'].getSelectedIndex(), playAll=True, showPlaylist=False, ltype='orf')
 
        def showInfos(self):
                streamPic = self['liste'].getCurrent()[0][2]
index 1b9907a..da98586 100644 (file)
@@ -57,7 +57,7 @@ class popcorntimesGenreScreen(MPScreen):
                self['title'] = Label("Popcorntimes")
                self['ContentTitle'] = Label("Genre:")
 
-               self.genreliste = []
+               self._items = []
                self.suchString = ''
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
@@ -65,71 +65,69 @@ class popcorntimesGenreScreen(MPScreen):
                self.onLayoutFinish.append(self.layoutFinished)
 
        def layoutFinished(self):
-               self.genreliste.append(('Neu im Programm', '/de/neu'))
-               self.genreliste.append(('Weitere Neuerscheinungen', '/de/neu'))
-               self.genreliste.append(('Top-Filme', '/de/top-filme'))
-               self.genreliste.append(('Weitere Top-Filme', '/de/top-filme'))
-               self.genreliste.append(('Blast from the Past : Mehr als hundert Jahre alt', '/de/neu'))
-               self.genreliste.append(('Blast from the Past : 1910 - 1940', '/de/neu'))
-               self.genreliste.append(('Blast from the Past : 1940 - 1960', '/de/neu'))
-               self.genreliste.append(('Laurel & Hardy Collection', '/de'))
-               self.genreliste.append(('Buster Keaton Collection', '/de'))
-               self.genreliste.append(('John Wayne Collection', '/de'))
-               self.genreliste.append(('Superman 40s Collection', '/de'))
-               self.genreliste.append(('Abenteuer', '/genre/abenteuer'))
-               self.genreliste.append(('Action', '/genre/action'))
-               self.genreliste.append(('Animation', '/genre/animation'))
-               self.genreliste.append(('Bollywood', '/genre/bollywood'))
-               self.genreliste.append(('Comedy', '/genre/comedy'))
-               self.genreliste.append(('Drama', '/genre/drama'))
-               self.genreliste.append(('Familie', '/genre/familie'))
-               self.genreliste.append(('Fantasy', '/genre/fantasy'))
-               self.genreliste.append(('Geschichte', '/genre/geschichte'))
-               self.genreliste.append(('Horror', '/genre/horror'))
-               self.genreliste.append(('Klassiker', '/genre/klassiker'))
-               self.genreliste.append(('Krieg', '/genre/krieg'))
-               self.genreliste.append(('Krimi', '/genre/krimi'))
-               self.genreliste.append(('Kurzfilm', '/genre/kurzfilm'))
-               self.genreliste.append(('Musik & Musicals', '/genre/musik'))
-               self.genreliste.append(('Mystery', '/genre/mystery'))
-               self.genreliste.append(('Romantik', '/genre/romantik'))
-               self.genreliste.append(('Science Fiction', '/genre/sci-fi'))
-               self.genreliste.append(('Sport', '/genre/sport'))
-               self.genreliste.append(('Stummfilm', '/genre/stummfilm'))
-               self.genreliste.append(('Thriller', '/genre/thriller'))
-               self.genreliste.append(('TV-Film', '/genre/tv-film'))
-               self.genreliste.append(('Western', '/genre/western'))
-               self.genreliste.append(('Gesundheit', '/genre/gesundheit'))
-               self.genreliste.append(('Küche und Essen', '/genre/essen'))
-               self.genreliste.append(('Reisen', '/genre/reisen'))
-               self.genreliste.append(('Technik und Wissenschaft', '/genre/technik-wissenschaft'))
-               self.genreliste.append(('Dokumentation', '/genre/doku'))
-               self.genreliste.append(('Geschichts-Dokumentationen', '/genre/geschichts-dokus'))
-               self.genreliste.append(('Kriegs-Dokumentationen', '/genre/kriegs-dokus'))
-               self.genreliste.append(('Musik-Dokumenationen', '/genre/musik-dokus'))
-               self.genreliste.append(('Natur-Dokumentation', '/genre/natur-doku'))
-               self.genreliste.append(('Sport-Dokumentationen', '/genre/sport-dokus'))
-               self.genreliste.append(('Tier-Dokumentationen', '/genre/tier-doku'))
-               self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+               self._items.append(('Neu im Programm', '/de/neu'))
+               self._items.append(('Weitere Neuerscheinungen', '/de/neu'))
+               self._items.append(('Top-Filme', '/de/top-filme'))
+               self._items.append(('Weitere Top-Filme', '/de/top-filme'))
+               self._items.append(('Blast from the Past : Mehr als hundert Jahre alt', '/de/neu'))
+               self._items.append(('Blast from the Past : 1910 - 1940', '/de/neu'))
+               self._items.append(('Blast from the Past : 1940 - 1960', '/de/neu'))
+               self._items.append(('Laurel & Hardy Collection', '/de'))
+               self._items.append(('Buster Keaton Collection', '/de'))
+               self._items.append(('John Wayne Collection', '/de'))
+               self._items.append(('Superman 40s Collection', '/de'))
+               self._items.append(('Abenteuer', '/genre/abenteuer'))
+               self._items.append(('Action', '/genre/action'))
+               self._items.append(('Animation', '/genre/animation'))
+               self._items.append(('Bollywood', '/genre/bollywood'))
+               self._items.append(('Comedy', '/genre/comedy'))
+               self._items.append(('Drama', '/genre/drama'))
+               self._items.append(('Familie', '/genre/familie'))
+               self._items.append(('Fantasy', '/genre/fantasy'))
+               self._items.append(('Geschichte', '/genre/geschichte'))
+               self._items.append(('Horror', '/genre/horror'))
+               self._items.append(('Klassiker', '/genre/klassiker'))
+               self._items.append(('Krieg', '/genre/krieg'))
+               self._items.append(('Krimi', '/genre/krimi'))
+               self._items.append(('Kurzfilm', '/genre/kurzfilm'))
+               self._items.append(('Musik & Musicals', '/genre/musik'))
+               self._items.append(('Mystery', '/genre/mystery'))
+               self._items.append(('Romantik', '/genre/romantik'))
+               self._items.append(('Science Fiction', '/genre/sci-fi'))
+               self._items.append(('Sport', '/genre/sport'))
+               self._items.append(('Stummfilm', '/genre/stummfilm'))
+               self._items.append(('Thriller', '/genre/thriller'))
+               self._items.append(('TV-Film', '/genre/tv-film'))
+               self._items.append(('Western', '/genre/western'))
+               self._items.append(('Gesundheit', '/genre/gesundheit'))
+               self._items.append(('Küche und Essen', '/genre/essen'))
+               self._items.append(('Reisen', '/genre/reisen'))
+               self._items.append(('Technik und Wissenschaft', '/genre/technik-wissenschaft'))
+               self._items.append(('Dokumentation', '/genre/doku'))
+               self._items.append(('Geschichts-Dokumentationen', '/genre/geschichts-dokus'))
+               self._items.append(('Kriegs-Dokumentationen', '/genre/kriegs-dokus'))
+               self._items.append(('Musik-Dokumenationen', '/genre/musik-dokus'))
+               self._items.append(('Natur-Dokumentation', '/genre/natur-doku'))
+               self._items.append(('Sport-Dokumentationen', '/genre/sport-dokus'))
+               self._items.append(('Tier-Dokumentationen', '/genre/tier-doku'))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
 
        def keyOK(self):
                Name = self['liste'].getCurrent()[0][0]
                Url = self['liste'].getCurrent()[0][1]
                self.session.open(popcorntimesFilmeScreen, Url, Name)
 
-class popcorntimesFilmeScreen(MPScreen, ThumbsHelper):
+class popcorntimesFilmeScreen(MPScreen):
 
        def __init__(self, session, Url, Name):
                self.Link = Url
                self.Name = Name
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0"             : self.closeAll,
                        "ok" : self.keyOK,
                        "cancel" : self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -141,7 +139,7 @@ class popcorntimesFilmeScreen(MPScreen, ThumbsHelper):
 
                self.keyLocked = True
 
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -165,7 +163,7 @@ class popcorntimesFilmeScreen(MPScreen, ThumbsHelper):
                                                image = 'https:' + image
                                        meta = stripAllTags(meta)
                                        meta = re.sub(r"\s+", " ", meta).strip()
-                                       self.filmliste.append((decodeHtml(title), image, url, desc, meta))
+                                       self._items.append((decodeHtml(title), url, image, desc, meta))
                        else:
                                vids = re.findall('class="pt-movie-tile.*?href="(.*?)".*?<img.*?data-src="(.*?)"\salt="(.*?)".*?.*?pt-video-time">(.*?)</p>', data, re.S)
                                if vids:
@@ -175,7 +173,7 @@ class popcorntimesFilmeScreen(MPScreen, ThumbsHelper):
                                                        image = 'https:' + image
                                                meta = stripAllTags(meta)
                                                meta = re.sub(r"\s+", " ", meta).strip()
-                                               self.filmliste.append((decodeHtml(title), image, url, '', meta))
+                                               self._items.append((decodeHtml(title), url, image, '', meta))
                else:
                        check = re.search('class="pt-hero(.*?)class="pt-section', data, re.S)
                        if check:
@@ -188,17 +186,16 @@ class popcorntimesFilmeScreen(MPScreen, ThumbsHelper):
                                                        image = 'https:' + image
                                                meta = stripAllTags(meta)
                                                meta = re.sub(r"\s+", " ", meta).strip()
-                                               self.filmliste.append((decodeHtml(title), image, url, desc, meta))
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_("No videos found!"), default_cover, None, '', ''))
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                                               self._items.append((decodeHtml(title), url, image, desc, meta))
+               if len(self._items) == 0:
+                       self._items.append((_("No videos found!"), None, default_cover, '', ''))
+               self._setList('_defaultlistleft', True)
                self.keyLocked = False
-               self.th_ThumbsQuery(self.filmliste, 0, 2, 1, None, None, 1, 1)
                self.showInfos()
 
        def showInfos(self):
                Title = self['liste'].getCurrent()[0][0]
-               Image = self['liste'].getCurrent()[0][1]
+               Image = self['liste'].getCurrent()[0][2]
                Descr = self['liste'].getCurrent()[0][3]
                Meta = self['liste'].getCurrent()[0][4]
                self['name'].setText(Title)
@@ -208,14 +205,14 @@ class popcorntimesFilmeScreen(MPScreen, ThumbsHelper):
        def keyOK(self):
                if self.keyLocked:
                        return
-               Link = self['liste'].getCurrent()[0][2]
+               Link = self['liste'].getCurrent()[0][1]
                if Link:
                        twAgentGetPage(Link, agent=agent).addCallback(self.getStream).addErrback(self.dataError)
 
        def getStream(self, data):
                Title = self['liste'].getCurrent()[0][0]
-               Image = self['liste'].getCurrent()[0][1]
-               Link = self['liste'].getCurrent()[0][2]
+               Image = self['liste'].getCurrent()[0][2]
+               Link = self['liste'].getCurrent()[0][1]
                stream = re.findall('var PCTMLOC = "(.*?)";', data, re.S)
                if stream:
                        o = stream[0]
index 8dbb55f..0597781 100644 (file)
@@ -59,7 +59,7 @@ class AmazonScreen(MPScreen):
 
                self['title'] = Label("Prime Video")
 
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
                self.StartTimer = eTimer()
@@ -68,7 +68,7 @@ class AmazonScreen(MPScreen):
                self.onLayoutFinish.append(self.start)
 
        def start(self):
-               self.filmliste.append(("",))
+               self._items.append(("",))
                if mp_globals.model in ["one", "two"]:
                        try:
                                self.player_org = config.vod.dazn.player.value
@@ -76,12 +76,12 @@ class AmazonScreen(MPScreen):
                                pass
                        self.StartTimer_conn = self.StartTimer.timeout.connect(self.keyOK)
                        self.StartTimer.start(1000, False)
-                       self.filmliste.append((_("Please wait while Prime Video is started..."),))
+                       self._items.append((_("Please wait while Prime Video is started..."),))
                        self.keyLocked = False
                else:
-                       self.filmliste.append((_("This plugin is only available for Dreambox One and Two!"),))
+                       self._items.append((_("This plugin is only available for Dreambox One and Two!"),))
                        self['handlung'].setText('')
-               self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.ml.moveToIndex(0)
                self.ml.selectionEnabled(False)
 
index c26cc8c..307b670 100644 (file)
@@ -62,7 +62,7 @@ class sTVGenreScreen(MPScreen):
                self['title'] = Label("ServusTV")
                self['ContentTitle'] = Label("Genre:")
 
-               self.genreliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -72,7 +72,7 @@ class sTVGenreScreen(MPScreen):
                        self.onLayoutFinish.append(self.layoutFinished)
 
        def loadPage(self):
-               self.genreliste = []
+               self._items = []
                self.keyLocked = True
                twAgentGetPage(self.url, agent=stvAgent).addCallback(self.loadPageData).addErrback(self.dataError)
 
@@ -82,8 +82,8 @@ class sTVGenreScreen(MPScreen):
                        for (url, image, title) in shows:
                                image = image + "?resize=600,413&crop_strategy=smart"
                                url = url.replace(baseurl, '')
-                               self.genreliste.append((decodeHtml(title), url, image))
-                       self.ml.setList(list(map(self._defaultlistleft, self.genreliste)))
+                               self._items.append((decodeHtml(title), url, image))
+                       self._setList('_defaultlistleft', True)
                        self.keyLocked = False
                        self.showInfos()
 
@@ -92,15 +92,15 @@ class sTVGenreScreen(MPScreen):
                CoverHelper(self['coverArt']).getCover(Image)
 
        def layoutFinished(self):
-               self.genreliste.append(("Sendungen A-Z", "/sendungen-a-z/", default_cover))
-               self.genreliste.append(("Aktuelles", "/rubrik/aktuelles/", default_cover))
-               self.genreliste.append(("Kultur", "/rubrik/kultur/", default_cover))
-               self.genreliste.append(("Natur", "/rubrik/natur/", default_cover))
-               self.genreliste.append(("Sport", "/rubrik/sport/", default_cover))
-               self.genreliste.append(("Unterhaltung", "/rubrik/unterhaltung/", default_cover))
-               self.genreliste.append(("Volkskultur", "/rubrik/volkskultur/", default_cover))
-               self.genreliste.append(("Wissen", "/rubrik/wissen/", default_cover))
-               self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+               self._items.append(("Sendungen A-Z", "/sendungen-a-z/", default_cover))
+               self._items.append(("Aktuelles", "/rubrik/aktuelles/", default_cover))
+               self._items.append(("Kultur", "/rubrik/kultur/", default_cover))
+               self._items.append(("Natur", "/rubrik/natur/", default_cover))
+               self._items.append(("Sport", "/rubrik/sport/", default_cover))
+               self._items.append(("Unterhaltung", "/rubrik/unterhaltung/", default_cover))
+               self._items.append(("Volkskultur", "/rubrik/volkskultur/", default_cover))
+               self._items.append(("Wissen", "/rubrik/wissen/", default_cover))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
 
        def keyOK(self):
                name = self['liste'].getCurrent()[0][0]
@@ -139,14 +139,14 @@ class sTVids(MPScreen):
                self.page = 1
                self.lastpage = 1
 
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.filmliste = []
+               self._items = []
                self.keyLocked = True
                url = self.Link + "page/" + str(self.page) + "/?video_type=full-episodes"
                twAgentGetPage(url, agent=stvAgent).addCallback(self.loadPageData).addErrback(self.dataError)
@@ -160,8 +160,8 @@ class sTVids(MPScreen):
                                id = id.upper()
                                image = image + "?resize=600,413&crop_strategy=smart"
                                title = title.strip() + " - " + subtitle.strip()
-                               self.filmliste.append((decodeHtml(title), id, image, url, stripAllTags(date).strip()))
-                       self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                               self._items.append((decodeHtml(title), id, image, url, stripAllTags(date).strip()))
+                       self._setList('_defaultlistleft', True)
                        self.ml.moveToIndex(0)
                        self.keyLocked = False
                        self.showInfos()
index 0594657..49bf78f 100644 (file)
@@ -75,7 +75,7 @@ class SouthparkGenreScreen(MPScreen):
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.filmliste = []
+               self._items = []
                url = "http://www.southpark.de/alle-episoden"
                twAgentGetPage(url).addCallback(self.parseData).addErrback(self.dataError)
 
@@ -85,8 +85,8 @@ class SouthparkGenreScreen(MPScreen):
                if raw:
                        for (ID, Title) in raw:
                                Url = "http://www.southpark.de" + jsonurl[0] + "/30/1/json/!airdate/" + ID
-                               self.filmliste.append((Title, Url))
-                       self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+                               self._items.append((Title, Url))
+                       self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                        self.keyLocked = False
 
        def keyOK(self):
@@ -123,19 +123,17 @@ class SouthparkGenreScreen(MPScreen):
                self['F3'].setText(self.quality)
                self.loadPage()
 
-class SouthparkListScreen(MPScreen, ThumbsHelper):
+class SouthparkListScreen(MPScreen):
 
        def __init__(self, session, Link, Name):
                self.Link = Link
                self.Name = Name
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0"             : self.closeAll,
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -153,7 +151,7 @@ class SouthparkListScreen(MPScreen, ThumbsHelper):
 
        def loadPage(self):
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                url = self.Link
                twAgentGetPage(url).addCallback(self.parseData).addErrback(self.dataError)
 
@@ -171,13 +169,12 @@ class SouthparkListScreen(MPScreen, ThumbsHelper):
                                except:
                                        pass
                                title = "S" + episode[:2] + "E" + episode[2:] + " - " + title
-                               self.filmliste.append((title, itemid, image, description, episode, avail))
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_("No episodes found!"), None, '', '', '', ''))
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                               self._items.append((title, itemid, image, description, episode, avail))
+               if len(self._items) == 0:
+                       self._items.append((_("No episodes found!"), None, '', '', '', ''))
+               self._setList('_defaultlistleft', True)
                self.ml.moveToIndex(0)
                self.keyLocked = False
-               self.th_ThumbsQuery(self.filmliste, 0, 1, 2, None, None, 1, 1, mode=1)
                self.showInfos()
 
        def showInfos(self):
@@ -236,7 +233,7 @@ class SouthparkAktScreen(MPScreen):
 
        def loadPage(self):
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                url = "http://www.southpark.de/feeds/video-player/mrss/mgid:arc:episode:southpark.de:" + self.Link
                twAgentGetPage(url).addCallback(self.getxmls).addErrback(self.dataError)
 
@@ -257,8 +254,8 @@ class SouthparkAktScreen(MPScreen):
                                                quality = "hls"
                                        url = "http://media-utils.mtvnservices.com/services/MediaGenerator/mgid:arc:video:southparkstudios.com:%s?context=Array&format=xml&acceptMethods=%s%s" % (id, quality, self.lang)
                                        Titel = self.Name + " - Teil " + str(x)
-                                       self.filmliste.append((Titel, url, self.Link))
-                       self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                                       self._items.append((Titel, url, self.Link))
+                       self._setList('_defaultlistleft', True)
                        self.ml.moveToIndex(0)
                self.keyLocked = False
                self.showInfos()
@@ -284,7 +281,7 @@ class SouthparkAktScreen(MPScreen):
                if http_data:
                        idx = self['liste'].getSelectedIndex()
                        mp_globals.player_agent = agent
-                       self.session.open(SouthparkPlayer, self.filmliste, int(idx), True, False)
+                       self.session.open(SouthparkPlayer, self._items, int(idx), True, False)
                else:
                        message = self.session.open(MessageBoxExt, _("Sorry, this video is not found or no longer available due to date or rights restrictions."), MessageBoxExt.TYPE_INFO, timeout=5)
                self.keyLocked = False
index 22c72a2..a0e0ed3 100644 (file)
@@ -58,7 +58,7 @@ class SRGGenreScreen(MPScreen):
                self['title'] = Label("SRG Play Channels")
                self['ContentTitle'] = Label("Auswahl des Senders")
 
-               self.genreliste = []
+               self._items = []
                self.keyLocked = True
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
@@ -66,12 +66,12 @@ class SRGGenreScreen(MPScreen):
                self.onLayoutFinish.append(self.loadPage)
 
        def loadPage(self):
-               self.genreliste = []
-               self.genreliste.append(('SRF', ''))
-               self.genreliste.append(('RTS', ''))
-               self.genreliste.append(('RTR', ''))
-               self.genreliste.append(('RSI', ''))
-               self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+               self._items = []
+               self._items.append(('SRF', ''))
+               self._items.append(('RTS', ''))
+               self._items.append(('RTR', ''))
+               self._items.append(('RSI', ''))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.keyLocked = False
 
        def keyOK(self):
@@ -80,18 +80,16 @@ class SRGGenreScreen(MPScreen):
                channel = self['liste'].getCurrent()[0][0]
                self.session.open(SRGListScreen, channel)
 
-class SRGListScreen(MPScreen, ThumbsHelper):
+class SRGListScreen(MPScreen):
 
        def __init__(self, session, channel):
                self.channel = channel
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0"             : self.closeAll,
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -101,7 +99,7 @@ class SRGListScreen(MPScreen, ThumbsHelper):
                self['title'] = Label("Play %s" % self.channel)
                self['ContentTitle'] = Label("Auswahl der Sendung")
 
-               self.genreliste = []
+               self._items = []
                self.keyLocked = True
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
@@ -114,7 +112,7 @@ class SRGListScreen(MPScreen, ThumbsHelper):
                twAgentGetPage(url, gzip_decoding=True).addCallback(self.loadPageData).addErrback(self.dataError)
 
        def loadPageData(self, data):
-               self.genreliste = []
+               self._items = []
                listJson = json.loads(data)
                try:
                        for node in listJson["AssetGroups"]["Show"]:
@@ -129,13 +127,12 @@ class SRGListScreen(MPScreen, ThumbsHelper):
                                        handlung = node["description"].encode('utf-8')
                                except:
                                        handlung = ""
-                               self.genreliste.append((decodeHtml(serie), id, image, handlung))
+                               self._items.append((decodeHtml(serie), id, image, handlung))
                except:
                        pass
-               self.genreliste.sort(key=lambda t : t[0].lower())
-               self.ml.setList(list(map(self._defaultlistleft, self.genreliste)))
+               self._items.sort(key=lambda t : t[0].lower())
+               self._setList('_defaultlistleft', True)
                self.keyLocked = False
-               self.th_ThumbsQuery(self.genreliste, 0, 1, 2, None, None, 1, 1, mode=1)
                self.showInfos()
 
        def showInfos(self):
@@ -153,20 +150,18 @@ class SRGListScreen(MPScreen, ThumbsHelper):
                streamGenreLink = self['liste'].getCurrent()[0][1]
                self.session.open(SRGFilmeListeScreen, streamGenreLink, serie, self.channel)
 
-class SRGFilmeListeScreen(MPScreen, ThumbsHelper):
+class SRGFilmeListeScreen(MPScreen):
 
        def __init__(self, session, streamGenreLink, serie, channel):
                self.streamGenreLink = streamGenreLink
                self.serie = serie
                self.channel = channel
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0"             : self.closeAll,
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -181,7 +176,7 @@ class SRGFilmeListeScreen(MPScreen, ThumbsHelper):
                self['F2'] = Label(_("Page"))
 
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
                self['Page'] = Label(_("Page:"))
@@ -195,7 +190,7 @@ class SRGFilmeListeScreen(MPScreen, ThumbsHelper):
                twAgentGetPage(url, gzip_decoding=True).addCallback(self.loadPageData).addErrback(self.dataError)
 
        def loadPageData(self, data):
-               self.filmliste = []
+               self._items = []
                try:
                        listJson = json.loads(data)
                        try:
@@ -221,20 +216,19 @@ class SRGFilmeListeScreen(MPScreen, ThumbsHelper):
                                                        image = image.replace('/16x9', '')
                                                except:
                                                        image = None
-                                               self.filmliste.append((decodeHtml(serie), url, desc, image))
+                                               self._items.append((decodeHtml(serie), url, desc, image))
                                        except:
                                                pass
                except:
                        pass
-               if len(self.filmliste) == 0:
-                       self.filmliste.append(('Keine Sendungen gefunden.', None, '', None))
-                       self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+               if len(self._items) == 0:
+                       self._items.append(('Keine Sendungen gefunden.', None, '', None))
+                       self._setList('_defaultlistleft', True)
                        self['Page'].setText('')
                        self['page'].setText('')
                else:
                        self.keyLocked = False
-               self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
-               self.th_ThumbsQuery(self.filmliste, 0, 1, 3, None, None, 1, 1, mode=1)
+               self._setList('_defaultlistleft', True)
                self.showInfos()
 
        def showInfos(self):
@@ -275,7 +269,7 @@ class SRGStreamScreen(MPScreen):
                self['title'] = Label("Play %s" % self.channel)
                self['ContentTitle'] = Label("Auswahl des Streams - %s" % self.staffel)
 
-               self.genreliste = []
+               self._items = []
                self.keyLocked = True
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
@@ -287,7 +281,7 @@ class SRGStreamScreen(MPScreen):
                twAgentGetPage(url, gzip_decoding=True).addCallback(self.loadPageData).addErrback(self.dataError)
 
        def loadPageData(self, data):
-               self.genreliste = []
+               self._items = []
                try:
                        listJson = json.loads(data)
                        try:
@@ -297,7 +291,7 @@ class SRGStreamScreen(MPScreen):
                                        for urldata in playlist["url"]:
                                                myurl = urldata["text"].encode("utf-8")
                                                quali = urldata['@quality'].encode("utf-8")
-                                               self.genreliste.append(('%s %s' % (protoname, quali), myurl))
+                                               self._items.append(('%s %s' % (protoname, quali), myurl))
                        except:
                                pass
                        try:
@@ -308,15 +302,15 @@ class SRGStreamScreen(MPScreen):
                                                for urldata in playlist["url"]:
                                                        myurl = urldata["text"].encode("utf-8")
                                                        quali = urldata['@quality'].encode("utf-8")
-                                                       self.genreliste.append(('%s %s' % (protoname, quali), myurl))
+                                                       self._items.append(('%s %s' % (protoname, quali), myurl))
                        except:
                                pass
                except:
                        pass
-               if len(self.genreliste) == 0:
-                       self.genreliste.append(('Keine Sendungen gefunden.', ''))
-               self.genreliste.sort()
-               self.ml.setList(list(map(self._defaultlistcenter, self.genreliste)))
+               if len(self._items) == 0:
+                       self._items.append(('Keine Sendungen gefunden.', ''))
+               self._items.sort()
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.keyLocked = False
 
        def keyOK(self):
index b5067d0..6d85f96 100644 (file)
@@ -45,18 +45,16 @@ nowAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
 default_cover = "file://%s/tvnow.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
 name = "TVNOW"
 
-class tvnowFirstScreen(MPScreen, ThumbsHelper):
+class tvnowFirstScreen(MPScreen):
 
        def __init__(self, session, name=name):
                self.name = name
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0"             : self.closeAll,
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -68,24 +66,23 @@ class tvnowFirstScreen(MPScreen, ThumbsHelper):
                self['name'] = Label(_("Selection:"))
 
                self.keyLocked = True
-               self.senderliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
                self.onLayoutFinish.append(self.genreData)
 
        def genreData(self):
-               self.senderliste.append(("RTL", "rtl", default_cover))
-               self.senderliste.append(("VOX", "vox", default_cover))
-               self.senderliste.append(("RTL2", "rtl2", default_cover))
-               self.senderliste.append(("NITRO", "nitro",  default_cover))
-               self.senderliste.append(("SUPER RTL", "superrtl", default_cover))
-               self.senderliste.append(("n-tv", "ntv", default_cover))
-               self.senderliste.append(("RTLplus", "rtlplus",  default_cover))
-               self.senderliste.append(("Watchbox", "watchbox",  default_cover))
-               self.ml.setList(list(map(self._defaultlistcenter, self.senderliste)))
+               self._items.append(("RTL", "rtl", default_cover))
+               self._items.append(("VOX", "vox", default_cover))
+               self._items.append(("RTL2", "rtl2", default_cover))
+               self._items.append(("NITRO", "nitro",  default_cover))
+               self._items.append(("SUPER RTL", "superrtl", default_cover))
+               self._items.append(("n-tv", "ntv", default_cover))
+               self._items.append(("RTLplus", "rtlplus",  default_cover))
+               self._items.append(("Watchbox", "watchbox",  default_cover))
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.keyLocked = False
-               self.th_ThumbsQuery(self.senderliste, 0, 1, 2, None, None, 1, 1, mode=1)
                self.showInfos()
 
        def showInfos(self):
@@ -102,7 +99,7 @@ class tvnowFirstScreen(MPScreen, ThumbsHelper):
                Image = self['liste'].getCurrent()[0][2]
                self.session.open(tvnowSubGenreScreen, Link, Name, Image)
 
-class tvnowSubGenreScreen(MPScreen, ThumbsHelper):
+class tvnowSubGenreScreen(MPScreen):
 
        def __init__(self, session, Link, Name, Image, name=name):
                self.Link = Link
@@ -110,13 +107,11 @@ class tvnowSubGenreScreen(MPScreen, ThumbsHelper):
                self.Image = Image
                self.name = name
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0"             : self.closeAll,
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -128,7 +123,7 @@ class tvnowSubGenreScreen(MPScreen, ThumbsHelper):
                self['name'] = Label(_("Selection:") + " " + self.Name)
 
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -154,11 +149,10 @@ class tvnowSubGenreScreen(MPScreen, ThumbsHelper):
                                        image = str(node["defaultImage169Format"])
                                if image == "":
                                        image = self.Image
-                               self.filmliste.append((str(node["title"]), str(node["seoUrl"]), image))
-               self.filmliste.sort(key=lambda t : t[0].lower())
-               self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+                               self._items.append((str(node["title"]), str(node["seoUrl"]), image))
+               self._items.sort(key=lambda t : t[0].lower())
+               self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.keyLocked = False
-               self.th_ThumbsQuery(self.filmliste, 0, 1, 2, None, None, 1, 1, mode=1)
                self.showInfos()
 
        def showInfos(self):
@@ -200,7 +194,7 @@ class tvnowStaffelScreen(MPScreen):
                self['name'] = Label(_("Selection:") + " " + self.Name)
 
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
 
@@ -228,19 +222,19 @@ class tvnowStaffelScreen(MPScreen):
                                        month = ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"]
                                        title = '%s %s' % (month[int(m)-1], year)
                                        url = BASE_URL + 'movies?fields=*,format,pictures,broadcastStartDate&filter=%7B%22BroadcastStartDate%22:%7B%22between%22:%7B%22start%22:%22{0}-{1}-{2}+00:00:00%22,%22end%22:+%22{3}-{4}-{5}+23:59:59%22%7D%7D,+%22FormatId%22+:+{6}%7D&maxPerPage=500&order=BroadcastStartDate+desc'.format(year, m.zfill(2), '01', year, m.zfill(2), str(days).zfill(2), id)
-                                       self.filmliste.append((title, url))
-                       self.filmliste.reverse()
+                                       self._items.append((title, url))
+                       self._items.reverse()
                else:
                        try:
                                for node in nowdata["formatTabs"]["items"]:
-                                       self.filmliste.append((str(node["headline"]), str(node["id"])))
+                                       self._items.append((str(node["headline"]), str(node["id"])))
                        except:
                                pass
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_('Currently no seasons available!'), None, None, None))
-                       self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+               if len(self._items) == 0:
+                       self._items.append((_('Currently no seasons available!'), None, None, None))
+                       self._setList('_defaultlistleft', True)
                else:
-                       self.ml.setList(list(map(self._defaultlistcenter, self.filmliste)))
+                       self.ml.setList(list(map(self._defaultlistcenter, self._items)))
                self.keyLocked = False
                CoverHelper(self['coverArt']).getCover(self.Image)
                self.showInfos()
@@ -258,7 +252,7 @@ class tvnowStaffelScreen(MPScreen):
                if Link:
                        self.session.open(tvnowEpisodenScreen, Link, Name, self.Image)
 
-class tvnowEpisodenScreen(MPScreen, ThumbsHelper):
+class tvnowEpisodenScreen(MPScreen):
 
        def __init__(self, session, Link, Name, Image, name=name):
                self.Link = Link
@@ -266,13 +260,11 @@ class tvnowEpisodenScreen(MPScreen, ThumbsHelper):
                self.Image = Image
                self.name = name
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self["actions"] = ActionMap(["MP_Actions"], {
                        "0"             : self.closeAll,
                        "ok"    : self.keyOK,
                        "cancel": self.keyCancel,
-                       "5" : self.keyShowThumb,
                        "up" : self.keyUp,
                        "down" : self.keyDown,
                        "right" : self.keyRight,
@@ -284,7 +276,7 @@ class tvnowEpisodenScreen(MPScreen, ThumbsHelper):
                self['name'] = Label(_("Selection:") + " " + self.Name)
 
                self.keyLocked = True
-               self.filmliste = []
+               self._items = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
                self.container = 0
@@ -346,7 +338,7 @@ class tvnowEpisodenScreen(MPScreen, ThumbsHelper):
                                                                                descr = descr + descrlong
                                                                        else:
                                                                                descr = descr + descrshort
-                                                                       self.filmliste.append((str(nodex["title"]), str(nodex["id"]), descr, image))
+                                                                       self._items.append((str(nodex["title"]), str(nodex["id"]), image, descr))
                                                        except:
                                                                continue
                                except:
@@ -402,7 +394,7 @@ class tvnowEpisodenScreen(MPScreen, ThumbsHelper):
                                                                descr = descr + descrlong
                                                        else:
                                                                descr = descr + descrshort
-                                                       self.filmliste.append((str(nodex["title"]), str(nodex["id"]), descr, image))
+                                                       self._items.append((str(nodex["title"]), str(nodex["id"]), image, descr))
                                        except:
                                                continue
                        except:
@@ -411,16 +403,15 @@ class tvnowEpisodenScreen(MPScreen, ThumbsHelper):
                                self.parseContainer("", False)
                printl(self.container, self, "I")
                if self.container == 0:
-                       if len(self.filmliste) == 0:
-                               self.filmliste.append((_('Currently no playable/free episodes available!'), None, None, None))
-                       self.ml.setList(list(map(self._defaultlistleft, self.filmliste)))
+                       if len(self._items) == 0:
+                               self._items.append((_('Currently no playable/free episodes available!'), None, None, None))
+                       self._setList('_defaultlistleft', True)
                        self.keyLocked = False
-                       self.th_ThumbsQuery(self.filmliste, 0, 1, 2, None, None, 1, 1, mode=1)
                        self.showInfos()
 
        def showInfos(self):
-               Descr = self['liste'].getCurrent()[0][2]
-               Image = self['liste'].getCurrent()[0][3]
+               Descr = self['liste'].getCurrent()[0][3]
+               Image = self['liste'].getCurrent()[0][2]
                if Descr:
                        self['handlung'].setText(Descr)
                CoverHelper(self['coverArt']).getCover(Image)
index da205fa..20105fc 100644 (file)
@@ -855,7 +855,7 @@ class youtubeGenreScreen(MenuHelper):
                        printl(str(suggestions), self, 'E')
                return slist
 
-class YT_ListScreen(MPScreen, ThumbsHelper):
+class YT_ListScreen(MPScreen):
 
        param_regionid = (
                ('&gl=US'),
@@ -880,7 +880,6 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                self.headers = std_headers
 
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
-               ThumbsHelper.__init__(self)
 
                self.favoGenre = self.genreName.startswith(_('Favorites'))
                self.apiUrl = 'gdata.youtube.com' in self.stvLink
@@ -892,30 +891,15 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                self["actions"]  = ActionMap(["MP_Actions2", "MP_Actions"], {
                        "ok"            : self.keyOK,
                        "red"           : self.keyRed,
+                       "green"         : self.keyGreen,
                        "cancel"        : self.keyCancel,
-                       "5"             : self.keyShowThumb,
+                       "0"             : self.closeAll,
                        "up"            : self.keyUp,
                        "down"          : self.keyDown,
                        "right"         : self.keyRight,
                        "left"          : self.keyLeft,
-                       "upUp"          : self.key_repeatedUp,
-                       "rightUp"       : self.key_repeatedUp,
-                       "leftUp"        : self.key_repeatedUp,
-                       "downUp"        : self.key_repeatedUp,
-                       "upRepeated"    : self.keyUpRepeated,
-                       "downRepeated"  : self.keyDownRepeated,
-                       "rightRepeated" : self.keyRightRepeated,
-                       "leftRepeated"  : self.keyLeftRepeated,
                        "nextBouquet"   : self.keyPageUpFast,
-                       "prevBouquet"   : self.keyPageDownFast,
-                       "green"         : self.keyGreen,
-                       "0"             : self.closeAll,
-                       "1"             : self.key_1,
-                       "3"             : self.key_3,
-                       "4"             : self.key_4,
-                       "6"             : self.key_6,
-                       "7"             : self.key_7,
-                       "9"             : self.key_9
+                       "prevBouquet"   : self.keyPageDownFast
                }, -1)
 
                self['title'] = Label(title)
@@ -945,7 +929,7 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
 
                self.favo_path = config_mp.mediaportal.watchlistpath.value + "mp_yt_favorites.xml"
                self.keckse = CookieJar()
-               self.filmliste = []
+               self._items = []
                self.start_idx = 1
                self.max_res = 50
                self.max_pages = 1000 / self.max_res
@@ -987,7 +971,7 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                                        elif youtubedl:
                                                self.keyLocked = True
                                                self.stvLink = "https://www.youtube.com/playlist?list=%s" % m.group(1)
-                                               self.ml.setList(list(map(self.YT_ListEntry, [('', _('Please wait...'), '', '', '', '', '')])))
+                                               self['name'].setText(_('Please wait...'))
                                                _thread.start_new_thread(self.get_playlist, ("GetPlaylist",))
                                                return
                                        else:
@@ -1017,8 +1001,8 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                        reactor.callFromThread(self.err_playlist)
 
        def err_playlist(self):
-               self.filmliste.append(('', _('Playlist loading failed! Please try again.'), '', '', '', '', ''))
-               self.ml.setList(list(map(self.YT_ListEntry, self.filmliste)))
+               self._items.append((_('Playlist loading failed! Please try again.'), '', '', '', '', '', ''))
+               self.ml.setList(list(map(self._defaultlistleft, self._items)))
 
        def parsePlaylistId(self, data):
                data = json.loads(data)
@@ -1038,7 +1022,7 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                        self.close()
                        return
                self.keyLocked = True
-               self.ml.setList(list(map(self.YT_ListEntry, [('', _('Please wait...'), '', '', '', '', '')])))
+               self['name'].setText(_('Please wait...'))
                hl = param_ajax_hl[config_mp.mediaportal.yt_param_meta_idx.value]
                if hl != picker_lang:
                        self.setLang("https://www.youtube.com", hl)
@@ -1177,13 +1161,13 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
 
        def genreData(self, data):
                if self.ytdl_playlist:
-                       self.filmliste = []
+                       self._items = []
 
                        for item in data.get('entries', []):
                                title = decodeHtml(str(item.get('title', '')))
                                url = str(item['id'])
                                if title not in ["[Deleted video]", "[Private video]"]:
-                                       self.filmliste.append(('', title, url, '', '', '', ''))
+                                       self._items.append((title, url, '', '', '', '', ''))
 
                        reactor.callLater(0, self.checkListe)
 
@@ -1191,11 +1175,11 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                        global APIKEYV3
                        if APIKEYV3_BACKUP and APIKEYV3 != APIKEYV3_BACKUP:
                                APIKEYV3 = APIKEYV3_BACKUP
-                               self.ml.setList(list(map(self.YT_ListEntry, [('', _('YouTube API quota of your master key exceeded, switched to your API backup key, please try again!'), '', '', '', '', '')])))
+                               self.ml.setList(list(map(self._defaultlistleft, [(_('YouTube API quota of your master key exceeded, switched to your API backup key, please try again!'), '', '', '', '', '', '')])))
                                self['handlung'].setText(_('YouTube API quota of your master key exceeded, switched to your API backup key, please try again!'))
                        elif APIKEYV3_MASTER and APIKEYV3 != APIKEYV3_MASTER:
                                APIKEYV3 = APIKEYV3_MASTER
-                               self.ml.setList(list(map(self.YT_ListEntry, [('', _('YouTube API quota of your backup key exceeded, switched to your API master key, please try again!'), '', '', '', '', '')])))
+                               self.ml.setList(list(map(self._defaultlistleft, [(_('YouTube API quota of your backup key exceeded, switched to your API master key, please try again!'), '', '', '', '', '', '')])))
                                self['handlung'].setText(_('YouTube API quota of your backup key exceeded, switched to your API master key, please try again!'))
                        self.keyLocked = True
                else:
@@ -1226,7 +1210,7 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                                                self.pages = self.max_pages
                                        self.page = 1
 
-                       self.filmliste = []
+                       self._items = []
                        if self.apiUrlv3:
                                def getThumbnail(thumbnails):
                                        if 'maxres' in thumbnails:
@@ -1334,7 +1318,7 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                                                                        pass
                                                                channel = str(item['snippet'].get('channelTitle', ''))
                                                                desc = _("Channel:") + " " + channel + "\n" + desc
-                                                               self.filmliste.append(('', title, url, img, desc, '', ''))
+                                                               self._items.append((title, url, img, desc, '', '', ''))
                                                        elif kind.endswith('#playlistItem'):
                                                                try:
                                                                        url = str(item['snippet']['resourceId']['videoId'])
@@ -1364,17 +1348,17 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                                                                        pass
                                                                channel = str(item['snippet'].get('channelTitle', ''))
                                                                desc = _("Channel:") + " " + channel + "\n" + desc
-                                                               self.filmliste.append(('', title, url, img, desc, '', ''))
+                                                               self._items.append((title, url, img, desc, '', '', ''))
                                                        elif kind.endswith('channel'):
                                                                if listType:
                                                                        id = str(item['id'])
                                                                        url = '/channel/%s/featured' % id
                                                                        img = getThumbnail(item['snippet']['thumbnails'])
-                                                                       self.filmliste.append(('', title, url, img, desc, '', ''))
+                                                                       self._items.append((title, url, img, desc, '', '', ''))
                                                                else:
                                                                        url = str(item['id']['channelId'])
                                                                        img = getThumbnail(item['snippet']['thumbnails'])
-                                                                       self.filmliste.append(('', title, url, img, desc, 'CV3', ''))
+                                                                       self._items.append((title, url, img, desc, 'CV3', '', ''))
                                                        elif kind.endswith('#playlist'):
                                                                if not listType:
                                                                        url = str(item['id']['playlistId'])
@@ -1384,15 +1368,15 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                                                                        img = getThumbnail(item['snippet']['thumbnails'])
                                                                except:
                                                                        img = default_cover
-                                                               self.filmliste.append(('', title, url, img, desc, 'PV3', ''))
+                                                               self._items.append((title, url, img, desc, 'PV3', '', ''))
                                                        elif kind.endswith('#subscription'):
                                                                url = str(item['snippet']['resourceId']['channelId'])
                                                                img = getThumbnail(item['snippet']['thumbnails'])
-                                                               self.filmliste.append(('', title, url, img, desc, 'CV3', ''))
+                                                               self._items.append((title, url, img, desc, 'CV3', '', ''))
                                                        elif kind.endswith('#guideCategory'):
                                                                url = str(item['id'])
                                                                img = ''
-                                                               self.filmliste.append(('', title, url, img, desc, 'GV3', ''))
+                                                               self._items.append((title, url, img, desc, 'GV3', '', ''))
                                                        elif kind.endswith('#activity'):
                                                                desc = str(item['snippet'].get('description', ''))
                                                                if item['snippet'].get('type') == self.actType:
@@ -1405,7 +1389,7 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                                                                        except:
                                                                                pass
                                                                        else:
-                                                                               self.filmliste.append(('', title, url, img, desc, '', ''))
+                                                                               self._items.append((title, url, img, desc, '', '', ''))
                                                elif 'contentDetails' in item:
                                                        details = item['contentDetails']
                                                        if kind.endswith('#channel'):
@@ -1414,7 +1398,7 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                                                                                url = str(v)
                                                                                img = ''
                                                                                desc = ''
-                                                                               self.filmliste.append(('', str(k).title(), url, img, desc, 'PV3', ''))
+                                                                               self._items.append((str(k).title(), url, img, desc, 'PV3', '', ''))
 
                        else:
                                data = data.replace('\n', '')
@@ -1536,13 +1520,13 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                                                                vidcnt = re.sub('<.*?>', '', m.group(1))
                                                                vidcnt = '[%s]\n\n' % vidcnt
 
-                                               self.filmliste.append(('', str(title), vid, img, vidcnt+desc, gid, ''))
+                                               self._items.append((str(title), vid, img, vidcnt+desc, gid, '', ''))
 
                        reactor.callLater(0, self.checkListe)
 
        def checkListe(self):
-               if len(self.filmliste) == 0:
-                       self.filmliste.append(('', _('No contents / results found!'), '', '', '', '', ''))
+               if len(self._items) == 0:
+                       self._items.append((_('No contents / results found!'), '', '', '', '', '', ''))
                        self.keyLocked = True
                        if self.page <= 1:
                                self.page = 0
@@ -1551,16 +1535,15 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                else:
                        if not self.page:
                                self.page = self.pages = 1
-                       menu_len = len(self.filmliste)
+                       menu_len = len(self._items)
                        self.keyLocked = False
-
-               self.ml.setList(list(map(self.YT_ListEntry, self.filmliste)))
-               self.th_ThumbsQuery(self.filmliste, 1, 2, 3, None, None, self.page, self.pages, mode=self.modeShowThumb)
+               self._setList('_defaultlistleft', True)
+               self.ml.moveToIndex(0)
                self.showInfos()
 
        def dataError(self, error):
                self.keyLocked = True
-               self.ml.setList(list(map(self.YT_ListEntry, [('', _('No contents / results found!'), '', '', '', '', '')])))
+               self['name'].setText("")
                self['handlung'].setText("")
 
        def showInfos(self):
@@ -1569,11 +1552,11 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                else:
                        self['page'].setText("%d / %d" % (self.page, max(self.page, self.pages)))
 
-               stvTitle = self['liste'].getCurrent()[0][1]
-               stvImage = self['liste'].getCurrent()[0][3]
-               desc = self['liste'].getCurrent()[0][4]
+               stvTitle = self['liste'].getCurrent()[0][0]
+               stvImage = self['liste'].getCurrent()[0][2]
+               desc = self['liste'].getCurrent()[0][3]
                self['name'].setText(stvTitle)
-               self['handlung'].setText(desc)
+               self['handlung'].setText(str(desc))
                if self.lastCover != stvImage:
                        stvImage = re.sub(r"\/s\d+.*?\/", "/", stvImage)
                        stvImage = re.sub(r"=s\d+.*?$", "", stvImage)
@@ -1590,18 +1573,18 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
        def delFavo(self):
                i = self['liste'].getSelectedIndex()
                c = j = 0
-               l = len(self.filmliste)
+               l = len(self._items)
                try:
                        f1 = open(self.favo_path, 'w')
                        while j < l:
                                if j != i:
                                        c += 1
-                                       dura = self.filmliste[j][0]
-                                       dhTitle = self.filmliste[j][1]
-                                       dhVideoId = self.filmliste[j][2]
-                                       dhImg = self.filmliste[j][3]
-                                       desc = urllib.parse.quote(self.filmliste[j][4])
-                                       gid = self.filmliste[j][5]
+                                       dura = self._items[j][6]
+                                       dhTitle = self._items[j][0]
+                                       dhVideoId = self._items[j][1]
+                                       dhImg = self._items[j][2]
+                                       desc = urllib.parse.quote(self._items[j][3])
+                                       gid = self._items[j][4]
                                        wdat = '<i>%d</i><n>%s</n><v>%s</v><im>%s</im><d>%s</d><g>%s</g><desc>%s</desc>\n' % (c, dhTitle, dhVideoId, dhImg, dura, gid, desc)
                                        f1.write(wdat)
 
@@ -1617,12 +1600,12 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                        f1.close()
 
        def addFavo(self):
-               dhTitle = self['liste'].getCurrent()[0][1]
-               dura = self['liste'].getCurrent()[0][0]
-               dhImg = self['liste'].getCurrent()[0][3]
-               gid = self['liste'].getCurrent()[0][5]
-               desc = urllib.parse.quote(self['liste'].getCurrent()[0][4])
-               dhVideoId = self['liste'].getCurrent()[0][2]
+               dhTitle = self['liste'].getCurrent()[0][0]
+               dura = self['liste'].getCurrent()[0][6]
+               dhImg = self['liste'].getCurrent()[0][2]
+               gid = self['liste'].getCurrent()[0][4]
+               desc = urllib.parse.quote(self['liste'].getCurrent()[0][3])
+               dhVideoId = self['liste'].getCurrent()[0][1]
                if not self.favoGenre and gid in ('S', 'P', 'C'):
                        dura = ''
                        dhTitle = self.genreName + ':' + dhTitle
@@ -1663,7 +1646,7 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                        f1.close()
 
        def getFavos(self):
-               self.filmliste = []
+               self._items = []
                try:
                        if not fileExists(self.favo_path):
                                f_new = True
@@ -1678,11 +1661,11 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                                        n, v, img, dura, gid, desc = m.groups()
                                        if dura and not dura.startswith('['):
                                                dura = '[%s] ' % dura.rstrip()
-                                       self.filmliste.append((dura, n, v, img, urllib.parse.unquote(desc), gid, ''))
+                                       self._items.append((n, v, img, urllib.parse.unquote(desc), gid, '', dura))
 
-                       if len(self.filmliste) == 0:
+                       if len(self._items) == 0:
                                self.pages = self.page = 0
-                               self.filmliste.append((_('No videos found!'), '', '', '', '', '', ''))
+                               self._items.append((_('No videos found!'), '', '', '', '', '', ''))
                                self.keyLocked = True
                                if not f_new and len(data) > 0:
                                        os.remove(self.favo_path)
@@ -1691,7 +1674,7 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                                self.pages = self.page = 1
                                self.keyLocked = False
 
-                       self.ml.setList(list(map(self.YT_ListEntry, self.filmliste)))
+                       self._setList('_defaultlistleft', True)
                        self.showInfos()
 
                except IOError as e:
@@ -1728,49 +1711,15 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                elif not self.keyLocked:
                        self.changeSort()
 
-       def keyUpRepeated(self):
-               if self.keyLocked:
-                       return
-               self['liste'].up()
-
-       def keyDownRepeated(self):
-               if self.keyLocked:
-                       return
-               self['liste'].down()
-
-       def key_repeatedUp(self):
-               if self.keyLocked:
-                       return
-               self.showInfos()
-
-       def keyLeftRepeated(self):
-               if self.keyLocked:
-                       return
-               self['liste'].pageUp()
-
-       def keyRightRepeated(self):
-               if self.keyLocked:
-                       return
-               self['liste'].pageDown()
-
        def keyUp(self):
                if self.keyLocked:
                        return
-               i = self['liste'].getSelectedIndex()
-               if not i:
-                       self.keyPageDownFast()
-
                self['liste'].up()
                self.showInfos()
 
        def keyDown(self):
                if self.keyLocked:
                        return
-               i = self['liste'].getSelectedIndex()
-               l = len(self.filmliste) - 1
-               if l == i:
-                       self.keyPageUpFast()
-
                self['liste'].down()
                self.showInfos()
 
@@ -1829,9 +1778,6 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                if oldpage != self.page:
                        self.loadPageData()
 
-       def key_1(self):
-               self.keyPageDownFast(2)
-
        def keyGreen(self):
                if self.keyLocked:
                        return
@@ -1840,61 +1786,45 @@ class YT_ListScreen(MPScreen, ThumbsHelper):
                else:
                        self.addFavo()
 
-       def key_4(self):
-               self.keyPageDownFast(5)
-
-       def key_7(self):
-               self.keyPageDownFast(10)
-
-       def key_3(self):
-               self.keyPageUpFast(2)
-
-       def key_6(self):
-               self.keyPageUpFast(5)
-
-       def key_9(self):
-               self.keyPageUpFast(10)
-
        def keyOK(self):
                if self.keyLocked:
                        return
-               url = self['liste'].getCurrent()[0][2]
-               gid = self['liste'].getCurrent()[0][5]
+               url = self['liste'].getCurrent()[0][1]
+               if not url:
+                       return
+               gid = self['liste'].getCurrent()[0][4]
                if gid == 'P' or gid == 'C':
-                       dhTitle = 'Videos: ' + self['liste'].getCurrent()[0][1]
-                       genreurl = self['liste'].getCurrent()[0][2]
+                       dhTitle = 'Videos: ' + self['liste'].getCurrent()[0][0]
+                       genreurl = self['liste'].getCurrent()[0][1]
                        if genreurl.startswith('http'):
                                genreurl = genreurl.replace('v=2', '')
                        else:
-                               genreurl = 'gdata.youtube.com/feeds/api/playlists/'+self['liste'].getCurrent()[0][2]+'?'
+                               genreurl = 'gdata.youtube.com/feeds/api/playlists/'+self['liste'].getCurrent()[0][1]+'?'
 
                        if self.favoGenre:
                                self.session.openWithCallback(self.getFavos, YT_ListScreen, genreurl, dhTitle)
                        else:
                                self.session.open(YT_ListScreen, genreurl, dhTitle)
                elif gid == 'CV3':
-                       dhTitle = 'Ergebnisse: ' + self['liste'].getCurrent()[0][1]
-                       genreurl = se