Claude
98bf45cd27
feat: Add user-friendly default_channel configuration
...
Ajoute la possibilité de configurer le channel par défaut de Radio Paradise
de manière persistante et user-friendly.
Fonctionnalités :
- get_paradise_default_channel() : récupère le channel configuré (défaut: 0/main)
- set_paradise_default_channel(u8) : définit le channel par défaut
- Accepte DEUX formats dans le fichier YAML :
* Noms conviviaux : "main", "mellow", "rock", "eclectic"
* IDs numériques : 0, 1, 2, 3
- Stocke les valeurs comme chaînes conviviales pour la lisibilité
- Validation automatique avec fallback sur "main" si invalide
- Persistence automatique de la valeur par défaut lors du premier accès
Exemple de configuration YAML :
```yaml
sources:
radio_paradise:
enabled: true
default_channel: mellow # ou 1
```
Cette amélioration rend la configuration plus accessible aux utilisateurs
qui préfèrent un channel autre que Main Mix par défaut.
2025-11-05 12:00:59 +00:00
Claude
9b45be87d6
refactor: Simplify RadioParadiseConfigExt - remove history methods
...
Remove all history-related configuration methods from config_ext.rs:
- get_paradise_history_database() / set_paradise_history_database()
- get_paradise_history_size() / set_paradise_history_size()
- DEFAULT_HISTORY_DATABASE_DIR constant
- HISTORY_DEFAULT_MAX_TRACKS import
Keep only essential methods:
- get_paradise_enabled() / set_paradise_enabled()
Result: 264 lines → 115 lines (-149 lines, -56%)
2025-11-05 09:07:12 +00:00
Claude
f80ebd9f3d
refactor: Remove obsolete orchestration layer, create RadioParadiseSource stub
...
Major cleanup removing 2831 lines (~45%) of outdated server orchestration code.
RadioParadiseStreamSource (pmoaudio integration) is now the primary implementation.
## Changes
### Removed (2393 lines)
- **paradise/ module** - Complete server orchestration system:
- worker.rs (1146 lines) - Background polling, caching, state machine
- channel.rs (429 lines) - Channel lifecycle management
- playlist.rs (294 lines) - Shared playlist management
- history.rs (218 lines) - SQLite persistence
- constants.rs (209 lines) - Server configuration constants
- mod.rs (29 lines) - Module exports
### Replaced
- **source.rs** (612 → 174 lines, -72%):
- Old: Full MusicSource implementation with UPnP/DIDL integration
- New: Minimal stub for backward compatibility with pmomediaserver
- Returns empty results and deprecation warnings
- Documents migration path to RadioParadiseStreamSource
### Updated
- **config_ext.rs**: Now imports HISTORY_DEFAULT_MAX_TRACKS from channels module
- **lib.rs**:
- Removed paradise module
- Updated documentation to focus on RadioParadiseStreamSource
- Updated cargo features documentation
## Architecture
**Before**: Complex orchestration with workers, channels, caching, history
**After**: Simple API access + pmoaudio streaming (RadioParadiseStreamSource)
## Compatibility
RadioParadiseSource stub maintains API compatibility for pmomediaserver while
clearly indicating deprecation. All operations return empty results or errors
with migration guidance.
## Testing
- ✅ All 23 tests pass
- ✅ Compilation successful with all features
- ✅ pmomediaserver compatibility maintained (stub implementation)
## Migration Path
Old (deprecated):
```rust
let source = RadioParadiseSource::from_registry(client)?;
```
New (recommended):
```rust
let stream_source = RadioParadiseStreamSource::new(client, None).await?;
let node = Node::from_logic(stream_source);
```
2025-11-05 07:40:36 +00:00
d2b9cbf93b
encore des problèmes de configuration
2025-10-29 22:35:10 +01:00
e5fbf372c4
On continue le refactoring des sources
2025-10-29 22:35:10 +01:00