Skip to content

Commit 7666d4e

Browse files
Fix Pandora/YouTube tracks stuck at 0:00 on stream load error
1 parent 082201d commit 7666d4e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* Auto-fix mpv/ffmpeg symbol mismatch on macOS by running `brew reinstall` when libmpv fails to load
44
* Add mpv/ffmpeg sync check to install script for macOS
5+
* Fix Pandora/YouTube tracks stuck at 0:00 when stream URL fails to load
56

67
### 1.2.1: 2026-02-07
78

omnishuffle/player.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@ def on_time(name, value):
6868

6969
@self.mpv.event_callback('end-file')
7070
def on_end_file(event):
71-
# Only trigger callback if track ended naturally (EOF, not error/stop)
7271
if hasattr(event, 'data') and hasattr(event.data, 'reason'):
73-
is_eof = event.data.reason == event.data.EOF
74-
if is_eof and self._on_track_end and not self._loading:
75-
self._on_track_end()
72+
reason = event.data.reason
73+
is_eof = reason == event.data.EOF
74+
is_error = reason == event.data.ERROR
75+
if self._on_track_end and not self._loading:
76+
if is_eof or is_error:
77+
self._on_track_end()
7678

7779
def set_spotify_source(self, source: "SpotifySource"):
7880
"""Set the Spotify source for Connect playback."""

0 commit comments

Comments
 (0)