0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-01 01:12:39 +00:00

fix: api key not provided in /next calls

This commit is contained in:
Alex 2022-03-25 10:14:15 +13:00
parent 50dfeae707
commit 395c5983ea

View file

@ -98,7 +98,7 @@ class Innertube {
async getVidAsync(id) {
let data = { context: this.context, videoId: id };
const responseNext = await Http.post({
url: `${constants.URLS.YT_BASE_API}/next?v=${id}`,
url: `${constants.URLS.YT_BASE_API}/next?key=${this.key}`,
data: data,
headers: constants.INNERTUBE_HEADER(this.context.client),
}).catch((error) => error);
@ -181,11 +181,9 @@ class Innertube {
response.data.output?.playabilityStatus?.status == ("ERROR" || undefined)
)
throw new Error(
`Could not get information for video: ${
response.status_code ||
response.data.output?.playabilityStatus?.status
} - ${
response.message || response.data.output?.playabilityStatus?.reason
`Could not get information for video: ${response.status_code ||
response.data.output?.playabilityStatus?.status
} - ${response.message || response.data.output?.playabilityStatus?.reason
}`
);
const responseInfo = response.data.output;