Fix caption baseurl (#2268)
* fix caption * remove duplicate auto-translation from english
This commit is contained in:
parent
fdd7e94a1d
commit
c098014a4e
|
@ -422,8 +422,9 @@ export default Vue.extend({
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!standardLocale.startsWith('en') && noLocaleCaption) {
|
if (!standardLocale.startsWith('en') && noLocaleCaption) {
|
||||||
const baseUrl = result.player_response.captions.playerCaptionsRenderer.baseUrl
|
captionTracks.forEach((caption) => {
|
||||||
this.tryAddingTranslatedLocaleCaption(captionTracks, standardLocale, baseUrl)
|
this.tryAddingTranslatedLocaleCaption(captionTracks, standardLocale, caption.baseUrl)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1156,6 +1157,13 @@ export default Vue.extend({
|
||||||
label = `${this.$t('Locale Name')} (translated from English)`
|
label = `${this.$t('Locale Name')} (translated from English)`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const indexTranslated = captionTracks.findIndex((item) => {
|
||||||
|
return item.name.simpleText === label
|
||||||
|
})
|
||||||
|
if (indexTranslated !== -1) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (enCaptionExists) {
|
if (enCaptionExists) {
|
||||||
url = new URL(captionTracks[enCaptionIdx].baseUrl)
|
url = new URL(captionTracks[enCaptionIdx].baseUrl)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue