Spotify fix turns repeat on: the playlist ran out and autoplay played other songs (WRONG PLAYLIST overnight)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 09:11:53 -04:00
co-authored by Claude Opus 5.5
parent 55615dd971
commit 06dce6dffc
+3
View File
@@ -3269,6 +3269,9 @@ def play_spotify(cfg, fix, chk, label, run=None):
time.sleep(sp_.get("open_wait", 8))
run(["/usr/bin/osascript", "-e", 'tell application "Spotify" to play track "%s"' % playlist],
capture_output=True, text=True, timeout=15)
# Repeat on: with it off the playlist runs out and Spotify's autoplay carries on with similar songs that are
# not in it (2026-10-25 16:42 to the next morning: "WRONG PLAYLIST" while it sounded right).
run(["/usr/bin/osascript", "-e", 'tell application "Spotify" to set repeating to true'], capture_output=True, text=True, timeout=10)
time.sleep(sp_.get("play_wait", 3))
r = run(["/usr/bin/osascript", "-e", 'tell application "Spotify" to player state as text'],
capture_output=True, text=True, timeout=10)