From 2a8dd14e24aaec8c73d5cbb5f3ef12beaf59d868 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 9 Jan 2023 16:28:26 +0000 Subject: [PATCH] tracking/stationname; Minor fixups * Missed a some `self.station` in monitor.py * Fixed EDDB system *and* station link setting. Brainfart had mixed them together in last commit. --- monitor.py | 4 ++-- plugins/eddb.py | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/monitor.py b/monitor.py index 19b57983..ab7ce21e 100644 --- a/monitor.py +++ b/monitor.py @@ -539,10 +539,10 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below entry['BodyID'] = self.state['BodyID'] entry['BodyType'] = self.state['BodyType'] - if self.station: + if self.state['StationName']: entry['Docked'] = True entry['MarketID'] = self.station_marketid - entry['StationName'] = self.station + entry['StationName'] = self.state['StationName'] entry['StationType'] = self.stationtype else: diff --git a/plugins/eddb.py b/plugins/eddb.py index dc6c7b63..d7a0f431 100644 --- a/plugins/eddb.py +++ b/plugins/eddb.py @@ -199,16 +199,17 @@ def journal_entry( # Undocked event. this.station_marketid = None - # Only actually change URLs if we are current provider. - if config.get_str('system_provider') == 'eddb': + # Only change URL text if we are current provider. + if config.get_str('station_provider') == 'eddb': this.system_link['text'] = this.system_name # Do *NOT* set 'url' here, as it's set to a function that will call # through correctly. We don't want a static string. this.system_link.update_idletasks() - # But only actually change the URL if we are current station provider. - if config.get_str('station_provider') == 'eddb': - if not this.station_name: + if this.station_name: + this.station_link['text'] = this.station_name + + else: if this.system_population is not None and this.system_population > 0: this.station_link['text'] = this.STATION_UNDOCKED