Initial design for MediaShelf

Software design for a Plex library analytics and reclaim-reporting tool.
v1 is report-only: no deletion, no filesystem access, Plex API as the sole
data source. Movies at item level, TV rolled up to season level.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GVbG48GAXfCZatcmX123Ra
This commit is contained in:
Jess Hallsworth 2026-09-07 03:41:38 +00:00
commit fdcddc8149
No known key found for this signature in database
4 changed files with 1105 additions and 0 deletions

30
.env.example Normal file
View file

@ -0,0 +1,30 @@
# MediaShelf configuration — copy to .env and fill in.
# NEVER commit .env. PLEX_TOKEN is a secret.
MEDIASHELF_SECRET_KEY=change-me
LOG_LEVEL=INFO
TZ=America/Regina
# --- Plex connection ---
PLEX_BASE_URL=http://192.168.1.10:32400
PLEX_TOKEN=your-plex-token-here
PLEX_VERIFY_SSL=true
PLEX_TIMEOUT_S=30
PLEX_PAGE_SIZE=500
PLEX_REQUEST_DELAY_MS=0
# --- Storage ---
DATABASE_PATH=/data/mediashelf.db
# --- Scanning ---
SCAN_SCHEDULE_CRON=0 4 * * *
SCAN_FULL_SWEEP_CRON=0 3 * * 0
SCAN_ON_STARTUP=false
SCAN_LOCK_TIMEOUT_S=7200
# --- Reclaim score tuning ---
SCORE_STALE_HORIZON_DAYS=730
SCORE_AGE_HORIZON_DAYS=1095
SCORE_POPULAR_AT=3
SCORE_GRACE_DAYS=30
SCORE_RECENT_DAYS=90