Merge branch 'release/0.4.5'
This commit is contained in:
commit
abb12ab438
3 changed files with 4 additions and 21 deletions
18
Cargo.lock
generated
18
Cargo.lock
generated
|
@ -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"
|
||||
|
|
|
@ -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 <erwin@datarift.nl>"]
|
||||
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"
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue