From 1db343778d224aac3011876af6eaccf1556c08a2 Mon Sep 17 00:00:00 2001 From: KGT1 Date: Mon, 21 Sep 2020 04:43:37 +0200 Subject: [PATCH] remove unnecessary request --- src/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index a3af6a8..40527ec 100644 --- a/src/index.js +++ b/src/index.js @@ -12,12 +12,11 @@ const {audioDispatcher} = require('./dispachermanager'); const {handleChannelMessage}=require('./messagehandler'); jellyfinClientManager.init(); -jellyfinClientManager.getJellyfinClient().getPublicSystemInfo().then((response) => { +//TODO Error Checking as the apiclients is inefficent +jellyfinClientManager.getJellyfinClient().authenticateUserByName(CONFIG["jellyfin-username"],CONFIG["jellyfin-password"]).then((response)=>{ + jellyfinClientManager.getJellyfinClient().setAuthenticationInfo(response.AccessToken, response.SessionInfo.UserId); +}); - jellyfinClientManager.getJellyfinClient().authenticateUserByName(CONFIG["jellyfin-username"],CONFIG["jellyfin-password"]).then((response)=>{ - jellyfinClientManager.getJellyfinClient().setAuthenticationInfo(response.AccessToken, response.SessionInfo.UserId); - }); -}) discordClient.on('ready', () => { console.log('connected to Discord');