1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-15 16:50:34 +03:00

Allow auto open of EDSM when finding an uncharted system

This commit is contained in:
James Tandy 2016-01-03 02:24:48 +00:00
parent b6ac567711
commit f5913eefba

View File

@ -44,11 +44,15 @@ class EDSM:
if data == -1:
# System not present - but don't create it on the assumption that the caller will
self.result['img'] = EDSM._IMG_NEW
if (config.getint('EDSM_autoopen')):
webbrowser.open(self.result['url'])
elif data.get('coords'):
self.result['img'] = EDSM._IMG_KNOWN
self.syscache.add(system_name)
else:
self.result['img'] = EDSM._IMG_UNKNOWN
if (config.getint('EDSM_autoopen')):
webbrowser.open(self.result['url'])
# Asynchronous version of the above
def start_lookup(self, system_name, known=0):