Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ad30ba9
Add multi-provider support and local file media provider
claude Feb 4, 2026
79c8970
Add provider-aware API helpers with backward compatibility
claude Feb 4, 2026
6d575fc
Add split deployment support for remote workers
claude Feb 4, 2026
9b2d821
Clarify unified compose files for CPU and NVIDIA in setup wizard
claude Feb 4, 2026
9287f36
Add dedicated Settings page for configuration management
claude Feb 4, 2026
ab3b39a
Add multi-provider playlist creation with provider selector dropdown
claude Feb 4, 2026
0c3fbaa
Merge branch 'NeptuneHub:main' into claude/multi-provider-local-files…
rendyhd Feb 4, 2026
5a70ece
Merge feature/album-artist-support into multi-provider branch
claude Feb 4, 2026
ef30d3a
Merge branch 'claude/multi-provider-local-files-zseAX' of http://127.…
claude Feb 4, 2026
9987a83
Implement track linking mechanism for multi-provider support
claude Feb 4, 2026
f64bff9
Improve file path normalization for cross-provider matching
claude Feb 4, 2026
7f3fbcc
Add provider-specific music_path_prefix for path normalization
claude Feb 4, 2026
83014e3
Add music_path_prefix configuration field to all providers
claude Feb 4, 2026
c07762d
Add auto-detection of music_path_prefix during provider setup
claude Feb 4, 2026
90a15a8
Fix cross-provider analysis reuse to prevent duplicate track processing
claude Feb 4, 2026
c0c91f9
Many bug fixes
rendyhd Feb 4, 2026
0342a9d
Add comprehensive testing and comparison suite for dual-instance comp…
claude Feb 5, 2026
f42fe8f
Add .gitignore for testing suite report output directory
claude Feb 5, 2026
bfaa3f0
Add comprehensive README guide for the testing and comparison suite
claude Feb 5, 2026
1446375
bug fixes and hardware selection on setup
rendyhd Feb 5, 2026
ea4c0aa
Merge pull request #2 from rendyhd/multi-provider-setup-gui
rendyhd Feb 5, 2026
e22c985
bug fixes
rendyhd Feb 5, 2026
eb7fa56
Merge pull request #3 from rendyhd/multi-provider-testing-suite
rendyhd Feb 5, 2026
f6b4cbf
Prompt tests
rendyhd Feb 6, 2026
f33ed9c
Merge pull request #4 from rendyhd/multi-provider-testing-suite
rendyhd Feb 6, 2026
da5f563
- Added library selection in the setup
rendyhd Feb 6, 2026
495b2f8
Branch review fixes: security, bugs, thread safety, XSS, MPD removal,…
rendyhd Feb 8, 2026
2c78454
bug fixes and test expansion. Ready for testing
rendyhd Feb 9, 2026
2a4a844
clean compose
rendyhd Feb 9, 2026
e680b89
Merge pull request #5 from rendyhd/multi-provider-v2
rendyhd Feb 11, 2026
03add7a
Ongoing tests, initial minor bugs
rendyhd Feb 11, 2026
163dab5
Bufixes
rendyhd Feb 11, 2026
a7a5007
Prevent track duplication across providers with metadata-based fallback
rendyhd Feb 27, 2026
4c00f26
Multi-provider setup improvements: auto-config, sync endpoint, path w…
rendyhd Feb 27, 2026
5019b50
Add AI API key fields to Settings UI with Fernet encryption
rendyhd Feb 28, 2026
adfd4cd
Fix song number truncation at 100 in instant playlist
rendyhd Feb 28, 2026
ae376af
Add duplicate detection, provider health checks, and path validation
rendyhd Feb 28, 2026
32ca183
Add album support to AI instant playlist tools and search_database
rendyhd Mar 1, 2026
b2eb812
Merge main into multi-provider-setup-gui: sync with v0.9.2
rendyhd Mar 14, 2026
5a68f78
Fix test failures: patch config module and mock context managers
rendyhd Mar 14, 2026
236f3b7
Remove unnecessary complexity: encryption layer, dead columns, deprec…
rendyhd Mar 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ env/
.pytest_cache/
htmlcov/
nul
testing_suite/reports/

# Testing suite configs (contain API keys / DB passwords)
testing_suite/instant_playlist_test_config.yaml
testing_suite/ai_naming_test_config.yaml
testing_suite/comparison_config.yaml

# Deployment secrets
deployment/main.env

# Large model files in query folder
/query/*.pt
Expand Down
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ For the architecture design of AudioMuse-AI, take a look to the [ARCHITECTURE](d
EMBY_TOKEN=your-api-token
```

**For Local Files (No Media Server):**
```env
MEDIASERVER_TYPE=localfiles
LOCALFILES_MUSIC_DIRECTORY=/path/to/your/music
LOCALFILES_PLAYLIST_DIR=/path/to/your/music/playlists
```

3. **Start the services:**
```bash
docker compose -f deployment/docker-compose.yaml up -d
Expand All @@ -129,6 +136,53 @@ For the architecture design of AudioMuse-AI, take a look to the [ARCHITECTURE](d
docker compose -f deployment/docker-compose.yaml down
```

## Multi-Provider Support

AudioMuse-AI supports connecting to multiple media servers simultaneously, allowing you to:
- Share analysis data across providers (analyze once, use everywhere)
- Create playlists on multiple servers at once
- Use a GUI Setup Wizard for easy configuration

### GUI Setup Wizard

Access the Setup Wizard at `http://localhost:8000/setup` to:
1. Add and configure multiple providers
2. Test connections before saving
3. Auto-detect music path prefixes for cross-provider matching
4. Set a primary provider for playlist creation

### Local Files Provider

The Local Files provider scans your music directory directly without requiring a media server:
- Supports MP3, FLAC, OGG, M4A, WAV, WMA, AAC, and OPUS formats
- Extracts metadata from embedded tags (ID3, Vorbis comments, etc.)
- Creates M3U playlists in a configurable directory
- Extracts ratings from POPM, TXXX:RATING, and Vorbis RATING tags

**Configuration:**
```env
MEDIASERVER_TYPE=localfiles
LOCALFILES_MUSIC_DIRECTORY=/music # Path to your music library
LOCALFILES_PLAYLIST_DIR=/music/playlists # Where to save generated playlists
LOCALFILES_FORMATS=.mp3,.flac,.ogg,.m4a,.wav # Supported audio formats
LOCALFILES_SCAN_SUBDIRS=true # Scan subdirectories
```

### Cross-Provider Track Matching

When using multiple providers, tracks are matched across servers using normalized file paths. This allows:
- Analysis data to be reused across providers
- Playlists to be created on any provider using tracks from another
- Automatic ID remapping when creating cross-provider playlists

### Extended Metadata Fields

AudioMuse-AI now stores additional metadata for each track:
- **album_artist**: The album artist (useful for compilations)
- **year**: Release year extracted from various tag formats
- **rating**: User rating on 0-5 scale (from tags or media server)
- **file_path**: Normalized file path for cross-provider linking

> NOTE: by default AudioMuse-AI is deployed WITHOUT authentication layer and its suited only for LOCAL deployment. If you want to configure it have a look to the [AUTHENTICATION](docs/AUTH.md) docs. If you enable the Authentication Layer, you need to be sure that any plugin used support and use the AudioMuse-AI API TOKEN

## **Hardware Requirements**
Expand Down
995 changes: 995 additions & 0 deletions TEST_CHECKLIST.md

Large diffs are not rendered by default.

252 changes: 252 additions & 0 deletions TEST_RESULTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
# AudioMuse-AI v0.9.0 - Test Results

**Date:** 2026-02-11
**Branch:** `multi-provider-setup-gui`
**Tester:** Claude + User
**Environment:** Docker (NVIDIA GPU test stack) + Windows 11 local
**Docker Compose:** `deployment/docker-compose-unified-nvidia-test.yaml`
**Local Python:** 3.14.2 (Windows 11 Pro)
**Container Python:** 3.12 (Ubuntu 24.04 + CUDA 12.8.1)

---

## Pre-flight: Collection Status

### Local Environment (Python 3.14.2, Windows)
- **622 tests collected** across all test files
- **9 files blocked** (import `librosa` via `tasks/__init__.py` — not installed locally)
- `test_analysis.py`, `test_artist_gmm_manager.py`, `test_clustering_helper.py`,
`test_clustering_postprocessing.py`, `test_commons.py`, `test_memory_utils.py`,
`test_path_manager.py`, `test_song_alchemy.py`, `test_sonic_fingerprint_manager.py`
- **213 runtime failures** — also `librosa` import (test_clustering, test_mediaserver, test_voyager_manager, etc.)
- **407 passed, 2 skipped, 0 real failures** on tests that don't need `librosa`
- Installed `audioop-lts` to fix Python 3.14 `pydub` compatibility

### Docker Environment (Python 3.12.3, Ubuntu 24.04 + CUDA 12.8.1)
- **833 tests collected**, 0 collection errors
- **832 passed, 1 failed, 4 warnings**
- Build time: ~15 min (GPU packages + model downloads)
- Containers: redis (healthy), postgres (healthy), flask-app (up), worker (up)

### Bug Found & Fixed During Testing
| Test | Error | Fix |
|------|-------|-----|
| `test_mediaserver_localfiles.py::TestPathNormalization::test_posix_conversion` | Backslashes not converted on Linux | `normalize_file_path()`: replace `\` before creating `PurePosixPath` |

### After Fix: 833 passed, 0 failed, 4 warnings (63.80s)

### Warnings (non-blocking)
- `analysis.py:387` — RuntimeWarning: invalid value in log10 (known, edge case in mel spectrogram)
- `sklearn.linear_model` — FutureWarning: `penalty`/`n_jobs` deprecated in 1.8 (upgrade notice)

---

## Section 3: Multi-Provider Architecture

### 3.1 Fresh Install (No Existing Data)
_(pending)_

### 3.2 Migration (Existing Single-Provider Data)
_(pending)_

### 3.3 Provider CRUD API
_(pending)_

### 3.4 Multi-Provider Playlist Creation
_(pending)_

---

## Section 4: GUI Setup Wizard
_(pending - manual)_

---

## Section 5: Environment / Config Setup

### 5.1 Config Variable Validation
_(pending)_

### 5.2 Environment File
_(pending)_

### 5.3 Settings Persistence
_(pending)_

---

## Section 6: API Endpoints

### 6.1 Without Provider
_(pending)_

### 6.2 With Provider
_(pending)_

### 6.3 Error Handling
_(pending)_

---

## Section 7: App Interactions (UI/UX)
_(pending - manual)_

---

## Section 8: Instant Playlist & AI Changes

### 8.1 Agentic Loop
_(pending)_

### 8.2 Pre-Execution Validation
_(pending)_

### 8.3 Proportional Sampling
_(pending)_

### 8.4 Artist Diversity
_(pending)_

### 8.5 System Prompt
_(pending)_

### 8.6 AI MCP Client
_(pending)_

### 8.7 AI Provider Integration
_(pending)_

### 8.8 Library Context
_(pending)_

---

## Section 9: MCP Tools

### 9.1 song_similarity
_(pending)_

### 9.2 text_search
_(pending)_

### 9.3 artist_similarity
_(pending)_

### 9.4 song_alchemy
_(pending)_

### 9.5 ai_brainstorm
_(pending)_

### 9.6 search_database
_(pending)_

---

## Section 10: Provider-Specific Testing

### 10.1 Common Provider Interface
_(pending - manual)_

### 10.2 LocalFiles Provider
_(pending)_

---

## Section 11: Database & Schema Changes

### 11.1 Schema Migration
_(pending)_

### 11.2 Data Integrity
_(pending)_

---

## Section 12: Dark Mode

### 12.1 Toggle & Persistence
_(pending)_

### 12.2 Visual Correctness
_(pending - manual)_

### 12.3 CSS Variables
_(pending)_

---

## Section 13: Analysis Pipeline

### 13.1 Analysis with New Fields
_(pending)_

### 13.2 Voyager Index
_(pending)_

---

## Section 14: Playlist Ordering

### 14.1 Greedy Nearest-Neighbor
_(pending)_

### 14.2 Composite Distance
_(pending)_

### 14.3 Circle of Fifths Key Distance
_(pending)_

### 14.4 Energy Arc
_(pending)_

---

## Section 15: Deployment & Docker
_(pending - manual)_

---

## Section 16: Regression Tests

### 16.1 Features That Must Still Work
_(pending)_

### 16.2 Breaking Changes to Verify
_(pending)_

---

## Section 17: Security

### 17.1 XSS Prevention
_(pending)_

### 17.2 SQL Injection Prevention
_(pending)_

### 17.3 Authentication & Authorization
_(pending)_

---

## Summary

| Section | Pass | Fail | Skip | Total |
|---------|------|------|------|-------|
| 3. Multi-Provider | | | | |
| 4. Setup Wizard | | | | |
| 5. Config | | | | |
| 6. API | | | | |
| 7. UI/UX | | | | |
| 8. Instant Playlist | | | | |
| 9. MCP Tools | | | | |
| 10. Providers | | | | |
| 11. Database | | | | |
| 12. Dark Mode | | | | |
| 13. Analysis | | | | |
| 14. Playlist Ordering | | | | |
| 15. Docker | | | | |
| 16. Regression | | | | |
| 17. Security | | | | |
| **TOTAL** | | | | |
2 changes: 2 additions & 0 deletions ai_mcp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ def _call_ollama_with_tools(user_message: str, tools: List[Dict], ai_config: Dic
examples.append('"songs in minor key"\n{{"tool_calls": [{{"name": "search_database", "arguments": {{"scale": "minor", "get_songs": 200}}}}]}}')
examples.append('"sounds like Iron Maiden and Metallica combined"\n{{"tool_calls": [{{"name": "song_alchemy", "arguments": {{"add_items": [{{"type": "artist", "id": "Iron Maiden"}}, {{"type": "artist", "id": "Metallica"}}], "get_songs": 200}}}}]}}')
examples.append('"mix of Daft Punk and Gorillaz"\n{{"tool_calls": [{{"name": "song_alchemy", "arguments": {{"add_items": [{{"type": "artist", "id": "Daft Punk"}}, {{"type": "artist", "id": "Gorillaz"}}], "get_songs": 200}}}}]}}')

examples_text = "\n\n".join(examples)

prompt = f"""{system_prompt}
Expand Down Expand Up @@ -537,6 +538,7 @@ def _call_ollama_with_tools(user_message: str, tools: List[Dict], ai_config: Dic
IMPORTANT: ONLY include parameters the user explicitly asked for. Do NOT invent extra filters (genres, ratings, moods, energy) the user never mentioned.
For a specific year like "2026 songs", set BOTH year_min and year_max to 2026 (NOT year_min=1).


Now analyze this request and return ONLY the JSON:
Request: "{user_message}"
"""
Expand Down
Loading
Loading