mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-11-23 18:21:55 +01:00
fix false comare
This commit is contained in:
parent
f75b978dd8
commit
0db64a3ee2
@ -31,7 +31,7 @@ function streamURLbuilder (itemID, bitrate) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function startPlaying (voiceconnection = discordclientmanager.getDiscordClient().user.client.voice.connections.first(), itemIDPlaylist = currentPlayingPlaylist, playlistIndex = currentPlayingPlaylistIndex, seekTo, disconnectOnFinish = _disconnectOnFinish) {
|
function startPlaying (voiceconnection = discordclientmanager.getDiscordClient().user.client.voice.connections.first(), itemIDPlaylist = currentPlayingPlaylist, playlistIndex = currentPlayingPlaylistIndex, seekTo, disconnectOnFinish = _disconnectOnFinish) {
|
||||||
log.debug("start playing ",playlistIndex, ". of list: ",itemIDPlaylist," in a voiceconnection?: ", voiceconnection=!undefined);
|
log.debug("start playing ",playlistIndex, ". of list: ",itemIDPlaylist," in a voiceconnection?: ", isNaN(voiceconnection));
|
||||||
isPaused = false;
|
isPaused = false;
|
||||||
currentPlayingPlaylist = itemIDPlaylist;
|
currentPlayingPlaylist = itemIDPlaylist;
|
||||||
currentPlayingPlaylistIndex = playlistIndex;
|
currentPlayingPlaylistIndex = playlistIndex;
|
||||||
@ -159,7 +159,7 @@ function previousTrack () {
|
|||||||
* @param {Object=} disconnectVoiceConnection - Optional The voice Connection do disconnect from
|
* @param {Object=} disconnectVoiceConnection - Optional The voice Connection do disconnect from
|
||||||
*/
|
*/
|
||||||
function stop (disconnectVoiceConnection, itemId = getItemId()) {
|
function stop (disconnectVoiceConnection, itemId = getItemId()) {
|
||||||
log.debug("stop playback and send following payload to the server: ",getStopPayload());
|
|
||||||
isPaused = true;
|
isPaused = true;
|
||||||
if (interactivemsghandler.hasMessage()) {
|
if (interactivemsghandler.hasMessage()) {
|
||||||
interactivemsghandler.destroy();
|
interactivemsghandler.destroy();
|
||||||
@ -167,6 +167,7 @@ function stop (disconnectVoiceConnection, itemId = getItemId()) {
|
|||||||
if (disconnectVoiceConnection) {
|
if (disconnectVoiceConnection) {
|
||||||
disconnectVoiceConnection.disconnect();
|
disconnectVoiceConnection.disconnect();
|
||||||
}
|
}
|
||||||
|
log.debug("stop playback and send following payload to the server: ",getStopPayload());
|
||||||
jellyfinClientManager.getJellyfinClient().reportPlaybackStopped(getStopPayload());
|
jellyfinClientManager.getJellyfinClient().reportPlaybackStopped(getStopPayload());
|
||||||
if (getAudioDispatcher()) {
|
if (getAudioDispatcher()) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user