Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
Ch-_c@sçddlmZddlmZmZmZmZmZddl	m
Z
mZmZm
Z
ddlZddlZddlZyddlZWnek
r­ddlZnXd„Zdefd„ƒYZdefd	„ƒYZdS(
iÿÿÿÿ(tTranslateTXT(t	CHostBasetCBaseHostClasstCDisplayListItemtRetHosttCUrlItem(tprintDBGtprintExct
GetLogoDirtbyteifyNcCsdS(Nshttp://ustream.tv/((((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytgettytulst	UstreamTVcBs`eZdZedZdZidd6edƒd6ed6dd	6id
d6dd
6dd6d6idd6edƒd6ed6id6idd6edƒd6ed6ed6idd6edƒd6ed6gZd„Zd„Z	d„Z
d„Zdd„Zd„Z
d„Zd „Zd!„Zd"„Zd#„Zd$„Zd%„Zd&„Zd'd
d
d(„ZRS()shttps://www.ustream.tv/s	search?q=s^http://occopwatch-com.secure40.ezhostingserver.com/wp-content/uploads/2013/10/ustream-logo.jpgtitemstcategorytPopularttitleticontalltcat_idttsubCategorys
no-offlinettypetanywheretlocationtfilterst
categoriest
CategoriestsearchtSearchtsearch_itemtsearch_historysSearch historycCs+tj|idd6dd6ƒi|_dS(NRthistorysUstreamTV.cookietcookie(Rt__init__tcacheFilters(tself((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pyR!#scCs`|j}dt|ƒkr8|jdƒr8||}n|jdƒs\|jddƒ}n|S(Nithttpshttps://shttp://(tMAIN_URLtlent
startswithtreplace(R#turltmainUrl((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pyt_getFullUrl's	"
cCstdƒi|_|jj|ƒ\}}|s5dS|jjj|ddtƒ}x¾|D]¶}|jjj|dƒd}d|kr§|jjj|dƒd}ntj	dƒj
|ƒ}g|j|<xA|D]9}|j|ji|j|d	ƒd
6|dd6ƒqÓWqZWdS(NsUstreamTV.fillFilterss<div class="control-select">s	</select>sview-data-key="([^"]+?)"iRsname="([^"]+?)"s0<option value="([^"]*?)"[^>]*?>([^<]+?)</option>iRtvalue(
RR"tcmtgetPagetphtgetAllItemsBeetwenMarkerstFalsetgetSearchGroupstretcompiletfindalltappendtcleanHtmlStr(R#R)tststdatat
filtersTabt
filterDatat
filterNametitem((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytfillFilters/s
	


cCs§i|_|jikr7|j|ƒ}|j|ƒn|jj|gƒ}xT|D]L}tj|ƒ}||d<|d|d<|d|d|<|j|ƒqSWdS(NR
RR,R(R"tbuildUrlR>tgettcopytdeepcopytaddDir(R#tcItemR<R
R)ttabR=tparams((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytlistFilters?s	

tdircCsktdƒxZ|D]R}t|ƒ}|j|ƒd|d<|dkrV|j|ƒq|j|ƒqWdS(NsUstreamTV.listsTabR
tnameRH(RtdicttupdateRCtaddVideo(R#RERDRR=RF((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytlistsTabMs



cCsFd|kr|j|dS|d}|jd|}|jddƒS(NtqRsexplore/%s/alls/all/alls/all(tSRCH_URLR%R((R#RDRR)((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pyR?Ws

cCsÈd|kr,|d}|jd}d}n|d}|jd}d}|jdiƒ}|jdd	ƒ}|||j|d
ƒ|jdd
ƒ|jdd
ƒf}|d	krÄ|d
|7}n|S(NRNs5ajax/search.json?q=%s&category=%s&type=%s&location=%sR
RsGajax-alwayscache/explore/%s/all.json?subCategory=%s&type=%s&location=%sRRtpageiRRRs&page=%s(R%R@(R#RDRR)t
catFilterNameRRP((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytbuildJsonUrl^s

	

:cCsätdƒ|jj|jdƒ\}}|s3dS|jjj|ddtƒd}tjdƒj	|ƒ}xp|D]h}|ddkrqtnt
|ƒ}|ji|d	6|j|dƒd
6|dd6ƒ|j
|ƒqtWdS(NsUstreamTV.listCategoriessexplore/alls-<div class="submenu-column half-width-links">s<formis1<a href="[^"]*?/explore/([^"]+?)"[^>]*?>([^<]+?)<iRR
RR(RR-R.R%R/tgetDataBeetwenMarkersR1R3R4R5RJRKR7RC(R#RDR
R8R9R=RF((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytlistCategoriesns
"
3cCs-tdƒ|j|ƒ}|j||ƒdS(NsUstreamTV.listItems(RRRt	listItems(R#RDR)((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytlistRegular{s
cCsÊtdƒ|jj|ƒ\}}|s,dSt}y&ttj|ƒƒ}|dsXdS|dd}|d}|jdƒ}|d=xÎ|D]Æ}t|ƒ}|jj	j
|dƒd}|jj	j
|d	ƒd}|jj	j
|d
ƒd}	|j|ƒ}
|ji|j|ƒd6|j
|	ƒd6|
d
6|j
|ƒd6ƒ|j|ƒqWWntk
rrtƒnX|rÆt|ƒ}|jitdƒd6|jddƒdd6ƒ|j|ƒndS(NsUstreamTV.listItemstsuccesstpageMetatinfinitetpageContents<div class="item media-item">ishref="([^"]+?)"stitle="([^"]+?)"ssrc="([^"]+?)"RRtdescR)s	Next pageRPi(RR-R.R1R	tjsontloadstsplitRJR/R2R7RKR+RLt	ExceptionRt_R@RC(R#RDR)R8R9tnextPageR=RFRRR[((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pyRU€s6



D
1cCsOtj|ƒ}t|ƒ}tj|ƒ|d<i|d<|j|ddƒdS(NRNRR
tfilter_type(turllibt
quote_plusRJRG(R#RDt
searchPatternt
searchType((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytlistSearchResults

cCsVtd|ƒg}|jj|dƒ}x%|D]}d|d<|j|ƒq1W|S(NsUstreamTV.getLinksForVideo [%s]R)itneed_resolve(RtuptgetVideoLinkExtR6(R#RDturlTabttmpR=((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytgetLinksForVideo¤s

cCs|dS(NR)((R#RD((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytgetFavouriteData­scCs|ji|d6ƒS(NR)(Rm(R#tfav_data((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytgetLinksForFavourite°sicCsãtdƒtj|||||ƒ|jjddƒ}|jjddƒ}td||fƒg|_|dkr“|j|jidd6ƒn9|dkrµ|j	|jdƒn|dkrÚ|j
|jdd	ƒnò|d	krÿ|j
|jd
dƒnÍ|dkr$|j
|jdd
ƒn¨|d
krC|j|jƒn‰|dkrt|jƒ}|j
itd6dd6ƒ|j|||ƒn=|dkrÅ|jidd6dd6dtdƒƒntƒtj|||ƒdS(NshandleService startRIRR
sKhandleService: |||||||||||||||||||||||||||||||||||| name[%s], category[%s] Rtfilter_subCategoryRRbRtfilter_locationRRRtsearch_next_pageRRRR[sType: (ssearchRs(RRt
handleServicetcurrItemR@tcurrListtNoneRMtMAIN_CAT_TABRTRGRVRJRKR1RgtlistsHistoryR`RtendHandleService(R#tindextrefreshReRfRIR
RD((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pyRt³s4
	*(t__name__t
__module__R%ROtDEFAULT_ICON_URLR`tTrueRxR!R+R>RGRMR?RRRTRVRURgRmRnRpRt(((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pyRs,
A%%$				
			
							tIPTVHostcBsDeZd„Zd„Zddd„Zd„Zd„Zd„ZRS(cCs)tj|tƒttjtjgƒdS(N(RR!RR€Rt
TYPE_VIDEOt
TYPE_AUDIO(R#((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pyR!ÚscCsttjdtdƒgƒS(NR,sustreamtvlogo.png(RtOKR(R#((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytgetLogoPathÝsicCs“tj}g}|j|ƒs.t|d|ƒS|jj|jj|ƒ}x3|D]+}|jt|d|d|dƒƒqQWttjd|ƒS(NR,RIR)Rh(	RtERRORtisValidIndexthostRmRvR6RR„(R#tIndextselItemtretCodetretlistturlListR=((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pyRmàs	
)cCsqg}g}g}tj}d}d|dkra|jdtƒrUtj}|}qµtj}nT|ddkr}tj}n8d|dkr™tj}nd|dkrµtj	}n|tj	tjgkr
|jddƒ}d|kr
|j
td	|d
ƒƒq
n|jddƒ}|jddƒ}	|jd
dƒ}
td|d|	d|d|dd
d|
d|ƒS(NR
RRtvideotmoretaudioR)RtLinkiRR[RRItdescriptionturlItemsturlSeparateRequestt	iconimagetpossibleTypesOfSearch(RtTYPE_UNKNOWNRwR@R1tTYPE_SEARCHt
TYPE_CATEGORYR‚t	TYPE_MORERƒR6R(R#RDthostListtsearchTypesOptionst	hostLinksRR–R)RR’R((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pyt
converItemìs<			cCskyH|jjƒ}x2tt|ƒƒD]}||ddkr%|Sq%WWntk
rftdƒdSXdS(NR
RsgetSearchItemInx EXCEPTIONiÿÿÿÿ(RˆtgetCurrListtrangeR&R_R(R#tlistti((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytgetSearchItemInxs

cCs«yw|jjƒ}d||jdkrv||jd}||jd}|jjj||ƒ||_||_nWn-tk
r¦tdƒd|_d|_nXdS(NRRIRtsearch_typessetSearchPattern EXCEPTIONR(	RˆRŸt	currIndexRtaddHistoryItemReRfR_R(R#R¡tpatternR¤((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pytsetSearchPatterns	

	
N(	R}R~R!R…RwRmRžR£R¨(((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pyRØs			'	
(t7Plugins.Extensions.IPTVPlayer.components.iptvplayerinitRR`t.Plugins.Extensions.IPTVPlayer.components.ihostRRRRRt-Plugins.Extensions.IPTVPlayer.tools.iptvtoolsRRRR	RAR3RcR\R_t
simplejsonR
RR(((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostustreamtv.pyt<module>s("
	À