Module: Quiyo::Playlist
- Included in:
- Quiyo
- Defined in:
- lib/quiyo/playlist.rb
Instance Method Summary collapse
Instance Method Details
#addtoplist(action) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/quiyo/playlist.rb', line 11 def addtoplist(action) @mpd.search(action[1], action.drop(2).join(" ")).each { |s| @mpd.add(s.file) } rescue puts "Usage: addtoplaylist searchstring" end |
#clearplist ⇒ Object
7 8 9 |
# File 'lib/quiyo/playlist.rb', line 7 def clearplist @mpd.clear end |
#lsplist ⇒ Object
3 4 5 |
# File 'lib/quiyo/playlist.rb', line 3 def lsplist @mpd.playlist.each { |s| printsonglist(s) } end |
#removefromplist(id) ⇒ Object
19 20 21 |
# File 'lib/quiyo/playlist.rb', line 19 def removefromplist(id) @mpd.delete(id) end |