Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cueshit/conversion.ts>detectFormatAndParseCueSheet

Convert between different cue sheet / chapter / tracklist formats
Latest
function detectFormatAndParseCueSheet
import { detectFormatAndParseCueSheet } from "https://deno.land/x/cueshit@v0.7.0/conversion.ts";

Detects the format of the given cue sheet and parses it.

Tries to parse the serialized content with all supported input formats. Exits as soon as a parser was successful and returned a non-empty cue sheet.

If a path is given, the file extension will be used to prioritize the formats which are using this file extension.

Parameters

content: string

Serialized content of the cue sheet.

optional
path: string

Path to the cue sheet file (including extension).

Returns

DetectionResult | undefined

Parsed cue sheet and its format ID or undefined if detection failed.