From dc2705b56b609de82ba39c573d3fa3e259018781 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Fri, 27 Nov 2020 22:37:35 +0100 Subject: [PATCH] fix now-playing to query through the new playlist --- screenless/bureau/audio/audio.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/screenless/bureau/audio/audio.py b/screenless/bureau/audio/audio.py index a2308d3..7f22f54 100644 --- a/screenless/bureau/audio/audio.py +++ b/screenless/bureau/audio/audio.py @@ -75,14 +75,13 @@ class Audio(Bureau): """ Prints the currently playing song or stream on the small printer. """ - #out = subprocess.check_output(["mocp", "-i"]).decode("utf-8") - # TODO: sort out how to do this with + media = self.player.get_media_player().get_media() out = "Now Playing: " - out += self.player.get_media().get_meta(vlc.Meta.Title) + "\n" - nowplaying = self.player.get_media().get_meta(vlc.Meta.NowPlaying) + out += media.get_meta(vlc.Meta.Title) + "\n" + nowplaying = media.get_meta(vlc.Meta.NowPlaying) if nowplaying == "": - out += "by " + self.player.get_media().get_meta(vlc.Meta.Artist) + "\n" - out += "from the album '" + self.player.get_media().get_meta(vlc.Meta.Album) \ + out += "by " + media.get_meta(vlc.Meta.Artist) + "\n" + out += "from the album '" + media.get_meta(vlc.Meta.Album) \ + "'\n" else: out += nowplaying + "\n"