From 7602f93105510766a5b21878819d6dbc66dd1e01 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Tue, 4 Jun 2024 11:17:38 +0200 Subject: Use published icy-metadata crate --- src/audio/rodio.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/audio/rodio.rs b/src/audio/rodio.rs index 2557ed4..0f9fbb2 100644 --- a/src/audio/rodio.rs +++ b/src/audio/rodio.rs @@ -49,10 +49,8 @@ impl Rodio { // response. This will allow us to parse the metadata within the stream icy_headers.metadata_interval(), |metadata| { - if metadata.is_ok() { - let md = metadata.unwrap(); - if md.track_title().is_some() { - let tr = md.track_title().unwrap(); + if let Ok(md) = metadata { + if let Some(tr) = md.stream_title() { println!(" {tr}"); } } -- cgit v1.3.1