Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 610a433

Browse files
authored
Merge pull request #24 from yogstation13/alexkar598-patch-1
Support for xz compressed replays
2 parents 3fc030a + fd18c8c commit 610a433

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

yogsite/modules/rounds/log_parsing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def find_demo_file(self):
5757

5858
if "demo.txt.gz" in files:
5959
return os.path.join(directory, "demo.txt.gz")
60-
60+
elif "demo.txt.xz" in files:
61+
return os.path.join(directory, "demo.txt.xz")
6162
elif "demo.txt" in files:
6263
return os.path.join(directory, "demo.txt")
6364

yogsite/modules/rounds/routes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ def page_round_replay(round_id):
146146

147147
if demo_file.endswith(".gz"):
148148
response.headers.add("Content-Encoding", "gzip")
149-
else:
149+
150+
if demo_file.endswith(".txt"):
150151
response.headers.add("X-Allow-SS13-Replay-Streaming", "true")
151152

152153
if not round.in_progress():

0 commit comments

Comments
 (0)