def __init__(self, session, genre_type=('select','',None), genre_title=_('GENRES'), menu_data=None):
		self.__class__.ctr += 1
		self.genre_type = genre_type
		self.genre_title = genre_title
		if genre_type[0] == 'albums':
			skin_name='defaultListScreen.xml'
		else:
			skin_name='defaultGenreScreen.xml'

		MenuHelper.__init__(self, session, 0, None, BASE_URL, "", self._defaultlistleft, cookieJar=glob_cookies, skin_name=skin_name)

		self['title'] = Label(MFMP3_Version)
		self['ContentTitle'] = Label(self.genre_title)
		self.menu = menu_data
		self.skipMenuParse = menu_data != None

		self["mfmp3_actions"] = ActionMap(['MP_Actions'], {
			"blue" :  self.blueButton,
			"yellow" :  self.yellowButton,
			"green" :  self.moreButton,
			"nextBouquet" : self.keyPageUp,
			"prevBouquet" : self.keyPageDown
		}, -1)
		self['Page'] = Label(_("Page:"))
		self['F2'] = Label("")
		self['F3'] = Label("")
		self['F4'] = Label("")
		if genre_type[0] == 'albums':
			self['handlung'] = Label()
			
		self.page = self.pages = 0
		self.nextUrl = self.nextPage = None
		self.yellowButtonTxt = None
		self.moreButtonTxt = None
		self.blueButtonTxt = None
		self.similar = None
		self.genres = None
		self.param_qr = ''
		self.hist_stype = None
		self.hist_menuListe = None
		self.deferredDL = None
		self.title_set = set()
		self.bio_text = ""

		if self.genre_type[0] == 'select':
			self.__class__.ctr = 1
			if config.mediaportal.restorelastservice.value == "1" and not config.mediaportal.backgroundtv.value:
				self.lastservice = self.session.nav.getCurrentlyPlayingServiceReference()
			else:
				self.lastservice = None
			self.onClose.append(self.restoreLastService)
			self.onClose.append(glob_historyLRUCache.saveCache)
			glob_historyLRUCache.readCache()

		self.onClose.append(self.mfmp3Close)
		self.mh_On_setGenreStrTitle.append((self.showInfos,()))
		if not self.__class__.hash:
			twAgentGetPage(BASE_URL+'/theme/new/js/lang.js', cookieJar=glob_cookies, timeout=5).addCallback(self.parseHash).addErrback(self.parseHash, True).addCallback(lambda x: self.mh_initMenu())
		else:
			self.onLayoutFinish.append(self.mh_initMenu)
	def __init__(self, session, serienUrl, streamId, animeName, episodenTitel):
		self.serienUrl = serienUrl
		self.streamname = streamId
		self.animeName = animeName
		self.episodenTitel = episodenTitel
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/defaultListScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultListScreen.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()

		MPScreen.__init__(self, session)

		self["actions"] = ActionMap(["MP_Actions"], {
			"0" : self.closeAll,
			"ok" : self.keyOK,
			"cancel": self.keyCancel
		}, -1)

		self['title'] = Label("NWANIME")
		self['leftContentTitle'] = Label(_("Stream Selection"))
		self['ContentTitle'] = Label(_("Stream Selection"))
		self['name'] = Label(self.streamname)

		self.coverUrl = None
		self.streamList = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml
		self.keyLocked = True
		self.onLayoutFinish.append(self.loadPage)
Example #3
0
    def cb_Menu(self, data):
        print "cb_Menu:"
        if data != []:
            if data[0] == 2:
                nm = self["liste"].getCurrent()[0][0]
                p = nm.find("-")
                if p > 0:
                    scArtist = nm[:p].strip()
                    scTitle = nm[p + 1 :].strip()
                else:
                    scArtist = ""
                    scTitle = nm

                url = self["liste"].getCurrent()[0][1]
                ltype = "canna"
                token = ""
                album = ""
                entry = [scTitle, url, scArtist, album, ltype, token, "", "0"]

                res = SimplePlaylistIO.addEntry(data[1], entry)
                if res == 1:
                    self.session.open(MessageBoxExt, _("Added entry"), MessageBoxExt.TYPE_INFO, timeout=5)
                elif res == 0:
                    self.session.open(MessageBoxExt, _("Entry already exists"), MessageBoxExt.TYPE_INFO, timeout=5)
                else:
                    self.session.open(MessageBoxExt, _("Error!"), MessageBoxExt.TYPE_INFO, timeout=5)
	def handleGenreSel(self):
		list = (
				( _('TOP TRACKS'), 'charts'),
				( _('ARTISTS'), 'albums')
			)

		self.session.openWithCallback(self.cb_handleGenreSel, ChoiceBoxExt, title=_("List Selection"), list = list)
		auswahl = self['liste'].getCurrent()[0][1]
		cover = self['liste'].getCurrent()[0][2]
		self.session.open(kxStreams, auswahl, stream_name, cover)

class kxNeuesteSerien(MPScreen, ThumbsHelper):

	def __init__(self, session, kxGotLink, name):
		self.kxGotLink = kxGotLink
		self.Name = name
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/defaultGenreScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultGenreScreen.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()

		MPScreen.__init__(self, session)
		ThumbsHelper.__init__(self)

		self["actions"] = ActionMap(["MP_Actions"], {
			"0": self.closeAll,
			"5" : self.keyShowThumb,
			"ok" : self.keyOK,
			"cancel": self.keyCancel,
			"green" : self.keyAdd
		}, -1)

		self['title'] = Label("Kinox.to")
		self['ContentTitle'] = Label(self.Name)
		self['name'] = Label(_("Selection:"))
		self['F2'] = Label(_("Add to Watchlist"))
	def __init__(self, session, title, url, cover):
		self.movietitle = title
		self.url = url
		self.cover = cover
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/defaultListScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultListScreen.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()
		MPScreen.__init__(self, session)

		self["actions"] = ActionMap(["MP_Actions"], {
			"0" : self.closeAll,
			"ok" : self.keyOK,
			"cancel": self.keyCancel,
			"green" : self.keyTrailer,
		}, -1)

		self['title'] = Label("HDFilme")
		self['leftContentTitle'] = Label(_("Stream Selection"))
		self['ContentTitle'] = Label(_("Stream Selection"))
		self['name'] = Label(self.movietitle)
		self['F4'] = Label("Stream")
		self['F4'].hide()

		self.trailer = None
		self.streamList = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml
		self.keyLocked = True
		self.onLayoutFinish.append(self.loadPage)
	def checkForSimilar(self, data):
		if data and 'class="similar_cont"><ul>' in data and self.__class__.ctr < 10:
			m = re.search('class="similar_cont"><ul>(.*?)</ul>', data)
			self.similar = []
			for sa in re.finditer('="hash" href="(.*?)"><li>(.*?)</', m.group(1)):
				link, name = sa.groups()
				self.similar.append((0, ('genreselect', link, name), name.title()))

			if self.similar:
				self.yellowButtonTxt = _("Similar genres")
			else:
				self.yellowButtonTxt = ""
		elif data and not self.similar and '="playlist radio_list">' in data and self.__class__.ctr < 10:
			m = re.search('="playlist radio_list">(.*?)</ul>', data)
			self.similar = []
			for sa in re.finditer('="radio_logo">.*?<a href="(.*?)".*?="hash">(.*?)</', m.group(1)):
				link, artist = sa.groups()
				self.similar.append((0, ('listselect', link, artist), artist))

			if self.similar:
				self.yellowButtonTxt = _("Similar artists")
			else:
				self.yellowButtonTxt = ""
		elif data and not self.similar and '<a href="#">Simlar artists</a>' in data and self.__class__.ctr < 10:
			m = re.search('<a href="#">Simlar artists</a>(.*?)class="clear">', data)
			self.similar = []
			for sa in re.finditer('="hash tag" href="(.*?)"><span>(.*?)</', m.group(1)):
				link, artist = sa.groups()
				self.similar.append((0, ('listselect', link, artist), artist))

			if self.similar:
				self.yellowButtonTxt = _("Similar artists")
			else:
				self.yellowButtonTxt = ""
Example #8
0
	def __init__(self, session, Link, Name, Image):
		self.Link = Link
		self.Name = Name
		self.Image = Image
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/defaultGenreScreenCover.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultGenreScreenCover.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()
		MPScreen.__init__(self, session)

		self["actions"] = ActionMap(["MP_Actions"], {
			"0"		: self.closeAll,
			"ok"	: self.keyOK,
			"cancel": self.keyCancel,
			"up" : self.keyUp,
			"down" : self.keyDown,
			"right" : self.keyRight,
			"left" : self.keyLeft
		}, -1)

		self['title'] = Label("NOW TV")
		self['ContentTitle'] = Label(_("Seasons:"))
		self['name'] = Label(_("Selection:") + " " + self.Name)

		self.keyLocked = True
		self.filmliste = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml

		self.onLayoutFinish.append(self.loadPage)
	def __init__(self, session):
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/defaultGenreScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultGenreScreen.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()
		MPScreen.__init__(self, session)

		self["actions"] = ActionMap(["MP_Actions"], {
			"0" : self.closeAll,
			"ok" : self.keyOK,
			"cancel" : self.keyCancel,
			"up" : self.keyUp,
			"down" : self.keyDown,
			"right" : self.keyRight,
			"left" : self.keyLeft
		}, -1)

		self['title'] = Label("NWANIME")
		self['ContentTitle'] = Label(_(_("Genre Selection")))

		self.streamList = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml

		self.keyLocked = False
		self.onLayoutFinish.append(self.layoutFinished)
	def parseData(self, data):
		desc = re.search('description":"(.*?)","', data, re.S)
		if desc:
			self['handlung'].setText(decodeHtml(desc.group(1).replace('\\"','"')))
		else:
			self['handlung'].setText(_("No information found."))
		ID = re.search('"id":"(.*?)"', data, re.S)
		cover = COVER_BASE_URL + "/img/cover/" + ID.group(1) + ".jpg"
		movies = re.search('movies":"(.*?)"', data, re.S)
		if movies:
			movies = int(movies.group(1))
			if movies > 0:
				Staffel = "Staffel 0"
				buildurl = self.Url + "/0"
				self.streamList.append((Staffel,buildurl,cover))
		seasons = re.search('seasons":"(.*?)"', data, re.S)
		if seasons:
			season = int(seasons.group(1))
			for i in range(1,int(season)+1):
				Staffel = "Staffel %s" %i
				buildurl = self.Url + "/%s" %i
				self.streamList.append((Staffel,buildurl,cover))
		if len(self.streamList) == 0:
			self.streamList.append((_('No seasons found!'), None))
		self.ml.setList(map(self._defaultlistleft, self.streamList))
		self.keyLocked = False
		self.showInfos()
Example #11
0
	def getStreamData(self, data):
		if re.search('stream2k.tv', data):
			url = re.findall('code":".iframe src=."(.*?)" width', data)
			if url:
				url = urllib.unquote(url[0].replace('\\',''))
				getPage(url, agent=glob_agent).addCallback(self.getStream, url).addErrback(self.dataError)
			else:
				self.session.open(MessageBoxExt, _("Stream not found, try another Stream Hoster."), MessageBoxExt.TYPE_INFO, timeout=5)
		elif re.search('vkpass.com', data):
			url = re.findall('code":".iframe src=."(.*?)" width', data)
			if url:
				url = urllib.unquote(url[0].replace('\\',''))
				headers_data = {'Content-Type':'application/x-www-form-urlencoded',
								'Cookie': 'lang=DE; 09ffa5fd85da835056d6f324eaf0927f=OK',
								'Referer': self.url
								}
				getPage(url, agent=glob_agent, headers=headers_data).addCallback(self.getStream, url).addErrback(self.dataError)

		elif re.search('picasaweb.google.com', data):
			url = re.findall('src=."(.*?)"', data)
			if url:
				url = urllib.unquote(url[0].replace('\\',''))
				getPage(url, agent=glob_agent).addCallback(self.getStream, url).addErrback(self.dataError)
			else:
				self.session.open(MessageBoxExt, _("Stream not found, try another Stream Hoster."), MessageBoxExt.TYPE_INFO, timeout=5)

		else:
			code = re.findall('"code":"(.*?)"', data)
			if code:
				code = code[0]
				url = "http://se2.seriesever.net/vk_video/video.php?action=get&url=%s" % urllib.quote(code)
				getPage(url, agent=glob_agent).addCallback(self.getStream, url).addErrback(self.dataError)
			else:
				self.session.open(MessageBoxExt, _("Stream not found, try another Stream Hoster."), MessageBoxExt.TYPE_INFO, timeout=5)
Example #12
0
    def __init__(self, session):
        self.plugin_path = mp_globals.pluginPath
        self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
        path = "%s/%s/defaultGenreScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
        if not fileExists(path):
            path = self.skin_path + mp_globals.skinFallback + "/defaultGenreScreen.xml"
        print path
        with open(path, "r") as f:
            self.skin = f.read()
            f.close()
        MPScreen.__init__(self, session)

        self["actions"] = ActionMap(
            ["MP_Actions"], {"ok": self.keyOK, "0": self.closeAll, "cancel": self.keyCancel}, -1
        )

        self["title"] = Label(HTV_Version)
        self["ContentTitle"] = Label("Genres")
        self["name"] = Label(_("Selection:"))
        self["F1"] = Label(_("Exit"))

        self.keyLocked = True
        self.data_rubrikid = "2523"
        self.baseUrl = "http://www.heise.de"
        self.genreliste = []
        self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
        self["liste"] = self.ml

        self.onLayoutFinish.append(self.layoutFinished)
    def __init__(self, session):

        self.plugin_path = mp_globals.pluginPath
        self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
        path = "%s/%s/PluginUserDefault.xml" % (self.skin_path, config.mediaportal.skin.value)
        if not fileExists(path):
            path = self.skin_path + mp_globals.skinFallback + "/PluginUserDefault.xml"
        with open(path, "r") as f:
            self.skin = f.read()
            f.close()

        Screen.__init__(self, session)
        self["title"] = Label(_("SimpleList Configuration"))
        self["F4"] = Label("")
        self.list = []
        self.list.append(getConfigListEntry(_("Global playlist number"), config.mediaportal.sp_pl_number))
        self.list.append(getConfigListEntry(_("Google coversupport"), config.mediaportal.simplelist_gcoversupp))

        ConfigListScreenExt.__init__(self, self.list)
        self["setupActions"] = ActionMap(
            ["MP_Actions"], {"ok": self.keySave, "cancel": self.keyCancel, "blue": self.importEPG}, -2
        )

        if config.mediaportal.epg_enabled.value:
            self["F4"] = Label(_("Import EPG"))
Example #14
0
	def __init__(self, session):

		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/PluginUserDefault.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/PluginUserDefault.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()

		Screen.__init__(self, session)
		self['title'] = Label("Pornhub.com " + _("Setup"))
		self['F4'] = Label('')
		self.setTitle("Pornhub.com " + _("Setup"))

		self.list = []
		ConfigListScreenExt.__init__(self, self.list)

		self.list.append(getConfigListEntry(_("Username:"******"Password:"******"CDN fix (please don't use this option as default):"), config.mediaportal.pornhub_cdnfix))

		self["config"].setList(self.list)

		self["setupActions"] = ActionMap(["MP_Actions"],
		{
			"ok"    : self.keySave,
			"cancel": self.keyCancel
		}, -1)
	def __init__(self, session, title, episode, url):
		self.serieUrl = url
		self.Title = title
		self.episode = episode
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/defaultListScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultListScreen.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()
		MPScreen.__init__(self, session)

		self["actions"] = ActionMap(["MP_Actions"], {
			"0" : self.closeAll,
			"ok" : self.keyOK,
			"cancel": self.keyCancel
		}, -1)

		self['title'] = Label("watchseries-online")
		self['leftContentTitle'] = Label(_("Stream Selection"))
		self['ContentTitle'] = Label(_("Stream Selection"))
		self['name'] = Label(self.Title)

		self.streamList = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml
		self.keyLocked = True
		self.onLayoutFinish.append(self.loadPage)
		self.tw_agent_hlp = TwAgentHelper()
	def getData(self, data):
		if self.portal == wn:
			url = re.findall('href="(http://(www.)wrestlingnetwork.(net|tv)/dailymotion-embed/.*?)">(.*?)</a>', data, re.S)
			if url:
				self.filmliste = []
				for (url,dump,dump1,title) in url:
					self.filmliste.append((decodeHtml(title),url))
			else:
				self.filmliste.append((_("Video deleted or there has been an error!"), None))
			self.ml.setList(map(self._defaultlistcenter, self.filmliste))
			self.ml.moveToIndex(0)
			self.keyLocked = False
		else:
			if re.match('.*?Link will added in Few Hours', data, re.S):
				self.filmliste.append((_("Link will added in few Hours!"), None))
				self.keyLocked = True
			else:
				url = re.findall('href="(http://eshop.*?)".*?webkit-text-shadow:none">(.*?)</span>', data, re.S)
				if url:
					self.filmliste = []
					for (url,title) in url:
						self.filmliste.append((decodeHtml(title),url))
						self.keyLocked = False
				else:
					self.filmliste.append((_("Video deleted or there has been an error!"), None))
					self.keyLocked = False
			self.ml.setList(map(self._defaultlistcenter, self.filmliste))
			self.ml.moveToIndex(0)
Example #17
0
	def buildMenulist(self):
		self['F1'].setText(_("Exit"))
		self['ContentTitle'].setText(_('List overview'))
		self.genreliste.append(('1', _('Video List'), ''))
		path = config.mediaportal.watchlistpath.value + 'mp_global_pl_*'
		list = glob.glob(path)
		for fn in list:
			n = int(re.search('mp_global_pl_(\d+)', fn).group(1))
			self.genreliste.append(('2', 'Global Playlist-%02d' % n, n))
		self.genreliste.sort(key=lambda t : t[0]+t[1].lower())

		path = self.plugin_path + "/userfiles/" + '*.m3u'
		list = glob.glob(path)
		for upath in list:
			fn = upath.split('/')[-1]
			wpath = config.mediaportal.watchlistpath.value + fn
			try:
				shutil.copyfile(upath, wpath)
			except:
				pass

		path = config.mediaportal.watchlistpath.value + '*.m3u'
		list = glob.glob(path)
		list.sort(key=lambda t : t.lower())
		for fn in list:
			self.genreliste.append(('3', fn.split('/')[-1], fn))

		self.ml.setList(map(self.simplelistListEntry, self.genreliste))
	def __init__(self, session, Title, Url):
		self.Url = SERIES_BASE_URL + "/api/series/" + Url
		self.Title = Title
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/defaultListScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultListScreen.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()
		MPScreen.__init__(self, session)

		self["actions"] = ActionMap(["MP_Actions"], {
			"0" : self.closeAll,
			"ok" : self.keyOK,
			"cancel": self.keyCancel,
			"blue" :  self.keyTxtPageDown,
			"red" :  self.keyTxtPageUp
		}, -1)

		self['title'] = Label("Burning-seri.es")
		self['ContentTitle'] = Label(_("Season Selection"))
		self['name'] = Label(self.Title)
		self['F1'] = Label(_("Text-"))
		self['F4'] = Label(_("Text+"))

		self.streamList = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml

		self.keyLocked = True
		self.onLayoutFinish.append(self.loadPage)
Example #19
0
	def loadData(self, data):
		if self.Name == "Channels":
			self['F2'].setText(_("Page"))
			self['Page'].setText(_("Page:"))
			self.getLastPage(data, 'class="pagination">(.*?)</ul>')
			parse = re.search('class="heading">(.*?)class="footer"', data, re.S)
			Movies = re.findall('<a\shref="(.*?/)"\stitle="(.*?)">.*?img\ssrc="(.*?)"', parse.group(1), re.S)
			if Movies:
				for (Url, Title, Image) in Movies:
					self.filmliste.append((decodeHtml(Title), Url, Image))
		else:
			self.lastpage = 1
			parse = re.search('class="tags".*?<ul>(.*?)</ul>', data, re.S)
			Movies = re.findall('<a\shref="(.*?/)".*?title="(.*?)">', parse.group(1), re.S)
			if Movies:
				for (Url, Title) in Movies:
					self.filmliste.append((decodeHtml(Title.title()), Url, None))
					self.filmliste.sort()
		if len(self.filmliste) == 0:
			self.filmliste.append((_('Parsing error!'), None))
		self.ml.setList(map(self._defaultlistcenter, self.filmliste))
		self.ml.moveToIndex(0)
		self.th_ThumbsQuery(self.filmliste, 0, 1, 2, None, None, self.page, self.lastpage)
		self.showInfos()
		self.keyLocked = False
	def __init__(self):
		self.lastSearchNum = -1
		self.searchKey = None
		self["suchtitel"] = Label(_("Search char."))
		self["suchhinweis"] = Label(_("A-Z search"))
		self["suche"] = Label("")
		self["bg_search"] = Label("")
		self["suche"].hide()
		self["suchtitel"].hide()
		self["suchhinweis"].hide()
		self["bg_search"].hide()

		self.numericalTextInput = NumericalTextInput()
		self.numericalTextInput.setUseableChars(u'1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ')
		if mp_globals.isDreamOS:
			self.numericalTextInput.timer_conn = self.numericalTextInput.timer.timeout.connect(self.doSearch)
		else:
			self.numericalTextInput.timer.callback.append(self.doSearch)

		self["search_actions"] = NumberActionMap(["NumberActions", "InputAsciiActions"], {
			"1": self.goToLetter,
			"2": self.goToLetter,
			"3": self.goToLetter,
			"4": self.goToLetter,
			"5": self.goToLetter,
			"6": self.goToLetter,
			"7": self.goToLetter,
			"8": self.goToLetter,
			"9": self.goToLetter
		}, -1)
Example #21
0
	def __init__(self, session):
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/defaultGenreScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultGenreScreen.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()

		MPScreen.__init__(self, session)

		self["actions"] = ActionMap(["MP_Actions"], {
			"0"		: self.closeAll,
			"ok"    : self.keyOK,
			"cancel": self.keyCancel
		}, -1)

		self['title'] = Label(FGTV_Version)
		self['ContentTitle'] = Label(_("Menu"))
		self['name'] = Label(_("Selection:"))
		self['F1'] = Label(_("Exit"))

		self.genreliste = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml
Example #22
0
	def showHandlung(self, data):
		if re.match('.*?<img src="https://img.movie4k.*?/thumbs/', data, re.S):
			cover = re.findall('<img src="https://img.movie4k.*?/thumbs/(.*?)"', data, re.S)
			self.pic = cover[0]
		if re.match('.*?src="/img/smileys/.*?.gif', data, re.S):
			quali = re.findall('src="/img/smileys/(.*?).gif"', data, re.S)
			if quali[0] == "5":
				quali = "top - 5/5"
			if quali[0] == "4":
				quali = "very well - 4/5"
			if quali[0] == "3":
				quali = "average - 3/5"
			if quali[0] == "2":
				quali = "bad - 2/5"
			if quali[0] == "1":
				quali = "very bad - 1/5"
		if re.match('.*?class="moviedescription">.*?</div>', data, re.S):
			desc = re.findall('class="moviedescription">(.*?)<', data, re.S)
			desc = desc[0]
			pic = "%s%s" % (t_url,self.pic)
			CoverHelper(self['coverArt']).getCover(pic)
			if desc and quali:
				handlung = "Quality: "+quali+"\n"+ decodeHtml(desc)
				self['handlung'].setText(decodeHtml(handlung).strip())
				self['F1'].setText(_("Text-"))
				self['F4'].setText(_("Text+"))
			elif desc and not quali:
				handlung = decodeHtml(desc)
				self['F1'].setText(_("Text-"))
				self['F4'].setText(_("Text+"))
			else:
				self['handlung'].setText(_("No information found."))
		self.th_ThumbsQuery(self.list, 0, 1, None, None, '<img src="https://img.movie4k.*?/thumbs/(.*?)"', self.page, self.lastpage, coverlink=t_url)
Example #23
0
	def getStream(self, data, url):
		if re.search('http://stream2k.tv', url, re.S):
			streams = re.findall('"file":"(.*?)"', data, re.S)
			if streams:
				stream_url = streams[0].replace('\\','')
				mp_globals.player_agent = glob_agent
				self.session.open(SimplePlayer, [(self.stream_name, stream_url, self.coverUrl)], cover=True, showPlaylist=False, ltype='seriesever')
			else:
				self.session.open(MessageBoxExt, _("Stream not found, try another Stream Hoster."), MessageBoxExt.TYPE_INFO, timeout=5)
		elif re.search('vkpass.com', url, re.S):
			streams = re.findall('{file:"(.*?)",', data, re.S)
			if streams:
				stream_url = streams[0].replace('\\','')
				mp_globals.player_agent = glob_agent
				self.session.open(SimplePlayer, [(self.stream_name, stream_url, self.coverUrl)], cover=True, showPlaylist=False, ltype='seriesever')
			else:
				self.session.open(MessageBoxExt, _("Stream not found, try another Stream Hoster."), MessageBoxExt.TYPE_INFO, timeout=5)
		elif re.search('picasaweb.google.com', url, re.S):
			streams = re.findall('"url":"(https://redirector.googlevideo.com.*?)"', data, re.S)
			if streams:
				stream_url = streams[-1].replace('\\','')
				mp_globals.player_agent = glob_agent
				self.session.open(SimplePlayer, [(self.stream_name, stream_url, self.coverUrl)], cover=True, showPlaylist=False, ltype='seriesever')
		else:
			stream_raw = re.findall('"(.*?\/[0-9].mp4)"', data, re.S)
			if stream_raw:
				stream_url = stream_raw[-1].replace('\\','')
				mp_globals.player_agent = glob_agent
				self.session.open(SimplePlayer, [(self.stream_name, stream_url, self.coverUrl)], cover=True, showPlaylist=False, ltype='seriesever')
			else:
				self.session.open(MessageBoxExt, _("Stream not found, try another Stream Hoster."), MessageBoxExt.TYPE_INFO, timeout=5)
 def genreData(self, data):
     if self.genreID == 2:
         stvDaten = re.findall('<a href="\?v=(.*?)" title="(.*?)".*?<img src="(.*?)".*?_time">(.*?)<', data)
         if stvDaten:
             for (href, title, img, dura) in stvDaten:
                 self.filmliste.append(
                     ("", title.replace(" - ", "\n", 1).replace("&amp;", "&") + " [" + dura + "]", href, img)
                 )
             self.keyLocked = False
         else:
             self.filmliste.append((_("No videos found!"), "", "", ""))
         self.ml.setList(map(self.TvListEntry, self.filmliste))
     elif self.genreID == 3:
         m = re.search('<div id="bx_main_c">(.*?)"center">', data, re.S)
         if m:
             stvDaten = re.findall(
                 '<td .*?<strong>(.*?)</strong></td>.*?title="(.*?)"><img src="(.*?)".*?onclick=', m.group(1), re.S
             )
         if stvDaten:
             for (ptime, title, img) in stvDaten:
                 title = title.replace(" - ", "\n\t", 1).replace("&amp;", "&")
                 self.filmliste.append((ptime + "\t", title, "", img))
             self.keyLocked = False
         else:
             self.filmliste.append((_("No program data found!"), "", "", ""))
         self.ml.setList(map(self.TvListEntry, self.filmliste))
     self.ml.l.setItemHeight(self.height * 2)
Example #25
0
	def __init__(self, session):
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/PluginUserDefault.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/PluginUserDefault.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()

		Screen.__init__(self, session)
		self['title'] = Label("HDFilme " + _("Setup"))
		self['F4'] = Label('')
		self.setTitle("HDFilme " + _("Setup"))

		self.list = []
		ConfigListScreenExt.__init__(self, self.list)

		self.list.append(getConfigListEntry(_("Username:"******"Password:"******"config"].setList(self.list)

		self["setupActions"] = ActionMap(["MP_Actions"],
		{
			"ok":		self.saveConfig,
			"cancel":	self.exit
		}, -1)
Example #26
0
	def delLoginUserError(self, error):
		myerror = error.getErrorMessage()
		if myerror == '204 No Content':
			message = self.session.open(MessageBoxExt, _("Selection was deleted from LoginUser Playlist."), MessageBoxExt.TYPE_INFO, timeout=5)
			self.loadPage()
		else:
			message = self.session.open(MessageBoxExt, _("delete Selection ERROR in LoginUser Playlist."), MessageBoxExt.TYPE_INFO, timeout=5)
			raise error
Example #27
0
	def loginInfo(self, data):
		if 'complete":true' in str(data):
			self.loginOK = True
			self['ContentTitle'].setText(_("Selection") + " - " + _("%s logged in") % self.username)
		else:
			self.loginOK = False
			self['ContentTitle'].setText(_("Selection") + " - " + _("Login failed!"))
		agent.getWebPage('%s/movie-movies' % BASEURL).addCallback(self.loadPage).addErrback(self.dataError)
Example #28
0
	def __init__(self, session, Link, Name, HD, Date):
		self.Link = Link
		self.Name = Name
		if HD == "HD":
			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 = ""
		self.plugin_path = mp_globals.pluginPath
		self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
		path = "%s/%s/defaultListWideScreen.xml" % (self.skin_path, config.mediaportal.skin.value)
		if not fileExists(path):
			path = self.skin_path + mp_globals.skinFallback + "/defaultListWideScreen.xml"
		with open(path, "r") as f:
			self.skin = f.read()
			f.close()

		MPScreen.__init__(self, session)
		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,
			"blue" : self.keySort
		}, -1)

		self['title'] = Label("Vporn.com")
		self['ContentTitle'] = Label("Genre: %s" % self.Name)
		self['F2'] = Label(_("Page"))
		self['F4'] = Label(_("Sort"))

		self['Page'] = Label(_("Page:"))
		self.keyLocked = True
		self.page = 1
		self.lastpage = 1
		self.sort = 'newest'
		self.sortname = 'Newest'

		self.filmliste = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml
 def pincheck(self):
     self.session.openWithCallback(
         self.pincheckok,
         PinInputExt,
         pinList=[(config.mediaportal.pincode.value)],
         triesEntry=self.getTriesEntry(),
         title=_("Please enter the correct pin code"),
         windowTitle=_("Enter pin code"),
     )
Example #30
0
	def getDescription(self, data):
		ddDescription = re.search('class="post-content-single">\n<center>.*?</a><br\s/>\n{0,1}(.*?)<br\s/>.*?</center>', data, re.S)
		if ddDescription:
			if ddDescription.group(1) == "&#8230;":
				self['handlung'].setText(_("No information found."))
			else:
				self['handlung'].setText(decodeHtml(ddDescription.group(1)))
		else:
			self['handlung'].setText(_("No information found."))
Example #31
0
	def __init__(self, session, topgenre, genre, url):
		self.topgenre = topgenre
		self.genre = genre
		self.url = url

		MPScreen.__init__(self, session, skin='MP_Plugin')

		self["actions"] = ActionMap(["MP_Actions"], {
			"ok"    : self.keyOK,
			"0" : self.closeAll,
			"cancel": self.keyCancel
		}, -1)

		self.keyLocked = True
		self['title'] = Label(self.topgenre)
		self['ContentTitle'] = Label(_(self.genre))

		self.genreliste = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml

		self.onLayoutFinish.append(self.loadPage)
 def getVideoPage(self, data):
     try:
         import execjs
         node = execjs.get("Node")
     except:
         printl('nodejs not found', self, 'E')
         self.session.open(
             MessageBoxExt,
             _("This plugin requires packages python-pyexecjs and nodejs."),
             MessageBoxExt.TYPE_INFO)
         return
     decoder = "decrypt=function(_0xf4bdx6) {"\
      "var _0xf4bdx7 = '',"\
      "    _0xf4bdx8 = 0;"\
      "/[^\u0410\u0412\u0421\u0415\u041cA-Za-z0-9\.\,\~]/g ['exec'](_0xf4bdx6) && console['log']('error decoding url');"\
      "_0xf4bdx6 = _0xf4bdx6['replace'](/[^\u0410\u0412\u0421\u0415\u041cA-Za-z0-9\.\,\~]/g, '');"\
      "do {"\
      "var _0xf4bdx9 = '\u0410\u0412\u0421D\u0415FGHIJKL\u041CNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,~' ['indexOf'](_0xf4bdx6['charAt'](_0xf4bdx8++)),"\
      "_0xf4bdxa = '\u0410\u0412\u0421D\u0415FGHIJKL\u041CNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,~' ['indexOf'](_0xf4bdx6['charAt'](_0xf4bdx8++)),"\
      "_0xf4bdxb = '\u0410\u0412\u0421D\u0415FGHIJKL\u041CNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,~' ['indexOf'](_0xf4bdx6['charAt'](_0xf4bdx8++)),"\
      "_0xf4bdxc = '\u0410\u0412\u0421D\u0415FGHIJKL\u041CNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,~' ['indexOf'](_0xf4bdx6['charAt'](_0xf4bdx8++)),"\
      "_0xf4bdx9 = _0xf4bdx9 << 2 | _0xf4bdxa >> 4,"\
      "_0xf4bdxa = (_0xf4bdxa & 15) << 4 | _0xf4bdxb >> 2,"\
      "_0xf4bdxd = (_0xf4bdxb & 3) << 6 | _0xf4bdxc,"\
      "_0xf4bdx7 = _0xf4bdx7 + String['fromCharCode'](_0xf4bdx9);"\
      "64 != _0xf4bdxb && (_0xf4bdx7 += String['fromCharCode'](_0xf4bdxa));"\
      "64 != _0xf4bdxc && (_0xf4bdx7 += String['fromCharCode'](_0xf4bdxd))"\
      "} while (_0xf4bdx8 < _0xf4bdx6['length']);;"\
      "return unescape(_0xf4bdx7)"\
      "};"
     video_url = re.findall('var video_url=(.*?);', data, re.S)
     js = decoder + "\n" + 'video_url=decrypt(' + video_url[
         0] + ');' + "return video_url;"
     url = str(node.exec_(js))
     self.keyLocked = False
     Title = self['liste'].getCurrent()[0][0]
     self.session.open(SimplePlayer, [(Title, url)],
                       showPlaylist=False,
                       ltype='vjav')
Example #33
0
 def loadPlaylist(self):
     self.keyLocked = True
     self.streamList = []
     self.wl_path = config_mp.mediaportal.watchlistpath.value + "mp_ss_watchlist"
     try:
         readStations = open(self.wl_path, "r")
         rawData = readStations.read()
         readStations.close()
         for m in re.finditer('"(.*?)" "(.*?)"', rawData):
             (stationName, stationLink) = m.groups()
             self.streamList.append((stationName, stationLink))
     except:
         pass
     if len(self.streamList) == 0:
         self.streamList.append((_('Watchlist is currently empty'), None))
         self.ml.setList(map(self._defaultlistleft, self.streamList))
     else:
         self.streamList.sort()
         self.keyLocked = False
         self.ml.setList(map(self._defaultlistleft, self.streamList))
         self.ml.moveToIndex(0)
         self.loadPicQueued()
Example #34
0
	def loadStations(self):
		CoverHelper(self['coverArt']).getCover(default_cover)
		self.playList = []
		if not fileExists(config.mediaportal.watchlistpath.value+"mp_radio_playlist"):
			open(config.mediaportal.watchlistpath.value+"mp_radio_playlist","w").close()
		if fileExists(config.mediaportal.watchlistpath.value+"mp_radio_playlist"):
			path = config.mediaportal.watchlistpath.value+"mp_radio_playlist"

		if fileExists(path):
			readStations = open(path,"r")
			for rawData in readStations.readlines():
				data = re.findall('"(.*?)" "(.*?)"', rawData, re.S)
				if data:
					(stationName, stationLink) = data[0]
					self.playList.append((stationName, stationLink))
			self.playList.sort()
			readStations.close()
		if len(self.playList) == 0:
			self.playList.append((_('No entries found!'), None, default_cover))
		self.ml.setList(map(self._defaultlistleft, self.playList))
		self.keyLocked = False
		self.showInfos()
Example #35
0
 def loadData(self, data):
     self.getLastPage(data, 'class="pagination">(.*?)</ul>',
                      '.*>((?:\d+,|)\d+)<')
     preparse = re.search('.*?class="section-header">(.*?)$', data, re.S)
     if preparse:
         Movies = re.findall(
             'item-img">.*?src="(.*?)"\sclass="img-responsive.*?<h3><a href="(https://pornfree.tv/video/(.*?)/)">(.*?)</a>.*?class="date">(.*?)</span.*?fa-eye"></i>(.*?)</span',
             preparse.group(1), re.S)
         if Movies:
             for (Image, Url, Filename, Title, Added, Views) in Movies:
                 if "&hellip;" in Title:
                     tmp1 = stripAllTags(Title).split(' ')[0]
                     tmp2 = Filename.lower().replace(
                         tmp1.lower(), '').replace('-', ' ').strip()
                     tmp3 = stripAllTags(Title).split('(')[-1]
                     Title = tmp1 + " " + tmp2 + " (" + tmp3
                     Title = ' '.join(
                         s[:1].upper() + s[1:]
                         for s in stripAllTags(Title).split(' '))
                 if not re.match('http', Url):
                     Url = BASE_URL + "/" + Url
                 self.filmliste.append((stripAllTags(decodeHtml(Title)),
                                        Url, Image, Views, Added))
     if len(self.filmliste) == 0:
         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
     self.th_ThumbsQuery(self.filmliste,
                         0,
                         1,
                         2,
                         None,
                         None,
                         self.page,
                         self.lastpage,
                         mode=0)
     self.showInfos()
 def get_srf_rtmp(self, data):
     xml = re.findall('"url":"(rtmp:.*?)"', data, re.S)
     if xml:
         url = xml[-1].replace("\/", "/")
         host = url.split('mp4:')[0]
         playpath = url.split('mp4:')[1]
         title = self['liste'].getCurrent()[0][0]
         final = "%s swfUrl=http://www.srf.ch/player/flash/srfplayer.swf playpath=mp4:%s swfVfy=1" % (
             host, playpath)
         playlist = []
         playlist.append((title, final))
         self.session.open(SimplePlayer,
                           playlist,
                           showPlaylist=False,
                           ltype='srf')
     else:
         message = self.session.open(
             MessageBoxExt,
             _("For legal reasons this video may be viewed only within Switzerland."
               ),
             MessageBoxExt.TYPE_INFO,
             timeout=5)
Example #37
0
 def get_url(self, data):
     Link = re.findall(
         '<iframe\swidth="\d+"\sheight="\d+"\ssrc="((?:http:|)//(.*?)\/.*?)"',
         data, re.S)
     if Link:
         if Link[0][0].startswith('//'):
             url = 'http:' + Link[0][0]
         else:
             url = Link[0][0]
         if re.match('.*?//hqporner.com', url):
             getPage(url, agent=hqAgent).addCallback(
                 self.getVideoLink).addErrback(self.dataError)
         elif re.match('.*?//mydaddy\.cc', url):
             getPage(url, agent=hqAgent).addCallback(
                 self.mydaddy).addErrback(self.dataError)
         elif isSupportedHoster(Link[0][1].replace('www.', '')):
             get_stream_link(self.session).check_link(url, self.got_link)
     else:
         message = self.session.open(MessageBoxExt,
                                     _("No supported streams found!"),
                                     MessageBoxExt.TYPE_INFO,
                                     timeout=3)
Example #38
0
 def getData(self, data):
     if re.match('.*?Link will added in Few Hours', data, re.S):
         self.filmliste.append(
             (_("Link will added in few Hours!"), None, False))
         self.keyLocked = True
     else:
         vid = re.findall(
             'href="(http[s]?://[^<>]*?)"\sclass="su-button.*?webkit-text-shadow:none">(.*?)</span>',
             data, re.S)
         if vid:
             for (url, title) in vid:
                 self.filmliste.append((decodeHtml(title), url, False))
         else:
             streams = re.findall('(http[s]?://(.*?)\/.*?)[\'|"|\&|<]',
                                  data, re.S)
             if streams:
                 for (stream, hostername) in streams:
                     check = isSupportedHoster(hostername)
                     if check:
                         self.filmliste.append((check, stream, True))
     self.keyLocked = False
     self.ml.setList(map(self._defaultlistcenter, self.filmliste))
Example #39
0
 def loadPageData(self, data):
     parse = re.search('class="post-header">(.*?)Recommends:</strong>',
                       data, re.S)
     streams = re.findall(
         '(http[s]?://(?!adultbay.org)(.*?)\/.*?)[\'|"|\&|<]',
         parse.group(1), re.S)
     if streams:
         for (stream, hostername) in streams:
             if isSupportedHoster(hostername, True):
                 hostername = hostername.replace('www.', '')
                 quality = re.search(
                     '(360|480|720|1080)[p]?[_\d+]?.*?\.mp4', stream)
                 if quality:
                     hostername = hostername + " (" + quality.group(
                         1) + "p)"
                 self.filmliste.append((hostername, stream))
         # remove duplicates
         self.filmliste = list(set(self.filmliste))
     if len(self.filmliste) == 0:
         self.filmliste.append((_('No supported streams found!'), None))
     self.ml.setList(map(self._defaultlisthoster, self.filmliste))
     self.keyLocked = False
    def mh_setGenreStrTitle(self):
        try:
            genreName = self['liste'].getCurrent()[0][0]
            genreLink = self['liste'].getCurrent()[0][1]
            if self.mh_menuLevel in range(self.mh_menuMaxLevel + 1):
                if self.mh_menuLevel == 0:
                    self.mh_genreName[self.mh_menuLevel] = genreName
                else:
                    self.mh_genreName[self.mh_menuLevel] = ':' + genreName

                self.mh_genreUrl[self.mh_menuLevel] = genreLink

            if self.mh_menuLevel == 1:
                contenttitle = "%s" % (self.mh_genreName[0])
            elif self.mh_menuLevel == 2:
                contenttitle = "%s%s" % (self.mh_genreName[0],
                                         self.mh_genreName[1])
            else:
                if self.contenttitle == "%%EMPTY%%":
                    self.contenttitle = self['ContentTitle'].text
                else:
                    contenttitle = ""
            if self.contenttitle != "%%EMPTY%%" and self.mh_menuLevel == 0:
                self['ContentTitle'].setText(self.contenttitle)
            else:
                self['ContentTitle'].setText(contenttitle)
            self.mh_genreTitle = "%s%s%s" % (self.mh_genreName[0],
                                             self.mh_genreName[1],
                                             self.mh_genreName[2])
            if self.mh_genreTitle != (400 * "—"):
                self['name'].setText(
                    _("Selection:") + " " + self.mh_genreTitle)
            else:
                self['name'].setText("")

            for f, args in self.mh_On_setGenreStrTitle:
                f(*args)
        except:
            pass
Example #41
0
	def keyOK(self):
		if self.keyLocked:
			return
		genreName = self['liste'].getCurrent()[0][0]
		genreFlag = self['liste'].getCurrent()[0][1]
		streamPic = self['liste'].getCurrent()[0][2]
		if genreFlag == "1": # Suche
			self.session.openWithCallback(self.searchCallback, VirtualKeyBoardExt, title = (_("Enter search criteria")), text = self.suchString, is_dialog=True)
		elif genreFlag == "6":	# ZDF
			streamLink = "%s/suche?q=&from=&to=&sender=ZDF&attrs=&contentTypes=episode" % BASE_URL
			self.session.open(ZDFStreamScreen,streamLink,genreName,genreFlag,streamPic)
		elif genreFlag == "7":	# ZDFneo
			streamLink = "%s/suche?q=&from=&to=&sender=ZDFneo&attrs=&contentTypes=episode" % BASE_URL
			self.session.open(ZDFStreamScreen,streamLink,genreName,genreFlag,streamPic)
		elif genreFlag == "8":	# ZDFinfo
			streamLink = "%s/suche?q=&from=&to=&sender=ZDFinfo&attrs=&contentTypes=episode" % BASE_URL
			self.session.open(ZDFStreamScreen,streamLink,genreName,genreFlag,streamPic)
		elif genreFlag == "9":	# ZDFtivi
			streamLink = "%s/suche?q=&from=&to=&sender=ZDFtivi&attrs=&contentTypes=episode" % BASE_URL
			self.session.open(ZDFStreamScreen,streamLink,genreName,genreFlag,streamPic)
		else:
			self.session.open(ZDFPreSelect,genreName,genreFlag)
Example #42
0
	def loadPageData(self, data):
		pre1 = re.findall('id="livegames" class="livegame-table">(.*?)class="pagination live-pagnation">', data, re.S)
		pre2 = re.findall('id="upcoming-games" class="livegame-table">(.*?)class="pagination upcoming-pagnation">', data, re.S)
		if pre1:
			info = re.findall('class="table-link".*?tableLink\(\'(.*?)\'.*?class="date-filter">(.*?)</.*?class="teams">(.*?)</.*?class="division">(.*?)</', pre1[0], re.S)
			if info:
				for (url, date, teams, season) in info:
					match = "%s: %s, %s" % (season.strip(), date.strip(), stripAllTags(teams).strip())
					url = 'https://www.sporttotal.tv' + url
					self.genreliste.append((decodeHtml(match), url))
		if pre2:
			info = re.findall('class="table-link".*?tableLink\(\'(.*?)\'.*?class="date-filter">(.*?)</.*?class="teams">(.*?)</.*?class="division">(.*?)</', pre2[0], re.S)
			if info:
				for (url, date, teams, season) in info:
					match = "%s: %s, %s" % (season.strip(), date.strip(), stripAllTags(teams).strip())
					url = 'https://www.sporttotal.tv' + url
					self.genreliste.append((decodeHtml(match), url))
		if not pre1 and not pre2:
			self.genreliste.append((_("Currently no streams available"), None))
		self.ml.setList(map(self._defaultlistleft, self.genreliste))
		self.keyLocked = False
		self.showInfos()
Example #43
0
def cloudyvideos(self, data, url):
    dataPost = {}
    r = re.findall('input type="hidden".*?name="(.*?)".*?value="(.*?)"', data,
                   re.S)
    if r:
        for name, value in r:
            dataPost[name] = value
        reactor.callLater(
            3,
            self.cloudyvideosGetPage,
            url,
            timeout=timeouttime,
            method='POST',
            cookies=ck,
            postdata=urlencode(dataPost),
            headers={'Content-Type': 'application/x-www-form-urlencoded'})
        message = self.session.open(MessageBoxExt,
                                    _("Stream starts in 3 sec."),
                                    MessageBoxExt.TYPE_INFO,
                                    timeout=3)
    else:
        self.stream_not_found()
Example #44
0
	def __init__(self, session, Name, Linkliste):
		self.Linkliste = Linkliste
		self.Name = Name
		MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)

		self["actions"] = ActionMap(["MP_Actions"], {
			"0"		: self.closeAll,
			"ok"	: self.keyOK,
			"cancel": self.keyCancel,
			"up" : self.keyUp,
			"down" : self.keyDown,
		}, -1)

		self['title'] = Label("ATV Mediathek")
		self['ContentTitle'] = Label("Genre: %s" % self.Name)
		self['name'] = Label(_("Please wait..."))

		self.keyLocked = True
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml

		self.onLayoutFinish.append(self.parseData)
    def __init__(self, session):
        MPScreen.__init__(self, session, skin='MP_PluginDescr')

        self["actions"] = ActionMap(["MP_Actions"], {
            "ok": self.keyOK,
            "0": self.closeAll,
            "cancel": self.keyCancel
        }, -1)

        self['title'] = Label("E2WORLD")
        self['ContentTitle'] = Label(_("Selection:"))

        self.keyLocked = True
        self.suchString = ''

        self.genreliste = []
        self.ml = MenuList([],
                           enableWrapAround=True,
                           content=eListboxPythonMultiContent)
        self['liste'] = self.ml

        self.onLayoutFinish.append(self.layoutFinished)
Example #46
0
	def __init__(self, session, stream_name, url, cover):
		self.stream_name = stream_name
		self.url = url
		self.cover = cover
		MPScreen.__init__(self, session, skin='MP_Plugin', default_cover=default_cover)

		self["actions"] = ActionMap(["MP_Actions"], {
			"0": self.closeAll,
			"ok" : self.keyOK,
			"cancel": self.keyCancel
		}, -1)

		self['title'] = Label("FilmPalast.to")
		self['ContentTitle'] = Label(_("Stream Selection"))
		self['name'] = Label(self.stream_name)

		self.streamList = []
		self.ml = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		self['liste'] = self.ml

		self.keyLocked = True
		self.onLayoutFinish.append(self.loadPage)
Example #47
0
    def __init__(self, session, Link, Name, portal, baseurl):
        self.Link = Link
        self.Name = Name
        self.portal = portal
        self.baseurl = baseurl
        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,
                "nextBouquet": self.keyPageUp,
                "prevBouquet": self.keyPageDown,
                "green": self.keyPageNumber
            }, -1)

        self['title'] = Label(self.portal)
        self['ContentTitle'] = Label("Genre: %s" % self.Name)
        self['F2'] = 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)
Example #48
0
 def loadPage(self):
     self.keyLocked = True
     self['name'].setText(_('Please wait...'))
     self.filmliste = []
     if re.match(".*Search", self.Name):
         if self.sortname != 'Most Relevant' and self.sortname != 'Newest':
             age = '$$AGE$$'
         else:
             age = ''
         url = "https://www.p**n.com/videos/search?q=%s&p=%s&o=%s%s" % (
             self.Link, str(self.page), self.sort, 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)
Example #49
0
    def __init__(self, session):

        MPScreen.__init__(self, session, skin='MP_PluginDescr')

        self["actions"] = ActionMap(["MP_Actions"], {
            "ok": self.keyOK,
            "0": self.closeAll,
            "cancel": self.keyCancel
        }, -1)

        self['title'] = Label("Pokerstars.tv")
        self['ContentTitle'] = Label("Genre:")
        self['name'] = Label(_("Please wait..."))
        self.keyLocked = True

        self.genreliste = []
        self.ml = MenuList([],
                           enableWrapAround=True,
                           content=eListboxPythonMultiContent)
        self['liste'] = self.ml

        self.onLayoutFinish.append(self.loadPage)
Example #50
0
    def __init__(self, session, name, method, param):
        self.Name = name
        self.method = method
        self.param = param

        MPScreen.__init__(self,
                          session,
                          skin='MP_Plugin',
                          default_cover=default_cover)

        self["actions"] = ActionMap(
            ["MP_Actions"], {
                "0": self.closeAll,
                "ok": self.keyOK,
                "cancel": self.keyCancel,
                "up": self.keyUp,
                "down": self.keyDown,
                "right": self.keyRight,
                "left": self.keyLeft,
                "nextBouquet": self.keyPageUp,
                "prevBouquet": self.keyPageDown
            }, -1)

        self['title'] = Label("SPIEGEL.TV")
        self['ContentTitle'] = Label("Auswahl: %s" % self.Name)
        self['name'] = Label(_("Selection:"))

        self.keyLocked = True

        self.filmliste = []
        self.ml = MenuList([],
                           enableWrapAround=True,
                           content=eListboxPythonMultiContent)
        self['liste'] = self.ml

        self.page = 1
        self.lastpage = 1

        self.onLayoutFinish.append(self.loadPage)
Example #51
0
 def loadPageData(self, data):
     self.dokusListe = []
     data = data.replace('\n', '')
     data = re.search('id="infinite-articles"(.*?)$', data, re.S).group(1)
     dokus = re.findall(
         '<img.*?src="(.*?)".*?class="content-grid".*?href="(.*?)">.*?="entry-title">(.*?)</',
         data)
     if dokus:
         m = re.findall('class=\Dpage larger.*?>(\d+)<', data)
         try:
             lastpage = int(m[-1])
         except:
             lastpage = 1
         if lastpage > self.lastpage:
             self.lastpage = lastpage
         if not self.page:
             self.page = 1
         self['page'].setText("%d / %d" % (self.page, self.lastpage))
         for (img, url, name) in dokus:
             self.dokusListe.append((decodeHtml(name), url, img))
         self.ml.setList(map(self._defaultlistleft, self.dokusListe))
         self.ml.moveToIndex(0)
         self.th_ThumbsQuery(self.dokusListe,
                             0,
                             1,
                             2,
                             None,
                             None,
                             self.page,
                             self.lastpage,
                             mode=1)
         self.loadPicQueued()
     else:
         self.dokusListe.append((_("No dokus found!"), "", "", ""))
         self.ml.setList(map(self._defaultlistleft, self.dokusListe))
         if self.filmQ.empty():
             self.eventL.clear()
         else:
             self.loadPageQueued()
Example #52
0
    def loadPage(self):
        self.genreliste = [
            (_('Local Stations'), self.url +
             "/info/account/getmostwantedbroadcastlists?sizeoflists=100",
             'localBroadcasts'),
            (_('Top Stations'), self.url +
             "/info/account/getmostwantedbroadcastlists?sizeoflists=100",
             'topBroadcasts'),
            (_('All Stations'),
             self.url + "/info/menu/broadcastsofcategory?category=_", ''),
            (_('Genre'),
             self.url + "/info/menu/valuesofcategory?category=_genre", ''),
            (_('Topic'),
             self.url + "/info/menu/valuesofcategory?category=_topic", ''),
            (_('Country'),
             self.url + "/info/menu/valuesofcategory?category=_country", ''),
            (_('City'),
             self.url + "/info/menu/valuesofcategory?category=_city", ''),
            (_('Language'),
             self.url + "/info/menu/valuesofcategory?category=_language", '')
        ]

        self.ml.setList(map(self._defaultlistcenter, self.genreliste))
        self.keyLocked = False
Example #53
0
    def __init__(self, session, selectionLink, searchData):
        self.selectionLink = selectionLink
        self.searchData = searchData
        MPScreen.__init__(self,
                          session,
                          skin='MP_Plugin',
                          default_cover=default_cover)
        ThumbsHelper.__init__(self)

        self["actions"] = ActionMap(
            ["MP_Actions"], {
                "ok": self.keyOK,
                "0": self.closeAll,
                "cancel": self.keyCancel,
                "5": self.keyShowThumb,
                "up": self.keyUp,
                "down": self.keyDown,
                "left": self.keyLeft,
                "right": self.keyRight,
                "nextBouquet": self.keyPageUp,
                "prevBouquet": self.keyPageDown
            }, -1)

        self.page = 1
        self.lastpage = 999
        self.keyLocked = True
        self['title'] = Label("4Players")

        self['Page'] = Label(_("Page:"))
        self['page'] = Label("1")
        self.juengstTS = ''
        self.videosListe = []
        self.videosQueue = []
        self.ml = MenuList([],
                           enableWrapAround=True,
                           content=eListboxPythonMultiContent)
        self['liste'] = self.ml
        self.onLayoutFinish.append(self.loadVideos)
Example #54
0
    def __init__(self, session, genreName, genreFlag, prePic, streamLink,
                 anzahl):
        self.keyLocked = True
        self.gN = genreName
        self.gN = self.gN.split("(")
        if len(self.gN) == 3 or len(self.gN) == 2:
            self.gN = self.gN[0] + "(" + self.gN[1]
        else:
            self.gN = self.gN[0]
        self.gF = genreFlag
        self.pP = prePic
        self.anzahl = anzahl
        self.streamLink = streamLink
        MPScreen.__init__(self, session, skin='MP_PluginDescr')
        ThumbsHelper.__init__(self)

        self["actions"] = ActionMap(
            ["MP_Actions"], {
                "0": self.closeAll,
                "ok": self.keyOK,
                "cancel": self.keyCancel,
                "5": self.keyShowThumb,
                "up": self.keyUp,
                "down": self.keyDown,
                "right": self.keyRight,
                "left": self.keyLeft
            }, -1)

        self['title'] = Label("ZDF Mediathek")
        self['ContentTitle'] = Label("Sendung")
        self['name'] = Label(_("Please wait..."))

        self.genreliste = []
        self.ml = MenuList([],
                           enableWrapAround=True,
                           content=eListboxPythonMultiContent)
        self['liste'] = self.ml
        self.onLayoutFinish.append(self.loadPage)
Example #55
0
 def loadPageData(self, data):
     self.dokusListe = []
     dokus = re.findall(
         '<div class="tbl_titel"><a href="(.*?)" title="(.*?)".*?<img src="(.*?)".*?class="vid_desc">(.*?)</td>',
         data, re.S)
     if dokus:
         if not self.pages:
             m = re.search("class='pages'>Seite 1 von (\d+)<", data)
             try:
                 pages = int(m.group(1))
             except:
                 pages = 1
             if pages > self.pages:
                 self.pages = pages
         if not self.page:
             self.page = 1
         self['page'].setText("%d / %d" % (self.page, self.pages))
         for (url, name, img, desc) in dokus:
             self.dokusListe.append(
                 (decodeHtml(name), url, img, decodeHtml(desc.strip())))
         self.ml.setList(map(self._defaultlistleft, self.dokusListe))
         self.th_ThumbsQuery(self.dokusListe,
                             0,
                             1,
                             2,
                             None,
                             None,
                             self.page,
                             self.pages,
                             mode=1)
         self.loadPicQueued()
     else:
         self.dokusListe.append((_("No dokus found!"), "", "", ""))
         self.ml.setList(map(self._defaultlistleft, self.dokusListe))
         if self.filmQ.empty():
             self.eventL.clear()
         else:
             self.loadPageQueued()
Example #56
0
    def loadPageData(self, data):
        self.dokusListe = []
        for m in re.finditer('<article id=(.*?)</article>', data, re.S):
            if re.search('Status:.*?alt="Offline"', m.group(1)): continue
            m2 = re.search(
                '="entry-thumb">.*?href="(.*?)"\stitle="(.*?)".*?<img.*?src="(.*?)".*?<p>\s*(.*?)\s*</p>',
                m.group(1), re.S)
            if m2:
                url, nm, img, desc = m2.groups()
                self.dokusListe.append(
                    (decodeHtml(nm), url, img, decodeHtml(desc)))

        self.pageplus = '+' if re.search(
            'class="fa fa-long-arrow-left"></i>&nbsp;<a href="',
            data) != None and self.page >= self.pages else ''
        if self.dokusListe:
            if not self.page:
                self.page = 1
            if self.page > self.pages: self.pages = self.page
            self['page'].setText("%d / %d%s" %
                                 (self.page, self.pages, self.pageplus))

            self.ml.setList(map(self._defaultlistleft, self.dokusListe))
            self['liste'].moveToIndex(0)
            self.th_ThumbsQuery(self.dokusListe, 0, 1, 2, None, None,
                                self.page, self.pages)
            self.loadPicQueued()
        else:
            if self.page:
                self['page'].setText("%d / %d%s" %
                                     (self.page, self.pages, self.pageplus))
            self.dokusListe.append((_("No playable dokus found!"), "", "", ""))
            self.ml.setList(map(self._defaultlistleft, self.dokusListe))
            self['liste'].moveToIndex(0)
            if self.filmQ.empty():
                self.eventL.clear()
            else:
                self.loadPageQueued()
Example #57
0
 def loadPageData(self, data):
     self.ml.moveToIndex(0)
     self.getLastPage(data, 'class="paging">(.*?)</ul>')
     preparse = re.search('id="room_list"(.*?)class="banner">', data, re.S)
     Movies = re.findall(
         '<li class="room_list_room.*?>.<a\shref="(.*?)".*?<img\ssrc=".*?".*?gender(\w)">(\d+)</span>.*?<li\stitle(?:="(.*?)"|)>.*?location.*?>(.*?)</li>.*?class="cams">(.*?)</li>.*?</div>.*?</li>',
         preparse.group(1), re.S)
     if Movies:
         for (Url, Gender, Age, Description, Location, Viewers) in Movies:
             if not Description:
                 Description = ""
             Title = Url.strip('\/')
             Image = "https://cbjpeg.stream.highwebmedia.com/stream?room=" + Url.strip(
                 '\/') + "&f=" + str(random.random())
             self.filmliste.append(
                 (Title, Url, Image, decodeHtml(Description), Gender, Age,
                  decodeHtml(Location), Viewers))
     if len(self.filmliste):
         self.th_ThumbsQuery(self.filmliste,
                             0,
                             1,
                             2,
                             None,
                             None,
                             self.page,
                             self.lastpage,
                             mode=1)
         self.ml.setList(map(self._defaultlistleft, self.filmliste))
         self.loadPicQueued()
     else:
         self.filmliste.append((_('No livestreams found!'), None, None,
                                None, None, None, None, None))
         self.ml.setList(map(self._defaultlistleft, self.filmliste))
         if self.filmQ.empty():
             self.eventL.clear()
         else:
             self.loadPageQueued()
     self.keyLocked = False
    def __init__(self, session, Name, Url):
        self.Name = Name
        self.Url = Url
        MPScreen.__init__(self,
                          session,
                          skin='MP_PluginDescr',
                          default_cover=default_cover)
        ThumbsHelper.__init__(self)

        self["actions"] = ActionMap(
            ["MP_Actions"], {
                "0": self.closeAll,
                "ok": self.keyOK,
                "cancel": self.keyCancel,
                "5": self.keyShowThumb,
                "up": self.keyUp,
                "down": self.keyDown,
                "right": self.keyRight,
                "left": self.keyLeft,
                "nextBouquet": self.keyPageUp,
                "prevBouquet": self.keyPageDown
            }, -1)

        self.keyLocked = True
        self['title'] = Label("Watchbox")
        self['ContentTitle'] = Label("Filme:")
        self['Page'] = Label(_("Page:"))

        self.page = 0
        self.lastpage = 999

        self.folgenliste = []
        self.ml = MenuList([],
                           enableWrapAround=True,
                           content=eListboxPythonMultiContent)
        self['liste'] = self.ml

        self.onLayoutFinish.append(self.loadPage)
    def parseEvents(self, data):
        try:
            events = json.loads(data)
            if events.has_key('events'):
                for event in events['events']:
                    title = event.get('title').encode('utf-8')
                    url = event.get('url').encode('utf-8')
                    image_url = event.get('poster_url').encode('utf-8')
                    description = ""
                    if event.get('subtitle') != None:
                        description += event.get('subtitle').encode(
                            'utf-8') + "\n"
                    description += str(int(
                        event.get('duration') / 60)) + ' min'
                    description += ", Veröffentlichung: " + event.get(
                        'release_date').encode('utf-8')
                    description += ", " + str(
                        event.get('view_count')) + " Abrufe\n"
                    if event.get('description') != None:
                        description += decodeHtml(
                            stripAllTags(
                                event.get('description').encode('utf-8')))
                    self.filmliste.append(
                        (title.strip(), url,
                         self.watchdb.hasBeenWatched(
                             event.get('guid').encode('utf-8')), False,
                         image_url, description))
        except:
            pass

        if len(self.filmliste) == 0:
            self.filmliste.append((_('No events found!'), '', ''))

        self.filmliste.sort(key=lambda t: t[0].lower())

        self.ml.setList(map(self._defaultlistleftmarked, self.filmliste))
        self.keyLocked = False
        self.showInfos()
Example #60
0
    def __init__(self, session, genre, url):
        self.genre = genre
        self.url = url
        MPScreen.__init__(self,
                          session,
                          skin='MP_Plugin',
                          default_cover=default_cover)
        ThumbsHelper.__init__(self)

        self["actions"] = ActionMap(
            ["MP_Actions"], {
                "0": self.closeAll,
                "5": self.keyShowThumb,
                "ok": self.keyOK,
                "cancel": self.keyCancel,
                "up": self.keyUp,
                "down": self.keyDown,
                "right": self.keyRight,
                "left": self.keyLeft,
                "nextBouquet": self.keyPageUp,
                "prevBouquet": self.keyPageDown
            }, -1)

        self['title'] = Label("FilmPalast.to")
        self['ContentTitle'] = Label("%s" % self.genre)

        self['Page'] = Label(_("Page:"))

        self.page = 1
        self.lastpage = 1
        self.streamList = []
        self.ml = MenuList([],
                           enableWrapAround=True,
                           content=eListboxPythonMultiContent)
        self['liste'] = self.ml

        self.keyLocked = True
        self.onLayoutFinish.append(self.loadPage)