+
    Ki`  c                   s<    R t ^ RIt^ RIHt ^ RIHt ^ RIHt R t	R# )zLoads game media in parallelN)MEDIA_CACHE_INVALIDATED)system)loggerc                s   / p^p\         P                  P                  VR7      ;_uu_ 4       pV P                  4        UUu/ uF,  w  rVV'       g   K  VP	                  VP
                  WV4      VbK.  	  ppp\         P                  P                  V4       F>  pWx,          p VP                  4       p	\        P                  ! V	4      '       g   K:  WV&   K@  	  RRR4       V'       d   \        P                  ! 4        V# u uppi   \         d$   p
\        P                  ! RYZ4       Rp	 Rp
?
L|Rp
?
ii ; i  + '       g   i     Lf; i)zsDownload a list of media files concurrently.

Limits the number of simultaneous downloads to avoid API throttling.
)Zmax_workersz%r failed: %sN)
concurrentZfuturesZThreadPoolExecutorZitemsZsubmitZdownloadZas_completedZresultZ	Exceptionr   Z	exceptionr   Zpath_existsr    Zfire)Z
media_urlsZservice_mediaZiconsZnum_workersZexecutorZslugZurlZfuture_downloadsZfutureZpathZexs   &&         B/usr/lib/python3.14/site-packages/lutris/gui/views/media_loader.pydownload_mediar   
   s   
 EK				.	.;	.	G	G8V`VfVfVh
VhloDHOOM22D>DVh 	 
 !((556FGF#+D}} !!$''"d H	 
H $$&L
    $; 
H	GsS   D5C>
!C>
3-D5!D1D5D5>D5D2	D-	(D5-D2	2D55E	)
Z__doc__Zconcurrent.futuresr   Zlutris.gui.widgets.utilsr    Zlutris.utilr   Zlutris.util.logr   r   )     r   <module>r      s    "  <  "r   