Add web UI for configuration and management
- Flask-based web interface on port 8080 - Dashboard with channel statistics and sync status - Channel management (add/remove channels via UI) - Settings page for all configuration options - Cookie file upload interface - Real-time log viewer - Manual sync trigger from web UI - Updated Dockerfile to include Flask and web assets - Updated Unraid template with WebUI port - Updated README with web UI documentation
This commit is contained in:
@@ -12,6 +12,7 @@ echo "Sync Schedule: $SYNC_SCHEDULE"
|
||||
echo "Max Quality: ${MAX_QUALITY}p"
|
||||
echo "Sleep Interval: ${SLEEP_INTERVAL}s"
|
||||
echo "Timezone: $TZ"
|
||||
echo "Web UI: http://localhost:8080"
|
||||
echo "=========================================="
|
||||
|
||||
# Create example channels file if it doesn't exist
|
||||
@@ -33,6 +34,9 @@ if [ ! -f "$CONFIG_DIR/channels.txt" ]; then
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Create log file
|
||||
touch /var/log/youtube-sync.log
|
||||
|
||||
# Set up cron job if SYNC_SCHEDULE is provided
|
||||
if [ "$SYNC_SCHEDULE" != "manual" ]; then
|
||||
echo "[INFO] Setting up cron schedule: $SYNC_SCHEDULE"
|
||||
@@ -42,15 +46,11 @@ if [ "$SYNC_SCHEDULE" != "manual" ]; then
|
||||
crond -f -l 2 &
|
||||
CRON_PID=$!
|
||||
echo "[INFO] Cron daemon started (PID: $CRON_PID)"
|
||||
|
||||
# Run initial sync
|
||||
echo "[INFO] Running initial sync..."
|
||||
/app/sync.sh || true
|
||||
|
||||
# Keep container running and monitor cron
|
||||
echo "[INFO] Container ready. Watching for scheduled syncs..."
|
||||
wait $CRON_PID
|
||||
else
|
||||
echo "[INFO] Manual mode enabled. Running sync once..."
|
||||
/app/sync.sh
|
||||
echo "[INFO] Manual mode enabled. Use Web UI to trigger syncs."
|
||||
fi
|
||||
|
||||
# Start Flask web UI
|
||||
echo "[INFO] Starting web UI on port 8080..."
|
||||
cd /app
|
||||
exec python3 app.py
|
||||
|
||||
Reference in New Issue
Block a user