mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-19 10:27:38 +03:00
Stop sending EDDN blackmarket messages
This commit is contained in:
parent
e438ba216a
commit
323b414e19
@ -679,23 +679,6 @@ class AppWindow:
|
||||
|
||||
self.eddn.export_journal_entry(monitor.cmdr, monitor.is_beta, entry)
|
||||
|
||||
elif (config.getint('output') & config.OUT_MKT_EDDN and monitor.cmdr and
|
||||
entry['event'] == 'MarketSell' and entry.get('BlackMarket')):
|
||||
# Construct blackmarket message
|
||||
msg = OrderedDict([
|
||||
('systemName', monitor.system),
|
||||
('stationName', monitor.station),
|
||||
('timestamp', entry['timestamp']),
|
||||
('name', entry['Type']),
|
||||
('sellPrice', entry['SellPrice']),
|
||||
('prohibited' , entry.get('IllegalGoods', False)),
|
||||
])
|
||||
|
||||
self.status['text'] = _('Sending data to EDDN...')
|
||||
self.w.update_idletasks()
|
||||
self.eddn.export_blackmarket(monitor.cmdr, monitor.is_beta, msg)
|
||||
self.status['text'] = ''
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
if __debug__: print_exc()
|
||||
self.status['text'] = _("Error: Can't connect to EDDN")
|
||||
|
6
eddn.py
6
eddn.py
@ -228,9 +228,3 @@ class EDDN:
|
||||
self.parent.w.update_idletasks()
|
||||
self.send(cmdr, msg)
|
||||
self.parent.status['text'] = ''
|
||||
|
||||
def export_blackmarket(self, cmdr, is_beta, msg):
|
||||
self.send(cmdr, {
|
||||
'$schemaRef' : 'https://eddn.edcd.io/schemas/blackmarket/1' + (is_beta and '/test' or ''),
|
||||
'message' : msg
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user