diff --git a/src/application.rs b/src/application.rs index f1d0901..6ad42cb 100644 --- a/src/application.rs +++ b/src/application.rs @@ -13,21 +13,23 @@ use signal_hook::{consts::SIGHUP, consts::SIGTERM, iterator::Signals}; use crate::command::{Command, JumpMode}; use crate::commands::CommandManager; -use crate::config::{cache_path, Config}; +use crate::config::Config; use crate::events::{Event, EventManager}; use crate::ext_traits::CursiveExt; -use crate::ipc::IpcSocket; use crate::library::Library; use crate::queue::Queue; use crate::spotify::{PlayerEvent, Spotify}; use crate::ui::contextmenu::ContextMenu; use crate::ui::create_cursive; use crate::{authentication, ui}; -use crate::{command, ipc, queue, spotify}; +use crate::{command, queue, spotify}; #[cfg(feature = "mpris")] use crate::mpris::{self, MprisManager}; +#[cfg(unix)] +use crate::ipc::{self, IpcSocket}; + /// Set up the global logger to log to `filename`. pub fn setup_logging(filename: &Path) -> Result<(), fern::InitError> { fern::Dispatch::new() @@ -139,7 +141,7 @@ impl Application { #[cfg(unix)] let ipc = ipc::IpcSocket::new( ASYNC_RUNTIME.handle(), - cache_path("ncspot.sock"), + crate::config::cache_path("ncspot.sock"), event_manager.clone(), ) .map_err(|e| e.to_string())?; diff --git a/src/queue.rs b/src/queue.rs index 9f7afe8..09324c2 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -3,7 +3,7 @@ use std::sync::{Arc, RwLock}; use log::{debug, info}; #[cfg(feature = "notify")] -use notify_rust::{Hint, Notification, Urgency}; +use notify_rust::Notification; use rand::prelude::*; use strum_macros::Display; @@ -511,9 +511,9 @@ pub fn send_notification(summary_txt: &str, body_txt: &str, cover_url: Option {