Merge pull request #6 from tim-the-arcane/main

Add fallback for X-Goog-Visitor-Id header
This commit is contained in:
Zechariah 2022-08-16 22:52:00 +08:00 committed by GitHub
commit 4a6759db7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ export default class YTMusic {
const headers: Record<string, any> = {
...this.client.defaults.headers,
"x-origin": this.client.defaults.baseURL,
"X-Goog-Visitor-Id": this.config.VISITOR_DATA,
"X-Goog-Visitor-Id": this.config.VISITOR_DATA || '',
"X-YouTube-Client-Name": this.config.INNERTUBE_CONTEXT_CLIENT_NAME,
"X-YouTube-Client-Version": this.config.INNERTUBE_CLIENT_VERSION,
"X-YouTube-Device": this.config.DEVICE,