mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 23:59:08 +00:00
chore: lint
This commit is contained in:
@@ -45,9 +45,8 @@ export async function parseM3U8ForSubtitles(
|
|||||||
function parseAttributes(line: string): { [key: string]: string } {
|
function parseAttributes(line: string): { [key: string]: string } {
|
||||||
const attributes: { [key: string]: string } = {};
|
const attributes: { [key: string]: string } = {};
|
||||||
const regex = /([A-Z-]+)=(?:"([^"]*)"|([^,]*))/g;
|
const regex = /([A-Z-]+)=(?:"([^"]*)"|([^,]*))/g;
|
||||||
let match: RegExpExecArray | null;
|
|
||||||
|
|
||||||
while ((match = regex.exec(line)) !== null) {
|
for (const match of line.matchAll(regex)) {
|
||||||
const key = match[1];
|
const key = match[1];
|
||||||
const value = match[2] ?? match[3]; // quoted or unquoted
|
const value = match[2] ?? match[3]; // quoted or unquoted
|
||||||
attributes[key] = value;
|
attributes[key] = value;
|
||||||
|
|||||||
Reference in New Issue
Block a user