Commit Graph

42 Commits

Author SHA1 Message Date
fe9dd9aba6 ♻️ refactor(pmowebrenderer): factoriser handlers et supprimer duplications
- Remplacer les Arc+Box::pin manuels par la macro action_handler!(captures(...))
- Supprimer helpers locaux dupliqués dans renderer.rs (add_var, add_action)
- Extraire handlers génériques pour GET requests
- Factoriser extraction metadata dans set_uri_handler /set_next_uriHandler  
- Simplifier build_renderingcontrol en retirant pipeline inutile
- Mettre à jour edition Rust de 2021 vers 2024 dans tous les Cargo.toml
- Corriger pattern matching inutile `ref` sur déréférencement dans pmoaudio et pmoflac
2026-04-05 14:09:46 +02:00
6352a43e27 correct compilation warning in pmoqobuz 2026-04-04 00:34:55 +02:00
843f474a98 feat: ajouter la recherche dans les serveurs media
Implémente une fonctionnalité de recherche pour les serveurs media (Qobuz et autres) avec:
- Nouvelle API endpoint /servers/{serverId}/search côté backend
- Fonction searchServer dans useMediaServers.ts pour gérer la requête
- Composants MediaBrowser.vue et ServerDrawer.vue avec barre de recherche interactive
- Support des résultats mixtes (albums, artistes, pistes, playlists)
- Gestion des états de chargement, erreur et résultat vide
- Affichage conditionnel selon le mode navigation/recherche
2026-03-30 06:36:32 +02:00
36f0ac5122 Bump version to 0.3.28 and update schema
- Increment package and version.txt to v0.3.28
- Update pmocache schema version from 1 to 2
- Add warning and source_version invalidation when Qobuz playlist track registration is incomplete
2026-03-25 15:10:01 +01:00
5095dd6964 feat(cache): fix lazy PK metadata resolution and playlist track ordering
- In `track_metadata.rs`, implement fallback logic for lazy PKs: first try real_pk, then fallback to lazy_pk for metadata keys seeded before download.
- In `db.rs`, add debug logging after migration to track remaining metadata under lazy_pk.
- In `source.rs` (Qobuz):
  - Detect and repair playlists with missing cache entries by forcing refresh when `items.len() < total`.
  - Preserve original track order after parallel processing by attaching and sorting on original index.
  - Handle missing performer/cover gracefully with warnings and provider fallback.
- In `metadata_cache.rs` (Radio France), simplify logging and improve test coverage for expiration logic.
- In `cache.rs`, add debug/warning logs when metadata or cover seeding fails during lazy caching.
2026-03-25 12:25:43 +01:00
dc062f8a3e refactor: replace cache_covers with register_tracks_lazy for playlist processing
Replace the old `cache_covers` approach with a new `register_tracks_lazy` method that handles track registration for lazy playback in playlists. The new implementation avoids expensive `get_stream_url` calls by deferring audio URL resolution to `QobuzLazyProvider`, caches covers in parallel with concurrency limited via semaphore (16), and stores full metadata including cover PKs. This significantly improves performance for large playlists while preserving all necessary track metadata.
2026-03-25 11:29:37 +01:00
0137a4675f feat: add Qobuz playlist caching with versioning and infinite scroll UI
- Add qobuz_debug to .gitignore
- Bump PMOMusic version to 0.3.26
- Add .cargo/ copy in Dockerfile for registry config
- Implement infinite scroll in ServerDrawer.vue with IntersectionObserver and sentinel element
- Add source/source_version fields to playlists for cache invalidation
- Update pmocache and pmoplaylist DB schemas with versioning (SCHEMA_VERSION)
- Add Qobuz API metadata fetching and pagination for playlist tracks
- Implement album/playlist cache invalidation based on released_at/updated_at timestamps
- Refactor adapt_playlist_items_to_qobuz → adapt_items_to_qobuz with cleaner logic
- Add debug mode to save Qobuz API responses when QOBUZ_DEBUG_DIR is set
2026-03-25 11:08:28 +01:00
76b7c126c2 refactor: replace absolute URLs with route-based cover URLs and generalize caching
- Remplacer les appels à `covers_absolute_url_for` par `covers_route_for` pour générer des URLs relatives basées sur les routes
- Introduire le trait `CoverCacheable` pour généraliser le cache des covers (Album, Playlist, Artist, Track)
- Remplacer les fonctions spécifiques (`cache_album_covers`, etc.) par une fonction générique `cache_covers`
- Simplifier le code en unifiant la logique de mise en cache des covers
- Corriger l'initialisation de `PMO_SERVER_URL` pour utiliser `base_url()` (incluant le port) au lieu d'une URL brute
2026-03-24 15:02:28 +01:00
1164a11410 feat(cache): centralize absolute URL generation with PMO_SERVER_URL
Replace hardcoded relative URLs and manual base_url concatenation with a unified absolute URL API via pmocache::covers_absolute_url_for() and CacheTrait::absolute_url_for().

- Add pmocache as a required dependency to pmoparadise
- Introduce absolute_url_for() and covers_absolute_url_for() helpers using PMO_SERVER_URL env var (default: http://localhost:8080)
- Update all callers to use absolute URLs for covers and audio in streaming, playlists, Qobuz, Radio France, UPnP, and server startup
- Remove redundant route_for() usage in URL construction
- Add pmocache to Cargo.lock
2026-03-24 12:03:07 +01:00
b690420550 feat: add parallel cover caching and refactor browse methods
Introduce async helper methods `cache_album_covers` and `cache_playlist_covers` to cache album/playlist covers in parallel using JoinSet. Refactor browse functions for favorites, discover, and genre pages to reuse these helpers and avoid duplicate logic. Simplify cover URL resolution by unifying caching path and removing redundant base URL concatenation.
2026-03-24 11:24:02 +01:00
0f0a8d1c91 deps: update esbuild to 0.27.4, rollup to 4.60.0, vite to 7.3.1
deps: update esbuild to 0.27.4, rollup to 4.60.0, vite to 7.3.1

- bump esbuild and all platform-specific binaries from 0.25.10 to 0.27.4
- bump rollup and all platform-specific binaries from 4.52.3 to 4.60.0
- bump vite from 7.1.7 to 7.3.1 (esbuild peer dep updated to ^0.27.0)
- bump dompurify from 3.2.7 to 3.3.3

web: improve cover image retry logic
- increase maxRetries default from 3 to 5
- reduce initial retryDelay from 1000ms to 500ms
- implement exponential backoff: delay = retryDelay * 2^(retryCount - 1)
- add detailed logging for retries and final failure

rust: minor cleanup
- remove unused imports (watch, Url, AudioSegment, SyncMarker)
- add tracing debug logs for cache file requests
- handle missing files gracefully with warning + client retry hint
- add #[allow(async_fn_in_trait)] where needed
2026-03-24 10:49:47 +01:00
5c5e1d534b feat: Implémentation complète de la source Radio France avec intégration UPnP et serveur HTTP
Ajout de la source Radio France avec :
- Implémentation du trait MusicSource pour l'intégration UPnP
- Routes HTTP API REST pour l'accès aux stations et flux AAC
- Proxy streaming avec tracking des connexions
- Génération dynamique de l'arborescence UPnP
- Cache multi-niveaux (stations, métadonnées, covers)
- Support des ~70 stations (standalone, groupes, radios ICI)

Fichiers créés :
- pmoradiofrance/src/source.rs (implémentation MusicSource)
- pmoradiofrance/src/server_ext.rs (routes HTTP et proxy streaming)
- pmoradiofrance/assets/radiofrance-logo.webp (logo placeholder)

Fichiers modifiés :
- pmoradiofrance/src/lib.rs (re-exports et modules)
- pmoradiofrance/Cargo.toml (dépendances server)
- Cargo.toml (workspace)
- pmomediaserver/Cargo.toml (feature radiofrance)
- PMOMusic/Cargo.toml (feature radiofrance)
- PMOMusic/src/main.rs (enregistrement automatique)

Tests et validation : compilation OK, pattern respecté, feature-gating cohérent
2026-01-23 12:20:43 +01:00
41a4f0eaea Fix bug play single track Qobuz
Corrige le bug empêchant la lecture d'un track Qobuz individuel depuis le ServerDrawer.

- Implémente `get_item()` dans `QobuzSource` pour retourner des URLs HTTP valides au lieu de URLs symboliques
- Rend `format_duration()` publique dans `pmoqobuz/src/didl.rs`
- Ajoute le logging dans `pmocontrol/src/pmoserver_ext.rs` pour suivre le flux de lecture
- Améliore la gestion des objets dans `pmocontrol/src/pmoserver_ext.rs` pour distinguer les conteneurs des éléments
2026-01-17 08:36:23 +01:00
066e2fe008 Corrige le bug d'URL relative pour la cover dans pmoqobuz
Correction du bug où l'URL de la cover générée par pmoqobuz était relative au lieu d'être absolue, comme pour le flux audio. Ajout de la conversion de l'URL de la cover en URL absolue dans la fonction adapt_playlist_items_to_qobuz. Version mise à jour de 0.3.5 à 0.3.6.
2026-01-16 23:35:07 +01:00
7546072d2b Correction de petits bugs d'interface 2026-01-04 20:45:51 +01:00
a4301140d8 Migration vers une forme unifiée des cargos 2025-12-30 16:49:29 +01:00
02a44e9e75 Debug playlist lecture 2025-12-28 16:31:02 +01:00
2f77913caa Enrichissement de la source Qobuz 2025-12-28 15:00:06 +01:00
2b69350162 Debug qobuz pas encore parfait mais mieux 2025-12-28 13:52:31 +01:00
876b1e0147 update de qobuz pour utiliser les sources lazy 2025-12-28 12:37:10 +01:00
1bf34fe949 no local cache 2025-12-17 14:25:24 +01:00
ca36a102e5 Amélioration des pmoplaylist 2025-12-17 08:47:07 +01:00
68e6f528e5 debugage lazy cache 2025-12-17 07:23:25 +01:00
d2d8111668 lazy cache webapp 2025-12-15 15:01:14 +01:00
90399b408a correction for lazy playlist and lazy cache 2025-12-15 12:17:33 +01:00
4bc80dfd08 PMOQobuz client is now working 2025-12-15 10:56:04 +01:00
d2f6abf4bb Big Debug of PMOQobuz step 3 2025-12-14 20:39:08 +01:00
50693aaf7a Big Debug of PMOQobuz step 2 2025-12-13 13:56:55 +01:00
cd19d68703 Big debug of pmoqobuz step 1 2025-12-13 13:32:27 +01:00
76132086b6 on avance un peu pmoqobuz 2025-12-11 21:35:17 +00:00
785f8d52a5 Update la web app pour tirer partie du nouveau systeme de cache 2025-10-29 22:36:36 +01:00
ea6dd03ac0 Je ne sais pas trop 2025-10-29 22:35:53 +01:00
ecb362ae48 refactoring des caches 2025-10-25 17:46:53 +02:00
208fe8be76 amélioration de la webapp 2025-10-20 16:18:21 +02:00
ff515e22bd nouveau mediarenderer 2025-10-18 14:33:52 +02:00
d86cfe46df Refactoring des pmosource 2025-10-18 09:38:33 +02:00
082914cf8c Refactoring manuel 2025-10-17 19:28:04 +02:00
d64b96cef4 complète le trait MusicSource 2025-10-17 08:37:28 +02:00
ee1072a491 ajoute à pmoqobuz la feature cache 2025-10-17 08:01:50 +02:00
b22a82bb50 Crée la crate pmoplaylist 2025-10-17 07:47:39 +02:00
2149d1a797 Elabore une crate pmosource 2025-10-16 22:12:15 +02:00
b8154a4837 Première tentative d'une crate pmoqobuz 2025-10-11 22:39:35 +02:00