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:
parent
50dfeae707
commit
395c5983ea
1 changed files with 4 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue