+
    Ki  c                   s  a  R< tB0 t R t^ RIt^ RIt^ 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IHt Rt]t]! R	4      t]! R
4      .t]P,                  P/                  ]P0                  ! 4       R4      t]P,                  P/                  ]P4                  ! 4       R4      t]P,                  P9                  ]4      '       g   ]t]P,                  P/                  ]R4      t]! ]4      t]P?                  R4      ;'       g    ]P,                  P/                  ]R4      t ]P?                  R4      ;'       g    ]P,                  P/                  ]R4      t!]P?                  R4      ;'       g,    ]P,                  P/                  ]PD                  ! 4       R4      t#]P,                  P/                  ]#R4      t$]P,                  P/                  ]R4      t%]P,                  P/                  ]R4      t&]P,                  P/                  ] R4      t'] ^ k ]P,                  P/                  ]#R4      t(]P,                  P/                  ]#R4      t)]P,                  P/                  ]R4      t*]P,                  P/                  ]R4      t+]P,                  P/                  ]#R4      t,]P,                  P/                  ]P4                  ! 4       RRRR4      t-R]P\                  ^ ,          9   g1   R]P\                  ^ ,          9   g   R ]P\                  ^ ,          9   d   R!t/M5]P?                  R"4      ;'       g    ]P,                  P/                  ]R#4      t/]P?                  R$4      ;'       g    R%t0]0R&,           t1]0R',           t2]0R(,           t3]0R),           t4]P?                  R*4      ;'       g    R+t5]P?                  R,R-R.7      t6]Pn                  Pq                  R/4      R08g  ;'       d    ]P?                  R14      R28g  t9]P?                  R3R4R.7      t:]P?                  R5R6R.7      t;R7t<]P>                  t]Pz                  t=]P|                  t>]P~                  t?R8 R9 lt@R=R: R; lltAR# )>zInternal settings.N)gettext)Dictcast)GLib)__version__)logger)
SettingsIOZLutrisz(c) 2009 Lutris TeamzThe Lutris teamlutriszlutris.confZ
runner_dirZrunnersZruntime_dirZruntimeZ	cache_dirZtmpZgamesZwineZshadersZ	installerZbannersZcoverartzversions.jsonZiconsZhicolorZ128x128ZappsZ	nosetestsZnose2Zpytestz/tmp/pga.dbZpga_pathzpga.dbZwebsitezhttps://lutris.netz/api/installers/%sz$/api/installers/game/%s/revisions/%sz
/games/%s/z/api/runtimesZsteam_api_keyZ 34C9698CEB394AB4401D65927C6B3752Zsteam_family_include_ownZFalse)ZdefaultZLUTRIS_HIDE_MEDIAZ1Z
hide_mediaZTrueZdefault_resolution_widthZ1280Zdefault_resolution_heightZ720zFMozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0c                sR    V ^8  d   QhR\         R\        \         \         3,          /# )   	directoryreturn)strr   Zformat   "4/usr/lib/python3.14/site-packages/lutris/settings.py__annotate__r   K   s"      S T#s(^     c                s:   V '       d   \         P                  P                  V R4      p \         P                  P                  V4      '       d   \	        VRRR7      ;_uu_ 4       p\
        P                  ! V4      p\        V\        4      '       g   \        P                  ! RV4       \        \        \        \        3,          V4      uuRRR4       #  / # / #   + '       g   i     / # ; i  \         d#   p\        P                  ! RY4        Rp?/ # Rp?ii ; i)zReads the 'lutris.json' file in 'directory' and returns it as
a (new) dictionary. The file is missing, unreadable, unparseable, or not a dict,
this returns an empty dict instead.lutris.jsonZrutf-8Zencodingz2'%s' does not contain a dict, and will be ignored.NzFailed to read '%s': %s)ospathjoinisfileopenjsonZloadZ
isinstanceZdictr   Zerrorr   r   r   	Exception	exception)r	   r   fZ	json_dataexs   &    r   get_lutris_directory_settingsr   K   s     ww||I}5	Bww~~d##$g66! $		!I%i66%Y[_`S#X	:	 76 $ I2I 76 I  	B6AAI	Bs<   $C- C- %A$C	
C- C*	$C- *C- -D8DDc                sj    V ^8  d   QhR\         R\        \         \         3,          R\        R\        /# )r   r	   settingsmerger
   )r   r   Zboolr   r   r   r   r   ]   s2     ! !S !DcN !SW !cg !r   c           	     s   \         P                  P                  V R4      pV'       dD   \         P                  P                  V4      '       d   \	        V 4      pVP                  V4       Tp\         P                  P                  V R4      p \        VRRR7      ;_uu_ 4       pVP                  \        P                  ! V^R7      4       RRR4       \         P                  ! WS4        \         P                  P                  V4      '       d   \         P                  ! V4       R# R#   + '       g   i     Lf; i  \         d`   p\        P                  ! R	Y74        Rp?\         P                  P                  T4      '       d   \         P                  ! T4       R
# R
# Rp?ii ; i  \         P                  P                  T4      '       d   \         P                  ! T4       i i ; i)a]  Updates the 'lutris.json' file in the 'directory' given. If it does not exist, this method creates it. By
default, if it does exist this merges the values of settings into it, but in a shallow way - only the top level
entries are merged, not the content any of any sub-dictionaries. If 'merge' is False, this replaces the existing
'lutris.json', so that its settings are lost.

This function provides no way to remove a key; you can store nulls instead if appropriate.
If this 'lutris.json' file can't be updated (say, if 'settings' can't be represented) then this
logs the errors, but then returns False.r   zlutris.json.tmpZwr   r   )ZindentNTzCould not update '%s': %sF)r   r   r   r   r   Zupdater   Zwriter   ZdumpsZrenameZunlinkr   r   r   )r	   r   r    r   Zold_settingsZ	temp_pathr   r   s   &&&     r   set_lutris_directory_settingsr!   ]   sA    77<<	=1D%%4Y?H% Y(9:I
!)S733qGGDJJx23 4
		)"
 77>>)$$IIi  % 43  4d?77>>)$$IIi  %	 77>>)$$IIi  %sB   D< #(D)D< )D9	4D< <F&F!F) !F&&F) )>G'c                s@    V ^8  d   Qh/ ^ \         9   d
   \        ;R&   # )r   WINE_DIR)__conditional_annotations__r   r   r   r   r   r      s      D 1 0# 0E r   )T)Cr#   Z__doc__r   r   Zsysr    Z_Ztypingr   r   Zgi.repositoryr   r   r   Zlutris.util.logr   Zlutris.util.settingsr   ZPROJECTZVERSIONZ	COPYRIGHTZAUTHORSr   r   Zget_user_config_dirZ
CONFIG_DIRZget_user_data_dirZDATA_DIRZexistsZCONFIG_FILEZsioZread_settingZ
RUNNER_DIRZRUNTIME_DIRZget_user_cache_dirZ	CACHE_DIRZTMP_DIRZGAME_CONFIG_DIRZRUNNERS_CONFIG_DIRr"   ZSHADER_CACHE_DIRZINSTALLER_CACHE_DIRZBANNER_PATHZCOVERART_PATHZRUNTIME_VERSIONS_PATHZ	ICON_PATHZargvZDB_PATHZSITE_URLZINSTALLER_URLZINSTALLER_REVISION_URLZGAME_URLZRUNTIME_URLZSTEAM_API_KEYZSTEAM_FAMILY_INCLUDE_OWNZenvironZgetZ
SHOW_MEDIAZDEFAULT_RESOLUTION_WIDTHZDEFAULT_RESOLUTION_HEIGHTZDEFAULT_USER_AGENTZread_bool_settingZwrite_settingZSETTINGS_CHANGEDr   r!   r   )r#   s   @r   <module>r$      s     	 
      " +

$%	
  WW\\$224h?
77<<..0(;	ww~~j!!Jggll:}5l+PPrww||Hi/P
}-RRh	1R[)^^RWW\\$:Q:Q:SU]-^	
'',,y%
('',,z73WW\\*i8 Z0 077<<	95 ggll9k: ggll8Y/Xz2Y@ GGLL//17IyRXY	#((1+CHHQK!78sxxPQ{;RGz*NNbggll8X.NGI&>>*>//!$JJ l"(  1WW5W++,FPW+X ZZ^^/0C7ddC<L<L\<Z^d<d
++,FPV+W ,,-HRW,X ]  )) !!'' $! !r   