From ec68d58c1a046aebb20e5a51e8f0e8b860879b33 Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Mon, 22 Aug 2016 23:11:06 +0100 Subject: [PATCH] Prompt for authentication on first login Fixes #129 --- EDMarketConnector.py | 3 +-- README.md | 16 ++++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 277e06f9..d6e866c4 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -297,8 +297,7 @@ class AppWindow: self.session.login(config.get('username'), config.get('password')) self.status['text'] = '' except companion.VerificationRequired: - # don't worry about authentication now - prompt on query - self.status['text'] = '' + return prefs.AuthenticationDialog(self.w, partial(self.verify, self.login)) except companion.ServerError as e: self.status['text'] = unicode(e) except Exception as e: diff --git a/README.md b/README.md index 66c3b72a..1288f326 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ combination that you use to log into the Elite: Dangerous launcher, and is requi You can also choose here what data to save (refer to the next section for details), whether to “Update” automatically on docking and/or with a hotkey, and whether to attach your Cmdr name or a [pseudo-anonymized](http://en.wikipedia.org/wiki/Pseudonymity) ID to the data. -The first time that you hit “Update” you will be prompted to authenticate with a “verification code”, which you will shortly receive by email from Frontier. +You will be prompted to authenticate with a “verification code”, which you will shortly receive by email from Frontier. Note that each “verification code” is one-time only - if you enter the code incorrectly or quit the app before authenticating you will need to wait for Frontier to send you a new code. @@ -70,12 +70,11 @@ This app can save a variety of data in a variety of formats: By default these files will be placed in your Documents folder. Since this app will create a lot of files if you use it for a while you may wish to create a separate folder for the files and tell the app to place them there. +Some options work by reading the Elite: Dangerous game's log files. Normally this app will find the log files but if you find some options greyed-out then adjust the “E:D log file location” setting described [below](#doesnt-track-systems-visited). + ### EDSM -You can send a record of your location to [Elite: Dangerous Star Map](http://www.edsm.net/) where you can view your flight log under My account → Exploration Logs and optionally add private comments about a system. - -- If you're running this app on a different machine from the Elite: Dangerous game or if the option to send your flight log to EDSM is greyed-out then adjust the “E:D log file location” setting on the Configuration tab to point to the game's log files using [this info](https://support.frontier.co.uk/kb/faq.php?id=108) as a guide. -- You will need to register for an account and follow the “[Elite Dangerous Star Map credentials](http://www.edsm.net/settings/api)” link to obtain your API key. +You can send a record of your location to [Elite: Dangerous Star Map](http://www.edsm.net/) where you can view your flight log under My account → Exploration Logs and optionally add private comments about a system. You will need to register for an account and then follow the “[Elite Dangerous Star Map credentials](http://www.edsm.net/settings/api)” link to obtain your API key. Uninstall @@ -121,10 +120,11 @@ Ensure that you visit the in-game Commodity Market at a station where you intend This problem is tracked as [Issue #92](https://github.com/Marginal/EDMarketConnector/issues/92). ### Doesn't track Systems visited -This app uses Elite: Dangerous' log files to track and display the systems that you visit. When looking for the log files, this app assumes: +This app uses Elite: Dangerous' log files to track the systems and stations that you visit. When looking for the log files, this app assumes: -- That you're running under Steam, if you have both Steam and non-Steam versions installed. -- That you're running "Horizons" 64bit, if you have both Horizons and Season 1 installed. +- That you're running this app and Elite: Dangerous on the same machine. +- That you're running Elite: Dangerous from Steam, if you have both Steam and non-Steam versions installed. +- That you're running “Horizons” 64bit, if you have both Horizons and Season 1 installed. If you find that this app isn't automatically tracking the systems that you visit and/or isn't automatically “updating” on docking (if you have that option selected), or if you're running this app on a different machine from the Elite: Dangerous game then adjust the “E:D log file location” setting on the Configuration tab to point to the game's log files using [this info](https://support.frontier.co.uk/kb/faq.php?id=108) as a guide.