diff --git a/bumblebee_status/modules/contrib/spotify.py b/bumblebee_status/modules/contrib/spotify.py index 3192088..c3f4d1f 100644 --- a/bumblebee_status/modules/contrib/spotify.py +++ b/bumblebee_status/modules/contrib/spotify.py @@ -25,6 +25,8 @@ import core.input import core.decorators import util.format +import logging + class Module(core.module.Module): def __init__(self, config, theme): super().__init__(config, theme, []) @@ -63,8 +65,7 @@ class Module(core.module.Module): } widget.set("state", "next") elif widget_name == "spotify.song": - widget.set("state", "song") - widget.full_text(self.__song) + pass else: raise KeyError( "The spotify module does not have a {widget_name!r} widget".format( @@ -111,8 +112,12 @@ 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) self.__song = "" @property