docs: Fix music directory location, remove Python examples, add package manager notes

- Updated DEVELOPMENT.org: music directory is now asteroid/music/ (not docker/music/)
- Clarified music/ can be a symlink to actual music collection
- Added multiple symlink options for music management
- Removed redundant Python integration examples from API-ENDPOINTS.org
- Removed duplicate Integration Examples section (curl already covered in Testing)
- Added package manager notes to INSTALLATION, DEVELOPMENT, DOCKER-STREAMING, and TESTING
- Notes clarify apt examples can be replaced with dnf, pacman, zypper, apk, etc.
- Maintains clean documentation without cluttering every command
This commit is contained in:
Glenn Thompson 2025-10-28 07:08:10 +03:00 committed by Brian O'Reilly
parent f1eb43b325
commit 1c85464a5f
7 changed files with 49 additions and 64 deletions

View File

@ -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. 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 * Rate Limiting
API endpoints implement rate limiting to prevent abuse. Excessive requests may result in temporary blocking. API endpoints implement rate limiting to prevent abuse. Excessive requests may result in temporary blocking.

View File

@ -1,4 +1,4 @@
#+TITLE: Asteroid Radio - Interface Reference #+TITLE: Asteroid Radio - API Reference
#+AUTHOR: Asteroid Radio Development Team #+AUTHOR: Asteroid Radio Development Team
#+DATE: 2025-10-26 #+DATE: 2025-10-26

View File

@ -4,6 +4,10 @@
* Development Setup * 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 ** Prerequisites
*** System Dependencies *** System Dependencies
@ -68,7 +72,7 @@ sbcl --load quicklisp.lisp --eval "(quicklisp-quickstart:install)" --quit
*** Clone Repository *** Clone Repository
#+BEGIN_SRC bash #+BEGIN_SRC bash
git clone https://github.com/fade/asteroid git clone https://github.com/fade/asteroid.git
cd asteroid cd asteroid
#+END_SRC #+END_SRC
@ -125,9 +129,9 @@ sbcl --eval "(ql:quickload :asteroid)" --eval "(asteroid:start-server)"
** Music Library Management ** Music Library Management
*** Directory Structure *** Directory Structure
The music directory structure is: The music directory is located directly under the asteroid root directory:
#+BEGIN_SRC #+BEGIN_SRC
asteroid/docker/music/ # Host directory (mounted to containers) asteroid/music/ # Music directory (can be symlink)
├── artist1/ ├── artist1/
│ ├── album1/ │ ├── album1/
│ │ ├── track1.mp3 │ │ ├── track1.mp3
@ -138,6 +142,11 @@ asteroid/docker/music/ # Host directory (mounted to containers)
└── single.wav └── single.wav
#+END_SRC #+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 *** Recursive Scanning Capabilities
The Asteroid application includes built-in recursive directory scanning: The Asteroid application includes built-in recursive directory scanning:
- *Function*: =scan-music-library= in =stream-media.lisp= - *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 *** Adding Music to Development Environment
#+BEGIN_SRC bash #+BEGIN_SRC bash
# Option 1: Copy music files directly # 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: # Edit docker-compose.yml to change volume mount:
# volumes: # volumes:
# - /mnt/remote-music:/app/music:ro # - /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 # Trigger library scan via API
curl -X POST http://localhost:8080/api/asteroid/admin/scan-library curl -X POST http://localhost:8080/api/asteroid/admin/scan-library
#+END_SRC #+END_SRC

View File

@ -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. 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 * Architecture
** Container Stack ** Container Stack

View File

@ -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. 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) * Quick Start (Docker - Recommended)
** Prerequisites Check ** Prerequisites Check
@ -19,7 +27,7 @@ docker info
** One-Command Setup ** One-Command Setup
#+BEGIN_SRC bash #+BEGIN_SRC bash
# Clone and setup # 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 cd asteroid-radio/docker
docker compose up -d docker compose up -d
#+END_SRC #+END_SRC
@ -572,7 +580,7 @@ chmod +x ~/asteroid-radio/health-check.sh
- Test stream connectivity from different networks - Test stream connectivity from different networks
** Getting Support ** Getting Support
- Check project documentation and FAQ - Check project documentation
- Review system logs for error messages - Review system logs for error messages
- Submit issues with detailed system information - Submit issues with detailed system information
- Join our IRC chat room: **#asteroid.music** on **irc.libera.chat** - Join our IRC chat room: **#asteroid.music** on **irc.libera.chat**

View File

@ -131,15 +131,15 @@ Asteroid Radio uses a modern, containerized architecture:
┌─────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
│ Asteroid Radio Platform │ │ Asteroid Radio Platform │
├─────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────┤
│ Streaming Infrastructure (Docker) │ │ Streaming Infrastructure (Docker)
│ ├── Icecast2 (HTTP Streaming Server) │ │ ├── Icecast2 (HTTP Streaming Server)
│ ├── Liquidsoap (Audio Processing Pipeline) │ │ ├── Liquidsoap (Audio Processing Pipeline)
│ └── Multiple Format Support (AAC, MP3) │ │ └── Multiple Format Support (AAC, MP3)
├─────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────┤
│ Control Interfaces │ │ Control Interfaces
│ ├── Icecast Admin Web Interface │ │ ├── Icecast Admin Web Interface
│ ├── Liquidsoap Telnet Control │ │ ├── Liquidsoap Telnet Control
│ └── Docker Container Management │ │ └── Docker Container Management
└─────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────┘
#+END_EXAMPLE #+END_EXAMPLE

View File

@ -6,6 +6,10 @@
This document describes the automated testing system for Asteroid Radio. 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 * Test Script
The =test-server.sh= script provides comprehensive testing of all server endpoints and functionality. The =test-server.sh= script provides comprehensive testing of all server endpoints and functionality.