diff --git a/Cargo.lock b/Cargo.lock index 20ed766..730fe85 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -421,14 +421,13 @@ dependencies = [ [[package]] name = "ha-now-playing" -version = "0.4.4" +version = "0.4.5" dependencies = [ "anyhow", "async-tungstenite", "clap", "color-eyre", "futures", - "html-escape", "reqwest", "serde", "serde_json", @@ -461,15 +460,6 @@ dependencies = [ "libc", ] -[[package]] -name = "html-escape" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e7479fa1ef38eb49fb6a42c426be515df2d063f06cb8efd3e50af073dbc26c" -dependencies = [ - "utf8-width", -] - [[package]] name = "http" version = "0.2.5" @@ -1550,12 +1540,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" -[[package]] -name = "utf8-width" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cf7d77f457ef8dfa11e4cd5933c5ddb5dc52a94664071951219a97710f0a32b" - [[package]] name = "valuable" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index eab2466..0352867 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ha-now-playing" description = "Retrieves the state of a media_player entity from Home Assistant" -version = "0.4.4" +version = "0.4.5" authors = ["Erwin Boskma "] edition = "2021" include = ["src/**/*"] @@ -12,7 +12,6 @@ async-tungstenite = { version = "0.17.1", features = ["tokio-rustls-native-certs clap = { version = "3.1.6", features = ["cargo", "unicode", "derive", "env"] } color-eyre = "0.6.1" futures = "0.3.21" -html-escape = "0.2.11" reqwest = { version = "0.11.10", features = ["blocking", "json"] } serde = { version = "1.0.136", features = ["derive"] } serde_json = "1.0.79" diff --git a/src/homeassistant.rs b/src/homeassistant.rs index 3e53759..72d73f9 100644 --- a/src/homeassistant.rs +++ b/src/homeassistant.rs @@ -415,13 +415,13 @@ impl HomeAssistant { String::new() }; - let now_playing = if let Some(channel) = maybe_channel { + let text = if let Some(channel) = maybe_channel { format!("{volume}[{channel}] {artist} - {title}") } else { format!("{volume}{artist} - {title}") }; - let text = html_escape::encode_text(&now_playing).to_string(); + // let text = html_escape::encode_text(&now_playing).to_string(); match self.format { OutputFormat::Waybar => Waybar::builder()