Decouple stage strike app from TSH executable

This commit is contained in:
Isatis committed 2024-12-20 14:26:15 -08:00
1 parent e262aea683
commit f79a413e3d
2 files changed
+3 -7

No files matched your search

+3 -3
View File
@@ -14,12 +14,12 @@ a = Analysis(
('../assets/contributors.txt', 'assets'),
('../assets/versions.json', 'assets'),
('../src/i18n/tournament_term/*.json', 'src/i18n/tournament_term'),
# ('../src/i18n/round_names/*.json', 'src/i18n/round_names'),
# ('../src/i18n/round_names/*.json', 'src/i18n/round_names'),
('../src/i18n/*.json', 'src/i18n'),
('../src/i18n/*.qm', 'src/i18n'),
('../src/layout/*', 'src/layout'),
('../src/TournamentDataProvider/*.txt', 'src/TournamentDataProvider'),
('../stage_strike_app/build/*', 'stage_strike_app/build')
# ('../stage_strike_app/build/*', 'stage_strike_app/build'),
('../src/TournamentDataProvider/*.txt', 'src/TournamentDataProvider')
],
hookspath=[],
runtime_hooks=[],
-4
View File
@@ -9,7 +9,6 @@ from flask_cors import CORS, cross_origin
from flask_socketio import SocketIO, emit
import orjson
from loguru import logger
from .Helpers.TSHDirHelper import TSHResolve
from .TSHWebServerActions import WebServerActions
from .TSHScoreboardManager import TSHScoreboardManager
from .TSHTournamentDataProvider import TSHTournamentDataProvider
@@ -478,9 +477,6 @@ class WebServer(QThread):
def test(filename):
try:
filename = filename or 'stage_strike_app/build/index.html'
if filename.startswith('stage_strike_app/build/'):
return send_from_directory(TSHResolve('.'), filename, as_attachment=filename.endswith('.gz'))
return send_from_directory(os.path.abspath('.'), filename, as_attachment=filename.endswith('.gz'))
except Exception as e:
logger.error(f"File not found: {e}")
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.