Captions: Fix 'system' locale unwanted behavior

Closes: 

Having 'system' locale set would wrongfully send the wrong
locale information to YouTube, which would result in the captions
not being set properly. This commit fixes that behavior.
This commit is contained in:
Svallinn 2021-05-11 18:25:47 +01:00
parent bd60d3c838
commit f2d29f667a
No known key found for this signature in database
GPG Key ID: 09FB527F34037CCA
1 changed files with 1 additions and 1 deletions
src/renderer/views/Watch

View File

@ -394,7 +394,7 @@ export default Vue.extend({
.captionTracks .captionTracks
if (typeof captionTracks !== 'undefined') { if (typeof captionTracks !== 'undefined') {
const locale = localStorage.getItem('locale') const locale = this.$i18n.locale
if (locale !== null) { if (locale !== null) {
const standardLocale = locale.replace('_', '-') const standardLocale = locale.replace('_', '-')
const noLocaleCaption = !captionTracks.some(track => const noLocaleCaption = !captionTracks.some(track =>