Module: MPD::Plugins::Reflection
- Included in:
- MPD
- Defined in:
- lib/ruby-mpd/plugins/reflection.rb
Overview
Informational commands regarding MPD’s internals and config.
Instance Method Summary collapse
-
#commands ⇒ Array<Symbol>
Shows which commands the current user has access to.
-
#config ⇒ Hash
Returns the config of MPD (currently only music_directory).
-
#decoders ⇒ Array<Hash>
Get a list of decoder plugins, with by their supported suffixes and MIME types.
-
#notcommands ⇒ Array<Symbol>
Shows which commands the current user does not have access to.
-
#tags ⇒ Array
Get a list of available song metadata fields.
-
#url_handlers ⇒ Array<String>
Gets a list of available URL handlers.
Instance Method Details
#commands ⇒ Array<Symbol>
Shows which commands the current user has access to.
14 15 16 |
# File 'lib/ruby-mpd/plugins/reflection.rb', line 14 def commands send_command :commands end |
#config ⇒ Hash
Returns the config of MPD (currently only music_directory). Only works if connected trough an UNIX domain socket.
8 9 10 |
# File 'lib/ruby-mpd/plugins/reflection.rb', line 8 def config send_command :config end |
#decoders ⇒ Array<Hash>
Get a list of decoder plugins, with by their supported suffixes and MIME types.
33 34 35 |
# File 'lib/ruby-mpd/plugins/reflection.rb', line 33 def decoders send_command :decoders end |
#notcommands ⇒ Array<Symbol>
Shows which commands the current user does not have access to.
20 21 22 |
# File 'lib/ruby-mpd/plugins/reflection.rb', line 20 def notcommands send_command :notcommands end |
#tags ⇒ Array
Get a list of available song metadata fields. This gets only mapped once per-connect (it gets remapped if you connect and disconnect).
41 42 43 |
# File 'lib/ruby-mpd/plugins/reflection.rb', line 41 def @tags ||= send_command(:tagtypes).map {|tag| tag.downcase } end |
#url_handlers ⇒ Array<String>
Gets a list of available URL handlers.
26 27 28 |
# File 'lib/ruby-mpd/plugins/reflection.rb', line 26 def url_handlers send_command :urlhandlers end |