mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-11-23 18:21:55 +01:00
fix repeate mode
This commit is contained in:
parent
574bb45991
commit
76ef7d1e3e
@ -53,6 +53,9 @@ function startPlaying (voiceconnection = discordclientmanager.getDiscordClient()
|
||||
}
|
||||
|
||||
getAudioDispatcher().on("finish", () => {
|
||||
if(isRepeat){
|
||||
startPlaying(voiceconnection,itemIDPlaylist,currentPlayingPlaylistIndex,0)
|
||||
}else{
|
||||
if (currentPlayingPlaylist.length < playlistIndex) {
|
||||
if (disconnectOnFinish) {
|
||||
stop(voiceconnection, currentPlayingPlaylist[playlistIndex - 1]);
|
||||
@ -61,7 +64,7 @@ function startPlaying (voiceconnection = discordclientmanager.getDiscordClient()
|
||||
}
|
||||
} else {
|
||||
startPlaying(voiceconnection, itemIDPlaylist, currentPlayingPlaylistIndex + 1, 0);
|
||||
}
|
||||
}}
|
||||
});
|
||||
}
|
||||
playasync().catch((rsn) => {
|
||||
|
Loading…
Reference in New Issue
Block a user