Allow local API video extractor to return error messages in the user's preffered locale
This commit is contained in:
parent
6b73ee5f6c
commit
7eb0a400c5
|
@ -132,7 +132,9 @@ const actions = {
|
||||||
ytGetVideoInformation (_, videoId) {
|
ytGetVideoInformation (_, videoId) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
console.log('Getting video info please wait...')
|
console.log('Getting video info please wait...')
|
||||||
ytdl.getInfo(videoId).then((result) => {
|
ytdl.getInfo(videoId, {
|
||||||
|
lang: localStorage.getItem('locale')
|
||||||
|
}).then((result) => {
|
||||||
resolve(result)
|
resolve(result)
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
reject(err)
|
reject(err)
|
||||||
|
|
Loading…
Reference in New Issue