mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-05-22 01:51:21 +03:00
[#2415] Fix Inara Linking
This commit is contained in:
parent
aefebf3d44
commit
73e134e39d
@ -164,11 +164,11 @@ if DEBUG:
|
||||
def system_url(system_name: str) -> str:
|
||||
"""Get a URL for the current system."""
|
||||
if this.system_address:
|
||||
return requests.utils.requote_uri(f'https://inara.cz/galaxy-starsystem/'
|
||||
return requests.utils.requote_uri(f'https://inara.cz/elite/starsystem/'
|
||||
f'?search={this.system_address}')
|
||||
|
||||
if system_name:
|
||||
return requests.utils.requote_uri(f'https://inara.cz/galaxy-starsystem/'
|
||||
return requests.utils.requote_uri(f'https://inara.cz/elite/starsystem/'
|
||||
f'?search={system_name}')
|
||||
|
||||
return ''
|
||||
@ -185,11 +185,11 @@ def station_url(system_name: str, station_name: str) -> str:
|
||||
:return: A URL to inara for the given system and station
|
||||
"""
|
||||
if system_name and station_name:
|
||||
return requests.utils.requote_uri(f'https://inara.cz/galaxy-station/?search={system_name}%20[{station_name}]')
|
||||
return requests.utils.requote_uri(f'https://inara.cz/elite/station/?search={station_name}%20[{system_name}]')
|
||||
|
||||
if this.system_name and this.station_name:
|
||||
return requests.utils.requote_uri(
|
||||
f'https://inara.cz/galaxy-station/?search={this.system_name}%20[{this.station_name}]')
|
||||
f'https://inara.cz/elite/station/?search={this.station_name}%20[{this.system_name}]')
|
||||
|
||||
if system_name:
|
||||
return system_url(system_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user