Code simplification, move to wizard style UI, JSON file cache (scans every 15 mins)

This commit is contained in:
markmental 2026-03-02 13:45:28 -05:00
commit 92362efd47
11 changed files with 1027 additions and 438 deletions

View file

@ -126,11 +126,28 @@ The launcher exports:
| MEDIA_USER | Login username |
| MEDIA_PASS_HASH | bcrypt password hash |
| MEDIA_ROOT | Base directory containing Videos/ and Music/ |
| MEDIA_CACHE_DIR | Cache directory for media index JSON files |
| MEDIA_CACHE_INTERVAL | Background rebuild interval in seconds (default: 900) |
Credentials are **not stored on disk**.
They exist only in the running server environment.
If `MEDIA_CACHE_DIR` is not set, FREAX defaults to `var/cache/media` inside the project directory.
---
## Media Cache Refresh
FREAX maintains JSON cache indexes for both `Videos` and `Music`.
- `build_media_cache.php` rebuilds both caches in one pass
- `start-media-server.sh` runs a background refresh loop while the server is running
- Default refresh interval is 900 seconds (15 minutes)
- Cache and lock files are stored in `MEDIA_CACHE_DIR`
`get_files.php` reads cache first and only rescans on cache miss/corruption.
---
## LAN Usage
@ -225,7 +242,7 @@ FREAX intentionally minimizes attack surface:
* No SQL backend
* No upload endpoints
* No file writes
* No media file writes
* No user content creation
* No dynamic code execution
* Strict base directory enforcement
@ -291,4 +308,3 @@ This is free software released under the GPLv2 license. You have permission to m
---
Happy hacking.