advance_to_track: ignore same-index calls so requesting the current track no longer restarts it
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
bd0629f554
commit
1e53fb83d1
@@ -144,6 +144,8 @@ func advance_to_track(index: int) -> void:
|
|||||||
var playlist : DynamicSoundPlaylist = _player.Playlist;
|
var playlist : DynamicSoundPlaylist = _player.Playlist;
|
||||||
if playlist == null or index < 0 or index >= playlist.QueuedSongs.size():
|
if playlist == null or index < 0 or index >= playlist.QueuedSongs.size():
|
||||||
return;
|
return;
|
||||||
|
if index == _current_index and not _active_songs.is_empty():
|
||||||
|
return;
|
||||||
if _playback == null:
|
if _playback == null:
|
||||||
_player.play();
|
_player.play();
|
||||||
_playback = _player.get_stream_playback();
|
_playback = _player.get_stream_playback();
|
||||||
|
|||||||
Reference in New Issue
Block a user