Bug fix for mainscreen update and higher version of app to 1.0.2

This commit is contained in:
2026-04-13 11:30:42 +02:00
parent 024ab24ceb
commit d0a468b740
6 changed files with 25 additions and 25 deletions
+12 -8
View File
@@ -8,14 +8,18 @@ import os
import glob
from datetime import datetime
# Base directory anchored to this file's location (project root), so paths work
# regardless of the current working directory when the app is launched.
_BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# File paths - organized in data directory
SETTINGS_FILE = 'data/camera_settings.json'
PLAYERS_FILE = 'data/players.json'
TOURNAMENT_FILE = 'data/tournament_state.json'
RESULTS_FILE = 'data/tournament_results.json'
LEAGUE_FILE = 'data/league_state.json'
ARCHIVE_DIR = 'data/tournament_archives'
LEAGUE_ARCHIVE_DIR = 'data/league_archives'
SETTINGS_FILE = os.path.join(_BASE_DIR, 'data', 'camera_settings.json')
PLAYERS_FILE = os.path.join(_BASE_DIR, 'data', 'players.json')
TOURNAMENT_FILE = os.path.join(_BASE_DIR, 'data', 'tournament_state.json')
RESULTS_FILE = os.path.join(_BASE_DIR, 'data', 'tournament_results.json')
LEAGUE_FILE = os.path.join(_BASE_DIR, 'data', 'league_state.json')
ARCHIVE_DIR = os.path.join(_BASE_DIR, 'data', 'tournament_archives')
LEAGUE_ARCHIVE_DIR = os.path.join(_BASE_DIR, 'data', 'league_archives')
# Default settings
DEFAULT_SETTINGS = {
@@ -40,7 +44,7 @@ class FileStorage:
@staticmethod
def _ensure_directory(directory):
"""Ensure directory exists"""
if not os.path.exists(directory):
if directory and not os.path.exists(directory):
os.makedirs(directory)
@staticmethod