Add support for OpenSubsonic enhanced lyrics (#2208)

This commit is contained in:
Jeff
2026-07-09 21:32:05 -07:00
committed by GitHub
parent 0c89fea1ea
commit 355b19c1cb
55 changed files with 4213 additions and 480 deletions
+14
View File
@@ -0,0 +1,14 @@
const textEncoder = new TextEncoder();
const textDecoder = new TextDecoder();
export const sliceUtf8Bytes = (value: string, byteStart: number, byteEnd: number): string => {
const bytes = textEncoder.encode(value);
const start = Math.max(0, byteStart);
const end = Math.min(bytes.length - 1, byteEnd);
if (start > end || bytes.length === 0) {
return '';
}
return textDecoder.decode(bytes.slice(start, end + 1));
};