diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-01-26 17:04:00 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-01-26 17:04:00 +0100 |
| commit | 4064639d3c3e25760ef43781feca77332cfbe5eb (patch) | |
| tree | 77ce2883e5569bd4de5e1408b41c9d6d556a11c6 /src/sources/dbus.rs | |
| parent | fda55240fb06c55a7552ef7ded8c17ee56ce9f49 (diff) | |
Run lint / format
Diffstat (limited to 'src/sources/dbus.rs')
| -rw-r--r-- | src/sources/dbus.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/sources/dbus.rs b/src/sources/dbus.rs index 57c5853..2f6bccd 100644 --- a/src/sources/dbus.rs +++ b/src/sources/dbus.rs @@ -1,5 +1,5 @@ -use std::io::Result; use mpris::PlayerFinder; +use std::io::Result; use crate::Track; @@ -14,24 +14,19 @@ impl Dbus { } impl LyricsSource for Dbus { - fn name(&self) -> String { "dbus".to_string() } fn current_track(&self) -> Option<Track> { - let player = PlayerFinder::new().ok()? - .find_active().ok()?; + let player = PlayerFinder::new().ok()?.find_active().ok()?; let metadata = player.get_metadata().ok()?; let name = metadata.title()?.to_string(); let artists = metadata.artists()?; let artist = artists.get(0)?.to_string(); - Some(Track { - name, - artist - }) + Some(Track { name, artist }) } fn disable(&self) -> Result<()> { |