From bf11d5967fd52453292e8a5a0d9a0c618a03c4ad Mon Sep 17 00:00:00 2001 From: krolxon Date: Wed, 24 Apr 2024 12:36:33 +0530 Subject: hmm stuff --- src/connection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/connection.rs') diff --git a/src/connection.rs b/src/connection.rs index 1561005..e0e788d 100755 --- a/src/connection.rs +++ b/src/connection.rs @@ -132,7 +132,7 @@ impl Connection { /// Gives title of current playing song pub fn now_playing(&mut self) -> Result> { - let song = self.conn.currentsong()?.unwrap(); + let song = self.conn.currentsong()?.unwrap_or_default(); if let Some(s) = song.title { if let Some(a) = song.artist { return Ok(Some(format!("{} - {}", s, a))); -- cgit v1.2.3