Options
All
  • Public
  • Public/Protected
  • All
Menu

seratolibraryparser

Index

Type aliases

ChunkDataType

ChunkDataType: string | Chunk[] | number | Date

Functions

getDefaultITunesLibraryPath

  • getDefaultITunesLibraryPath(): string
  • Returns the default path to the iTunes Music Library.xml of the user

    Returns string

    path to iTunes Music Library.xml

getDefaultSeratoPath

  • getDefaultSeratoPath(): string
  • Returns the default path to the serato folder of the user

    Returns string

    path to serato folder

getDomTree

  • getDomTree(path: string): Promise<Chunk[]>
  • Returns the raw domtree of a serato file

    Parameters

    • path: string

      The path to the file that shoud be parsed

    Returns Promise<Chunk[]>

    Nested object dom

getITunesSongs

  • getITunesSongs(path: string): Promise<Song[]>
  • Gets all songs of the iTunesLibrary file

    Parameters

    • path: string

      path to iTunes Music Library.xml

    Returns Promise<Song[]>

getSeratoHistory

  • getSeratoHistory(seratoPath: string): Promise<Session[]>
  • Reads all sessions and played songs from the Serato folder

    Parameters

    • seratoPath: string

      path to Serato folder (including Serato)

    Returns Promise<Session[]>

    list of sessions including songs

getSeratoSongs

  • getSeratoSongs(path: string): Promise<Song[]>
  • Gets all songs of the database v2 serato file

    Parameters

    • path: string

      path to database v2 serato file

    Returns Promise<Song[]>

getSessionSongs

  • getSessionSongs(path: string): Promise<HistorySong[]>
  • Reads in a serato session file.

    Parameters

    • path: string

      Path to *.session file

    Returns Promise<HistorySong[]>

    An array containing title and artist for every song played

getSessions

  • getSessions(path: string): Promise<{}>
  • Reads in a history.databases file

    Parameters

    • path: string

      Path to the history.database file

    Returns Promise<{}>

    } A dictonary with the number of the session file for every date

getStringFromUInt32

  • getStringFromUInt32(n: number): string
  • Converts a 4 byte integer into a string

    Parameters

    • n: number

      4 byte integer

    Returns string

getUInt32FromString

  • getUInt32FromString(s: string): number
  • Converts a 4 byte string into a integer

    Parameters

    • s: string

      4 byte string to be converted

    Returns number

parseChunk

  • parseChunk(buffer: Buffer, index: number): Promise<{ chunk: Chunk; newIndex: number }>
  • Returns a single buffer and fills in data tag recursivly

    Parameters

    • buffer: Buffer

      A node.js fs buffer to read from

    • index: number

      index of first byte

    Returns Promise<{ chunk: Chunk; newIndex: number }>

    } Promise with object for destructured assignment. New Index is the index of the following chunk

parseChunkArray

  • parseChunkArray(buffer: Buffer, start: number, end: number): Promise<Chunk[]>
  • Reads in a ongoing list of serato chunks till the maximum length is reached

    Parameters

    • buffer: Buffer

      A node.js fs buffer to read from

    • start: number

      Index of the first byte of the chunk

    • end: number

      Maximum length of the array data

    Returns Promise<Chunk[]>

    Array of chunks read in

Generated using TypeDoc