§
   £½ITýÆ˜ã                   óÄ   — d Z ddlZddlZddlZddlZddlZdZdZdZdZ	dZ
dZd	Zd
\  ZZZZZZdZ ej        ¦   «         Zd„ Zd„ Zd„ Z G d„ de¦  «        Zdd„Zd„ Zd„ ZdS )a)  Vinyl stays off until the user switches it on in its section (docs/plan/onboarding/000-plan.md D22).

Until then nothing of Vinyl loads (wcs.skin.warm.hidden) and the section shows only its hero: what Vinyl is, with the
button that switches it on (D25). The hero reads the one card of the first row, which the skin keeps hidden and hands its
focus to the button (`milionar.hero.only`, gen_cinema.HERO_ONLY_SLOTS): the section is never empty and costs nothing. An installation that already
has Vinyl's data from an earlier version counts as switched on.
é    Nzplugin.video.milionarÚvinyl_activatedzmilionar.vinyl.activez@RunPlugin(plugin://plugin.video.milionar/?action=vinyl_activate)z5plugin://plugin.video.milionar/?action=vinyl_activatezDefaultMusicAlbums.pngzvinyl-activation)iÙ‹  iÚ‹  iÛ‹  iÜ‹  iÝ‹  iÞ‹  é-   c                  ób   — t          j        d¦  «                             t          ¦  «        dk    S )Né'  Ú1)ÚxbmcguiÚWindowÚgetPropertyÚPROPERTY© ó    úb/Users/chudy/Library/Application Support/Kodi/addons/plugin.video.milionar/wcs/vinyl/activation.pyÚactiver      s%   € ÝŒ>˜%Ñ Ô ×,Ò,­XÑ6Ô6¸#Ò=Ð=r   c                  óì   — ddl m}  t          j                             |                      d¦  «        ¦  «        }	 t          d„ t          j        |¦  «        D ¦   «         ¦  «        S # t          $ r Y dS w xY w)Nr   ©ÚclientÚcuratorc              3   ó@   K  — | ]}|                      d ¦  «        V — ŒdS ©Úvinyl_N)Ú
startswith)Ú.0Únames     r   ú	<genexpr>z_has_data.<locals>.<genexpr>$   s.   è è € ÐLÐL°�4—?’? 8Ñ,Ô,ÐLÐLÐLÐLÐLÐLr   F)	Ú	wcs.vinylr   ÚosÚpathÚdirnameÚ
cache_pathÚanyÚlistdirÚOSError)r   Úfolders     r   Ú	_has_datar$       sƒ   € Ø Ð Ð Ð Ð Ð ÝŒW�_Š_˜V×.Ò.¨yÑ9Ô9Ñ:Ô:€FðÝÐLÐL½¼ÀFÑ9KÔ9KÐLÑLÔLÑLÔLÐLøÝð ð ð Øˆuˆuðøøøs   º*A% Á%
A3Á2A3c                 ó4  — |                       t          ¦  «        dk    }|s+t          ¦   «         r|                      t          d¦  «         d}t	          j        d¦  «        }|r|                     t          d¦  «         n|                     t          ¦  «         |S )zVService: publish the switch. Vinyl's data from an earlier version switches it on once.ÚtrueTr   r   )	Ú
getSettingÚSETTINGr$   Ú
setSettingr   r	   ÚsetPropertyr   ÚclearProperty)ÚaddonÚonÚhomes      r   Úsyncr/   )   s‘   € à	×	Ò	�'Ñ	"Ô	" fÒ	,€BØð •)‘+”+ð Ø×Ò� &Ñ)Ô)Ð)ØˆÝŒ>˜%Ñ Ô €DØ	ð %Ø×Ò� 3Ñ'Ô'Ð'Ð'à×Ò�8Ñ$Ô$Ð$Ø€Ir   c                   ó$   — e Zd ZdZd„ Zd„ Zd„ ZdS )Ú_CardzXThe few ListItem calls wcs.skin.hero makes, kept as the properties of a row file's card.c                 ó   — i | _         d S ©N)Úprops)Úselfs    r   Ú__init__z_Card.__init__:   s   € ØˆŒ
ˆ
ˆ
r   c                 ó>   — || j         |                     ¦   «         <   d S r3   )r4   Úlower)r5   ÚkeyÚvalues      r   r*   z_Card.setProperty=   s   € Ø"'ˆŒ
�3—9’9‘;”;ÑÐÐr   c                 ó\   — | j                              |                     ¦   «         d¦  «        S )NÚ )r4   Úgetr8   )r5   r9   s     r   r
   z_Card.getProperty@   s    € ØŒz�~Š~˜cŸiši™kœk¨2Ñ.Ô.Ð.r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r6   r*   r
   r   r   r   r1   r1   7   sG   € € € € € ØbÐbðð ð ð(ð (ð (ð/ð /ð /ð /ð /r   r1   c           
      ón  — ddl m} | pt          j        t          ¦  «        } t          ¦   «         }|                     |d|                      t          ¦  «        |                      t          ¦  «        d|                      t          ¦  «        t          ¦  «         |                     d|                      t          ¦  «        ¦  «         |                     dt          ¦  «         |                     dd¦  «         |                     d	t          ¦  «         |                     d
d¦  «         d|j        t          fS )z1(label, properties, path) of the activation card.r   )ÚheroÚVinylr<   Úlabel2zart.iconzmilionar.hero.onlyr   zmilionar.execÚ
isplayabler&   )Úwcs.skinrC   Ú	xbmcaddonÚAddonÚADDON_IDr1   ÚtileÚgetLocalizedStringÚS_KICKERÚS_PLOTÚS_BUTTONÚACTIONr*   Ú	CARD_ICONr4   Ú	CARD_PATH)r,   rC   Úitems      r   ÚcardrT   D   s  € àÐÐÐÐÐØÐ.•Y”_¥XÑ.Ô.€EÝ‰7Œ7€DØ‡I‚Iˆd�G˜U×5Ò5µhÑ?Ô?À×AYÒAYÕZ`ÑAaÔAaÐceØ×&Ò&¥xÑ0Ô0µ&ñ:ô :ð :à×Ò�X˜u×7Ò7½ÑAÔAÑBÔBÐBØ×Ò�Z¥Ñ+Ô+Ð+Ø×ÒÐ)¨3Ñ/Ô/Ð/Ø×Ò�_¥fÑ-Ô-Ð-Ø×Ò�\ 6Ñ*Ô*Ð*Ø�D”J¥	Ð)Ð)r   c            
      óÖ  — ddl m} m} ddlm} |                     dd¦  «        }|                     |t          ¦   «         gt          dd|  	                    ¦   «         ¬¦  «         |  
                    dd|j        ¦  «         |                      ddd	d¦  «         t          d
 |d¦  «        d	z   ¦  «        D ]´}|                     |                     dt          |¦  «        ¦  «        ¦  «        r||                     |                     dt          |¦  «        ¦  «        g t          dd|  	                    ¦   «         ¬¦  «         |  
                    dt          |¦  «        |j        ¦  «         ŒµdS )zoService, while Vinyl is off: its first row holds the activation card (shown only as the hero), the others none.r   )ÚjournalÚrowfiles©Ú
slot_countÚvinylr   NT)ÚliveÚcodeé   é   )rG   rV   rW   Úwcs.skin.hero_contractrY   Úrow_nameÚpublishrT   ÚSIGÚstampÚ_flagÚONEÚ_shownÚrangeÚheadÚstrÚNONE)rV   rW   rY   r   Úslots        r   Ú	show_cardrl   S   s`  € à*Ð*Ð*Ð*Ð*Ð*Ð*Ð*Ø1Ð1Ð1Ð1Ð1Ð1Ø×Ò˜W cÑ*Ô*€DØ×Ò�T�D™FœF˜8¥S¨$°TÀÇÂÁÄÐÑPÔPÐPØ‡M‚M�'˜3 ¤Ñ-Ô-Ð-Ø‡N‚N�7˜C  DÑ)Ô)Ð)Ý�a˜˜ GÑ,Ô,¨qÑ0Ñ1Ô1ð =ð =ˆØ�=Š=˜×*Ò*¨7µC¸±I´IÑ>Ô>Ñ?Ô?ð 	=Ø×Ò˜X×.Ò.¨w½¸D¹	¼	ÑBÔBÀBÍÈTÐX\Ðcj×cpÒcpÑcrÔcrÐÑsÔsÐsØ�MŠM˜'¥3 t¡9¤9¨h¬mÑ<Ô<Ð<øð=ð =r   c            	      óº  ‡— t                                d¬¦  «        sdS t          j        t          ¦  «        } t          j        ¦   «         }	 |                     d|                      t          ¦  «        ¦  «         |  
                    t          d¦  «         t          j        d¦  «                             t          d¦  «         dd	lm}m} dd
lm} ddlm} t-          |                     ¦   «         |j        z  ¦  «        }d„ |D ¦   «         }|                     d¦  «         ddlmŠ |                     |¬¦  «         t7          ˆfd„|D ¦   «         ¦  «        }|sÌ|  
                    t          d¦  «         t          j        d¦  «                             t          ¦  «         |                     d|                      t:          ¦  «        ¬¦  «         t=          j        ¦   «                               d¦  «         	 | !                    ¦   «          t            "                    ¦   «          dS |                     d¦  «         | #                    d„ tI          d |d¦  «        dz   ¦  «        D ¦   «         d¬¦  «         t=          j        ¦   «         }	ddlm%}
 tI          tL          dz  ¦  «        D ]’}|
 '                    |
 (                    dd¦  «        ¦  «        pi }| )                    d¦  «        tT          k    r nF|	                      d¦  «        r0 | !                    ¦   «          t            "                    ¦   «          dS Œ“|                     d|                      tV          ¦  «        ¬¦  «         |	                      d¦  «         | !                    ¦   «          t            "                    ¦   «          dS # | !                    ¦   «          t            "                    ¦   «          w xY w) záThe card's button: Vinyl's data first (a live progress), then its rows; the card stays until they have cards.
    Runs where the action runs (a thread of its own in the service, wcs/skin/commands.py; or the plugin's process).F)ÚblockingNrD   r&   r   r   r   )ÚrefreshÚ	refresherrX   )Úwidgetsc                 ó<   — g | ]}|t          d ¦  «        d…         ‘ŒS r   )Úlen)r   Úrows     r   ú
<listcomp>zactivate.<locals>.<listcomp>p   s'   € Ð7Ð7Ð7¨3�3•s˜8‘}”}�~�~Ô&Ð7Ð7Ð7r   é   r   )Úsourcesc              3   óB   •K  — | ]}‰                      |¦  «        V — Œd S r3   )Úsnapshot)r   Úsourcer   s     €r   r   zactivate.<locals>.<genexpr>t   s/   øè è € Ð?Ð?¨V�—’ Ñ(Ô(Ð?Ð?Ð?Ð?Ð?Ð?r   Úfalseéd   )Úmessageé   éF   c                 ó   — h | ]}d |f’ŒS )rZ   r   )r   rk   s     r   ú	<setcomp>zactivate.<locals>.<setcomp>|   s   € ÐWÐWÐW¨T˜' 4˜ÐWÐWÐWr   r]   rZ   T)Úforce)rW   é   Úsigg      Ð?g      ø?),Ú_runningÚacquirerH   rI   rJ   r   ÚDialogProgressBGÚcreaterL   Ú	S_LOADINGr)   r(   r	   r*   r   rG   ro   rp   r_   rY   r   rq   ÚsortedÚactive_rowsÚ
VINYL_ROWSÚupdater   r    r+   ÚS_FAILEDÚxbmcÚMonitorÚwaitForAbortÚcloseÚreleaseÚrebuildrg   rW   ÚWAIT_Srh   r`   r=   rb   ÚS_READY)r,   Úprogressro   rp   rY   rq   Úrowsrw   ÚokÚmonitorrW   Ú_rh   r   s                @r   Úactivaterœ   a   s­  ø€ õ ×Ò UÐÑ+Ô+ð ØˆÝŒO�HÑ%Ô%€EÝÔ'Ñ)Ô)€Hð!Ø�Š˜ ×!9Ò!9½)Ñ!DÔ!DÑEÔEÐEØ×Ò� &Ñ)Ô)Ð)ÝŒ�uÑÔ×)Ò)­(°CÑ8Ô8Ð8Ø/Ð/Ð/Ð/Ð/Ð/Ð/Ð/Ø5Ð5Ð5Ð5Ð5Ð5Ø%Ð%Ð%Ð%Ð%Ð%Ý�i×+Ò+Ñ-Ô-°Ô0BÑBÑCÔCˆØ7Ð7°$Ð7Ñ7Ô7ˆØ�Š˜ÑÔÐØ$Ð$Ð$Ð$Ð$Ð$Ø�Š ˆÑ(Ô(Ð(ÝÐ?Ð?Ð?Ð?°wÐ?Ñ?Ô?Ñ?Ô?ˆØð 	Ø×Ò�W gÑ.Ô.Ð.ÝŒN˜5Ñ!Ô!×/Ò/µÑ9Ô9Ð9Ø�OŠO˜C¨×)AÒ)AÅ(Ñ)KÔ)KˆOÑLÔLÐLÝŒL‰NŒN×'Ò'¨Ñ*Ô*Ð*Øð 	�ŠÑÔÐÝ×ÒÑÔÐÐÐð 	�Š˜ÑÔÐØ�ŠÐWÐWµU¸1¸j¸jÈÑ>QÔ>QÐTUÑ>UÑ5VÔ5VÐWÑWÔWÐ_cˆÑdÔdÐdÝ”,‘.”.ˆØ%Ð%Ð%Ð%Ð%Ð%Ý•v ‘zÑ"Ô"ð 	ð 	ˆAØ—=’= ×!2Ò!2°7¸CÑ!@Ô!@ÑAÔAÐGÀRˆDØ�xŠx˜‰Œ¥#Ò%Ð%Ø�Ø×#Ò# DÑ)Ô)ð Øð 	�ŠÑÔÐÝ×ÒÑÔÐÐÐðà�Š˜ U×%=Ò%=½gÑ%FÔ%FˆÑGÔGÐGØ×Ò˜SÑ!Ô!Ð!à�ŠÑÔÐÝ×ÒÑÔÐÐÐøð 	�ŠÑÔÐÝ×ÒÑÔÐÐøøøs   ÁF)N+ È%C#N+ Ì7AN+ Î+/Or3   )rA   r   Ú	threadingr�   rH   r   rJ   r(   r   rP   rR   rQ   rb   rM   rN   rO   r‰   r–   rŽ   r•   ÚLockr…   r   r$   r/   Úobjectr1   rT   rl   rœ   r   r   r   ú<module>r       s   ððð ð 
€	€	€	Ø Ð Ð Ð à €€€Ø Ð Ð Ð Ø €€€à"€Ø
€Ø"€Ø	K€ØC€	Ø$€	Ø€Ø;cÑ 8€ˆ&�(˜I w°Ø	€Øˆ9Œ>ÑÔ€ð>ð >ð >ðð ð ðð ð ð
/ð 
/ð 
/ð 
/ð 
/ˆFñ 
/ô 
/ð 
/ð*ð *ð *ð *ð=ð =ð =ð(ð (ð (ð (ð (r   