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