+
    Ki_	  c                   s    ^ RI t ^ RIHt ^ RIHtHt ^ RIHt ^ RIH	t	 ^ RI
Ht RRR	R
RRRRRRRR/t. ROtRR.tR tR tR# )i    N)write_game_config)add_game	get_games)logger)RECOMMENDED_CORES)slugifyZmesenZNESZgambattezGameboy / Gameboy ColorZsneszSuper NintendoZmupen64plus_nextzNintendo 64Z	picodrivez2Master System / Game Gear / Genesis / MegaCD / 32xZoperaZ3DOZ!ZSc                s    \          F  pV P                  RV,          R4      p K  	  \         F  pV P                  RV,          R4      p K  	  RV 9   d   RV P                  RR4      ,          p V P                  4       p V # )z9Remove known flags from ROM filename and apply formattingz (%s)Z z[%s]z, ThezThe %s)	ROM_FLAGSZreplaceEXTRA_FLAGSZstrip)nameZflags   & >/usr/lib/python3.14/site-packages/lutris/scanners/retroarch.pyclean_rom_namer
   )   sj    ||GdNB/ ||FTM2. $$,,w33::<DK    c                s   \         P                  ! V 4      pV Uu0 uF)  p\         P                  P                  V4      ^,          kK+  	  pp/ p\        P
                  ! 4        F*  w  rVVP                  R. 4       F  pWs9   g   K  WTV&   K  	  K,  	  . pV F  p\         P                  P                  V4      w  rWt9  d   K,  \        P                  ! RV	4       \        V	4      p
WG,          pRRWG,          R\         P                  P                  W4      //pV
: RV: 2p\        RV/R7      pV'       d   K  \        W4      p\        V	R	V
V ^VVR
7      pVP                  V4       K  	  V# u upi )z'Add a directory of ROMs as Lutris gamesZ
extensionszImporting '%s'ZgamecoreZ	main_filez
-libretro-installer_slug)ZfiltersZlibretro)r   ZrunnerslugZ	directoryZ	installedr   
configpath)osZlistdirZpathZsplitextr   ZitemsZgetr   Zinfor   Zjoinr   r    r   Zappend)ZdirnameZfilesZfilenameZfolder_extensionsZcore_matchesr   Z	core_dataZextZadded_gamesr   r   Zconfigr   Zexisting_gamer   Zgame_ids   &               r	   scan_directoryr   5   sT   JJwEGLMu8))(3A66uML,224==r2C'$(S! 3 5 KGG$$X.	"$d+t} 6<#4k277<<PWCbcd-148!+;^*LM&t4
)!
 	7#- . = Ns   /E+)ZUSAZEuropeZWorldZJapanz
Japan, USAzUSA, EuropeZProtozSGB EnhancedzRev AzV1.1ZFZUZEZUEZWZM3)r   Zlutris.configr    Zlutris.database.gamesr   r   Zlutris.util.logr   Z!lutris.util.retroarch.core_configr   Zlutris.util.stringsr   ZSCANNERSr   r   r
   r   ) r   r	   <module>r      s]    	 + 5 " ? ' U)
EU	& Cj	!r   