Preserve and display bilingual and phonetic lyric cues
This commit is contained in:
@@ -87,7 +87,9 @@ export function sanitizeLyrics(input) {
|
||||
const text = cleanLyricText(l.text);
|
||||
if (!text) continue;
|
||||
const kind = l.kind === 'section' || l.kind === 'cue' ? l.kind : 'line';
|
||||
lines.push({ t: cleanTime(l.t), text, kind });
|
||||
const line = { t: cleanTime(l.t), text, kind };
|
||||
if (kind === 'line') { const secondary = cleanLyricText(l.secondary), phonetic = cleanLyricText(l.phonetic); if (secondary) line.secondary = secondary; if (phonetic) line.phonetic = phonetic; }
|
||||
lines.push(line);
|
||||
}
|
||||
const tags = (Array.isArray(input.tags) ? input.tags : [])
|
||||
.map((t) => cleanText(t, 40)).filter(Boolean).slice(0, MAX_TAGS);
|
||||
|
||||
Reference in New Issue
Block a user