From eeaa90724d96b83ee32b4265ce9465a105562073 Mon Sep 17 00:00:00 2001 From: mugman Date: Wed, 29 Oct 2025 22:49:28 -0400 Subject: [PATCH] skip a loop instead of exploding when stuff isn't playing --- scrobbler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scrobbler.py b/scrobbler.py index 5cf2ca7..7546c7d 100644 --- a/scrobbler.py +++ b/scrobbler.py @@ -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)