mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-10-31 17:02:38 +00:00
fix: api key not provided in /next calls
This commit is contained in:
parent
50dfeae707
commit
395c5983ea
1 changed files with 4 additions and 6 deletions
|
@ -98,7 +98,7 @@ class Innertube {
|
||||||
async getVidAsync(id) {
|
async getVidAsync(id) {
|
||||||
let data = { context: this.context, videoId: id };
|
let data = { context: this.context, videoId: id };
|
||||||
const responseNext = await Http.post({
|
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,
|
data: data,
|
||||||
headers: constants.INNERTUBE_HEADER(this.context.client),
|
headers: constants.INNERTUBE_HEADER(this.context.client),
|
||||||
}).catch((error) => error);
|
}).catch((error) => error);
|
||||||
|
@ -181,11 +181,9 @@ class Innertube {
|
||||||
response.data.output?.playabilityStatus?.status == ("ERROR" || undefined)
|
response.data.output?.playabilityStatus?.status == ("ERROR" || undefined)
|
||||||
)
|
)
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Could not get information for video: ${
|
`Could not get information for video: ${response.status_code ||
|
||||||
response.status_code ||
|
response.data.output?.playabilityStatus?.status
|
||||||
response.data.output?.playabilityStatus?.status
|
} - ${response.message || response.data.output?.playabilityStatus?.reason
|
||||||
} - ${
|
|
||||||
response.message || response.data.output?.playabilityStatus?.reason
|
|
||||||
}`
|
}`
|
||||||
);
|
);
|
||||||
const responseInfo = response.data.output;
|
const responseInfo = response.data.output;
|
||||||
|
|
Loading…
Reference in a new issue