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
mZyddlZWne
k
rddlZnXd„Zdefd„ƒYZd	efd
„ƒYZdS(iÿÿÿÿ(tTranslateTXT(t	CHostBasetCBaseHostClass(tprintDBGtprintExctbyteify(tParseM3uNcCsdS(Nshttp://shoutcast.com/((((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pytgettytulstShoutcastComcBsteZd„Zidd„Zd„Zd„Zd„Zd„Zdd„Z	d„Z
d	„Zd
ddd„ZRS(
cCs	tj|idd6dd6ƒd|_d|_d|_i|jd6d	d
6dd6d
d6|jƒd6|jƒd6|_t|jƒ|_|jj	idd6d
d6dd6dd6|jƒd d6ƒi|jd6t
d6t
d6t
d6|jd6|_i|_
dS(Ns
shoutcast.comthistorysshoutcast.com.cookietcookiesHMozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0s https://directory.shoutcast.com/s3http://wiki.shoutcast.com/images/b/bd/Shoutcast.pngs
User-Agentt1tDNTs	text/htmltAccepts
gzip, deflatesAccept-EncodingtReferertOrigintXMLHttpRequestsX-Requested-Withs0application/x-www-form-urlencoded; charset=UTF-8sContent-Types*/*iÿÿÿÿtheadert
use_cookietload_cookietsave_cookiet
cookiefile(Rt__init__t
USER_AGENTtMAIN_URLtDEFAULT_ICON_URLt
getMainUrltHTTP_HEADERtdicttAJAX_HEADERtupdatetTruetCOOKIE_FILEt
defaultParamstcacheGenres(tself((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pyRs			B=2cCs4|ikrt|jƒ}n|jj|||ƒS(N(RR!tcmtgetPage(R#tbaseUrlt	addParamst	post_data((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pyR%%scCs}tdƒidd6tdƒd6|jƒd6idd6tdƒd6td	6id
d6tdƒd6g}|j||ƒdS(NsShoutcastCom.listMainMenutgenrestcategorytGenresttitleturltsearchtSearchtsearch_itemtsearch_historysSearch history(Rt_RRtlistsTab(R#tcItemtMAIN_CAT_TAB((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pytlistMainMenu)s

$c
Csºtd|ƒi|_|j|dƒ\}}|s:dS|jjj|ddƒ}x^|D]V}g}|jjj|ddƒd	}|j|ƒ}|j|jjj	|d
ƒdƒ}	|j
itdƒd
6|	d6ƒ|jdd	ƒd}|jjj
|ddƒ}x]|D]U}
|j|jjj	|
d
ƒdƒ}	|j|
ƒ}|j
i|d
6|	d6ƒqWt|ƒr\itd6dd6|d6|d
6|d6}|j|ƒq\q\WdS(NsShoutcastCom.listGenres [%s]R-s<lit>s
main-genres</uls<as</a>is\shref=['"]([^'^"]+?)['"]itAllR,s<uliÿÿÿÿtgood_for_favR*tnametitems(s<liR7s
main-genre(s</ulR7(RR"R%R$tphtgetAllItemsBeetwenNodestgetDataBeetwenMarkerstcleanHtmlStrt
getFullUrltgetSearchGroupstappendR2tsplittgetAllItemsBeetwenMarkerstlentFalsetaddDir(
R#R4tnextCategorytststdatat	genreItemtitemsTabttmpt
genreTitleR-titemR,tparams((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pyt
listGenres2s*	
%!
%)cCs[td|ƒt|ƒ}|jdgƒ}|jitd6|d6ƒ|j||ƒdS(NsShoutcastCom.listSubGenres [%s]R;R9R*(RRtpopRRR3(R#R4RHRL((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pyt
listSubGenresMs
cCstd|ƒdS(NsShoutcastCom.listSort [%s](R(R#R4RH((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pytlistSortUstc
CsÇtd|ƒ|dkr|j|dƒ\}}|s=dS|jjj|ddƒd}|jjj|ddtƒd}|jd	ƒ}g}xG|D]?}|jƒ}|d
d&krÌ|dd
!}n|j|ƒqšW|j	dƒ}i|d
d6}n]|j	dƒ}i|d6}|j|d|ƒ\}}|sAdS|j	dƒ}i|d6}|j|d|ƒ\}}|s‚dSy&t
tj|ƒƒ}x
|D]}|j
|dƒ}	t|dƒ}
g}|jtdƒ|dƒ|jtdƒ|dƒ|jtdƒ|dƒ|dr4d}nd}|jtdƒ|ƒd j|ƒ}itd!6|
d"6|	d#6|j	d$|
ƒd6|d%6}|j|ƒq¡WWntk
rÂtƒnXdS('NsShoutcastCom.listItems [%s]RUR-s	</footer>s</body>isloadStationsByGenre(s);t,it"t'iÿÿÿÿs/Home/BrowseByGenret	genrenames/SearchtqueryR(s/Search/UpdateSearchtNametIDs	Genre: %stGenres
Listeners: %st	ListenerssBitrate: %stBitratetIsAACEnabledtAACtMP3sType: %ss | R9t
station_idR,s?station_id=tdesc(RWRX(RR%R$R<R>RFRCtstripRBR@RtjsontloadsR?tstrR2tjoinRtaddAudiot	ExceptionR(
R#R4t
searchPatternRIRJRPROR-R(R,t	stationIdRdttype((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pyt	listItemsXsX"




	6
cCs+td|||fƒ|ji|ƒdS(NsIShoutcastCom.listSearchResult cItem[%s], searchPattern[%s] searchType[%s](RRo(R#R4Rlt
searchType((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pytlistSearchResult‹scCsštd|ƒg}|jddƒ}d|}|j|ƒ\}}|sOdSt|ƒ}x8|D]0}|ji|dd6|dd6d	d
6ƒqbW|S(Ns"ShoutcastCom.getLinksForVideo [%s]RcRUs5http://yp.shoutcast.com/sbin/tunein-station.m3u?id=%sR,R:turiR-itneed_resolve(RtgetR%RRB(R#R4tlinksTabRmR-RIRJRO((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pytgetLinksForVideos

.ic	CsÐtdƒtj|||||ƒ|jjddƒ}|jjddƒ}|jjddƒ}td||fƒi|_g|_|dkr«|jidd6ƒn|dkrÍ|j	|jdƒnì|dkrï|j
|jd	ƒnÊ|d
kr|j|jd	ƒn¨|d	kr0|j|jƒn‰|dkr|t
|jƒ}|jitd
6dd6ƒ|j|||ƒn=|dkr²|jidd6dd6dtdƒƒntƒtj|||ƒdS(NshandleService startR:RUR*tmodes+handleService: |||| name[%s], category[%s] R)tlist_sub_genrest
list_itemst	list_sortR.tsearch_next_pageR0R1R	RdsType: (ssearchR{(RRt
handleServicetcurrItemRtt
cacheLinkstcurrListtNoneR6RQRSRTRoRRRFRqtlistsHistoryR2RtendHandleService(	R#tindextrefreshRlRpR:R*RwR4((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pyR| s4
		*N(
t__name__t
__module__RR€R%R6RQRSRTRoRqRvR|(((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pyRs						3		tIPTVHostcBseZd„ZRS(cCstj|tƒtgƒdS(N(RRRR(R#((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pyRÇs(R…R†R(((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pyR‡Ås(t7Plugins.Extensions.IPTVPlayer.components.iptvplayerinitRR2t.Plugins.Extensions.IPTVPlayer.components.ihostRRt-Plugins.Extensions.IPTVPlayer.tools.iptvtoolsRRRt,Plugins.Extensions.IPTVPlayer.libs.m3uparserRRfRkt
simplejsonRRR‡(((sL/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/hosts/hostshoutcast.pyt<module>s
	®