+
    ÷ûjd[  ã            	       ó   € R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIHu Ht ^ RIt^ RIt^ RIt^ RIt^ RIHt RtRtRtRtRtR>tR	tR
t^t ^t!^t"Rt#R?t$R@w  t%t&t't(t)t*Rt+RAw  t,t-t.t/t0t1t2t3RRRut4t5t6^t7^t8^´t9RBw  t:t;t<t=RCw  t>t?t@tAtBtCtDRRRutEtFtGR]>]F]@]@3R]&]E]:]B3R]?]G]A]A3/tHR tIR tJR tKR tLR tMR tNRDR ltOR tPR tQR tRR  tSR! tTRER" ltUR# tVRER$ ltWR% tXRER& ltYR' tZ ! R( R)][4      t\ ! R* R+]]4      t^ ! R, R-]_4      t`R. taR/ tbR0 tcR1 tdR2 teR3 tfR4 tgRER5 lthR6 tiR7 tjR8 tkR9 tlRFR: ltmR; tnRFR< ltoR= tpR# )GaÚ  Check for a new version of the addon and offer to install it (docs/plan/skin-milionar/250-update.md).

The skin's settings menu (window 1108) opens window 1124 and asks for `action=skin_update`; the window draws what the
Home properties milionar.update.* say. The check reads the index of the repository the addon is published to and
compares versions. An explicit install click downloads the release, checks it and hands it to wcs/skin/update_apply.py,
all inside this window: Kodi's menus are never needed and its automatic updates stay off (wcs.update_policy). The
service stops for the swap, so the new service finishes the window (`resume`).

With the setting update_beta the window offers the beta series too, and from a beta always the way back to the stable
version (docs/plan/skin-milionar/340-beta-channel.md): both are the same install of a given version.

A development workspace (a git checkout of the addon) never installs: an update from the repository would replace it.
)ÚclosingN)Úaddon_versionzplugin.video.milionarzrepository.milionarz7https://hosting.pilsfree.net/chudy/kodi/repo/addons.xmlid  zmilionar.update.Úupdate_betazbeta-backupzmilionar-updatei¤‹  i§‹  i¨‹  i©‹  iåŒ  iæŒ  içŒ  ÚbetaÚinstallÚbackc                  ó.   € \         P                  ! R 4      # )i'  )ÚxbmcguiÚWindow© ó    Úwcs/skin/update.pyÚ_homer   D   s   € Ü�>Š>˜%Ó Ð r   c                 óJ   € \        4       P                  \        V ,           4      # ©N)r   ÚgetPropertyÚPREFIX)Únames   &r   Ú_getr   H   s   € Ü‹7×Ñœv¨�}Ó-Ð-r   c            
     óf  € \        4       p\         FH  pVR8X  d	   W 9  d   K  VP                  \        V,           \	        V P                  VR4      4      4       KJ  	  V P                  R4      '       d>   \        P                  ! RP                  \        4      4      '       d   \        4        R# R# R# )z9Set the window's state: every field not given is cleared.ÚtargetÚ ÚprimaryúWindow.IsActive({})N)r   ÚFIELDSÚsetPropertyr   ÚstrÚgetÚxbmcÚgetCondVisibilityÚformatÚWINDOWÚ_focus_primary)ÚvaluesÚhomer   s   ,  r   Ú_showr%   L   s„   € ä‹7€DßˆØ�8Ô Ô 2ÙØ×Ñœ $�¬¨F¯J©J°t¸RÓ,@Ó(AÖBñ ð ‡z�z�)×Ò¤×!7Ò!7Ð8M×8TÑ8TÔU[Ó8\×!]Ò!]ÜÖñ "^Ñr   c                 óô   € \         P                  ! 4       p \        \        4       FO  p\         P                  ! R4       \         P
                  ! R4      '       g   V P                  R4      '       g   KN   R# 	  R# )uª   The button that goes on, as soon as there is one: Kodi shows it a frame after its property is set, and a
SetFocus before that is lost (the TV kept the focus on PozdÄ›ji).zSetFocus(11)zControl.HasFocus(11)çš™™™™™¹?N)r   ÚMonitorÚrangeÚFOCUS_TRIESÚexecutebuiltinr   ÚwaitForAbort)ÚmonitorÚ_s     r   r"   r"   W   sR   € ô �lŠl‹n€GÜ”;ÖˆÜ×Ò˜NÔ+Ü×!Ò!Ð"8×9Ò9¸W×=QÑ=QÐRU×=VÔ=VÚó  r   c                 óX   € V P                  V4      pV'       d   VP                  ! V!  # T# r   )ÚgetLocalizedStringr    )ÚaddonÚ	string_idÚargsÚtexts   &&* r   Ú_textr5   a   s(   € Ø×#Ñ# IÓ.€Dß!%ˆ4�;Š;˜ÑÐ/¨4Ð/r   c           	     óX  € T ;'       g    RP                  R4      w  rpV'       g   T ;'       g    RR3# \        P                  ! RV4      pV'       g   RP                  W4      R3# RpVP	                  ^4      '       d‹   \
        P                  ! \        P                  ! \
        P                  ! VP	                  ^4      R4      4      4      pRP                  VP                  VP                  VP                  VP                  4      pRP                  WP	                  ^4      4      V3# )zŒ(the version as the window shows it, the build of a beta): 2.3.6~beta20261116190000 -> ('2.3.6 beta', '16. 11. 20:00')
in the device's time.r   Ú~z([a-z]+)(\d{14})?z{} {}z%Y%m%d%H%M%Sz{}. {}. {:02d}:{:02d})Ú	partitionÚreÚ	fullmatchr    ÚgroupÚtimeÚ	localtimeÚcalendarÚtimegmÚstrptimeÚtm_mdayÚtm_monÚtm_hourÚtm_min)ÚversionÚbaser.   ÚtagÚmatchÚbuiltÚmoments   &      r   ÚdisplayrK   f   sÛ   € ð —M�M˜r×,Ñ,¨SÓ1�L€DˆSßØ�}ˆ}˜"˜bÐ Ð Ü�LŠLÐ-¨sÓ3€EßØ�~‰~˜dÓ(¨"Ð,Ð,Ø€EØ‡{�{�1‡~‚~Ü—’¤§¢´·²¸e¿k¹kÈ!»nÈnÓ0]Ó ^Ó_ˆØ'×.Ñ.¨v¯~©~¸v¿}¹}ÈfÏnÉnÐ^d×^kÑ^kÓlˆØ�>‰>˜$§¡¨A£Ó/°Ð6Ð6r   c                óL   € \        V 4      \        V4      uw  r#w  rERVRVRVRV/# )zThe window's version fields.Ú	installedÚinstalled_buildÚ	availableÚavailable_build)rK   )rM   rO   ÚshownrI   ÚnewÚ	new_builts   &&    r   Ú	_versionsrT   v   s7   € ä'.¨yÓ'9¼7À9Ó;MÐ$�N€UÑ$�SØ˜Ð 1°5¸+ÀsÐL]Ð_hÐiÐir   c                óP  € \         P                  ! V P                  R4      4      p\        P                  P                  \        P                  P                  VR4      4      ;'       g>    \        P                  P                  \        P                  P                  VR4      4      # )zXProtect checkouts/worktrees and agent workspaces; none of these ship in the runtime ZIP.Úpathz.gitz.agents)ÚxbmcvfsÚtranslatePathÚgetAddonInfoÚosrV   ÚlexistsÚjoinÚisdir)r1   rV   s   & r   Úis_workspacer^   |   se   € ä× Ò  ×!3Ñ!3°FÓ!;Ó<€DÜ�7‰7�?‰?œ2Ÿ7™7Ÿ<™<¨¨fÓ5Ó6×fÐf¼"¿'¹'¿-¹-ÌÏÉÏÉÐUYÐ[dÓHeÓ:fÐfr   c                 óÄ   € R RR^RV RV/p\         P                  ! \        P                  ! \         P                  ! V4      4      4      P                  R4      ;'       g    / # )Újsonrpcú2.0ÚidÚmethodÚparamsÚresult)ÚjsonÚloadsr   ÚexecuteJSONRPCÚdumpsr   )rc   rd   Úrequests   && r   Ú_rpcrk   ‚   sO   € Ø˜%  q¨(°F¸HÀfÐM€GÜ�:Š:”d×)Ò)¬$¯*ª*°WÓ*=Ó>Ó?×CÑCÀHÓM×SÐSÐQSÐSr   c                 ó¦  €  \         P                  ! RP                  \        4      4      p \        P
                  ! V 4      P                  4       P                  R4      pVeF   VP                  ;'       g    RP                  R4      '       d   VP                  P                  4       # \        #   \        \        P                  3 d	     \        # i ; i)z_The <info> of the installed repository addon (it knows where it lives), else the published one.z"special://home/addons/{}/addon.xmlz5.//extension[@point='xbmc.addon.repository']/dir/infor   zhttps://)rW   rX   r    ÚREPO_IDÚETÚparseÚgetrootÚfindr4   Ú
startswithÚstripÚOSErrorÚ
ParseErrorÚ
REPO_INDEX)rV   Úinfos     r   Ú
_index_urlrx   ‡   s¢   € ðÜ×$Ò$Ð%I×%PÑ%PÔQXÓ%YÓZˆÜ�xŠx˜‹~×%Ñ%Ó'×,Ñ,Ð-dÓeˆØÒ §¡§ ¨b× <Ñ <¸Z× HÒ HØ—9‘9—?‘?Ó$Ð$ô Ðøô ”R—]‘]Ð#ô ØÜÐðús   ‚A2B- Á5B- ÂB- Â-CÃCc                 ó`   € \        4       P                  R4      w  rpV'       d
   V R,           # R# )zoThe beta series lives next to the repository: .../repo/addons.xml -> .../beta/addons.xml (Kodi never reads it).z/repo/z/beta/addons.xmlr   )rx   Ú
rpartition)rF   Úfoundr.   s      r   Ú_beta_index_urlr|   “   s+   € ä“\×,Ñ,¨XÓ6�N€D�ß(-ˆ4Ð$Õ$Ð5°2Ð5r   c                 ób   € \         P                  ! V 4      '       d   \        4       # \        4       # r   )r   Úis_prereleaser|   rx   ©rE   s   &r   Ú_series_indexr€   ™   s"   € Ü -× ;Ò ;¸G× DÒ DŒ?ÓÐVÌ*Ë,ÐVr   c                ó0  € ^ RI pTP                  T ;'       g    \        4       \        RR/R7      pVP	                  4        \
        P                  ! VP                  4      p\        R VP                  R4       4       R4      pVe   VP                  R4      '       g   \        RP                  \        4      4      hVP                  R	4      pVP                  R4      Ve5   R
P                  VP                  ;'       g    RP!                  4       4      3# R3# )zs(version, news) of the addon in a series' index (the repository's by default); raises on a network or format
error.NúCache-Controlúno-cache)ÚtimeoutÚheadersc              3   ó\   "  € T F"  qP                  R 4      \        8X  g   K  Vx € K$  	  R# 5i)rb   N)r   ÚADDON_ID)Ú.0Únodes   & r   Ú	<genexpr>Úpublished.<locals>.<genexpr>¤   s!   é € ÐTÑ#5˜4¿¹À$»Ì8Ñ9S—$’$Ó#5ùs   ‚,¢
,r1   rE   z!{} is not in the repository indexz/.//extension[@point='xbmc.addon.metadata']/newsÚ r   )Úrequestsr   rx   Ú	TIMEOUT_SÚraise_for_statusrn   Ú
fromstringÚcontentÚnextÚiterÚ
ValueErrorr    r‡   rq   r\   r4   Úsplit)Úindexr�   ÚresponseÚrootr1   Únewss   &     r   Ú	publishedrš   �   sÞ   € ó Ø�|‰|˜E×1Ð1¤Z£\¼9ÈÐ`jÐNkˆ|Ól€HØ×ÑÔÜ�=Š=˜×)Ñ)Ó*€DÜÑT 4§9¡9¨WÔ#5ÓTÐVZÓ[€EØ‚}˜EŸI™I i×0Ò0ÜÐ<×CÑCÄHÓMÓNÐNØ�:‰:ÐGÓH€DØ�9‰9�YÓÈÒHX §¡¨4¯9©9¯?¨?¸×*AÑ*AÓ*CÓ!DÐ`Ð`Ð^`Ð`Ð`r   c                ó<  € V P                  \        4      R8X  d   \        4       MRpV'       g   R#  \        V4      #   \         dT   p\
        P                  ! RP                  \        T4      P                  T4      \
        P                  4        Rp?R# Rp?ii ; i)zl(version, news) of the newest beta when the household wants betas; without it the stable series still shows.Útruer   Nu-   [MilionÃ¡Å™ Update] beta check failed: {}: {})Ú
getSettingÚBETA_SETTINGr|   rš   Ú	Exceptionr   Úlogr    ÚtypeÚ__name__Ú
LOGWARNING)r1   ÚurlÚexcs   &  r   Ú_betar¦   «   st   € à$×/Ñ/´Ó=ÀÔGŒ/Ô
ÈR€CßÙðÜ˜‹~ÐøÜô Ü�ŠÐ@×GÑGÌÈSË	×HZÑHZÐ\_Ó`Ôbf×bqÑbqÔrÝûðús   ²
= ½BÁABÂBc                óJ  € . pV'       dq   \         P                  ! V^ ,          V 4      '       dM   \         P                  ! V^ ,          V^ ,          4      '       d"   VP                  R\        V4      ,           4       \         P                  ! V^ ,          V 4      '       d$   VP                  R\        V4      ,           4       V# \         P                  ! V 4      '       dF   \         P
                  ! V^ ,          V 4      '       d"   VP                  R\        V4      ,           4       V# )zÄWhat the window offers, the main button first: [(kind, version, news)]. A newer beta (above the stable version
too); the stable version when it is newer, or as the way back from any beta (B2, B3).)r   )r   )r   )r   ÚnewerÚappendÚtupler~   Úcompare)rM   Ústabler   r{   s   &&& r   Úoffersr­   ·   sÏ   € ð €Eß”×#Ò# D¨¥G¨Y×7Ò7¼M×<OÒ<OÐPTÐUVÕPWÐY_Ð`aÕYb×<cÒ<cØ�‰�Y¤ t£Õ,Ô-Ü×Ò˜6 !�9 i×0Ò0Ø�‰�\¤E¨&£MÕ1Ô2ð €Lô 
×	$Ò	$ Y×	/Ò	/´M×4IÒ4IÈ&ÐQRÍ)ÐU^×4_Ò4_Ø�‰�Y¤ v£Õ.Ô/Ø€Lr   c                 óÔ   € VR 8X  d"   \        V \        \        V4      ^ ,          4      # T;'       g    \        V \        4      pVR8X  d   VR,           \        V \        4      ,           # T# )r   r   z[CR][CR])r5   ÚT_BACKrK   ÚT_NEWSÚT_BETA)r1   ÚkindrE   r™   s   &&&&r   Ú_offer_textr³   Ä   sX   € Øˆv„~Ü�UœF¤G¨GÓ$4°QÕ$7Ó8Ð8Ø×'Ð'”5˜¤Ó'€DØ7;¸v´~ˆ4�*Õœu U¬FÓ3Õ3ÐOÈ4ÐOr   c                ó°  € T ;'       g    \         P                  ! \        4      p V P                  R4      p\	        RRRR\        V \        4      RRR\        V \        4      /\        V4      B   \        4       p\)        Y\+        T 4      4      pT'       gZ   \	        RRRR\        T \,        4      R
\        T \.        \1        T4      ^ ,          4      R\        T \        4      /\        T4      B  R# T^ ,          \3        T4      ^8”  d
   T^,          MRuw  rVrx\4        T,          w  ršr¼/ p\7        T 4      '       d   \        T \8        4      pM‹\;        YYg4      pR\        Y\1        T4      ^ ,          4      RRRT/pT'       dV   TP=                  \        T \4        T^ ,          ,          ^,          \1        T^,          4      ^ ,          4      T^,          R7       \	        RRRR\        Y
4      R\        Y	4      R
TR\        T \>        4      /\A        \        Y4      3/ TB B  R#   \         d¬   p\        P                  ! RP                  \        T4      P                  T4      \        P                   4       \	        RRR	R\        T \"        4      R
\        T \$        4      R\        T \&        4      RRR\        T \        4      /\        T4      B   Rp?R# Rp?ii ; i)z:Look for a new version and show the result in window 1124.rE   ÚstateÚcheckingÚheadlineÚbusyrœ   Ú	secondaryu(   [MilionÃ¡Å™ Update] check failed: {}: {}Úfailedr4   r   r’   ÚretryNÚcurrentr   Úprimary_version)Ú	alternateÚalternate_versionrO   Úavailable_captionr   )!Ú	xbmcaddonÚAddonr‡   rY   r%   r5   Ú
S_CHECKINGÚB_CLOSErT   rš   rŸ   r   r    r    r¡   r¢   r£   ÚS_FAILEDÚT_FAILEDÚB_RETRYr­   r¦   Ú	S_CURRENTÚ	T_CURRENTrK   ÚlenÚKINDSr^   ÚT_DEVr³   ÚupdateÚB_LATERÚdict)r1   rM   r¬   r¥   r{   r²   rE   r™   Úotherr·   ÚcaptionÚbuttonr.   Úbuttonsr4   s   &              r   ÚcheckrÔ   Ë   s´  € à×.Ð.”Y—_’_¤XÓ.€EØ×"Ñ" 9Ó-€IÜ	ñ "�
ð "¤U¨5´*Ó%=ð "ÀFð "ÔV[Ð\aÔcjÓVkð "Ü�iÓ ò"ðÜ“ˆô �9¤e¨E£lÓ3€EßÜñ 	G�Ið 	G¬¨e´YÓ(?ð 	GÄeÈEÔS\Ô^eÐfoÓ^pÐqrÕ^sÓFtð 	GÜ˜e¤WÓ-ð	GÜ1:¸9Ó1Eò	GáØ#(¨¥8¼#¸e»*Àq¼.¨e°A®hÈdÐ Ñ€T�DÜ#(¨¥;Ñ €H�vØ€GÜ�E×ÒÜ�UœEÓ"‰ä˜5¨Ó6ˆØœe E´7¸7Ó3CÀAÕ3FÓGÈÐQZÐ\mÐovÐwˆßØ�N‰N¤U¨5´%¸¸a½µ/À!Õ2DÄgÈeÐTUÍhÓFWÐXYÕFZÓ%[ÐotÐuvÕowˆNÔxÜ	ñ ]�ð ]¬u°UÓ/Dð ]ÌuÐUZÓOeð ]Ðlpð ]Ü˜%¤Ó)ð]Ü-1´)¸IÓ2OÑ-[ÐSZÑ-[ô]øô) ô Ü�ŠÐ;×BÑBÄ4ÈÃ9×CUÑCUÐWZÓ[Ô]a×]lÑ]lÔmÜñ 	t�Hð 	t¤u¨U´HÓ'=ð 	tÄEÈ%ÔQYÓDZð 	tÜ˜E¤7Ó+ð	tØ29ð	tÜEJÈ5ÔRYÓEZð	tÜ^gÐhqÓ^rò	tåûð	ús   Á/
H ÈKÈ*B KËKc                óp   € RP                  \        V 4      P                  R^4      ^ ,          \        V 4      # )zZThe release next to its series' index, where Kodi's repository looks for a stable one too.z{0}/{1}/{1}-{2}.zipÚ/)r    r€   Úrsplitr‡   r   s   &r   Úpackage_urlrØ   ë   s0   € à ×'Ñ'¬°gÓ(>×(EÑ(EÀcÈ1Ó(MÈaÕ(PÔRZÐ\cÓdÐdr   c                   ó   € ] tR t^ðtRtRtR# )ÚNoSpacezNThe device cannot take the new version (space, a folder without write access).r   N©r¢   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   r   r   rÚ   rÚ   ð   s   † ÝXr   rÚ   c                   ó   € ] tR t^ôtRtRtR# )ÚDamagedz@The package is not the version the index promised, or not whole.r   NrÛ   r   r   r   râ   râ   ô   s   † ÝJr   râ   c                   ó   € ] tR t^øtRtRtR# )ÚDependencyFailedz3A new import of the version could not be installed.r   NrÛ   r   r   r   rä   rä   ø   s   † Ý=r   rä   c           	      ó¾  € ^ RI pVP                  V R\        RR/R7      ;_uu_ 4       pVP                  4        \	        VP
                  P                  R4      ;'       g    ^ 4      ^ ^ rvp\        P                  ! \        P                  P                  V4      4      P                  pV'       dG   V\        V,          8  d5   \        RP                  V^,	          \        V,          ^,	          4      4      h\        VR4      ;_uu_ 4       p	VP!                  R
4       F]  p
V	P#                  V
4       V\%        V
4      ,          pV'       d   ^dV,          V,          M^ pW·\&        ,           8¼  g   KS  TpV! V4       K_  	  RRR4       RRR4       X'       d$   XV8w  d   \)        R	P                  We4      4      hR# R#   + '       g   i     LE; i  + '       g   i     LP; i)é    NTr‚   rƒ   )Ústreamr„   r…   zContent-Lengthz{} MB free, {} MB neededÚwbz download ended at {} of {} bytesi   )r�   r   rŽ   r�   Úintr…   ÚshutilÚ
disk_usagerZ   rV   ÚdirnameÚfreeÚROOMrÚ   r    ÚopenÚiter_contentÚwriterÊ   ÚPROGRESS_STEPÚConnectionError)r¤   r   Úprogressr�   r—   ÚtotalÚdonerQ   rí   ÚhandleÚchunkÚpercents   &&&         r   Ú	_downloadrú   ü   sd  € ÛØ	�‰�c $´	ÀOÐU_ÐC`ˆ×	aÔ	aÐemØ×!Ñ!Ô#Ü  ×!1Ñ!1×!5Ñ!5Ð6FÓ!G×!LÐ!LÈ1ÓMÈqÐRS�UˆÜ× Ò ¤§¡§¡°Ó!8Ó9×>Ñ>ˆß�TœD 5�LÔ(ÜÐ4×;Ñ;¸DÀB½JÌÐPUÍÐZ\ÕH\Ó]Ó^Ð^Ü�&˜$×Ô 6Ø!×.Ñ.¨wÖ7�Ø—‘˜UÔ#Øœ˜E›
Õ"�ß16˜# �*¨Ö-¸A�Ø¤mÕ3Ö3Ø#�EÙ˜WÖ%ñ 8÷  ÷ 
b÷ �˜”ÜÐ@×GÑGÈÓTÓUÐUñ �u÷  ×ú÷ 
b×	aús+   ¨C!GÄ	A F9	Å.F9	Å<GÆ9G	ÇGÇG	c                óÐ   € \         R,           p \        WW#4       R#   \        P                  \        P
                  \        \        3 d   p\        \        T4      4      hRp?ii ; i)zXOnly this addon in exactly this version gets through; unpacking checks every file's CRC.rÖ   N)
r‡   Ú_check_and_extractÚzipfileÚ
BadZipFileÚzlibÚerrorr”   ÚEOFErrorrâ   r   )ÚpackageÚfolderrE   Úprefixr¥   s   &&&  r   Ú_unpackr    sL   € ä˜�^€Fð Ü˜7¨GÖ<øÜ×Ñ¤§
¡
¬J¼ÐAô  Ü”c˜#“hÓÐûð ús   � �/A%ÁA Á A%c           
      ó  a€ \         P                  ! V 4      ;_uu_ 4       pVP                  4       p\        ;QJ d    V3R  lV 4       F  '       g   K   RM	  RM! V3R  lV 4       4      '       d   \	        R4      h\
         Uu. uF  pSV,           V9  g   K  VNK  	  ppV'       d   \	        RP                  V4      4      h\        P                  ! VP                  SR,           4      4      pVP                  R4      VP                  R4      3\        V38w  d:   \	        RP                  VP                  R4      VP                  R4      4      4      hVP                  V4       R	R	R	4       R	# u upi   + '       g   i     R	# ; i)
c              3   ó†   <"  € T F6  qP                  S4      '       * ;'       g    R VP                  R4      9   x € K8  	  R# 5i)z..rÖ   N)rr   r•   )rˆ   r   r  s   & €r   rŠ   Ú%_check_and_extract.<locals>.<genexpr>  s5   øé € ÐXÑRWÈ$—?‘? 6Ó*Ô*×EÐE¨d°d·j±jÀ³oÑ.EÔEÓRWùs
   ƒ A¤ATFzforeign paths in the packageznot in the package: {}ú	addon.xmlrb   rE   zthe package is {} {}N)rý   ÚZipFileÚnamelistÚanyr”   ÚREQUIREDr    rn   r�   Úreadr   r‡   Ú
extractall)	r  r  rE   r  ÚarchiveÚnamesr   Úmissingr˜   s	   &&&f     r   rü   rü     s  ø€ Ü	�Š˜×	!Ô	! WØ× Ñ Ó"ˆß‹3ÔXÑRWÓX�3�3Š3ÔXÑRWÓX×XÒXÜÐ;Ó<Ð<Ý$,ÓK¡H˜D°¸µÀUÑ0J—4�4¡HˆÐKßÜÐ5×<Ñ<¸WÓEÓFÐFÜ�}Š}˜WŸ\™\¨&°;Õ*>Ó?Ó@ˆØ�H‰H�T‹N˜DŸH™H YÓ/Ð0´X¸wÐ4GÔGÜÐ3×:Ñ:¸4¿8¹8ÀD»>È4Ï8É8ÐT]ÓK^Ó_Ó`Ð`Ø×Ñ˜6Ô"÷ 
"Ñ	!ùò L÷	 
"×	!Ð	!ús0    0E5ÁE5Á1E5ÂE0ÂE0ÂCE5Å0E5Å5F	c                ó¸  € \         P                  ! RP                  \        4      4      p\        P
                  P                  \         P                  ! R4      R\        4      p\        P                  ! VRR7       \        P                  ! V4        \        \        V 4      W!4       \        W#V 4        \        P
                  P                  T4      '       d   \        P                  ! T4       R# R#   \         d    \        P                  ! TRR7       h i ; i  \        P
                  P                  T4      '       d   \        P                  ! T4       i i ; i)zIThe checked new version in addons/temp, where update_apply takes it from.zspecial://temp/{}.zipúspecial://home/addons/ÚtempT©Úignore_errorsN)rW   rX   r    ÚSTAGErZ   rV   r\   rê   ÚrmtreeÚmakedirsrú   rØ   r  rŸ   ÚexistsÚremove)rE   rô   r  r  s   &&  r   Ú_stager  '  sè   € ä×#Ò#Ð$;×$BÑ$BÄ5Ó$IÓJ€GÜ�W‰W�\‰\œ'×/Ò/Ð0HÓIÈ6ÔSXÓY€FÜ
‡M‚M�&¨Õ-Ü‡K‚K�ÔðÜ”+˜gÓ&¨Ô:Ü� Õ)ô
 �7‰7�>‰>˜'×"Ò"Ü�IŠI�gÖñ #øô	 ô Ü�Š�f¨DÕ1Øðûô �7‰7�>‰>˜'×"Ò"Ü�IŠI�gÕð #ús   Â!C3 Ã3%DÄD Ä>Ec                óþ  € \         P                  ! \        P                  P	                  V \
        R4      4      P                  4       pVP                  R4       Uu. uFm  pVP                  R4      '       g   K  VP                  R4      P                  R4      '       d   KD  VP                  R4      R8w  g   K\  VP                  R4      NKo  	  ppV Uu. uF  p\        V4      '       d   K  VNK  	  up# u upi u upi )z]The addons the staged version imports that this Kodi does not have (Kodi's own xbmc.* never).r	  Úimportr1   zxbmc.Úoptionalrœ   )rn   ro   rZ   rV   r\   r‡   rp   r“   r   rr   Ú
_installed)r  r˜   r‰   ÚwantedÚaddon_ids   &    r   Úmissing_dependenciesr$  8  sÆ   € ä�8Š8”B—G‘G—L‘L ¬°;Ó?Ó@×HÑHÓJ€DØ,0¯I©I°hÔ,?ó uÑ,? DØ—‘˜'×"ô  Ø+/¯8©8°GÓ+<×+GÑ+GÈ×+Pô  ØUY×U]ÑU]Ð^hÓUiÐmsÑUsô  ˆd�h‰h�wÖÑ,?€Fð uá%+ÓH¡V˜´:¸h×3G�HˆH¡VÑHÐHùòuùâHs$   ÁC5Á9#C5Â!C5Â9C5ÃC:Ã,C:c                 ó4  € R RR^RRRRV RR.//p\         P                  ! \        P                  ! \         P                  ! V4      4      4      p\        VP                  R	4      ;'       g    / P                  R
4      ;'       g    / P                  R4      4      # )r`   ra   rb   rc   zAddons.GetAddonDetailsrd   ÚaddonidÚ
propertiesÚenabledre   r1   )rf   rg   r   rh   ri   Úboolr   )r#  rj   Úanswers   &  r   r!  r!  @  s„   € Ø˜%  q¨(Ð4LØ˜) X¨|¸i¸[ÐIðK€Gä�ZŠZœ×+Ò+¬D¯JªJ°wÓ,?Ó@ÓA€FÜ�&—*‘*˜XÓ&×,Ð,¨"×1Ñ1°'Ó:×@Ð@¸b×EÑEÀiÓPÓQÐQr   c                ó*  € \         P                  ! RP                  V 4      4       \        P                  ! 4       \
        ,           p\         P                  ! R4      '       g6   \        P                  ! 4       V8”  g   VP                  R4      '       g   KO  R# \         P                  ! R4       \        P                  ! 4       \        ,           p\        V 4      '       g6   \        P                  ! 4       V8”  g   VP                  R4      '       g   KD  R# R# )z¿Kodi installs it from its repositories; its question is answered Yes (the household asked for the update). Kodi
has no way to install an addon without asking (InstallAddon(id,true) asks too).zInstallAddon({})zWindow.IsActive(yesnodialog)r'   FzSendClick(yesnodialog,11)g      à?T)
r   r+   r    r<   Ú	monotonicÚDEPENDENCY_ASK_Sr   r,   ÚDEPENDENCY_Sr!  )r#  r-   Údeadlines   && r   Ú_install_dependencyr0  G  s´   € ô 	×ÒÐ*×1Ñ1°(Ó;Ô<Ü�~Š~ÓÔ"2Õ2€HÜ×$Ò$Ð%C×DÒDÜ�>Š>Ó˜hÔ&¨'×*>Ñ*>¸s×*CÔ*CÙÜ×ÒÐ3Ô4Ü�~Š~Ó¤,Õ.€HÜ˜×"Ò"Ü�>Š>Ó˜hÔ&¨'×*>Ñ*>¸s×*CÔ*CÙÙr   c                 ó  € \        4       P                  \        R ,           4       \        R
RRR\	        V \
        4      RT;'       g    \	        V \        4      R\	        V \        4      RRR\	        V \        4      /\        V4      B  R	# )r   rµ   rº   r·   r4   r   r’   r»   r¹   Nr   )
r   ÚclearPropertyr   r%   r5   ÚS_NOT_INSTALLEDrÆ   rÇ   rÄ   rT   )r1   rM   r4   s   &&&r   Ú_failedr4  W  sˆ   € Ü	ƒG×Ñœ& 8Õ+Ô,Ü	ñ p�ð p¤5¨´Ó#@ð pÀt×GeÐGeÌuÐUZÔ\dÓOeð pÜ˜œwÓ'ðpØ.5ðpÜAFÀuÌgÓAVðpÜZcÐdmÓZnôpr   c                óî  € \        V\        4      '       gc   \        V\        4      '       d]   \        V\        \        34      '       gA   \        V4      P                  P                  R4      ^ ,          R9  d   \        V \        4      # \        V\        4      '       d   \        V \        4      # \        V\        4      '       d#   \        V \        VP                  ^ ,          4      # \        V \        4      # )zfWhat the household reads about a failed install: the internet, the space, the package, the dependency.Ú.)r�   Úurllib3)Ú
isinstancerÚ   rt   ró   ÚTimeoutErrorr¡   rÜ   r•   r5   Ú
T_NO_SPACErâ   Ú	T_DAMAGEDrä   ÚT_DEPENDENCY_FAILEDr3   rÆ   )r1   r¥   s   &&r   Ú_reasonr=  ]  s¬   € ä�#”w×Ò¤J¨s´G×$<Ò$<ÄZÐPSÔVeÔgsÐUt×EuÒEuÜ(,¨S«	×(<Ñ(<×(BÑ(BÀ3Ó(GÈÕ(JÐRiÔ(iÜ�UœJÓ'Ð'Ü�#”w×ÒÜ�UœIÓ&Ð&Ü�#Ô'×(Ò(Ü�UÔ/°·±¸!µÓ=Ð=Ü�œÓ!Ð!r   c                  ó”   € \         P                  P                  ! \        P                  ! R P                  \        4      4      .V O5!  # )z special://profile/addon_data/{}/)rZ   rV   r\   rW   rX   r    r‡   )Úpartss   *r   Ú_datar@  i  s3   € Ü�7‰7�<Š<œ×-Ò-Ð.P×.WÑ.WÔX`Ó.aÓbÐkÐejÓkÐkr   c            
     ó”  € ^ RI Hp  \        \        4      p\        P
                  ! VRR7       \        P                  P                  V P                  4       4      '       g   R# \        P                  ! V4       \        \        P                  ! V P                  4       ^R7      4      ;_uu_ 4       p\        \        P                  ! \        P                  P                  WP                  4      4      4      ;_uu_ 4       pVP!                  V4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)zZB6: leaving the stable version for a beta keeps the library as the stable version left it.©ÚstoreTr  N©r„   )Úwcs.library2rC  r@  ÚBACKUPrê   r  rZ   rV   r  Údb_pathr  r   Úsqlite3Úconnectr\   ÚDB_NAMEÚbackup)rC  r  ÚliveÚcopys       r   Ú_save_backuprN  m  s¶   € å"Ü”6‹]€FÜ
‡M‚M�&¨Õ-Ü�7‰7�>‰>˜%Ÿ-™-›/×*Ò*ÙÜ‡K‚K�ÔÜ	”—’ §¡£¸!Ô<×	=Ô	=ÀÜ”G—O’O¤B§G¡G§L¡L°¿¹Ó$GÓH×IÔIÈTØ�‰�DÔ÷ J÷ 
>Ñ	=ßI×Iú÷ 
>×	=Ð	=ús%   Â0AD6Ã?D#	ÄD6Ä#D3Ä.D6Ä6E	c           
     ó"  € ^ RI Hp \        P                  P	                  R\
        P                  P                  V \        RRR4      4      p\        P                  P                  V4      pVP                  P                  V4       \        VR4      '       d&   VP                  VP                  4       4      '       d   R# \
        P                  P                  \        \         4      VP"                  4      p\
        P                  P%                  V4      '       g(   \&        P(                  ! R\&        P*                  4       R# \&        P(                  ! R	\&        P,                  4       \/        \0        P2                  ! V4      4      ;_uu_ 4       p\/        \0        P2                  ! VP                  4       ^R
7      4      ;_uu_ 4       pVP5                  V4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)zÊB6: before going back, the stable version's own code says whether it reads the library the beta leaves; when it
does not, the library from before the beta comes back. The way back is never refused (B3).rB  Úmilionar_incoming_storeÚwcsÚlibrary2zstore.pyÚreadableNuU   [MilionÃ¡Å™ Update] the stable version cannot read the library and there is no backupuU   [MilionÃ¡Å™ Update] the stable version cannot read the library: the backup comes backrD  )rE  rC  Ú	importlibÚutilÚspec_from_file_locationrZ   rV   r\   r‡   Úmodule_from_specÚloaderÚexec_moduleÚhasattrrS  rG  r@  rF  rJ  r  r   r    ÚLOGERRORr£   r   rH  rI  rK  )r  rC  ÚspecÚincomingrK  ÚsavedrL  s   &      r   Ú_check_datar_  z  s?  € õ #Ü�>‰>×1Ñ1Ø!¤2§7¡7§<¡<°¼À%ÈÐU_Ó#`ób€Dä�~‰~×.Ñ.¨tÓ4€HØ‡K�K×Ñ˜HÔ%Ü�8˜Z×(Ò(¨H×,=Ñ,=¸e¿m¹m»o×,NÒ,NÙÜ�W‰W�\‰\œ%¤›-¨¯©Ó7€FÜ�7‰7�>‰>˜&×!Ò!Ü�ŠÐhÔjn×jwÑjwÔxÙÜ‡H‚HÐdÔfj×fuÑfuÔvÜ	”—’ Ó(×	)Ô	)¨U´G¼G¿OºOÈEÏMÉMËOÐegÔ<h×4iÔ4iÐmqØ�‰�TÔ÷ 5j×	)Ñ	)×4i×4iú×	)×	)Ð	)ús$   Æ8G=ÇG*	ÇG=Ç*G:Ç5G=Ç=H	c           	     óŒ  a aaa	a
€ S ;'       g    \         P                  ! \        4      o \        S 4      '       d(   \        P
                  ! R\        P                  4       R# S P                  R4      o	S'       d   \        P                  ! SS	4      '       g   R# \        R4      o^ RIHp VP                  4       '       g   \        S S	4       R# V VV	V3R lo
S
! \        S \         ^ 4      4       \"        P$                  P'                  \(        P*                  ! R4      R\,        4      p \/        SV V
3R	 l4       \        P0                  ! 4       p\3        V4       F6  pS
! \        S \4        V4      4       \7        WT4      '       d   K-  \9        V4      h	  \        P:                  ! S4      '       d(   \        P:                  ! S	4      '       g   \=        4        MC\        P:                  ! S	4      '       d(   \        P:                  ! S4      '       g   \?        V4       S
! \        S \P        4      4       \"        P$                  P'                  \"        P$                  PS                  \"        P$                  PU                  \V        4      4      R4      p\        PX                  ! RPC                  VS4      4       R#   \@         dƒ   p\        P
                  ! R
PC                  \E        T4      PF                  T4      \        PH                  4       \J        PL                  ! TRR7       \        S S	\O        S T4      4        Rp?R# Rp?ii ; i)zjAn explicit click installs `version` right here, newer or the way back; Kodi's automatic updates stay off.uH   [MilionÃ¡Å™ Update] development workspace: no update from the repositoryNrE   rÀ   )Úupdate_policyc                 ó†   <€ \        R
R RRSR\        S\        4      RV RRR\        S\        4      RS/\	        SS4      B  R	# )rµ   Ú
installingrÀ   r·   r4   r¸   rœ   r¹   r   Nr   )r%   r5   ÚS_INSTALLINGrÄ   rT   )r4   r1   rÑ   rM   rE   s   &€€€€r   rµ   Úinstall.<locals>.stateœ  si   ø€ Üñ 	m�Lð 	m°Gð 	mÄeÈEÔS_ÓF`ð 	mÐgkð 	mØð	mÜ%*¨5´'Ó%:ð	mØCJð	mÜNWÐXaÐcjÓNkô	mr   r  r  c                 ó2   <€ S! \        S\        V 4      4      # r   )r5   ÚT_DOWNLOADING)rù   r1   rµ   s   &€€r   Ú<lambda>Úinstall.<locals>.<lambda>£  s   ø€ ©¬e°E¼=È'Ó.RÔ(Sr   u*   [MilionÃ¡Å™ Update] install failed: {}: {}Tr  zupdate_apply.pyzRunScript("{}",{}))-rÁ   rÂ   r‡   r^   r   r    r£   rY   r   r«   r   rQ  ra  Úenforcer4  r5   rg  rZ   rV   r\   rW   rX   r  r  r(   r$  ÚT_DEPENDENCYr0  rä   r~   rN  r_  rŸ   r    r¡   r¢   r[  rê   r  r=  ÚT_INSTALLINGrì   ÚabspathÚ__file__r+   )r1   rE   ra  r  r-   r#  r¥   ÚscriptrÑ   rM   rµ   s   ff      @@@r   r   r   �  s5  ü€ à×.Ð.”Y—_’_¤XÓ.€EÜ�E×ÒÜ�ŠÐ[Ô]a×]lÑ]lÔmÙØ×"Ñ" 9Ó-€Ißœ-×/Ò/°¸×CÒCÙÜÐ&Ó'€GÝ!Ø× Ñ ×"Ò"Ü��yÔ!Ù÷mð mñ 
Œ%�”} aÓ
(Ô)Ü�W‰W�\‰\œ'×/Ò/Ð0HÓIÈ6ÔSXÓY€FðÜˆwÕSÔTÜ—,’,“.ˆÜ,¨VÖ4ˆHÙ”%˜œ|¨XÓ6Ô7Ü& x×9Ô9Ü& xÓ0Ð0ñ 5ô ×&Ò& w×/Ò/¼×8SÒ8SÐT]×8^Ò8^Ü�NÜ×(Ò(¨×3Ò3¼M×<WÒ<WÐX_×<`Ò<`Ü˜Ôñ 
Œ%�”|Ó
$Ô%Ü�W‰W�\‰\œ"Ÿ'™'Ÿ/™/¬"¯'©'¯/©/¼(Ó*CÓDÐFWÓX€FÜ×ÒÐ,×3Ñ3°F¸GÓDÖEøô ô Ü�ŠÐ=×DÑDÄTÈ#ÃY×EWÑEWÐY\Ó]Ô_c×_lÑ_lÔmÜ�Š�f¨DÕ1Ü��y¤'¨%°Ó"5Ô6Ýûð	ús>   Ä)AJ6 Æ(J6 Æ0J6 Ç
J6 ÇJ6 Ç3J6 ÈJ6 Ê6MËA7L>Ì>Mc                 óô  € \        4       P                  R4      '       d   R# \        P                  P	                  \
        P                  ! R4      R4      p \        RR3 F•  p\        P                  P	                  W4      p\        P                  P                  V4      '       g   KI  \        P                  ! VRR7       \        P                  ! R	P                  V4      \        P                  4       K—  	  R# )
z®Service start: this version runs, so what an update cut short left in addons/temp goes (Kodi quit during the
swap); never while an update is swapping (update_apply.APPLYING).zmilionar.update.applyingNr  r  zmilionar-previouszmilionar-replacedTr  uB   [MilionÃ¡Å™ Update] left over from an update cut short: {} removed)r   r   rZ   rV   r\   rW   rX   r  r]   rê   r  r   r    r    ÚLOGINFO)r  r   rV   s      r   Útidyrr  ·  s¤   € ô ƒw×ÑÐ5×6Ò6ÙÜ�7‰7�<‰<œ×-Ò-Ð.FÓGÈÓP€DÜÐ+Ð-@ÓAˆÜ�w‰w�|‰|˜DÓ'ˆÜ�7‰7�=‰=˜×ÔÜ�MŠM˜$¨dÕ3Ü�HŠHÐY×`Ñ`ÐaeÓfÔhl×htÑhtÖuó	 Br   c                ó   € T ;'       g    \         P                  ! \        4      p \        R4      pV'       g   R# V P	                  R4      pT;'       g    \
        P                  ! 4       p\        4       P                  R4      '       g   \
        P                  ! R4      '       g   VP                  ^4      '       g   KT  R# \        P                  ! W24      '       d   \        W4       M¼\        RRRR\        V \         4      R	\        V \"        \%        V4      ^ ,          4      R
\        V \&        4      /\)        V4      B  \        4       P+                  \,        R,           4       \        P.                  ! V4      '       g&   \0        P2                  ! \5        \6        4      RR7       \
        P                  ! RP9                  \:        4      4      '       g,   \
        P<                  ! RP9                  \:        4      4       R# R# )zcService start: the new version Kodi just installed finishes the window the old one left installing.r   NrE   zmilionar.skin.installingzWindow.IsActive(home)rµ   rö   r·   r4   r¹   Tr  r   úActivateWindow({})r   )rÁ   rÂ   r‡   r   rY   r   r(   r   r   r   r,   r   r«   r4  r%   r5   ÚS_DONEÚT_DONErK   rÄ   rT   r2  r   r~   rê   r  r@  rF  r    r!   r+   )r1   r-   r   rM   s   &&  r   Úresumerw  Ä  sm  € à×.Ð.”Y—_’_¤XÓ.€EÜ�(‹^€FßÙØ×"Ñ" 9Ó-€IØ×'Ð'œŸš›€Gä
‹'×
Ñ
Ð8×
9Ò
9Ä×AWÒAWÐXo×ApÒApØ×Ñ ×"Ô"ÙÜ×Ò˜Y×/Ò/Ü�Õ!äñ 	G�Fð 	G¤U¨5´&Ó%9ð 	GÄÀeÌVÔU\Ð]fÓUgÐhiÕUjÓ@kð 	GÜ˜e¤WÓ-ð	GÜ1:¸9Ó1Eò	Gä‹×Ñœf xÕ/Ô0Ü×*Ò*¨9×5Ò5Ü�MŠMœ%¤›-°tÕ<Ü×!Ò!Ð"7×">Ñ">¼vÓ"F×GÒGÜ×ÒÐ0×7Ñ7¼Ó?Ö@ñ Hr   c                óþ  € \         P                  ! \        4      pV P                  RR4      pVR8X  df   \        P
                  ! RP                  \        4      4      '       g*   \        P                  ! RP                  \        4      4       \        V4       R# VR8X  d@   \        R4      pVR8X  d   \        V4       R# VR8X  d   \        V\        R	4      4       R# R# VR
8X  d   \        V\        R4      4       R# R# )zmThe window's actions: `do=check` (it opens), `do=primary` (its main button), `do=alternate` (its second one).ÚdorÔ   r   rt  r   r’   r»   r   r½   r¾   r¿   N)rÁ   rÂ   r‡   r   r   r   r    r!   r+   rÔ   r   r   )rd   r1   ÚstepÚactions   &   r   Úrunr|  Ü  s¿   € ä�OŠOœHÓ%€EØ�:‰:�d˜GÓ$€DØˆw„Ü×%Ò%Ð&;×&BÑ&BÄ6Ó&J×KÒKÜ×ÒÐ 4× ;Ñ ;¼FÓ CÔDÜˆeŽØ	�Ô	Ü�f“ˆØ�WÔÜ�%ŽLØ�yÔ Ü�Eœ4Ð 1Ó2Ö3ñ !à	�Ô	Ü�”tÐ/Ó0Ö1ñ 
r   )rµ   rM   rN   rO   rP   rÀ   r·   r4   r   r’   r½   r¾   r¿   r¹   r¸   r   )r	  zmain.pyz
service.py)iø  iù  iú  iû  iü  iý  )iþ  iÿ  i €  i€  i€  i
€  i¥‹  i¦‹  )i€  i€  i€  i	€  )ißŒ  iàŒ  iáŒ  iâŒ  iãŒ  iäŒ  ièŒ  )r   r   )NN)qrß   Ú
contextlibr   r>   Úimportlib.utilrT  rf   rZ   r9   rê   rH  r<   rý   rÿ   Úxml.etree.ElementTreeÚetreeÚElementTreern   r   rÁ   r	   rW   rQ  r   r‡   rm   rv   r!   r   r   rž   rF  rŽ   r*   rò   r  r  rÃ   ÚS_AVAILABLErÈ   rd  ru  rÅ   r3  rÉ   rl  rv  rÆ   rÌ   r°   rg  rk  r:  r;  r<  rî   r-  r.  Ú	B_INSTALLrÎ   rÇ   rÄ   ÚS_BETAÚS_BACKÚB_BETAÚB_BACKÚB_INSTALL_VERSIONr¯   r±   ÚC_NEWÚC_BETAÚC_STABLErË   r   r   r%   r"   r5   rK   rT   r^   rk   rx   r|   r€   rš   r¦   r­   r³   rÔ   rØ   rt   rÚ   r”   râ   rŸ   rä   rú   r  rü   r  r$  r!  r0  r4  r=  r@  rN  r_  r   rr  rw  r|  r   r   r   Ú<module>rŒ     s   ðñõ Û Û Û Û 	Û 	Û Û Û Û Û ß "Ð "ã Û Û Û å à"€Ø
€ØF€
Ø	€Ø	€ð
q€à€Ø	€Ø€	Ø€Ø€Ø€Ø1€àEmÑ B€
ˆK˜ L°&¸(Ø€ðY<Ñ U€	ˆ<˜ ¨5°&¸-Èà-2°E¸5Ð *€
ˆIÐ*Ø€ØÐ Ø€Ø'AÑ $€	ˆ7�G˜WØDsÑ A€ˆ�˜Ð 1°6¸6Ø ¨Ð €€vˆxà	�&˜& &¨&Ð1°9¸{ÈEÐS\Ð^oÐ>pØ	�&˜( F¨FÐ3ð	5€ò!ò.òòò0ò
7ô jògòTò
	ò6òWôaò	ô
òPô]ò@eô
Yˆgô YôKˆjô Kô>�yô >òVò( ò#òò"IòRòô pò	"òlò
òô&'FòT
vôAô02r   