skip a loop instead of exploding when stuff isn't playing

This commit is contained in:
mugman 2025-10-29 22:49:28 -04:00
parent 30b43d3c73
commit eeaa90724d

View file

@ -48,7 +48,11 @@ while True:
except Exception as e:
print(e)
continue
if not out:
continue
id, state, artist, song, album, duration, album_artist = out
if hasattr(duration, "code"):
continue
print(f"{runtime}/{round(duration)}", end="\r")
if old_id != id:
print("new song", old_id, id, song)