diff --git a/docs/API-ENDPOINTS.org b/docs/API-ENDPOINTS.org index c97ad42..1e463ef 100644 --- a/docs/API-ENDPOINTS.org +++ b/docs/API-ENDPOINTS.org @@ -423,51 +423,6 @@ curl -X POST http://localhost:8080/api/asteroid/playlists/create \ When =browser=true= is passed, endpoints will redirect to appropriate pages instead of returning JSON. -* Integration Examples - -** JavaScript/Fetch API - -#+BEGIN_SRC javascript -// Get tracks -fetch('/api/asteroid/tracks') - .then(response => response.json()) - .then(data => { - console.log('Tracks:', data.tracks); - }); - -// Play a track -fetch('/api/asteroid/player/play', { - method: 'POST', - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - }, - body: 'track-id=123' -}) - .then(response => response.json()) - .then(data => { - console.log('Now playing:', data.player.currentTrack); - }); -#+END_SRC - -** Python - -#+BEGIN_SRC python -import requests - -# Get server status -response = requests.get('http://localhost:8080/api/asteroid/status') -print(response.json()) - -# Create playlist (with session) -session = requests.Session() -# ... login first ... -response = session.post( - 'http://localhost:8080/api/asteroid/playlists/create', - data={'name': 'My Playlist', 'description': 'Test'} -) -print(response.json()) -#+END_SRC - * Rate Limiting API endpoints implement rate limiting to prevent abuse. Excessive requests may result in temporary blocking. diff --git a/docs/API-REFERENCE.org b/docs/API-REFERENCE.org index afb09de..21fbea0 100644 --- a/docs/API-REFERENCE.org +++ b/docs/API-REFERENCE.org @@ -1,4 +1,4 @@ -#+TITLE: Asteroid Radio - Interface Reference +#+TITLE: Asteroid Radio - API Reference #+AUTHOR: Asteroid Radio Development Team #+DATE: 2025-10-26 diff --git a/docs/DEVELOPMENT.org b/docs/DEVELOPMENT.org index e900684..e607683 100644 --- a/docs/DEVELOPMENT.org +++ b/docs/DEVELOPMENT.org @@ -4,6 +4,10 @@ * Development Setup +#+BEGIN_QUOTE +*Note on Package Managers*: Examples use =apt= (Debian/Ubuntu). Replace with your distribution's package manager (=dnf=, =pacman=, =zypper=, =apk=, etc.). +#+END_QUOTE + ** Prerequisites *** System Dependencies @@ -68,7 +72,7 @@ sbcl --load quicklisp.lisp --eval "(quicklisp-quickstart:install)" --quit *** Clone Repository #+BEGIN_SRC bash -git clone https://github.com/fade/asteroid +git clone https://github.com/fade/asteroid.git cd asteroid #+END_SRC @@ -125,9 +129,9 @@ sbcl --eval "(ql:quickload :asteroid)" --eval "(asteroid:start-server)" ** Music Library Management *** Directory Structure -The music directory structure is: +The music directory is located directly under the asteroid root directory: #+BEGIN_SRC -asteroid/docker/music/ # Host directory (mounted to containers) +asteroid/music/ # Music directory (can be symlink) ├── artist1/ │ ├── album1/ │ │ ├── track1.mp3 @@ -138,6 +142,11 @@ asteroid/docker/music/ # Host directory (mounted to containers) └── single.wav #+END_SRC +The =music/= directory can be: +- A regular directory with music files +- A symlink to your actual music collection +- Multiple subdirectories or symlinks within it + *** Recursive Scanning Capabilities The Asteroid application includes built-in recursive directory scanning: - *Function*: =scan-music-library= in =stream-media.lisp= @@ -149,16 +158,21 @@ The Asteroid application includes built-in recursive directory scanning: *** Adding Music to Development Environment #+BEGIN_SRC bash # Option 1: Copy music files directly -cp -r /path/to/your/music/* docker/music/ +cp -r /path/to/your/music/* music/ -# Option 2: Mount remote directory (for large collections) +# Option 2: Symlink entire music directory +ln -s /path/to/existing/music music + +# Option 3: Symlink subdirectories within music/ +mkdir -p music +ln -s /path/to/collection1 music/collection1 +ln -s /path/to/collection2 music/collection2 + +# Option 4: Mount remote directory (for large collections) # Edit docker-compose.yml to change volume mount: # volumes: # - /mnt/remote-music:/app/music:ro -# Option 3: Symlink to existing collection -ln -s /path/to/existing/music docker/music/collection - # Trigger library scan via API curl -X POST http://localhost:8080/api/asteroid/admin/scan-library #+END_SRC diff --git a/docs/DOCKER-STREAMING.org b/docs/DOCKER-STREAMING.org index 5b542c0..75592ed 100644 --- a/docs/DOCKER-STREAMING.org +++ b/docs/DOCKER-STREAMING.org @@ -6,6 +6,10 @@ This guide covers the complete Docker-based streaming setup for Asteroid Radio using Icecast2 and Liquidsoap containers. This approach provides a containerized, portable streaming infrastructure that's easy to deploy and maintain. +#+BEGIN_QUOTE +*Note on Package Managers*: Examples use =apt= (Debian/Ubuntu). Replace with your distribution's package manager (=dnf=, =pacman=, =zypper=, =apk=, etc.). +#+END_QUOTE + * Architecture ** Container Stack diff --git a/docs/INSTALLATION.org b/docs/INSTALLATION.org index 277211a..2bf289d 100644 --- a/docs/INSTALLATION.org +++ b/docs/INSTALLATION.org @@ -6,6 +6,14 @@ This guide covers the complete installation and deployment of Asteroid Radio. The **recommended approach** is Docker-based installation for easy deployment and consistency. Native installation is also available for development or custom deployments. +#+BEGIN_QUOTE +*Note on Package Managers*: Examples in this guide use =apt= (Debian/Ubuntu). Replace with your distribution's package manager: +- Fedora/RHEL: =dnf= or =yum= +- Arch Linux: =pacman= +- openSUSE: =zypper= +- Alpine: =apk= +#+END_QUOTE + * Quick Start (Docker - Recommended) ** Prerequisites Check @@ -19,7 +27,7 @@ docker info ** One-Command Setup #+BEGIN_SRC bash # Clone and setup -git clone https://github.com/fade/asteroid asteroid-radio +git clone https://github.com/fade/asteroid.git asteroid-radio cd asteroid-radio/docker docker compose up -d #+END_SRC @@ -572,7 +580,7 @@ chmod +x ~/asteroid-radio/health-check.sh - Test stream connectivity from different networks ** Getting Support -- Check project documentation and FAQ +- Check project documentation - Review system logs for error messages - Submit issues with detailed system information - Join our IRC chat room: **#asteroid.music** on **irc.libera.chat** diff --git a/docs/README.org b/docs/README.org index ee16d80..329643e 100644 --- a/docs/README.org +++ b/docs/README.org @@ -131,15 +131,15 @@ Asteroid Radio uses a modern, containerized architecture: ┌─────────────────────────────────────────────────────────────┐ │ Asteroid Radio Platform │ ├─────────────────────────────────────────────────────────────┤ -│ Streaming Infrastructure (Docker) │ -│ ├── Icecast2 (HTTP Streaming Server) │ -│ ├── Liquidsoap (Audio Processing Pipeline) │ -│ └── Multiple Format Support (AAC, MP3) │ +│ Streaming Infrastructure (Docker) │ +│ ├── Icecast2 (HTTP Streaming Server) │ +│ ├── Liquidsoap (Audio Processing Pipeline) │ +│ └── Multiple Format Support (AAC, MP3) │ ├─────────────────────────────────────────────────────────────┤ -│ Control Interfaces │ -│ ├── Icecast Admin Web Interface │ -│ ├── Liquidsoap Telnet Control │ -│ └── Docker Container Management │ +│ Control Interfaces │ +│ ├── Icecast Admin Web Interface │ +│ ├── Liquidsoap Telnet Control │ +│ └── Docker Container Management │ └─────────────────────────────────────────────────────────────┘ #+END_EXAMPLE diff --git a/docs/TESTING.org b/docs/TESTING.org index 2b07453..2ae88cc 100644 --- a/docs/TESTING.org +++ b/docs/TESTING.org @@ -6,6 +6,10 @@ This document describes the automated testing system for Asteroid Radio. +#+BEGIN_QUOTE +*Note on Package Managers*: Examples use =apt= (Debian/Ubuntu). Replace with your distribution's package manager (=dnf=, =pacman=, =zypper=, =apk=, etc.). +#+END_QUOTE + * Test Script The =test-server.sh= script provides comprehensive testing of all server endpoints and functionality.