From b8396da7d26ef9913db4b32c1bae42e233f347cb Mon Sep 17 00:00:00 2001 From: KGT1 Date: Mon, 18 Jan 2021 07:15:26 +0100 Subject: [PATCH] fix undefined compare --- src/playbackmanager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/playbackmanager.js b/src/playbackmanager.js index 10684e4..e11afaf 100644 --- a/src/playbackmanager.js +++ b/src/playbackmanager.js @@ -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) { - log.debug("start playing ",playlistIndex, ". of list: ",itemIDPlaylist," in a voiceconnection?: ", isNaN(voiceconnection)); + log.debug("start playing ",playlistIndex, ". of list: ",itemIDPlaylist," in a voiceconnection?: ", typeof voiceconnection !== "undefined"); isPaused = false; currentPlayingPlaylist = itemIDPlaylist; currentPlayingPlaylistIndex = playlistIndex; @@ -77,7 +77,7 @@ function startPlaying (voiceconnection = discordclientmanager.getDiscordClient() } async function spawnPlayMessage (message) { - log.debug("spawned Play Message: ",message); + log.debug("spawned Play Message?: ",typeof message !== "undefined"); const itemIdDetails = await jellyfinClientManager.getJellyfinClient().getItem(jellyfinClientManager.getJellyfinClient().getCurrentUserId(), getItemId()); const imageURL = await jellyfinClientManager.getJellyfinClient().getImageUrl(itemIdDetails.AlbumId || getItemId(), { type: "Primary" }); try {