Upgrade mpd to v0.1.0
This commit is contained in:
parent
735feeff1a
commit
1198f58862
4 changed files with 15 additions and 5 deletions
13
Cargo.lock
generated
13
Cargo.lock
generated
|
@ -1142,6 +1142,15 @@ dependencies = [
|
||||||
"time",
|
"time",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "mpd"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2e12cace5746cb0aa78faa6cd2caec9f9c01882fc0e6b54d34685a2d3303ea34"
|
||||||
|
dependencies = [
|
||||||
|
"bufstream",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mpris-player"
|
name = "mpris-player"
|
||||||
version = "0.6.1"
|
version = "0.6.1"
|
||||||
|
@ -1169,7 +1178,7 @@ dependencies = [
|
||||||
"criterion",
|
"criterion",
|
||||||
"dirs",
|
"dirs",
|
||||||
"m3u8-rs",
|
"m3u8-rs",
|
||||||
"mpd",
|
"mpd 0.1.0",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"regex 1.9.1",
|
"regex 1.9.1",
|
||||||
"rusqlite",
|
"rusqlite",
|
||||||
|
@ -1194,7 +1203,7 @@ version = "0.9.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"m3u8-rs",
|
"m3u8-rs",
|
||||||
"mpd",
|
"mpd 0.0.12",
|
||||||
"mpris-player",
|
"mpris-player",
|
||||||
"muss-interpreter",
|
"muss-interpreter",
|
||||||
"rodio",
|
"rodio",
|
||||||
|
|
|
@ -17,7 +17,7 @@ regex = { version = "1" }
|
||||||
rand = { version = "0.8" }
|
rand = { version = "0.8" }
|
||||||
shellexpand = { version = "2", optional = true }
|
shellexpand = { version = "2", optional = true }
|
||||||
bliss-audio-symphonia = { version = "0.6", optional = true, path = "../bliss-rs" }
|
bliss-audio-symphonia = { version = "0.6", optional = true, path = "../bliss-rs" }
|
||||||
mpd = { version = "0.0.12", optional = true }
|
mpd = { version = "0.1", optional = true }
|
||||||
unidecode = { version = "0.3.0", optional = true }
|
unidecode = { version = "0.3.0", optional = true }
|
||||||
base64 = { version = "0.13", optional = true }
|
base64 = { version = "0.13", optional = true }
|
||||||
m3u8-rs = { version = "3.0.0", optional = true }
|
m3u8-rs = { version = "3.0.0", optional = true }
|
||||||
|
|
|
@ -227,7 +227,8 @@ impl ItemBlockFactory {
|
||||||
tokens: &mut VecDeque<Token>,
|
tokens: &mut VecDeque<Token>,
|
||||||
dict: &LanguageDictionary,
|
dict: &LanguageDictionary,
|
||||||
) -> Result<Box<dyn ItemOp>, SyntaxError> {
|
) -> Result<Box<dyn ItemOp>, SyntaxError> {
|
||||||
for (i, factory) in self.vocabulary.iter().enumerate() {
|
//for (i, factory) in self.vocabulary.iter().enumerate() {
|
||||||
|
for factory in self.vocabulary.iter() {
|
||||||
if factory.is_item_op(tokens) {
|
if factory.is_item_op(tokens) {
|
||||||
return factory.build_item_op(tokens, self, dict);
|
return factory.build_item_op(tokens, self, dict);
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,7 +95,7 @@ fn song_to_item(song: Song) -> Item {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if let Some(dur) = song.duration {
|
if let Some(dur) = song.duration {
|
||||||
item.set_field("duration", dur.num_seconds().into());
|
item.set_field("duration", dur.as_secs().into());
|
||||||
}
|
}
|
||||||
if let Some(place) = song.place {
|
if let Some(place) = song.place {
|
||||||
item.set_field("tracknumber", (place.pos as u64).into());
|
item.set_field("tracknumber", (place.pos as u64).into());
|
||||||
|
|
Loading…
Reference in a new issue