diff options
| author | krolxon <krolyxon@tutanota.com> | 2024-04-24 12:36:33 +0530 |
|---|---|---|
| committer | krolxon <krolyxon@tutanota.com> | 2024-04-24 12:36:33 +0530 |
| commit | bf11d5967fd52453292e8a5a0d9a0c618a03c4ad (patch) | |
| tree | d6825a2a2ed0a87ae5c9810c219966ac743102aa /src/connection.rs | |
| parent | b93eae44822168c0dab821a12fa3ecd62ee4a875 (diff) | |
hmm stuff
Diffstat (limited to 'src/connection.rs')
| -rwxr-xr-x | src/connection.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<Option<String>> { - 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))); |
