From ddb81ed114befd0cd376beb9049ebef7634b545c Mon Sep 17 00:00:00 2001 From: Emily Wood Date: Fri, 15 Oct 2021 22:29:12 +1100 Subject: [PATCH] minor changes to invidious endpoint format --- configTemplate.js | 2 +- src/modules/music.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configTemplate.js b/configTemplate.js index d654819..7480756 100644 --- a/configTemplate.js +++ b/configTemplate.js @@ -17,7 +17,7 @@ const config = { // Configurable API endpoints endpoints: { - invidious: 'https://invidio.us/api/' + invidious: '' }, // Default per-server settings diff --git a/src/modules/music.js b/src/modules/music.js index a61ffbd..edf4c65 100644 --- a/src/modules/music.js +++ b/src/modules/music.js @@ -45,9 +45,9 @@ exports.getVideoByQuery = async function (client, query, message) { try { const id = await ytdl.getURLVideoID(query) - res = await fetch(`${client.config.endpoints.invidious}v1/videos/${id}`) + res = await fetch(`${client.config.endpoints.invidious}/api/v1/videos/${id}`) } catch (err) { - res = await fetch(`${client.config.endpoints.invidious}v1/search?q=${encodeURIComponent(query)}`) + res = await fetch(`${client.config.endpoints.invidious}/api/v1/search?q=${encodeURIComponent(query)}`) } const parsed = await res.json().catch(function (e) {