import enigma2-plugin-extensions-mediaportal 2019090701 v2019090701
authorChristian Weiske <cweiske@cweiske.de>
Sat, 7 Sep 2019 23:15:23 +0000 (01:15 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Sat, 7 Sep 2019 23:15:23 +0000 (01:15 +0200)
16 files changed:
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/additions.xml
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/badoinkvr.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/hclips.py [new file with mode: 0644]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/hdzog.py [new file with mode: 0644]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/hotmovs.py [new file with mode: 0644]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/porncom.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/porntv.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/shemalez.py [new file with mode: 0644]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/tubepornclassic.py [new file with mode: 0644]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/txxx.py [new file with mode: 0644]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/upornia.py [new file with mode: 0644]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/vjav.py [new file with mode: 0644]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/voyeurhit.py [new file with mode: 0644]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/plugin.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/mpscreen.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/simpleplayer.py

index 778772b..e9acd86 100644 (file)
                <plugin type="mod" modfile="porn.porndoe" confopt="showporndoe" default="False" confcat="porn" gz="0" name="Porndoe" icon="porndoe" filter="Porn" screen="porndoeGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="porndoeFilmScreen" searchparam=", False"/>
                <plugin type="mod" modfile="porn.tnaflix" confopt="showtnaflix" default="False" confcat="porn" gz="0" name="TnAflix" icon="tnaflix" filter="Porn" screen="TnAflixGenreScreen" param1="tnaflix" param2="" search="1" delim="%20" searchurl="%s" searchscreen="TnAflixFilmScreen" searchparam=", &quot;TnAflix.com&quot;, &quot;https://www.tnaflix.com&quot;"/>
                <plugin type="mod" modfile="porn.tnaflix" confopt="showempflix" default="False" confcat="porn" gz="0" name="Empflix" icon="empflix" filter="Porn" screen="TnAflixGenreScreen" param1="empflix" param2="" search="1" delim="%20" searchurl="%s" searchscreen="TnAflixFilmScreen" searchparam=", &quot;Empflix.com&quot;, &quot;https://www.empflix.com&quot;"/>
+               <plugin type="mod" modfile="porn.txxx" confopt="showtxxx" default="False" confcat="porn" gz="0" name="TXXX" icon="txxx" filter="Porn" screen="txxxGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="txxxFilmScreen" searchparam=""/>
+               <plugin type="mod" modfile="porn.hclips" confopt="showhclips" default="False" confcat="porn" gz="0" name="HClips" icon="hclips" filter="Porn" screen="hclipsGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="hclipsFilmScreen" searchparam=""/>
+               <plugin type="mod" modfile="porn.upornia" confopt="showupornia" default="False" confcat="porn" gz="0" name="Upornia" icon="upornia" filter="Porn" screen="uporniaGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="uporniaFilmScreen" searchparam=""/>
+               <plugin type="mod" modfile="porn.hdzog" confopt="showhdzog" default="False" confcat="porn" gz="0" name="HDZog" icon="hdzog" filter="Porn" screen="hdzogGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="hdzogFilmScreen" searchparam=""/>
+               <plugin type="mod" modfile="porn.hotmovs" confopt="showhotmovs" default="False" confcat="porn" gz="0" name="HotMovs" icon="hotmovs" filter="Porn" screen="hotmovsGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="hotmovsFilmScreen" searchparam=""/>
+               <plugin type="mod" modfile="porn.voyeurhit" confopt="showvoyeurhit" default="False" confcat="porn" gz="0" name="VoyeurHit" icon="voyeurhit" filter="Porn" screen="voyeurhitGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="voyeurhitFilmScreen" searchparam=""/>
+               <plugin type="mod" modfile="porn.tubepornclassic" confopt="showtubepornclassic" default="False" confcat="porn" gz="0" name="TubePornClassic" icon="tubepornclassic" filter="Porn" screen="tubepornclassicGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="tubepornclassicFilmScreen" searchparam=""/>
+               <plugin type="mod" modfile="porn.vjav" confopt="showvjav" default="False" confcat="porn" gz="0" name="VJAV" icon="vjav" filter="Porn" screen="vjavGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="vjavFilmScreen" searchparam=""/>
+               <plugin type="mod" modfile="porn.shemalez" confopt="showshemalez" default="False" confcat="porn" gz="0" name="ShemaleZ" icon="shemalez" filter="Porn" screen="shemalezGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="shemalezFilmScreen" searchparam=""/>
                <plugin type="mod" modfile="porn.freeones" confopt="showfreeones" default="False" confcat="porn" gz="0" name="FreeOnes" icon="freeones" filter="Porn" screen="freeonesGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="freeonesFilmScreen" searchparam=""/>
                <plugin type="mod" modfile="porn.vintagetube" confopt="showvintagetube" default="False" confcat="porn" gz="0" name="VintageTube" icon="vintagetube" filter="Porn" screen="vintagetubeGenreScreen" param1="vintagetube" param2="" search="1" delim="+" searchurl="%s" searchscreen="vintagetubeFilmScreen" searchparam=", &quot;VintageTube.xxx&quot;, &quot;vintagetube.xxx&quot;"/>
                <plugin type="mod" modfile="porn.vintagetube" confopt="showanaldin" default="False" confcat="porn" gz="0" name="Analdin" icon="analdin" filter="Porn" screen="vintagetubeGenreScreen" param1="analdin" param2="" search="1" delim="+" searchurl="%s" searchscreen="vintagetubeFilmScreen" searchparam=", &quot;Analdin.com&quot;, &quot;analdin.com&quot;"/>
index f88e711..d8bd7d8 100644 (file)
@@ -226,7 +226,7 @@ class badoinkvrFilmScreen(MPScreen, ThumbsHelper):
 
        def loadData(self, data):
                self.getLastPage(data, 'pagination">(.*?)</ul>')
-               Movies = re.findall('class="video-card-image" src="(.*?)".*?class="video-card-title.*?href="(.*?)"\stitle="(.*?)".*?itemprop="datePublished".*?>(.*?)</span.*?itemprop="duration".*?>(.*?)</span.*?itemprop="actor".*?>(.*?)</div>', data, re.S)
+               Movies = re.findall('class="video-card-image" src="(.*?)".*?class="video-card-title.*?href="(.*?)"\s{1,5}title="(.*?)".*?itemprop="datePublished".*?>(.*?)</span.*?itemprop="duration".*?>(.*?)</span.*?itemprop="actor".*?>(.*?)</div>', data, re.S)
                if Movies:
                        for (Image, Url, Title, Date, Runtime, Models) in Movies:
                                Image = Image.replace('&amp;','&')
diff --git a/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/hclips.py b/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/hclips.py
new file mode 100644 (file)
index 0000000..9d318eb
--- /dev/null
@@ -0,0 +1,253 @@
+# -*- coding: utf-8 -*-
+#######################################################################################################
+#
+#    MediaPortal for Dreambox OS
+#
+#    Coded by MediaPortal Team (c) 2013-2019
+#
+#  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 Plugins.Extensions.MediaPortal.plugin import _
+from Plugins.Extensions.MediaPortal.resources.imports import *
+import base64
+
+agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36'
+headers = {
+       'Accept-Language':'de,en-US;q=0.7,en;q=0.3',
+       'X-Requested-With':'XMLHttpRequest',
+       }
+default_cover = "file://%s/hclips.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
+cookies = CookieJar()
+ctarget = None
+
+class hclipsGenreScreen(MPScreen):
+
+       def __init__(self, session):
+               MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
+
+               self["actions"] = ActionMap(["MP_Actions"], {
+                       "ok" : self.keyOK,
+                       "0" : self.closeAll,
+                       "cancel" : self.keyCancel,
+                       "up" : self.keyUp,
+                       "down" : self.keyDown,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft
+               }, -1)
+
+               self['title'] = Label("HClips.com")
+               self['ContentTitle'] = Label("Genre:")
+
+               self.keyLocked = True
+               self.suchString = ''
+
+               self.genreliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.keyLocked = True
+               url = "https://hclips.com/categories/"
+               twAgentGetPage(url, agent=agent).addCallback(self.genreData).addErrback(self.dataError)
+
+       def genreData(self, data):
+               parse = re.search('class="thumb_holder(.*?)class="cat-text">', data, re.S)
+               Cats = re.findall('<a\shref="(https://(?:www.|)hclips.com/categories/.*?)".*?class="img"\ssrc="(.*?)".*?class="title">(.*?)</strong', parse.group(1), re.S)
+               if Cats:
+                       for (Url, Image, Title) in Cats:
+                               self.genreliste.append((Title, Url, Image))
+                       self.genreliste.sort()
+                       self.genreliste.insert(0, ("Longest", "https://hclips.com/longest/", default_cover))
+                       self.genreliste.insert(0, ("Most Popular", "https://hclips.com/most-popular/", default_cover))
+                       self.genreliste.insert(0, ("Top Rated", "https://hclips.com/top-rated/", default_cover))
+                       self.genreliste.insert(0, ("Most Recent", "https://hclips.com/latest-updates/", default_cover))
+                       self.genreliste.insert(0, ("--- Search ---", "", default_cover))
+                       self.ml.setList(map(self._defaultlistcenter, self.genreliste))
+                       self.keyLocked = False
+               self.showInfos()
+
+       def showInfos(self):
+               Image = self['liste'].getCurrent()[0][2]
+               CoverHelper(self['coverArt']).getCover(Image)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Name = self['liste'].getCurrent()[0][0]
+               Link = self['liste'].getCurrent()[0][1]
+               if re.search('--- Search', Name):
+                       self.suchen(suggest_func=self.getSuggestions)
+               else:
+                       self.session.open(hclipsFilmScreen, Link, Name)
+
+       def SuchenCallback(self, callback = None):
+               if callback is not None and len(callback):
+                       Name = "--- Search ---"
+                       self.suchString = callback
+                       Link = urllib.quote(self.suchString).replace(' ', '+')
+                       self.session.open(hclipsFilmScreen, Link, Name)
+
+       def getSuggestions(self, text, max_res):
+               url = "https://hclips.com/cloudsearch/suggesters.php?char=%s" % urllib.quote_plus(text)
+               d = twAgentGetPage(url, agent=agent, headers=headers, timeout=5)
+               d.addCallback(self.gotSuggestions, max_res)
+               d.addErrback(self.gotSuggestions, max_res, err=True)
+               return d
+
+       def gotSuggestions(self, suggestions, max_res, err=False):
+               list = []
+               if not err and type(suggestions) in (str, buffer):
+                       suggestions = json.loads(suggestions)
+                       for item in suggestions:
+                               li = item
+                               list.append(str(li))
+                               max_res -= 1
+                               if not max_res: break
+               elif err:
+                       printl(str(suggestions),self,'E')
+               return list
+
+class hclipsFilmScreen(MPScreen, ThumbsHelper):
+
+       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,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft,
+                       "nextBouquet" : self.keyPageUp,
+                       "prevBouquet" : self.keyPageDown,
+                       "green" : self.keyPageNumber
+               }, -1)
+
+               self['title'] = Label("HClips.com")
+               self['ContentTitle'] = Label("Genre: %s" % self.Name)
+               self['F2'] = Label(_("Page"))
+
+               self['Page'] = Label(_("Page:"))
+               self.keyLocked = True
+               self.page = 1
+               self.lastpage = 1
+
+               self.filmliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.loadPage)
+
+       def loadPage(self):
+               self.keyLocked = True
+               self['name'].setText(_('Please wait...'))
+               self.filmliste = []
+               if re.search('Search', self.Name):
+                       url = "https://hclips.com/search/%s/?q=%s&p=0" % (str(self.page), self.Link)
+               else:
+                       url = "%s%s/" % (self.Link, str(self.page))
+               twAgentGetPage(url, agent=agent, gzip_decoding=True).addCallback(self.loadData).addErrback(self.dataError)
+
+       def loadData(self, data):
+               self.getLastPage(data, 'class="paginator"\s{0,3}>(.*?)</div>', '.*from:\d+">((?:\d+.|)\d+)<')
+               parse = re.search('class="thumb_holder">(.*?)class="footer', data, re.S)
+               Movies = re.findall('<a\shref="(https://(?:www.|)hclips.com/videos/.*?)"\sclass="thumb">.*?<img\ssrc="(.*?)".*?class="dur">(.*?)</span>.*?class="title">(.*?)</strong>.*?small_views">Views:\s(\d+)</span>.*?small_added-date">Added:\s(.*?)</span>', parse.group(1), re.S)
+               if Movies:
+                       for (Url, Image, Runtime, Title, Views, Added) in Movies:
+                               self.filmliste.append((decodeHtml(Title), Url, Image, Runtime, Views, Added))
+               if len(self.filmliste) == 0:
+                       self.filmliste.append((_('No videos found!'), None, None, None, None, None))
+               self.ml.setList(map(self._defaultlistleft, self.filmliste))
+               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):
+               Url = self['liste'].getCurrent()[0][1]
+               if Url == None:
+                       return
+               title = self['liste'].getCurrent()[0][0]
+               pic = self['liste'].getCurrent()[0][2]
+               runtime = self['liste'].getCurrent()[0][3]
+               views = self['liste'].getCurrent()[0][4]
+               added = self['liste'].getCurrent()[0][5]
+               self['name'].setText(title)
+               self['handlung'].setText("Runtime: %s\nViews: %s\nAdded: %s" % (runtime, views, added))
+               CoverHelper(self['coverArt']).getCover(pic)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Link = self['liste'].getCurrent()[0][1]
+               if Link == None:
+                       return
+               self.keyLocked = True
+               twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def getVideoPage(self, data, Link):
+               global ctarget
+               if not ctarget:
+                       playerlib = re.findall('<script src="(/assets/playerlib.*?\.js)"', data, re.S)
+                       url = "https://hclips.com" + playerlib[0]
+                       twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.fetchctarget, Link).addErrback(self.dataError)
+               else:
+                       pC3 = re.findall("pC3:'(.*?)',", data, re.S)
+                       video_id = re.findall('(?:\"|\'|)video_id(?:\"|\'|): (\d+),', data, re.S)
+                       if pC3 and video_id:
+                               postdata = {'param': video_id[0]+','+pC3[0]}
+                               twAgentGetPage(ctarget, method='POST', postdata=urlencode(postdata), agent=agent, cookieJar=cookies, headers={'Content-Type':'application/x-www-form-urlencoded','Referer':Link}).addCallback(self.playVideo).addErrback(self.dataError)
+
+       def fetchctarget(self, data, Link):
+               curl = re.findall(';c.action="(.*?)";', data, re.S)
+               global ctarget
+               ctarget = "https://hclips.com" + curl[0]
+               twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def playVideo(self, data):
+               video = re.findall('\[\{"video_url":"(.*?)",', data, re.S)
+               self.keyLocked = False
+               if video:
+                       url = video[0]
+                       chr = {'A':'\u0410', 'B':'\u0412', 'C':'\u0421', 'E':'\u0415', 'M':'\u041c', '/':',', '+':'.', '=':'~'}
+                       for i in chr:
+                               url = url.replace(chr[i], i)
+                       url = base64.b64decode(url)
+                       Title = self['liste'].getCurrent()[0][0]
+                       mp_globals.player_agent = agent
+                       self.session.open(SimplePlayer, [(Title, url)], showPlaylist=False, ltype='hclips')
\ No newline at end of file
diff --git a/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/hdzog.py b/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/hdzog.py
new file mode 100644 (file)
index 0000000..34b7185
--- /dev/null
@@ -0,0 +1,257 @@
+# -*- coding: utf-8 -*-
+#######################################################################################################
+#
+#    MediaPortal for Dreambox OS
+#
+#    Coded by MediaPortal Team (c) 2013-2019
+#
+#  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 Plugins.Extensions.MediaPortal.plugin import _
+from Plugins.Extensions.MediaPortal.resources.imports import *
+import base64
+
+agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36'
+json_headers = {
+       'Accept':'*/*',
+       'Accept-Encoding':'deflate',
+       'Accept-Language':'de,en-US;q=0.7,en;q=0.3',
+       'X-Requested-With':'XMLHttpRequest',
+       'Content-Type':'application/x-www-form-urlencoded'
+       }
+default_cover = "file://%s/hdzog.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
+cookies = CookieJar()
+ctarget = None
+
+class hdzogGenreScreen(MPScreen):
+
+       def __init__(self, session):
+               MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
+
+               self["actions"] = ActionMap(["MP_Actions"], {
+                       "ok" : self.keyOK,
+                       "0" : self.closeAll,
+                       "cancel" : self.keyCancel,
+                       "up" : self.keyUp,
+                       "down" : self.keyDown,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft
+               }, -1)
+
+               self['title'] = Label("HDZog.com")
+               self['ContentTitle'] = Label("Genre:")
+
+               self.keyLocked = True
+               self.suchString = ''
+
+               self.genreliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.keyLocked = True
+               url = "https://hdzog.com/categories/"
+               twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.genreData).addErrback(self.dataError)
+
+       def genreData(self, data):
+               Cats = re.findall('href="(http[s]?://hdzog.com/category.*?)".*?img\s(?:class="thumb"\s|)src="(.*?)".*?class="title">(.*?)</span', data, re.S)
+               if Cats:
+                       for (Url, Image, Title) in Cats:
+                               if "no-thumb-yet.jpg" in Image:
+                                       Image = default_cover
+                               self.genreliste.append((Title, Url, Image))
+                       self.genreliste.sort()
+                       self.genreliste.insert(0, ("Longest", "https://hdzog.com/longest/", default_cover))
+                       self.genreliste.insert(0, ("Most Popular", "https://hdzog.com/popular/", default_cover))
+                       self.genreliste.insert(0, ("Newest", "https://hdzog.com/new/", default_cover))
+                       self.genreliste.insert(0, ("--- Search ---", "callSuchen", default_cover))
+                       self.ml.setList(map(self._defaultlistcenter, self.genreliste))
+                       self.ml.moveToIndex(0)
+                       self.keyLocked = False
+                       self.showInfos()
+
+       def showInfos(self):
+               Image = self['liste'].getCurrent()[0][2]
+               CoverHelper(self['coverArt']).getCover(Image)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Name = self['liste'].getCurrent()[0][0]
+               if Name == "--- Search ---":
+                       self.suchen(suggest_func=self.getSuggestions)
+               else:
+                       Link = self['liste'].getCurrent()[0][1]
+                       self.session.open(hdzogFilmScreen, Link, Name)
+
+       def SuchenCallback(self, callback = None):
+               if callback is not None and len(callback):
+                       Name = "--- Search ---"
+                       self.suchString = callback
+                       Link = urllib.quote(self.suchString).replace(' ', '+')
+                       self.session.open(hdzogFilmScreen, Link, Name)
+
+       def getSuggestions(self, text, max_res):
+               url = "https://hdzog.com/suggesters.php?char=%s" % urllib.quote_plus(text)
+               d = twAgentGetPage(url, agent=agent, headers=json_headers, timeout=5)
+               d.addCallback(self.gotSuggestions, max_res)
+               d.addErrback(self.gotSuggestions, max_res, err=True)
+               return d
+
+       def gotSuggestions(self, suggestions, max_res, err=False):
+               list = []
+               if not err and type(suggestions) in (str, buffer):
+                       suggestions = json.loads(suggestions)
+                       for item in suggestions:
+                               li = item
+                               list.append(str(li))
+                               max_res -= 1
+                               if not max_res: break
+               elif err:
+                       printl(str(suggestions),self,'E')
+               return list
+
+class hdzogFilmScreen(MPScreen, ThumbsHelper):
+
+       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,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft,
+                       "nextBouquet" : self.keyPageUp,
+                       "prevBouquet" : self.keyPageDown,
+                       "green" : self.keyPageNumber
+               }, -1)
+
+               self['title'] = Label("HDZog.com")
+               self['ContentTitle'] = Label("Genre: %s" % self.Name)
+               self['F2'] = Label(_("Page"))
+
+               self['Page'] = Label(_("Page:"))
+               self.keyLocked = True
+               self.page = 1
+               self.lastpage = 1
+
+               self.filmliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.loadPage)
+
+       def loadPage(self):
+               self.keyLocked = True
+               self['name'].setText(_('Please wait...'))
+               self.filmliste = []
+               if re.match(".*Search", self.Name):
+                       url = "https://hdzog.com/search/%s/?q=%s" % (str(self.page), self.Link)
+               else:
+                       if self.page == 1:
+                               url = self.Link
+                       else:
+                               url = "%s%s/" % (self.Link, str(self.page))
+               twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.loadData).addErrback(self.dataError)
+
+       def loadData(self, data):
+               self.getLastPage(data, 'class="pagination"(.*?)</div><!-- poagination -->')
+               Movies = re.findall('href="(http[s]?://hdzog.com/videos/.*?)".*?img\sclass.*?src="(.*?)"\salt="(.*?)".*?class="time">(.*?)</span.*?class="added">(.*?)</span', data, re.S)
+               if Movies:
+                       for (Url, Image, Title, Runtime, Added) in Movies:
+                               if not Url.startswith('http'):
+                                       Url = 'https://hdzog.com' + Url
+                               Added = Added.replace('Added: ','')
+                               self.filmliste.append((decodeHtml(Title), Url, Image, Runtime, Added))
+               if len(self.filmliste) == 0:
+                       self.filmliste.append((_('No videos found!'), None, None, '', ''))
+               self.ml.setList(map(self._defaultlistleft, self.filmliste))
+               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):
+               title = self['liste'].getCurrent()[0][0]
+               pic = self['liste'].getCurrent()[0][2]
+               runtime = self['liste'].getCurrent()[0][3]
+               added = self['liste'].getCurrent()[0][4]
+               self['name'].setText(title)
+               self['handlung'].setText("Runtime: %s\nAdded: %s" % (runtime, added))
+               CoverHelper(self['coverArt']).getCover(pic)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Link = self['liste'].getCurrent()[0][1]
+               if Link:
+                       self.keyLocked = True
+                       twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def getVideoPage(self, data, Link):
+               global ctarget
+               if not ctarget:
+                       playerlib = re.findall('<script src="(/assets/playerlib.*?\.js)"', data, re.S)
+                       url = "https://hdzog.com" + playerlib[0]
+                       twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.fetchctarget, Link).addErrback(self.dataError)
+               else:
+                       pC3 = re.findall("pC3:'(.*?)',", data, re.S)
+                       video_id = re.findall('(?:\"|\'|)video_id(?:\"|\'|): (\d+),', data, re.S)
+                       if pC3 and video_id:
+                               postdata = {'param': video_id[0]+','+pC3[0]}
+                               twAgentGetPage(ctarget, method='POST', postdata=urlencode(postdata), agent=agent, cookieJar=cookies, headers={'Content-Type':'application/x-www-form-urlencoded','Referer':Link}).addCallback(self.playVideo).addErrback(self.dataError)
+
+       def fetchctarget(self, data, Link):
+               curl = re.findall(';c.action="(.*?)";', data, re.S)
+               global ctarget
+               ctarget = "https://hdzog.com" + curl[0]
+               twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def playVideo(self, data):
+               video = re.findall('\[\{"video_url":"(.*?)",', data, re.S)
+               self.keyLocked = False
+               if video:
+                       url = video[0]
+                       chr = {'A':'\u0410', 'B':'\u0412', 'C':'\u0421', 'E':'\u0415', 'M':'\u041c', '/':',', '+':'.', '=':'~'}
+                       for i in chr:
+                               url = url.replace(chr[i], i)
+                       url = base64.b64decode(url)
+                       Title = self['liste'].getCurrent()[0][0]
+                       mp_globals.player_agent = agent
+                       self.session.open(SimplePlayer, [(Title, url)], showPlaylist=False, ltype='hdzog')
\ No newline at end of file
diff --git a/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/hotmovs.py b/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/hotmovs.py
new file mode 100644 (file)
index 0000000..36be1f9
--- /dev/null
@@ -0,0 +1,262 @@
+# -*- coding: utf-8 -*-
+#######################################################################################################
+#
+#    MediaPortal for Dreambox OS
+#
+#    Coded by MediaPortal Team (c) 2013-2019
+#
+#  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 Plugins.Extensions.MediaPortal.plugin import _
+from Plugins.Extensions.MediaPortal.resources.imports import *
+import base64
+
+agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36'
+json_headers = {
+       'Accept':'*/*',
+       'Accept-Encoding':'deflate',
+       'Accept-Language':'de,en-US;q=0.7,en;q=0.3',
+       'X-Requested-With':'XMLHttpRequest',
+       'Content-Type':'application/x-www-form-urlencoded'
+       }
+default_cover = "file://%s/hotmovs.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
+cookies = CookieJar()
+ctarget = None
+
+class hotmovsGenreScreen(MPScreen):
+
+       def __init__(self, session):
+               MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
+
+               self["actions"] = ActionMap(["MP_Actions"], {
+                       "ok" : self.keyOK,
+                       "0" : self.closeAll,
+                       "cancel" : self.keyCancel,
+                       "up" : self.keyUp,
+                       "down" : self.keyDown,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft
+               }, -1)
+
+               self['title'] = Label("HotMovs.com")
+               self['ContentTitle'] = Label("Genre:")
+
+               self.keyLocked = True
+               self.suchString = ''
+
+               self.genreliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.keyLocked = True
+               url = "https://hotmovs.com/categories/"
+               twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.genreData).addErrback(self.dataError)
+
+       def genreData(self, data):
+               Cats = re.findall('class="item">.*?href="(.*?)"\stitle="(.*?)".*?img\ssrc="(.*?)"', data, re.S)
+               if Cats:
+                       for (Url, Title, Image) in Cats:
+                               self.genreliste.append((Title, Url, Image))
+                       self.genreliste.sort()
+                       self.genreliste.insert(0, ("Longest", "https://hotmovs.com/longest/", default_cover))
+                       self.genreliste.insert(0, ("Most Popular", "https://hotmovs.com/most-popular/", default_cover))
+                       self.genreliste.insert(0, ("Top Rated", "https://hotmovs.com/top-rated/", default_cover))
+                       self.genreliste.insert(0, ("Newest", "https://hotmovs.com/latest-updates/", default_cover))
+                       self.genreliste.insert(0, ("--- Search ---", "callSuchen", default_cover))
+                       self.ml.setList(map(self._defaultlistcenter, self.genreliste))
+                       self.ml.moveToIndex(0)
+                       self.keyLocked = False
+                       self.showInfos()
+
+       def showInfos(self):
+               Image = self['liste'].getCurrent()[0][2]
+               CoverHelper(self['coverArt']).getCover(Image)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Name = self['liste'].getCurrent()[0][0]
+               if Name == "--- Search ---":
+                       self.suchen(suggest_func=self.getSuggestions)
+               else:
+                       Link = self['liste'].getCurrent()[0][1]
+                       self.session.open(hotmovsFilmScreen, Link, Name)
+
+       def SuchenCallback(self, callback = None):
+               if callback is not None and len(callback):
+                       Name = "--- Search ---"
+                       self.suchString = callback
+                       Link = urllib.quote(self.suchString).replace(' ', '+')
+                       self.session.open(hotmovsFilmScreen, Link, Name)
+
+       def getSuggestions(self, text, max_res):
+               url = "https://hotmovs.com/suggesters.php?char=%s" % urllib.quote_plus(text)
+               d = twAgentGetPage(url, agent=agent, headers=json_headers, timeout=5)
+               d.addCallback(self.gotSuggestions, max_res)
+               d.addErrback(self.gotSuggestions, max_res, err=True)
+               return d
+
+       def gotSuggestions(self, suggestions, max_res, err=False):
+               list = []
+               if not err and type(suggestions) in (str, buffer):
+                       suggestions = json.loads(suggestions)
+                       for item in suggestions:
+                               li = item
+                               list.append(str(li))
+                               max_res -= 1
+                               if not max_res: break
+               elif err:
+                       printl(str(suggestions),self,'E')
+               return list
+
+class hotmovsFilmScreen(MPScreen, ThumbsHelper):
+
+       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,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft,
+                       "nextBouquet" : self.keyPageUp,
+                       "prevBouquet" : self.keyPageDown,
+                       "green" : self.keyPageNumber
+               }, -1)
+
+               self['title'] = Label("HotMovs.com")
+               self['ContentTitle'] = Label("Genre: %s" % self.Name)
+               self['F2'] = Label(_("Page"))
+
+               self['Page'] = Label(_("Page:"))
+               self.keyLocked = True
+               self.page = 1
+               self.lastpage = 1
+
+               self.filmliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.loadPage)
+
+       def loadPage(self):
+               self.keyLocked = True
+               self['name'].setText(_('Please wait...'))
+               self.filmliste = []
+               if re.match(".*Search", self.Name):
+                       url = "https://hotmovs.com/search/"
+                       postdata = {
+                       'mode':'async',
+                       'function':'get_block',
+                       'block_id':'list_videos_videos_list_search_result',
+                       'q':urllib.unquote(self.Link),
+                       'from':str(self.page),
+                       }
+                       twAgentGetPage(url, method='POST', agent=agent, cookieJar=cookies, postdata=urlencode(postdata), headers=json_headers).addCallback(self.loadData).addErrback(self.dataError)
+               else:
+                       if self.page == 1:
+                               url = self.Link
+                       else:
+                               url = "%s%s/" % (self.Link, str(self.page))
+                       twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.loadData).addErrback(self.dataError)
+
+       def loadData(self, data):
+               self.getLastPage(data, 'class="pagination(.*?)</div>', '.*>((?:\d+.|)\d+)<')
+               Movies = re.findall('data-video-id=.*?href="(.*?)".*?img.*?src="(.*?)"\s{0,1}alt="(.*?)(?:"|,).*?class="thumbnail__info__right">(.*?)</div', data, re.S)
+               if Movies:
+                       for (Url, Image, Title, Runtime) in Movies:
+                               if not Url.startswith('http'):
+                                       Url = 'https://hotmovs.com' + Url
+                               self.filmliste.append((decodeHtml(Title), Url, Image, Runtime))
+               if len(self.filmliste) == 0:
+                       self.filmliste.append((_('No videos found!'), None, None, ''))
+               self.ml.setList(map(self._defaultlistleft, self.filmliste))
+               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):
+               title = self['liste'].getCurrent()[0][0]
+               pic = self['liste'].getCurrent()[0][2]
+               runtime = self['liste'].getCurrent()[0][3]
+               self['name'].setText(title)
+               self['handlung'].setText("Runtime: %s" % runtime)
+               CoverHelper(self['coverArt']).getCover(pic)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Link = self['liste'].getCurrent()[0][1]
+               if Link:
+                       self.keyLocked = True
+                       twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def getVideoPage(self, data, Link):
+               global ctarget
+               if not ctarget:
+                       playerlib = re.findall('<script src="(/assets/playerlib.*?\.js)"', data, re.S)
+                       url = "https://hotmovs.com" + playerlib[0]
+                       twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.fetchctarget, Link).addErrback(self.dataError)
+               else:
+                       pC3 = re.findall("pC3:'(.*?)',", data, re.S)
+                       video_id = re.findall('(?:\"|\'|)video_id(?:\"|\'|): (\d+),', data, re.S)
+                       if pC3 and video_id:
+                               postdata = {'param': video_id[0]+','+pC3[0]}
+                               twAgentGetPage(ctarget, method='POST', postdata=urlencode(postdata), agent=agent, cookieJar=cookies, headers={'Content-Type':'application/x-www-form-urlencoded','Referer':Link}).addCallback(self.playVideo).addErrback(self.dataError)
+
+       def fetchctarget(self, data, Link):
+               curl = re.findall(';c.action="(.*?)";', data, re.S)
+               global ctarget
+               ctarget = "https://hotmovs.com" + curl[0]
+               twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def playVideo(self, data):
+               video = re.findall('\[\{"video_url":"(.*?)",', data, re.S)
+               self.keyLocked = False
+               if video:
+                       url = video[0]
+                       chr = {'A':'\u0410', 'B':'\u0412', 'C':'\u0421', 'E':'\u0415', 'M':'\u041c', '/':',', '+':'.', '=':'~'}
+                       for i in chr:
+                               url = url.replace(chr[i], i)
+                       url = base64.b64decode(url)
+                       Title = self['liste'].getCurrent()[0][0]
+                       mp_globals.player_agent = agent
+                       self.session.open(SimplePlayer, [(Title, url)], showPlaylist=False, ltype='hotmovs')
\ No newline at end of file
index 71ce293..d7e09e4 100644 (file)
@@ -154,7 +154,7 @@ class porncomGenreScreen(MPScreen):
                        suggestions = json.loads(suggestions)
                        for item in suggestions:
                                if not item.has_key('separator'):
-                                       li = item['label']
+                                       li = item['label']['term']
                                        list.append(str(li))
                                        max_res -= 1
                                        if not max_res: break
index 0a36861..0506b4d 100644 (file)
@@ -170,7 +170,9 @@ class porntvGenreScreen(MPScreen):
                        parse = re.search('class="universalheader">(.*?)$', data, re.S)
                        if not parse:
                                parse = re.search('id="load">(.*?)$', data, re.S)
-               Cats = re.findall('(?:class="item"|<div style=).*?href="(.*?)">(?:<font size=3><b>|)(.*?)(?:</a|</b></font>).*?(?:cat-img"|img).src="(.*?)"', parse.group(1), re.S)
+                               if not parse:
+                                       parse = re.search('class="cat-list(.*?)class="cat-list', data, re.S)
+               Cats = re.findall('(?:class="item"|<div style=).*?href="(.*?)">(?:<font size=3><b>|)(.*?)(?:</a|</b></font>).*?(?:cat-img"|img|loading="lazy").src="(.*?)"', parse.group(1), re.S)
                if Cats:
                        for (Url, Title, Image) in Cats:
                                if Url.endswith('.html'):
@@ -314,7 +316,7 @@ class porntvFilmScreen(MPScreen, ThumbsHelper):
                self.getLastPage(data, '(?:class="pagination"|class="pages2">)(.*?)</div>')
                Items = re.findall('class="(?:item"|thumb"|group)(.*?(?:clock.*?</span>|infoBox.*?</div>|class="ago">.*?</div>|Views: <strong>.*?</p>))', data, re.S)
                for item in Items:
-                       Movies = re.findall('href="(.*?)".*?img(?: class="pop-execute"|)\ssrc="(.*?)"\swidth="\d+"\sheight="\d+".*?alt="(.*?)"(.*?clock.*?</span>|.*?infoBox.*?</div>|.*?class="ago">.*?</div>|.*?Views: <strong>.*?</p>)', item, re.S)
+                       Movies = re.findall('href="(.*?)".*?img(?: loading="lazy"|)(?: class="pop-execute"|)\ssrc="(.*?)"\swidth="\d+"\sheight="\d+".*?alt="(.*?)"(.*?clock.*?</span>|.*?infoBox.*?</div>|.*?class="ago">.*?</div>|.*?Views: <strong>.*?</p>)', item, re.S)
                        if Movies:
                                for (Url, Image, Title, Meta) in Movies:
                                        if "infoBox" in Meta:
diff --git a/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/shemalez.py b/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/shemalez.py
new file mode 100644 (file)
index 0000000..a8b195f
--- /dev/null
@@ -0,0 +1,256 @@
+# -*- coding: utf-8 -*-
+#######################################################################################################
+#
+#    MediaPortal for Dreambox OS
+#
+#    Coded by MediaPortal Team (c) 2013-2019
+#
+#  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 Plugins.Extensions.MediaPortal.plugin import _
+from Plugins.Extensions.MediaPortal.resources.imports import *
+import base64
+
+agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36'
+json_headers = {
+       'Accept':'*/*',
+       'Accept-Encoding':'deflate',
+       'Accept-Language':'de,en-US;q=0.7,en;q=0.3',
+       'X-Requested-With':'XMLHttpRequest',
+       'Content-Type':'application/x-www-form-urlencoded'
+       }
+default_cover = "file://%s/shemalez.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
+cookies = CookieJar()
+ctarget = None
+
+class shemalezGenreScreen(MPScreen):
+
+       def __init__(self, session):
+               MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
+
+               self["actions"] = ActionMap(["MP_Actions"], {
+                       "ok" : self.keyOK,
+                       "0" : self.closeAll,
+                       "cancel" : self.keyCancel,
+                       "up" : self.keyUp,
+                       "down" : self.keyDown,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft
+               }, -1)
+
+               self['title'] = Label("ShemaleZ.com")
+               self['ContentTitle'] = Label("Genre:")
+
+               self.keyLocked = True
+               self.suchString = ''
+
+               self.genreliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.keyLocked = True
+               url = "https://shemalez.com/categories/"
+               twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.genreData).addErrback(self.dataError)
+
+       def genreData(self, data):
+               Cats = re.findall('class="thumb__link".*?href="(.*?)".*?img\sclass="thumb__img"\ssrc="(.*?)"\salt="(.*?)"', data, re.S)
+               if Cats:
+                       for (Url, Image, Title) in Cats:
+                               self.genreliste.append((Title, Url, Image))
+                       self.genreliste.sort()
+                       self.genreliste.insert(0, ("Most Popular", "https://shemalez.com/most-popular/", default_cover))
+                       self.genreliste.insert(0, ("Top Rated", "https://shemalez.com/top-rated/", default_cover))
+                       self.genreliste.insert(0, ("Newest", "https://shemalez.com/latest-updates/", default_cover))
+                       self.genreliste.insert(0, ("--- Search ---", "callSuchen", default_cover))
+                       self.ml.setList(map(self._defaultlistcenter, self.genreliste))
+                       self.ml.moveToIndex(0)
+                       self.keyLocked = False
+                       self.showInfos()
+
+       def showInfos(self):
+               Image = self['liste'].getCurrent()[0][2]
+               CoverHelper(self['coverArt']).getCover(Image)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Name = self['liste'].getCurrent()[0][0]
+               if Name == "--- Search ---":
+                       self.suchen(suggest_func=self.getSuggestions)
+               else:
+                       Link = self['liste'].getCurrent()[0][1]
+                       self.session.open(shemalezFilmScreen, Link, Name)
+
+       def SuchenCallback(self, callback = None):
+               if callback is not None and len(callback):
+                       Name = "--- Search ---"
+                       self.suchString = callback
+                       Link = urllib.quote(self.suchString).replace(' ', '+')
+                       self.session.open(shemalezFilmScreen, Link, Name)
+
+       def getSuggestions(self, text, max_res):
+               url = "https://shemalez.com/suggesters.php?char=%s" % urllib.quote_plus(text)
+               d = twAgentGetPage(url, agent=agent, headers=json_headers, timeout=5)
+               d.addCallback(self.gotSuggestions, max_res)
+               d.addErrback(self.gotSuggestions, max_res, err=True)
+               return d
+
+       def gotSuggestions(self, suggestions, max_res, err=False):
+               list = []
+               if not err and type(suggestions) in (str, buffer):
+                       suggestions = json.loads(suggestions)
+                       for item in suggestions:
+                               li = item
+                               list.append(str(li))
+                               max_res -= 1
+                               if not max_res: break
+               elif err:
+                       printl(str(suggestions),self,'E')
+               return list
+
+class shemalezFilmScreen(MPScreen, ThumbsHelper):
+
+       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,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft,
+                       "nextBouquet" : self.keyPageUp,
+                       "prevBouquet" : self.keyPageDown,
+                       "green" : self.keyPageNumber
+               }, -1)
+
+               self['title'] = Label("ShemaleZ.com")
+               self['ContentTitle'] = Label("Genre: %s" % self.Name)
+               self['F2'] = Label(_("Page"))
+
+               self['Page'] = Label(_("Page:"))
+               self.keyLocked = True
+               self.page = 1
+               self.lastpage = 1
+
+               self.filmliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.loadPage)
+
+       def loadPage(self):
+               self.keyLocked = True
+               self['name'].setText(_('Please wait...'))
+               self.filmliste = []
+               if re.match(".*Search", self.Name):
+                       url = "https://shemalez.com/search/%s/?q=%s" % (str(self.page), self.Link)
+               else:
+                       if self.page == 1:
+                               url = self.Link
+                       else:
+                               url = "%s%s/" % (self.Link, str(self.page))
+               twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.loadData).addErrback(self.dataError)
+
+       def loadData(self, data):
+               self.getLastPage(data, 'class="pagination\s{0,2}"(.*?)</div>', '.*\s(\d+)')
+               Movies = re.findall('class="thumb__link".*?href="(.*?)".*?img.*?src="(.*?)"\s{0,1}alt="(.*?)(?:"|,).*?class="thumb__duration">(.*?)</span.*?class="thumb__view">(.*?)</span', data, re.S)
+               if Movies:
+                       for (Url, Image, Title, Runtime, Views) in Movies:
+                               Runtime = Runtime.replace('h','').replace('m','').replace('s','')
+                               Views = stripAllTags(Views).strip().replace(',','')
+                               if not Url.startswith('https'):
+                                       Url = 'https://shemalez.com' + Url
+                               self.filmliste.append((decodeHtml(Title), Url, Image, Runtime, Views))
+               if len(self.filmliste) == 0:
+                       self.filmliste.append((_('No videos found!'), None, None, ''))
+               self.ml.setList(map(self._defaultlistleft, self.filmliste))
+               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):
+               title = self['liste'].getCurrent()[0][0]
+               pic = self['liste'].getCurrent()[0][2]
+               runtime = self['liste'].getCurrent()[0][3]
+               views = self['liste'].getCurrent()[0][4]
+               self['name'].setText(title)
+               self['handlung'].setText("Runtime: %s\nViews: %s" % (runtime, views))
+               CoverHelper(self['coverArt']).getCover(pic)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Link = self['liste'].getCurrent()[0][1]
+               if Link:
+                       self.keyLocked = True
+                       twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def getVideoPage(self, data, Link):
+               global ctarget
+               if not ctarget:
+                       playerlib = re.findall('<script src="(/assets/playerlib.*?\.js)"', data, re.S)
+                       url = "https://shemalez.com" + playerlib[0]
+                       twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.fetchctarget, Link).addErrback(self.dataError)
+               else:
+                       pC3 = re.findall("pC3:'(.*?)',", data, re.S)
+                       video_id = re.findall('(?:\"|\'|)video_id(?:\"|\'|): (\d+),', data, re.S)
+                       if pC3 and video_id:
+                               postdata = {'param': video_id[0]+','+pC3[0]}
+                               twAgentGetPage(ctarget, method='POST', postdata=urlencode(postdata), agent=agent, cookieJar=cookies, headers={'Content-Type':'application/x-www-form-urlencoded','Referer':Link}).addCallback(self.playVideo).addErrback(self.dataError)
+
+       def fetchctarget(self, data, Link):
+               curl = re.findall(';c.action="(.*?)";', data, re.S)
+               global ctarget
+               ctarget = "https://shemalez.com" + curl[0]
+               twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def playVideo(self, data):
+               video = re.findall('\[\{"video_url":"(.*?)",', data, re.S)
+               self.keyLocked = False
+               if video:
+                       url = video[0]
+                       chr = {'A':'\u0410', 'B':'\u0412', 'C':'\u0421', 'E':'\u0415', 'M':'\u041c', '/':',', '+':'.', '=':'~'}
+                       for i in chr:
+                               url = url.replace(chr[i], i)
+                       url = base64.b64decode(url)
+                       Title = self['liste'].getCurrent()[0][0]
+                       mp_globals.player_agent = agent
+                       self.session.open(SimplePlayer, [(Title, url)], showPlaylist=False, ltype='shemalez')
\ No newline at end of file
diff --git a/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/tubepornclassic.py b/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/tubepornclassic.py
new file mode 100644 (file)
index 0000000..eb3a2f8
--- /dev/null
@@ -0,0 +1,251 @@
+# -*- coding: utf-8 -*-
+#######################################################################################################
+#
+#    MediaPortal for Dreambox OS
+#
+#    Coded by MediaPortal Team (c) 2013-2019
+#
+#  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 Plugins.Extensions.MediaPortal.plugin import _
+from Plugins.Extensions.MediaPortal.resources.imports import *
+import base64
+
+agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36'
+json_headers = {
+       'Accept':'*/*',
+       'Accept-Encoding':'deflate',
+       'Accept-Language':'de,en-US;q=0.7,en;q=0.3',
+       'X-Requested-With':'XMLHttpRequest',
+       'Content-Type':'application/x-www-form-urlencoded'
+       }
+baseurl = "https://tubepornclassic.com"
+default_cover = "file://%s/tubepornclassic.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
+cookies = CookieJar()
+ctarget = None
+
+class tubepornclassicGenreScreen(MPScreen):
+
+       def __init__(self, session):
+               MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
+
+               self["actions"] = ActionMap(["MP_Actions"], {
+                       "ok" : self.keyOK,
+                       "0" : self.closeAll,
+                       "cancel" : self.keyCancel
+               }, -1)
+
+               self['title'] = Label("TubePornClassic.com")
+               self['ContentTitle'] = Label("Genre:")
+
+               self.keyLocked = True
+               self.suchString = ''
+
+               self.genreliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.keyLocked = True
+               url = "https://tubepornclassic.com/categories/"
+               twAgentGetPage(url, agent=agent, cookieJar=cookies, headers={'Cookie': 'language=en'}).addCallback(self.genreData).addErrback(self.dataError)
+
+       def genreData(self, data):
+               parse = re.search('id="filter-categories(.*?)</html>', data, re.S)
+               Cats = re.findall('class="list-item__link" href=".*?tubepornclassic.com(.*?)" title=".*?">(.*?)</a>', parse.group(1), re.S)
+               if Cats:
+                       for (Url, Title) in Cats:
+                               Url = baseurl + Url
+                               self.genreliste.append((Title, Url))
+                       self.genreliste.sort()
+                       self.genreliste.insert(0, ("Most Popular", "%s/most-popular/" % baseurl))
+                       self.genreliste.insert(0, ("Top Rated", "%s/top-rated/" % baseurl))
+                       self.genreliste.insert(0, ("Most Recent", "%s/latest-updates/" % baseurl))
+                       self.genreliste.insert(0, ("--- Search ---", ""))
+                       self.ml.setList(map(self._defaultlistcenter, self.genreliste))
+                       self.keyLocked = False
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Name = self['liste'].getCurrent()[0][0]
+               Link = self['liste'].getCurrent()[0][1]
+               if Name == "--- Search ---":
+                       self.suchen(suggest_func=self.getSuggestions)
+               else:
+                       Link = self['liste'].getCurrent()[0][1]
+                       self.session.open(tubepornclassicFilmScreen, Link, Name)
+
+       def SuchenCallback(self, callback = None):
+               if callback is not None and len(callback):
+                       Name = "--- Search ---"
+                       self.suchString = callback
+                       Link = urllib.quote(self.suchString).replace(' ', '+')
+                       self.session.open(tubepornclassicFilmScreen, Link, Name)
+
+       def getSuggestions(self, text, max_res):
+               url = "https://tubepornclassic.com/suggesters.php?char=%s" % urllib.quote_plus(text)
+               d = twAgentGetPage(url, agent=agent, headers=json_headers, timeout=5)
+               d.addCallback(self.gotSuggestions, max_res)
+               d.addErrback(self.gotSuggestions, max_res, err=True)
+               return d
+
+       def gotSuggestions(self, suggestions, max_res, err=False):
+               list = []
+               if not err and type(suggestions) in (str, buffer):
+                       suggestions = json.loads(suggestions)
+                       for item in suggestions:
+                               li = item
+                               list.append(str(li))
+                               max_res -= 1
+                               if not max_res: break
+               elif err:
+                       printl(str(suggestions),self,'E')
+               return list
+
+class tubepornclassicFilmScreen(MPScreen, ThumbsHelper):
+
+       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,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft,
+                       "nextBouquet" : self.keyPageUp,
+                       "prevBouquet" : self.keyPageDown,
+                       "green" : self.keyPageNumber
+               }, -1)
+
+               self['title'] = Label("TubePornClassic.com")
+               self['ContentTitle'] = Label("Genre: %s" % self.Name)
+               self['F2'] = Label(_("Page"))
+
+               self['Page'] = Label(_("Page:"))
+               self.keyLocked = True
+               self.page = 1
+               self.lastpage = 1
+
+               self.filmliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.loadPage)
+
+       def loadPage(self):
+               self.keyLocked = True
+               self['name'].setText(_('Please wait...'))
+               self.filmliste = []
+               if not re.search('Search', self.Name):
+                       url = "%s%s/" % (self.Link, str(self.page))
+               else:
+                       url = "https://tubepornclassic.com/search/%s/?mode=async&function=get_block&block_id=list_videos_videos_list_search_result&from_videos=%s" % (self.Link, self.page)
+               twAgentGetPage(url, agent=agent, cookieJar=cookies, headers={'Cookie': 'language=en'}).addCallback(self.loadData).addErrback(self.dataError)
+
+       def loadData(self, data):
+               data = data.replace('https://tubepornclassic.com/videos', 'https://de.tubepornclassic.com/videos')
+               self.getLastPage(data, 'class="pagination"(.*?)</div>', '.*>\s{0,80}(\d+)\s{0,80}<')
+               Movies = re.findall('class="item.*?<a\shref="(https?://de.tubepornclassic.com/videos/.*?)".*?class="thumb.*?src="(.*?)".*?\s+alt="(.*?)".*?class="duration">(.*?)</div.*?class="added">(.*?)</div.*?class="views ico ico-eye">(.*?)</div', data, re.S)
+               if Movies:
+                       for (Url, Image, Title, Runtime, Added, Views) in Movies:
+                               if "240x180" in Image:
+                                       Image = Image.split('240x180')[0] + "preview.jpg"
+                               self.filmliste.append((decodeHtml(Title), Url, Image, Runtime, Views.replace(' ',''), stripAllTags(Added)))
+               if len(self.filmliste) == 0:
+                       self.filmliste.append((_('No videos found!'), None, None, None, None, None))
+               self.ml.setList(map(self._defaultlistleft, self.filmliste))
+               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):
+               Url = self['liste'].getCurrent()[0][1]
+               if Url == None:
+                       return
+               title = self['liste'].getCurrent()[0][0]
+               pic = self['liste'].getCurrent()[0][2]
+               runtime = self['liste'].getCurrent()[0][3]
+               views = self['liste'].getCurrent()[0][4]
+               added = self['liste'].getCurrent()[0][5]
+               self['name'].setText(title)
+               self['handlung'].setText("Runtime: %s\nViews: %s\nAdded: %s" % (runtime, views, added))
+               CoverHelper(self['coverArt']).getCover(pic)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Link = self['liste'].getCurrent()[0][1]
+               if Link == None:
+                       return
+               self.keyLocked = True
+               twAgentGetPage(Link, agent=agent, cookieJar=cookies, headers={'Cookie': 'language=en'}).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def getVideoPage(self, data, Link):
+               global ctarget
+               if not ctarget:
+                       playerlib = re.findall('<script src="(/assets/playerlib.*?\.js)"', data, re.S)
+                       url = baseurl + playerlib[0]
+                       twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.fetchctarget, Link).addErrback(self.dataError)
+               else:
+                       pC3 = re.findall("pC3:'(.*?)',", data, re.S)
+                       video_id = re.findall('(?:\"|\'|)video_id(?:\"|\'|): (\d+),', data, re.S)
+                       if pC3 and video_id:
+                               postdata = {'param': video_id[0]+','+pC3[0]}
+                               twAgentGetPage(ctarget, method='POST', postdata=urlencode(postdata), agent=agent, cookieJar=cookies, headers={'Content-Type':'application/x-www-form-urlencoded','Referer':Link.replace('de.','')}).addCallback(self.playVideo).addErrback(self.dataError)
+
+       def fetchctarget(self, data, Link):
+               curl = re.findall(';c.action="(.*?)";', data, re.S)
+               global ctarget
+               ctarget = baseurl + curl[0]
+               twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def playVideo(self, data):
+               video = re.findall('\[\{"video_url":"(.*?)",', data, re.S)
+               self.keyLocked = False
+               if video:
+                       url = video[0]
+                       chr = {'A':'\u0410', 'B':'\u0412', 'C':'\u0421', 'E':'\u0415', 'M':'\u041c', '/':',', '+':'.', '=':'~'}
+                       for i in chr:
+                               url = url.replace(chr[i], i)
+                       url = base64.b64decode(url)
+                       Title = self['liste'].getCurrent()[0][0]
+                       mp_globals.player_agent = agent
+                       self.session.open(SimplePlayer, [(Title, url)], showPlaylist=False, ltype='tubepornclassics')
\ No newline at end of file
diff --git a/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/txxx.py b/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/txxx.py
new file mode 100644 (file)
index 0000000..a7f19b6
--- /dev/null
@@ -0,0 +1,255 @@
+# -*- coding: utf-8 -*-
+#######################################################################################################
+#
+#    MediaPortal for Dreambox OS
+#
+#    Coded by MediaPortal Team (c) 2013-2019
+#
+#  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 Plugins.Extensions.MediaPortal.plugin import _
+from Plugins.Extensions.MediaPortal.resources.imports import *
+import base64
+
+agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36'
+json_headers = {
+       'Accept':'application/json',
+       'Accept-Language':'de,en-US;q=0.7,en;q=0.3',
+       'X-Requested-With':'XMLHttpRequest',
+       'Content-Type':'application/x-www-form-urlencoded',
+       }
+default_cover = "file://%s/txxx.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
+cookies = CookieJar()
+ctarget = None
+
+class txxxGenreScreen(MPScreen):
+
+       def __init__(self, session):
+               MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
+
+               self["actions"] = ActionMap(["MP_Actions"], {
+                       "ok" : self.keyOK,
+                       "0" : self.closeAll,
+                       "cancel" : self.keyCancel,
+                       "up" : self.keyUp,
+                       "down" : self.keyDown,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft
+               }, -1)
+
+               self['title'] = Label("TXXX.com")
+               self['ContentTitle'] = Label("Genre:")
+
+               self.keyLocked = True
+               self.suchString = ''
+
+               self.genreliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.keyLocked = True
+               url = "https://txxx.com/categories/"
+               twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.genreData).addErrback(self.dataError)
+
+       def genreData(self, data):
+               Cats = re.findall(' class="categories-list__item" data-name=".*?href="(.*?)".*?data-title=.*?span>(.*?)</', data, re.S)
+               if Cats:
+                       for (Url, Title) in Cats:
+                               Url = "https://txxx.com" + Url
+                               self.genreliste.append((Title, Url, default_cover))
+                       self.genreliste.sort()
+                       self.genreliste.insert(0, ("Longest", "https://txxx.com/longest/", default_cover))
+                       self.genreliste.insert(0, ("Most Popular", "https://txxx.com/most-popular/", default_cover))
+                       self.genreliste.insert(0, ("Top Rated", "https://txxx.com/top-rated/", default_cover))
+                       self.genreliste.insert(0, ("Newest", "https://txxx.com/latest-updates/", default_cover))
+                       self.genreliste.insert(0, ("--- Search ---", "callSuchen", default_cover))
+                       self.ml.setList(map(self._defaultlistcenter, self.genreliste))
+                       self.ml.moveToIndex(0)
+                       self.keyLocked = False
+                       self.showInfos()
+
+       def showInfos(self):
+               Image = self['liste'].getCurrent()[0][2]
+               CoverHelper(self['coverArt']).getCover(Image)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Name = self['liste'].getCurrent()[0][0]
+               if Name == "--- Search ---":
+                       self.suchen(suggest_func=self.getSuggestions)
+               else:
+                       Link = self['liste'].getCurrent()[0][1]
+                       self.session.open(txxxFilmScreen, Link, Name)
+
+       def SuchenCallback(self, callback = None):
+               if callback is not None and len(callback):
+                       Name = "--- Search ---"
+                       self.suchString = callback
+                       Link = '%s' + urllib.quote(self.suchString).replace(' ', '+')
+                       self.session.open(txxxFilmScreen, Link, Name)
+
+       def getSuggestions(self, text, max_res):
+               url = "https://txxx.com/cloudsearch/suggesters.php?char=%s" % urllib.quote_plus(text)
+               d = twAgentGetPage(url, agent=agent, headers=json_headers, timeout=5)
+               d.addCallback(self.gotSuggestions, max_res)
+               d.addErrback(self.gotSuggestions, max_res, err=True)
+               return d
+
+       def gotSuggestions(self, suggestions, max_res, err=False):
+               list = []
+               if not err and type(suggestions) in (str, buffer):
+                       suggestions = json.loads(suggestions)
+                       for item in suggestions:
+                               li = item
+                               list.append(str(li))
+                               max_res -= 1
+                               if not max_res: break
+               elif err:
+                       printl(str(suggestions),self,'E')
+               return list
+
+class txxxFilmScreen(MPScreen, ThumbsHelper):
+
+       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,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft,
+                       "nextBouquet" : self.keyPageUp,
+                       "prevBouquet" : self.keyPageDown,
+                       "green" : self.keyPageNumber
+               }, -1)
+
+               self['title'] = Label("TXXX.com")
+               self['ContentTitle'] = Label("Genre: %s" % self.Name)
+               self['F2'] = Label(_("Page"))
+
+               self['Page'] = Label(_("Page:"))
+               self.keyLocked = True
+               self.page = 1
+               self.lastpage = 1
+
+               self.filmliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.loadPage)
+
+       def loadPage(self):
+               self.keyLocked = True
+               self['name'].setText(_('Please wait...'))
+               self.filmliste = []
+               if re.match(".*Search", self.Name):
+                       url = "https://txxx.com/search/%s/?s=%s" % (str(self.page), self.Link)
+               else:
+                       if self.page == 1:
+                               url = self.Link
+                       else:
+                               url = "%s%s/" % (self.Link, str(self.page))
+               twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.loadData).addErrback(self.dataError)
+
+       def loadData(self, data):
+               self.getLastPage(data, 'class="paginator\s{0,5}(.*?)</div>', '.*from:\d+">((?:\d+.|)\d+)<')
+               Movies = re.findall('thumb item.*?image:url\(\'(.*?)\'\).*?class="thumb__duration">(.*?)</.*?href="(.*?)">(.*?)</a.*?class="viewed">(?:<i class="i i--size--xs i--color-gray"><svg><use xlink:href="#i--thumb-eye"></use></svg></i>|)(.*?)</span>', data, re.S)
+               if Movies:
+                       for (Image, Runtime, Url, Title, Views) in Movies:
+                               if not Url.startswith('https'):
+                                       Url = 'https://txxx.com' + Url
+                               self.filmliste.append((decodeHtml(Title), Url, Image, Runtime, Views.replace('Just added','0')))
+               if len(self.filmliste) == 0:
+                       self.filmliste.append((_('No videos found!'), None, None, '', ''))
+               self.ml.setList(map(self._defaultlistleft, self.filmliste))
+               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):
+               title = self['liste'].getCurrent()[0][0]
+               pic = self['liste'].getCurrent()[0][2]
+               runtime = self['liste'].getCurrent()[0][3]
+               views = self['liste'].getCurrent()[0][4]
+               self['name'].setText(title)
+               self['handlung'].setText("Runtime: %s\nViews: %s" % (runtime, views))
+               CoverHelper(self['coverArt']).getCover(pic)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Link = self['liste'].getCurrent()[0][1]
+               if Link:
+                       self.keyLocked = True
+                       twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def getVideoPage(self, data, Link):
+               global ctarget
+               if not ctarget:
+                       playerlib = re.findall('<script src="(/assets/playerlib.*?\.js)"', data, re.S)
+                       url = "https://txxx.com" + playerlib[0]
+                       twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.fetchctarget, Link).addErrback(self.dataError)
+               else:
+                       pC3 = re.findall("pC3:'(.*?)',", data, re.S)
+                       video_id = re.findall('(?:\"|\'|)video_id(?:\"|\'|): (\d+),', data, re.S)
+                       if pC3 and video_id:
+                               postdata = {'param': video_id[0]+','+pC3[0]}
+                               twAgentGetPage(ctarget, method='POST', postdata=urlencode(postdata), agent=agent, cookieJar=cookies, headers={'Content-Type':'application/x-www-form-urlencoded','Referer':Link}).addCallback(self.playVideo).addErrback(self.dataError)
+
+       def fetchctarget(self, data, Link):
+               curl = re.findall(';c.action="(.*?)";', data, re.S)
+               global ctarget
+               ctarget = "https://txxx.com" + curl[0]
+               twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def playVideo(self, data):
+               video = re.findall('\[\{"video_url":"(.*?)",', data, re.S)
+               self.keyLocked = False
+               if video:
+                       url = video[0]
+                       chr = {'A':'\u0410', 'B':'\u0412', 'C':'\u0421', 'E':'\u0415', 'M':'\u041c', '/':',', '+':'.', '=':'~'}
+                       for i in chr:
+                               url = url.replace(chr[i], i)
+                       url = base64.b64decode(url)
+                       Title = self['liste'].getCurrent()[0][0]
+                       mp_globals.player_agent = agent
+                       self.session.open(SimplePlayer, [(Title, url)], showPlaylist=False, ltype='txxx')
\ No newline at end of file
diff --git a/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/upornia.py b/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/upornia.py
new file mode 100644 (file)
index 0000000..703225f
--- /dev/null
@@ -0,0 +1,265 @@
+# -*- coding: utf-8 -*-
+#######################################################################################################
+#
+#    MediaPortal for Dreambox OS
+#
+#    Coded by MediaPortal Team (c) 2013-2019
+#
+#  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 Plugins.Extensions.MediaPortal.plugin import _
+from Plugins.Extensions.MediaPortal.resources.imports import *
+import base64
+
+agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36'
+json_headers = {
+       'Accept':'*/*',
+       'Accept-Encoding':'deflate',
+       'Accept-Language':'de,en-US;q=0.7,en;q=0.3',
+       'X-Requested-With':'XMLHttpRequest',
+       'Content-Type':'application/x-www-form-urlencoded'
+       }
+default_cover = "file://%s/upornia.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
+cookies = CookieJar()
+ctarget = None
+
+class uporniaGenreScreen(MPScreen):
+
+       def __init__(self, session):
+               MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
+
+               self["actions"] = ActionMap(["MP_Actions"], {
+                       "ok" : self.keyOK,
+                       "0" : self.closeAll,
+                       "cancel" : self.keyCancel,
+                       "up" : self.keyUp,
+                       "down" : self.keyDown,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft
+               }, -1)
+
+               self['title'] = Label("Upornia.com")
+               self['ContentTitle'] = Label("Genre:")
+
+               self.keyLocked = True
+               self.suchString = ''
+
+               self.genreliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.keyLocked = True
+               url = "https://upornia.com/categories/"
+               twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.genreData).addErrback(self.dataError)
+
+       def genreData(self, data):
+               Cats = re.findall('class="item">.*?href="(.*?)".*?img\ssrc="(.*?)"\salt="(.*?)"', data, re.S)
+               if Cats:
+                       for (Url, Image, Title) in Cats:
+                               self.genreliste.append((Title, Url, Image))
+                       self.genreliste.sort()
+                       self.genreliste.insert(0, ("Longest", "https://upornia.com/longest/", default_cover))
+                       self.genreliste.insert(0, ("Most Popular", "https://upornia.com/most-popular/", default_cover))
+                       self.genreliste.insert(0, ("Top Rated", "https://upornia.com/top-rated/", default_cover))
+                       self.genreliste.insert(0, ("Newest", "https://upornia.com/latest-updates/", default_cover))
+                       self.genreliste.insert(0, ("--- Search ---", "callSuchen", default_cover))
+                       self.ml.setList(map(self._defaultlistcenter, self.genreliste))
+                       self.ml.moveToIndex(0)
+                       self.keyLocked = False
+                       self.showInfos()
+
+       def showInfos(self):
+               Image = self['liste'].getCurrent()[0][2]
+               CoverHelper(self['coverArt']).getCover(Image)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Name = self['liste'].getCurrent()[0][0]
+               if Name == "--- Search ---":
+                       self.suchen(suggest_func=self.getSuggestions)
+               else:
+                       Link = self['liste'].getCurrent()[0][1]
+                       self.session.open(uporniaFilmScreen, Link, Name)
+
+       def SuchenCallback(self, callback = None):
+               if callback is not None and len(callback):
+                       Name = "--- Search ---"
+                       self.suchString = callback
+                       Link = urllib.quote(self.suchString).replace(' ', '+')
+                       self.session.open(uporniaFilmScreen, Link, Name)
+
+       def getSuggestions(self, text, max_res):
+               url = "https://upornia.com/cloudsearch/suggesters.php?char=%s" % urllib.quote_plus(text)
+               d = twAgentGetPage(url, agent=agent, headers=json_headers, timeout=5)
+               d.addCallback(self.gotSuggestions, max_res)
+               d.addErrback(self.gotSuggestions, max_res, err=True)
+               return d
+
+       def gotSuggestions(self, suggestions, max_res, err=False):
+               list = []
+               if not err and type(suggestions) in (str, buffer):
+                       suggestions = json.loads(suggestions)
+                       for item in suggestions:
+                               li = item
+                               list.append(str(li))
+                               max_res -= 1
+                               if not max_res: break
+               elif err:
+                       printl(str(suggestions),self,'E')
+               return list
+
+class uporniaFilmScreen(MPScreen, ThumbsHelper):
+
+       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,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft,
+                       "nextBouquet" : self.keyPageUp,
+                       "prevBouquet" : self.keyPageDown,
+                       "green" : self.keyPageNumber
+               }, -1)
+
+               self['title'] = Label("Upornia.com")
+               self['ContentTitle'] = Label("Genre: %s" % self.Name)
+               self['F2'] = Label(_("Page"))
+
+               self['Page'] = Label(_("Page:"))
+               self.keyLocked = True
+               self.page = 1
+               self.lastpage = 1
+
+               self.filmliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.loadPage)
+
+       def loadPage(self):
+               self.keyLocked = True
+               self['name'].setText(_('Please wait...'))
+               self.filmliste = []
+               if re.match(".*Search", self.Name):
+                       url = "https://upornia.com/search/"
+                       postdata = {
+                       'mode':'async',
+                       'function':'get_block',
+                       'block_id':'list_videos_videos_list_search_result',
+                       'sort_by':'post_date',
+                       'q':urllib.unquote(self.Link),
+                       'category_ids':'',
+                       'from_videos':str(self.page),
+                       'from_albums':str(self.page),
+                       }
+                       twAgentGetPage(url, method='POST', agent=agent, cookieJar=cookies, postdata=urlencode(postdata), headers=json_headers).addCallback(self.loadData).addErrback(self.dataError)
+               else:
+                       if self.page == 1:
+                               url = self.Link
+                       else:
+                               url = "%s%s/" % (self.Link, str(self.page))
+                       twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.loadData).addErrback(self.dataError)
+
+       def loadData(self, data):
+               self.getLastPage(data, '<li class="last">(.*?)</a>', '.*((?:\d+.)\d+)')
+               Movies = re.findall('data-video-id=.*?href="(.*?)".*?img\ssrc="(.*?)"\s{0,1}alt="(.*?)(?:"|,).*?class="thumbnail__info__right">(.*?)</div', data, re.S)
+               if Movies:
+                       for (Url, Image, Title, Runtime) in Movies:
+                               if not Url.startswith('http'):
+                                       Url = 'https://upornia.com' + Url
+                               self.filmliste.append((decodeHtml(Title), Url, Image, Runtime))
+               if len(self.filmliste) == 0:
+                       self.filmliste.append((_('No videos found!'), None, None, ''))
+               self.ml.setList(map(self._defaultlistleft, self.filmliste))
+               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):
+               title = self['liste'].getCurrent()[0][0]
+               pic = self['liste'].getCurrent()[0][2]
+               runtime = self['liste'].getCurrent()[0][3]
+               self['name'].setText(title)
+               self['handlung'].setText("Runtime: %s" % runtime)
+               CoverHelper(self['coverArt']).getCover(pic)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Link = self['liste'].getCurrent()[0][1]
+               if Link:
+                       self.keyLocked = True
+                       twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def getVideoPage(self, data, Link):
+               global ctarget
+               if not ctarget:
+                       playerlib = re.findall('<script src="(/assets/playerlib.*?\.js)"', data, re.S)
+                       url = "https://upornia.com" + playerlib[0]
+                       twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.fetchctarget, Link).addErrback(self.dataError)
+               else:
+                       pC3 = re.findall("pC3:'(.*?)',", data, re.S)
+                       video_id = re.findall('(?:\"|\'|)video_id(?:\"|\'|): (\d+),', data, re.S)
+                       if pC3 and video_id:
+                               postdata = {'param': video_id[0]+','+pC3[0]}
+                               twAgentGetPage(ctarget, method='POST', postdata=urlencode(postdata), agent=agent, cookieJar=cookies, headers={'Content-Type':'application/x-www-form-urlencoded','Referer':Link}).addCallback(self.playVideo).addErrback(self.dataError)
+
+       def fetchctarget(self, data, Link):
+               curl = re.findall(';c.action="(.*?)";', data, re.S)
+               global ctarget
+               ctarget = "https://upornia.com" + curl[0]
+               twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def playVideo(self, data):
+               video = re.findall('\[\{"video_url":"(.*?)",', data, re.S)
+               self.keyLocked = False
+               if video:
+                       url = video[0]
+                       chr = {'A':'\u0410', 'B':'\u0412', 'C':'\u0421', 'E':'\u0415', 'M':'\u041c', '/':',', '+':'.', '=':'~'}
+                       for i in chr:
+                               url = url.replace(chr[i], i)
+                       url = base64.b64decode(url)
+                       Title = self['liste'].getCurrent()[0][0]
+                       mp_globals.player_agent = agent
+                       self.session.open(SimplePlayer, [(Title, url)], showPlaylist=False, ltype='upornia')
\ No newline at end of file
diff --git a/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/vjav.py b/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/vjav.py
new file mode 100644 (file)
index 0000000..c8ceb5a
--- /dev/null
@@ -0,0 +1,259 @@
+# -*- coding: utf-8 -*-
+#######################################################################################################
+#
+#    MediaPortal for Dreambox OS
+#
+#    Coded by MediaPortal Team (c) 2013-2019
+#
+#  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 Plugins.Extensions.MediaPortal.plugin import _
+from Plugins.Extensions.MediaPortal.resources.imports import *
+import base64
+
+agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36'
+json_headers = {
+       'Accept':'*/*',
+       'Accept-Encoding':'deflate',
+       'Accept-Language':'de,en-US;q=0.7,en;q=0.3',
+       'X-Requested-With':'XMLHttpRequest',
+       'Content-Type':'application/x-www-form-urlencoded'
+       }
+default_cover = "file://%s/vjav.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
+cookies = CookieJar()
+ctarget = None
+
+class vjavGenreScreen(MPScreen):
+
+       def __init__(self, session):
+               MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
+
+               self["actions"] = ActionMap(["MP_Actions"], {
+                       "ok" : self.keyOK,
+                       "0" : self.closeAll,
+                       "cancel" : self.keyCancel,
+                       "up" : self.keyUp,
+                       "down" : self.keyDown,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft
+               }, -1)
+
+               self['title'] = Label("VJAV.com")
+               self['ContentTitle'] = Label("Genre:")
+
+               self.keyLocked = True
+               self.suchString = ''
+
+               self.genreliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.keyLocked = True
+               url = "https://vjav.com/categories/"
+               twAgentGetPage(url, agent=agent, cookieJar=cookies, headers={'Cookie': 'language=en'}).addCallback(self.genreData).addErrback(self.dataError)
+
+       def genreData(self, data):
+               Cats = re.findall('class="item".*?href="(.*?)".*?img\sclass="thumb"\ssrc="(.*?)"\salt="(.*?)"', data, re.S)
+               if Cats:
+                       for (Url, Image, Title) in Cats:
+                               self.genreliste.append((Title, Url, Image))
+                       self.genreliste.sort()
+                       self.genreliste.insert(0, ("Most Popular", "https://vjav.com/most-popular/", default_cover))
+                       self.genreliste.insert(0, ("Top Rated", "https://vjav.com/top-rated/", default_cover))
+                       self.genreliste.insert(0, ("Newest", "https://vjav.com/latest-updates/", default_cover))
+                       self.genreliste.insert(0, ("--- Search ---", "callSuchen", default_cover))
+                       self.ml.setList(map(self._defaultlistcenter, self.genreliste))
+                       self.ml.moveToIndex(0)
+                       self.keyLocked = False
+                       self.showInfos()
+
+       def showInfos(self):
+               Image = self['liste'].getCurrent()[0][2]
+               CoverHelper(self['coverArt']).getCover(Image)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Name = self['liste'].getCurrent()[0][0]
+               if Name == "--- Search ---":
+                       self.suchen(suggest_func=self.getSuggestions)
+               else:
+                       Link = self['liste'].getCurrent()[0][1]
+                       self.session.open(vjavFilmScreen, Link, Name)
+
+       def SuchenCallback(self, callback = None):
+               if callback is not None and len(callback):
+                       Name = "--- Search ---"
+                       self.suchString = callback
+                       Link = urllib.quote(self.suchString).replace(' ', '+')
+                       self.session.open(vjavFilmScreen, Link, Name)
+
+       def getSuggestions(self, text, max_res):
+               url = "https://vjav.com/suggesters.php?char=%s" % urllib.quote_plus(text)
+               d = twAgentGetPage(url, agent=agent, headers=json_headers, timeout=5)
+               d.addCallback(self.gotSuggestions, max_res)
+               d.addErrback(self.gotSuggestions, max_res, err=True)
+               return d
+
+       def gotSuggestions(self, suggestions, max_res, err=False):
+               list = []
+               if not err and type(suggestions) in (str, buffer):
+                       suggestions = json.loads(suggestions)
+                       for item in suggestions:
+                               li = item
+                               list.append(str(li))
+                               max_res -= 1
+                               if not max_res: break
+               elif err:
+                       printl(str(suggestions),self,'E')
+               return list
+
+class vjavFilmScreen(MPScreen, ThumbsHelper):
+
+       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,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft,
+                       "nextBouquet" : self.keyPageUp,
+                       "prevBouquet" : self.keyPageDown,
+                       "green" : self.keyPageNumber
+               }, -1)
+
+               self['title'] = Label("VJAV.com")
+               self['ContentTitle'] = Label("Genre: %s" % self.Name)
+               self['F2'] = Label(_("Page"))
+
+               self['Page'] = Label(_("Page:"))
+               self.keyLocked = True
+               self.page = 1
+               self.lastpage = 1
+
+               self.filmliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.loadPage)
+
+       def loadPage(self):
+               self.keyLocked = True
+               self['name'].setText(_('Please wait...'))
+               self.filmliste = []
+               if re.match(".*Search", self.Name):
+                       url = "https://vjav.com/search/%s/%s/" % (self.Link, str(self.page))
+               else:
+                       if self.page == 1:
+                               url = self.Link
+                       else:
+                               url = "%s%s/" % (self.Link, str(self.page))
+               twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.loadData).addErrback(self.dataError)
+
+       def loadData(self, data):
+               if (self.page > 1) and (self.page == self.lastpage):
+                       self.getLastPage(data, 'class="pagination"(.*?)</div>', '.*\s(\d+)')
+               else:
+                       self.getLastPage(data, 'class="pagination"(.*?)</div>', '"page:(\d+)">Last')
+               Movies = re.findall('<div class="item.*?href="(.*?)".*?img.*?src="(.*?)"\s{0,1}alt="(.*?)(?:"|,).*?class="duration">(.*?)</div.*?class="added">(.*?)</div', data, re.S)
+               if Movies:
+                       for (Url, Image, Title, Runtime, Added) in Movies:
+                               Runtime = Runtime.replace('h','').replace('m','').replace('s','')
+                               Added = stripAllTags(Added)
+                               if not Url.startswith('https'):
+                                       Url = 'https://vjav.com' + Url
+                               self.filmliste.append((decodeHtml(Title), Url, Image, Runtime, Added))
+               if len(self.filmliste) == 0:
+                       self.filmliste.append((_('No videos found!'), None, None, ''))
+               self.ml.setList(map(self._defaultlistleft, self.filmliste))
+               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):
+               title = self['liste'].getCurrent()[0][0]
+               pic = self['liste'].getCurrent()[0][2]
+               runtime = self['liste'].getCurrent()[0][3]
+               added = self['liste'].getCurrent()[0][4]
+               self['name'].setText(title)
+               self['handlung'].setText("Runtime: %s\nAdded: %s" % (runtime, added))
+               CoverHelper(self['coverArt']).getCover(pic)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Link = self['liste'].getCurrent()[0][1]
+               if Link:
+                       self.keyLocked = True
+                       twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def getVideoPage(self, data, Link):
+               global ctarget
+               if not ctarget:
+                       playerlib = re.findall('<script src="(/assets/playerlib.*?\.js)"', data, re.S)
+                       url = "https://vjav.com" + playerlib[0]
+                       twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.fetchctarget, Link).addErrback(self.dataError)
+               else:
+                       pC3 = re.findall("pC3:'(.*?)',", data, re.S)
+                       video_id = re.findall('(?:\"|\'|)video_id(?:\"|\'|): (\d+),', data, re.S)
+                       if pC3 and video_id:
+                               postdata = {'param': video_id[0]+','+pC3[0]}
+                               twAgentGetPage(ctarget, method='POST', postdata=urlencode(postdata), agent=agent, cookieJar=cookies, headers={'Content-Type':'application/x-www-form-urlencoded','Referer':Link}).addCallback(self.playVideo).addErrback(self.dataError)
+
+       def fetchctarget(self, data, Link):
+               curl = re.findall(';c.action="(.*?)";', data, re.S)
+               global ctarget
+               ctarget = "https://vjav.com" + curl[0]
+               twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def playVideo(self, data):
+               video = re.findall('\[\{"video_url":"(.*?)",', data, re.S)
+               self.keyLocked = False
+               if video:
+                       url = video[0]
+                       chr = {'A':'\u0410', 'B':'\u0412', 'C':'\u0421', 'E':'\u0415', 'M':'\u041c', '/':',', '+':'.', '=':'~'}
+                       for i in chr:
+                               url = url.replace(chr[i], i)
+                       url = base64.b64decode(url)
+                       Title = self['liste'].getCurrent()[0][0]
+                       mp_globals.player_agent = agent
+                       self.session.open(SimplePlayer, [(Title, url)], showPlaylist=False, ltype='vjav')
\ No newline at end of file
diff --git a/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/voyeurhit.py b/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/voyeurhit.py
new file mode 100644 (file)
index 0000000..11af4e3
--- /dev/null
@@ -0,0 +1,250 @@
+# -*- coding: utf-8 -*-
+#######################################################################################################
+#
+#    MediaPortal for Dreambox OS
+#
+#    Coded by MediaPortal Team (c) 2013-2019
+#
+#  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 Plugins.Extensions.MediaPortal.plugin import _
+from Plugins.Extensions.MediaPortal.resources.imports import *
+import base64
+
+agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36'
+json_headers = {
+       'Accept':'*/*',
+       'Accept-Encoding':'deflate',
+       'Accept-Language':'de,en-US;q=0.7,en;q=0.3',
+       'X-Requested-With':'XMLHttpRequest',
+       'Content-Type':'application/x-www-form-urlencoded'
+       }
+default_cover = "file://%s/voyeurhit.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
+cookies = CookieJar()
+ctarget = None
+
+class voyeurhitGenreScreen(MPScreen):
+
+       def __init__(self, session):
+               MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
+
+               self["actions"] = ActionMap(["MP_Actions"], {
+                       "ok" : self.keyOK,
+                       "0" : self.closeAll,
+                       "cancel" : self.keyCancel,
+                       "up" : self.keyUp,
+                       "down" : self.keyDown,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft
+               }, -1)
+
+               self['title'] = Label("VoyeurHit.com")
+               self['ContentTitle'] = Label("Genre:")
+
+               self.keyLocked = True
+               self.suchString = ''
+
+               self.genreliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.layoutFinished)
+
+       def layoutFinished(self):
+               self.keyLocked = True
+               url = 'https://voyeurhit.com/categories/'
+               twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.genreData).addErrback(self.dataError)
+
+       def genreData(self, data):
+               kats = re.findall('<a class="tooltip".*?href="(.*?)".*?id="(.*?)">.*?<strong>(.*?)</strong>.*?<span>.*?<img src="(.*?)".*?height=".*?".*?width=".*?">',data, re.S)
+               if kats:
+                       for (url, id, title, img) in kats:
+                               Title = title.replace(' ','').replace('\n','')
+                               self.genreliste.append((Title, url, img))
+               self.genreliste.sort()
+               self.genreliste.insert(0, ("Most Popular", "https://voyeurhit.com/most-popular/", default_cover))
+               self.genreliste.insert(0, ("Top Rated", "https://voyeurhit.com/top-rated/", default_cover))
+               self.genreliste.insert(0, ("Most Recent", "https://voyeurhit.com/latest-updates/", default_cover))
+               self.genreliste.insert(0, ("--- Search ---", "callSuchen", default_cover))
+               self.ml.setList(map(self._defaultlistcenter, self.genreliste))
+               self.ml.moveToIndex(0)
+               self.keyLocked = False
+               self.showInfos()
+
+       def showInfos(self):
+               Image = self['liste'].getCurrent()[0][2]
+               CoverHelper(self['coverArt']).getCover(Image)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Name = self['liste'].getCurrent()[0][0]
+               Link = self['liste'].getCurrent()[0][1]
+               if Name == "--- Search ---":
+                       self.suchen(suggest_func=self.getSuggestions)
+               else:
+                       Link = self['liste'].getCurrent()[0][1]
+                       self.session.open(voyeurhitFilmScreen, Link, Name)
+
+       def SuchenCallback(self, callback = None):
+               if callback is not None and len(callback):
+                       Name = "--- Search ---"
+                       self.suchString = callback
+                       Link = urllib.quote(self.suchString).replace(' ', '+')
+                       self.session.open(voyeurhitFilmScreen, Link, Name)
+
+       def getSuggestions(self, text, max_res):
+               url = "https://voyeurhit.com/suggesters.php?char=%s" % urllib.quote_plus(text)
+               d = twAgentGetPage(url, agent=agent, headers=json_headers, timeout=5)
+               d.addCallback(self.gotSuggestions, max_res)
+               d.addErrback(self.gotSuggestions, max_res, err=True)
+               return d
+
+       def gotSuggestions(self, suggestions, max_res, err=False):
+               list = []
+               if not err and type(suggestions) in (str, buffer):
+                       suggestions = json.loads(suggestions)
+                       for item in suggestions:
+                               li = item
+                               list.append(str(li))
+                               max_res -= 1
+                               if not max_res: break
+               elif err:
+                       printl(str(suggestions),self,'E')
+               return list
+
+class voyeurhitFilmScreen(MPScreen, ThumbsHelper):
+
+       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,
+                       "right" : self.keyRight,
+                       "left" : self.keyLeft,
+                       "nextBouquet" : self.keyPageUp,
+                       "prevBouquet" : self.keyPageDown,
+                       "green" : self.keyPageNumber
+               }, -1)
+
+               self['title'] = Label("VoyeurHit.com")
+               self['ContentTitle'] = Label("Genre: %s" % self.Name)
+               self['F2'] = Label(_("Page"))
+
+               self['Page'] = Label(_("Page:"))
+               self.keyLocked = True
+               self.page = 1
+               self.lastpage = 1
+
+               self.filmliste = []
+               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
+               self['liste'] = self.ml
+
+               self.onLayoutFinish.append(self.loadPage)
+
+       def loadPage(self):
+               self.keyLocked = True
+               self['name'].setText(_('Please wait...'))
+               self.filmliste = []
+               cat = self.Link
+               if re.match(".*Search", self.Name):
+                       url = "https://voyeurhit.com/search/%s/?q=%s" % (str(self.page), self.Link)
+               else:
+                       url = "%s%s/" % (self.Link, str(self.page))
+               twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.loadData).addErrback(self.dataError)
+
+       def loadData(self, data):
+               self.getLastPage(data, 'lass="pagination">(.*?)</ul>')
+               parse = re.search('<div class="block-thumb">(.*?)<div class="pagination">', data, re.S)
+               videos = re.findall('<a href="(.*?)" class="thumb">.*?<span class="image"><img.*?src="(.*?)"\s{0,1}alt="(.*?)".*?<span class="dur_ovimg">(.*?)</span>', parse.group(0), re.S)
+               for (url,img,desc,dur) in videos:
+                       self.filmliste.append((decodeHtml(desc), url, img))
+               if len(self.filmliste) == 0:
+                       self.filmliste.append((_('No videos found!'), None, None))
+               self.ml.setList(map(self._defaultlistleft, self.filmliste))
+               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):
+               Title = self['liste'].getCurrent()[0][0]
+               Image = self['liste'].getCurrent()[0][2]
+               self['name'].setText(Title)
+               CoverHelper(self['coverArt']).getCover(Image)
+
+       def keyOK(self):
+               if self.keyLocked:
+                       return
+               Link = self['liste'].getCurrent()[0][1]
+               if Link == None:
+                       return
+               self.keyLocked = True
+               twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def getVideoPage(self, data, Link):
+               global ctarget
+               if not ctarget:
+                       playerlib = re.findall('<script src="(/assets/playerlib.*?\.js)"', data, re.S)
+                       url = "https://voyeurhit.com" + playerlib[0]
+                       twAgentGetPage(url, agent=agent, cookieJar=cookies).addCallback(self.fetchctarget, Link).addErrback(self.dataError)
+               else:
+                       pC3 = re.findall("pC3:'(.*?)',", data, re.S)
+                       video_id = re.findall('(?:\"|\'|)video_id(?:\"|\'|): (\d+),', data, re.S)
+                       if pC3 and video_id:
+                               postdata = {'param': video_id[0]+','+pC3[0]}
+                               twAgentGetPage(ctarget, method='POST', postdata=urlencode(postdata), agent=agent, cookieJar=cookies, headers={'Content-Type':'application/x-www-form-urlencoded','Referer':Link}).addCallback(self.playVideo).addErrback(self.dataError)
+
+       def fetchctarget(self, data, Link):
+               curl = re.findall(';c.action="(.*?)";', data, re.S)
+               global ctarget
+               ctarget = "https://voyeurhit.com" + curl[0]
+               twAgentGetPage(Link, agent=agent, cookieJar=cookies).addCallback(self.getVideoPage, Link).addErrback(self.dataError)
+
+       def playVideo(self, data):
+               video = re.findall('\[\{"video_url":"(.*?)",', data, re.S)
+               self.keyLocked = False
+               if video:
+                       url = video[0]
+                       chr = {'A':'\u0410', 'B':'\u0412', 'C':'\u0421', 'E':'\u0415', 'M':'\u041c', '/':',', '+':'.', '=':'~'}
+                       for i in chr:
+                               url = url.replace(chr[i], i)
+                       url = base64.b64decode(url)
+                       Title = self['liste'].getCurrent()[0][0]
+                       mp_globals.player_agent = agent
+                       self.session.open(SimplePlayer, [(Title, url)], showPlaylist=False, ltype='voyeurhit')
\ No newline at end of file
index 317a94e..985f72b 100644 (file)
@@ -155,8 +155,8 @@ config.mediaportal = ConfigSubsection()
 config_mp.mediaportal.fake_entry = NoSave(ConfigNothing())
 
 # Allgemein
-config_mp.mediaportal.version = NoSave(ConfigText(default="2019090101"))
-config.mediaportal.version = NoSave(ConfigText(default="2019090101"))
+config_mp.mediaportal.version = NoSave(ConfigText(default="2019090701"))
+config.mediaportal.version = NoSave(ConfigText(default="2019090701"))
 config_mp.mediaportal.autoupdate = ConfigYesNo(default = True)
 config.mediaportal.autoupdate = NoSave(ConfigYesNo(default = True))
 
@@ -262,7 +262,7 @@ config_mp.mediaportal.sp_use_yt_with_proxy = ConfigSelectionExt(default = "no",
 config_mp.mediaportal.sp_on_movie_start = ConfigSelectionExt(default = "start", choices = [("start", _("Start from the beginning")), ("ask", _("Ask user")), ("resume", _("Resume from last position"))])
 config_mp.mediaportal.sp_save_resumecache = ConfigYesNo(default = False)
 config_mp.mediaportal.sp_radio_cover = ConfigSelectionExt(default = "large", choices = [("large", _("large")), ("small", _("small")), ("off", _("off"))])
-config_mp.mediaportal.sp_buffersize = ConfigSelectionFloat(default = 3.0, stepwidth = 0.5, min = 0.5, max = 30.0)
+config_mp.mediaportal.sp_buffersize = ConfigSelectionFloat(default = 0.0, stepwidth = 0.5, min = 0.0, max = 30.0)
 if mp_globals.model in ["dm900","dm920"]:
        config_mp.mediaportal.sp_radio_visualization = ConfigSelectionExt(default = "1", choices = [("0", _("Off")), ("1", _("Mode 1")), ("2", _("Mode 2")), ("3", _("Mode 3"))])
 else:
index 879def7..cb884cd 100644 (file)
@@ -632,14 +632,22 @@ class MPScreen(Screen, HelpableScreen):
                                        if not fileExists(path):
                                                path = "/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/countries/%s.png" % iconlng
 
-                               lang = LoadPixmap(path)
-                               lwidth = lang.size().width()
-                               lheight = lang.size().height()
-                               if lwidth > (height - 2 * mp_globals.sizefactor):
+                               llang = LoadPixmap(path)
+                               lwidth = llang.size().width()
+                               lheight = llang.size().height()
+                               if lheight > (height - 2 * mp_globals.sizefactor):
                                        lratio = float(lwidth/lheight)
                                        lheight = height - 2 * mp_globals.sizefactor
                                        lwidth = int(lheight * lratio)
                                vpos = round(float((height-lheight)/2))
+                               scale = AVSwitch().getFramebufferScale()
+                               picload = ePicLoad()
+                               picload.setPara((lwidth, lheight, scale[0], scale[1], False, 1, "#FF000000"))
+                               if mp_globals.isDreamOS:
+                                       picload.startDecode(path, False)
+                               else:
+                                       picload.startDecode(path, 0, 0, False)
+                               lang = picload.getData()
                                res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, pwidth+50, vpos, lwidth, lheight, lang))
                                self.langoffset = lwidth+25
                except:
index de2bc1f..9b382d8 100644 (file)
@@ -842,7 +842,7 @@ class RadioBackground(Screen):
                                if config_mp.mediaportal.sp_radio_visualization.value == "3":
                                        self.skin += '''<widget name="coverGL" position="0,0" size="1920,1080" transparent="0" backgroundColor="#00000000" mode="visGLRandom" noCoverAvailablePic="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/none.png"/>'''
                                else:
-                                       self.skin += '''<widget name="cover" position="735,270" size="450,450" transparent="1" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/none.png" zPosition="13" />
+                                       self.skin += '''<widget alphatest="blend" name="cover" position="735,270" size="450,450" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/none.png" zPosition="13" />
                                        <widget name="rms0" channel="0" backgroundColor="#404040" zPosition="13" position="650,251" size="70,495" pixmap1="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/led_90x60_h9.png" transparent="1" mode="imagesOrientationUp" pixmapBackground1="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/colorgradient.png" drawBackground="0" pixmapBackgroundColor1="#080808" distance="15" maxValue="40" fadeOutTime="500" smoothing="0.9" />
                                        <widget name="rms1" channel="1" backgroundColor="#404040" zPosition="13" position="1200,251" size="70,495" pixmap1="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/led_90x60_h9.png" transparent="1" mode="imagesOrientationUp" pixmapBackground1="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/colorgradient.png" drawBackground="0" pixmapBackgroundColor1="#080808" distance="15" maxValue="40" fadeOutTime="500" smoothing="0.9" />'''
 
@@ -857,7 +857,7 @@ class RadioBackground(Screen):
                                        else:
                                                self.skin += '''<widget name="visu" position="0,930" size="1920,150" transparent="1" zPosition="11" pixmapBackground2="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/colorgradient.png" pixmap2="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/led_30x20_h8.png" distance1="18" distance2="8" mode="visImagesUp" maxValue="15" fadeOutTime="0" internalSize="1" pixmapBackgroundColor1="#080808" drawBackground="0" smoothing="0.6" />'''
                        else:
-                               self.skin += '''<widget name="cover" position="735,270" size="450,450" transparent="1" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/none.png" zPosition="13" />'''
+                               self.skin += '''<widget alphatest="blend" name="cover" position="735,270" size="450,450" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/none.png" zPosition="13" />'''
 
                        self.skin += '''</screen>'''
                else:
@@ -871,7 +871,7 @@ class RadioBackground(Screen):
                                if config_mp.mediaportal.sp_radio_visualization.value == "3":
                                        self.skin += '''<widget name="coverGL" position="0,0" size="1280,720" transparent="0" backgroundColor="#00000000" mode="visGLRandom" noCoverAvailablePic="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/none.png"/>'''
                                else:
-                                       self.skin += '''<widget name="cover" position="490,180" size="300,300" transparent="1" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/none.png" zPosition="13" />
+                                       self.skin += '''<widget alphatest="blend" name="cover" position="490,180" size="300,300" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/none.png" zPosition="13" />
                                        <widget name="rms0" channel="0" backgroundColor="#404040" zPosition="13" position="420,167" size="60,330" pixmap1="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/led_60x40_h6.png" transparent="1" mode="imagesOrientationUp" pixmapBackground1="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/colorgradient.png" drawBackground="0" pixmapBackgroundColor1="#080808" distance="10" maxValue="40" fadeOutTime="500" smoothing="0.9" />
                                        <widget name="rms1" channel="1" backgroundColor="#404040" zPosition="13" position="800,167" size="60,330" pixmap1="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/led_60x40_h6.png" transparent="1" mode="imagesOrientationUp" pixmapBackground1="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/colorgradient.png" drawBackground="0" pixmapBackgroundColor1="#080808" distance="10" maxValue="40" fadeOutTime="500" smoothing="0.9" />'''
 
@@ -886,7 +886,7 @@ class RadioBackground(Screen):
                                        else:
                                                self.skin += '''<widget name="visu" position="0,570" size="1280,150" transparent="1" zPosition="11" pixmapBackground2="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/colorgradient.png" pixmap2="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/led_20x13_h5.png" distance1="12" distance2="5" mode="visImagesUp" maxValue="15" fadeOutTime="0" internalSize="1" pixmapBackgroundColor1="#080808" drawBackground="0" smoothing="0.6" />'''
                        else:
-                               self.skin += '''<widget name="cover" position="490,180" size="300,300" transparent="1" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/none.png" zPosition="13" />'''
+                               self.skin += '''<widget alphatest="blend" name="cover" position="490,180" size="300,300" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/none.png" zPosition="13" />'''
 
                        self.skin += '''</screen>'''
 
@@ -1462,7 +1462,7 @@ class SimplePlayer(Screen, M3U8Player, CoverSearchHelper, SimpleSeekHelper, Simp
                        pass
 
        def __serviceBuffering(self):
-               if mp_globals.isDreamOS and mp_globals.stateinfo:
+               if mp_globals.isDreamOS and mp_globals.stateinfo and float(config_mp.mediaportal.sp_buffersize.value) > 0:
                        try:
                                service = self.session.nav.getCurrentService()
                                bufferval = str(service.streamed().getBufferCharge()[0])
@@ -1632,7 +1632,7 @@ class SimplePlayer(Screen, M3U8Player, CoverSearchHelper, SimpleSeekHelper, Simp
                                                if mp_globals.isDreamOS:
                                                        if self.playerMode == 'RADIO' and config_mp.mediaportal.sp_radio_visualization.value != "0" and MerlinMusicPlayerPresent:
                                                                sref = eServiceReference(0x1019, 0, url)
-                                                       elif self.eServiceStream and ('.m3u8' in url) or ('m3u8-aapl' in url) or ('.mpd' in url) and mp_globals.model in ["one"]:
+                                                       elif self.eServiceStream and ('.m3u8' in url or 'm3u8-aapl' in url or '.mpd' in url) and mp_globals.model in ["one"]:
                                                                sref = eServiceReference(0x2223, 0, url)
                                                        else:
                                                                sref = eServiceReference(0x1001, 0, url)