From aa6238a5c6f5781ebd136810e115ba297ee15a23 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Sun, 13 Sep 2020 11:19:05 +0200 Subject: [PATCH] [modules/spotify] properly initialize widgets see #702 --- bumblebee_status/modules/contrib/spotify.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bumblebee_status/modules/contrib/spotify.py b/bumblebee_status/modules/contrib/spotify.py index 25bff6f..77960b7 100644 --- a/bumblebee_status/modules/contrib/spotify.py +++ b/bumblebee_status/modules/contrib/spotify.py @@ -68,7 +68,8 @@ class Module(core.module.Module): } widget.set("state", "next") elif widget_name == "spotify.song": - pass + widget.set("state", "song") + widget.full_text(self.__song) else: raise KeyError( "The spotify module does not have a {widget_name!r} widget".format( @@ -115,9 +116,6 @@ class Module(core.module.Module): widget.set("state", "playing") else: widget.set("state", "paused") - elif widget.name == "spotify.song": - widget.set("state", "song") - widget.full_text(self.__song) except Exception as e: logging.exception(e)