Module: MPD

Defined in:
lib/mpd_client.rb,
lib/mpd_client/version.rb

Defined Under Namespace

Classes: Client

Constant Summary collapse

HELLO_PREFIX =
'OK MPD '
ERROR_PREFIX =
'ACK '
SUCCESS =
'OK'
NEXT =
'list_OK'
COMMANDS =
{
  # Status Commands
  'clearerror'         => 'fetch_nothing',
  'currentsong'        => 'fetch_object',
  'idle'               => 'fetch_list',
  'noidle'             => '',
  'status'             => 'fetch_object',
  'stats'              => 'fetch_object',
  # Playback Option Commands
  'consume'            => 'fetch_nothing',
  'crossfade'          => 'fetch_nothing',
  'mixrampdb'          => 'fetch_nothing',
  'mixrampdelay'       => 'fetch_nothing',
  'random'             => 'fetch_nothing',
  'repeat'             => 'fetch_nothing',
  'setvol'             => 'fetch_nothing',
  'single'             => 'fetch_nothing',
  'replay_gain_mode'   => 'fetch_nothing',
  'replay_gain_status' => 'fetch_item',
  'volume'             => 'fetch_nothing',
  # Playback Control Commands
  'next'               => 'fetch_nothing',
  'pause'              => 'fetch_nothing',
  'play'               => 'fetch_nothing',
  'playid'             => 'fetch_nothing',
  'previous'           => 'fetch_nothing',
  'seek'               => 'fetch_nothing',
  'seekid'             => 'fetch_nothing',
  'seekcur'            => 'fetch_nothing',
  'stop'               => 'fetch_nothing',
  # Playlist Commands
  'add'                => 'fetch_nothing',
  'addid'              => 'fetch_item',
  'addtagid'           => 'fetch_nothing',
  'cleartagid'         => 'fetch_nothing',
  'clear'              => 'fetch_nothing',
  'delete'             => 'fetch_nothing',
  'deleteid'           => 'fetch_nothing',
  'move'               => 'fetch_nothing',
  'moveid'             => 'fetch_nothing',
  'playlist'           => 'fetch_playlist',
  'playlistfind'       => 'fetch_songs',
  'playlistid'         => 'fetch_songs',
  'playlistinfo'       => 'fetch_songs',
  'playlistsearch'     => 'fetch_songs',
  'plchanges'          => 'fetch_songs',
  'plchangesposid'     => 'fetch_changes',
  'prio'               => 'fetch_nothing',
  'prioid'             => 'fetch_nothing',
  'rangeid'            => 'fetch_nothing',
  'shuffle'            => 'fetch_nothing',
  'swap'               => 'fetch_nothing',
  'swapid'             => 'fetch_nothing',
  # Stored Playlist Commands
  'listplaylist'       => 'fetch_list',
  'listplaylistinfo'   => 'fetch_songs',
  'listplaylists'      => 'fetch_playlists',
  'load'               => 'fetch_nothing',
  'playlistadd'        => 'fetch_nothing',
  'playlistclear'      => 'fetch_nothing',
  'playlistdelete'     => 'fetch_nothing',
  'playlistmove'       => 'fetch_nothing',
  'rename'             => 'fetch_nothing',
  'rm'                 => 'fetch_nothing',
  'save'               => 'fetch_nothing',
  # Database Commands
  'count'              => 'fetch_object',
  'find'               => 'fetch_songs',
  'findadd'            => 'fetch_nothing',
  'list'               => 'fetch_list',
  'listall'            => 'fetch_database',
  'listallinfo'        => 'fetch_database',
  'listfiles'          => 'fetch_database',
  'lsinfo'             => 'fetch_database',
  'search'             => 'fetch_songs',
  'searchadd'          => 'fetch_nothing',
  'searchaddp1'        => 'fetch_nothing',
  'update'             => 'fetch_item',
  'rescan'             => 'fetch_item',
  'readcomments'       => 'fetch_object',
  # Mounts and neighbors
  'mount'              => 'fetch_nothing',
  'unmount'            => 'fetch_nothing',
  'listmounts'         => 'fetch_mounts',
  'listneighbors'      => 'fetch_neighbors',
  # Sticker Commands
  'sticker get'        => 'fetch_sticker',
  'sticker set'        => 'fetch_nothing',
  'sticker delete'     => 'fetch_nothing',
  'sticker list'       => 'fetch_stickers',
  'sticker find'       => 'fetch_songs',
  # Connection Commands
  'close'              => '',
  'kill'               => '',
  'password'           => 'fetch_nothing',
  'ping'               => 'fetch_nothing',
  # Audio Output Commands
  'disableoutput'      => 'fetch_nothing',
  'enableoutput'       => 'fetch_nothing',
  'outputs'            => 'fetch_outputs',
  'toggleoutput'       => 'fetch_nothing',
  # Reflection Commands
  'config'             => 'fetch_item',
  'commands'           => 'fetch_list',
  'notcommands'        => 'fetch_list',
  'tagtypes'           => 'fetch_list',
  'urlhandlers'        => 'fetch_list',
  'decoders'           => 'fetch_plugins',
  # Client To Client
  'subscribe'          => 'fetch_nothing',
  'unsubscribe'        => 'fetch_nothing',
  'channels'           => 'fetch_list',
  'readmessages'       => 'fetch_messages',
  'sendmessage'        => 'fetch_nothing'
}.freeze