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
19b9deccf5
commit
2a505e482d
|
|
@ -17,7 +17,10 @@
|
|||
(defparameter *server-port* 8080)
|
||||
(defparameter *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 *stream-base-url* "http://localhost:8000")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue