Strip native language suffix from caption label

This commit is contained in:
Joris te Dorsthorst
2024-02-01 11:19:02 +01:00
parent 28b15e5a36
commit 69da27d6dc

View File

@@ -110,7 +110,7 @@ export const upcloudScraper = makeEmbed({
if (track.kind !== 'captions') return;
const type = getCaptionTypeFromUrl(track.file);
if (!type) return;
const language = labelToLanguageCode(track.label);
const language = labelToLanguageCode(track.label.split(' ')[0]);
if (!language) return;
captions.push({
id: track.file,