Commit Graph

253 Commits

Author SHA1 Message Date
Glenn Thompson 79ab87436e Refine recently played styling and MusicBrainz search
- 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
2025-11-20 17:05:35 -05:00
Glenn Thompson 0a7d5c3de5 Add recently played tracks feature with MusicBrainz integration
- 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.
2025-11-20 17:05:35 -05:00
Luis Pereira a1cfaf468c fix: playlist creation on frontend 2025-11-19 18:00:02 -05:00
Luis Pereira 9c3d4bcec4 fix: hide duplicated browser audio in player page 2025-11-19 18:00:02 -05:00
Luis Pereira a1fa5b0b51 fix: tracks and playlist db interation through data-model 2025-11-19 18:00:02 -05:00
Luis Pereira 559187df2e fix: with-error-handling using inner message
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.
2025-11-17 18:08:12 -05:00
Luis Pereira 59076e67b8 fix: profile password change using non existing function 2025-11-17 18:08:12 -05:00
Glenn Thompson 2a505e482d 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
2025-11-17 18:06:14 -05:00
Glenn Thompson 19b9deccf5 fix: Use /app/music/ as default music library path for production
- 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
2025-11-17 18:06:14 -05:00
Brian O'Reilly 6043e3f9a4 lets just ignore the library directory, permanently. :(( 2025-11-16 11:16:01 -05:00
Luis Pereira 8245917b28 fix: add data-model-save wrapper
This tries to bypass a weird error where native "dm:save" fails with lambdalite.
2025-11-16 09:38:04 -05:00
Luis Pereira 74088ca47b fix: admin button shown only for admin accounts 2025-11-16 09:38:04 -05:00
Luis Pereira c5804641b8 fix: move user database methods to data-model 2025-11-16 09:38:04 -05:00
Luis Pereira 92ccee7cf6 feat: data module to alist converter 2025-11-16 09:38:04 -05:00
Luis Pereira 8b33968011 fix: failed register error messages 2025-11-15 08:23:31 -05:00
Luis Pereira 6f3973e86a fix: invalid login error on template 2025-11-15 08:23:31 -05:00
Luis Pereira 355655e8eb fix: styling of audio player on chrome browsers 2025-11-15 08:21:10 -05:00
Glenn Thompson 8b0e494da9 fix: Replace undefined uri-path with radiance:path
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.
2025-11-14 06:57:42 -05:00
Glenn Thompson 8c5cb6be31 fix: Use sequential mode in liquidsoap to play through entire playlist
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)
2025-11-13 17:30:19 -05:00
Brian O'Reilly 0204485407 ... but, you know, with actually correct paths. 2025-11-12 20:44:04 -05:00
Brian O'Reilly 0d68c9cc82 build info updates, curated playlist 2025-11-11 17:12:32 -05:00
Brian O'Reilly 7c569ca4f6 startup toggles 2025-11-11 12:04:06 -05:00
Brian O'Reilly f0b03255b8 but not postgres yet. 2025-11-11 11:26:05 -05:00
Brian O'Reilly c4a030e6e6 building building.. 2025-11-11 11:19:03 -05:00
Brian O'Reilly 5f91a81545 move main closer to my config branch in preperation for moving in totality. 2025-11-11 11:16:32 -05:00
Brian O'Reilly 7ed4515139 a nice asteroid, from Summer Emacs. remember to ask for forgiveness. 2025-11-11 11:11:50 -05:00
Brian O'Reilly 87e3f98e17 fixup routes. turn down compression on executable. 2025-11-11 11:06:29 -05:00
Brian O'Reilly 11c3e1df77 slight error computing the external/internal url from the uri object. 2025-11-10 08:10:53 -05:00
Luis Pereira 2fa72117cd Partial Revert "refactor: Implement Lispy improvements - templates, strings, and error handling"
This reverts commit 5882141cfa.
2025-11-08 08:55:27 -05:00
glenneth d9f2ac58fc fix: Replace l:info with format t for logging
- l:info was called with wrong number of arguments
- Use format t for consistency with rest of codebase
2025-11-06 16:47:18 -05:00
glenneth 6a3917bb12 fix: Correct database schema bugs from upstream merge
- Fix typo: :ingeger -> :integer in playlist_tracks.position
- Fix unsupported type: :timestamp -> :integer in playlist_tracks.added_date
- LambdaLite only supports :text, :integer, and :boolean types
2025-11-06 16:47:18 -05:00
Luis Pereira d4fa384204 fix: remove target from nav bar 2025-11-06 16:42:29 -05:00
Luis Pereira 62cad7b2ad fix: move duplicated stream information to live stream panel 2025-11-06 16:42:29 -05:00
Brian O'Reilly ffd178c555 TODO updates, Nov 5, 2025 2025-11-05 17:48:05 -05:00
Brian O'Reilly 270c0ad679 update TODO.org 2025-11-04 17:43:03 -05:00
Brian O'Reilly 1665efe1e1 refactor: Implement Lispy improvements - templates, strings, and error handling
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
2025-11-04 17:42:41 -05:00
Brian O'Reilly 40a49c1c25 many little changes all in a line.
my feature branch touches too many things. fix merge conflicts in
rebase to main.
2025-11-04 17:42:41 -05:00
Brian O'Reilly 30b2d88f6a small moves, ellie. small moves. 2025-11-04 17:42:41 -05:00
Brian O'Reilly 3dd9c2d469 many state needs construction at build time. 2025-11-04 17:42:41 -05:00
Brian O'Reilly b9b3feda6b refactor: Implement Lispy improvements - templates, strings, and error handling
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
2025-11-04 17:42:41 -05:00
Brian O'Reilly 69b0b2ca9e it really is best not to rewrite history. bring this back from the dead. 2025-11-04 17:42:41 -05:00
Brian O'Reilly b80dea5a08 many little changes all in a line.
my feature branch touches too many things. fix merge conflicts in
rebase to main.
2025-11-04 17:42:41 -05:00
Brian O'Reilly 5882141cfa refactor: Implement Lispy improvements - templates, strings, and error handling
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
2025-11-04 17:42:06 -05:00
Brian O'Reilly 85881b8fb6 small moves, ellie. small moves. 2025-11-04 17:37:13 -05:00
glenneth 4c99ded7f0 feat: Add password management and fix listener count
- 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.
2025-11-04 16:26:29 -05:00
glenneth c58c8a255c security: Remove hardcoded admin credentials from login page
Removed the display of default admin username and password from the
login page template. This information should not be publicly visible
as it poses a security risk in production environments.

Administrators should use secure credential management practices
and change default passwords during initial setup.
2025-11-03 22:40:24 -05:00
Luis Pereira 043c0d8610 fix: stream service containers lock to localhost access 2025-11-03 18:39:11 -05:00
Luis Pereira 4404b416eb fix: stream information update on frameset view 2025-11-03 18:36:40 -05:00
Luis Pereira aa9a2cf225 feat: persist stream quality in local storage 2025-11-03 18:36:40 -05:00
Luis Pereira 559893ed64 fix: redirection when navigating between frameset 2025-11-03 18:36:40 -05:00