reimplement now_playing track output for vlc playback

workspace
Brendan Howell 6 years ago
parent ae47f81638
commit 6cf67aea2c

@ -74,8 +74,14 @@ class Audio(Bureau):
#out = subprocess.check_output(["mocp", "-i"]).decode("utf-8") #out = subprocess.check_output(["mocp", "-i"]).decode("utf-8")
# TODO: sort out how to do this with # TODO: sort out how to do this with
out = "Now Playing: " out = "Now Playing: "
out += self.player.get_media().get_meta(0) + "\n" out += self.player.get_media().get_meta(vlc.Meta.Title) + "\n"
out += "by " + self.player.get_media().get_meta(1) + "\n" nowplaying = self.player.get_media().get_meta(vlc.Meta.NowPlaying)
if nowplaying == "":
out += "by " + self.player.get_media().get_meta(vlc.Meta.Title) + "\n"
out += "from the album '" + self.player.get_media().get_meta(vlc.Meta.Album) \
+ "'\n"
else:
out += nowplaying + "\n"
self.log.debug("info output:" + out) self.log.debug("info output:" + out)
self.print_small(out) self.print_small(out)

Loading…
Cancel
Save