export interface Metadata { duration: number; trackNumber?: number; title?: string; artist?: string; album?: string; genre?: string[] } export interface MediaFile { metadata: Metadata; } export interface Directory { files: FileListing; } //Scanned = we know which children exist //Unknown = either: // - not scanned (is a subdirectory and recursive=false) // - only partially exists, because some deeper file was scannend, and this entry only exists as a link export interface DirectoryWithStatus { files: FileListingWithStatus; status: "Scanned" | "Unknown"; } export type FileListing = Map; export type FileListingWithStatus = Map; export enum MediaFormat { "opus/ogg" = "opus/ogg", "opus/webm" = "opus/webm", mp3 = "mp3", "vorbis/ogg" = "vorbis/ogg", "vorbis/webm" = "vorbis/webm", }