Skip to content

Commit ee1030e

Browse files
committed
Define XalClientParameters fields as string, rename app_config -> app_config_file in main.py
1 parent 91b0dcf commit ee1030e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

auth/models.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ class XCloudTokenResponse(BaseModel):
8888

8989

9090
class XalClientParameters(BaseModel):
91-
UserAgent: XalUserAgents
92-
AppId: XalAppId
93-
DeviceType: XalDeviceType
91+
UserAgent: str
92+
AppId: str
93+
DeviceType: str
9494
ClientVersion: str
95-
TitleId: XalTitleId
96-
RedirectUri: XalRedirectUri
97-
QueryDisplay: XalQueryDisplay
95+
TitleId: str
96+
RedirectUri: str
97+
QueryDisplay: str

main.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,17 @@ async def main(command: str):
102102
"""
103103

104104
if command == 'xhome' or command == 'smartglass':
105-
app_config = APP_CONFIG_XBOXBETA_FILE
105+
app_config_file = APP_CONFIG_XBOXBETA_FILE
106106
xal_params = IOS_XBOXBETA_APP_PARAMS
107107
elif command == 'xcloud':
108-
app_config = APP_CONFIG_XBOXGAMEPASS_FILE
108+
app_config_file = APP_CONFIG_XBOXGAMEPASS_FILE
109109
xal_params = ANDROID_GAMEPASS_BETA_PARAMS
110110
else:
111111
print(':: Unexpected command...')
112112
return
113113

114114
try:
115-
config = AppConfiguration.parse_file(app_config)
115+
config = AppConfiguration.parse_file(app_config_file)
116116
except Exception as e:
117117
print(f'Failed to parse app configuration! Err: {e}')
118118
print('Initializing new config...')
@@ -142,7 +142,7 @@ async def main(command: str):
142142
"""
143143
Saving app config
144144
"""
145-
with io.open(app_config, 'wt') as f:
145+
with io.open(app_config_file, 'wt') as f:
146146
f.write(config.json(indent=2))
147147

148148
if command == 'smartglass' or command == 'xhome':

0 commit comments

Comments
 (0)