WebHost: List Rooms in a sortable table

This commit is contained in:
Fabian Dill
2020-07-21 23:15:19 +02:00
parent b7d45ae663
commit 78c85cce14
8 changed files with 52 additions and 17 deletions

View File

@@ -36,9 +36,11 @@ def int32_as_bytes(value):
def pc_to_snes(value):
return ((value<<1) & 0x7F0000)|(value & 0x7FFF)|0x8000
def snes_to_pc(value):
return ((value & 0x7F0000)>>1)|(value & 0x7FFF)
def parse_player_names(names, players, teams):
names = tuple(n for n in (n.strip() for n in names.split(",")) if n)
ret = []
@@ -52,9 +54,11 @@ def parse_player_names(names, players, teams):
names = names[players:]
return ret
def is_bundled():
def is_bundled() -> bool:
return getattr(sys, 'frozen', False)
def local_path(path):
if local_path.cached_path:
return os.path.join(local_path.cached_path, path)