implement caching for TeslaCam directory scan and add refresh endpoint
This commit is contained in:
1 parent
a4202afe30
commit
829c28ca69
3 files changed
+57
-6
No files matched your search
@@ -105,6 +105,7 @@ file / environment rather than relying on `.env`.
|
||||
| `/` | Main page with all videos categorized by camera view |
|
||||
| `/camera/<camera_view>` | All videos for a single camera view |
|
||||
| `/video/<path:filepath>` | Streams a video file from the TeslaCam directory |
|
||||
| `/refresh` | Forces a re-scan of the TeslaCam directory |
|
||||
|
||||
## Camera Views
|
||||
|
||||
@@ -119,6 +120,9 @@ file / environment rather than relying on `.env`.
|
||||
|
||||
## Notes
|
||||
|
||||
- The directory scan is cached in memory for `SCAN_CACHE_TTL` seconds
|
||||
(default 300) to avoid re-walking the tree on every request. Hit
|
||||
`/refresh` to force a re-scan after copying new clips onto the drive.
|
||||
- Debug mode is off by default (`FLASK_DEBUG=0`) and is only used by the local
|
||||
dev server. It has no effect when running under a WSGI server like gunicorn.
|
||||
- The TeslaCam directory must be accessible from the machine running the app (e.g., a mounted USB drive or network share).
|
||||
|
||||
Reference in new issue
Block a user