Bump version to 0.3.19 and update API endpoint

Update version from 0.3.18 to 0.3.19 in Cargo.toml, package-lock.json, and version.txt.

Also update the API endpoint in pmoparadise/src/client.rs from `/get_block` to `/play` and remove the `peer` property from several dependencies in package-lock.json.

Additionally, update the ARCHITECTURE.md documentation to reflect the change in API endpoint.
This commit is contained in:
2026-01-27 13:52:15 +01:00
parent 3f0eadce34
commit 33fa672d32
6 changed files with 7 additions and 12 deletions

View File

@@ -14,6 +14,7 @@ Cette crate fournit deux architectures pour accéder à Radio Paradise :
Au lieu de télécharger un gros bloc FLAC contenant plusieurs chansons et de calculer manuellement les bornes de chaque chanson, cette architecture :
1. Récupère le bloc via l'API `get_block`
==> semble avoir changé en faveur du point REST: `https://api.radioparadise.com/api/play?event=107461&elapsed=1&bitrate=4&action=play&player_id=rp3_c736b87f-3e77-3c4c-761c-ef3ed53af279&info=true&chan=1&episode_id=0&slice_num=6&audio_type=M&source=24`
2. Filtre les chansons : garde uniquement celles où `sched_time_millis + duration >= now()`
3. Télécharge chaque chanson individuellement via son `gapless_url`
4. Stocke les métadonnées (titre, artiste, album, cover) dans le cache audio

View File

@@ -4,6 +4,7 @@ use crate::error::{Error, Result};
use crate::models::{Block, EventId, NowPlaying};
use reqwest::Client;
use std::time::Duration;
use tracing::debug;
use url::Url;
/// Default Radio Paradise API base URL
@@ -135,7 +136,7 @@ impl RadioParadiseClient {
/// # }
/// ```
pub async fn get_block(&self, event: Option<EventId>) -> Result<Block> {
let mut url = Url::parse(&format!("{}/get_block", self.api_base))?;
let mut url = Url::parse(&format!("{}/play", self.api_base))?;
url.query_pairs_mut()
.append_pair("bitrate", "4") // FLAC lossless
@@ -148,8 +149,7 @@ impl RadioParadiseClient {
.append_pair("event", &event_id.to_string());
}
#[cfg(feature = "logging")]
tracing::debug!("Fetching block: {}", url);
debug!("Fetching block: {}", url);
let response = self
.client
@@ -177,7 +177,6 @@ impl RadioParadiseClient {
block.image_base = Some(DEFAULT_IMAGE_BASE.to_string());
}
#[cfg(feature = "logging")]
tracing::debug!(
"Received block: event={}, songs={}",
block.event,