
    8f*	                         d dl Z d dlZd dlmc mZ d dl mZ d dlmZ d dl	m
Z
 de
eef   fdZedk(  r8 e       Zej                         D ]  \  ZZ edj'                  ee              yy)	    N)NoOptionError)Path)Dictreturnc                     	 i } t         j                  j                  d      }t        |      j	                  dd      }|j                         s| S 	 t        |j                  d            ^}}t        |      5 }d|j                         z   }d d d        t        j                         }|j                         	 t        |j                  dd            }|j                         s| S |j'                         D ]j  }		 |	j	                  d
d      }
t)        j*                  |
      }|j-                         }|j/                  d      }||j0                  r|j0                  }|	| |<   l | S # t        $ r | cY S w xY w# 1 sw Y   xY w# t        $ rC t        t         j                   d         d	z  }|j#                  dd|j%                                Y w xY w# t2        $ r Y w xY w)Nz%LocalAppData%zElectronic Artsz
EA Desktopz
user_*.iniz[mod_organizer]
mod_organizerzuser.downloadinplacedirProgramW6432zEA Games__Installerzinstallerdata.xmlz.//contentIDs/contentID[1])ospath
expandvarsr   joinpathexistslistglob
ValueErroropenreadconfigparserConfigParserread_stringgetr   environset__str__iterdiretparsegetrootfindtextFileNotFoundError)gameslocal_app_data_pathea_desktop_settings_pathuser_ini_fini_contentconfiginstall_pathgame_dirinstaller_filexml_treeroot
content_idgame_ids                  oC:\Program Files (x86)/Steam/steamapps/common/Skyrim Special Edition/MO2/plugins\basic_games\eadesktop_utils.py
find_gamesr3      s     E'',,-=>#$78AA<  $**,499,GH1 
h 51)AFFH45 &&(F
{#WFJJ8QRS
   ((* 	%..}>QRNxx/H##%D
 #?@J%*//$//!)g" LK  
5 5  WBJJ~67*D

?$=|?S?S?UVW* ! 		sD   E& 8E7:F ;A'G&E43E47F A	GG	GG__main__zFound game with id {} at {}.)r   r   xml.etree.ElementTreeetreeElementTreer   r   pathlibr   typingr   strr3   __name__r#   itemskvprintformat     r2   <module>rC      sv     	 " " &  9DdO 9x zLE ;1,33Aq9:; rB   