spotify.py: fixed mismatched icons for play/pause

This commit is contained in:
2025-11-13 22:06:02 -05:00
parent 3951afeff0
commit 1e392b290a

View File

@@ -41,7 +41,7 @@ class Spotify(base.ThreadPoolText):
("play_icon", "", "icon to display when playing music"), ("play_icon", "", "icon to display when playing music"),
("pause_icon", "", "icon to display when music paused"), ("pause_icon", "", "icon to display when music paused"),
("update_interval", 0.5, "polling rate in seconds"), ("update_interval", 0.5, "polling rate in seconds"),
("format", "{icon} {artist} - {track}", "Spotify display format"), ("format", "{icon} {artist}: {album} - {track}", "Spotify display format"),
] ]
def __init__(self, **config) -> None: def __init__(self, **config) -> None:
@@ -108,7 +108,7 @@ class Spotify(base.ThreadPoolText):
def poll(self) -> str: # type: ignore def poll(self) -> str: # type: ignore
"""Poll content for the text box""" """Poll content for the text box"""
vars = { vars = {
"icon": self.pause_icon if self.playing else self.play_icon, "icon": self.play_icon if self.playing else self.pause_icon,
"artist": self.artist, "artist": self.artist,
"track": self.song_title, "track": self.song_title,
"album": self.album, "album": self.album,