Skip to content

Commit

Permalink
fix query handling, remove debug prints, and change mousover text for…
Browse files Browse the repository at this point in the history
… new behavior
  • Loading branch information
alwaysintreble committed Jan 30, 2024
1 parent 96f7fb5 commit 60c6ccd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions Launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,12 @@ def identify(path: Union[None, str]) -> Tuple[Union[None, str], Union[None, Comp
if path is None:
return None, None
if path.startswith("archipelago://"):
logging.info("found uri")
queries = urllib.parse.parse_qs(path)
url = urllib.parse.urlparse(path)
queries = urllib.parse.parse_qs(url.query)
if "game" in queries:
game = urllib.parse.parse_qs(path)["game"][0]
game = queries["game"][0]
else: # TODO around 0.5.0 - this is for pre this change webhost uri's
game = "Archipelago"
logging.info(game)
for component in components:
if component.supports_uri and component.game_name == game:
return path, component
Expand Down
2 changes: 1 addition & 1 deletion WebHostLib/templates/macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{% for patch in room.seed.slots|list|sort(attribute="player_id") %}
<tr>
<td>{{ patch.player_id }}</td>
<td data-tooltip="Connect via TextClient"><a href="archipelago://{{ patch.player_name | e}}:@{{ config['HOST_ADDRESS'] }}:{{ room.last_port }}?game={{ patch.game }}&room={{ room.id }}">{{ patch.player_name }}</a></td>
<td data-tooltip="Connect via Game Client"><a href="archipelago://{{ patch.player_name | e}}:@{{ config['HOST_ADDRESS'] }}:{{ room.last_port }}?game={{ patch.game }}&room={{ room.id }}">{{ patch.player_name }}</a></td>
<td>{{ patch.game }}</td>
<td>
{% if patch.data %}
Expand Down

0 comments on commit 60c6ccd

Please sign in to comment.