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]]
|
[[package]]
|
||||||
name = "ha-now-playing"
|
name = "ha-now-playing"
|
||||||
version = "0.4.4"
|
version = "0.4.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-tungstenite",
|
"async-tungstenite",
|
||||||
"clap",
|
"clap",
|
||||||
"color-eyre",
|
"color-eyre",
|
||||||
"futures",
|
"futures",
|
||||||
"html-escape",
|
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
@ -461,15 +460,6 @@ dependencies = [
|
||||||
"libc",
|
"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]]
|
[[package]]
|
||||||
name = "http"
|
name = "http"
|
||||||
version = "0.2.5"
|
version = "0.2.5"
|
||||||
|
@ -1550,12 +1540,6 @@ version = "0.7.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
|
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "utf8-width"
|
|
||||||
version = "0.1.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7cf7d77f457ef8dfa11e4cd5933c5ddb5dc52a94664071951219a97710f0a32b"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "valuable"
|
name = "valuable"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ha-now-playing"
|
name = "ha-now-playing"
|
||||||
description = "Retrieves the state of a media_player entity from Home Assistant"
|
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>"]
|
authors = ["Erwin Boskma <erwin@datarift.nl>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
include = ["src/**/*"]
|
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"] }
|
clap = { version = "3.1.6", features = ["cargo", "unicode", "derive", "env"] }
|
||||||
color-eyre = "0.6.1"
|
color-eyre = "0.6.1"
|
||||||
futures = "0.3.21"
|
futures = "0.3.21"
|
||||||
html-escape = "0.2.11"
|
|
||||||
reqwest = { version = "0.11.10", features = ["blocking", "json"] }
|
reqwest = { version = "0.11.10", features = ["blocking", "json"] }
|
||||||
serde = { version = "1.0.136", features = ["derive"] }
|
serde = { version = "1.0.136", features = ["derive"] }
|
||||||
serde_json = "1.0.79"
|
serde_json = "1.0.79"
|
||||||
|
|
|
@ -415,13 +415,13 @@ impl HomeAssistant {
|
||||||
String::new()
|
String::new()
|
||||||
};
|
};
|
||||||
|
|
||||||
let now_playing = if let Some(channel) = maybe_channel {
|
let text = if let Some(channel) = maybe_channel {
|
||||||
format!("{volume}[{channel}] {artist} - {title}")
|
format!("{volume}[{channel}] {artist} - {title}")
|
||||||
} else {
|
} else {
|
||||||
format!("{volume}{artist} - {title}")
|
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 {
|
match self.format {
|
||||||
OutputFormat::Waybar => Waybar::builder()
|
OutputFormat::Waybar => Waybar::builder()
|
||||||
|
|
Loading…
Reference in a new issue