aboutsummaryrefslogtreecommitdiff
path: root/src/utils/spotify.rs
diff options
context:
space:
mode:
authorMustafa Salih <37256744+MustafaSalih1993@users.noreply.github.com>2021-01-22 00:53:11 +0300
committerGitHub <noreply@github.com>2021-01-22 00:53:11 +0300
commit9525a1075199d5fd202d1744dc502ff5a766aa99 (patch)
tree65ec9c5397bf7de009f3484ea161e77df2120f67 /src/utils/spotify.rs
parente6f9ce2ed5da0eb833d548a613c3b70360c9f4b5 (diff)
parent861a986567310dfe9ccd85d2976b0ebfb683c818 (diff)
Merge pull request #38 from AdaShoelace/change-to-serde
Change to serde
Diffstat (limited to 'src/utils/spotify.rs')
-rw-r--r--src/utils/spotify.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/spotify.rs b/src/utils/spotify.rs
index 4954f3b..a73128d 100644
--- a/src/utils/spotify.rs
+++ b/src/utils/spotify.rs
@@ -1,11 +1,11 @@
-use crate::types::Config;
+use crate::config::CONFIG;
use dbus::blocking::stdintf::org_freedesktop_dbus::Properties;
use dbus::{arg, blocking::Connection};
use std::time::Duration;
// getting spotify current artist and title.
// FIXME: I know im lazy asshole, this error handling looks ugly, i dont like it too, need to fix soon.
-pub fn get_spotify(config: &Config) -> String {
+pub fn get_spotify() -> String {
let conn = match Connection::new_session() {
Ok(conn) => conn,
_ => return String::from(""),
@@ -40,6 +40,6 @@ pub fn get_spotify(config: &Config) -> String {
format!(
" {} {} - {} {}",
- config.spotify.icon, artist, title, config.seperator
+ CONFIG.spotify.icon, artist, title, CONFIG.seperator
)
}