aboutsummaryrefslogtreecommitdiff
path: root/src/sources/dbus.rs
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-07-17 15:31:38 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-07-17 15:31:38 +0200
commitee8ac99d9fa1f348065108b73297eebc8033e57e (patch)
treeffccfd2492503c667d9d7fe67361294fef54d130 /src/sources/dbus.rs
parentb3964aefbcab8ff098afabf64befa04a4eebd993 (diff)
Use objc2, rename dbus to mpris, add swinsian4.0.0
Diffstat (limited to 'src/sources/dbus.rs')
-rw-r--r--src/sources/dbus.rs43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/sources/dbus.rs b/src/sources/dbus.rs
deleted file mode 100644
index 2f6bccd..0000000
--- a/src/sources/dbus.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-use mpris::PlayerFinder;
-use std::io::Result;
-
-use crate::Track;
-
-use super::LyricsSource;
-
-pub struct Dbus;
-
-impl Dbus {
- pub fn new() -> Self {
- 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 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 })
- }
-
- fn disable(&self) -> Result<()> {
- Ok(())
- }
-
- fn enable(&self) -> Result<()> {
- Ok(())
- }
-
- fn reset(&self) -> Result<()> {
- Ok(())
- }
-}