Cleanup repo + harden offline install and watchdog

Repo hygiene:
- Remove dead scripts (.wait-for-display, .display-keepalive, .keep-screen-alive)
- Remove stale backup/scratch (install.sh.bak, New.txt, stale .pyc)
- Stop tracking machine-specific/generated state (config/app_config.json,
  playlists/server_playlist.json, src/player_auth.json, generated launchers)
- Prune duplicate wheel versions (one per package)
- Reorganize working_files -> dev/, dev/tests/, documentation/dev-notes/, scripts/
- Extend .gitignore; fix no-op rules in repo/.gitignore

Offline install (install.sh):
- Non-fatal system-dep step; per-package apt retry; .deb bundle install
- Skip pip self-upgrade offline; guard online fallbacks behind connectivity probe
- Dependency-free fetch_url (curl/wget/urllib); --no-reboot flag
- Fix corrupted literal backslash-bang escapes (shebangs, test -f, banner)
- Idempotent cron install (no more stacked @reboot lines)

Autostart / watchdog:
- start.sh: single-instance flock lock (.player_watchdog.lock) acquired only
  after a display is confirmed, preventing parallel watchdogs
- Set XDG_RUNTIME_DIR when missing; exit early if headless
- run_player.sh: activate .venv; stop_player.sh: clear lock file
This commit is contained in:
SKE087
2026-10-14 23:29:14 +03:00
parent f7b889be11
commit 31807f37bf
60 changed files with 633 additions and 1469 deletions
+36 -12
View File
@@ -30,24 +30,48 @@ env/
*.pyc
# Media files (optional - remove if you want to track media)
media/*.jpg
media/*.jpeg
media/*.png
media/*.gif
media/*.bmp
media/*.mp4
media/*.avi
media/*.mkv
media/*.mov
media/*.webm
media/**/*.jpg
media/**/*.jpeg
media/**/*.png
media/**/*.gif
media/**/*.bmp
media/**/*.mp4
media/**/*.avi
media/**/*.mkv
media/**/*.mov
media/**/*.webm
# Playlists cache (auto-generated)
playlists/server_playlist_*.json
# Downloaded / on-device edited media (server-managed runtime content)
media/edited_media/
# Playlists cache (auto-generated by the player)
playlists/server_playlist*.json
# Player configuration (machine-specific; install.sh writes a template if absent)
config/app_config.json
# Logs
*.log
.kivy/
# Runtime state (generated by the player / watchdog)
.player_heartbeat
.player_stop_requested
.player_watchdog.lock
.post-clone-setup.done
.post-clone-backups/
# Installer-generated launchers (recreated by install.sh)
.run-background.sh
.start-player-cron.sh
# Secrets / machine-specific auth tokens (never commit)
player_auth.json
# Local backups / editor leftovers
*.bak
*~
# IDE
.vscode/
.idea/