class MPD::Commands::PlaylistAdd
Adds song(s) to specific playlist.
Public Instance Methods
execute(name, songs)
click to toggle source
@param name [String] playlist name. @param songs [Array<String>, String] file URIs.
# File lib/mpd/commands/playlist_add.rb, line 13 def execute(name, songs) if songs.is_a?(Array) commands = songs.map { |s| "playlistadd \"#{name}\" \"#{s}\"" } exec_command_list(commands) else exec_command("playlistadd \"#{name}\" \"#{songs}\"") end end