Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade librespot to 0.2.0 #977

Merged
merged 13 commits into from
Dec 7, 2021
Prev Previous commit
Next Next commit
Fix a first round of lint checks
  • Loading branch information
capnfabs committed Nov 19, 2021
commit f86275a67d8d2e90d50e350fc8323b8609ea34b8
21 changes: 12 additions & 9 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 114,12 @@ pub enum DeviceType {
Tablet = 2,
Smartphone = 3,
Speaker = 4,
TV = 5,
AVR = 6,
STB = 7,
#[serde(rename = "t_v")]
Tv = 5,
#[serde(rename = "a_v_r")]
Avr = 6,
#[serde(rename = "s_t_b")]
Stb = 7,
AudioDongle = 8,
}

Expand All @@ -128,9 131,9 @@ impl From<LSDeviceType> for DeviceType {
LSDeviceType::Tablet => DeviceType::Tablet,
LSDeviceType::Smartphone => DeviceType::Smartphone,
LSDeviceType::Speaker => DeviceType::Speaker,
LSDeviceType::Tv => DeviceType::TV,
LSDeviceType::Avr => DeviceType::AVR,
LSDeviceType::Stb => DeviceType::STB,
LSDeviceType::Tv => DeviceType::Tv,
LSDeviceType::Avr => DeviceType::Avr,
LSDeviceType::Stb => DeviceType::Stb,
LSDeviceType::AudioDongle => DeviceType::AudioDongle,
// TODO: Implement new LibreSpot device types in Spotifyd
_ => DeviceType::Unknown,
Expand All @@ -146,9 149,9 @@ impl From<&DeviceType> for LSDeviceType {
DeviceType::Tablet => LSDeviceType::Tablet,
DeviceType::Smartphone => LSDeviceType::Smartphone,
DeviceType::Speaker => LSDeviceType::Speaker,
DeviceType::TV => LSDeviceType::Tv,
DeviceType::AVR => LSDeviceType::Avr,
DeviceType::STB => LSDeviceType::Stb,
DeviceType::Tv => LSDeviceType::Tv,
DeviceType::Avr => LSDeviceType::Avr,
DeviceType::Stb => LSDeviceType::Stb,
DeviceType::AudioDongle => LSDeviceType::AudioDongle,
}
}
Expand Down
1 change: 0 additions & 1 deletion src/setup.rs
Original file line number Diff line number Diff line change
@@ -1,7 1,6 @@
#[cfg(feature = "alsa_backend")]
use crate::alsa_mixer;
use crate::{config, main_loop};
use futures;
#[cfg(feature = "dbus_keyring")]
use keyring::Keyring;
use librespot_connect::discovery::discovery;
Expand Down
4 changes: 1 addition & 3 deletions src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,7 1,5 @@
use log::trace;
use std::env;
#[cfg(target_os = "macos")]
use whoami;

#[cfg(any(target_os = "freebsd", target_os = "linux"))]
fn get_shell_ffi() -> Option<String> {
Expand Down Expand Up @@ -97,6 95,6 @@ mod tests {
init_logger();

let shell = get_shell_ffi();
assert_eq!(shell.is_some(), true);
assert!(shell.is_some());
}
}