1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-12 23:37:14 +03:00

Inara: Remove the "update 14 date passed?" check

- We're now past there and no-one should expect that messing with their clock
  will bypass this check.
This commit is contained in:
Athanasius 2022-12-01 17:43:31 +00:00
parent 7a64351d2f
commit db4f59dd16
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -370,25 +370,21 @@ def journal_entry( # noqa: C901, CCR001
:return: str - empty if no error, else error string.
"""
if not monitor.is_live_galaxy():
# This only applies after Update 14, which as of 2022-11-27 is scheduled
# for 2022-11-29, with the game servers presumably being down around
# 09:00
if datetime.now(timezone.utc) >= datetime.fromisoformat("2022-11-27T09:00:00+00:00"):
# Update 14 ETA has passed, so perform the check
if (
(
this.legacy_galaxy_last_notified is None
or (datetime.now(timezone.utc) - this.legacy_galaxy_last_notified) > timedelta(seconds=300)
)
and config.get_int('inara_out') and not is_beta and not this.multicrew and credentials(cmdr)
):
# LANG: The Inara API only accepts Live galaxy data, not Legacy galaxy data
logger.info(_("Inara only accepts Live galaxy data"))
# this.parent.children['status']['text'] =
this.legacy_galaxy_last_notified = datetime.now(timezone.utc)
return _("Inara only accepts Live galaxy data")
# Since Update 14 on 2022-11-29 Inara only accepts Live data.
if (
(
this.legacy_galaxy_last_notified is None
or (datetime.now(timezone.utc) - this.legacy_galaxy_last_notified) > timedelta(seconds=300)
)
and config.get_int('inara_out') and not is_beta and not this.multicrew and credentials(cmdr)
):
# LANG: The Inara API only accepts Live galaxy data, not Legacy galaxy data
logger.info(_("Inara only accepts Live galaxy data"))
# this.parent.children['status']['text'] =
this.legacy_galaxy_last_notified = datetime.now(timezone.utc)
return _("Inara only accepts Live galaxy data")
return ''
return ''
should_return, new_entry = killswitch.check_killswitch('plugins.inara.journal', entry, logger)
if should_return: