import enigma2-plugin-extensions-mediaportal 2020012601 v2020012601
authorChristian Weiske <cweiske@cweiske.de>
Mon, 27 Jan 2020 00:15:23 +0000 (01:15 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Mon, 27 Jan 2020 00:15:23 +0000 (01:15 +0100)
30 files changed:
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/additions.xml
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/mediatheken/zdf.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/cumlouder.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/fetishshrine.py [deleted file]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/hotscope.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/porncom.py [deleted file]
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/pornhub.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/pornicom.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/slutload.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/spankbang.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/tube8.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/tubepornclassic.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/voyeurhit.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/vporn.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/xhamster.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/xnxx.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/xvideos.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/youporn.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/plugin.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/MPEuronewsUriResolver.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/MPLivestreamcomUriResolver.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/MPYoutubeUriResolver.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/coverhelper.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/cvevosignalgoextractor.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/hosters/clipwatching.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/hosters/mixdrop.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/hosters/vidoza.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/resources/mpscreen.py
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins_1080/clean_fhd/MP_Plugin.xml
usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/skins_720/clean_hd/MP_Plugin.xml

index f18c32a..48cf452 100644 (file)
@@ -64,7 +64,6 @@
                <plugin type="mod" modfile="porn.teamskeet" confopt="showteamskeetcom" default="False" confcat="porn" gz="0" name="TeamSkeet.com" icon="teamskeet" filter="Porn" screen="teamskeetGenreScreen" param1="" param2="" search="1" delim="%20" searchurl="%s" searchscreen="teamskeetFilmScreen" searchparam=""/>
                <plugin type="mod" modfile="porn.cumlouder" confopt="showcumlouder" default="False" confcat="porn" gz="0" name="Cumlouder" icon="cumlouder" filter="Porn" screen="cumlouderGenreScreen" param1="" param2="" search="1" delim="%20" searchurl="%s" searchscreen="cumlouderFilmScreen" searchparam=""/>
                <plugin type="mod" modfile="porn.pornhub" confopt="showpornhub" default="False" confcat="porn" gz="0" name="Pornhub" icon="pornhub" filter="Porn" screen="pornhubGenreScreen" param1="" param2="" search="1" delim="+" searchurl="https://www.pornhub.com/video/search?search=%s&amp;page=" searchscreen="pornhubFilmScreen" searchparam=""/>
-               <plugin type="mod" modfile="porn.porncom" confopt="showporncom" default="False" confcat="porn" gz="0" name="Porn.com" icon="porncom" filter="Porn" screen="porncomGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="porncomFilmScreen" searchparam=", True"/>
                <plugin type="mod" modfile="porn.xvideos" confopt="showxvideos" default="False" confcat="porn" gz="0" name="XVideos" icon="xvideos" filter="Porn" screen="xvideosGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="xvideosFilmScreen" searchparam=", True"/>
                <plugin type="mod" modfile="porn.xnxx" confopt="showxnxx" default="False" confcat="porn" gz="0" name="XNXX" icon="xnxx" filter="Porn" screen="xnxxGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="xnxxFilmScreen" searchparam=""/>
                <plugin type="mod" modfile="porn.youjizz" confopt="showyoujizz" default="False" confcat="porn" gz="0" name="YouJizz" icon="youjizz" filter="Porn" screen="youjizzGenreScreen" param1="" param2="" search="1" delim="-" searchurl="%s" searchscreen="youjizzFilmScreen" searchparam=""/>
                <plugin type="mod" modfile="porn.slutload" confopt="showebony8" default="False" confcat="porn" gz="0" name="Ebony8" icon="ebony8" filter="Porn" screen="slutloadGenreScreen" param1="ebony8" param2="" search="1" delim="-" searchurl="%s" searchscreen="slutloadFilmScreen" searchparam=", &quot;Ebony8.com&quot;, &quot;https://www.ebony8.com&quot;"/>
                <plugin type="mod" modfile="porn.slutload" confopt="showcamuploads" default="False" confcat="porn" gz="0" name="CamUploads" icon="camuploads" filter="Porn" screen="slutloadGenreScreen" param1="camuploads" param2="" search="1" delim="-" searchurl="%s" searchscreen="slutloadFilmScreen" searchparam=", &quot;CamUploads.com&quot;, &quot;https://www.camuploads.com&quot;"/>
                <plugin type="mod" modfile="porn.pornicom" confopt="showpornicom" default="False" confcat="porn" gz="0" name="Pornicom" icon="pornicom" filter="Porn" screen="pornicomGenreScreen" param1="pornicom" param2="" search="1" delim="+" searchurl="%s" searchscreen="pornicomFilmScreen" searchparam=", &quot;Pornicom.com&quot;, &quot;https://www.pornicom.com&quot;"/>
+               <plugin type="mod" modfile="porn.pornicom" confopt="showfetishshrine" default="False" confcat="porn" gz="0" name="FetishShrine" icon="fetishshrine" filter="Porn" screen="pornicomGenreScreen" param1="fetishshrine" param2="" search="1" delim="+" searchurl="%s" searchscreen="pornicomFilmScreen" searchparam=", &quot;FetishShrine.com&quot;, &quot;https://www.fetishshrine.com&quot;"/>
                <plugin type="mod" modfile="porn.pornicom" confopt="showvikiporn" default="False" confcat="porn" gz="0" name="VikiPorn" icon="vikiporn" filter="Porn" screen="pornicomGenreScreen" param1="vikiporn" param2="" search="1" delim="+" searchurl="%s" searchscreen="pornicomFilmScreen" searchparam=", &quot;VikiPorn.com&quot;, &quot;https://www.vikiporn.com&quot;"/>
                <plugin type="mod" modfile="porn.pornicom" confopt="showsleazyneasy" default="False" confcat="porn" gz="0" name="SleazyNEasy" icon="sleazyneasy" filter="Porn" screen="pornicomGenreScreen" param1="sleazyneasy" param2="" search="1" delim="+" searchurl="%s" searchscreen="pornicomFilmScreen" searchparam=", &quot;SleazyNEasy.com&quot;, &quot;https://www.sleazyneasy.com&quot;"/>
                <plugin type="mod" modfile="porn.pornicom" confopt="showkatestube" default="False" confcat="porn" gz="0" name="KatesTube" icon="katestube" filter="Porn" screen="pornicomGenreScreen" param1="katestube" param2="" search="1" delim="+" searchurl="%s" searchscreen="pornicomFilmScreen" searchparam=", &quot;KatesTube.com&quot;, &quot;https://www.katestube.com&quot;"/>
                <plugin type="mod" modfile="porn.pornoxo" confopt="showpornoxo" default="False" confcat="porn" gz="0" name="PornoXO" icon="pornoxo" filter="Porn" screen="pornoxoGenreScreen" param1="pornoxo" param2="" search="1" delim="_" searchurl="%s" searchscreen="pornoxoFilmScreen" searchparam=", &quot;PornoXO.com&quot;, &quot;https://www.pornoxo.com&quot;"/>
                <plugin type="mod" modfile="porn.pornoxo" confopt="showashemaletube" default="False" confcat="porn" gz="0" name="aShemaletube" icon="ashemaletube" filter="Porn" screen="pornoxoGenreScreen" param1="ashemaletube" param2="" search="1" delim="_" searchurl="%s" searchscreen="pornoxoFilmScreen" searchparam=", &quot;aShemaletube.com&quot;, &quot;https://www.ashemaletube.com&quot;"/>
                <plugin type="mod" modfile="porn.pornoxo" confopt="showfetishpapa" default="False" confcat="porn" gz="0" name="Fetishpapa" icon="fetishpapa" filter="Porn" screen="pornoxoGenreScreen" param1="fetishpapa" param2="" search="1" delim="_" searchurl="%s" searchscreen="pornoxoFilmScreen" searchparam=", &quot;Fetishpapa.com&quot;, &quot;https://www.fetishpapa.com&quot;"/>
-               <plugin type="mod" modfile="porn.fetishshrine" confopt="showfetishshrine" default="False" confcat="porn" gz="0" name="FetishShrine" icon="fetishshrine" filter="Porn" screen="fetishshrineGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="fetishshrineFilmScreen" searchparam=""/>
                <plugin type="mod" modfile="porn.shesfreaky" confopt="showshesfreaky" default="False" confcat="porn" gz="0" name="ShesFreaky" icon="shesfreaky" filter="Porn" screen="shesfreakyGenreScreen" param1="" param2="" search="1" delim="-" searchurl="%s" searchscreen="shesfreakyFilmScreen" searchparam=""/>
                <plugin type="mod" modfile="porn.spankwire" confopt="showspankwire" default="False" confcat="porn" gz="0" name="Spankwire" icon="spankwire" filter="Porn" screen="spankwireGenreScreen" param1="" param2="" search="1" delim="+" searchurl="%s" searchscreen="spankwireFilmScreen" searchparam=", ''"/>
                <plugin type="mod" modfile="porn.extremetube" confopt="showextremetube" default="False" confcat="porn" gz="0" name="ExtremeTube" icon="extremetube" filter="Porn" screen="extremetubeGenreScreen" param1="" param2="" search="1" delim="+" searchurl="http://www.extremetube.com/videos?search=%s" searchscreen="extremetubeFilmScreen" searchparam=""/>
index d89ef25..fc629e7 100644 (file)
@@ -185,7 +185,7 @@ class ZDFPreSelect(MPScreen):
                                        if "Video" in info:
                                                self.genreliste.append((title,assetId,default_cover))
                elif self.gF == "5":    # Rubriken
-                       self.genreliste.append(("Bestbewertet", "13", "https://www.zdf.de/assets/service-best-bewertet-100~768x432"))
+                       #self.genreliste.append(("Bestbewertet", "13", "https://www.zdf.de/assets/service-best-bewertet-100~768x432"))
                        self.genreliste.append(("Meistgesehen", "14", "https://www.zdf.de/assets/service-meist-gesehen-100~768x432"))
                        self.genreliste.append(("Comedy/Show", "1", "https://www.zdf.de/assets/comedy-100~768x432"))
                        self.genreliste.append(("Doku/Wissen", "2", "https://www.zdf.de/assets/doku-wissen-102~768x432"))
@@ -410,7 +410,7 @@ class ZDFStreamScreen(MPScreen, ThumbsHelper):
                        for article in articles:
                                data = re.sub('<div class="img-container x-large-8 x-column">','<source class="m-16-9" data-srcset="/static~Trash">',article, flags=re.S)
                                data = re.sub('itemprop="image" content=""','',data,flags=re.S)
-                               treffer = re.findall('<article.*?picture class.*?data-srcset="(.*?)[\"|\s].*?title="(.*?)".*?"special-info">(.*?)</div.*?teaser-info.*?>(.*?)<.*?data-plusbar-id=\"(.*?)\".*?data-plusbar-path=\"(.*?)\"', data, re.S)
+                               treffer = re.findall('<article.*?picture class.*?data-srcset="(.*?)[\"|\s].*?title="(.*?)".*?"special-info">(.*?)</div.*?teaser-info.*?>(.*?)<.*?data-plusbar-id=\"(.*?)\".*?data-plusbar-url=\"(.*?)\"', data, re.S)
                                if treffer:
                                        for (image,title,clock,dur,assetId,assetPath) in treffer:
                                                if "/static" in image:
@@ -435,7 +435,8 @@ class ZDFStreamScreen(MPScreen, ThumbsHelper):
                                                                image += "~768x432"
                                                title = decodeHtml(title)
                                                assetId = "https://api.zdf.de/content/documents/zdf/"+assetId+".json?profile=player"
-                                               assetPath = BASE_URL + assetPath
+                                               if not assetPath.startswith(BASE_URL):
+                                                       assetPath = BASE_URL + assetPath
                                                try:
                                                        sendung = re.findall('class="teaser-cat\s{0,1}">.*?class="teaser-cat-brand">(.*?)</span',data,re.S)[0]
                                                        sendung = decodeHtml(sendung).replace('<span class="teaser-cat-brand-ellipsis">', '')
@@ -501,10 +502,10 @@ class ZDFStreamScreen(MPScreen, ThumbsHelper):
                                        continue
                                else:
                                        assetId = re.search('data-plusbar-id="(.*?)"',data).group(1)
-                               if not "data-plusbar-path=" in data:
+                               if not "data-plusbar-url=" in data:
                                        continue
                                else:
-                                       assetPath = re.search('data-plusbar-path="(.*?)"',data).group(1)
+                                       assetPath = re.search('data-plusbar-url="(.*?)"',data).group(1)
                                if '<source class="m-16-9"' in data:
                                        image = re.search('<source class=\"m-16-9\".*?data-srcset=\"(.*?)[,\"]',data)
                                        if image:
@@ -562,7 +563,8 @@ class ZDFStreamScreen(MPScreen, ThumbsHelper):
                                                pass
                                handlung = "Sendung: "+decodeHtml(sendung)+genre+"\nSender: "+sender+"\nDatum: "+airtime+"\nLaufzeit: "+dur+"\n\n"+info
                                assetId = "https://api.zdf.de/content/documents/zdf/"+assetId+".json?profile=player"
-                               assetPath = BASE_URL + assetPath
+                               if not assetPath.startswith(BASE_URL):
+                                       assetPath = BASE_URL + assetPath
                                self.filmliste.append((decodeHtml(title),assetId,handlung,image,sendung,assetPath))
                        if self.filmliste == []:
                                self.filmliste.append(("Keine abspielbaren Inhalte verfügbar",None,"",default_cover,None))
index 266ac8d..90c504b 100644 (file)
@@ -172,7 +172,9 @@ class cumlouderSeriesScreen(MPScreen):
                                if Image.startswith('//'):
                                        Image = 'http:' + Image
                                self.filmliste.append((decodeHtml(Title), Url, Image, Count))
-                               self.filmliste.sort()
+                       # remove duplicates
+                       self.filmliste = list(set(self.filmliste))
+                       self.filmliste.sort()
                if len(self.filmliste) == 0:
                        self.filmliste.append((_('No series found!'), None, None))
                self.ml.setList(map(self._defaultlistleft, self.filmliste))
@@ -505,13 +507,14 @@ class cumlouderFilmScreen(MPScreen):
                views = self['liste'].getCurrent()[0][5]
                channel = self['liste'].getCurrent()[0][6]
                if self.filtername:
-                       filtername = "\n%s: %s" % (_("Filter"), self.filtername)
+                       filtername = "%s: %s" % (_("Filter"), self.filtername)
                else:
                        filtername = ''
+               self['extrainfo'].setText(filtername)
                if channel:
-                       self['handlung'].setText("Runtime: "+runtime.strip()+'\nViews: '+views.strip()+'\nChannel: '+channel+filtername)
+                       self['handlung'].setText("Runtime: "+runtime.strip()+'\nViews: '+views.strip()+'\nChannel: '+channel)
                else:
-                       self['handlung'].setText("Runtime: "+runtime.strip()+'\nViews: '+views.strip()+'\nAdded: '+date.strip()+filtername)
+                       self['handlung'].setText("Runtime: "+runtime.strip()+'\nViews: '+views.strip()+'\nAdded: '+date.strip())
                self['name'].setText(title)
                CoverHelper(self['coverArt']).getCover(pic)
 
diff --git a/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/fetishshrine.py b/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/fetishshrine.py
deleted file mode 100644 (file)
index 32b2009..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-# -*- coding: utf-8 -*-
-#######################################################################################################
-#
-#    MediaPortal for Dreambox OS
-#
-#    Coded by MediaPortal Team (c) 2013-2020
-#
-#  This plugin is open source but it is NOT free software.
-#
-#  This plugin may only be distributed to and executed on hardware which
-#  is licensed by Dream Property GmbH. This includes commercial distribution.
-#  In other words:
-#  It's NOT allowed to distribute any parts of this plugin or its source code in ANY way
-#  to hardware which is NOT licensed by Dream Property GmbH.
-#  It's NOT allowed to execute this plugin and its source code or even parts of it in ANY way
-#  on hardware which is NOT licensed by Dream Property GmbH.
-#
-#  This applies to the source code as a whole as well as to parts of it, unless explicitely
-#  stated otherwise.
-#
-#  If you want to use or modify the code or parts of it, permission from the authors is necessary.
-#  You have to keep OUR license and inform us about any modification, but it may NOT be distributed
-#  other than under the conditions noted above.
-#
-#  As an exception regarding modifcations, you are NOT permitted to remove
-#  any copy protections implemented in this plugin or change them for means of disabling
-#  or working around the copy protections, unless the change has been explicitly permitted
-#  by the original authors. Also decompiling and modification of the closed source
-#  parts is NOT permitted.
-#
-#  Advertising with this plugin is NOT allowed.
-#
-#  For other uses, permission from the authors is necessary.
-#
-#######################################################################################################
-
-from Plugins.Extensions.MediaPortal.plugin import _
-from Plugins.Extensions.MediaPortal.resources.imports import *
-from Plugins.Extensions.MediaPortal.resources.twagenthelper import TwAgentHelper
-
-agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36'
-default_cover = "file://%s/fetishshrine.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
-
-class fetishshrineGenreScreen(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("FetishShrine.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://www.fetishshrine.com/categories/"
-               twAgentGetPage(url, agent=agent).addCallback(self.genreData).addErrback(self.dataError)
-
-       def genreData(self, data):
-               parse = re.search('class="thumbs-list">(.*?)$', data, re.S)
-               if parse:
-                       Cats = re.findall('class="thumb".*?href="(.*?)"\stitle="(.*?)".*?img\ssrc="(.*?)"', parse.group(1), re.S)
-                       if Cats:
-                               for (Url, Title, Image) in Cats:
-                                       self.genreliste.append((decodeHtml(Title), Url, Image))
-               self.genreliste.sort()
-               self.genreliste.insert(0, ("Most Viewed", "https://www.fetishshrine.com/most-popular/", default_cover))
-               self.genreliste.insert(0, ("Top Rated", "https://www.fetishshrine.com/top-rated/", default_cover))
-               self.genreliste.insert(0, ("Newest", "https://www.fetishshrine.com/latest-updates/", default_cover))
-               self.genreliste.insert(0, ("--- Search ---", "callSuchen", 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, agent=agent)
-
-       def keyOK(self):
-               if self.keyLocked:
-                       return
-               Name = self['liste'].getCurrent()[0][0]
-               if Name == "--- Search ---":
-                       self.suchen()
-               else:
-                       Link = self['liste'].getCurrent()[0][1]
-                       self.session.open(fetishshrineFilmScreen, Link, Name)
-
-       def SuchenCallback(self, callback = None):
-               if callback is not None and len(callback):
-                       Name = "--- Search ---"
-                       self.suchString = callback
-                       Link = urllib.quote(callback).replace(' ', '+')
-                       self.session.open(fetishshrineFilmScreen, Link, Name)
-
-class fetishshrineFilmScreen(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("FetishShrine.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://www.fetishshrine.com/search/%s/?q=%s" % (str(self.page), self.Link)
-               else:
-                       if self.page > 1:
-                               url = "%s%s/" % (self.Link, str(self.page))
-                       else:
-                               url = "%s" % self.Link
-               print url
-               twAgentGetPage(url).addCallback(self.loadData).addErrback(self.dataError)
-
-       def loadData(self, data):
-               self.getLastPage(data, 'class="paging">(.*?)</ul>')
-               Movies = re.findall('class="thumb"\sitemscope.*?href="(.*?)".*?(?:img\ssrc|data-original)="(.*?)"\salt="(.*?)">(.*?)</div', data, re.S)
-               if Movies:
-                       for (Url, Image, Title, Meta) in Movies:
-                               Runtime = '-'
-                               Views = '-'
-                               Age = '-'
-                               metadata = re.findall('class="length">(.*?)</span.*?class="views">(.*?)</span', Meta, re.S)
-                               if metadata:
-                                       Runtime = metadata[0][0].strip()
-                                       if "|" in metadata[0][1]:
-                                               Views = metadata[0][1].split("|")[0].replace('Views','').strip()
-                                               Age = metadata[0][1].split("|")[1].strip()
-                               self.filmliste.append((decodeHtml(Title), Url, Image, Runtime, Views, Age))
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_('No movies 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]
-               age = self['liste'].getCurrent()[0][5]
-               self['name'].setText(title)
-               self['handlung'].setText("Runtime: %s\nViews: %s\nAge: %s" % (runtime, views, age))
-               CoverHelper(self['coverArt']).getCover(pic, agent=agent)
-
-       def keyOK(self):
-               if self.keyLocked:
-                       return
-               Link = self['liste'].getCurrent()[0][1]
-               if not Link:
-                       return
-               self.keyLocked = True
-               twAgentGetPage(Link, agent=agent).addCallback(self.getVideoPage).addErrback(self.dataError)
-
-       def getVideoPage(self, data):
-               videoPage = re.findall("video_url:\s'(.*?)',", data, re.S)
-               if videoPage:
-                       self.keyLocked = False
-                       Title = self['liste'].getCurrent()[0][0]
-                       url = videoPage[-1]
-                       self.session.open(SimplePlayer, [(Title, url)], showPlaylist=False, ltype='fetishshrine')
\ No newline at end of file
index 7e31be2..5c3aa75 100644 (file)
@@ -241,25 +241,10 @@ class hotscopeFilmScreen(MPScreen, ThumbsHelper):
                        except Exception:
                                self.session.open(MessageBoxExt, _("Error executing Javascript, please report to the developers."), MessageBoxExt.TYPE_INFO)
 
-                       url = re.findall('(https://.*?)\n', urls, re.S)
+                       url = re.findall('(https://.*?)(?:\n|$)', urls, re.S)
                        if url:
                                fetchurl = url[0]
-
-                               # retry till we get a good working cdn streamurl
-                               if config_mp.mediaportal.pornhub_cdnfix.value:
-                                       if re.match('.*?bv.phncdn.com', fetchurl, re.S):
-                                               self.count += 1
-                                               if self.count < 20:
-                                                       self.keyOK()
-                                                       printl('CDN retry: '+str(self.count),self,'A')
-                                                       return
-
                                Title = self['liste'].getCurrent()[0][0]
                                self['name'].setText(Title)
                                mp_globals.player_agent = agent
-                               if "&hash=" in fetchurl:
-                                       url = fetchurl.split('&hash=')
-                                       url = url[0] + "&hash=" + url[1].replace('/','%2F').replace('=','%3D').replace('+','%2B')
-                               else:
-                                       url = fetchurl
-                               self.session.open(SimplePlayer, [(Title, url)], showPlaylist=False, ltype='hotscope')
\ No newline at end of file
+                               self.session.open(SimplePlayer, [(Title, fetchurl)], showPlaylist=False, ltype='hotscope')
\ No newline at end of file
diff --git a/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/porncom.py b/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/porncom.py
deleted file mode 100644 (file)
index d669a49..0000000
+++ /dev/null
@@ -1,776 +0,0 @@
-# -*- coding: utf-8 -*-
-#######################################################################################################
-#
-#    MediaPortal for Dreambox OS
-#
-#    Coded by MediaPortal Team (c) 2013-2020
-#
-#  This plugin is open source but it is NOT free software.
-#
-#  This plugin may only be distributed to and executed on hardware which
-#  is licensed by Dream Property GmbH. This includes commercial distribution.
-#  In other words:
-#  It's NOT allowed to distribute any parts of this plugin or its source code in ANY way
-#  to hardware which is NOT licensed by Dream Property GmbH.
-#  It's NOT allowed to execute this plugin and its source code or even parts of it in ANY way
-#  on hardware which is NOT licensed by Dream Property GmbH.
-#
-#  This applies to the source code as a whole as well as to parts of it, unless explicitely
-#  stated otherwise.
-#
-#  If you want to use or modify the code or parts of it, permission from the authors is necessary.
-#  You have to keep OUR license and inform us about any modification, but it may NOT be distributed
-#  other than under the conditions noted above.
-#
-#  As an exception regarding modifcations, you are NOT permitted to remove
-#  any copy protections implemented in this plugin or change them for means of disabling
-#  or working around the copy protections, unless the change has been explicitly permitted
-#  by the original authors. Also decompiling and modification of the closed source
-#  parts is NOT permitted.
-#
-#  Advertising with this plugin is NOT allowed.
-#
-#  For other uses, permission from the authors is necessary.
-#
-#######################################################################################################
-
-from Plugins.Extensions.MediaPortal.plugin import _
-from Plugins.Extensions.MediaPortal.resources.imports import *
-from Plugins.Extensions.MediaPortal.resources.keyboardext import VirtualKeyBoardExt
-from Plugins.Extensions.MediaPortal.resources.choiceboxext import ChoiceBoxExt
-
-agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 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/porncom.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
-
-class porncomGenreScreen(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("Porn.com")
-               self['ContentTitle'] = Label("Genre:")
-               self.keyLocked = True
-               self.suchString = ''
-
-               self.filmliste = []
-               self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
-               self['liste'] = self.ml
-
-               self.onLayoutFinish.append(self.layoutFinished)
-
-       def layoutFinished(self):
-               self.keyLocked = True
-               self.url = "https://www.porn.com/categories"
-               getPage(self.url, agent=agent).addCallback(self.genreData).addErrback(self.dataError)
-
-       def genreData(self, data):
-               dupelist = []
-               Cats = re.findall('class="thumb"\shref="(.*?)".*?<img.src="(.*?)".*?></picture></a><h3><a href=".*?>(.*?)</a>', data, re.S)
-               if Cats:
-                       for (Url, Image, Title) in Cats:
-                               Url = "https://www.porn.com" + Url + "?p="
-                               dupelist.append(Title)
-                               self.filmliste.append((Title, Url, Image, True))
-               Cats2 = re.findall('class="flex(?:\sexpanded|)"><a href="(.*?)">(.*?)</a>', data, re.S)
-               if Cats2:
-                       for (Url, Title) in Cats2:
-                               if Title not in dupelist:
-                                       Url = "https://www.porn.com" + Url + "?p="
-                                       self.filmliste.append((Title, Url, default_cover, True))
-               # remove duplicates
-               self.filmliste = list(set(self.filmliste))
-               self.filmliste.sort()
-               self.filmliste.insert(0, ("Playlists", "https://www.porn.com/playlists?p=", default_cover, True))
-               self.filmliste.insert(0, ("Channels", "https://www.porn.com/channels?p=", default_cover, True))
-               self.filmliste.insert(0, ("Pornstars", "https://www.porn.com/pornstars?p=", default_cover, True))
-               self.filmliste.insert(0, ("Longest", "https://www.porn.com/videos?o=l$$AGE$$&p=", default_cover, False))
-               self.filmliste.insert(0, ("Most Discussed", "https://www.porn.com/videos?o=m$$AGE$$&p=", default_cover, False))
-               self.filmliste.insert(0, ("Top Rated", "https://www.porn.com/videos?o=r$$AGE$$&p=", default_cover, False))
-               self.filmliste.insert(0, ("Most Viewed", "https://www.porn.com/videos?o=v$$AGE$$&p=", default_cover, False))
-               self.filmliste.insert(0, ("Most Popular", "https://www.porn.com/videos?o=f$$AGE$$&p=", default_cover, False))
-               self.filmliste.insert(0, ("Newest", "https://www.porn.com/videos?o=d&p=", default_cover, False))
-               self.filmliste.insert(0, ("--- Search ---", "callSuchen", default_cover, True))
-               self.ml.setList(map(self._defaultlistcenter, self.filmliste))
-               self.ml.moveToIndex(0)
-               self.keyLocked = False
-               self.showInfos()
-
-       def showInfos(self):
-               cover = self['liste'].getCurrent()[0][2]
-               CoverHelper(self['coverArt']).getCover(cover)
-
-       def keyOK(self):
-               if self.keyLocked:
-                       return
-               Name = self['liste'].getCurrent()[0][0]
-               Link = self['liste'].getCurrent()[0][1]
-               Sort = self['liste'].getCurrent()[0][3]
-               if Name == "--- Search ---":
-                       self.suchen(suggest_func=self.getSuggestions)
-               elif Name == "Channels":
-                       self.session.open(porncomChannelsScreen, Link, Name, Sort)
-               elif Name == "Playlists":
-                       self.session.open(porncomPlaylistsScreen, Link, Name, Sort)
-               elif Name == "Pornstars":
-                       self.session.open(porncomPornstarsScreen, Link, Name, Sort)
-               else:
-                       self.session.open(porncomFilmScreen, Link, Name, Sort)
-
-       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(porncomFilmScreen, Link, Name, True)
-
-       def getSuggestions(self, text, max_res):
-               url = "https://www.porn.com/search/suggest.json"
-               postdata = {'type': "v", 'q': text}
-               d = twAgentGetPage(url, method='POST', postdata=urlencode(postdata), 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:
-                               if not item.has_key('separator'):
-                                       li = item['label']['term']
-                                       list.append(str(li))
-                                       max_res -= 1
-                                       if not max_res: break
-               elif err:
-                       printl(str(suggestions),self,'E')
-               return list
-
-class porncomPornstarsScreen(MPScreen, ThumbsHelper):
-
-       def __init__(self, session, Link, Name, Sort):
-               self.Link = Link
-               self.Name = Name
-               self.Sort = Sort
-               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,
-                       "yellow" : self.keySort,
-                       "blue" : self.keyAge
-               }, -1)
-
-               self['title'] = Label("Porn.com")
-               self['ContentTitle'] = Label("Genre: %s" % self.Name)
-               self['F2'] = Label(_("Page"))
-               self['F3'] = Label(_("Sort"))
-               self['Page'] = Label(_("Page:"))
-               self.keyLocked = True
-               self.page = 1
-               self.lastpage = 1
-               self.sort = 't'
-               self.sortname = 'Top Trending'
-               self.age = ''
-               self.agename = 'All Time'
-
-               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 = []
-               url = "%s%s&o=%s$$AGE$$" % (self.Link, str(self.page), self.sort)
-               if self.sortname != 'Top Trending' and self.sortname != 'Alphabetical' and self.sortname != 'Number of videos':
-                       age = '$$AGE$$'
-               else:
-                       age = ''
-               url = url.replace('$$AGE$$', self.age)
-               getPage(url, agent=agent).addCallback(self.genreData).addErrback(self.dataError)
-
-       def genreData(self, data):
-               lastp = re.search('<span>\((?:<span>|)(\d+.*?)(?:</span>|) pornstars\)', data, re.S)
-               if lastp:
-                       lastp = lastp.group(1).replace(',','')
-                       lastp = round((float(lastp) / 24) + 0.5)
-                       self.lastpage = int(lastp)
-                       if self.lastpage > 50 and self.sortname != 'Alphabetical':
-                               self.lastpage = 50
-                       self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
-               else:
-                       self.lastpage = 999
-                       self['page'].setText(str(self.page))
-               Movies = re.findall('class="thumb"><a href="(.*?)">.*?<img src="(.*?)" alt=".*?</a></div><h3><a href=".*?>(.*?)</a>.*?<div class="meta">(.*?)</div>', data, re.S)
-               if Movies:
-                       for (Url, Image, Title, Meta) in Movies:
-                               Videos = re.findall('<p>(\d.*?)\s<span>Videos</span></p>', Meta, re.S)
-                               if Videos:
-                                       Videos = Videos[0].replace('.','')
-                               else:
-                                       Videos = "-"
-                               Url = "https://www.porn.com" + Url + "?p="
-                               self.filmliste.append((decodeHtml(Title), Url, Image, Videos))
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_('No pornstars found!'), "", 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 keySort(self):
-               if self.keyLocked:
-                       return
-               if not self.Sort:
-                       return
-               rangelist = [ ['Top Trending', 't'], ['Most Popular', 'f'], ['Most Viewed', 'v'], ['Alphabetical', 'n'], ['Number of videos', 'c'] ]
-               self.session.openWithCallback(self.keySortAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
-
-       def keySortAction(self, result):
-               if result:
-                       self.sort = result[1]
-                       self.sortname = result[0]
-                       self.loadPage()
-               if self.sortname != 'Top Trending' and self.sortname != 'Alphabetical' and self.sortname != 'Number of videos':
-                       self['F4'].setText(_("Filter"))
-               else:
-                       self['F4'].setText('')
-                       self.age = ''
-                       self.agename = 'All Time'
-
-       def keyAge(self):
-               if self.keyLocked:
-                       return
-               if self.Sort and (self.sortname == 'Top Trending' or self.sortname == 'Alphabetical' or self.sortname == 'Number of videos'):
-                       return
-               rangelist = [ ['Today', '1'], ['This Week', '7'], ['This Month', '30'], ['All Time', ''] ]
-               self.session.openWithCallback(self.keyAgeAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
-
-       def keyAgeAction(self, result):
-               if result:
-                       self.age = result[1]
-                       self.agename = result[0]
-                       self.loadPage()
-
-       def showInfos(self):
-               title = self['liste'].getCurrent()[0][0]
-               pic = self['liste'].getCurrent()[0][2]
-               videos = self['liste'].getCurrent()[0][3]
-               self['name'].setText(title)
-               if self.Sort:
-                       sort = self.sortname
-               else:
-                       sort = self.Name
-               self['handlung'].setText("Videos: %s\n%s: %s\n%s: %s" % (videos, _("Sort order"), sort, _("Filter"), self.agename))
-               CoverHelper(self['coverArt']).getCover(pic)
-
-       def keyOK(self):
-               if self.keyLocked:
-                       return
-               Name = self['liste'].getCurrent()[0][0]
-               Link = self['liste'].getCurrent()[0][1]
-               self.session.open(porncomFilmScreen, Link, Name, True)
-
-class porncomChannelsScreen(MPScreen, ThumbsHelper):
-
-       def __init__(self, session, Link, Name, Sort):
-               self.Link = Link
-               self.Name = Name
-               self.Sort = Sort
-               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,
-                       "yellow" : self.keySort,
-                       "blue" : self.keyAge
-               }, -1)
-
-               self['title'] = Label("Porn.com")
-               self['ContentTitle'] = Label("Genre: %s" % self.Name)
-               self['F2'] = Label(_("Page"))
-               self['F3'] = Label(_("Sort"))
-               self['F4'].setText(_("Filter"))
-               self['Page'] = Label(_("Page:"))
-               self.keyLocked = True
-               self.page = 1
-               self.lastpage = 1
-               self.sort = 'f'
-               self.sortname = 'Most Popular'
-               self.age = '7'
-               self.agename = 'This Week'
-
-               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 = []
-               url = "%s%s&o=%s$$AGE$$" % (self.Link, str(self.page), self.sort)
-               if self.sortname != 'Newest':
-                       age = '$$AGE$$'
-               else:
-                       age = ''
-               url = url.replace('$$AGE$$', self.age)
-               getPage(url, agent=agent).addCallback(self.genreData).addErrback(self.dataError)
-
-       def genreData(self, data):
-               lastp = re.search('<span>\((?:<span>|)(\d+.*?)(?:</span>|) channels\)', data, re.S)
-               if lastp:
-                       lastp = lastp.group(1).replace(',','')
-                       lastp = round((float(lastp) / 32) + 0.5)
-                       self.lastpage = int(lastp)
-                       self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
-               else:
-                       self.lastpage = 999
-                       self['page'].setText(str(self.page))
-               Movies = re.findall('class="thumb"><a href="(.*?)">.*?<img src=".*?<img src="(.*?)" alt=".*?</a></div><h3><a href=".*?>(.*?)</a>.*?<div class="meta">(.*?)</div>', data, re.S)
-               if Movies:
-                       for (Url, Image, Title, Meta) in Movies:
-                               Videos = re.findall('<p>(\d.*?)\s<span>Videos</span></p>', Meta, re.S)
-                               if Videos:
-                                       Videos = Videos[0].replace('.','')
-                               else:
-                                       Videos = "-"
-                               Url = "https://www.porn.com" + Url + "?p="
-                               self.filmliste.append((decodeHtml(Title), Url, Image, Videos))
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_('No channels found!'), "", 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=0)
-               self.showInfos()
-
-       def keySort(self):
-               if self.keyLocked:
-                       return
-               if not self.Sort:
-                       return
-               rangelist = [ ['Newest', 'd'], ['Most Popular', 'f'], ['Most Viewed', 'v'] ]
-               self.session.openWithCallback(self.keySortAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
-
-       def keySortAction(self, result):
-               if result:
-                       self.sort = result[1]
-                       self.sortname = result[0]
-                       self.loadPage()
-               if self.sortname != 'Newest':
-                       self['F4'].setText(_("Filter"))
-               else:
-                       self['F4'].setText('')
-                       self.age = ''
-                       self.agename = 'All Time'
-
-       def keyAge(self):
-               if self.keyLocked:
-                       return
-               if self.Sort and self.sortname == 'Newest':
-                       return
-               rangelist = [ ['Today', '1'], ['This Week', '7'], ['This Month', '30'], ['All Time', ''] ]
-               self.session.openWithCallback(self.keyAgeAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
-
-       def keyAgeAction(self, result):
-               if result:
-                       self.age = result[1]
-                       self.agename = result[0]
-                       self.loadPage()
-
-       def showInfos(self):
-               title = self['liste'].getCurrent()[0][0]
-               pic = self['liste'].getCurrent()[0][2]
-               videos = self['liste'].getCurrent()[0][3]
-               self['name'].setText(title)
-               if self.Sort:
-                       sort = self.sortname
-               else:
-                       sort = self.Name
-               self['handlung'].setText("Videos: %s\n%s: %s\n%s: %s" % (videos, _("Sort order"), sort, _("Filter"), self.agename))
-               CoverHelper(self['coverArt']).getCover(pic)
-
-       def keyOK(self):
-               if self.keyLocked:
-                       return
-               Name = self['liste'].getCurrent()[0][0]
-               Link = self['liste'].getCurrent()[0][1]
-               self.session.open(porncomFilmScreen, Link, Name, True)
-
-class porncomPlaylistsScreen(MPScreen, ThumbsHelper):
-
-       def __init__(self, session, Link, Name, Sort):
-               self.Link = Link
-               self.Name = Name
-               self.Sort = Sort
-               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,
-                       "yellow" : self.keySort,
-                       "blue" : self.keyAge
-               }, -1)
-
-               self['title'] = Label("Porn.com")
-               self['ContentTitle'] = Label("Genre: %s" % self.Name)
-               self['F2'] = Label(_("Page"))
-               self['F3'] = Label(_("Sort"))
-               self['F4'].setText(_("Filter"))
-               self['Page'] = Label(_("Page:"))
-               self.keyLocked = True
-               self.page = 1
-               self.lastpage = 1
-               self.sort = 'f'
-               self.sortname = 'Most Popular'
-               self.age = '7'
-               self.agename = 'This Week'
-
-               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 = []
-               url = "%s%s&o=%s$$AGE$$" % (self.Link, str(self.page), self.sort)
-               if self.sortname != 'Newest' and self.sortname != 'Number of videos':
-                       age = '$$AGE$$'
-               else:
-                       age = ''
-               url = url.replace('$$AGE$$', self.age)
-               getPage(url, agent=agent).addCallback(self.genreData).addErrback(self.dataError)
-
-       def genreData(self, data):
-               lastp = re.search('<span>\((?:<span>|)(\d+.*?)(?:</span>|) user playlists\)', data, re.S)
-               if lastp:
-                       lastp = lastp.group(1).replace(',','')
-                       lastp = round((float(lastp) / 25) + 0.5)
-                       self.lastpage = int(lastp)
-                       self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
-               else:
-                       self.lastpage = 999
-                       self['page'].setText(str(self.page))
-               Movies = re.findall('class="thumb">.*?<img src="(.*?)"\salt="(.*?)".*?Play all</a><a href="(.*?)">.*?<div class="meta">(.*?)</div>', data, re.S)
-               if Movies:
-                       for (Image, Title, Url, Meta) in Movies:
-                               Videos = re.findall('<p><span>(\d.*?)\sVideos</span></p>', Meta, re.S)
-                               if Videos:
-                                       Videos = Videos[0].replace('.','')
-                               else:
-                                       Videos = "-"
-                               Url = "https://www.porn.com" + Url + "?p="
-                               self.filmliste.append((decodeHtml(Title), Url, Image, Videos))
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_('No playlists found!'), "", 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 keySort(self):
-               if self.keyLocked:
-                       return
-               if not self.Sort:
-                       return
-               rangelist = [ ['Newest', 'd'], ['Top Rated', 'r'], ['Most Popular', 'f'], ['Most Viewed', 'v'], ['Number of videos', 'c'] ]
-               self.session.openWithCallback(self.keySortAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
-
-       def keySortAction(self, result):
-               if result:
-                       self.sort = result[1]
-                       self.sortname = result[0]
-                       self.loadPage()
-               if self.sortname != 'Newest' and self.sortname != 'Number of videos':
-                       self['F4'].setText(_("Filter"))
-               else:
-                       self['F4'].setText('')
-                       self.age = ''
-                       self.agename = 'All Time'
-
-       def keyAge(self):
-               if self.keyLocked:
-                       return
-               if self.Sort and (self.sortname == 'Newest' or self.sortname == 'Number of videos'):
-                       return
-               rangelist = [ ['Today', '1'], ['This Week', '7'], ['This Month', '30'], ['All Time', ''] ]
-               self.session.openWithCallback(self.keyAgeAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
-
-       def keyAgeAction(self, result):
-               if result:
-                       self.age = result[1]
-                       self.agename = result[0]
-                       self.loadPage()
-
-       def showInfos(self):
-               title = self['liste'].getCurrent()[0][0]
-               pic = self['liste'].getCurrent()[0][2]
-               videos = self['liste'].getCurrent()[0][3]
-               self['name'].setText(title)
-               if self.Sort:
-                       sort = self.sortname
-               else:
-                       sort = self.Name
-               self['handlung'].setText("Videos: %s\n%s: %s\n%s: %s" % (videos, _("Sort order"), sort, _("Filter"), self.agename))
-               CoverHelper(self['coverArt']).getCover(pic)
-
-       def keyOK(self):
-               if self.keyLocked:
-                       return
-               Name = self['liste'].getCurrent()[0][0]
-               Link = self['liste'].getCurrent()[0][1]
-               self.session.open(porncomFilmScreen, Link, Name, True)
-
-class porncomFilmScreen(MPScreen, ThumbsHelper):
-
-       def __init__(self, session, Link, Name, Sort):
-               self.Link = Link
-               self.Name = Name
-               self.Sort = Sort
-               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,
-                       "yellow" : self.keySort,
-                       "blue" : self.keyAge
-               }, -1)
-
-               self['title'] = Label("Porn.com")
-               self['ContentTitle'] = Label("Genre: %s" % self.Name)
-               self['F2'] = Label(_("Page"))
-               if self.Sort and not re.match(".*Search", self.Name):
-                       self['F3'] = Label(_("Sort"))
-               if (not self.Sort and self.Name != 'Newest') or re.match(".*Search", self.Name):
-                       self['F4'].setText(_("Filter"))
-
-               self['Page'] = Label(_("Page:"))
-               self.keyLocked = True
-               self.page = 1
-               self.lastpage = 1
-               if re.match(".*Search", self.Name):
-                       self.sortname = ''
-                       self.sort = ''
-               else:
-                       self.sortname = 'Newest'
-                       self.sort = 'd'
-               self.age = ''
-               self.agename = 'All Time'
-
-               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):
-                       if self.sortname != 'All Time':
-                               age = '&tp=$$AGE$$'
-                       else:
-                               age = ''
-                       url = "https://www.porn.com/videos/search?q=%s&p=%s%s" % (self.Link, str(self.page), age)
-               else:
-                       url = "%s%s" % (self.Link, str(self.page))
-                       if self.Sort:
-                               url = "%s&o=%s$$AGE$$" % (url, self.sort)
-                       if self.sortname != 'Newest':
-                               age = '$$AGE$$'
-                       else:
-                               age = ''
-               url = url.replace('$$AGE$$', self.age)
-               getPage(url, agent=agent).addCallback(self.genreData).addErrback(self.dataError)
-
-       def genreData(self, data):
-               lastp = re.search('<span>\((?:<span>|)(\d+.*?)(?:</span>|) (?:results|videos)\)', data, re.S)
-               if lastp:
-                       lastp = lastp.group(1).replace(',','')
-                       if re.match(".*Search", self.Name):
-                               lastp = round((float(lastp) / 40) + 0.5)
-                       else:
-                               lastp = round((float(lastp) / 25) + 0.5)
-                       self.lastpage = int(lastp)
-                       if self.lastpage > 25 and re.match(".*Search", self.Name):
-                               self.lastpage = 25
-                       self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
-               else:
-                       lastp = re.search('class="sub"><span>(?:- |)(.*?) videos</span>', data, re.S)
-                       if lastp:
-                               lastp = lastp.group(1).replace(',','')
-                               lastp = round((float(lastp) / 40) + 0.5)
-                               self.lastpage = int(lastp)
-                               self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
-                       else:
-                               lastp = re.search('Videos:</span><span>(.*?)</span>', data, re.S)
-                               if lastp:
-                                       lastp = lastp.group(1).replace(',','')
-                                       lastp = round((float(lastp) / 201) + 0.5)
-                                       self.lastpage = int(lastp)
-                                       self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
-                               else:
-                                       self.lastpage = 999
-                                       self['page'].setText(str(self.page))
-               Movies = re.findall('class="thumb"><a href="(.*?)"\stitle=".*?<img src="(.*?)".*?></a></div><h3><a href=".*?>(.*?)</a>.*?<div class="meta">(.*?)</div>', data, re.S)
-               if Movies:
-                       for (Url, Image, Title, Meta) in Movies:
-                               Views = re.findall('<p>(\d.*?)\sviews</p>', Meta, re.S)
-                               if Views:
-                                       Views = Views[0]
-                               else:
-                                       Views = "0"
-                               Runtime = re.findall('<p><span>(\d+\smin)</span></p>', Meta, re.S)
-                               if Runtime:
-                                       Runtime = Runtime[0]
-                               else:
-                                       Runtime = "-"
-                               Url = "https://www.porn.com" + Url
-                               Image = Image.replace('/tags/', '/promo/crop/')
-                               Image = re.sub(r'/\d+.jpg', "/promo_15.jpg", Image)
-                               self.filmliste.append((decodeHtml(Title), Url, Image, Runtime, Views))
-               if len(self.filmliste) == 0:
-                       self.filmliste.append((_('No movies found!'), "", 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 keySort(self):
-               if self.keyLocked:
-                       return
-               if not self.Sort:
-                       return
-               if re.match(".*Search", self.Name):
-                       return
-               rangelist = [ ['Hot', 'h'], ['Newest', 'd'], ['Most Popular', 'f'], ['Most Viewed', 'v'], ['Top Rated', 'r'], ['Most Discussed', 'm'], ['Longest', 'l'] ]
-               self.session.openWithCallback(self.keySortAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
-
-       def keySortAction(self, result):
-               if result:
-                       self.sort = result[1]
-                       self.sortname = result[0]
-                       self.loadPage()
-               if self.sortname != 'Newest' and self.sortname != 'Hot':
-                       self['F4'].setText(_("Filter"))
-               else:
-                       self['F4'].setText('')
-                       self.age = ''
-                       self.agename = 'All Time'
-
-       def keyAge(self):
-               if self.keyLocked:
-                       return
-               if self.Sort and (self.sortname == 'Newest' or self.sortname == 'Hot'):
-                       return
-               if not self.Sort and self.Name == 'Newest':
-                       return
-               if re.match(".*Search", self.Name):
-                       rangelist = [ ['Today', '1'], ['This Week', '7'], ['This Month', '30'], ['3 Month', '90'], ['This Year', '365'], ['All Time', ''] ]
-               else:
-                       rangelist = [ ['Today', '1'], ['This Week', '7'], ['This Month', '30'], ['All Time', ''] ]
-               self.session.openWithCallback(self.keyAgeAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
-
-       def keyAgeAction(self, result):
-               if result:
-                       self.age = result[1]
-                       self.agename = result[0]
-                       self.loadPage()
-
-       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)
-               if self.Sort:
-                       sort = self.sortname
-               else:
-                       sort = self.Name
-               self['handlung'].setText("Runtime: %s\nViews: %s\n%s: %s\n%s: %s" % (runtime, views, _("Sort order"), sort, _("Filter"), self.agename))
-               CoverHelper(self['coverArt']).getCover(pic)
-
-       def keyOK(self):
-               if self.keyLocked:
-                       return
-               Link = self['liste'].getCurrent()[0][1]
-               getPage(Link, agent=agent).addCallback(self.parseData).addErrback(self.dataError)
-
-       def parseData(self, data):
-               Title = self['liste'].getCurrent()[0][0]
-               if mp_globals.model in ["one","two"]:
-                       match = re.findall('"(?:\d+p|2K|4K)",url:"(http.*?)"', data)
-               else:
-                       match = re.findall('"\d+p",url:"(http.*?)"', data)
-               if match:
-                       url = match[-1].replace('\/','/')
-                       self.session.open(SimplePlayer, [(Title, url)], showPlaylist=False, ltype='porncom')
-               else:
-                       message = self.session.open(MessageBoxExt, _("Stream not found"), MessageBoxExt.TYPE_INFO, timeout=5)
\ No newline at end of file
index 690a42e..9501b1f 100644 (file)
@@ -44,7 +44,6 @@ import subprocess
 
 config_mp.mediaportal.pornhub_username = ConfigText(default="pornhubUserName", fixed_size=False)
 config_mp.mediaportal.pornhub_password = ConfigPassword(default="pornhubPassword", fixed_size=False)
-config_mp.mediaportal.pornhub_cdnfix = ConfigYesNo(default=False)
 
 base_url = 'https://www.pornhub.com'
 
@@ -169,7 +168,11 @@ class pornhubGenreScreen(MPScreen, LoginFunc):
                        self.filmliste.insert(0, (400 * "—", None, default_cover))
                        self.filmliste.insert(0, ("Previously Viewed", "%s/users/%s/videos/recent?page=" % (base_url, self.username), default_cover))
                        self.filmliste.insert(0, ("My Feed", "%s/feeds?section=videos&page=" % base_url, default_cover))
-                       self.filmliste.insert(0, ("Recommended", "%s/recommended?ajax=1&page=" % base_url, default_cover))
+                       self.filmliste.insert(0, ("Recommended - Longest", "%s/recommended?ajax=1&o=duration&page=" % base_url, default_cover))
+                       self.filmliste.insert(0, ("Recommended - Top Rated", "%s/recommended?ajax=1&o=rating&page=" % base_url, default_cover))
+                       self.filmliste.insert(0, ("Recommended - Most Viewed", "%s/recommended?ajax=1&o=views&page=" % base_url, default_cover))
+                       self.filmliste.insert(0, ("Recommended - Most Relevant", "%s/recommended?ajax=1&page=" % base_url, default_cover))
+                       self.filmliste.insert(0, ("Recommended - Newest", "%s/recommended?ajax=1&o=time&page=" % base_url, default_cover))
                        self.filmliste.insert(0, ("Member Subscriptions", "%s/users/%s/subscriptions?page=" % (base_url, self.username), default_cover))
                        self.filmliste.insert(0, ("Channel Subscriptions", "%s/users/%s/channel_subscriptions?page=" % (base_url, self.username), default_cover))
                        self.filmliste.insert(0, ("Pornstar Subscriptions", "%s/users/%s/pornstar_subscriptions?page=" % (base_url, self.username), default_cover))
@@ -178,20 +181,29 @@ class pornhubGenreScreen(MPScreen, LoginFunc):
                self.filmliste.insert(0, (400 * "—", None, default_cover))
                self.filmliste.insert(0, ("Playlists", "%s/playlists?page=" % base_url, default_cover))
                self.filmliste.insert(0, ("Channels", "%s/channels?page=" % base_url, default_cover))
+               self.filmliste.insert(0, ("Amateur Models", "%s/pornstars?page=" % base_url, default_cover))
                self.filmliste.insert(0, ("Pornstars", "%s/pornstars?page=" % base_url, default_cover))
+               self.filmliste.insert(0, (400 * "—", None, default_cover))
                self.filmliste.insert(0, ("Homemade - Longest", "%s/video?p=homemade&o=lg&page=" % base_url, default_cover))
                self.filmliste.insert(0, ("Homemade - Hottest", "%s/video?p=homemade&o=ht&page=" % base_url, default_cover))
                self.filmliste.insert(0, ("Homemade - Top Rated", "%s/video?p=homemade&o=tr&page=" % base_url, default_cover))
                self.filmliste.insert(0, ("Homemade - Most Viewed", "%s/video?p=homemade&o=mv&page=" % base_url, default_cover))
                self.filmliste.insert(0, ("Homemade - Featured Recently", "%s/video?p=homemade&o=mr&page=" % base_url, default_cover))
                self.filmliste.insert(0, ("Homemade - Newest", "%s/video?p=homemade&o=cm&page=" % base_url, default_cover))
+               self.filmliste.insert(0, ("Professional - Longest", "%s/video?p=professional&o=lg&page=" % base_url, default_cover))
+               self.filmliste.insert(0, ("Professional - Hottest", "%s/video?p=professional&o=ht&page=" % base_url, default_cover))
+               self.filmliste.insert(0, ("Professional - Top Rated", "%s/video?p=professional&o=tr&page=" % base_url, default_cover))
+               self.filmliste.insert(0, ("Professional - Most Viewed", "%s/video?p=professional&o=mv&page=" % base_url, default_cover))
+               self.filmliste.insert(0, ("Professional - Featured Recently", "%s/video?p=professional&o=mr&page=" % base_url, default_cover))
+               self.filmliste.insert(0, ("Professional - Newest", "%s/video?p=professional&o=cm&page=" % base_url, default_cover))
+               self.filmliste.insert(0, (400 * "—", None, default_cover))
+               self.filmliste.insert(0, ("Community Feed", "%s/community?content=videos&page=" % base_url, default_cover))
+               if not phLoggedIn:
+                       self.filmliste.insert(0, ("Recommended", "%s/recommended?ajax=1&page=" % base_url, default_cover))
                self.filmliste.insert(0, ("Longest", "%s/video?o=lg&page=" % base_url, default_cover))
                self.filmliste.insert(0, ("Hottest", "%s/video?o=ht&page=" % base_url, default_cover))
                self.filmliste.insert(0, ("Top Rated", "%s/video?o=tr&page=" % base_url, default_cover))
                self.filmliste.insert(0, ("Most Viewed", "%s/video?o=mv&page=" % base_url, default_cover))
-               self.filmliste.insert(0, ("Community Feed", "%s/community?content=videos&page=" % base_url, default_cover))
-               if not phLoggedIn:
-                       self.filmliste.insert(0, ("Recommended", "%s/recommended?ajax=1&page=" % base_url, default_cover))
                self.filmliste.insert(0, ("Featured Recently", "%s/video?o=mr&page=" % base_url, default_cover))
                self.filmliste.insert(0, ("Newest", "%s/video?o=cm&page=" % base_url, default_cover))
                self.filmliste.insert(0, ("--- Search ---", "callSuchen", default_cover))
@@ -215,7 +227,10 @@ class pornhubGenreScreen(MPScreen, LoginFunc):
                        self.session.open(pornhubSubscriptionsScreen, Link, Name)
                elif re.match(".*Pornstars", Name):
                        Link = self['liste'].getCurrent()[0][1]
-                       self.session.open(pornhubPornstarScreen, Link, Name)
+                       self.session.open(pornhubPornstarScreen, Link, Name, 'pornstar')
+               elif re.match(".*Amateur Models", Name):
+                       Link = self['liste'].getCurrent()[0][1]
+                       self.session.open(pornhubPornstarScreen, Link, Name, 'amateur')
                elif re.match(".*Channels", Name):
                        Link = self['liste'].getCurrent()[0][1]
                        self.session.open(pornhubChannelScreen, Link, Name)
@@ -286,7 +301,6 @@ class pornhubSetupScreen(MPSetupScreen, ConfigListScreenExt):
 
                self.list.append(getConfigListEntry(_("Username:"), config_mp.mediaportal.pornhub_username))
                self.list.append(getConfigListEntry(_("Password:"), config_mp.mediaportal.pornhub_password))
-               self.list.append(getConfigListEntry(_("CDN fix (please don't use this option as default):"), config_mp.mediaportal.pornhub_cdnfix))
 
                self["config"].setList(self.list)
 
@@ -336,8 +350,8 @@ class pornhubPlayListScreen(MPScreen, ThumbsHelper):
                self.lock = False
                self.page = 1
                self.lastpage = 1
-               self.sort = 'mr'
-               self.sortname = "Most Recent"
+               self.sort = 'tr'
+               self.sortname = "Top Rated"
                self.reload = False
 
                self.filmliste = []
@@ -353,21 +367,23 @@ class pornhubPlayListScreen(MPScreen, ThumbsHelper):
                twAgentGetPage(url, agent=phAgent, cookieJar=ph_cookies).addCallback(self.loadPageData).addErrback(self.dataError)
 
        def loadPageData(self, data):
-               countprofile = re.findall('class="showingInfo">Showing up to (\d+) playlists.</div>', data, re.S)
+               countprofile = re.findall('class="showingInfo">(?:\s+|)Showing up to (\d+) playlists.(?:\s+|)</div>', data, re.S)
                if countprofile:
-                       self.lastpage = int(round((float(countprofile[0].replace(',','')) / 30) + 0.5))
+                       self.lastpage = int(round((float(countprofile[0].replace(',','')) / 30) + 0.49))
                        self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
                else:
                        self.getLastPage(data, 'class="pagination3">(.*?)</div>')
                preparse = re.search('class="sectionWrapper(.*?)class="pagination3"', data, re.S)
                if not preparse:
                        preparse = re.search('class="sectionWrapper(.*?)id="profileInformation"', data, re.S)
-               Cats = re.findall('class="playlist-videos">.*?class="number"><span>(.*?)</span>.*?borderLink.*?href="(/view_video.php.*?)".*?class="viewPlaylistLink\s{0,1}"\shref="(.*?)".*?data-mediumthumb="(.*?)".*?class="title\s{0,1}"\stitle="(.*?)"', preparse.group(1), re.S)
-               if Cats:
-                       for (Videos, PlayUrl, Url, Image, Title) in Cats:
-                               Url = base_url + Url
-                               PlayUrl = base_url + PlayUrl
-                               self.filmliste.append((decodeHtml(Title), Videos, Image, Url, PlayUrl))
+               Items = re.findall('class="playlist-videos">(.*?)</li>', preparse.group(1), re.S)
+               for each in Items:
+                       Cats = re.findall('class="number"><span>(.*?)</span>.*?borderLink.*?class="viewPlaylistLink\s{0,1}"\shref="(.*?)".*?data-mediumthumb="(.*?)".*?class="title\s{0,1}"\stitle="(.*?)".*?class="favorited">(.*?)</span>.*?class="value">(.*?)</div>.*?class="views on-playlist-thumb"><var>(.*?)</var>', each, re.S)
+                       if Cats:
+                               for (Videos, Url, Image, Title, Favorites, Rating, Views) in Cats:
+                                       Url = base_url + Url
+                                       Favorites = Favorites.replace('favorites','').strip()
+                                       self.filmliste.append((decodeHtml(Title), Videos, Image, Url, Favorites, Rating, Views))
                if len(self.filmliste) == 0:
                        self.filmliste.append((_('No playlists found!'), "", None, None, None))
                self.ml.setList(map(self.pornhubPlayListEntry, self.filmliste))
@@ -379,31 +395,43 @@ class pornhubPlayListScreen(MPScreen, ThumbsHelper):
                self.showInfos()
 
        def showInfos(self):
-               submsg = ""
+               Title = self['liste'].getCurrent()[0][0]
+               Count = self['liste'].getCurrent()[0][1]
                Image = self['liste'].getCurrent()[0][2]
+               Favorites = self['liste'].getCurrent()[0][4]
+               Rating = self['liste'].getCurrent()[0][5]
+               Views = self['liste'].getCurrent()[0][6]
                CoverHelper(self['coverArt']).getCover(Image)
+               self['name'].setText(Title)
+               self['extrainfo'].setText("%s: %s" % (_("Sort order"), self.sortname))
                if phLoggedIn:
                        if self.Name == "Favourite Playlists":
-                               submsg = ""
+                               submsg = "\nFavourite: Yes"
                                self['F4'].setText(_("Remove Favourite"))
+                               self['handlung'].setText("Rating: %s\nVideos: %s\nViews: %s\nFavourites: %s" % (Rating, Count, Views, Favorites) + submsg)
                        else:
                                url = self['liste'].getCurrent()[0][3]
                                self.lock = True
                                self['F4'].setText('')
                                twAgentGetPage(url, agent=phAgent, cookieJar=ph_cookies).addCallback(self.showInfos2).addErrback(self.dataError)
-               self['handlung'].setText("%s: %s" % (_("Sort order"), self.sortname) + submsg)
+               else:
+                       self['handlung'].setText("Rating: %s\nVideos: %s\nViews: %s\nFavourites: %s" % (Rating, Count, Views, Favorites))
 
        def showInfos2(self, data):
+               Count = self['liste'].getCurrent()[0][1]
+               Favorites = self['liste'].getCurrent()[0][4]
+               Rating = self['liste'].getCurrent()[0][5]
+               Views = self['liste'].getCurrent()[0][6]
                fav = re.findall('var\salreadyAddedToFav\s=\s(\d);', data, re.S)
                isfav = str(fav[0])
                if isfav == "1":
-                       submsg = "\nFavourite"
+                       submsg = "\nFavourite: Yes"
                        self['F4'].setText(_("Remove Favourite"))
                else:
-                       submsg = ""
+                       submsg = "\nFavourite: No"
                        self['F4'].setText(_("Add Favourite"))
                self.lock = False
-               self['handlung'].setText("%s: %s" % (_("Sort order"), self.sortname) + submsg)
+               self['handlung'].setText("Rating: %s\nVideos: %s\nViews: %s\nFavourites: %s" % (Rating, Count, Views, Favorites) + submsg)
 
        def keyOK(self):
                Count = self['liste'].getCurrent()[0][1]
@@ -520,7 +548,7 @@ class pornhubSubscriptionsScreen(MPScreen, ThumbsHelper):
                if self.page == 1 and (self.Name == "Member Subscriptions" or self.Name == "Pornstar Subscriptions"):
                        countprofile = re.findall('class="showingInfo">Showing up to (\d+) subscriptions.</div>', data, re.S)
                        if countprofile:
-                               self.lastpage = int(round((float(countprofile[0].replace(',','')) / 100) + 0.5))
+                               self.lastpage = int(round((float(countprofile[0].replace(',','')) / 100) + 0.49))
                                self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
                        else:
                                self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
@@ -534,7 +562,7 @@ class pornhubSubscriptionsScreen(MPScreen, ThumbsHelper):
                                if self.Name == "Channel Subscriptions":
                                        countprofile = re.findall('>Channel Subscriptions <span>\((\d+)\)', data, re.S)
                                        if countprofile:
-                                               self.lastpage = int(round((float(countprofile[0].replace(',','')) / 100) + 0.5))
+                                               self.lastpage = int(round((float(countprofile[0].replace(',','')) / 100) + 0.49))
                                self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
                                parse = re.search('(.*?)class="profileContentRight', data, re.S)
                                parsedata = parse.group(1)
@@ -569,8 +597,10 @@ class pornhubSubscriptionsScreen(MPScreen, ThumbsHelper):
                self.showInfos()
 
        def showInfos(self):
+               Title = self['liste'].getCurrent()[0][0]
                Image = self['liste'].getCurrent()[0][2]
-               self['handlung'].setText("%s: %s" % (_("Sort order"), self.sortname))
+               self['name'].setText(Title)
+               self['extrainfo'].setText("%s: %s" % (_("Sort order"), self.sortname))
                CoverHelper(self['coverArt']).getCover(Image)
 
        def keyOK(self):
@@ -603,7 +633,7 @@ class pornhubSubscriptionsScreen(MPScreen, ThumbsHelper):
                if phLoggedIn:
                        url = self['liste'].getCurrent()[0][1]
                        if url:
-                               url = url + "1"
+                               url = url.replace('/videos','') + "1"
                                twAgentGetPage(url, agent=phAgent, cookieJar=ph_cookies).addCallback(self.parseSubscribe).addErrback(self.dataError)
 
        def parseSubscribe(self, data):
@@ -622,9 +652,10 @@ class pornhubSubscriptionsScreen(MPScreen, ThumbsHelper):
 
 class pornhubPornstarScreen(MPScreen, ThumbsHelper):
 
-       def __init__(self, session, Link, Name):
+       def __init__(self, session, Link, Name, Type):
                self.Link = Link
                self.Name = Name
+               self.Type = Type
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
                ThumbsHelper.__init__(self)
 
@@ -656,6 +687,7 @@ class pornhubPornstarScreen(MPScreen, ThumbsHelper):
                self.sort = 'mp'
                self.sortname = "Most Popular"
                self.reload = False
+               self.retry = False
 
                self.filmliste = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
@@ -666,17 +698,18 @@ class pornhubPornstarScreen(MPScreen, ThumbsHelper):
        def loadPage(self):
                self.filmliste = []
                self.keyLocked = True
-               url = self.Link + str(self.page) + "&o=%s" % self.sort
+               url = self.Link + str(self.page) + "&o=%s&performerType=%s" % (self.sort, self.Type)
                twAgentGetPage(url, agent=phAgent, cookieJar=ph_cookies).addCallback(self.loadPageData).addErrback(self.dataError)
 
        def loadPageData(self, data):
                self.getLastPage(data, 'class="pagination3">(.*?)</div>')
                parse = re.search('class="textFilter">.*?</span>(.*)', data, re.S)
-               Cats = re.findall('rank_number">(.*?)<.*?data-thumb_url="(.*?)".*?href="(.*?)".*?class="title.*?>(.*?)<.*?videosNumber">(.*?)\sVideos', parse.group(1), re.S)
-               if Cats:
-                       for Rank, Image, Url, Title, Videos in Cats:
-                               Url = base_url + Url + "?page="
-                               self.filmliste.append((decodeHtml(Title), Url, Image, Rank.strip(), Videos))
+               Stars = re.findall('rank_number">(.*?)<.*?data-thumb_url="(.*?)".*?href="(.*?)".*?class="title.*?>(.*?)<.*?videosNumber">(.*?)\sVideos\s+(.*?)\sviews', parse.group(1), re.S)
+               if Stars:
+                       for (Rank, Image, Url, Title, Videos, Views) in Stars:
+                               Url = base_url + Url + "/videos?page="
+                               Rank = Rank.strip()
+                               self.filmliste.append((decodeHtml(Title), Url, Image, Rank, Videos, Views))
                if len(self.filmliste) == 0:
                        self.filmliste.append((_('No pornstars found!'), None, None, "", ""))
                self.ml.setList(map(self.pornhubPornstarListEntry, self.filmliste))
@@ -688,29 +721,140 @@ class pornhubPornstarScreen(MPScreen, ThumbsHelper):
                self.showInfos()
 
        def showInfos(self):
+               Title = self['liste'].getCurrent()[0][0]
                Image = self['liste'].getCurrent()[0][2]
-               self['handlung'].setText("%s: %s" % (_("Sort order"), self.sortname))
+               Rank = self['liste'].getCurrent()[0][3]
+               Count = self['liste'].getCurrent()[0][4]
+               Views = self['liste'].getCurrent()[0][5]
+               self['name'].setText(Title)
+               self['extrainfo'].setText("%s: %s" % (_("Sort order"), self.sortname))
                CoverHelper(self['coverArt']).getCover(Image)
+               self['handlung'].setText("Rank: %s\nVideos: %s\nViews: %s" % (Rank, Count, Views))
                if phLoggedIn:
                        url = self['liste'].getCurrent()[0][1] + "1"
+                       if self.retry:
+                               self.retry = False
+                               url = url.replace('/videos','')
                        twAgentGetPage(url, agent=phAgent, cookieJar=ph_cookies).addCallback(self.showInfos2).addErrback(self.dataError)
 
        def showInfos2(self, data):
-               subs = re.findall('data-subscribed="(\d)"', data, re.S)
-               Subscribed = str(subs[0])
-               if Subscribed == "1":
-                       submsg = "\nSubscribed"
-                       self['F1'].setText(_("Unsubscribe"))
+               if "Error Page Not Found" in data:
+                       self.retry = True
+                       self.showInfos()
                else:
-                       submsg = ""
-                       self['F1'].setText(_("Subscribe"))
-               self['handlung'].setText("%s: %s" % (_("Sort order"), self.sortname) + submsg)
+                       Rank = self['liste'].getCurrent()[0][3]
+                       Count = self['liste'].getCurrent()[0][4]
+                       Views = self['liste'].getCurrent()[0][5]
+                       subscribers = re.findall('class="infoBox subscribers">.*?<span class="big">(?:\s+)(.*?)(?:\s+)</span>', data, re.S)
+                       if not subscribers:
+                               subscribers = re.findall('Subscribers</div><span>(.*?)</span>', data, re.S)
+                               if not subscribers:
+                                       subscribers = re.findall('Video views.*?class="infoBox">.*?class="big">(?:\s+)(.*?)(?:\s+)</span>', data, re.S)
+                       subscribers = "\nSubscribers: " + subscribers[0].strip().replace(',','') if subscribers else ''
+
+                       bio = re.findall('class="title">Bio</div>(.*?)</div>', data, re.S)
+                       bio = "\n\n" + stripAllTags(bio[0]).strip() if bio else ''
+
+                       gender = re.findall('itemprop="gender".*?>(.*?)</span>', data, re.S)
+                       gender = "\nGender: " + gender[0].strip() if gender else ''
+
+                       birthday = re.findall('itemprop="birthDate".*?>(.*?)</span>', data, re.S)
+                       if not birthday:
+                               birthday = re.findall('class="infoPiece"><span>Born:</span>(.*?)</div>', data, re.S)
+                       birthday = "\nBirthday: " + birthday[0].strip() if birthday else ''
+
+                       birthplace = re.findall('itemprop="birthPlace".*?>(.*?)</span>', data, re.S)
+                       if not birthplace:
+                               birthplace = re.findall('class="infoPiece"><span>Birthplace:</span>(.*?)</div>', data, re.S)
+                       birthplace = "\nBirth Place: " + birthplace[0].strip().replace('United States of America','USA') if birthplace else ''
+
+                       age = re.findall('<span>Age:</span>.*?itemprop="".*?>(.*?)</span>', data, re.S)
+                       age = "\nAge: " + age[0].strip() if age else ''
+
+                       measurements = re.findall('<span>Measurements:</span>.*?itemprop="".*?>(.*?)</span>', data, re.S)
+                       if measurements:
+                               measurements = re.findall('(\d+|)(\w+|)-(\d+|)-(\d+|)', measurements[0].strip(), re.S)
+                               if measurements[0][0]:
+                                       x1 = str(int(round(float(measurements[0][0])*2.54)))
+                               else:
+                                       x1 = ''
+                               if measurements[0][1]:
+                                       x2 = measurements[0][1]
+                               else:
+                                       x2 = ''
+                               if measurements[0][2]:
+                                       x3 = str(int(round(float(measurements[0][2])*2.54)))
+                               else:
+                                       x3 = ''
+                               if measurements[0][3]:
+                                       x4 = str(int(round(float(measurements[0][3])*2.54)))
+                               else:
+                                       x4 = ''
+                               measurements = x1 + x2 + "-" + x3 + "-" + x4
+                               measurements = measurements.strip('-')
+                       else:
+                               measurements = ''
+                       measurements = "\nMeasurements: " + measurements if measurements else ''
+
+                       height = re.findall('itemprop="height".*?>.*?\((.*?)</span>', data, re.S)
+                       if not height:
+                               height = re.findall('class="infoPiece"><span>Height:</span>.*?\((.*?)</div>', data, re.S)
+                       height = "\nHeight: " + height[0].strip().replace(')','') if height else ''
+
+                       weight = re.findall('itemprop="weight".*?>.*?\((.*?)</span>', data, re.S)
+                       if not weight:
+                               weight = re.findall('class="infoPiece"><span>Weight:</span>.*?\((.*?)</div>', data, re.S)
+                       weight = "\nWeight: " + weight[0].strip().replace(')','') if weight else ''
+
+                       ethnicity = re.findall('<span>Ethnicity:</span>.*?itemprop="".*?>(.*?)</span>', data, re.S)
+                       ethnicity = "\nEthnicity: " + ethnicity[0].strip() if ethnicity else ''
+
+                       background = re.findall('<span>Background:</span>.*?itemprop="".*?>(.*?)</span>', data, re.S)
+                       background = "\nBackground: " + background[0].strip() if background else ''
+
+                       haircolor = re.findall('<span>Hair Color:</span>.*?itemprop="".*?>(.*?)</span>', data, re.S)
+                       haircolor = "\nHair Color: " + haircolor[0].strip() if haircolor else ''
+
+                       boobs = re.findall('<span>Fake Boobs:</span>.*?itemprop="".*?>(.*?)</span>', data, re.S)
+                       boobs = "\nFake Boobs: " + boobs[0].strip() if boobs else ''
+
+                       tattoos = re.findall('<span>Tattoos:</span>.*?itemprop="".*?>(.*?)</span>', data, re.S)
+                       tattoos = "\nTattoos: " + tattoos[0].strip() if tattoos else ''
+
+                       piercings = re.findall('<span>Piercings:</span>.*?itemprop="".*?>(.*?)</span>', data, re.S)
+                       piercings = "\nPiercings: " + piercings[0].strip() if piercings else ''
+
+                       relationship = re.findall('<span>Relationship status:</span>.*?itemprop="".*?>(.*?)</span>', data, re.S)
+                       relationship = "\nRelationship status: " + relationship[0].strip() if relationship else ''
+
+                       interest = re.findall('<span>Interested in:</span>.*?itemprop="".*?>(.*?)</span>', data, re.S)
+                       interest = "\nInterested in: " + interest[0].strip() if interest else ''
+
+                       citycountry = re.findall('<span>City and Country:</span>.*?itemprop="".*?>(.*?)</span>', data, re.S)
+                       citycountry = "\nCity and Country: " + citycountry[0].strip() if citycountry else ''
+
+                       status = re.findall('<span>Career Status:</span>.*?itemprop="".*?>(.*?)</span>', data, re.S)
+                       status = "\nCareer Status: " + status[0].strip() if status else ''
+
+                       startend = re.findall('<span>Career Start and End:</span>.*?itemprop="".*?>(.*?)</span>', data, re.S)
+                       startend = re.sub(r"\s+", " ", startend[0]).strip() if startend else ''
+                       startend = "\nCareer Start and End: " + startend if startend else ''
+
+                       subs = re.findall('data-subscribed="(\d)"', data, re.S)
+                       Subscribed = str(subs[0])
+                       if Subscribed == "1":
+                               submsg = "\nSubscribed: Yes"
+                               self['F1'].setText(_("Unsubscribe"))
+                       else:
+                               submsg = "\nSubscribed: No"
+                               self['F1'].setText(_("Subscribe"))
+                       self['handlung'].setText("Rank: %s\nVideos: %s\nViews: %s" % (Rank, Count, Views) + subscribers + submsg + birthday + age + gender + height + weight + measurements + birthplace + ethnicity + background + haircolor + boobs + tattoos + piercings + relationship + interest + citycountry + status + startend + bio)
 
        def keyOK(self):
                Name = self['liste'].getCurrent()[0][0]
                Link = self['liste'].getCurrent()[0][1]
                Count = self['liste'].getCurrent()[0][4]
-               self.session.open(pornhubFilmScreen, Link, Name, Count)
+               self.session.open(pornhubFilmScreen, Link, Name, Count, Cat=self.Type)
 
        def keySort(self):
                if self.keyLocked:
@@ -728,8 +872,10 @@ class pornhubPornstarScreen(MPScreen, ThumbsHelper):
                if self.keyLocked:
                        return
                if phLoggedIn:
-                       url = self['liste'].getCurrent()[0][1] + "1"
-                       twAgentGetPage(url, agent=phAgent, cookieJar=ph_cookies).addCallback(self.parseSubscribe).addErrback(self.dataError)
+                       url = self['liste'].getCurrent()[0][1]
+                       if url:
+                               url = url.replace('/videos','') + "1"
+                               twAgentGetPage(url, agent=phAgent, cookieJar=ph_cookies).addCallback(self.parseSubscribe).addErrback(self.dataError)
 
        def parseSubscribe(self, data):
                subs = re.findall('data-subscribe-url="(.*?)".{0,4}data-unsubscribe-url="(.*?)".{0,4}data-subscribed="(.*?)"', data, re.S)
@@ -805,14 +951,16 @@ class pornhubChannelScreen(MPScreen, ThumbsHelper):
 
        def loadPageData(self, data):
                self.getLastPage(data, 'class="pagination3">(.*?)</div>')
-               Cats = re.findall('class="channelsWrapper.*?class="rank">.*?<span>Rank<br/>\s{0,1}(\d+)</span>.*?href="(.*?)".*?img.*?alt="(.*?)".*?src="(.*?)".*?Videos<span>(.*?)</span>.*?data-subscribe-url="(.*?)"\sdata-unsubscribe-url="(.*?)"\sdata-subscribed="(.*?)"', data, re.S)
-               if Cats:
-                       for Rank, Url, Title, Image, Videos, Reg, Unreg, Subscribed in Cats:
+               Chans = re.findall('class="channelsWrapper.*?class="rank">.*?<span>Rank<br/>\s{0,1}(\d+)</span>.*?href="(.*?)".*?img.*?alt="(.*?)".*?data-thumb_url="(.*?)".*?Subscribers<span>(.*?)</span>.*?Videos<span>(.*?)</span>.*?Videos Views<span>(.*?)</span>.*?data-subscribe-url="(.*?)"\sdata-unsubscribe-url="(.*?)"\sdata-subscribed="(.*?)"', data, re.S)
+               if Chans:
+                       for (Rank, Url, Title, Image, Subscribers, Videos, Views, Reg, Unreg, Subscribed) in Chans:
                                Url = base_url + Url + "/videos?o=da&page="
                                Reg = base_url + Reg.replace('&amp;','&')
                                Unreg = base_url + Unreg.replace('&amp;','&')
+                               Subscribers = Subscribers.replace(',','')
                                Videos = Videos.replace(',','')
-                               self.filmliste.append((decodeHtml(Title), Url, Image, Rank.strip(), Videos, Reg, Unreg, Subscribed))
+                               Views = Views.replace(',','')
+                               self.filmliste.append((decodeHtml(Title), Url, Image, Rank.strip(), Videos, Views, Subscribers, Reg, Unreg, Subscribed))
                if len(self.filmliste) == 0:
                        self.filmliste.append((_('No channels found!'), None, None, "", "", None, None, ""))
                self.ml.setList(map(self.pornhubPornstarListEntry, self.filmliste))
@@ -825,16 +973,23 @@ class pornhubChannelScreen(MPScreen, ThumbsHelper):
 
        def showInfos(self):
                submsg = ""
+               Title = self['liste'].getCurrent()[0][0]
                Image = self['liste'].getCurrent()[0][2]
+               Rank = self['liste'].getCurrent()[0][3]
+               Count = self['liste'].getCurrent()[0][4]
+               Views = self['liste'].getCurrent()[0][5]
+               Subscribers = self['liste'].getCurrent()[0][6]
+               self['name'].setText(Title)
+               self['extrainfo'].setText("%s: %s" % (_("Sort order"), self.sortname))
                if phLoggedIn:
-                       Subscribed = self['liste'].getCurrent()[0][7]
+                       Subscribed = self['liste'].getCurrent()[0][9]
                        if Subscribed == "1":
-                               submsg = "\nSubscribed"
+                               submsg = "\nSubscribed: Yes"
                                self['F1'].setText(_("Unsubscribe"))
                        else:
-                               submsg = ""
+                               submsg = "\nSubscribed: No"
                                self['F1'].setText(_("Subscribe"))
-               self['handlung'].setText("%s: %s" % (_("Sort order"), self.sortname) + submsg)
+               self['handlung'].setText("Rank: %s\nVideos: %s\nViews: %s\nSubscribers: %s" % (Rank, Count, Views, Subscribers) + submsg)
                CoverHelper(self['coverArt']).getCover(Image)
 
        def keyOK(self):
@@ -846,7 +1001,7 @@ class pornhubChannelScreen(MPScreen, ThumbsHelper):
        def keySort(self):
                if self.keyLocked:
                        return
-               rangelist = [['Most Popular', 'rk'], ['Trending', 'tr'], ['Most Recent','mr'], ['A-Z','al']]
+               rangelist = [['Most Popular', 'rk'], ['Trending', 'tr'], ['Most Recent','mr']]
                self.session.openWithCallback(self.keySortAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
 
        def keySortAction(self, result):
@@ -859,11 +1014,11 @@ class pornhubChannelScreen(MPScreen, ThumbsHelper):
                if self.keyLocked:
                        return
                if phLoggedIn:
-                       Subscribed = self['liste'].getCurrent()[0][7]
+                       Subscribed = self['liste'].getCurrent()[0][9]
                        if Subscribed == "1":
-                               url = self['liste'].getCurrent()[0][6]
+                               url = self['liste'].getCurrent()[0][8]
                        else:
-                               url = self['liste'].getCurrent()[0][5]
+                               url = self['liste'].getCurrent()[0][7]
                        twAgentGetPage(url, agent=phAgent, cookieJar=ph_cookies).addCallback(self.parseSubscribe).addErrback(self.dataError)
 
        def parseSubscribe(self, data):
@@ -928,12 +1083,6 @@ class pornhubFilmScreen(MPScreen, ThumbsHelper, LoginFunc):
                self.feedpageurl = None
                self.retrycount = 0
 
-               self.infoTimer = eTimer()
-               try:
-                       self.infoTimer_conn = self.infoTimer.timeout.connect(self.getInfos2)
-               except:
-                       self.infoTimer.callback.append(self.getInfos2)
-
                self.filmliste = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
                self['liste'] = self.ml
@@ -963,7 +1112,7 @@ class pornhubFilmScreen(MPScreen, ThumbsHelper, LoginFunc):
                else:
                        if self.retry and self.Cat == "Member Subscriptions":
                                url = url.replace('/public','/upload')
-                       elif self.retry and self.Cat == "Pornstar Subscriptions":
+                       elif self.retry and (self.Cat == "Pornstar Subscriptions" or self.Cat == "pornstar" or self.Cat == "amateur"):
                                url = url.replace('/videos','')
                        twAgentGetPage(url, agent=phAgent, cookieJar=ph_cookies).addCallback(self.genreData).addErrback(self.dataError)
 
@@ -972,24 +1121,27 @@ class pornhubFilmScreen(MPScreen, ThumbsHelper, LoginFunc):
                Movies = None
                countprofile = re.findall('class="showingInfo">Showing up to (?:<span class="totalSpan">)(\d+)(?:</span>) videos.</div>', data, re.S)
                if countprofile:
-                       self.lastpage = int(round((float(countprofile[0].replace(',','')) / 48) + 0.5))
+                       self.lastpage = int(round((float(countprofile[0].replace(',','')) / 48) + 0.49))
                        self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
                else:
                        countprofile = re.findall('id="stats".*?SUBSCRIBERS.*?floatRight">(.*?)\s{0,1}<br/', data, re.S)
                        if countprofile:
-                               self.lastpage = int(round((float(countprofile[0].replace(',','')) / 36) + 0.5))
+                               self.lastpage = int(round((float(countprofile[0].replace(',','')) / 36) + 0.49))
                                self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
                        else:
                                if self.Count:
-                                       self.lastpage = int(round((float(self.Count) / 36) + 0.5))
-                                       self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
+                                       if 'class="pagination3">' in data:
+                                               self.getLastPage(data, 'class="pagination3">(.*?)</div>')
+                                       else:
+                                               self.lastpage = int(round((float(self.Count) / 36) + 0.49))
+                                               self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
                                else:
                                        if self.Name == "Related":
                                                self.lastpage = 6
                                                self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
                                        else:
                                                self.getLastPage(data, 'class="pagination3">(.*?)</div>')
-               parse = re.search('FAN ONLY VIDEOS -->.*?<div class="videoSection(.*?)class="pagination3">', data, re.S)
+               parse = re.search('FAN ONLY VIDEOS -->.*?<div class="videoSection(.*?)(?:class="pagination3">|class="nf-wrapper">)', data, re.S)
                if not parse:
                        parse = re.search('class="nf-videos(.*?)class="pagination3">', data, re.S)
                        if not parse:
@@ -1010,34 +1162,63 @@ class pornhubFilmScreen(MPScreen, ThumbsHelper, LoginFunc):
                        viddata = parse.group(1)
                else:
                        viddata = data
-               Movies = re.findall('(class="(?:\s{0,1}notLoaded |)(?:\s{0,1}js-pop |)videoblock.*?<var\sclass="added">.*?</var>)', viddata, re.S)
-               if Movies:
-                       for each in Movies:
-                               if not ('class="price"' in each or 'class="premiumIcon' in each or 'class="privateOverlay"' in each):
-                                       Movie = re.findall('class="(?:\s{0,1}notLoaded |)(?:\s{0,1}js-pop |)videoblock.*?<a\shref="(.*?)".*?title="(.*?)".*?data-(?:mediumthumb|image)="(.*?)".*?class="duration">(.*?)</var>.*?<span\sclass="views"><var>(.*?)<.*?<var\sclass="added">(.*?)</var>', each, re.S)
-                                       for (Url, Title, Image, Runtime, Views, Added) in Movie:
-                                               Url = base_url + Url
-                                               Title = Title.replace('&amp;amp;','&')
-                                               self.filmliste.append((decodeHtml(Title), Url, Image, Runtime, Views, Added))
-               if len(self.filmliste) == 0:
-                       if self.Link.endswith('/videos/public?page=') and self.Cat == "Member Subscriptions":
-                               self.retry = True
-                               self.lastpage = 999
-                               self.loadPage()
-                               return
-                       elif self.Link.endswith('/videos?page=') and self.Cat == "Pornstar Subscriptions":
-                               self.retry = True
-                               self.lastpage = 999
-                               self.loadPage()
-                               return
-                       else:
-                               self.filmliste.append((_('No movies found!'), None, None, "", "", ""))
-               self.ml.setList(map(self._defaultlistleft, self.filmliste))
+               if "Error Page Not Found" in data:
+                               if self.Link.endswith('/videos/public?page=') and self.Cat == "Member Subscriptions":
+                                       self.retry = True
+                                       self.lastpage = 999
+                                       self.loadPage()
+                                       return
+                               elif self.Link.endswith('/videos?page=') and (self.Cat == "Pornstar Subscriptions" or self.Cat == "pornstar" or self.Cat == "amateur"):
+                                       self.retry = True
+                                       self.lastpage = 999
+                                       self.loadPage()
+                                       return
+                               else:
+                                       self.filmliste.append((_('No movies found!'), None, False, None, "", "", "", "", ""))
+               else:
+                       Movies = re.findall('(class="(?:\s{0,1}notLoaded |)(?:\s{0,1}js-pop |)videoblock.*?<var\sclass="added">.*?</var>)', viddata, re.S)
+                       if Movies:
+                               for each in Movies:
+                                       if not ('class="price"' in each or 'class="premiumIcon' in each or 'class="privateOverlay"' in each):
+                                               Movie = re.findall('class="(?:\s{0,1}notLoaded |)(?:\s{0,1}js-pop |)videoblock.*?<a\shref="(.*?)".*?title="(.*?)".*?data-(?:mediumthumb|image)="(.*?)".*?class="duration">(.*?)</var>.*?<span\sclass="views"><var>(.*?)<.*?<var\sclass="added">(.*?)</var>', each, re.S)
+                                               for (Url, Title, Image, Runtime, Views, Added) in Movie:
+                                                       Url = base_url + Url
+                                                       Title = Title.replace('&amp;amp;','&')
+                                                       if 'class="watchedVideoText"' in each:
+                                                               watched = True
+                                                       else:
+                                                               watched = False
+                                                       if self.Name == "Previously Viewed":
+                                                               watched = True
+                                                       username = ''
+                                                       usertype = ''
+                                                       if 'class="usernameWrap"' in each:
+                                                               userinfo = re.findall('class="usernameWrap">.*?href="/(.*?)/.*?".*?>(.*?)</', each, re.S)
+                                                               if userinfo:
+                                                                       usertype = userinfo[0][0].title()
+                                                                       if usertype.endswith('s'):
+                                                                               usertype = usertype[:-1]
+                                                                       username = userinfo[0][1]
+                                                       self.filmliste.append((decodeHtml(Title), Url, watched, Image, Runtime, Views, Added, usertype, username))
+                       if len(self.filmliste) == 0:
+                               if self.Link.endswith('/videos/public?page=') and self.Cat == "Member Subscriptions":
+                                       self.retry = True
+                                       self.lastpage = 999
+                                       self.loadPage()
+                                       return
+                               elif self.Link.endswith('/videos?page=') and (self.Cat == "Pornstar Subscriptions" or self.Cat == "pornstar" or self.Cat == "amateur"):
+                                       self.retry = True
+                                       self.lastpage = 999
+                                       self.loadPage()
+                                       return
+                               else:
+                                       self.filmliste.append((_('No movies found!'), None, False, None, "", "", "", "", ""))
+               self.ml.setList(map(self._defaultlistleftmarked, self.filmliste))
                if not self.reload:
                        self.ml.moveToIndex(0)
                self.reload = False
                self.keyLocked = False
-               self.th_ThumbsQuery(self.filmliste, 0, 1, 2, None, None, self.page, self.lastpage, mode=1)
+               self.th_ThumbsQuery(self.filmliste, 0, 1, 3, None, None, self.page, self.lastpage, mode=1)
                self.showInfos()
 
        def loadFeedData(self, data):
@@ -1054,34 +1235,54 @@ class pornhubFilmScreen(MPScreen, ThumbsHelper, LoginFunc):
                                                for (Url, Title, Image, Runtime, Views, Added) in Movies:
                                                        Url = base_url + Url
                                                        Title = Title.replace('&amp;amp;','&')
-                                                       self.filmliste.append((decodeHtml(Title), Url, Image, Runtime, Views, Added))
+                                                       if 'class="watchedVideoText"' in each:
+                                                               watched = True
+                                                       else:
+                                                               watched = False
+                                                       username = ''
+                                                       usertype = ''
+                                                       if 'class="usernameWrap"' in each:
+                                                               userinfo = re.findall('class="usernameWrap">.*?href="/(.*?)/.*?".*?>(.*?)</', each, re.S)
+                                                               if userinfo:
+                                                                       usertype = userinfo[0][0].title()
+                                                                       if usertype.endswith('s'):
+                                                                               usertype = usertype[:-1]
+                                                                       username = userinfo[0][1]
+                                                       self.filmliste.append((decodeHtml(Title), Url, watched, Image, Runtime, Views, Added, usertype, username))
                if len(self.filmliste) == 0:
-                       self.filmliste.append((_('No movies found!'), None, None, "", "", ""))
-               self.ml.setList(map(self._defaultlistleft, self.filmliste))
+                       self.filmliste.append((_('No movies found!'), None, False, None, "", "", "", "", ""))
+               self.ml.setList(map(self._defaultlistleftmarked, self.filmliste))
                if not self.reload:
                        self.ml.moveToIndex(0)
                self.reload = False
                self.keyLocked = False
                self['page'].setText(str(self.page))
-               self.th_ThumbsQuery(self.filmliste, 0, 1, 2, None, None, self.page, self.lastpage, mode=1)
+               self.th_ThumbsQuery(self.filmliste, 0, 1, 3, None, None, self.page, self.lastpage, mode=1)
                self.showInfos()
 
        def showInfos(self):
-               if self.infoTimer.isActive():
-                       self.infoTimer.stop()
                self.count = 0
                title = self['liste'].getCurrent()[0][0]
-               pic = self['liste'].getCurrent()[0][2]
+               pic = self['liste'].getCurrent()[0][3]
                self['name'].setText(title)
                CoverHelper(self['coverArt']).getCover(pic)
-               runtime = self['liste'].getCurrent()[0][3]
-               views = self['liste'].getCurrent()[0][4]
-               added = self['liste'].getCurrent()[0][5]
-               self['handlung'].setText("Runtime: %s\nViews: %s\nAdded: %s" % (runtime, views, added))
+               runtime = self['liste'].getCurrent()[0][4]
+               views = self['liste'].getCurrent()[0][5]
+               added = self['liste'].getCurrent()[0][6]
+               usertype = self['liste'].getCurrent()[0][7]
+               username = self['liste'].getCurrent()[0][8]
+               if usertype and username:
+                       usermsg = "\n" + usertype + ": " + username
+               else:
+                       usermsg = ""
+               self['handlung'].setText("Runtime: %s\nViews: %s\nAdded: %s%s" % (runtime, views, added, usermsg))
                self.url = self['liste'].getCurrent()[0][1]
-               id = re.search('\/(\d+)\/(?:original|thumbs_)', pic, re.S)
-               if id:
-                       self.id = id.group(1)
+               if pic:
+                       id = re.search('\/(\d+)\/(?:original|thumbs_)', pic, re.S)
+                       if id:
+                               self.id = id.group(1)
+                       else:
+                               self.id = ''
                else:
                        self.id = ''
                if not self.id == '':
@@ -1092,15 +1293,16 @@ class pornhubFilmScreen(MPScreen, ThumbsHelper, LoginFunc):
                        self.lock = True
                        self['F1'].setText('')
                        self['F4'].setText('')
-                       self.infoTimer.start(1000, True)
+                       if self.Name in ["Favourite Videos", "Previously Viewed"]:
+                               self.getInfos2()
 
        def getInfos2(self):
                twAgentGetPage(self.url, agent=phAgent, cookieJar=ph_cookies, headers={'Referer':base_url}).addCallback(self.showInfos2).addErrback(self.dataError)
 
        def showInfos2(self, data):
-               runtime = self['liste'].getCurrent()[0][3]
-               views = self['liste'].getCurrent()[0][4]
-               added = self['liste'].getCurrent()[0][5]
+               runtime = self['liste'].getCurrent()[0][4]
+               views = self['liste'].getCurrent()[0][5]
+               added = self['liste'].getCurrent()[0][6]
                self.favourited = ""
                self.suburl = ""
                self.unsuburl = ""
@@ -1108,11 +1310,12 @@ class pornhubFilmScreen(MPScreen, ThumbsHelper, LoginFunc):
                favparse = re.findall('favouriteUrl.*?itemId":\"{0,1}(\d+)\"{0,1},.*?isFavourite":(\d),.*?token=(.*?)",', data, re.S)
                if favparse:
                        self.favtoken = str(favparse[0][2])
-                       #self.id = str(favparse[0][0])
                        self.favourited = str(favparse[0][1])
-               userinfo = re.findall('From:.*?data-type="(.*?)".*?bolded">(.*?)</', data, re.S)
+               userinfo = re.findall('From:.*?href="/(.*?)/.*?".*?bolded">(.*?)</', data, re.S)
                if userinfo:
                        usertype = userinfo[0][0].title()
+                       if usertype.endswith('s'):
+                               usertype = usertype[:-1]
                        username = userinfo[0][1]
                else:
                        username = "unknown"
@@ -1133,10 +1336,7 @@ class pornhubFilmScreen(MPScreen, ThumbsHelper, LoginFunc):
                        submsg = ""
                        self['F1'].setText("")
                if self.favourited == "1" and phLoggedIn:
-                       if self.Name == "Favourite Videos":
-                               favmsg = ""
-                       else:
-                               favmsg = "\nFavourited"
+                       favmsg = "\nFavourite: Yes"
                        self['F4'].setText(_("Remove Favourite"))
                elif self.favourited == "0" and phLoggedIn:
                        favmsg = ""
@@ -1163,6 +1363,7 @@ class pornhubFilmScreen(MPScreen, ThumbsHelper, LoginFunc):
                                self.retrycount = 0
                                cookies = ph_cookiesUrl
                        twAgentGetPage(self.url, agent=phAgent, cookieJar=cookies).addCallback(self.parseData).addErrback(self.dataError)
+                       self.getInfos2()
 
        def keyFavourite(self):
                if self.keyLocked:
@@ -1186,7 +1387,7 @@ class pornhubFilmScreen(MPScreen, ThumbsHelper, LoginFunc):
                                self.reload = True
                                TimerCall(1, self.loadPage)
                        else:
-                               self.showInfos()
+                               self.getInfos2()
 
        def keyRelated(self):
                if self.keyLocked:
@@ -1216,22 +1417,40 @@ class pornhubFilmScreen(MPScreen, ThumbsHelper, LoginFunc):
                                self.reload = True
                                TimerCall(1, self.loadPage)
                        else:
-                               self.showInfos()
+                               self.getInfos2()
                else:
                        sub = re.findall('(Subscription added.*?PASS)', data, re.S)
                        if sub:
-                               self.showInfos()
+                               self.getInfos2()
                        else:
                                self.session.open(MessageBoxExt, _("Unknown error."), MessageBoxExt.TYPE_INFO)
 
        def parseData(self, data):
+               try:
+                       pos = self['liste'].getSelectedIndex()
+                       self.filmliste.pop(pos)
+                       title = self['liste'].getCurrent()[0][0]
+                       url = self['liste'].getCurrent()[0][1]
+                       image = self['liste'].getCurrent()[0][3]
+                       runtime = self['liste'].getCurrent()[0][4]
+                       views = self['liste'].getCurrent()[0][5]
+                       added = self['liste'].getCurrent()[0][6]
+                       usertype = self['liste'].getCurrent()[0][7]
+                       username = self['liste'].getCurrent()[0][8]
+                       self.filmliste.insert(pos, (title, url, True, image, runtime, views, added, usertype, username))
+                       self.ml.setList(map(self._defaultlistleftmarked, self.filmliste))
+               except:
+                       pass
                if 'id="iconLocked"' in data:
                        msg = re.findall('(<div class="userMessageSection.*?<div class="avatarPosition"></div>)', data, re.S)
                        if msg:
                                if "video is private" in msg[0]:
-                                       #printl(re.sub(r"\s+", " ", stripAllTags(msg[0])).strip(),self,'A')
                                        self.keyOK(True)
                else:
+                       if 'vrContent"' in data:
+                               vr = True
+                       else:
+                               vr = False
                        js = re.findall('type="text/javascript">.*?(var\sflashvars.*?)loadScriptUniqueId', data, re.S)
                        if js:
                                js = js[0]
@@ -1255,28 +1474,29 @@ class pornhubFilmScreen(MPScreen, ThumbsHelper, LoginFunc):
                                except Exception:
                                        self.session.open(MessageBoxExt, _("Error executing Javascript, please report to the developers."), MessageBoxExt.TYPE_INFO)
 
-                               url = re.findall('(https://.*?)\n', urls, re.S)
+                               url = re.findall('(https://.*?)(?:\n|$)', urls, re.S)
                                if url:
-                                       fetchurl = url[0]
-
-                                       # retry till we get a good working cdn streamurl
-                                       if config_mp.mediaportal.pornhub_cdnfix.value:
-                                               if re.match('.*?bv.phncdn.com', fetchurl, re.S):
-                                                       self.count += 1
-                                                       if self.count < 20:
-                                                               self.keyOK()
-                                                               printl('CDN retry: '+str(self.count),self,'A')
-                                                               return
+                                       i = 0
+                                       fetchurl = url[i]
+                                       while i < len(url)-1:
+                                               if vr and ('1440P' in url[i] or '1080P' in url[i] or '.m3u8' in url[i]) and not mp_globals.model in ["one","two"]:
+                                                       i += 1
+                                                       fetchurl = url[i]
+                                               else:
+                                                       break
 
                                        Title = self['liste'].getCurrent()[0][0]
                                        self['name'].setText(Title)
                                        mp_globals.player_agent = phAgent
-                                       if "&hash=" in fetchurl:
-                                               url = fetchurl.split('&hash=')
-                                               url = url[0] + "&hash=" + url[1].replace('/','%2F').replace('=','%3D').replace('+','%2B')
+
+                                       if not vr and '1080P' in fetchurl and not mp_globals.model in ["one","two"]:
+                                               self.streamliste = []
+                                               self.streamliste.append((Title, fetchurl))
+                                               t = re.search('\/(\d+)P_', url[i+2]).group(1) + 'p'
+                                               self.streamliste.append((Title + ' (' + t + ')', url[i+2]))
+                                               self.session.open(SimplePlayer, self.streamliste, playIdx=0, playAll=False, showPlaylist=True, listTitle='Quality:', ltype='pornhub')
                                        else:
-                                               url = fetchurl
-                                       self.session.open(SimplePlayer, [(Title, url)], showPlaylist=False, ltype='pornhub')
+                                               self.session.open(SimplePlayer, [(Title, fetchurl)], showPlaylist=False, ltype='pornhub')
 
        def ok(self, data):
                message = re.findall('"message":"(.*?)",', data, re.S)
index 9185b6a..fd2e197 100644 (file)
@@ -78,6 +78,10 @@ class pornicomGenreScreen(MPScreen):
                        self.portal = "Sheshaft.com"
                        self.baseurl = "https://www.sheshaft.com"
                        default_cover = "file://%s/sheshaft.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
+               elif self.mode == "fetishshrine":
+                       self.portal = "FetishShrine.com"
+                       self.baseurl = "https://www.fetishshrine.com"
+                       default_cover = "file://%s/fetishshrine.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
 
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
 
@@ -171,6 +175,8 @@ class pornicomFilmScreen(MPScreen, ThumbsHelper):
                        default_cover = "file://%s/pornwhite.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
                elif self.portal == "Sheshaft.com":
                        default_cover = "file://%s/sheshaft.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
+               elif self.portal == "FetishShrine.com":
+                       default_cover = "file://%s/fetishshrine.png" % (config_mp.mediaportal.iconcachepath.value + "logos")
 
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
                ThumbsHelper.__init__(self)
@@ -236,10 +242,14 @@ class pornicomFilmScreen(MPScreen, ThumbsHelper):
                                Runtime = stripAllTags(Runtime[0]).strip() if Runtime else ''
                                Views = re.findall('class="(?:icon-eye|views)"(?:>Views|).*?>(.*?)</span', item, re.S)
                                Views = stripAllTags(Views[0]).strip() if Views else ''
+                               Age = ''
+                               if "|" in Views:
+                                       Age = Views.split("|")[1].strip()
+                                       Views = Views.split("|")[0].replace('Views','').strip()
                                Rating = re.findall('class="(?:icon-like|item-rating)"(?:>Porn Rating|>Porn rating|).*?(?:<span|)>(.*?)</span', item, re.S)
                                Rating = stripAllTags(Rating[0]).strip() if Rating else ''
                                if Url and Title and Image:
-                                       self.filmliste.append((decodeHtml(Title), Url, Image, Runtime, Views, Rating))
+                                       self.filmliste.append((decodeHtml(Title), Url, Image, Runtime, Views, Rating, Age))
                if len(self.filmliste) == 0:
                        self.filmliste.append((_('No videos found!'), None, None, '', '', ''))
                self.ml.setList(map(self._defaultlistleft, self.filmliste))
@@ -258,8 +268,10 @@ class pornicomFilmScreen(MPScreen, ThumbsHelper):
                views = "Views: %s\n" % views if views else ''
                rated = self['liste'].getCurrent()[0][5]
                rated = "Rating: %s\n" % rated if rated else ''
+               age = self['liste'].getCurrent()[0][6]
+               age = "Added: %s\n" % age if age else ''
                self['name'].setText(title)
-               self['handlung'].setText("%s%s%s" % (runtime, views, rated))
+               self['handlung'].setText("%s%s%s%s" % (runtime, age, views, rated))
                CoverHelper(self['coverArt']).getCover(pic)
 
        def keyOK(self):
index 947998f..728b94e 100644 (file)
@@ -328,6 +328,8 @@ class slutloadFilmScreen(MPScreen, ThumbsHelper):
                if re.match(".*Search", self.Name):
                        if self.portal == "PunishBang.com":
                                url = "%s/search/%s/?mode=async&function=get_block&block_id=list_videos_videos_list_search_result&category_ids=&sort_by=&from=%s" % (self.baseurl, self.Link, str(self.page))
+                       elif self.portal == "WatchMyExGF.net":
+                               url = "%s/porn/%s/?mode=async&function=get_block&block_id=list_videos_videos_list_search_result&q=%s&category_ids=&sort_by=&from_videos=%s&from_albums=%s" % (self.baseurl, self.Link, self.Link.replace('-','+'), str(self.page), str(self.page))
                        else:
                                if self.portal == "PornFD.com":
                                        stop = False
index 7782ca1..c1daf02 100644 (file)
@@ -181,7 +181,7 @@ class spankbangFilmScreen(MPScreen, ThumbsHelper):
                        self.agename = 'All time'
                else:
                        if self.Cat:
-                               self.sortname = 'New'
+                               self.sortname = 'Most Recent'
                                self.sort = 'order=all'
                        else:
                                self.sortname = ''
@@ -237,10 +237,10 @@ class spankbangFilmScreen(MPScreen, ThumbsHelper):
                if self.keyLocked:
                        return
                if self.Cat:
-                       rangelist = [ ['Trending', 'order=trending'], ['Upcoming', 'order=upcoming'], ['Interesting', 'order=interesting'], ['New', 'order=all'], ['Popular', 'order=popular'], ['Most liked', 'order=rated'], ['Longest', 'order=length'] ]
+                       rangelist = [ ['Trending', 'order=trending'], ['Upcoming', 'order=upcoming'], ['Interesting', 'order=interesting'], ['Most Recent', 'order=all'], ['Popular', 'order=popular'], ['Most Liked', 'order=rated'], ['Longest', 'order=length'] ]
                        self.session.openWithCallback(self.keySortAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
                elif self.Sort:
-                       rangelist = [ ['Relevance', 'order='], ['Popular', 'order=top'], ['New', 'order=new'], ['Most liked', 'order=hot'] ]
+                       rangelist = [ ['Relevance', 'order='], ['Popular', 'order=top'], ['Most Recent', 'order=new'], ['Most Liked', 'order=hot'] ]
                        self.session.openWithCallback(self.keySortAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
 
 
@@ -272,14 +272,20 @@ class spankbangFilmScreen(MPScreen, ThumbsHelper):
                runtime = self['liste'].getCurrent()[0][6]
                self['name'].setText(title)
                if self.agename:
-                       agename = "\n%s: %s" % (_("Filter"), self.agename)
+                       agename = "%s: %s" % (_("Filter"), self.agename)
                else:
                        agename = ''
                if self.sortname:
-                       sort = "\n%s: %s" % (_("Sort order"), self.sortname)
+                       sort = "%s: %s" % (_("Sort order"), self.sortname)
                else:
                        sort = ''
-               self['handlung'].setText("Runtime: %s\nRating: %s\nViews: %s\nAdded: %s%s%s" % (runtime, rating, views, age, agename, sort))
+               if sort and agename:
+                       self['extrainfo'].setText("%s / %s" % (sort, agename))
+               elif sort:
+                       self['extrainfo'].setText(sort)
+               elif agename:
+                       self['extrainfo'].setText(agename)
+               self['handlung'].setText("Runtime: %s\nRating: %s\nViews: %s\nAdded: %s" % (runtime, rating, views, age))
                CoverHelper(self['coverArt']).getCover(pic)
 
        def keyOK(self):
index d0d5565..b50ab1d 100644 (file)
@@ -329,7 +329,8 @@ class tube8FilmScreen(MPScreen, ThumbsHelper):
                runtime = self['liste'].getCurrent()[0][3]
                views = self['liste'].getCurrent()[0][4]
                self['name'].setText(title)
-               self['handlung'].setText("Runtime: %s\nViews: %s\n%s: %s\n%s: %s" % (runtime, views, _("Sort order"), self.sortname, _("Filter"), self.filtername))
+               self['extrainfo'].setText("%s: %s / %s: %s" % (_("Sort order"), self.sortname, _("Filter"), self.filtername))
+               self['handlung'].setText("Runtime: %s\nViews: %s" % (runtime, views))
                CoverHelper(self['coverArt']).getCover(pic)
 
        def keyOK(self):
index d5a745d..1f2cd08 100644 (file)
@@ -187,6 +187,7 @@ class tubepornclassicFilmScreen(MPScreen, ThumbsHelper):
                        for (Url, Image, Title, Runtime, Added, Views) in Movies:
                                if "240x180" in Image:
                                        Image = Image.split('240x180')[0] + "preview.jpg"
+                               Runtime = Runtime.replace('m','').replace('s','')
                                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))
index 19603c1..d20a337 100644 (file)
@@ -191,11 +191,14 @@ class voyeurhitFilmScreen(MPScreen, ThumbsHelper):
        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))
+               videos = re.findall('<a href="(.*?)" class="thumb">.*?<span class="image"><img.*?src="(.*?)"\s{0,1}alt="(.*?)".*?class="dur_ovimg">(.*?)</span.*?fa-calendar">(.*?)</span.*?fa-thumbs-up.*?>(.*?)</span.*?fa-eye">(.*?)</span', parse.group(0), re.S)
+               for (url, img, desc, runtime, age, rating, views) in videos:
+                       age = stripAllTags(age).replace('Added:','').strip()
+                       rating = stripAllTags(rating).strip()
+                       views = stripAllTags(views).replace('Views:','').strip()
+                       self.filmliste.append((decodeHtml(desc), url, img, runtime, age, rating, views))
                if len(self.filmliste) == 0:
-                       self.filmliste.append((_('No videos found!'), None, None))
+                       self.filmliste.append((_('No videos found!'), None, None, '', '', '', ''))
                self.ml.setList(map(self._defaultlistleft, self.filmliste))
                self.ml.moveToIndex(0)
                self.keyLocked = False
@@ -205,6 +208,11 @@ class voyeurhitFilmScreen(MPScreen, ThumbsHelper):
        def showInfos(self):
                Title = self['liste'].getCurrent()[0][0]
                Image = self['liste'].getCurrent()[0][2]
+               runtime = self['liste'].getCurrent()[0][3]
+               age = self['liste'].getCurrent()[0][4]
+               rating = self['liste'].getCurrent()[0][5]
+               views = self['liste'].getCurrent()[0][6]
+               self['handlung'].setText("Runtime: %s\nViews: %s\nAdded: %s\nRating: %s" % (runtime, views, age, rating))
                self['name'].setText(Title)
                CoverHelper(self['coverArt']).getCover(Image)
 
index 03d55ea..5dc2010 100644 (file)
@@ -39,7 +39,6 @@ from Plugins.Extensions.MediaPortal.resources.imports import *
 from Plugins.Extensions.MediaPortal.resources.choiceboxext import ChoiceBoxExt
 
 config_mp.mediaportal.vporn_hd = ConfigText(default="SD/HD", fixed_size=False)
-config_mp.mediaportal.vporn_date = ConfigText(default="all time", fixed_size=False)
 
 vpagent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'
 vpck = CookieJar()
@@ -65,17 +64,14 @@ class vpornGenreScreen(MPScreen):
                        "down" : self.keyDown,
                        "right" : self.keyRight,
                        "left" : self.keyLeft,
-                       "green" : self.keyHD,
-                       "yellow": self.keyDate
+                       "green" : self.keyHD
                }, -1)
 
                self.hd = config_mp.mediaportal.vporn_hd.value
-               self.date = config_mp.mediaportal.vporn_date.value
 
                self['title'] = Label("VPORN.com")
                self['ContentTitle'] = Label("Genre:")
                self['F2'] = Label(self.hd)
-               self['F3'] = Label(self.date)
                self.keyLocked = True
                self.suchString = ''
 
@@ -121,14 +117,14 @@ class vpornGenreScreen(MPScreen):
                else:
                        Link = self['liste'].getCurrent()[0][1]
                        Main = self['liste'].getCurrent()[0][3]
-                       self.session.open(vpornFilmScreen, Link, Name, self.hd, self.date, Main)
+                       self.session.open(vpornFilmScreen, Link, Name, self.hd, Main)
 
        def SuchenCallback(self, callback = None):
                if callback is not None and len(callback):
                        self.suchString = urllib.quote(callback).replace(' ', '+')
                        Name = "--- Search ---"
                        Link = '%s' % (self.suchString)
-                       self.session.open(vpornFilmScreen, Link, Name, self.hd, self.date, False)
+                       self.session.open(vpornFilmScreen, Link, Name, self.hd, False)
 
        def getSuggestions(self, text, max_res):
                url = "https://www.vporn.com/cgi-bin/suggest?q=%s" % urllib.quote_plus(text)
@@ -162,27 +158,9 @@ class vpornGenreScreen(MPScreen):
                configfile_mp.save()
                self['F2'].setText(self.hd)
 
-       def keyDate(self):
-               if self.date == "all time":
-                       self.date = "last 24h"
-                       config_mp.mediaportal.vporn_date.value = "last 24h"
-               elif self.date == "last 24h":
-                       self.date = "last week"
-                       config_mp.mediaportal.vporn_date.value = "last week"
-               elif self.date == "last week":
-                       self.date = "last month"
-                       config_mp.mediaportal.vporn_date.value = "last month"
-               elif self.date == "last month":
-                       self.date = "all time"
-                       config_mp.mediaportal.vporn_date.value = "all time"
-
-               config_mp.mediaportal.vporn_date.save()
-               configfile_mp.save()
-               self['F3'].setText(self.date)
-
 class vpornFilmScreen(MPScreen, ThumbsHelper):
 
-       def __init__(self, session, Link, Name, HD, Date, Main):
+       def __init__(self, session, Link, Name, HD, Main):
                self.Link = Link
                self.Name = Name
                self.Main = Main
@@ -190,14 +168,6 @@ class vpornFilmScreen(MPScreen, ThumbsHelper):
                        self.hd = "hd/"
                else:
                        self.hd = ""
-               if Date == "last 24h":
-                       self.date = "today/"
-               elif Date == "last week":
-                       self.date = "week/"
-               elif Date == "last month":
-                       self.date = "month/"
-               else:
-                       self.date = ""
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
                ThumbsHelper.__init__(self)
 
@@ -213,21 +183,32 @@ class vpornFilmScreen(MPScreen, ThumbsHelper):
                        "nextBouquet" : self.keyPageUp,
                        "prevBouquet" : self.keyPageDown,
                        "green" : self.keyPageNumber,
-                       "blue" : self.keySort
+                       "yellow" : self.keySort,
+                       "blue" : self.keyFilter
                }, -1)
 
                self['title'] = Label("VPORN.com")
                self['ContentTitle'] = Label("Genre: %s" % self.Name)
                self['F2'] = Label(_("Page"))
                if not self.Main:
-                       self['F4'] = Label(_("Sort"))
+                       self['F3'] = Label(_("Sort"))
+               self['F4'] = Label(_("Filter"))
 
                self['Page'] = Label(_("Page:"))
                self.keyLocked = True
                self.page = 1
                self.lastpage = 1
-               self.sort = 'newest'
-               self.sortname = 'Newest'
+               if re.match(".*?Search", self.Name):
+                       self.sort = ''
+                       self.sortname = 'Relevance'
+               elif self.Main:
+                       self.sort = ''
+                       self.sortname = ''
+               else:
+                       self.sort = 'newest/'
+                       self.sortname = 'Newest'
+               self.filter = ''
+               self.filtername = 'All Time'
 
                self.filmliste = []
                self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
@@ -240,16 +221,12 @@ class vpornFilmScreen(MPScreen, ThumbsHelper):
                self['name'].setText(_('Please wait...'))
                self.filmliste = []
                if re.match(".*?Search", self.Name):
-                       url = "https://www.vporn.com/search/?q=%s&page=%s&time=%s" % (self.Link, str(self.page), self.date)
+                       url = "https://www.vporn.com/search/%s%s?q=%s&page=%s" % (self.sort, self.filter, self.Link, str(self.page))
                else:
-                       if self.Main:
-                               sort = ""
-                       else:
-                               sort = self.sort
                        if self.page == 1:
-                               url = "%s%s/%s%s" % (self.Link, sort , self.date, self.hd)
+                               url = "%s%s%s%s" % (self.Link, self.sort , self.filter, self.hd)
                        else:
-                               url = "%s%s/%s%s%s" % (self.Link, sort , self.date, self.hd, str(self.page))
+                               url = "%s%s%s%s%s" % (self.Link, self.sort , self.filter, self.hd, str(self.page))
                twAgentGetPage(url, agent=vpagent, cookieJar=vpck, timeout=30).addCallback(self.loadData).addErrback(self.dataError)
 
        def loadData(self, data):
@@ -278,10 +255,14 @@ class vpornFilmScreen(MPScreen, ThumbsHelper):
                        views = self['liste'].getCurrent()[0][4]
                        self['name'].setText(title)
                        if not self.Main:
-                               sort = "\nSort order: %s" % self.sortname
+                               sort = "%s: %s" % (_("Sort order"), self.sortname)
                        else:
                                sort = ''
-                       self['handlung'].setText("Runtime: %s\nViews: %s%s" % (runtime, views, sort))
+                       if sort:
+                               self['extrainfo'].setText(sort + " / %s: %s" % (_("Filter"), self.filtername))
+                       else:
+                               self['extrainfo'].setText("%s: %s" % (_("Filter"), self.filtername))
+                       self['handlung'].setText("Runtime: %s\nViews: %s" % (runtime, views))
                        CoverHelper(self['coverArt']).getCover(pic)
                else:
                        self['name'].setText('')
@@ -289,7 +270,10 @@ class vpornFilmScreen(MPScreen, ThumbsHelper):
        def keySort(self):
                if self.keyLocked or self.Main:
                        return
-               rangelist = [['Newest', 'newest'], ['Views','views'], ['Rating','rating'], ['Favorites','favorites'], ['Comments','comments'], ['Votes','votes'], ['Duration','longest']]
+               if re.match(".*?Search", self.Name):
+                       rangelist = [['Relevance', ''], ['Newest', 'newest/'], ['Views','views/'], ['Rating','rating/'], ['Favorites','favorites/'], ['Comments','comments/'], ['Votes','votes/'], ['Duration','longest/']]
+               else:
+                       rangelist = [['Newest', 'newest/'], ['Views','views/'], ['Rating','rating/'], ['Favorites','favorites/'], ['Comments','comments/'], ['Votes','votes/'], ['Duration','longest/']]
                self.session.openWithCallback(self.keySortAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
 
        def keySortAction(self, result):
@@ -298,6 +282,18 @@ class vpornFilmScreen(MPScreen, ThumbsHelper):
                        self.sort = result[1]
                        self.loadPage()
 
+       def keyFilter(self):
+               if self.keyLocked:
+                       return
+               rangelist = [ ['All Time', ''], ['Month', 'month/'], ['Week', 'week/'], ['Today', 'today/'] ]
+               self.session.openWithCallback(self.keyFilterAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
+
+       def keyFilterAction(self, result):
+               if result:
+                       self.filtername = result[0]
+                       self.filter = result[1]
+                       self.loadPage()
+
        def keyOK(self):
                if self.keyLocked:
                        return
index 49f7660..0694c51 100644 (file)
@@ -118,6 +118,7 @@ class xhamsterGenreScreen(MPScreen):
                        pass
 
        def layoutFinished(self):
+               self['name'].setText(_('Please wait...'))
                ck.update({'x_content_preference_index':self.scopefilter[self.scope]})
                self['F3'].setText(self.scopeText[self.scope])
                self.keyLocked = True
@@ -155,6 +156,7 @@ class xhamsterGenreScreen(MPScreen):
                self.genreliste.insert(0, ("--- Search ---", "callSuchen"))
                self.ml.setList(map(self._defaultlistcenter, self.genreliste))
                self.ml.moveToIndex(0)
+               self['name'].setText('')
                self.keyLocked = False
 
        def keyOK(self):
@@ -467,7 +469,7 @@ class xhamsterFilmScreen(MPScreen, ThumbsHelper):
                self.Link = Link
                self.Name = Name
                self.scope = scope
-               self.scopesearch = ['MTM6OToKNQ', 'MTE6ODoCag', 'MTI6ODoEGw']
+               self.scopesearch = ['', 'shemale', 'gay']
 
                MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)
                ThumbsHelper.__init__(self)
@@ -525,8 +527,8 @@ class xhamsterFilmScreen(MPScreen, ThumbsHelper):
                                elif self.hd == "/4k":
                                        hd = "4k"
                                else:
-                                       hd = "all"
-                               url = "https://xhamster.com/search?date=any&duration=any&sort=relevance&quality=%s&categories=%s=&q=%s&p=%s" % (hd, self.scopesearch[self.scope], self.Link, str(self.page))
+                                       hd = ""
+                               url = "https://xhamster.com/search/%s?orientations=%s&quality=%s&page=%s" % (self.Link, self.scopesearch[self.scope], hd, str(self.page))
                        else:
                                if self.Name == "Related":
                                        url = self.Link + str(self.page)
@@ -605,6 +607,7 @@ class xhamsterFilmScreen(MPScreen, ThumbsHelper):
                        self['F1'].setText("")
                        self['F2'].setText("")
                        self['F3'].setText("")
+                       self['name'].setText("")
                        url = self['liste'].getCurrent()[0][2]
                        self.videoId = url.split('/')[-1]
                        for t in favourites:
@@ -750,8 +753,8 @@ class xhamsterFilmScreen(MPScreen, ThumbsHelper):
 
        def getRelated(self, data):
                self.keyLocked = False
-               parse = re.findall('(?:&amp;|\?)q&#x3D;(.*?)">\s+Show all', data, re.S)
-               RelatedUrl = 'https://xhamster.com/search?q=%s&p=' % parse[0]
+               parse = re.findall('/search/(.*?)">\s+Show all', data, re.S)
+               RelatedUrl = 'https://xhamster.com/search/%s?page=' % parse[0]
                self.session.open(xhamsterFilmScreen, RelatedUrl, "Related")
 
        def playerData(self, data):
index bbca7d5..3b695df 100644 (file)
@@ -428,10 +428,12 @@ class xnxxFilmScreen(MPScreen, ThumbsHelper):
                rating = self['liste'].getCurrent()[0][5]
                self['name'].setText(title)
                if self.agename and self.Name != "Most Popular" and not self.Best and not self.Related:
-                       agename = "\n%s: %s" % (_("Filter"), self.agename)
+                       agename = "%s: %s" % (_("Filter"), self.agename)
                else:
                        agename = ''
-               self['handlung'].setText("Runtime: %s\nViews: %s\nRating: %s%s" % (runtime, views, rating, agename))
+               if agename:
+                       self['extrainfo'].setText(agename)
+               self['handlung'].setText("Runtime: %s\nViews: %s\nRating: %s" % (runtime, views, rating))
                CoverHelper(self['coverArt']).getCover(pic)
 
        def keyOK(self):
index 70b53f4..920288c 100644 (file)
@@ -435,12 +435,14 @@ class xvideosPornstarsScreen(MPScreen, ThumbsHelper):
                                if info:
                                        info = info + "\n"
 
-                               self['handlung'].setText("%s%s: %s\n%s: %s" % (info, _("Filter"), self.agename, _("Region"), self.regionname))
+                               self['extrainfo'].setText("%s: %s / %s: %s" % (_("Filter"), self.agename, _("Region"), self.regionname))
+                               self['handlung'].setText(info)
                else:
                        title = self['liste'].getCurrent()[0][0]
                        pic = self['liste'].getCurrent()[0][2]
                        self['name'].setText(title)
-                       self['handlung'].setText("%s: %s" % (_("Filter"), self.agename))
+                       self['extrainfo'].setText("%s: %s" % (_("Filter"), self.agename))
+                       self['handlung'].setText('')
                        CoverHelper(self['coverArt']).getCover(pic)
 
        def keyOK(self):
@@ -590,7 +592,7 @@ class xvideosFilmScreen(MPScreen, ThumbsHelper):
                                        self.lastpage = int(lastp)
                                        self['page'].setText(str(self.page) + ' / ' + str(self.lastpage))
                                else:
-                                       lastp = re.search('current">(.*?)\svideos', data, re.S)
+                                       lastp = re.search('current">(.*?)\svideo', data, re.S)
                                        if lastp:
                                                lastp = lastp.group(1).replace(',','')
                                                lastp = round((float(lastp) / 24) + 0.5)
@@ -634,7 +636,7 @@ class xvideosFilmScreen(MPScreen, ThumbsHelper):
                                        self.filmliste.append((decodeHtml(Title), Url, Image, Runtime, Views, profUrl, profTitle))
                if self.counter == 0:
                        if len(self.filmliste) == 0:
-                               self.filmliste.append((_('No movies found!'), "", None, None, None))
+                               self.filmliste.append((_('No movies found!'), None, None, None, None))
                        self.ml.setList(map(self._defaultlistleft, self.filmliste))
                        self.ml.moveToIndex(0)
                        self.keyLocked = False
@@ -698,14 +700,20 @@ class xvideosFilmScreen(MPScreen, ThumbsHelper):
                views = self['liste'].getCurrent()[0][4]
                self['name'].setText(title)
                if self.agename and self.Name != "Newest" and not self.Best:
-                       agename = "\n%s: %s" % (_("Filter"), self.agename)
+                       agename = "%s: %s" % (_("Filter"), self.agename)
                else:
                        agename = ''
                if self.sortname:
-                       sort = "\n%s: %s" % (_("Sort order"), self.sortname)
+                       sort = "%s: %s" % (_("Sort order"), self.sortname)
                else:
                        sort = ''
-               self['handlung'].setText("Runtime: %s\nViews: %s%s%s" % (runtime, views, agename, sort))
+               if agename and sort:
+                       self['extrainfo'].setText("%s / %s" % (sort, agename))
+               elif agename:
+                       self['extrainfo'].setText(agename)
+               elif sort:
+                       self['extrainfo'].setText(sort)
+               self['handlung'].setText("Runtime: %s\nViews: %s" % (runtime, views))
                CoverHelper(self['coverArt']).getCover(pic)
 
        def keyOK(self):
@@ -716,7 +724,7 @@ class xvideosFilmScreen(MPScreen, ThumbsHelper):
                if self.Name == "100% Verified":
                        rangelist = [ ['Video', 'video'], ['Profile', 'profile'] ]
                        self.session.openWithCallback(self.keyOKAction, ChoiceBoxExt, title=_('Select Action'), list = rangelist)
-               else:
+               elif Link:
                        twAgentGetPage(Link, agent=agent, cookieJar=cookies, headers=headers).addCallback(self.parseData).addErrback(self.dataError)
 
        def keyOKAction(self, result):
index e006dc6..ded4ba6 100644 (file)
@@ -118,7 +118,7 @@ class youpornGenreScreen(MPScreen):
        def genreData(self, data):
                Cats = None
                self.genreliste = []
-               preparse = re.search('categoryListWrapper"(.*?)id="countryFlags"', data, re.S)
+               preparse = re.search('heading4\'>Porn Categories(.*?)id="countryFlags"', data, re.S)
                if preparse:
                        Cats = re.findall('<a\shref="((?:/category|https://www.youporn.com).*?)".*?img\ssrc.*?alt="(.*?)".*?data-original="(.*?)"', preparse.group(1), re.S)
                if Cats:
@@ -404,7 +404,7 @@ class youpornFilmScreen(MPScreen, ThumbsHelper):
 
        def loadData(self, data):
                self.getLastPage(data, 'objectPagination =.*?total: (\d+),', '(\d+)')
-               parse = re.findall('<div data-espnode="videobox" class=\'video-box(.*?)<i class="icon-thin-x">', data, re.S)
+               parse = re.findall('<div data-espnode="videobox".class=\'video-box(.*?)<i class="icon-info-circle">', data, re.S)
                if parse:
                        for video in parse:
                                Movies = re.findall('data-video-id="\d+".*?<a\shref="(.*?)".*?<img\ssrc=".*?"\salt=\'(.*?)\'.*?data-(?:thumbnail|echo)="(.*?)".*?class="video-duration">(.*?)</', video, re.S)
index 2d722d2..7bf316f 100644 (file)
@@ -154,7 +154,7 @@ config_mp.mediaportal = ConfigSubsection()
 config_mp.mediaportal.fake_entry = NoSave(ConfigNothing())
 
 # Allgemein
-config_mp.mediaportal.version = NoSave(ConfigText(default="2020010801"))
+config_mp.mediaportal.version = NoSave(ConfigText(default="2020012601"))
 config_mp.mediaportal.autoupdate = ConfigYesNo(default = True)
 
 config_mp.mediaportal.skinfail = ConfigYesNo(default = False)
index 0669fd0..38009df 100644 (file)
@@ -104,7 +104,7 @@ try:
                                        Log.w("Service became invalid!")
                                        return
                                if uri:
-                                       service.setResolvedUri(uri, eServiceReference.idDVB)
+                                       service.setResolvedUri(uri, eServiceReference.idGST)
                                else:
                                        service.failedToResolveUri()
                        except:
index 66e0ae4..acd0bfd 100644 (file)
@@ -60,7 +60,7 @@ try:
                                                Log.w("Service became invalid!")
                                                return
                                        if uri:
-                                               service.setResolvedUri(uri, eServiceReference.idGST)
+                                               service.setResolvedUri(uri, eServiceReference.idStream)
                                        else:
                                                service.failedToResolveUri()
                                except:
@@ -75,7 +75,7 @@ try:
 
                def parseLive(self, data, service):
                        data = data.replace('\/','/')
-                       urls = re.findall('m3u8_url":"(.*?)"', data, re.S)
+                       urls = re.findall('"m3u8_url":"(.*?)"', data, re.S)
                        if urls:
                                uri = urls[-1]
                        try:
@@ -83,40 +83,11 @@ try:
                                        Log.w("Service became invalid!")
                                        return
                                if uri:
-                                       twAgentGetPage(uri).addCallback(self.parseData, service)
+                                       service.setResolvedUri(uri, eServiceReference.idStream)
                                else:
                                        service.failedToResolveUri()
                        except:
                                service.failedToResolveUri()
 
-               def parseData(self, data, service):
-                       self.bandwith_list = []
-                       match_sec_m3u8=re.findall('BANDWIDTH=(\d+).*?\n(.*?m3u8.*?)\n', data, re.S)
-                       max = 0
-                       for x in match_sec_m3u8:
-                               if int(x[0]) > max:
-                                       max = int(x[0])
-                       videoPrio = int(config_mp.mediaportal.videoquali_others.value)
-                       if videoPrio == 2:
-                               bw = max
-                       elif videoPrio == 1:
-                               bw = max/2
-                       else:
-                               bw = max/3
-                       for each in match_sec_m3u8:
-                               bandwith,url = each
-                               self.bandwith_list.append((int(bandwith),url))
-                       _x, best = min((abs(int(x[0]) - bw), x) for x in self.bandwith_list)
-                       uri = best[1]
-                       try:
-                               if not service.ptrValid():
-                                       Log.w("Service became invalid!")
-                                       return
-                               if uri:
-                                       service.setResolvedUri(uri, eServiceReference.idDVB)
-                               else:
-                                       service.failedToResolveUri()
-                       except:
-                               service.failedToResolveUri()
 except ImportError:
        pass
\ No newline at end of file
index b1e0982..8e21228 100644 (file)
@@ -74,7 +74,7 @@ try:
                                                        if "hls_variant" in uri:
                                                                getPage(uri).addCallback(self.parseData, service)
                                                        else:
-                                                               service.setResolvedUri(uri, eServiceReference.idDVB)
+                                                               service.setResolvedUri(uri, eServiceReference.idGST)
                                                else:
                                                        service.setResolvedUri(uri, eServiceReference.idGST)
                                        else:
@@ -106,7 +106,7 @@ try:
                                                if "hls_variant" in uri:
                                                        getPage(uri).addCallback(self.parseData, service)
                                                else:
-                                                       service.setResolvedUri(uri, eServiceReference.idDVB)
+                                                       service.setResolvedUri(uri, eServiceReference.idGST)
                                        else:
                                                service.failedToResolveUri()
                                except:
@@ -123,7 +123,7 @@ try:
                                                Log.w("Service became invalid!")
                                                return
                                        if uri:
-                                               service.setResolvedUri(uri, eServiceReference.idDVB)
+                                               service.setResolvedUri(uri, eServiceReference.idGST)
                                        else:
                                                service.failedToResolveUri()
                                except:
index 9ef72f6..18867df 100644 (file)
@@ -17,6 +17,11 @@ class CoverHelper:
                self.downloadPath = None
                self.err_nocover = True
                self.logofix = False
+               self.url = None
+               self.cookieJar = None
+               self.agent = None
+               self.headers = None
+               self.download_cb = None
 
        def downloadPage(self, url, path, agent=None, cookieJar=None, headers=None):
                if not agent:
@@ -74,6 +79,13 @@ class CoverHelper:
                                                glob_last_cover[0] = url
                                                glob_last_cover[1] = None
                                                self.downloadPath = self.COVER_PIC_PATH % glob_icon_num
+                                       if 'phncdn.com/pics' in url:
+                                               self.url = url
+                                               self.cookieJar = cookieJar
+                                               self.agent = agent
+                                               self.headers = headers
+                                               self.download_cb = download_cb
+                                               url = re.sub('\(m=\w+\)', '', url)
                                        d = self.downloadPage(url, self.downloadPath, agent=agent, cookieJar=cookieJar, headers=headers)
                                        d.addCallback(self.showCover)
                                        if download_cb:
@@ -103,13 +115,21 @@ class CoverHelper:
                self.showCoverNone()
 
        def showCover(self, picfile):
-               if picfile == 'cancelled':
-                       return self.dataErrorP(picfile)
+               if self.url and fileExists(picfile) and os.path.getsize(picfile) < 100:
+                       d = self.downloadPage(self.url, self.downloadPath, agent=self.agent, cookieJar=self.cookieJar, headers=self.headers)
+                       d.addCallback(self.showCover)
+                       if self.download_cb:
+                               d.addCallback(self.cb_getCover, self.download_cb)
+                       d.addErrback(self.dataErrorP)
+                       self.url = None
                else:
-                       self.showCoverFile(picfile)
-               if not self.screensaver:
-                       glob_last_cover[1] = picfile
-               return picfile
+                       if picfile == 'cancelled':
+                               return self.dataErrorP(picfile)
+                       else:
+                               self.showCoverFile(picfile)
+                       if not self.screensaver:
+                               glob_last_cover[1] = picfile
+                       return picfile
 
        def showCoverNone(self):
                if not self.err_nocover:
index cdcb854..cb41d9a 100644 (file)
@@ -344,6 +344,7 @@ class CVevoSignAlgoExtractor:
                funcname = self._search_regex(
                        (r'\b[cs]\s*&&\s*[adf]\.set\([^,]+\s*,\s*encodeURIComponent\s*\(\s*(?P<sig>[a-zA-Z0-9$]+)\(',
                        r'\b[a-zA-Z0-9]+\s*&&\s*[a-zA-Z0-9]+\.set\([^,]+\s*,\s*encodeURIComponent\s*\(\s*(?P<sig>[a-zA-Z0-9$]+)\(',
+                       r'\b(?P<sig>[a-zA-Z0-9$]{2})\s*=\s*function\(\s*a\s*\)\s*{\s*a\s*=\s*a\.split\(\s*""\s*\)',
                        r'(?P<sig>[a-zA-Z0-9$]+)\s*=\s*function\(\s*a\s*\)\s*{\s*a\s*=\s*a\.split\(\s*""\s*\)',
                        # Obsolete patterns
                        r'(["\'])signature\1\s*,\s*(?P<sig>[a-zA-Z0-9$]+)\(',
index f545362..1e69120 100644 (file)
@@ -4,13 +4,17 @@ from Plugins.Extensions.MediaPortal.resources.imports import *
 from Plugins.Extensions.MediaPortal.resources.packer import unpack, detect
 
 def clipwatching(self, data):
-       get_packedjava = re.findall("<script type=.text.javascript.>(eval.function.*?)</script>", data, re.S)
-       if get_packedjava and detect(get_packedjava[0]):
-               sJavascript = get_packedjava[0]
-               sUnpacked = unpack(sJavascript)
-               if sUnpacked:
-                       stream_url = re.search('file:"(.*?)"', sUnpacked, re.S)
-                       if stream_url:
-                               self._callback(stream_url.group(1))
-                               return
-       self.stream_not_found()
\ No newline at end of file
+       stream_url = re.search('src: "(.*?)",', data, re.S)
+       if stream_url:
+               self._callback(stream_url.group(1))
+       else:
+               get_packedjava = re.findall("<script type=.text.javascript.>(eval.function.*?)</script>", data, re.S)
+               if get_packedjava and detect(get_packedjava[0]):
+                       sJavascript = get_packedjava[0]
+                       sUnpacked = unpack(sJavascript)
+                       if sUnpacked:
+                               stream_url = re.search('file:"(.*?)"', sUnpacked, re.S)
+                               if stream_url:
+                                       self._callback(stream_url.group(1))
+                                       return
+               self.stream_not_found()
\ No newline at end of file
index 7034fd4..913bedd 100644 (file)
@@ -10,7 +10,7 @@ def mixdrop(self, data):
                        sJavascript = get_packedjava[0]
                        sUnpacked = unpack(sJavascript)
                        if sUnpacked:
-                               stream_url = re.search('MDCore.vsrc\d{0,1}="(.*?)";', sUnpacked, re.S)
+                               stream_url = re.search('MDCore.(?:vsrc|furl)\d{0,1}="(.*?)";', sUnpacked, re.S)
                                if stream_url:
                                        url = stream_url.group(1)
                                        if url .startswith('//'):
index 1b6ce0a..832fbdb 100644 (file)
@@ -3,7 +3,7 @@ from Plugins.Extensions.MediaPortal.plugin import _
 from Plugins.Extensions.MediaPortal.resources.imports import *
 
 def vidoza(self, data):
-       stream_url = re.findall('src:\s"(.*?.mp4)"', data, re.S)
+       stream_url = re.findall('source src="(.*?.mp4)"', data, re.S)
        if stream_url:
                self._callback(stream_url[0])
        else:
index eab8ca4..20b6730 100644 (file)
@@ -218,6 +218,7 @@ class MPScreen(Screen, HelpableScreen):
                self['Page'] = Label("")
                self['page'] = Label("")
                self['handlung'] = ScrollLabel("")
+               self['extrainfo'] = Label("")
 
                self.filmQ = Queue.Queue(0)
                self.hanQ = Queue.Queue(0)
@@ -577,6 +578,13 @@ class MPScreen(Screen, HelpableScreen):
                return res
 
        def _defaultlistleftmarked(self, entry):
+               try:
+                       if self.mpscreen_premium:
+                               premium = True
+                       else:
+                               premium = False
+               except:
+                       premium = False
                width = self['liste'].instance.size().width()
                height = self['liste'].l.getItemSize().height()
                self.ml.l.setFont(0, gFont(mp_globals.font, height - 2 * mp_globals.sizefactor))
@@ -604,14 +612,17 @@ class MPScreen(Screen, HelpableScreen):
                pheight2 = watched.size().height()
                vpos2 = round(float((height-pheight2)/2))
 
-               if len(entry)>7 and entry[7]:
+               if len(entry)>8 and entry[2]:
+                       res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 15, vpos1, pwidth1, pheight1, watched))
+               elif len(entry)>7 and entry[7]:
                        if entry[7] == 'Live':
-                               res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 25, vpos2, pwidth2, pheight2, live))
+                               res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 15, vpos2, pwidth2, pheight2, live))
                elif entry[2]:
-                       res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 25, vpos1, pwidth1, pheight1, watched))
+                       res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, 15, vpos1, pwidth1, pheight1, watched))
 
                try:
                        if entry[3]:
+                               iconlng = ''
                                if entry[3] == '1':
                                        iconlng = 'DE'
                                elif entry[3] == '2':
@@ -637,40 +648,46 @@ class MPScreen(Screen, HelpableScreen):
                                elif entry[3] == '26':
                                        iconlng = 'IN'
                                else:
-                                       iconlng = entry[3]
+                                       if re.search('^([A-Z]{2,4})$', entry[3]):
+                                               iconlng = entry[3]
+                                       else:
+                                               iconlng = ''
 
-                               path = "%s/%s/images/countries/%s.png" % (skin_path, mp_globals.currentskin, iconlng)
-                               if not fileExists(path):
-                                       path = "%s/%s/images/countries/%s.png" % (skin_path, mp_globals.skinFallback, iconlng)
+                               if iconlng:
+                                       path = "%s/%s/images/countries/%s.png" % (skin_path, mp_globals.currentskin, iconlng)
                                        if not fileExists(path):
-                                               path = "/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/countries/%s.png" % iconlng
-
-                               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))
-                               if mp_globals.isDreamOS:
-                                       res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, pwidth1+50, vpos, lwidth, lheight, llang))
+                                               path = "%s/%s/images/countries/%s.png" % (skin_path, mp_globals.skinFallback, iconlng)
+                                               if not fileExists(path):
+                                                       path = "/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/images/countries/%s.png" % iconlng
+
+                                       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))
+                                       if mp_globals.isDreamOS:
+                                               res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, pwidth1+30, vpos, lwidth, lheight, llang))
+                                       else:
+                                               scale = AVSwitch().getFramebufferScale()
+                                               picload = ePicLoad()
+                                               picload.setPara((lwidth, lheight, scale[0], scale[1], True, 1, "#FF000000"))
+                                               picload.startDecode(path, 0, 0, False)
+                                               lang = picload.getData()
+                                               res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, pwidth1+30, vpos, lwidth, lheight, lang))
+                                       self.langoffset = lwidth+15
                                else:
-                                       scale = AVSwitch().getFramebufferScale()
-                                       picload = ePicLoad()
-                                       picload.setPara((lwidth, lheight, scale[0], scale[1], True, 1, "#FF000000"))
-                                       picload.startDecode(path, 0, 0, False)
-                                       lang = picload.getData()
-                                       res.append((eListboxPythonMultiContent.TYPE_PIXMAP_ALPHATEST, pwidth1+50, vpos, lwidth, lheight, lang))
-                               self.langoffset = lwidth+25
+                                       self.langoffset = 0
                except:
                        pass
 
-               if (config_mp.mediaportal.premiumize_use.value and re.search(mp_globals.premium_hosters_prz[0], entry[0], re.S|re.I)) or (config_mp.mediaportal.realdebrid_use.value and re.search(mp_globals.premium_hosters_rdb[0], entry[0], re.S|re.I)):
+               if premium and ((config_mp.mediaportal.premiumize_use.value and re.search(mp_globals.premium_hosters_prz[0], entry[0], re.S|re.I)) or (config_mp.mediaportal.realdebrid_use.value and re.search(mp_globals.premium_hosters_rdb[0], entry[0], re.S|re.I))):
                        premiumFarbe = int(config_mp.mediaportal.premium_color.value, 0)
-                       res.append((eListboxPythonMultiContent.TYPE_TEXT, pwidth1+50+self.langoffset, 0, width, height, 0, RT_HALIGN_LEFT | RT_VALIGN_CENTER, entry[0], premiumFarbe))
+                       res.append((eListboxPythonMultiContent.TYPE_TEXT, pwidth1+30+self.langoffset, 0, width, height, 0, RT_HALIGN_LEFT | RT_VALIGN_CENTER, entry[0], premiumFarbe))
                else:
-                       res.append((eListboxPythonMultiContent.TYPE_TEXT, pwidth1+50+self.langoffset, 0, width, height, 0, RT_HALIGN_LEFT | RT_VALIGN_CENTER, entry[0]))
+                       res.append((eListboxPythonMultiContent.TYPE_TEXT, pwidth1+30+self.langoffset, 0, width, height, 0, RT_HALIGN_LEFT | RT_VALIGN_CENTER, entry[0]))
 
                return res
 
@@ -810,8 +827,8 @@ class MPScreen(Screen, HelpableScreen):
                height = self['liste'].l.getItemSize().height()
                self.ml.l.setFont(0, gFont(mp_globals.font, height - 2 * mp_globals.sizefactor))
                res = [entry]
-               res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 150, height, 0, RT_HALIGN_LEFT | RT_VALIGN_CENTER, "Rank: " + entry[3]))
-               res.append((eListboxPythonMultiContent.TYPE_TEXT, 160, 0, width - 370, height, 0, RT_HALIGN_LEFT | RT_VALIGN_CENTER, entry[0]))
+               res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 170, height, 0, RT_HALIGN_LEFT | RT_VALIGN_CENTER, "Rank: " + entry[3]))
+               res.append((eListboxPythonMultiContent.TYPE_TEXT, 180, 0, width - 370, height, 0, RT_HALIGN_LEFT | RT_VALIGN_CENTER, entry[0]))
                res.append((eListboxPythonMultiContent.TYPE_TEXT, width - 200, 0, 200, height, 0, RT_HALIGN_LEFT | RT_VALIGN_CENTER, "Videos: " + entry[4]))
                return res
 ##################
index 0d4fb18..98a3f93 100644 (file)
@@ -24,8 +24,9 @@
   <widget name="name" position="1290,550" size="610,104" backgroundColor="#20000000" transparent="1" zPosition="1" font="mediaportal;30" valign="center" halign="center" />
   <widget name="liste" position="20,300" size="1240,665" backgroundColor="#20000000" scrollbarMode="showOnDemand" transparent="1" foregroundColorSelected="#ffffff" itemHeight="35" />
   <widget name="title" position="20,120" size="1240,90" backgroundColor="#20000000" transparent="1" font="mediaportal_clean;50" valign="center" halign="center" />
-  <widget name="Page" position="970,970" size="150,40" backgroundColor="#20000000" transparent="1" font="mediaportal;30" zPosition="1" />
-  <widget name="page" position="1060,970" size="200,40" backgroundColor="#20000000" transparent="1" font="mediaportal;30" zPosition="1" />
+  <widget name="extrainfo" position="20,975" size="870,31" backgroundColor="#20000000" transparent="1" font="mediaportal;28" valign="center" zPosition="1" />
+  <widget name="Page" position="970,975" size="150,31" backgroundColor="#20000000" transparent="1" font="mediaportal;28" valign="center" zPosition="1" />
+  <widget name="page" position="1060,975" size="200,31" backgroundColor="#20000000" transparent="1" font="mediaportal;28" valign="center" zPosition="1" />
   <widget name="F1" position="15,1030" size="365,40" transparent="1" font="mediaportal; 25" backgroundColor="#20000000" valign="center" halign="center" zPosition="1" />
   <widget name="F2" position="385,1030" size="365,40" transparent="1" font="mediaportal; 25" backgroundColor="#20000000" valign="center" halign="center" zPosition="1" />
   <widget name="F3" position="755,1030" size="365,40" transparent="1" font="mediaportal; 25" backgroundColor="#20000000" valign="center" halign="center" zPosition="1" />
index 27a1478..b270840 100644 (file)
@@ -24,8 +24,9 @@
   <widget name="name" position="860,366" size="406,68" backgroundColor="#20000000" transparent="1" zPosition="1" font="mediaportal;20" valign="center" halign="center" />
   <widget name="liste" position="13,200" size="826,437" backgroundColor="#20000000" scrollbarMode="showOnDemand" transparent="1" foregroundColorSelected="#ffffff" itemHeight="23" />
   <widget name="title" position="13,80" size="826,60" backgroundColor="#20000000" transparent="1" font="mediaportal_clean;33" valign="center" halign="center" />
-  <widget name="Page" position="646,646" size="100,26" backgroundColor="#20000000" transparent="1" font="mediaportal;20" zPosition="1" />
-  <widget name="page" position="706,646" size="133,26" backgroundColor="#20000000" transparent="1" font="mediaportal;20" zPosition="1" />
+  <widget name="extrainfo" position="13,650" size="580,20" backgroundColor="#20000000" transparent="1" font="mediaportal;18" valign="center" zPosition="1" />
+  <widget name="Page" position="646,650" size="100,20" backgroundColor="#20000000" transparent="1" font="mediaportal;18" valign="center" zPosition="1" />
+  <widget name="page" position="706,650" size="133,20" backgroundColor="#20000000" transparent="1" font="mediaportal;18" valign="center" zPosition="1" />
   <widget name="F1" position="10,686" size="243,26" transparent="1" font="mediaportal; 16" backgroundColor="#20000000" valign="center" halign="center" zPosition="1" />
   <widget name="F2" position="256,686" size="243,26" transparent="1" font="mediaportal; 16" backgroundColor="#20000000" valign="center" halign="center" zPosition="1" />
   <widget name="F3" position="503,686" size="243,26" transparent="1" font="mediaportal; 16" backgroundColor="#20000000" valign="center" halign="center" zPosition="1" />