mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 07:47:14 +03:00
Fix for setting Coriolis link on cAPI Update
This commit is contained in:
parent
0eaa61bdd9
commit
37ec61a28d
@ -37,7 +37,7 @@ def shipyard_url(loadout, is_beta, data=None):
|
||||
plug.show_error(_("Where are you?!")) # Shouldn't happen
|
||||
elif not data.get('ship', {}).get('name') or not data.get('ship', {}).get('modules'):
|
||||
plug.show_error(_("What are you flying?!")) # Shouldn't happen
|
||||
elif (loadout['ShipID'] is not None and data['ship']['id'] != loadout['ShipID']) or (loadout['Ship'] and data['ship']['name'].lower() != loadout['Ship']):
|
||||
elif (loadout.get('ShipID') is not None and data['ship']['id'] != loadout['ShipID']) or (loadout.get('Ship') and data['ship']['name'].lower() != loadout['Ship']):
|
||||
plug.show_error(_('Error: Frontier server is lagging')) # Raised when Companion API server is returning old data, e.g. when the servers are too busy
|
||||
else:
|
||||
string = json.dumps(companion.ship(data), ensure_ascii=False, sort_keys=True, separators=(',', ':')).encode('utf-8') # most compact representation
|
||||
|
@ -269,7 +269,7 @@ def cmdr_data(data, is_beta):
|
||||
'event': 'Coriolis',
|
||||
'timestamp': timestamp,
|
||||
'_shipId': data['ship']['id'],
|
||||
'url': plug.invoke('Coriolis', None, 'shipyard_url', entry, is_beta, data)
|
||||
'url': plug.invoke('Coriolis', None, 'shipyard_url', {}, is_beta, data)
|
||||
}))
|
||||
this.lastship = ship
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user