1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 17:42:20 +03:00

Also send balance on Update.

This commit is contained in:
Jonathan Harris 2016-10-27 19:09:41 +01:00
parent 4a1770f165
commit 70e9976a34

View File

@ -446,6 +446,17 @@ class AppWindow:
if not old_status:
self.status['text'] = ''
# Update credits and send to EDSM
if data['commander'].get('credits') is not None:
monitor.credits = (data['commander']['credits'], data['commander'].get('debt', 0))
if config.getint('output') & config.OUT_SYS_EDSM and not monitor.is_beta:
try:
self.edsm.setcredits(monitor.credits)
except Exception as e:
# Not particularly important so silent on failure
if __debug__: print_exc()
except companion.VerificationRequired:
return prefs.AuthenticationDialog(self.w, partial(self.verify, self.getandsend))