mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-10-31 17:02:38 +00:00
Merge pull request #183 from 404-Program-not-found/main
fix: api key not provided in /next calls
This commit is contained in:
commit
d58fb60e61
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 ||
|
||||
`Could not get information for video: ${response.status_code ||
|
||||
response.data.output?.playabilityStatus?.status
|
||||
} - ${
|
||||
response.message || response.data.output?.playabilityStatus?.reason
|
||||
} - ${response.message || response.data.output?.playabilityStatus?.reason
|
||||
}`
|
||||
);
|
||||
const responseInfo = response.data.output;
|
||||
|
|
Loading…
Reference in a new issue