mpc-js
    Preparing search index...

    Class CurrentPlaylistCommands

    Index

    Constructors

    Methods

    • Adds the file or directory uri to the playlist (directories add recursively).

      Parameters

      • uri: string

      Returns Promise<void>

    • Adds a song to the playlist (non-recursive) and returns the song id. uri is always a single file or URL.

      Parameters

      • uri: string
      • Optionalposition: number

      Returns Promise<number>

    • Adds a tag to the specified song. Editing song tags is only possible for remote songs. This change is volatile: it may be overwritten by tags received from the server, and the data is gone when the song gets removed from the queue.

      Parameters

      • songId: number
      • tag: string
      • value: string

      Returns Promise<void>

    • Removes tags from the specified song. If tag is not specified, then all tag values will be removed. Editing song tags is only possible for remote songs.

      Parameters

      • songId: number
      • Optionaltag: string

      Returns Promise<void>

    • Deletes a song range from the playlist.

      Parameters

      • start: number
      • Optionalend: number

      Returns Promise<void>

    • Moves the song with the given songid to to the playlist. If to is negative, it is relative to the current song in the playlist (if there is one).

      Parameters

      • songId: number
      • to: number

      Returns Promise<void>

    • Moves the range of songs from start to end to to in the playlist.

      Parameters

      • start: number
      • end: number
      • to: number

      Returns Promise<void>

    • Displays changed songs currently in the playlist since version. Start and end positions may be given to limit the output to changes in the given range. To detect songs that were deleted at the end of the playlist, use playlistlength returned by status command.

      Parameters

      • version: number
      • Optionalstart: number
      • Optionalend: number

      Returns Promise<PlaylistItem[]>

    • Displays changed songs currently in the playlist since version. This function only returns the position and the id of the changed song, not the complete metadata. This is more bandwidth efficient. To detect songs that were deleted at the end of the playlist, use playlistlength returned by status command.

      Parameters

      • version: number
      • Optionalstart: number
      • Optionalend: number

      Returns Promise<SongIdAndPosition[]>

    • Set the priority of the specified songs. A higher priority means that it will be played first when "random" mode is enabled. A priority is an integer between 0 and 255. The default priority of new songs is 0.

      Parameters

      • priority: number
      • start: number
      • end: number

      Returns Promise<void>

    • Same as prio, but address the songs with their songid.

      Parameters

      • priority: number
      • songId: number

      Returns Promise<void>

    • Specifies the portion of the song that shall be played. start and end are offsets in seconds (fractional seconds allowed); both are optional. Omitting both means "remove the range, play everything". A song that is currently playing cannot be manipulated this way.

      Parameters

      • songId: number
      • Optionalstart: number
      • Optionalend: number

      Returns Promise<void>

    • Shuffles the current playlist. start and end is optional and specifies a range of songs.

      Parameters

      • Optionalstart: number
      • Optionalend: number

      Returns Promise<void>

    • Swaps the positions of song1 and song2 (both songids).

      Parameters

      • song1: number
      • song2: number

      Returns Promise<void>