Class: MPD::Commands::CurrentPlaylistAdd
- Defined in:
- lib/mpd/commands/current_playlist_add.rb
Overview
Adds song(s) to current playlist ‘songs` is an array of URIs.
Instance Attribute Summary
Attributes inherited from Abstract
Instance Method Summary collapse
-
#execute(songs) ⇒ Object
‘songs` is position (as int) or range.
Methods inherited from Abstract
Constructor Details
This class inherits a constructor from MPD::Commands::Abstract
Instance Method Details
#execute(songs) ⇒ Object
‘songs` is position (as int) or range
13 14 15 16 |
# File 'lib/mpd/commands/current_playlist_add.rb', line 13 def execute(songs) return exec_command("add \"#{songs}\"") unless songs.is_a?(Array) exec_command_list(songs.map { |s| "add \"#{s}\"" }) end |