[modules/spotify] properly initialize widgets

see #702
This commit is contained in:
Tobias Witek 2020-09-13 11:19:05 +02:00
parent fcbb89db90
commit aa6238a5c6

View file

@ -68,7 +68,8 @@ class Module(core.module.Module):
} }
widget.set("state", "next") widget.set("state", "next")
elif widget_name == "spotify.song": elif widget_name == "spotify.song":
pass widget.set("state", "song")
widget.full_text(self.__song)
else: else:
raise KeyError( raise KeyError(
"The spotify module does not have a {widget_name!r} widget".format( "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") widget.set("state", "playing")
else: else:
widget.set("state", "paused") widget.set("state", "paused")
elif widget.name == "spotify.song":
widget.set("state", "song")
widget.full_text(self.__song)
except Exception as e: except Exception as e:
logging.exception(e) logging.exception(e)