diff --git a/Cargo.lock b/Cargo.lock index 103ef7e..9d24170 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -805,6 +805,25 @@ dependencies = [ "libdbus-sys", ] +[[package]] +name = "dbus" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22c08adfeb70c940c14d8af988fa854dcb5529e6141f2397e4e0fa4c9375d094" +dependencies = [ + "libc", + "libdbus-sys", +] + +[[package]] +name = "dbus-tree" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26a1c139b794d571d930124e17fa4cae8a904dc8e916abf551ab763b00e93a63" +dependencies = [ + "dbus 0.9.0", +] + [[package]] name = "derive_builder" version = "0.7.2" @@ -1940,7 +1959,8 @@ dependencies = [ "clipboard", "crossbeam-channel 0.5.0", "cursive", - "dbus", + "dbus 0.9.0", + "dbus-tree", "failure", "fern", "futures 0.1.30", @@ -2019,7 +2039,7 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "144acee6a0543dc74893e4b8a33936b5b0a94cc2d4ab024afd0c6daff7afc3c0" dependencies = [ - "dbus", + "dbus 0.8.4", "mac-notification-sys", "winrt-notification", ] diff --git a/Cargo.toml b/Cargo.toml index c77b85e..b89fe2a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,8 @@ toml = "0.5" tokio-core = "0.1" tokio-timer = "0.2" unicode-width = "0.1.8" -dbus = { version = "0.8.4", optional = true } +dbus = { version = "0.9.0", optional = true } +dbus-tree = { version = "0.9.0", optional = true } rand = "0.7" webbrowser = "0.5" clipboard = { version = "0.5", optional = true } @@ -57,6 +58,6 @@ pulseaudio_backend = ["librespot-playback/pulseaudio-backend"] rodio_backend = ["librespot-playback/rodio-backend"] portaudio_backend = ["librespot-playback/portaudio-backend"] termion_backend = ["cursive/termion-backend"] -mpris = ["dbus"] +mpris = ["dbus", "dbus-tree"] notify = ["notify-rust"] default = ["share_clipboard", "pulseaudio_backend", "mpris", "notify", "cursive/pancurses-backend"] diff --git a/src/main.rs b/src/main.rs index 958b2ba..2d083bb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,8 +17,6 @@ extern crate tokio_timer; extern crate unicode_width; extern crate webbrowser; -#[cfg(feature = "mpris")] -extern crate dbus; #[macro_use] extern crate serde; diff --git a/src/mpris.rs b/src/mpris.rs index 5b07d60..00a9134 100644 --- a/src/mpris.rs +++ b/src/mpris.rs @@ -1,3 +1,6 @@ +extern crate dbus_tree; +extern crate dbus; + use std::collections::HashMap; use std::rc::Rc; use std::sync::{mpsc, Arc}; @@ -6,8 +9,8 @@ use std::time::Duration; use dbus::arg::{RefArg, Variant}; use dbus::ffidisp::stdintf::org_freedesktop_dbus::PropertiesPropertiesChanged; use dbus::message::SignalArgs; -use dbus::tree::{Access, Factory}; -use dbus::Path; +use dbus_tree::{Access, Factory}; +use dbus::strings::Path; use crate::album::Album; use crate::episode::Episode;