Commit Graph

4 Commits

Author SHA1 Message Date
glenneth c129959eaf feat: Add database persistence and editable UI for playlist schedule
- Store schedule in PostgreSQL (playlist_schedule table)
- Load schedule from database on startup
- Admin UI: add/update schedule entries with hour and playlist dropdowns
- Admin UI: delete buttons for each schedule entry
- Available playlists populated from playlists directory
- Changes persist across server restarts
2025-12-17 16:01:46 +03:00
glenneth 16b537a51d fix: Load current scheduled playlist on startup
The scheduler now loads the appropriate playlist immediately when the
server starts, not just at the next scheduled time. This ensures the
stream plays the correct time-based playlist right away.
2025-12-17 15:31:37 +03:00
glenneth f8e37ac02a feat: Add admin UI for playlist scheduler with server time display
- Add server time info (UTC) to scheduler status API
- Add scheduler section to admin.ctml with:
  - Server time display (UTC)
  - Current playlist indicator
  - Enable/Disable/Load Current buttons
  - Schedule table showing all time slots
- Add ParenScript functions for scheduler controls
- Auto-refresh scheduler status every 30 seconds
- Highlight active playlist in schedule table
2025-12-17 14:27:16 +03:00
glenneth bafc43c9f4 feat: Add automatic playlist scheduler with cl-cron
- Add playlist-scheduler.lisp with cl-cron based scheduling
- Schedule playlists at 00:00, 06:00, 12:00, 18:00 UTC
- Auto-start scheduler on database connection
- Add API endpoints for admin control:
  - /api/asteroid/scheduler/status
  - /api/asteroid/scheduler/enable
  - /api/asteroid/scheduler/disable
  - /api/asteroid/scheduler/load-current
  - /api/asteroid/scheduler/schedule
  - /api/asteroid/scheduler/update
  - /api/asteroid/scheduler/remove
- Add cl-cron dependency to asteroid.asd
- Extend morning-drift.m3u to ~6 hours (101 tracks)
2025-12-17 14:22:53 +03:00