mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-11-20 03:02:40 +03:00
Update for New Enum
This commit is contained in:
3 files changed
+9
-9
No files matched your search
@@ -1244,7 +1244,7 @@ class AppWindow:
|
||||
logger.error(msg)
|
||||
raise ValueError(msg)
|
||||
|
||||
if capi_response.capi_data.source_endpoint == companion.session.FRONTIER_CAPI_PATH_FLEETCARRIER:
|
||||
if capi_response.capi_data.source_endpoint == companion.CAPIEndpoint.FLEETCARRIER:
|
||||
# Fleetcarrier CAPI response
|
||||
# Validation
|
||||
if 'name' not in capi_response.capi_data:
|
||||
|
||||
+6
-6
@@ -669,7 +669,7 @@ class EDDN:
|
||||
'message': message,
|
||||
'header': self.standard_header(
|
||||
game_version=self.capi_gameversion_from_host_endpoint(
|
||||
data.source_host, companion.Session.FRONTIER_CAPI_PATH_MARKET
|
||||
data.source_host, companion.CAPIEndpoint.MARKET
|
||||
),
|
||||
game_build=''
|
||||
),
|
||||
@@ -780,7 +780,7 @@ class EDDN:
|
||||
},
|
||||
'header': self.standard_header(
|
||||
game_version=self.capi_gameversion_from_host_endpoint(
|
||||
data.source_host, companion.Session.FRONTIER_CAPI_PATH_SHIPYARD
|
||||
data.source_host, companion.CAPIEndpoint.SHIPYARD
|
||||
),
|
||||
game_build=''
|
||||
),
|
||||
@@ -842,7 +842,7 @@ class EDDN:
|
||||
},
|
||||
'header': self.standard_header(
|
||||
game_version=self.capi_gameversion_from_host_endpoint(
|
||||
data.source_host, companion.Session.FRONTIER_CAPI_PATH_SHIPYARD
|
||||
data.source_host, companion.CAPIEndpoint.SHIPYARD
|
||||
),
|
||||
game_build=''
|
||||
),
|
||||
@@ -1552,7 +1552,7 @@ class EDDN:
|
||||
'message': entry,
|
||||
'header': self.standard_header(
|
||||
game_version=self.capi_gameversion_from_host_endpoint(
|
||||
data.source_host, companion.Session.FRONTIER_CAPI_PATH_MARKET
|
||||
data.source_host, companion.CAPIEndpoint.MARKET
|
||||
), game_build=''
|
||||
),
|
||||
}
|
||||
@@ -1953,10 +1953,10 @@ class EDDN:
|
||||
|
||||
#######################################################################
|
||||
# endpoint
|
||||
if capi_endpoint == companion.Session.FRONTIER_CAPI_PATH_MARKET:
|
||||
if capi_endpoint == companion.CAPIEndpoint.MARKET:
|
||||
gv += 'market'
|
||||
|
||||
elif capi_endpoint == companion.Session.FRONTIER_CAPI_PATH_SHIPYARD:
|
||||
elif capi_endpoint == companion.CAPIEndpoint.SHIPYARD:
|
||||
gv += 'shipyard'
|
||||
|
||||
else:
|
||||
|
||||
@@ -302,7 +302,7 @@ class StatsDialog:
|
||||
return
|
||||
|
||||
# TODO: This needs to use cached data
|
||||
if companion.session.FRONTIER_CAPI_PATH_PROFILE not in companion.session.capi_raw_data:
|
||||
if companion.CAPIEndpoint.PROFILE not in companion.session.capi_raw_data:
|
||||
logger.info('No cached data, aborting...')
|
||||
hotkeymgr.play_bad()
|
||||
# LANG: No Frontier CAPI data yet when trying to use 'File' > 'Status'
|
||||
@@ -310,7 +310,7 @@ class StatsDialog:
|
||||
return
|
||||
|
||||
capi_data = json.loads(
|
||||
companion.session.capi_raw_data[companion.session.FRONTIER_CAPI_PATH_PROFILE].raw_data
|
||||
companion.session.capi_raw_data[companion.CAPIEndpoint.PROFILE].raw_data
|
||||
)
|
||||
|
||||
if not capi_data.get('commander') or not capi_data['commander'].get('name', '').strip():
|
||||
|
||||
Reference in new issue
Block a user