From 3a8827f4425518d53ff01f6d06ba4d21a33f3af0 Mon Sep 17 00:00:00 2001 From: Glenn Thompson Date: Sat, 6 Dec 2025 21:11:57 +0300 Subject: [PATCH] Fix #57: Implement frameset-aware login/logout flow with AJAX navigation - Add frameset-aware content pages: login-content, admin-content, profile-content - Implement AJAX navigation to prevent audio interruption during page transitions - Add handleLogout() function to logout without breaking frameset - Update login form to submit via AJAX and follow redirects - Add audio keep-alive protection with 500ms interval check - Update logout handler to detect frameset mode and redirect appropriately - Add .gitignore entry for generated asteroid.css The persistent audio player now continues playing through: - Login page loading - Login form submission - Redirect to admin/profile pages - Navigation within admin/profile - Logout process All navigation within frameset mode now uses fetch() to load content without actual page navigation, keeping the audio player frame untouched. --- .gitignore | 3 + PR.md | 169 ++++++++++++++++++ asteroid.lisp | 55 ++++++ auth-routes.lisp | 53 +++++- escape-velocity.m3u | 144 +++++++++++++++ template/admin-content.ctml | 293 +++++++++++++++++++++++++++++++ template/audio-player-frame.ctml | 63 ++++++- template/front-page-content.ctml | 54 +++++- template/login-content.ctml | 106 +++++++++++ template/player-content.ctml | 54 +++++- template/profile-content.ctml | 239 +++++++++++++++++++++++++ 11 files changed, 1224 insertions(+), 9 deletions(-) create mode 100644 PR.md create mode 100644 escape-velocity.m3u create mode 100644 template/admin-content.ctml create mode 100644 template/login-content.ctml create mode 100644 template/profile-content.ctml diff --git a/.gitignore b/.gitignore index 4d55b48..5ce22a5 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,6 @@ logs/ performance-logs/ # Temporary files + +# Generated CSS (auto-generated from LASS) +static/asteroid.css diff --git a/PR.md b/PR.md new file mode 100644 index 0000000..5f9ded3 --- /dev/null +++ b/PR.md @@ -0,0 +1,169 @@ +# Convert JavaScript to Parenscript with Enhanced Spectrum Analyzer + +## Overview + +This PR converts all frontend JavaScript files to Parenscript (Common Lisp that compiles to JavaScript), improving maintainability and code consistency across the Asteroid Radio codebase. Additionally, it includes significant enhancements to the spectrum analyzer with theming, multiple visualization styles, and improved stream reliability. + +## Major Changes + +### 1. Parenscript Conversion + +- **Converted 7 JavaScript files to Parenscript:** + - `admin.js` → `parenscript/admin.lisp` + - `auth-ui.js` → `parenscript/auth-ui.lisp` + - `front-page.js` → `parenscript/front-page.lisp` + - `player.js` → `parenscript/player.lisp` + - `profile.js` → `parenscript/profile.lisp` + - `users.js` → `parenscript/users.lisp` + - `recently-played.js` → `parenscript/recently-played.lisp` + +- **Original JavaScript files** renamed to `.js.original` for reference +- **Added** `parenscript-utils.lisp` for shared compilation utilities +- **Parenscript files are now the source of truth**; JavaScript is generated dynamically on request + +### 2. Stream Reliability Improvements + +- **Automatic reconnection logic** for live stream after long pauses (>10 seconds) +- **Improved spectrum analyzer** audio context handling with proper reset functionality +- **Fixed stream pause detection** to prevent unnecessary "now playing" updates during paused playback +- **Better error handling** for stream stalls and connection issues + +### 3. Spectrum Analyzer Enhancements + +#### Color Themes (6 options) +- **Monotone** - Deep blue to cobalt gradient matching site aesthetic +- **Green** - Classic bright green gradient (default) +- **Blue** - Cyan to deep blue +- **Purple** - Magenta to deep purple +- **Red** - Bright red to dark red +- **Amber** - Orange to brown + +#### Visualization Styles (3 options) +- **Bars** - Traditional bar graph (default) +- **Wave** - Continuous line/waveform +- **Dots** - Particle/dot visualization + +#### UI Features +- **Dropdown controls** for real-time theme and style selection +- **Persistent preferences** saved to localStorage +- **Dynamic border color** that changes to match selected theme +- **Dynamic dropdown styling** - dropdown boxes update their colors to match the selected theme +- **Mute detection** with visual "MUTED" indicator overlay + +### 4. UX Improvements + +- **Live indicator animation** changed from blinking to smooth pulse (inspired by old MacBook sleep indicator) +- **Removed verbose debug logging** from console output +- **Cleaner, more professional** user experience throughout + +### 5. Documentation & Scripts + +- **Added** `docs/PARENSCRIPT-EXPERIMENT.org` documenting the conversion process and rationale +- **Added helper scripts** for music library management: + - `scripts/music-library-tree.py` - Generate library tree structure + - `scripts/fix-m3u-paths.py` - Fix playlist paths + - `scripts/scan.py` - Library scanning utilities +- **Added sample playlists** and playlist documentation + +## Technical Details + +### Parenscript Integration + +- All Parenscript files compile to JavaScript **on-the-fly** via custom route handlers in `asteroid.lisp` +- Compilation happens at request time, allowing for rapid development iteration +- No build step required for JavaScript changes +- Full access to Common Lisp macros and language features for frontend code + +### Backward Compatibility + +- ✅ Maintains full backward compatibility with existing functionality +- ✅ No breaking changes to API or user-facing features +- ✅ All existing routes and endpoints remain unchanged +- ✅ Original JavaScript preserved as `.original` files for reference + +### Code Quality + +- Removed generated `asteroid.css` from repository (auto-generated on build) +- Consistent code style across frontend and backend (all Lisp) +- Better type safety and error handling through Lisp's condition system +- Easier refactoring and maintenance with unified language + +## Testing + +- ✅ All existing functionality verified working +- ✅ Stream reconnection tested with long pauses (>10 seconds) +- ✅ Spectrum analyzer themes and styles tested across all pages (front page, player, admin) +- ✅ Preferences persistence verified across browser sessions +- ✅ Cross-browser compatibility maintained +- ✅ Audio context handling tested with multiple audio elements +- ✅ Mute detection working correctly + +## Migration Notes + +### For Developers + +- Frontend changes should now be made in `parenscript/*.lisp` files +- JavaScript is generated automatically - no need to edit `.js` files +- Use `make clean && make` to rebuild after Parenscript changes +- Original JavaScript files kept as `.js.original` for reference during transition + +### For Deployment + +- No changes to deployment process +- Server generates JavaScript on-the-fly from Parenscript +- No additional dependencies beyond existing Common Lisp setup + +## Files Changed + +### Added +- `parenscript-utils.lisp` - Parenscript compilation utilities +- `parenscript/admin.lisp` - Admin interface logic +- `parenscript/auth-ui.lisp` - Authentication UI +- `parenscript/front-page.lisp` - Front page and live stream +- `parenscript/player.lisp` - Audio player controls +- `parenscript/profile.lisp` - User profile management +- `parenscript/recently-played.lisp` - Recently played tracks +- `parenscript/users.lisp` - User management +- `docs/PARENSCRIPT-EXPERIMENT.org` - Documentation +- `scripts/*` - Helper scripts for library management + +### Modified +- `asteroid.lisp` - Added Parenscript compilation routes, removed debug logging +- `frontend-partials.lisp` - Removed debug logging from Icecast stats +- `static/asteroid.lass` - Updated live indicator animation +- `template/*.ctml` - Added spectrum analyzer controls + +### Renamed +- `static/js/admin.js` → `static/js/admin.js.original` +- `static/js/auth-ui.js` → `static/js/auth-ui.js.original` +- `static/js/front-page.js` → `static/js/front-page.js.original` +- `static/js/player.js` → `static/js/player.js.original` +- `static/js/profile.js` → `static/js/profile.js.original` +- `static/js/users.js` → `static/js/users.js.original` +- `static/js/recently-played.js` → `static/js/recently-played.js.original` + +### Deleted +- `static/asteroid.css` - Now auto-generated, removed from repository + +## Screenshots + +The spectrum analyzer now features: +- Multiple color themes with dynamic border matching +- Three distinct visualization styles (bars, wave, dots) +- Clean dropdown UI for easy customization +- Smooth animations and transitions + +## Future Enhancements + +Potential future improvements building on this foundation: +- Additional visualization styles (spectrogram, circular, etc.) +- More color themes +- Customizable color picker for user-defined themes +- Visualization presets tied to music genres +- WebGL-accelerated rendering for complex visualizations + +## Conclusion + +This PR represents a significant modernization of the Asteroid Radio frontend while maintaining full backward compatibility. The move to Parenscript unifies the codebase under Common Lisp, making it easier to maintain and extend. The enhanced spectrum analyzer provides users with a more engaging and customizable listening experience. + +**Ready to merge** ✅ diff --git a/asteroid.lisp b/asteroid.lisp index 7a92a4e..d0254e4 100644 --- a/asteroid.lisp +++ b/asteroid.lisp @@ -552,6 +552,61 @@ :default-stream-url (format nil "~a/asteroid.aac" *stream-base-url*) :default-stream-encoding "audio/aac")) +;; Admin content frame (for frameset mode) +(define-page admin-content #@"/admin-content" () + "Admin dashboard content (displayed in content frame)" + (require-authentication) + (let ((track-count (handler-case + (length (dm:get "tracks" (db:query :all))) + (error () 0)))) + (clip:process-to-string + (load-template "admin-content") + :title "🎵 ASTEROID RADIO - Admin Dashboard" + :server-status "🟢 Running" + :database-status (handler-case + (if (db:connected-p) "🟢 Connected" "🔴 Disconnected") + (error () "🔴 No Database Backend")) + :liquidsoap-status (check-liquidsoap-status) + :icecast-status (check-icecast-status) + :track-count (format nil "~d" track-count) + :library-path "/home/glenn/Projects/Code/asteroid/music/library/" + :stream-base-url *stream-base-url* + :default-stream-url (format nil "~a/asteroid.aac" *stream-base-url*)))) + +;; Profile content frame (for frameset mode) +(define-page profile-content #@"/profile-content" () + "User profile content (displayed in content frame)" + (require-authentication) + (clip:process-to-string + (load-template "profile-content") + :title "🎧 admin - Profile | Asteroid Radio" + :username "admin" + :user-role "admin" + :join-date "Unknown" + :last-active "Unknown" + :total-listen-time "0h 0m" + :tracks-played "0" + :session-count "0" + :favorite-genre "Unknown" + :recent-track-1-title "" + :recent-track-1-artist "" + :recent-track-1-duration "" + :recent-track-1-played-at "" + :recent-track-2-title "" + :recent-track-2-artist "" + :recent-track-2-duration "" + :recent-track-2-played-at "" + :recent-track-3-title "" + :recent-track-3-artist "" + :recent-track-3-duration "" + :recent-track-3-played-at "" + :top-artist-1 "" + :top-artist-1-plays "" + :top-artist-2 "" + :top-artist-2-plays "" + :top-artist-3 "" + :top-artist-3-plays "")) + ;; Configure static file serving for other files ;; BUT exclude ParenScript-compiled JS files (define-page static #@"/static/(.*)" (:uri-groups (path)) diff --git a/auth-routes.lisp b/auth-routes.lisp index 406915f..5c89600 100644 --- a/auth-routes.lisp +++ b/auth-routes.lisp @@ -47,11 +47,61 @@ :error-message "" :display-error "display: none;")))) +;; Login content page for frameset mode +(define-page login-content #@"/login-content" () + "User login page for frameset mode" + (let ((username (radiance:post-var "username")) + (password (radiance:post-var "password"))) + (if (and username password) + ;; Handle login form submission + (let ((user (authenticate-user username password))) + (if user + (progn + ;; Login successful - store user ID in session + (format t "Login successful for user: ~a~%" (dm:field user "username")) + (handler-case + (progn + (let* ((user-id (dm:id user)) + (user-role (dm:field user "role")) + (redirect-path (cond + ;; Admin users + ((string-equal user-role "admin") "/admin-content") + ;; Regular users + (t "/profile-content")))) + (format t "User ID from DB: ~a~%" user-id) + (format t "User role: ~a, redirecting to: ~a~%" user-role redirect-path) + (setf (session:field "user-id") user-id) + (format t "User ID #~a persisted in session.~%" (session:field "user-id")) + (radiance:redirect redirect-path))) + (error (e) + (format t "Session error: ~a~%" e) + "Login successful but session error occurred"))) + ;; Login failed - show form with error + (progn + (format t "Login unsuccessful for user: ~a~%" username) + (clip:process-to-string + (load-template "login-content") + :title "Asteroid Radio - Login" + :error-message "Invalid username or password" + :display-error "display: block;")))) + ;; Show login form (no POST data) + (clip:process-to-string + (load-template "login-content") + :title "Asteroid Radio - Login" + :error-message "" + :display-error "display: none;")))) + ;; Simple logout handler (define-page logout #@"/logout" () "Handle user logout" (setf (session:field "user-id") nil) - (radiance:redirect "/")) + ;; Check if we're in a frameset by looking at the Referer header + (let* ((referer (radiance:header "Referer")) + (in-frameset (and referer + (or (search "/frameset" referer) + (search "/content" referer) + (search "-content" referer))))) + (radiance:redirect (if in-frameset "/content" "/")))) ;; API: Get all users (admin only) (define-api asteroid/users () () @@ -213,3 +263,4 @@ ("message" . ,(format nil "Could not set user '~a' as ~a." (dm:field user "username") role))))))))) + diff --git a/escape-velocity.m3u b/escape-velocity.m3u new file mode 100644 index 0000000..a126ce4 --- /dev/null +++ b/escape-velocity.m3u @@ -0,0 +1,144 @@ +#EXTM3U +#PLAYLIST:Escape Velocity - A Christmas Journey Through Space +#PHASE:Escape Velocity +#DURATION:12 hours (approx) +#CURATOR:Asteroid Radio +#DESCRIPTION:A festive 12-hour voyage blending Christmas classics with ambient, IDM, and space music for the holiday season + +# === PHASE 1: WINTER AWAKENING (Ambient Beginnings) === +#EXTINF:-1,Brian Eno - Snow +/app/music/Brian Eno/2020 - Roger Eno and Brian Eno - Mixing Colours/09 Snow.flac +#EXTINF:-1,Brian Eno - Wintergreen +/app/music/Brian Eno/2020 - Roger Eno and Brian Eno - Mixing Colours/04 Wintergreen.flac +#EXTINF:-1,Proem - Winter Wolves +/app/music/Proem - 2018 Modern Rope (WEB)/01. Winter Wolves.flac +#EXTINF:-1,Tim Hecker - Winter's Coming +/app/music/Tim Hecker - The North Water Original Score (2021 - WEB - FLAC)/Tim Hecker - The North Water (Original Score) - 10 Winter's Coming.flac +#EXTINF:-1,Biosphere - Drifter +/app/music/Biosphere - The Petrified Forest (2017) - CD FLAC/01. Biosphere - Drifter.flac +#EXTINF:-1,Dead Voices On Air - On Winters Gibbet +/app/music/Dead Voices On Air - Ghohst Stories (FLAC)/02 - On Winters Gibbet.flac +#EXTINF:-1,Color Therapy - Wintering +/app/music/Color Therapy - Mr. Wolf Is Dead (2015) WEB FLAC/12 - Wintering.flac + +# === PHASE 2: CHRISTMAS ARRIVAL (TSO Introduction) === +#EXTINF:-1,Trans-Siberian Orchestra - The Ghosts Of Christmas Eve +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Christmas Attic/01 The Ghosts Of Christmas Eve.flac +#EXTINF:-1,Trans-Siberian Orchestra - Christmas In The Air +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Christmas Attic/14 Christmas In The Air.flac +#EXTINF:-1,Trans-Siberian Orchestra - Christmas Canon +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Christmas Attic/08 Christmas Canon.flac +#EXTINF:-1,Trans-Siberian Orchestra - Appalachian Snowfall +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Christmas Attic/11 Appalachian Snowfall.flac +#EXTINF:-1,Trans-Siberian Orchestra - The Snow Came Down +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Christmas Attic/13 The Snow Came Down.flac + +# === PHASE 3: AMBIENT INTERLUDE (Space & Atmosphere) === +#EXTINF:-1,Biosphere - 10 Snurp 1937 +/app/music/Biosphere - Sound Installations -2000-2009 [FLAC]/Biosphere - Sound Installations -2000-2009- - 10 Snurp 1937.flac +#EXTINF:-1,Biosphere - 05 Fluvialmorphologie +/app/music/Biosphere - Sound Installations -2000-2009 [FLAC]/Biosphere - Sound Installations -2000-2009- - 05 Fluvialmorphologie.flac +#EXTINF:-1,God is an Astronaut - Winter Dusk-Awakening +/app/music/God is an Astronaut - Epitaph (2018) WEB FLAC/03. Winter Dusk-Awakening.flac +#EXTINF:-1,Proem - Snow Drifts +/app/music/Proem - Twelve Tails-(2021) @FLAC [16-48]/11 - Snow Drifts.flac +#EXTINF:-1,Proem - Stick to Music Snowflake +/app/music/Proem - Until Here for Years (n5md, 2019) flac/04 - Stick to Music Snowflake.flac +#EXTINF:-1,Four Tet - 04 Tremper +/app/music/Four Tet - New Energy {CD} [FLAC] (2017)/04 Tremper.flac + +# === PHASE 4: CHRISTMAS EVE STORIES === +#EXTINF:-1,Trans-Siberian Orchestra - First Snow (Instrumental) +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/Christmas Eve and Other Stories/04 First Snow (Instrumental).flac +#EXTINF:-1,Trans-Siberian Orchestra - The Silent Nutcracker (Instrumental) +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/Christmas Eve and Other Stories/05 The Silent Nutcracker (Instrumental).flac +#EXTINF:-1,Trans-Siberian Orchestra - A Mad Russian's Christmas (Instrumental) +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/Christmas Eve and Other Stories/06 A Mad Russian's Christmas (Instrumental).flac +#EXTINF:-1,Trans-Siberian Orchestra - Christmas Eve,Sarajevo 12,24 (Instrumental) +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/Christmas Eve and Other Stories/08 Christmas Eve,Sarajevo 12,24 (Instrumental).flac +#EXTINF:-1,Trans-Siberian Orchestra - This Christmas Day +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/Christmas Eve and Other Stories/14 This Christmas Day.flac + +# === PHASE 5: ELECTRONIC DREAMS (IDM & Ambient) === +#EXTINF:-1,Autechre - NTS Session 1-005-Autechre-carefree counter dronal +/app/music/Autechre - 2018 - NTS Session 1/NTS Session 1-005-Autechre-carefree counter dronal.flac +#EXTINF:-1,Clark - Living Fantasy +/app/music/Clark - Death Peak (2017) [FLAC]/08 - Living Fantasy.flac +#EXTINF:-1,Clark - My Machines (Clark Remix) +/app/music/Clark - Feast Beast (2013) [24 Bit WEB FLAC] [16-44]/1.17. Battles - My Machines (Clark Remix).flac +#EXTINF:-1,Plaid - Dancers +/app/music/Plaid - Polymer (2019) [WEB FLAC]/07 - Dancers.flac +#EXTINF:-1,Faux Tales - Avalon +/app/music/Faux Tales - 2015 - Kairos [FLAC] {Kensai Records KNS006 WEB}/3 - Avalon.flac +#EXTINF:-1,Color Therapy - Expect Delays (feat. Ulrich Schnauss) +/app/music/Color Therapy - Mr. Wolf Is Dead (2015) WEB FLAC/11 - Expect Delays (feat. Ulrich Schnauss).flac + +# === PHASE 6: THE LOST CHRISTMAS EVE === +#EXTINF:-1,Trans-Siberian Orchestra - The Lost Christmas Eve +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Lost Christmas Eve/02 The Lost Christmas Eve.flac +#EXTINF:-1,Trans-Siberian Orchestra - Christmas Dreams +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Lost Christmas Eve/03 Christmas Dreams.flac +#EXTINF:-1,Trans-Siberian Orchestra - Wizards in Winter +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Lost Christmas Eve/04 Wizards in Winter.flac +#EXTINF:-1,Trans-Siberian Orchestra - Christmas Concerto +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Lost Christmas Eve/07 Christmas Concerto.flac +#EXTINF:-1,Trans-Siberian Orchestra - Queen Of The Winter Night +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Lost Christmas Eve/08 Queen Of The Winter Night.flac +#EXTINF:-1,Trans-Siberian Orchestra - Christmas Nights In Blue +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Lost Christmas Eve/09 Christmas Nights In Blue.flac +#EXTINF:-1,Trans-Siberian Orchestra - Christmas Jazz +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Lost Christmas Eve/10 Christmas Jazz.flac +#EXTINF:-1,Trans-Siberian Orchestra - Christmas Jam +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Lost Christmas Eve/11 Christmas Jam.flac + +# === PHASE 7: CLASSICAL WINTER (Nutcracker & More) === +#EXTINF:-1,Various Artists - Dance of the Sugar-Plum Fairy +/app/music/Various Artists - The 50 Darkest Pieces of Classical Music (2011) - FLAC/CD 1/02 - Tchaikovsky - The Nutcracker - Dance of the Sugar-Plum Fairy.flac +#EXTINF:-1,Quaeschning and Ulrich Schnauss - Thirst +/app/music/Quaeschning and Ulrich Schnauss - Synthwaves (2017) {vista003, GER, CD} [FLAC]/06 - Thirst.flac +#EXTINF:-1,Proem - 04. Drawing Room Anguish +/app/music/Proem - 2018 Modern Rope (WEB)/04. Drawing Room Anguish.flac +#EXTINF:-1,Dead Voices On Air - 07. Dogger Doorlopende Split +/app/music/Dead Voices On Air - Frankie Pett En De Onderzeer Boten (2017) web/07. Dogger Doorlopende Split.flac + +# === PHASE 8: WISDOM & REFLECTION === +#EXTINF:-1,Trans-Siberian Orchestra - What Is Christmas +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Lost Christmas Eve/13 What Is Christmas.flac +#EXTINF:-1,Trans-Siberian Orchestra - The Wisdom Of Snow +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Lost Christmas Eve/15 The Wisdom Of Snow.flac +#EXTINF:-1,Trans-Siberian Orchestra - Christmas Bells, Carousels & Time +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Lost Christmas Eve/18 Christmas Bells, Carousels & Time.flac +#EXTINF:-1,Trans-Siberian Orchestra - Christmas Canon Rock +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Lost Christmas Eve/21 Christmas Canon Rock.flac +#EXTINF:-1,Trans-Siberian Orchestra - Midnight Christmas Eve +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Christmas Attic/05 Midnight Christmas Eve.flac +#EXTINF:-1,Trans-Siberian Orchestra - Dream Child (A Christmas Dream) +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Christmas Attic/15 Dream Child (A Christmas Dream).flac + +# === PHASE 9: DEEP SPACE JOURNEY (Extended Ambient) === +#EXTINF:-1,Dead Voices On Air - Red Howls +/app/music/Dead Voices On Air - Ghohst Stories (FLAC)/01 - Red Howls.flac +#EXTINF:-1,Cut Copy - Airborne +/app/music/Cut Copy - Haiku From Zero (2017) [FLAC] {2557864014}/05 - Airborne.flac +#EXTINF:-1,Owl City - 01 Hot Air Balloon +/app/music/Owl City - Ocean Eyes (Deluxe Edition) [Flac,Cue,Logs]/Disc 2/01 Hot Air Balloon.flac +#EXTINF:-1,VA - What Is Loneliness (feat. Danny Claire) [Skylex Radio Edit] +/app/music/VA - Melodic Vocal Trance 2017/24. Airborn, Bogdan Vix & KeyPlayer - What Is Loneliness (feat. Danny Claire) [Skylex Radio Edit].flac +#EXTINF:-1,VA - Winter Took Over (Radio Edit) +/app/music/VA - Melodic Vocal Trance 2017/22. Bluskay, KeyPlayer & Esmee Bor Stotijn - Winter Took Over (Radio Edit).flac +#EXTINF:-1,Alison Krauss and Union Station - My Opening Farewell +/app/music/Alison Krauss and Union Station - Paper Airplane (flac)/11 - Alison Krauss & Union Station - My Opening Farewell.flac +#EXTINF:-1,Bedouin Soundclash - Money Worries (E-Clair Refix) +/app/music/Bedouin Soundclash - Sounding a Mosaic (2004) [FLAC] {SD1267}/14 - Money Worries (E-Clair Refix).flac + +# === PHASE 10: RETURN TO WINTER (Closing Circle) === +#EXTINF:-1,Brian Eno - Snow +/app/music/Brian Eno/2020 - Roger Eno and Brian Eno - Mixing Colours/09 Snow.flac +#EXTINF:-1,Proem - Winter Wolves +/app/music/Proem - 2018 Modern Rope (WEB)/01. Winter Wolves.flac +#EXTINF:-1,God is an Astronaut - Winter Dusk-Awakening +/app/music/God is an Astronaut - Epitaph (2018) WEB FLAC/03. Winter Dusk-Awakening.flac +#EXTINF:-1,Trans-Siberian Orchestra - The Snow Came Down +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Christmas Attic/13 The Snow Came Down.flac +#EXTINF:-1,Trans-Siberian Orchestra - Christmas In The Air +/app/music/Trans-Siberian Orchestra - The Christmas Trilogy (2004) [FLAC]/The Christmas Attic/14 Christmas In The Air.flac diff --git a/template/admin-content.ctml b/template/admin-content.ctml new file mode 100644 index 0000000..59864f6 --- /dev/null +++ b/template/admin-content.ctml @@ -0,0 +1,293 @@ + + + + Asteroid Radio - Admin Dashboard + + + + + + + + +
+

🎛️ ADMIN DASHBOARD

+ + + +
+

System Status

+
+
+

Server Status

+

🟢 Running

+
+
+

Database Status

+

🟢 Connected

+
+
+

Liquidsoap Status

+

🔴 Not Running

+
+
+

Icecast Status

+

🔴 Not Running

+
+
+
+ + +
+

Music Library Management

+ + +
+

Add Music Files

+
+

To add your own MP3 files:

+
    +
  1. Copy your MP3/FLAC/OGG/WAV files to: /home/glenn/Projects/Code/asteroid/music/incoming/
  2. +
  3. Click "Copy Files to Library" below
  4. +
  5. Files will be moved to the library and added to the database
  6. +
+

Supported formats: MP3, FLAC, OGG, WAV

+
+
+ + +
+
+ +
+ + + +
+ +
+

Total Tracks: 0

+
+
+ + +
+

Track Management

+
+ + + +
+ +
+
Loading tracks...
+
+ + + +
+ + +
+

📻 Live Stream Monitor

+
+ +

Now Playing: Loading...

+ +
+
+ + +
+

🎵 Stream Queue Management

+

Manage the live stream playback queue. Changes take effect within 5-10 seconds.

+ +
+ + + + +
+ +
+
Loading queue...
+
+ +
+

Add Tracks to Queue

+ +
+
+
+ + +
+

Player Control

+
+

🎵 Player Control

+
+ + + + +
+
+ Status: Unknown
+ Current Track: None +
+
+ +
+

👥 User Management

+

Manage user accounts, roles, and permissions.

+ + + +
+

🔒 Reset User Password

+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+ + + + diff --git a/template/audio-player-frame.ctml b/template/audio-player-frame.ctml index 88777b1..144716b 100644 --- a/template/audio-player-frame.ctml +++ b/template/audio-player-frame.ctml @@ -34,6 +34,10 @@ +
@@ -56,9 +106,9 @@ Status Profile Admin - Login + Login Register - Logout + Logout diff --git a/template/login-content.ctml b/template/login-content.ctml new file mode 100644 index 0000000..77e7cdc --- /dev/null +++ b/template/login-content.ctml @@ -0,0 +1,106 @@ + + + + Asteroid Radio - Login + + + + + + + + + +
+
+

+ Asteroid + ASTEROID RADIO - LOGIN +

+ +
+ +
+
+

System Access

+ +
+
+ + +
+
+ + +
+
+ +
+
+
+
+
+ + diff --git a/template/player-content.ctml b/template/player-content.ctml index 5fabf31..17912ab 100644 --- a/template/player-content.ctml +++ b/template/player-content.ctml @@ -8,6 +8,56 @@ +
@@ -48,9 +98,9 @@ Home Profile Admin - Login + Login Register - Logout + Logout
diff --git a/template/profile-content.ctml b/template/profile-content.ctml new file mode 100644 index 0000000..7674ba4 --- /dev/null +++ b/template/profile-content.ctml @@ -0,0 +1,239 @@ + + + + Asteroid Radio - User Profile + + + + + + + + +
+

👤 USER PROFILE

+ + + +
+

🎧 User Profile

+
+
+ Username: + user +
+
+ Role: + listener +
+
+ Member Since: + 2024-01-01 +
+
+ Last Active: + Today +
+
+
+ + +
+

📊 Listening Statistics

+
+
+

Total Listen Time

+

0h 0m

+
+
+

Tracks Played

+

0

+
+
+

Sessions

+

0

+
+
+

Favorite Genre

+

Unknown

+
+
+
+ + +
+

🎵 Recently Played

+
+
+
+ No recent tracks + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+
+ +
+
+ + +
+

🎤 Top Artists

+
+
+ Unknown Artist + 0 plays +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+

📈 Listening Activity

+
+

Activity over the last 30 days

+
+
+
+
+
+
+
+
+ +
+

Listening hours per day

+
+
+ + +
+

⚙️ Profile Settings

+ + +
+

🔒 Change Password

+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ +
+ + + +
+
+
+ + + +