1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 15:57:14 +03:00

319 Commits

Author SHA1 Message Date
Athanasius
3ec9c81e19
EDDN: Drop any 'unknown schema' messages so they're not retried 2021-10-19 16:01:54 +01:00
Athanasius
7dcb275e9b
EDDN: Document HORIZONS_SKU, and to NOT use the others 2021-10-18 14:18:11 +01:00
Athanasius
c97b539ac3
EDDN: Revert to using capi_is_horizons() in export_commodities() 2021-10-18 12:25:35 +01:00
Athanasius
694321064d
EDDN: Rename is_horizons() and document that it's for CAPI data only
OK, it has `data` passed in, so this should be obvious, but let's make
it explicit both by name and in the docstring.

The docstring now also emphasies that *this* check **MUST** be used for
CAPI data, as it's dependent only on the availability of Horizons on the
account, and not on the `LoadGame` flags.
2021-10-18 12:20:06 +01:00
Athanasius
d8689e5b9b
Revert "EDDN: If this.horizons is true, use that in is_horizons() check"
This reverts commit ca80edd34d88298a2c9d933f79f0da8e68d870eb.
2021-10-18 12:10:09 +01:00
Athanasius
90aa2698cd
Revert "EDDN: Just use this.horizons for CAPI data sending"
This reverts commit bd183efbd4dfa8365246952f04352403195102aa.
2021-10-18 12:09:55 +01:00
Athanasius
e148197971
Revert "EDDN: use this.odyssey for Journal outfitting and shipyard"
This reverts commit 4fef4257bd00376f45e94a35db925c0fbb58b267.
2021-10-18 12:08:32 +01:00
Athanasius
98f215e6ad
EDDN: Remove horizons flag from navroute messages
As with `odyssey` this isn't currently in the not-yet-live schema.
2021-10-17 16:46:11 +01:00
Athanasius
29b69745f3
EDDN: document that some EDDN messages aren't retried 2021-10-17 16:32:38 +01:00
Athanasius
4fef4257bd
EDDN: use this.odyssey for Journal outfitting and shipyard
For consistency with the horizons flag.  They *are* placed *from* the
`this` versions into `entry`, but we might as well go the direct route.
They have to be set explicitly here as we process the `entry` to make a
wholly new `message` rather than the `message` just being `entry` with
some changes.
2021-10-17 16:20:46 +01:00
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
6c7245ee3d
updated eddn to new killswitches 2021-08-19 20:37:39 +02:00
Athanasius
79a2003b53
plugins/eddn: Use logger.trace_if(...) 2021-08-13 15:14:02 +01:00
A_D
fe0e752c9b
Added support for arbitrary plugins for POST debug
This works by replacing --eddn-local with --debug-sender, and making the
webserver more generic. support has been added to EDSM, EDDN, and INARA.
2021-06-18 23:36:42 +02:00
A_D
57d7889da9
Sorted imports 2021-06-18 23:34:26 +02:00
A_D
4ef153b1b2
Added fake EDDN Listener
A simple HTTP handler has been added that will dump any and all POST
data it gets to EDMC's log.

Additionally, a new command line argument to switch EDMC to using this
as its EDDN target has been added.
2021-06-18 23:34:20 +02:00
Athanasius
a0b310f72e Translations: Amalgamate some LANG comments & en.template updated 2021-06-13 15:49:09 +01:00
A_D
8d77cc039b Added LANG comments for EDDN localisation 2021-06-10 20:29:11 +01:00