forked from embee/woomy
minor changes to invidious endpoint format
This commit is contained in:
parent
55c546aa6a
commit
ddb81ed114
2 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ const config = {
|
|||
|
||||
// Configurable API endpoints
|
||||
endpoints: {
|
||||
invidious: 'https://invidio.us/api/'
|
||||
invidious: ''
|
||||
},
|
||||
|
||||
// Default per-server settings
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue