diff --git a/config/config.json b/config/config.json index 713a8a18..c0752001 100644 --- a/config/config.json +++ b/config/config.json @@ -317,7 +317,7 @@ }, "mlb": { "enabled": true, - "live_priority": true, + "live_priority": false, "live_game_duration": 30, "show_odds": true, "test_mode": false, @@ -412,13 +412,13 @@ } }, "music": { - "enabled": false, + "enabled": true, "preferred_source": "ytm", "YTM_COMPANION_URL": "http://192.168.86.12:9863", "POLLING_INTERVAL_SECONDS": 1 }, "of_the_day": { - "enabled": false, + "enabled": true, "display_rotate_interval": 20, "update_interval": 3600, "subtitle_rotate_interval": 10, diff --git a/templates/index_v2.html b/templates/index_v2.html index 5cc70ed1..550f99b8 100644 --- a/templates/index_v2.html +++ b/templates/index_v2.html @@ -750,12 +750,6 @@
- - +

Action Output

@@ -2772,6 +2769,11 @@ } } + function confirmShutdown(){ + if (!confirm('Are you sure you want to shut down the system? This will power off the Raspberry Pi.')) return; + runAction('shutdown_system'); + } + async function fetchLogs() { const logContent = document.getElementById('log-content'); logContent.textContent = 'Loading logs...'; diff --git a/web_interface_v2.py b/web_interface_v2.py index f4f7b0b2..2489c28a 100644 --- a/web_interface_v2.py +++ b/web_interface_v2.py @@ -432,6 +432,9 @@ def system_action(): elif action == 'reboot_system': result = subprocess.run(['sudo', '-n', 'reboot'], capture_output=True, text=True) + elif action == 'shutdown_system': + result = subprocess.run(['sudo', '-n', 'poweroff'], + capture_output=True, text=True) elif action == 'git_pull': # Run git pull from the repository directory where this file lives repo_dir = Path(__file__).resolve().parent @@ -601,6 +604,9 @@ def run_action_route(): elif action == 'reboot_system': result = subprocess.run(['sudo', '-n', 'reboot'], capture_output=True, text=True) + elif action == 'shutdown_system': + result = subprocess.run(['sudo', '-n', 'poweroff'], + capture_output=True, text=True) elif action == 'git_pull': repo_dir = Path(__file__).resolve().parent if not (repo_dir / '.git').exists():