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

495 Commits

Author SHA1 Message Date
Athanasius
b3419ec548
EDDN: Also set commodity/3->horizons for journal-sourced data 2021-10-17 16:17:58 +01:00
Athanasius
a32546b001
EDDN: Set horizons on commodity/3 messages as per schema 2021-10-17 16:14:35 +01:00
Athanasius
556ace5306
EDDN: Use this.odyssey rather than passing to functions 2021-10-17 15:47:12 +01:00
Athanasius
bd183efbd4
EDDN: Just use this.horizons for CAPI data sending 2021-10-17 15:41:15 +01:00
Athanasius
488fdf4976
Merge pull request #1306 from EDCD/fix/eddn-quieten-unknown-schema-errors
EDDN: Quieten "unknown schema" errors
2021-10-17 15:35:25 +01:00
Athanasius
ca80edd34d
EDDN: If this.horizons is true, use that in is_horizons() check 2021-10-17 15:01:51 +01:00
Athanasius
aecf375138
EDDN: Record horizons flag in journal_entry()
So that we can then first check *this* in `is_horizons()`.
2021-10-17 14:55:43 +01:00
Athanasius
7fa0576c85
EDDN: Keep 'unknown schema' messages in replaylog
This still logs them, at DEBUG, which will get spammy as such messages
accumulate.

Uncommenting the:

`#  return  # Pretend it went OK so this message isn't retried`

at line 291 in EDDN.sendreplay(), in the:

`except requests.exceptions.HTTPError as e:`

block would cause them to not stay in the replaylog.
2021-10-17 14:41:25 +01:00
Athanasius
5ae953bf45
EDDN: Drop messages if EDDN says it doesn't know the schema
Currently Live EDDN doesn't yet have the new schemas such as navroute,
so will complain.  Rather than leaving such messages in our EDDN replay
queue and getting an error every time that is run, detect this error
case and drop the messages.
2021-10-17 14:24:23 +01:00
Athanasius
fc34d023b6
EDDN: tracking_ui_update(): check if this UI bit actually active 2021-10-17 14:10:30 +01:00
Athanasius
42594c9366
EDDN: Abbreviate tracking_ui_update() code 2021-10-15 11:57:09 +01:00
Athanasius
60f3b524e2
EDDN: codexentry: Always set BodyName from Status.json, ID if Journal matches
Partial data is better than no data, or bad data.  So if Status.json
BodyName is available, always use it.  *Then* see if Journal BodyName
matches that, and if so set BodyID.

Close-orbiting bodies might therefore cause BodyName to be set without
BodyID, but then it's up to EDDN listeners to make a decision, rather
than making it for them.
2021-10-14 13:04:52 +01:00
Athanasius
2ef9d9e3c3
EDDN: BodyName/ID tracking tested for simple body
* The Tracking UI is now up and running.
* Some of the tracking corrected:
 - Set BodyID from ApproachBody.
 - Do not clear values on SupercruiseEntry, allow either FSDJump or
   LeaveBody to do this.
 - Clear the values if we detect the Main Menu music track (when you
   exit to the menu, not just when you look at the menu whilst
   in-game).
* Various comments added to help with documenting the tracking for EDDN
  uploaders.
2021-10-12 13:06:38 +01:00
Athanasius
dd8ec061d3
EDDN: Dummy tracking UI to determine layout 2021-10-10 15:40:41 +01:00
Athanasius
15ea858c6b
EDDN: codexentry: Use BodyID if available 2021-10-10 14:55:46 +01:00
Athanasius
d7eacd253c
EDDN: Track BodyID from Journal events
* Also renames all of the body name/ID 'this' variables to snake case.
2021-10-10 14:43:01 +01:00
Athanasius
50f03ae753
EDDN: codexentry: Set BodyName if available from Status.json 2021-10-10 14:37:20 +01:00
Athanasius
8700868724
EDDN: Rename this.planet to this.bodyname for consistency 2021-10-10 14:32:12 +01:00
Athanasius
b82d25ee07
EDDN: Start tracking Status.json BodyName 2021-10-10 14:31:40 +01:00
Athanasius
5546926776
EDDN: Use 'if key (not) in dict:' rather than .get() is (not) None 2021-10-10 14:23:24 +01:00
Athanasius
84ef77197d
EDDN: Use MutableMapping when needing to update a Mapping, not Dict 2021-10-10 14:23:24 +01:00
Athanasius
e1d547460b
EDDN: Add type hints back to new export_journal_entry() 2021-10-10 14:23:24 +01:00
Athanasius
ba20599511
EDDN: Make comment about removing odyssey flag a WORKAROUND
This is for the NavRoute handling.
2021-10-10 14:23:23 +01:00
Athanasius
0ffbb4dac9
EDDN: Send 'NavRoute' data on appropriate schema
Yes, there's some lovely mis-match between Mapping and Dict type to work
around.  Mapping complains about lack of __delitem__, so saying it's a
Dict instead and ensuring that matches at the call site.
2021-10-10 14:23:23 +01:00
Athanasius
7081a5a3ab
EDDN: Send ScanBaryCentre on correct schema 2021-10-10 14:23:23 +01:00
Athanasius
f97cf0897a
EDDN: Add CodexEntry on its own schema
This requires a tweak to `entry_augment_system_data()` as we now also
have 'System' as a possible key for a system name.
2021-10-10 14:23:23 +01:00
Athanasius
9c611d73d5
EDDN: TODO for dropping messages if we get a clear HTTP error
i.e. message not matching schema
2021-10-10 14:23:22 +01:00
Athanasius
413f9049f5
EDDN: Add support for NavBeaconScan on its own schema
* Refactors the augmentation code for use by both fssdiscoveryscan and
  navbeaconscan.
2021-10-10 14:23:22 +01:00
Athanasius
1dda61907b
EDDN: TODO on refactoring & return result of fssdiscoveryscan export 2021-10-10 14:23:22 +01:00
Athanasius
c4ba8acb17
EDDN: Add support for EDDN FSSDiscoveryScan schema from that event
* As we're now not sending *all* journal events on the journal schema
  this refactors only the actual sending in export_journal_entry(), with
  the other functionality in export_journal_generic(), so that the new
  export_journal_fssdiscoveryscan() can use export_journal_entry() as
  well.

In the future EDDN will move to a schema per event type, so we'll lose
_generic().  Factoring out some things like augmentations into their own
functions will come next.
2021-10-10 14:23:09 +01:00
Athanasius
e11b357502
EDDN: DEFAULT URL requires / on the end
The EDDN server config does NOT redirect from /upload to /upload/
2021-10-01 08:34:50 +01:00
Athanasius
f9875b5b9a
EDDN: Make use of new CL arg to use custom upload URL
This also entailed slightly reworking the way the EDDN code uses this
URL.  It was very generalised, so as to allow for the debug "just send
and log locally" code, but as the only URL is the 'upload' one much of
that seemed un-necessary.

So that code has been simplified.
2021-09-24 10:59:15 +01:00
Athanasius
c9d478222a
EDMC: Provide EDDN Odyssey flag from monitor state
This should have been set from the latest Journal file, and the
key/value is in LoadGame in Odyssey.  It's only documented as:

	"Whether the sending Cmdr has an Odyssey expansion."

in the current EDDN Journal schema.  Thus sending this as False if the
Cmdr last logged into Horizons/base game should be OK.
2021-08-24 13:52:48 +01:00
A_D
dac13216a0
remove uneeded cast and fix bug in passed data 2021-08-19 20:51:23 +02:00
A_D
c86b9790ca
updated eddb to new killswitches 2021-08-19 20:37:40 +02:00
A_D
6c7245ee3d
updated eddn to new killswitches 2021-08-19 20:37:39 +02:00
A_D
f62f1ee97b
made types consistent and generic 2021-08-19 20:37:39 +02:00
A_D
a37b1882db
fixed import order 2021-08-19 20:37:35 +02:00
A_D
1712390732
removed old comment 2021-08-19 20:37:31 +02:00
A_D
78fa629fbe
updated edsm 2021-08-19 20:37:26 +02:00
A_D
98e8179c3e
Dont ignore first killswitch checks changes 2021-08-19 20:35:50 +02:00
A_D
e79975bea8
Cleaned up import 2021-08-19 20:35:50 +02:00
A_D
8c0457bf47
updated inara to work with new killswitches 2021-08-19 20:35:49 +02:00
A_D
4c9896569b
added inara support for new delete_fields directive 2021-08-19 20:35:48 +02:00
1581a3bdd7
plugins/edsm.py: fix exception on logger.trace_on, wrong datatype to subtitle 2021-08-17 13:54:38 +03:00
Athanasius
bcadc079cc
Merge pull request #1243 from EDCD/enhancement/trace-logging-should-use-trace_if
Convert all/most `logger.trace(...)` to `logger.trace_if(...)`
2021-08-13 16:30:47 +01:00
Athanasius
ef468d4c23
Merge pull request #1241 from norohind/enhancement/1239/inara-trace-under-on_trace
inara.py: put events trace logging under `inara-events` trace_on option
2021-08-13 16:14:10 +01:00
a8a4abfe90
inara.py: trace with logger.trace_if only 2021-08-13 18:06:38 +03:00
Athanasius
1480c2d67a
plugins/edsm: Change trace_if string to plugin.edsm.cmdr-events 2021-08-13 15:29:57 +01:00
Athanasius
bc9f2cda4b
plugins/edsm: Use logger.trace_if(...)
This also re-introduces commented-out Locations tracking, using
'journal.locations' as it's related to that.
2021-08-13 15:14:03 +01:00