Add fallback for X-Goog-Visitor-Id header

This commit is contained in:
Tim Rüdenauer 2022-08-15 20:38:20 +02:00
parent 38d1347124
commit cf9834174e
1 changed files with 1 additions and 1 deletions

View File

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