Skip to content

Commit 2b39638

Browse files
committed
fix: TypeError
1 parent c9ab213 commit 2b39638

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/music_caster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2601,8 +2601,8 @@ def next_track(from_timeout=False, times=1, forced=False, ignore_timestamps=Fals
26012601
elif (next_queue or music_queue) and (forced or playing_status.busy() and not sar.alive):
26022602
# 1. there is something to play next
26032603
# 2. we are already playing a track (or are forcing)
2604-
with suppress(IndexError, TypeError): # TypeError: if track_length is None
2605-
if track_length > 600 and not ignore_timestamps:
2604+
with suppress(IndexError):
2605+
if track_length is not None and track_length > 600 and not ignore_timestamps:
26062606
if url_metadata.get(music_queue[0], {}).get('timestamps'):
26072607
# smart next track if playing a long URL with multiple tracks
26082608
timestamps = url_metadata[music_queue[0]]['timestamps']

0 commit comments

Comments
 (0)