From c22026b0159feed6c6d7b8692a2136552d7e969e Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Thu, 7 Oct 2021 22:00:53 +0200 Subject: [PATCH] update audio dept. to use built in metadata from gstreamer-player --- screenless/bureau/audio/audio.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/screenless/bureau/audio/audio.py b/screenless/bureau/audio/audio.py index 3cead8f..870a48a 100644 --- a/screenless/bureau/audio/audio.py +++ b/screenless/bureau/audio/audio.py @@ -94,12 +94,12 @@ class Audio(Bureau): Prints the currently playing song or stream on the small printer. """ out = "Now Playing: " - out += self.player.title + "\n" - if self.player.artist != "": + if self.player.title: + out += self.player.title + "\n" + if self.player.artist: out += "by " + self.player.artist + "\n" - if self.player.album != "": - out += "from the album '" + self.player.album \ - + "'\n" + if self.player.album: + out += "from the album '" + self.player.album + "'\n" # TODO: add fields for "organization" and "location" for gstreamer-player # so we can get the station ID stuff