加长自定义源返回的歌词长度

This commit is contained in:
lyswhut 2024-02-06 10:37:35 +08:00
parent c8d14513f2
commit 7620110317

View File

@ -170,12 +170,12 @@ globalThis.lx_setup = (key, id, name, description, version, author, homepage, ra
const verifyLyricInfo = (info) => { const verifyLyricInfo = (info) => {
if (typeof info != 'object' || typeof info.lyric != 'string') throw new Error('failed') if (typeof info != 'object' || typeof info.lyric != 'string') throw new Error('failed')
if (info.lyric.length > 4096) throw new Error('failed') if (info.lyric.length > 51200) throw new Error('failed')
return { return {
lyric: info.lyric, lyric: info.lyric,
tlyric: (typeof info.tlyric == 'string' && info.tlyric.length < 4096) ? info.tlyric : null, tlyric: (typeof info.tlyric == 'string' && info.tlyric.length < 5120) ? info.tlyric : null,
mlyric: typeof info.mlyric == 'string' && info.mlyric.length < 4096 ? info.mlyric : null, rlyric: (typeof info.rlyric == 'string' && info.rlyric.length < 5120) ? info.rlyric : null,
lxlyric: typeof info.lxlyric == 'string' && info.lxlyric.length < 4096 ? info.lxlyric : null, lxlyric: (typeof info.lxlyric == 'string' && info.lxlyric.length < 8192) ? info.lxlyric : null,
} }
} }