Allow local API video extractor to return error messages in the user's preffered locale

This commit is contained in:
Preston 2020-12-06 20:15:31 -05:00
parent 6b73ee5f6c
commit 7eb0a400c5
1 changed files with 3 additions and 1 deletions

View File

@ -132,7 +132,9 @@ const actions = {
ytGetVideoInformation (_, videoId) {
return new Promise((resolve, reject) => {
console.log('Getting video info please wait...')
ytdl.getInfo(videoId).then((result) => {
ytdl.getInfo(videoId, {
lang: localStorage.getItem('locale')
}).then((result) => {
resolve(result)
}).catch((err) => {
reject(err)