Fix color extraction and image cache setup in development

Move `ensureImageDirs` outside the production-only block so the local
image cache directories are created in dev mode too. Update
`extractAndStoreColors` to download the poster if it isn't cached yet
instead of falling back to a direct TMDB CDN URL, keeping color
extraction consistent with the server-side image routing approach. Add
`/data` to `.gitignore` to avoid committing the local cache directory.
This commit is contained in:
2026-03-02 13:49:57 -05:00
parent 8eb1007612
commit 2f0fe02d26
6 changed files with 22 additions and 18 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
# SQLite database URL (Docker: file:/data/sqlite.db, local dev: file:sqlite.db)
DATABASE_URL=file:sqlite.db
DATABASE_URL=file:./data/sqlite.db
# TMDB API Read Access Token — get one at https://www.themoviedb.org/settings/api
TMDB_API_READ_ACCESS_TOKEN=your_tmdb_api_read_access_token_here
@@ -16,5 +16,5 @@ BETTER_AUTH_URL=http://localhost:3000
# Image caching — downloads TMDB images to local disk for faster serving
# Set to "false" to disable and use TMDB CDN directly (default: enabled)
IMAGE_CACHE_DIR=./data/images
# IMAGE_CACHE_ENABLED=false
# IMAGE_CACHE_DIR=/data/images