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@s6ddlmZmZmZmZmZmZmZmZm	Z	ddl
mZddl
mZddlmZddlmZddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlm Z dd
l!m"Z"ddl#m$Z$ddl%Z%defd„ƒYZ&dS(iÿÿÿÿ(	tprintDBGtprintExctGetDefaultLangt	GetTmpDirtGetSubtitlesDirt
GetIconDirtRemoveDisallowedFilenameCharstiptv_systemtMapUcharEncoding(tTranslateTXT(tCDisplayListItem(tIPTVMainNavigatorList(tCover3(tDMHelper(tDownloaderCreator(t
getDesktop(tScreen(tLabel(t	ActionMap(t
LoadPixmap(t
boundFunction(tconfigNtIPTVSubSimpleDownloaderWidgetc
BsqeZdZedƒjƒjƒdZedƒjƒjƒdZedkr]ed7Znde	dƒeeeded	ed
edded
fZ
id„Zd„Zd„Z
d„Zd„Zd„Zddd„Zd„Zddgd„Zddgd„Zd„Zed„Zd„Zd„Zd „Zd!„Zd"„Zd#„Zd$„Zd%„ZRS(&s.externaltmpsubii¾iÃiôise
        <screen name="IPTVSubSimpleDownloaderWidget" position="center,center" title="%s" size="%d,%d">
         <widget name="icon_red"    position="5,9"   zPosition="4" size="30,30" transparent="1" alphatest="on" />
         <widget name="icon_green"  position="355,9" zPosition="4" size="30,30" transparent="1" alphatest="on" />
         
         <widget name="label_red"     position="45,9"  size="175,27" zPosition="5" valign="center" halign="left" backgroundColor="black" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
         <widget name="label_green"   position="395,9" size="175,27" zPosition="5" valign="center" halign="left" backgroundColor="black" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
         
         <widget name="list"  position="5,80"  zPosition="2" size="%d,%d" scrollbarMode="showOnDemand" transparent="1"  backgroundColor="#00000000" enableWrapAround="1" />
         <widget name="title" position="5,47"  zPosition="1" size="%d,23" font="Regular;20"            transparent="1"  backgroundColor="#00000000"/>
         
         <widget name="console"      position="10,%d"   zPosition="2" size="%d,160" valign="center" halign="center"   font="Regular;24" transparent="0" foregroundColor="white" backgroundColor="black"/>
        </screen>sSimple subtitles downloaderi
iii‡i iicCsÎ||_tj||ƒ||_|jj|jƒ|jj|jƒt	dƒ|d<t	dƒ|d<t	t
dƒƒ|d<t	t
dƒƒ|d<t	t
dƒƒ|d	<tƒ|d
<tƒ|d<tƒ|d<|dj
|jƒtd
dddgi|jd6|jd6|jd6|jd6dƒ|d<i|_x1ddgD]#}tt|dƒƒ|j|<qEWd|_g|_g|_tƒ|_t|_d|_i|_d|_!|j"ƒd|_#dS(Nt ttitletconsoletCancelt	label_reds
Move grouptlabel_yellowtApplytlabel_greenticon_redt
icon_greentlisttColorActionstSetupActionst
WizardActionstListboxActionstcanceltoktredtgreeniþÿÿÿtactionss.pngt($tsessionRt__init__tparamstonShowntappendtonStarttonCloset'_IPTVSubSimpleDownloaderWidget__onCloseRt_RRtconnectSelChangedtonSelectionChangedRtkeyExittkeyOKtkeyRedtkeyGreent
iconPixmapRRt
movieTitlet	stackListt
stackItemsRtdefaultLanguagetFalsetlistModetdownloadedSubFilePathtcurrItemtNonet
downloadertcleanDownloadertworkconsole(tselfR,R.ticon((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyR-9sD		







	!							
cCsJ|dj|jƒd|jkr3|jjƒnd|_|jƒdS(NR!(tdisconnectSelChangedR6RDRGtkillRF(RH((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyt	__onCloseis
	cCsQd|_i|_|jdkrD|jj|jƒ|jjƒnd|_dS(NR+(RBRCRERDtunsubscribeFor_FinishtdownloadFinishedt	terminate(RH((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyRFps		cCs¢|jtƒ|jƒ||_|djtdƒ|jjddƒƒt|jjddƒƒ|_|jr‡|jj	|j
ƒn|djtdƒƒdS(NRsDownloading subtitles.
 ('%r').turlR+s7Download can not be started.
 Incorrect address ('%r').(tsetListModeR@RFRCtsetTextR4tgetRREtisWorkingCorrectlyt_startDownloader(RHtitem((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyt
startDownloadxs

	*	cCsz|r_|jj|jƒtj|jjddƒƒ\}}|jj|t|j	ƒ|ƒn|dj
tdƒƒdS(NRPR+RsLDownload can not be started.
Downloader %s not working correctly.
Status[%s](REtsubscribeFor_FinishRNR
tgetDownloaderParamFromUrlRCRStstartRt_TMP_FILE_NAMERRR4(RHtststreasonRPtdownloaderParams((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyRU„s
$"cCs |tjjkr0|djtdƒ|ƒnl|djtdƒ|jjƒƒdtjj	j
j|jjƒf}td|ƒt
||jƒ|_dS(NRsDownload failed.
Status[%s]s=Subtitles downloaded successfully. [%s], conversion to UTF-8.s%s "%s"scmd[%s](R
tSTSt
DOWNLOADEDRRR4REtgetFullFileNameRtpluginst
iptvplayertuchardetpathtvalueRRtconvertSubtitlesRG(RHtstatustcmd((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyRNŒs$%iR+cCsÝt|ƒ}d|ks$d|kr-d}n|jƒ}yntj|jjƒd|dƒ"}|jƒjdƒjƒ}WdQX|jj	ddƒ}|dkrÔ|jj	ddƒj
d	ƒd
j
dƒd
}ndj|jd
|jj	ddƒ|jj	ddƒƒ}t
|ƒ}|d|7}tt|ƒdƒ}|j|ƒWdQXt|ƒ|_|jdgƒ|jj	dgƒ}t|ƒdkr¦|jƒnWn/tk
rØtƒ|djtdƒƒnXdS(Nitunknownsutf-8trtreplacetformatR+RPt?iÿÿÿÿt.s{0}_{1}_{2}tmovie_titleRtlangtwR)tsub_listiRs%Subtitles conversion to UTF-8 failed.(RtstriptcodecstopenRERatreadtencodeRCRStsplitRlR.RRtwriteRBtshowButtonstlent	acceptSubt	ExceptionRRRR4(RHtcodetencodingtfptsubTexttexttfilePathttmpList((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyRf•s.	$!2:
cCsSy4x-|jD]"}|d|j|j|ƒq
WWntk
rNtƒnXdS(Nticon_(R;t	setPixmapR}R(RHRI((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyt	loadIcons²s
$
R(R)cCsXy9x2|D]*}|d|jƒ|d|jƒq
WWntk
rStƒnXdS(NR…tlabel_(thideR}R(RHtbuttonstbutton((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pythideButtons¸s

cCsXy9x2|D]*}|d|jƒ|d|jƒq
WWntk
rStƒnXdS(NR…Rˆ(tshowR}R(RHRŠR‹((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyRz¿s

cCsŒ|jj|jƒ|jtdƒ|jjddƒƒ|jƒ|jjdgƒ}t|ƒdkrw|j	ƒn|j
|dƒdS(NsSubtitles for: %sRoR+Rrii(R/tremoveR1tsetTitleR4R.RSR‡R{tdisplayListRW(RHR„((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyR1Æs&

cCs t|krd|djƒ|djƒ|jƒ|jdgƒ|djƒ|djdƒn/|jdgƒ|djƒ|djdƒ||_dS(NR!RR(RRR)(R@R‰RŒRzRRRRA(RHR\((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyRQÐs
cCsßg}|djtdƒƒ|djƒ|jjdgƒ}yTxM|D]E}t|ƒtd|ddtjƒ}||_|j	|fƒqJWWnt
k
r®tƒnX|dj|ƒ|djƒ|j
tƒdS(NRsSelect subtitles to downloadRrtnamettypeR!(RRR4RR.RSRR
tTYPE_ARTICLEtprivateDataR0R}RtsetListRQtTrue(RHR!R„RVtdItem((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyRßs

	
cCsdS(N((RH((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyR6ñscCs’t|jkr|jdkr=|jjƒr=|jjƒqŽ|jjdgƒ}t|ƒdkrq|j	ƒqŽ|j
dƒn
|j
dƒdS(NRri(R@RARERDt
isDownloadingROR.RSR{Rtclose(RHR„((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyR7ôs
cCsHt|jkrdS|jƒ\}}d|krD|j|jƒndS(N(R@RAtgetSelectedItemRDRWR”(RHtidxRV((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyR8s
cCs|jdƒdS(N(R™RD(RH((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyR9scCs|jƒdS(N(R|(RH((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyR:
scCs¡y‚|djri|jjdtdƒƒd6|jjdtdƒƒd6|jd6}|jjddƒ|d<|j|ƒnWntk
rœtƒnXdS(	NR RptdefaultRtpathRPR+tid(tvisibleRCRSR4RBR™R}R(RHttrack((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyR|
s
H
cCsšy|djƒ}Wntk
r-d}nXd}yA|djrt|djjƒd}d|krt||fSnWntk
r•tƒd}nXdS(NR!iiÿÿÿÿ(iÿÿÿÿN(tgetCurrentIndexR}RDRŸtltgetCurrentSelectionR(RHR›tsel((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyRšs




( t__name__t
__module__R[Rtsizetwidthtsz_wtheighttsz_hR4tskinR-R3RFRWRURNRfR‡RŒRzR1R@RQRR6R7R8R9R:R|Rš(((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyR s>

	0								
			
				('t-Plugins.Extensions.IPTVPlayer.tools.iptvtoolsRRRRRRRRRt7Plugins.Extensions.IPTVPlayer.components.iptvplayerinitR	R4t.Plugins.Extensions.IPTVPlayer.components.ihostR
t1Plugins.Extensions.IPTVPlayer.components.iptvlistRt.Plugins.Extensions.IPTVPlayer.components.coverRt+Plugins.Extensions.IPTVPlayer.iptvdm.iptvdhR
t:Plugins.Extensions.IPTVPlayer.iptvdm.iptvdownloadercreatorRtenigmaRtScreens.ScreenRtComponents.LabelRtComponents.ActionMapRtTools.LoadPixmapRtTools.BoundFunctionRtComponents.configRRtR(((s[/usr/lib/enigma2/python/Plugins/Extensions/IPTVPlayer/components/iptvsubsimpledownloader.pyt<module>s@