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:
parent
f1eb43b325
commit
1c85464a5f
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#+TITLE: Asteroid Radio - Interface Reference
|
||||
#+TITLE: Asteroid Radio - API Reference
|
||||
#+AUTHOR: Asteroid Radio Development Team
|
||||
#+DATE: 2025-10-26
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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**
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue