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ÃddlmZddlmZmZddlmZmZm	Z	ddl
Z
ddlZyddlZWne
k
r‰ddlZnXd„Zdefd„ƒYZdefd	„ƒYZdS(
iÿÿÿÿ(tTranslateTXT(t	CHostBasetCBaseHostClass(tprintDBGtprintExctbyteifyNcCsdS(Nshttps://trailers.apple.com/((((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pytgettytulst
TrailersApplecBs†eZd„Zdd„Zidd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd	„Zd
„Z
dddd
„ZRS(cCs=tj|idd6dd6ƒd|_d|_i|_dS(NRthistorysTrailersApple.cookietcookieshttps://trailers.apple.com/s@http://www.userlogos.org/files/logos/mafi0z/apple%20trailers.png(Rt__init__tMAIN_URLtDEFAULT_ICON_URLt
cacheLinks(tself((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pyR
s		cCstj||jddƒ|ƒS(Ns&t&(Rt
getFullUrltreplace(RturltbaseUrl((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pyRscCs|jj|||ƒS(N(tcmtgetPage(RRt	addParamst	post_data((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pyR!sc	Csþtdƒidd6dd6|jdƒd6idd6dd6|jd	ƒd6idd6d
d6|jdƒd6idd6dd6|jd
ƒd6idd6dd6|jdƒd6idd6tdƒd6td6idd6tdƒd6g}|j||ƒdS(NsTrailersApple.listMaint
list_itemstcategorys
Just Addedttitles$/trailers/home/feeds/just_added.jsonRt	Exclusives#/trailers/home/feeds/exclusive.jsonsJust HDs!/trailers/home/feeds/just_hd.jsonsMost Populars"/trailers/home/feeds/most_pop.jsons
Movie Studioss!/trailers/home/feeds/studios.jsontsearchtSearchtsearch_itemtsearch_historysSearch history(RRt_tTruetlistsTab(RtcItemtMAIN_CAT_TAB((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pytlistMain$s
!!!!!cCstdƒt|dƒyÐ|d}|j|jjj|ddƒdƒ}|dkr¥t|ƒ}|jitd6|d6td	ƒd
6|d6ƒ|j	|ƒnx?|dD]3}|j
|dƒ}|j|jjj|ddƒdƒ}d|kr^|dkrã|dkrãt|ƒ}|jitd6|d6|d
6|d6ƒ|j	|ƒqãq°t|dƒd
kr°|dkr°|d|ddd<t|ƒ}|jitd6|ddd6|d
6|d6ƒ|j	|ƒq°q°WWntk
rt
ƒnXdS(NsTrailersApple.listCatItemstc_treetdatshref=['"]([^'^"]+?)['"]ittgood_for_favRs--All--RRtlisti(RRRtphtgetSearchGroupstdicttupdatetFalseR taddDirtcleanHtmlStrtlent	ExceptionR(RR#tnextCategorytcTreeRtparamstitemR((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pytlistCatItems0s0

)/))"1
cCstdƒ|d|_dS(NsTrailersApple.listSubItemst	sub_items(RtcurrList(RR#((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pytlistSubItemsKs
c
Cs[td|ƒ|j|dƒ\}}|s1dS|j|jjdƒyôttj|ƒƒ}d|kry|d}nx¿|D]·}t|ƒt|dƒdkr¬q€n|j	|dƒ}|j
|dƒ}|j|dƒ}g}	d	|kr|	j|d	d
 ƒnxØt
dƒdft
d
ƒdft
dƒdft
dƒdft
dƒdft
dƒdfgD]v}
|
d|krŒqpnt||
dtƒr½dj||
dƒ}n||
d}|	jd|
d|fƒqpWitd6dd6|d6|d6|d6|d6dj|	ƒd6}|j|ƒq€WWntk
rVtƒnXdS( NsTrailersApple.listItems [%s]RtresultsttrailersiRtlocationtpostertreleasedateisStudio:tstudios	Director:tdirectors
Directors:t	directorssGenres:tgenressGenre:tgenresActors:tactorsis, s%s %sR)Rtnameticons[/br]tdesc(RRt
setMainUrlRtmetaRtjsontloadsR2R1RtgetFullIconUrltappendR t
isinstanceR*tjoinR!R0R3R(
RR#R4tststdataR7RRRHRItittvalueR6((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pyt	listItemsOs<


g@
c
Cs‡tdƒi|_|j|dƒ\}}|s6dS|jjd}|j|ƒ|jjj|dƒd}|j|jd|ƒƒ\}}|s›dSyÍt	t
j|ƒƒ}d}x«|dD]Ÿ}|d}|d}	|j|d	ƒ}
g}xå|j
d
iƒjƒD]Ë\}}
x¼|
j
diƒjƒD]¢\}}|j
dƒ}|s\q5n|jid
||fd6|jtjdd|ƒƒd6t|j
dƒƒd6t|j
dƒƒd6|d d6dd6ƒq5WqW|d7}|ddt|ƒ}||j|<t|ƒ}|jitd6|d6|dd|d6|
d6|	d6ƒ|j|ƒqÄWWntk
r‚tƒnXdS(NsTrailersApple.exploreItemRsFilmId\s*=\s*['"](\d+)['"]is/trailers/feeds/data/%s.jsontclipsRtruntimetthumbtversionstsizestsrcs%s-%sRGs_(\d+p\.mov)s_h\1twidththeightitlanguageitneed_resolves#clip_R)s: RHRI(RR
RRRKRJR+R,RRRLRMRNtgett	iteritemsROtretsubtinttstrR-R.R/taddVideoR3R(RR#RRRStcUrltfilmIdtkeyR7RRIRHturlstversiontversionDatatsizetsizeDataRR6((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pytexploreItemlsN
	
"

%%	

<
cCsFtj|ƒ}|jdƒtj|ƒ}|ji|d6dƒdS(Ns'/trailers/home/scripts/quickfind.php?q=Rtexplore_item(turllibt
quote_plusRRV(RR#t
searchPatternt
searchTypeR((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pytlistSearchResult˜scCs%td|ƒ|jj|dgƒS(Ns#TrailersApple.getLinksForVideo [%s]R(RR
Ra(RR#((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pytgetLinksForVideožscCsÚtd|ƒt|jjƒƒrÅxŸ|jD]‘}xˆtt|j|ƒƒD]m}||j||dkrM|j||djdƒsºd|j||d|j||d<qºqMqMWq-Wnidd6|d6gS(Ns TrailersApple.getVideoLinks [%s]RRGt*tdirect(RR2R
tkeystranget
startswith(RtvideoUrlRjtidx((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pyt
getVideoLinks¢s 9iR(cCs¶tdƒtj|||||ƒ|jjddƒ}|jjddƒ}td||fƒg|_|dkr”|jidd6dd6ƒn|dkr¶|j|jdƒné|d	krÕ|j	|jƒnÊ|dkr÷|j
|jd
ƒn¨|d
kr|j|jƒn‰|dkrbt|jƒ}|j
itd
6dd6ƒ|j|||ƒn=|dkr˜|jidd6dd6dtdƒƒntƒtj|||ƒdS(NshandleService startRGR(Rs*handleService: ||| name[%s], category[%s] ttypet	cat_itemsRR9RqRtsearch_next_pageRRRRIsType: (ssearchR‚(RRt
handleServicetcurrItemRaR:tNoneR%R8R;RVRpR-R.R/RvtlistsHistoryR RtendHandleService(RtindextrefreshRtRuRGRR#((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pyRĨs0
	*N(t__name__t
__module__R
R…RRR%R8R;RVRpRvRwRRƒ(((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pyRs						,			tIPTVHostcBseZd„ZRS(cCstj|tƒtgƒdS(N(RR
RR!(R((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pyR
Òs(RŠR‹R
(((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pyRŒÐs(t7Plugins.Extensions.IPTVPlayer.components.iptvplayerinitRR t.Plugins.Extensions.IPTVPlayer.components.ihostRRt-Plugins.Extensions.IPTVPlayer.tools.iptvtoolsRRRRcRrRLR3t
simplejsonRRRŒ(((sP/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostappletrailers.pyt<module>s
	º