Fix scan-library path to work in both development and production
- Auto-detect music library path based on environment - Check for music/library/ directory for local development - Default to /app/music/ for production Docker deployment - Allow MUSIC_LIBRARY_PATH environment variable override - Fixes scan-library function failing on production server
This commit is contained in:
parent
dddc27e19e
commit
0b72781052
|
|
@ -17,7 +17,10 @@
|
||||||
(defparameter *server-port* 8080)
|
(defparameter *server-port* 8080)
|
||||||
(defparameter *music-library-path*
|
(defparameter *music-library-path*
|
||||||
(or (uiop:getenv "MUSIC_LIBRARY_PATH")
|
(or (uiop:getenv "MUSIC_LIBRARY_PATH")
|
||||||
"/app/music/"))
|
;; Default to /app/music/ for production Docker, but check if music/library/ exists for local dev
|
||||||
|
(if (probe-file (merge-pathnames "music/library/" (asdf:system-source-directory :asteroid)))
|
||||||
|
(merge-pathnames "music/library/" (asdf:system-source-directory :asteroid))
|
||||||
|
"/app/music/")))
|
||||||
(defparameter *supported-formats* '("mp3" "flac" "ogg" "wav"))
|
(defparameter *supported-formats* '("mp3" "flac" "ogg" "wav"))
|
||||||
(defparameter *stream-base-url* "http://localhost:8000")
|
(defparameter *stream-base-url* "http://localhost:8000")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue