Metadata-Version: 2.4
Name: sendspin-dev-server
Version: 0.1.0
Summary: A GUI wrapper for testing and iterating on the aiosendspin server
Project-URL: Homepage, https://github.com/chrisuthe/Sendspin-dev-server
Project-URL: Repository, https://github.com/chrisuthe/Sendspin-dev-server
Project-URL: Issues, https://github.com/chrisuthe/Sendspin-dev-server/issues
Author: Chris Uthe
License-Expression: MIT
Keywords: audio,gui,sendspin,streaming,testing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Sound/Audio
Requires-Python: >=3.12
Requires-Dist: aiosendspin>=3.0.0
Requires-Dist: av>=12.0.0
Requires-Dist: customtkinter>=5.2.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: pillow>=10.0.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# Sendspin GUI

A GUI wrapper for testing and iterating on the [aiosendspin](https://github.com/Sendspin/aiosendspin) server without needing to integrate with Music Assistant.
<img width="1202" height="832" alt="image" src="https://github.com/user-attachments/assets/b4713273-0d0a-4561-9309-d47a666fa535" />


## Features

- **Server Management**: Start/stop the Sendspin server with configurable settings
- **Client Discovery**: Automatic mDNS discovery of Sendspin clients on your network
- **Group Management**: Create and manage client groups for synchronized playback
- **Audio Streaming**: Stream audio files or test tones to groups
- **Event Logging**: Real-time event log with filtering capabilities

## Installation

### Prerequisites

- Python 3.12 or higher

### Install with uv (recommended)

[uv](https://docs.astral.sh/uv/) is a fast Python package installer.

```bash
# Install uv if you don't have it
pip install uv

# Install sendspin-gui
cd sendspin-gui
uv pip install -e .

# Or with dev dependencies
uv pip install -e ".[dev]"
```

### Install with pip

```bash
cd sendspin-gui
pip install -e .
```

## Usage

### Run the GUI

```bash
# Using the installed command
sendspin-gui

# Or run as a module
python -m sendspin_gui
```

### Quick Start

1. **Start the server**: Configure the server ID, name, and port, then click "Start Server"
2. **Connect clients**: Sendspin clients on your network will be discovered automatically (if mDNS is enabled)
3. **Create groups**: Select clients and click "Create Group" to group them for synchronized playback
4. **Stream audio**: Use the Stream panel to play test tones or audio files to your groups

## GUI Overview

### Server Panel
- Configure server ID and name
- Set the server port (default: 8765)
- Enable/disable mDNS for automatic discovery
- Start/stop the server

### Clients Panel
- View all connected clients
- See client roles and group membership
- Select clients to create groups
- Disconnect individual clients

### Groups Panel
- View all active groups
- Playback controls (play/stop)
- Volume control per group
- Expand groups to see and manage members

### Stream Panel
- **File**: Browse and stream audio files (WAV, FLAC, MP3, etc.)
- **Test Tone**: Generate sine wave test tones at configurable frequencies
- **URL**: (Coming soon) Stream from network URLs

### Event Log
- Real-time server events
- Filter by event type (info, success, warning, error)
- Clear log functionality

## Development

### Project Structure

```
sendspin-gui/
├── src/
│   └── sendspin_gui/
│       ├── __init__.py
│       ├── __main__.py
│       ├── app.py              # Main application
│       ├── components/
│       │   ├── __init__.py
│       │   ├── server_panel.py
│       │   ├── clients_panel.py
│       │   ├── groups_panel.py
│       │   ├── event_log.py
│       │   └── stream_panel.py
│       └── utils/
│           ├── __init__.py
│           └── async_bridge.py
├── pyproject.toml
└── README.md
```

### Running in development

```bash
# Install in editable mode with dev dependencies
uv pip install -e ".[dev]"
# or: pip install -e ".[dev]"

# Run the app
python -m sendspin_gui
```

### Code style

The project uses ruff for linting:

```bash
ruff check src/
ruff format src/
```

## Architecture Notes

The GUI uses `customtkinter` for a modern appearance and runs the asyncio event loop in a separate thread to avoid blocking the UI. The `AsyncBridge` utility handles communication between the tkinter main thread and the async server operations.

## Related Projects

- [aiosendspin](https://github.com/Sendspin/aiosendspin) - The underlying async Sendspin protocol library
- [sendspin](https://pypi.org/project/sendspin/) - A synchronized audio player built on aiosendspin
- [Music Assistant](https://music-assistant.io/) - Full-featured music server that uses aiosendspin

## License

MIT
