passwordchanger \
permanentclock \
podcast \
+ porncenter \
quickbutton \
reconstructapsc \
remotetimer \
podcast/po/Makefile
podcast/src/Makefile
+porncenter/Makefile
+porncenter/po/Makefile
+porncenter/src/Makefile
+porncenter/src/Additions/Makefile
+
quickbutton/Makefile
quickbutton/meta/Makefile
quickbutton/po/Makefile
--- /dev/null
+Package: enigma2-plugin-extensions-porncenter
+Version: 1.0
+Description: Adult streaming plugins for dm800/dm8000
+Architecture: all
+Section: extra
+Priority: optional
+Maintainer: Nabil Hanna <nabil1978@web.de>
+Homepage: http://www.lt-forums.org/ali
+Depends: enigma2(>=2.6git20090615) twisted-web
+Source: http://enigma2-plugins.schwerkraft.elitedvb.net/
--- /dev/null
+SUBDIRS = po src
--- /dev/null
+#
+# to use this for the localisation of other plugins,
+# just change the DOMAIN to the name of the Plugin.
+# It is assumed, that the domain ist the same as
+# the directory name of the plugin.
+#
+
+DOMAIN=PornCenter
+installdir = /usr/lib/enigma2/python/Plugins/Extensions/$(DOMAIN)
+#GETTEXT=./pygettext.py
+GETTEXT=xgettext
+
+#MSGFMT = ./msgfmt.py
+MSGFMT = msgfmt
+
+LANGS := de it
+LANGPO := $(foreach LANG, $(LANGS),$(LANG).po)
+LANGMO := $(foreach LANG, $(LANGS),$(LANG).mo)
+
+default: $(DOMAIN).pot $(LANGPO) merge $(LANGMO)
+ for lang in $(LANGS); do \
+ mkdir -p $$lang/LC_MESSAGES; \
+ cp $$lang.mo $$lang/LC_MESSAGES/$(DOMAIN).mo; \
+ done
+
+merge:
+ for lang in $(LANGS); do \
+ msgmerge --no-location -s -N -U $$lang.po $(DOMAIN).pot; \
+ done
+
+
+# the TRANSLATORS: allows putting translation comments before the to-be-translated line.
+$(DOMAIN).pot:
+ $(GETTEXT) -L python --add-comments="TRANSLATORS:" -d $(DOMAIN) -s -o $(DOMAIN).pot ../src/*.py
+ msguniq -o $(DOMAIN)uniq.pot $(DOMAIN).pot
+ $(RM) $(DOMAIN).pot
+ mv $(DOMAIN)uniq.pot $(DOMAIN).pot
+
+.PHONY: $(DOMAIN).pot
+
+
+%.mo: %.po
+ $(MSGFMT) -o $@ $<
+
+%.po:
+ msginit -l $@ -o $@ -i $(DOMAIN).pot --no-translator
+
+CLEANFILES = $(foreach LANG, $(LANGS),$(LANG).mo)
+
+clean-local:
+ $(RM) -r $(LANGS)
+
+install-data-am: default
+ for lang in $(LANGS); do \
+ mkdir -p $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES; \
+ cp $$lang.mo $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo; \
+ done
--- /dev/null
+msgid ""
+msgstr ""
+"Project-Id-Version: PornCenter\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-01-07 13:12+0100\n"
+"PO-Revision-Date: \n"
+"Last-Translator: AliAbdul <aliabdul1978@hotmail.de>\n"
+"Language-Team: AliAbdul <aliabdul1978@hotmail.de>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: German\n"
+"X-Poedit-Country: GERMANY\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-SearchPath-0: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src\n"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:54
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:108
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:171
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:189
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:237
+msgid "Porn Center"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:55
+msgid "Adult streaming plugins for dm800/dm8000"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:58
+msgid "delete"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:58
+msgid "keep on device"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:58
+msgid "ask me"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:120
+#, python-format
+msgid "Downloading movie: %s"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:159
+msgid "Stop playing this movie?"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:194
+msgid "Select"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:252
+msgid "Name:"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:253
+msgid "Description:"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:254
+msgid "Buffer:"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:255
+msgid "Buffer device:"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:256
+msgid "Buffer file handling:"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:381
+msgid "Error while getting video url!"
+msgstr ""
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:394
+msgid "Delete this movie?"
+msgstr ""
+
--- /dev/null
+msgid ""
+msgstr ""
+"Project-Id-Version: PornCenter\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-01-07 13:12+0100\n"
+"PO-Revision-Date: \n"
+"Last-Translator: AliAbdul <aliabdul1978@hotmail.de>\n"
+"Language-Team: AliAbdul <aliabdul1978@hotmail.de>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: German\n"
+"X-Poedit-Country: GERMANY\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-SearchPath-0: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src\n"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:54
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:108
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:171
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:189
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:237
+msgid "Porn Center"
+msgstr "Porn Center"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:55
+msgid "Adult streaming plugins for dm800/dm8000"
+msgstr "Erwachsenen-Streaming Plugins für die dm800/dm8000"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:58
+msgid "delete"
+msgstr "löschen"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:58
+msgid "keep on device"
+msgstr "auf Datenträger behalten"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:58
+msgid "ask me"
+msgstr "frage mich"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:120
+#, python-format
+msgid "Downloading movie: %s"
+msgstr "Filme herunterladen: %s"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:159
+msgid "Stop playing this movie?"
+msgstr "Diesen Film stoppen?"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:194
+msgid "Select"
+msgstr "Selektiere"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:252
+msgid "Name:"
+msgstr "Name:"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:253
+msgid "Description:"
+msgstr "Beschreibung:"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:254
+msgid "Buffer:"
+msgstr "Puffer:"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:255
+msgid "Buffer device:"
+msgstr "Puffergerät:"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:256
+msgid "Buffer file handling:"
+msgstr "Pufferdateihandhabung:"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:381
+msgid "Error while getting video url!"
+msgstr "Fehler waehrend dem Ermitteln der Video url!"
+
+#: /home/aliabdul/dream/ltteam/trunk/additions/plugins/porncenter/src/plugin.py:394
+msgid "Delete this movie?"
+msgstr "Diesen Film löschen?"
+
--- /dev/null
+msgid ""
+msgstr ""
+"Project-Id-Version: enigma2 - porncenter\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-29 13:38+0100\n"
+"PO-Revision-Date: \n"
+"Last-Translator: Spaeleus <spaeleus@croci.org>\n"
+"Language-Team: www.linsat.net <spaeleus@croci.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Italian\n"
+"X-Poedit-Country: ITALY\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-Basepath: /home/dario/Plugins/PornCenter\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Poedit-SearchPath-0: /home/dario/Plugins/PornCenter\n"
+
+#: /home/dario/Plugins/PornCenter/plugin.py:48
+#: /home/dario/Plugins/PornCenter/plugin.py:57
+#: /home/dario/Plugins/PornCenter/ChangedMoviePlayer.py:28
+msgid "Porn Center"
+msgstr "Porn Center"
+
+#: /home/dario/Plugins/PornCenter/plugin.py:49
+msgid "Adult streaming plugins for dm800/dm8000"
+msgstr "Plugin di streaming per adulti (dm800/dm8000)"
+
+#: /home/dario/Plugins/PornCenter/plugin.py:64
+msgid "Name:"
+msgstr "Nome:"
+
+#: /home/dario/Plugins/PornCenter/plugin.py:65
+msgid "Description:"
+msgstr "Descrizione:"
+
+#: /home/dario/Plugins/PornCenter/plugin.py:162
+msgid "Error while getting video url!"
+msgstr "Errore nell'ottenimento url video!"
+
+#: /home/dario/Plugins/PornCenter/ChangedMoviePlayer.py:16
+msgid "Stop playing this movie?"
+msgstr "Arrestare la riproduzione?"
+
--- /dev/null
+installdir = /usr/lib/enigma2/python/Plugins/Extensions/PornCenter/Additions
+install_PYTHON = *.py
+install_DATA = *.png
--- /dev/null
+# MyDirtyIpods plugin by AliAbdul
+from Podcast import Podcast
+
+##################################################
+
+class MyDirtyIpods(Podcast):
+ def __init__(self):
+ Podcast.__init__(self, "My Dirty Ipods", "MyDirtyIpods.png", "http://www.mydirtyipods.com/Ipod/IpodClips.xml")
+
+##################################################
+
+def getPlugin():
+ return MyDirtyIpods()
--- /dev/null
+# NaughtyAmerica plugin by AliAbdul
+from Podcast import Podcast
+
+##################################################
+
+class NaughtyAmerica(Podcast):
+ def __init__(self):
+ Podcast.__init__(self, "Naughty America", "NaughtyAmerica.png", "http://www.naughtyamerica.com/one_minclip_archive.xml")
+
+##################################################
+
+def getPlugin():
+ return NaughtyAmerica()
--- /dev/null
+# PornCenter by AliAbdul\r
+from Components.AVSwitch import AVSwitch
+from enigma import ePicLoad, eTimer
+from os import listdir, remove
+from Tools.Directories import resolveFilename, SCOPE_PLUGINS
+from Tools.Import import my_import
+from Tools.LoadPixmap import LoadPixmap
+from twisted.web.client import downloadPage, getPage
+import urllib2
+
+##################################################
+
+class Cache:
+ def __init__(self):
+ self.sc = AVSwitch().getFramebufferScale()
+ self.idx = -1
+ self.finishCallback = None
+ self.finishCallbackTimer = eTimer()
+ self.finishCallbackTimer.callback.append(self.callback)
+ self.oldService = None
+ self.session = None
+
+ def getIndex(self):
+ self.idx += 1
+ return self.idx
+
+ def callback(self):
+ if self.finishCallback:
+ self.finishCallback()
+
+ def startCallbackTimer(self):
+ self.finishCallbackTimer.stop()
+ self.finishCallbackTimer.start(5000, 1)
+cache = Cache()
+
+##################################################
+
+class Movie:
+ def __init__(self, name, url, thumb=None):
+ self.type = "Movie"
+ self.name = name
+ self.url = url
+ self.thumb = None
+ if thumb:
+ try:
+ req = urllib2.Request(thumb)
+ url_handle = urllib2.urlopen(req)\r
+ headers = url_handle.info()\r
+ contentType = headers.getheader("content-type")
+ except:
+ contentType = None
+ if contentType:
+ if 'image/jpeg' in contentType:
+ self.thumbnailFile = "/tmp/"+str(cache.getIndex())+".jpg"
+ elif 'image/png' in contentType:
+ self.thumbnailFile = "/tmp/"+str(cache.getIndex())+".png"
+ else:
+ self.thumbnailFile = None
+ else:
+ self.thumbnailFile = None
+ if self.thumbnailFile:
+ downloadPage(thumb, self.thumbnailFile).addCallback(self.decodeThumbnail).addErrback(self.error)
+
+ def error(self, error=None):
+ if error: print error
+
+ def decodeThumbnail(self, str=None):
+ self.picload = ePicLoad()
+ self.picload.PictureData.get().append(self.decodeThumbnailFinished)
+ self.picload.setPara((150, 75, cache.sc[0], cache.sc[1], False, 1, "#00000000"))
+ self.picload.startDecode(self.thumbnailFile)
+
+ def decodeThumbnailFinished(self, picInfo=None):
+ ptr = self.picload.getData()
+ if ptr:
+ self.thumb = ptr
+ remove(self.thumbnailFile)
+ del self.picload
+ cache.startCallbackTimer()
+
+ def getVideoUrl(self):
+ return self.url
+
+##################################################
+
+class Plugin:
+ def __init__(self, name, thumb):
+ self.type = "Plugin"
+ self.name = name
+ self.thumb = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS)+"/Extensions/PornCenter/Additions/"+thumb)
+ self.callback = None
+
+ def getName(self):
+ return self.name
+
+ def getEntries(self, callback):
+ pass
+
+ def getMoreEntries(self):
+ pass
+
+ def getPage(self, url):
+ getPage(url).addCallback(self.getPageCallback).addErrback(self.getPageError)
+
+ def getPageCallback(self, page):
+ pass
+
+ def getPageError(self, error=None):
+ if error:
+ print "[%s] Error: %s" % (self.name, error)
+
+##################################################
+
+def getPlugins():
+ try:
+ files = listdir(resolveFilename(SCOPE_PLUGINS)+"/Extensions/PornCenter/Additions")
+ files.sort()
+ except Exception, exc:
+ print "[PornCenter] failed to search for plugins:", exc
+ files = []
+ plugins = []
+ for file in files:
+ if file.endswith(".py") and not file in ["__init__.py", "Plugin.py", "Podcast.py"]:
+ try:
+ plugin = my_import('.'.join(["Plugins", "Extensions", "PornCenter", "Additions", file[:-3]]))
+ if not plugin.__dict__.has_key("getPlugin"):
+ print "Plugin %s doesn't have 'getPlugin'-call." % file
+ continue
+ p = plugin.getPlugin()
+ if p:
+ plugins.append(p)
+ except Exception, exc:
+ print "Plugin %s failed to load: %s" % (file, exc)
+ continue
+ return plugins
--- /dev/null
+# podcast plugin by AliAbdul
+from Plugin import Movie, Plugin
+import re
+
+##################################################
+
+def encodeUrl(url):
+ url = url.replace("&", "&")
+ url = url.replace("<", "<")
+ url = url.replace(">", ">")
+ url = url.replace("'", "'")
+ url = url.replace(""", '"')
+ url = url.replace("*", "*")
+ url = url.replace("|", "|")
+ url = url.replace("'", "'")
+ url = url.replace("»", ">>")
+ return url
+
+##################################################
+
+class Podcast(Plugin):
+ def __init__(self, name, icon, url):
+ self.url = url
+ Plugin.__init__(self, name, icon)
+
+ def getEntries(self, callback):
+ self.callback = callback
+ self.getPage(self.url)
+
+ def getPageCallback(self, page):
+ movies = []
+ if page.__contains__("</title>"):
+ page = page[page.index("</title>")+8:]
+ reonecat = re.compile(r'<title>(.+?)</title>.+?<description>(.+?)</description>.+?<enclosure(.+?)/>.+?', re.DOTALL)\r
+ for title, description, info in reonecat.findall(page):
+ if title.startswith("<![CDATA["):
+ title = title[9:]
+ if title.endswith("]]>"):
+ title = title[:-3]
+ url = None
+ thumb = None\r
+ if info.__contains__('url="'):\r
+ idx = info.index('url="')\r
+ url = info[idx+5:]\r
+ idx = url.index('"')\r
+ url = url[:idx]\r
+ if description.__contains__('img src="'):\r
+ idx = description.index('img src="')\r
+ thumb = description[idx+9:]\r
+ idx = thumb.index('"')\r
+ thumb = thumb[:idx]
+ if url:
+ movies.append(Movie(encodeUrl(title), url, thumb))
+ self.callback(movies)
+
+ def getPageError(self, error=None):
+ if error: print error
--- /dev/null
+# Pornabees plugin by AliAbdul
+from Podcast import Podcast
+
+##################################################
+
+class Pornabees(Podcast):
+ def __init__(self):
+ Podcast.__init__(self, "Pornabees", "Pornabees.png", "http://feeds.feedburner.com/PornabeesPodPorn")
+
+##################################################
+
+def getPlugin():
+ return Pornabees()
--- /dev/null
+# SuicideGirls plugin by AliAbdul
+from Podcast import Podcast
+
+##################################################
+
+class SuicideGirls(Podcast):
+ def __init__(self):
+ Podcast.__init__(self, "Suicide Girls", "SuicideGirls.png", "http://suicidegirls.com/rss/video")
+
+##################################################
+
+def getPlugin():
+ return SuicideGirls()
--- /dev/null
+# mXVideos plugin by AliAbdul
+from Plugin import Movie, Plugin
+import re, urllib2
+
+##################################################
+
+class mXVideosMovie(Movie):
+ def __init__(self, name, url, thumb):
+ Movie.__init__(self, name, url, thumb)
+
+ def getVideoUrl(self):
+ try:
+ data = urllib2.urlopen(self.url).read()
+ except:
+ data = ""
+ reonecat = re.compile(r'Watch Video: <a href="(.+?)">MP4</a>')
+ list = reonecat.findall(data)
+ if list and len(list) > 0:
+ return "http://m.xvideos.com"+list[0]
+ else:
+ return None
+
+##################################################
+
+class mXVideosSub(Plugin):
+ def __init__(self, name, url):
+ self.url = url
+ self.moreEntries = True
+ Plugin.__init__(self, name, "mXVideos.png")
+
+ def getEntries(self, callback, currPage=1):
+ self.currPage = currPage
+ self.callback = callback
+ self.getPage("http://m.xvideos.com%s/page/%d" % (self.url, self.currPage))
+
+ def getPageCallback(self, page):
+ movies = []
+ reonecat = re.compile(r'src="(.+?)" /></a><div class="scene_title"><a href="(.+?)"> (.+?)</a></div></div>', re.DOTALL)\r
+ for thumb, url, name in reonecat.findall(page):
+ movies.append(mXVideosMovie(name, "http://m.xvideos.com"+url, thumb))
+ self.callback(movies)
+
+ def getMoreEntries(self):
+ if self.moreEntries:
+ self.getEntries(self.callback, self.currPage+1)
+
+ def getPageError(self, error=None):
+ if error and self.currPage == 1:
+ print "[%s] Error: %s" % (self.name, error)
+ else:
+ self.moreEntries = False
+
+##################################################
+
+class mXVideos(Plugin):
+ def __init__(self):
+ Plugin.__init__(self, "mXVideos", "mXVideos.png")
+
+ def getEntries(self, callback):
+ self.callback = callback
+ self.getPage("http://m.xvideos.com/tag/browse")
+
+ def getPageCallback(self, page):
+ plugins = []
+ idx = 0
+ reonecat = re.compile(r'<a href="(.+?)">(.+?)</a><br />', re.DOTALL)\r
+ for url, name in reonecat.findall(page):
+ if idx == 0:
+ idx += 1
+ name = "Amateur"
+ plugins.append(mXVideosSub("mXVideos - "+name, url))
+ if len(plugins):
+ del plugins[-1]
+ self.callback(plugins)
+
+ def getPageError(self, error=None):
+ if error: print "[%s] Error: %s" % (self.name, error)
+
+##################################################
+
+def getPlugin():
+ return mXVideos()
--- /dev/null
+# mp4porn plugin by AliAbdul
+from Plugin import Movie, Plugin
+import re, urllib2
+
+##################################################
+
+class MP4PornMovie(Movie):
+ def __init__(self, name, url, thumb):
+ Movie.__init__(self, name, url, thumb)
+
+ def getVideoUrl(self):
+ try:
+ data = urllib2.urlopen(self.url).read()
+ except:
+ data = ""
+ reonecat = re.compile(r'\| <a href="(.+?).m4v"')
+ list = reonecat.findall(data)
+ if list and len(list) > 0:
+ return "%s%s" % (list[0], ".m4v")
+ else:
+ return None
+
+##################################################
+
+class MP4Porn(Plugin):
+ def __init__(self):
+ self.moreEntries = True
+ Plugin.__init__(self, "mp4porn.mobi", "mp4porn.png")
+
+ def getEntries(self, callback, currPage=1):
+ self.currPage = currPage
+ self.callback = callback
+ self.getPage("http://mp4porn.mobi/page/%d/" % self.currPage)
+
+ def getPageCallback(self, page):
+ movies = []
+ reonecat = re.compile(r'<div class="post" onclick="location.href=(.+?)"> <div class="thumb"><a href="(.+?)"><img src="(.+?)" width="120" height="90" alt="(.+?)" />', re.DOTALL)\r
+ for unneeded, url, thumb, name in reonecat.findall(page):
+ movies.append(MP4PornMovie(name, url, thumb))
+ self.callback(movies)
+
+ def getMoreEntries(self):
+ if self.moreEntries:
+ self.getEntries(self.callback, self.currPage+1)
+
+ def getPageError(self, error=None):
+ if error and self.currPage == 1:
+ print "[%s] Error: %s" % (self.name, error)
+ else:
+ self.moreEntries = False
+
+##################################################
+
+def getPlugin():
+ return MP4Porn()
--- /dev/null
+# pornrabbit plugin by AliAbdul
+from Plugin import Movie, Plugin
+import re, urllib2
+
+##################################################
+
+class PornRabbitMovie(Movie):
+ def __init__(self, name, url, thumb):
+ Movie.__init__(self, name, url, thumb)
+
+ def getVideoUrl(self):
+ try:
+ data = urllib2.urlopen(self.url).read()
+ except:
+ data = ""
+ reonecat = re.compile(r'<span class="download"><a href="(.+?).mp4"')
+ list = reonecat.findall(data)
+ if list and len(list) > 0:
+ return list[0]+".mp4"
+ else:
+ return None
+
+##################################################
+
+class PornRabbitSub(Plugin):
+ def __init__(self, name, url):
+ self.url = url
+ self.moreEntries = True
+ Plugin.__init__(self, name, "pornrabbit.png")
+
+ def getEntries(self, callback, currPage=1):
+ self.currPage = currPage
+ self.callback = callback
+ self.getPage("http://www.pornrabbit.com%spage%d.html" % (self.url, self.currPage))
+
+ def getDetails(self, div):
+ name = None
+ url = None
+ thumb = None
+ reonecat = re.compile(r'<img src="(.+?)"(.+?)<h3>(.+?)</h3>(.+?)class="link"><a href="(.+?)"><b>Play', re.DOTALL)\r
+ for t, x1, n, x2, u in reonecat.findall(div):
+ name = n
+ thumb = t
+ url = "http://www.pornrabbit.com"+u
+ return (name, url, thumb)
+
+ def getPageCallback(self, page):
+ movies = []
+ tmps = []
+ if '<div class="video">' in page:
+ while '<div class="video">' in page:
+ idx = page.index('<div class="video">')
+ page = page[idx:]
+ idx = page.index('</div>')
+ tmps.append(page[:idx])
+ page = page[idx:]\r
+ for tmp in tmps:
+ (name, url, thumb) = self.getDetails(tmp)
+ if name and url and thumb:
+ movies.append(PornRabbitMovie(name, url, thumb))
+ self.callback(movies)
+
+ def getMoreEntries(self):
+ if self.moreEntries:
+ self.getEntries(self.callback, self.currPage+1)
+
+ def getPageError(self, error=None):
+ if error and self.currPage == 1:
+ print "[%s] Error: %s" % (self.name, error)
+ else:
+ self.moreEntries = False
+
+##################################################
+
+class PornRabbit(Plugin):
+ def __init__(self):
+ Plugin.__init__(self, "Porn Rabbit", "pornrabbit.png")
+
+ def getEntries(self, callback):
+ self.callback = callback
+ self.getPage("http://www.pornrabbit.com/category.html")
+
+ def getDetails(self, div):
+ name = None
+ url = None
+ reonecat = re.compile(r'<h3>(.+?)<span class(.+?)<a href="(.+?)"><b>', re.DOTALL)\r
+ for n, x, u in reonecat.findall(div):
+ name = n
+ if len(u) > 10:
+ url = u[:-10]
+ return (name, url)
+
+ def getPageCallback(self, page):
+ plugins = []
+ reonecat = re.compile(r'<div class="categ">(.+?)</div>', re.DOTALL)\r
+ for tmp in reonecat.findall(page):
+ (name, url) = self.getDetails(tmp)
+ if name and url:
+ plugins.append(PornRabbitSub("Porn Rabbit - " + name, url))
+ self.callback(plugins)
+
+ def getPageError(self, error=None):
+ if error: print "[%s] Error: %s" % (self.name, error)
+
+##################################################
+
+def getPlugin():
+ return PornRabbit()
--- /dev/null
+# xPodClips plugin by AliAbdul
+from Podcast import Podcast
+
+##################################################
+
+class xPodClips(Podcast):
+ def __init__(self):
+ Podcast.__init__(self, "xPod Clips", "xPodClips.png", "http://feeds.feedburner.com/XpodClips")
+
+##################################################
+
+def getPlugin():
+ return xPodClips()
--- /dev/null
+# xxx4pods plugin by AliAbdul
+from Podcast import Podcast
+
+##################################################
+
+class xxx4pods(Podcast):
+ def __init__(self):
+ Podcast.__init__(self, "xxx4pods", "xxx4pods.png", "http://xxx4pods.com/podcasts/podcast.xml")
+
+##################################################
+
+def getPlugin():
+ return xxx4pods()
--- /dev/null
+SUBDIRS = Additions
+installdir = /usr/lib/enigma2/python/Plugins/Extensions/PornCenter
+install_PYTHON = *.py
+install_DATA = *.png maintainer.info
--- /dev/null
+nabil1978@web.de
+ARD Mediathek
--- /dev/null
+# Porn Center by AliAbdul
+from Additions.Plugin import cache, getPlugins
+from Components.ActionMap import ActionMap
+from Components.config import config, ConfigSelection, ConfigSubsection, ConfigText, ConfigYesNo, getConfigListEntry
+from Components.ConfigList import ConfigListScreen\r
+from Components.FileList import FileList
+from Components.Label import Label
+from Components.Language import language
+from Components.MenuList import MenuList
+from Components.MultiContent import MultiContentEntryPixmapAlphaBlend, MultiContentEntryText
+from Components.PluginComponent import plugins
+from Components.ProgressBar import ProgressBar
+from enigma import eListboxPythonMultiContent, eServiceReference, eTimer, getDesktop, gFont
+from os import environ, remove
+from Plugins.Plugin import PluginDescriptor
+from Screens.InfoBar import MoviePlayer
+from Screens.MessageBox import MessageBox
+from Screens.ParentalControlSetup import ProtectedScreen
+from Screens.Screen import Screen
+from Tools.BoundFunction import boundFunction
+from Tools.Directories import resolveFilename, SCOPE_LANGUAGE, SCOPE_PLUGINS
+from Tools.Downloader import downloadWithProgress
+from Tools.LoadPixmap import LoadPixmap
+import gettext
+
+##################################################
+
+desktop = getDesktop(0)
+size = desktop.size()
+WIDTH = size.width()
+HEIGHT = size.height()
+
+##################################################
+
+def localeInit():
+ lang = language.getLanguage()
+ environ["LANGUAGE"] = lang[:2]\r
+ gettext.bindtextdomain("enigma2", resolveFilename(SCOPE_LANGUAGE))\r
+ gettext.textdomain("enigma2")
+ gettext.bindtextdomain("PornCenter", "%s%s" % (resolveFilename(SCOPE_PLUGINS), "Extensions/PornCenter/locale/"))
+
+def _(txt):\r
+ t = gettext.dgettext("PornCenter", txt)\r
+ if t == txt:\r
+ t = gettext.gettext(txt)\r
+ return t
+
+localeInit()\r
+language.addCallback(localeInit)
+
+##################################################
+
+config.plugins.PornCenter = ConfigSubsection()
+config.plugins.PornCenter.name = ConfigText(default=_("Porn Center"), fixed_size=False)
+config.plugins.PornCenter.description = ConfigText(default=_("Adult streaming plugins for dm800/dm8000"), fixed_size=False)
+config.plugins.PornCenter.buffer = ConfigYesNo(default=True)
+config.plugins.PornCenter.bufferDevice = ConfigText(default="/media/hdd/", fixed_size=False)
+config.plugins.PornCenter.keepStored = ConfigSelection(choices={"delete": _("delete"), "keep": _("keep on device"), "ask": _("ask me")}, default="delete")
+
+##################################################
+
+class BufferThread():
+ def __init__(self):
+ self.progress = 0
+ self.downloading = False
+ self.error = ""
+ self.download = None
+
+ def startDownloading(self, url, file):
+ self.progress = 0
+ self.downloading = True
+ self.error = ""
+ self.download = downloadWithProgress(url, file)
+ self.download.addProgress(self.httpProgress)
+ self.download.start().addCallback(self.httpFinished).addErrback(self.httpFailed)
+
+ def httpProgress(self, recvbytes, totalbytes):
+ self.progress = int(100 * recvbytes / float(totalbytes))
+
+ def httpFinished(self, string=""):
+ self.downloading = False
+ if string is not None:
+ self.error = str(string)
+ else:
+ self.error = ""
+
+ def httpFailed(self, failure_instance=None, error_message=""):
+ self.downloading = False
+ if error_message == "" and failure_instance is not None:
+ error_message = failure_instance.getErrorMessage()
+ self.error = str(error_message)
+
+ def stop(self):
+ self.progress = 0
+ self.downloading = False
+ self.error = ""
+ self.download.stop()
+
+bufferThread = BufferThread()
+
+##################################################
+
+class PornCenterBuffer(Screen):
+ skin = """
+ <screen position="center,center" size="520,80" title="%s" >\r
+ <widget name="info" position="5,5" size="510,40" font="Regular;18" halign="center" valign="center" />
+ <widget name="progress" position="100,50" size="320,14" pixmap="skin_default/progress_big.png" borderWidth="2" borderColor="#cccccc" />\r
+ </screen>""" % _("Porn Center")
+\r
+ def __init__(self, session, url, file):
+ self.session = session
+ Screen.__init__(self, session)
+
+ self.url = url
+ self.file = file
+
+ self.infoTimer = eTimer()
+ self.infoTimer.timeout.get().append(self.updateInfo)
+
+ self["info"] = Label(_("Downloading movie: %s") % self.file)
+ self["progress"] = ProgressBar()
+
+ self["actions"] = ActionMap(["OkCancelActions"], {"ok": self.okClicked, "cancel": self.exit}, -1)
+
+ self.onLayoutFinish.append(self.downloadMovie)
+
+ def downloadMovie(self):
+ bufferThread.startDownloading(self.url, self.file)
+ self.infoTimer.start(300, False)
+
+ def updateInfo(self):
+ if bufferThread.error != "":
+ self["info"].setText(bufferThread.error)
+ self.infoTimer.stop()
+ else:
+ progress = int(bufferThread.progress)
+ self["progress"].setValue(progress)
+ if progress == 100:
+ self.infoTimer.stop()
+ self.close(True)
+
+ def okClicked(self):
+ if int(bufferThread.progress) > 0:
+ self.infoTimer.stop()
+ self.close(True)
+
+ def exit(self):
+ bufferThread.download.stop()
+ self.close(None)
+
+##################################################
+
+class ChangedMoviePlayer(MoviePlayer):
+ def __init__(self, session, service):
+ MoviePlayer.__init__(self, session, service)
+ self.skinName = "MoviePlayer"
+
+ def leavePlayer(self):
+ self.session.openWithCallback(self.leavePlayerConfirmed, MessageBox, _("Stop playing this movie?"))
+
+ def leavePlayerConfirmed(self, answer):
+ if answer:
+ self.close()
+
+ def doEofInternal(self, playing):
+ pass
+
+ def getPluginList(self):
+ list = []
+ for p in plugins.getPlugins(where=PluginDescriptor.WHERE_EXTENSIONSMENU):
+ if (p.name != _("Porn Center")) and (p.name != config.plugins.PornCenter.name.value):
+ list.append(((boundFunction(self.getPluginName, p.name), boundFunction(self.runPlugin, p), lambda: True), None))
+ return list
+
+ def showMovies(self):
+ pass
+
+##################################################
+
+class PornCenterLocationSelection(Screen):
+ skin = """
+ <screen position="center,center" size="560,300" title="%s">
+ <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" transparent="1" alphatest="on" />
+ <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" transparent="1" alphatest="on" />
+ <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" transparent="1" alphatest="on" />
+ <ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" transparent="1" alphatest="on" />
+ <widget name="key_green" position="140,0" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor="#1f771f" transparent="1" />
+ <widget name="filelist" position="10,45" size="550,255" scrollbarMode="showOnDemand" />
+ </screen>""" % _("Porn Center")\r
+\r
+ def __init__(self, session, dir="/"):\r
+ Screen.__init__(self, session)\r
+ \r
+ self["key_green"] = Label(_("Select"))\r
+ \r
+ try: self["filelist"] = FileList(dir, showDirectories=True, showFiles=False)\r
+ except: self["filelist"] = FileList("/", showDirectories, showFiles)\r
+ \r
+ self["actions"] = ActionMap(["ColorActions", "OkCancelActions"],\r
+ {\r
+ "ok": self.okClicked,\r
+ "cancel": self.exit,\r
+ "green": self.select\r
+ }, -1)
+
+ self.onLayoutFinish.append(self.updateDirectoryName)\r
+ \r
+ def okClicked(self):\r
+ if self["filelist"].canDescent():\r
+ self["filelist"].descent()\r
+ self["filelist"].instance.moveSelectionTo(0)\r
+ self.updateDirectoryName()\r
+\r
+ def exit(self):\r
+ self.close(None)\r
+\r
+ def select(self):\r
+ dir = self["filelist"].getCurrentDirectory()\r
+ if dir is not None:\r
+ self.close(dir)\r
+ else:\r
+ self.close(None)\r
+\r
+ def updateDirectoryName(self):
+ try:
+ dir = self["filelist"].getCurrentDirectory()
+ self.instance.setTitle(dir)
+ except:
+ self.instance.setTitle("?")
+
+##################################################
+
+class PornCenterConfig(ConfigListScreen, Screen):
+ skin = """
+ <screen position="center,center" size="520,150" title="%s" >
+ <widget name="config" position="0,0" size="520,150" scrollbarMode="showOnDemand" />
+ </screen>""" % _("Porn Center")
+
+ def __init__(self, session, args=None):
+ Screen.__init__(self, session)
+ self.session = session
+
+ ConfigListScreen.__init__(self, [])
+
+ self["actions"] = ActionMap(["OkCancelActions"], {"ok": self.change, "cancel": self.exit}, -2)
+
+ self.onLayoutFinish.append(self.createConfig)
+
+ def createConfig(self):
+ self.deviceEntry = ConfigSelection(choices=[config.plugins.PornCenter.bufferDevice.value], default=config.plugins.PornCenter.bufferDevice.value)
+ self["config"].list = [
+ getConfigListEntry(_("Name:"), config.plugins.PornCenter.name),
+ getConfigListEntry(_("Description:"), config.plugins.PornCenter.description),
+ getConfigListEntry(_("Buffer:"), config.plugins.PornCenter.buffer),
+ getConfigListEntry(_("Buffer device:"), self.deviceEntry),
+ getConfigListEntry(_("Buffer file handling:"), config.plugins.PornCenter.keepStored)]
+
+ def keyLeft(self):
+ ConfigListScreen.keyLeft(self)
+ self.handleKeysLeftAndRight()
+
+ def keyRight(self):
+ ConfigListScreen.keyRight(self)
+ self.handleKeysLeftAndRight()
+
+ def handleKeysLeftAndRight(self):
+ sel = self["config"].getCurrent()[1]
+ if sel == self.deviceEntry:
+ self.session.openWithCallback(self.locationSelected, PornCenterLocationSelection, config.plugins.PornCenter.bufferDevice.value)
+
+ def locationSelected(self, dir):
+ if dir is not None and dir != "?":
+ config.plugins.PornCenter.bufferDevice.value = dir
+ config.plugins.PornCenter.bufferDevice.save()
+ self.createConfig()
+
+ def change(self):
+ for x in self["config"].list:
+ x[1].save()
+ self.close()
+
+ def exit(self):
+ for x in self["config"].list:
+ x[1].cancel()
+ self.close()
+
+##################################################
+
+class PinChecker:
+ def __init__(self):
+ self.pin_entered = False
+ self.timer = eTimer()
+ self.timer.callback.append(self.lock)
+
+ def pinEntered(self):
+ self.pin_entered = True
+ self.timer.start(60000*10, 1)
+
+ def lock(self):
+ self.pin_entered = False
+pinchecker = PinChecker()
+
+##################################################
+
+class PornCenterList(MenuList):
+ def __init__(self):
+ MenuList.__init__(self, [], False, eListboxPythonMultiContent)
+ self.l.setItemHeight(75)
+ if WIDTH == 720:
+ self.l.setFont(0, gFont("Regular", 30))
+ self.center_up = 22
+ else:
+ self.l.setFont(0, gFont("Regular", 40))
+ self.center_up = 15
+
+ def SetList(self, entries):
+ list = []
+ for entry in entries:
+ res = [(entry)]
+ if entry.thumb:
+ res.append(MultiContentEntryPixmapAlphaBlend(pos=(0, 0), size=(150, 75), png=entry.thumb))
+ else:
+ res.append(MultiContentEntryPixmapAlphaBlend(pos=(0, 0), size=(150, 75), png=LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS)+"/Extensions/PornCenter/nopreview.png")))
+ res.append(MultiContentEntryText(pos=(155, self.center_up), size=(WIDTH-270, 45), font=0, text=entry.name))
+ list.append(res)
+ self.setList(list)
+
+##################################################
+
+class PornCenterSub(Screen, ProtectedScreen):
+ def __init__(self, session, plugin=None):
+ Screen.__init__(self, session)
+ if pinchecker.pin_entered == False:
+ ProtectedScreen.__init__(self)
+
+ self.session = session
+ self.plugin = plugin
+ self.list = []
+
+ self["list"] = PornCenterList()
+
+ self["actions"] = ActionMap(["InfobarActions", "MenuActions", "OkCancelActions"],
+ {
+ "ok": self.ok,
+ "cancel": self.exit,
+ "menu": self.config,
+ "showMovies": self.showMore
+ }, -1)
+
+ self.onLayoutFinish.append(self.getEntries)
+
+ def isProtected(self):
+ return config.ParentalControl.setuppinactive.value and config.ParentalControl.configured.value
+
+ def pinEntered(self, result):
+ if result is None:
+ self.close()
+ elif not result:
+ self.close()
+ else:
+ pinchecker.pinEntered()
+
+ def ok(self):
+ curr = self["list"].getCurrent()
+ if curr:
+ curr = curr[0]
+ if curr.type == "Plugin":
+ self.session.open(PornCenterMain, curr)
+ elif curr.type == "Movie":
+ url = curr.getVideoUrl()
+ if url:
+ if config.plugins.PornCenter.buffer.value:
+ file = url
+ while file.__contains__("/"):
+ idx = file.index("/")
+ file = file[idx+1:]
+ self.file = "%s%s" % (config.plugins.PornCenter.bufferDevice.value, file)
+ self.session.openWithCallback(self.bufferCallback, PornCenterBuffer, url, self.file)
+ else:
+ self.session.open(ChangedMoviePlayer, eServiceReference(4097, 0, url))
+ else:
+ self.session.open(MessageBox, _("Error while getting video url!"), MessageBox.TYPE_ERROR)
+
+ def bufferCallback(self, callback):
+ if callback is not None:
+ ref = eServiceReference(4097, 0, self.file)
+ self.session.openWithCallback(self.delete, ChangedMoviePlayer, ref)
+
+ def delete(self, callback=None):
+ if bufferThread.downloading: #still downloading?
+ bufferThread.stop()
+ if config.plugins.PornCenter.keepStored.value == "delete":
+ remove(self.file)
+ elif config.plugins.PornCenter.keepStored.value == "ask":
+ self.session.openWithCallback(self.deleteCallback, MessageBox, _("Delete this movie?"))
+
+ def deleteCallback(self, callback):
+ if callback:
+ remove(self.file)
+
+ def exit(self):
+ cache.finishCallback = None
+ for x in self.list:
+ del x
+ self.close()
+
+ def getEntries(self):
+ if not self.plugin:
+ self.gotEntries(getPlugins())
+ else:
+ cache.finishCallback = self.listChanged
+ self.plugin.getEntries(self.gotEntries)
+
+ def gotEntries(self, entries=None):
+ if entries:
+ for entry in entries:
+ self.list.append(entry)
+ self["list"].SetList(self.list)
+
+ def listChanged(self):
+ self["list"].SetList(self.list)
+
+ def config(self):
+ self.session.open(PornCenterConfig)
+
+ def showMore(self):
+ if self.plugin:
+ if self.plugin.type == "Plugin":
+ self.plugin.getMoreEntries()
+
+##################################################
+
+class PornCenterMain(PornCenterSub):
+ if HEIGHT == 576:
+ LISTHEIGHT = 450
+ else:
+ LISTHEIGHT = HEIGHT - 100
+ if LISTHEIGHT > 600:
+ LISTHEIGHT = 600\r
+ skin = """\r
+ <screen position="0,0" size="%d,%d" flags="wfNoBorder" backgroundColor="#000000" >\r
+ <widget name="list" position="50,50" size="%d,%d" transparent="1" scrollbarMode="showOnDemand" />\r
+ </screen>""" % (WIDTH, HEIGHT, WIDTH - 100, LISTHEIGHT)
+
+ def __init__(self, *x):
+ PornCenterSub.__init__(self, *x)
+
+##################################################
+
+def main_closed(callback=None):
+ cache.session.nav.playService(cache.oldService)
+
+def main(session, **kwargs):
+ cache.session = session
+ cache.oldService = session.nav.getCurrentlyPlayingServiceReference()
+ session.nav.stopService()
+ session.openWithCallback(main_closed, PornCenterMain)
+
+def Plugins(**kwargs):
+ return PluginDescriptor(name=config.plugins.PornCenter.name.value, description=config.plugins.PornCenter.description.value, where=[PluginDescriptor.WHERE_EXTENSIONSMENU, PluginDescriptor.WHERE_PLUGINMENU], fnc=main, icon="plugin.png")