- Display last 3 played tracks on front page
- Auto-updates every 30 seconds
- Shows track title, artist, and time ago
- Links to MusicBrainz search for each track
- Thread-safe in-memory storage
- Works in both normal and frameset modes
- Hacker-themed green styling
Implements feature request from fade to show recently played tracks
with linkage to track info at music database.
- Add favicon.ico, favicon-16x16.png, and favicon-32x32.png
- Add asteroid.png graphic to header on both front-page.ctml and front-page-content.ctml
- Update header styling to display asteroid graphics flanking the station name
- Use 2-column grid layout: track/artist left, time/link right
- Match color scheme with now-playing section (blue text)
- Tighter row spacing (6px padding)
- Simplified MusicBrainz search query (no field prefixes)
- Fix CSS selector for proper link styling
- Right-align time and MusicBrainz link
- Display last 3 played tracks on front page
- Auto-updates every 30 seconds
- Shows track title, artist, and time ago
- Links to MusicBrainz search for each track
- Thread-safe in-memory storage
- Works in both normal and frameset modes
- Hacker-themed green styling
Implements feature request from fade to show recently played tracks
with linkage to track info at music database.
This fix some issues where, on the client, `response.message` was `Ok.`
for error responses and real error message needed to be extracted from
`response.data.message`, which made a weird API.
- 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
- Changed hardcoded music/library/ path to /app/music/ (production path)
- Added MUSIC_LIBRARY_PATH environment variable for local dev override
- Fixes scan library function on production server
- Aligns with path structure used in M3U playlists and liquidsoap config
The previous commit used uri-path() which doesn't exist in Radiance.
This caused 'The function ASTEROID::URI-PATH is undefined' errors
when trying to authenticate.
Changed to use radiance:path() which is the correct Radiance API
function for extracting the path component from a URI object.
Fixes authentication in both require-authentication and require-role.
The playlist was stuck on the first track because mode='normal' stops
after playing once. Changed to mode='sequential' which plays through
the entire playlist in order and then loops.
Also improved reload mechanism:
- Use reload_mode='watch' for efficient file change detection
- Increased reload interval to 5 minutes (less disruptive)
This commit implements three major refactorings to make the codebase more
idiomatic and maintainable:
1. Template Path Centralization
- Add *template-directory* parameter and helper functions
- Replace 11+ instances of repetitive template loading boilerplate
- New functions: template-path, load-template in template-utils.lisp
2. String Construction with FORMAT
- Replace concatenate with format for external URLs (Icecast, static files)
- Maintain Radiance URI handling for internal routes
- Applied to stream URLs, status endpoints, and API responses
3. Error Handling with Custom Conditions
- NEW FILE: conditions.lisp with comprehensive error hierarchy
- Custom conditions: not-found-error, authentication-error,
authorization-error, validation-error, database-error, asteroid-stream-error
- Helper macros: with-error-handling, with-db-error-handling
- Helper functions: signal-not-found, signal-validation-error, etc.
- Refactored 19 API endpoints and page routes
- Proper HTTP status codes: 404, 401, 403, 400, 500
Changes:
- conditions.lisp: NEW (180+ lines of error handling infrastructure)
- asteroid.asd: Add conditions.lisp to system components
- asteroid.lisp: Refactor 30+ endpoints, eliminate 200+ lines of boilerplate
- template-utils.lisp: Add centralized template loading helpers
- frontend-partials.lisp: Update template loading and string construction
Net result: -97 lines of code, significantly improved error handling,
more maintainable and idiomatic Common Lisp.
All changes tested and verified:
- Clean build
- All endpoints functional
- Error handling returns proper HTTP codes
- No regressions
This commit implements three major refactorings to make the codebase more
idiomatic and maintainable:
1. Template Path Centralization
- Add *template-directory* parameter and helper functions
- Replace 11+ instances of repetitive template loading boilerplate
- New functions: template-path, load-template in template-utils.lisp
2. String Construction with FORMAT
- Replace concatenate with format for external URLs (Icecast, static files)
- Maintain Radiance URI handling for internal routes
- Applied to stream URLs, status endpoints, and API responses
3. Error Handling with Custom Conditions
- NEW FILE: conditions.lisp with comprehensive error hierarchy
- Custom conditions: not-found-error, authentication-error,
authorization-error, validation-error, database-error, asteroid-stream-error
- Helper macros: with-error-handling, with-db-error-handling
- Helper functions: signal-not-found, signal-validation-error, etc.
- Refactored 19 API endpoints and page routes
- Proper HTTP status codes: 404, 401, 403, 400, 500
Changes:
- conditions.lisp: NEW (180+ lines of error handling infrastructure)
- asteroid.asd: Add conditions.lisp to system components
- asteroid.lisp: Refactor 30+ endpoints, eliminate 200+ lines of boilerplate
- template-utils.lisp: Add centralized template loading helpers
- frontend-partials.lisp: Update template loading and string construction
Net result: -97 lines of code, significantly improved error handling,
more maintainable and idiomatic Common Lisp.
All changes tested and verified:
- Clean build
- All endpoints functional
- Error handling returns proper HTTP codes
- No regressions
This commit implements three major refactorings to make the codebase more
idiomatic and maintainable:
1. Template Path Centralization
- Add *template-directory* parameter and helper functions
- Replace 11+ instances of repetitive template loading boilerplate
- New functions: template-path, load-template in template-utils.lisp
2. String Construction with FORMAT
- Replace concatenate with format for external URLs (Icecast, static files)
- Maintain Radiance URI handling for internal routes
- Applied to stream URLs, status endpoints, and API responses
3. Error Handling with Custom Conditions
- NEW FILE: conditions.lisp with comprehensive error hierarchy
- Custom conditions: not-found-error, authentication-error,
authorization-error, validation-error, database-error, asteroid-stream-error
- Helper macros: with-error-handling, with-db-error-handling
- Helper functions: signal-not-found, signal-validation-error, etc.
- Refactored 19 API endpoints and page routes
- Proper HTTP status codes: 404, 401, 403, 400, 500
Changes:
- conditions.lisp: NEW (180+ lines of error handling infrastructure)
- asteroid.asd: Add conditions.lisp to system components
- asteroid.lisp: Refactor 30+ endpoints, eliminate 200+ lines of boilerplate
- template-utils.lisp: Add centralized template loading helpers
- frontend-partials.lisp: Update template loading and string construction
Net result: -97 lines of code, significantly improved error handling,
more maintainable and idiomatic Common Lisp.
All changes tested and verified:
- Clean build
- All endpoints functional
- Error handling returns proper HTTP codes
- No regressions
- Add user password change functionality in profile page
- Add admin password reset functionality in admin dashboard
- Fix listener count to show total from Icecast root tag
- Replace concatenate with format
- Add with-error-handling to API endpoints
- Make Icecast port binding configurable via ICECAST_BIND env var
- Add comprehensive docstrings to public functions
Note: Password reset has known issue with LambdaLite db:update
not updating password-hash field. Issue reported as an issue.