itunes-command 1.5-universal-darwin-9 → 1.6-universal-darwin-9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/itunes_command.rb +12 -3
  2. metadata +1 -1
@@ -287,8 +287,17 @@ class ItunesCommand
287
287
  end
288
288
 
289
289
  def queue(index)
290
- @i.queue_track(track=@tracks[index.to_i])
291
- puts "Added #{track.name} to the queue"
290
+ if index =~ /\d+-\d+/
291
+ start = index.split('-').first.to_i
292
+ last = index.split('-').last.to_i
293
+ Array(start..last).each do |i|
294
+ @i.queue_track(track=@tracks[i])
295
+ puts "Added #{track.name} to the queue"
296
+ end
297
+ else
298
+ @i.queue_track(track=@tracks[index.to_i])
299
+ puts "Added #{track.name} to the queue"
300
+ end
292
301
  end
293
302
 
294
303
  def show_queue
@@ -363,7 +372,7 @@ class ItunesCommand
363
372
  p shows all playlists
364
373
  <playlist number> shows all the tracks in a playlist
365
374
  l list all tracks in the queue (which will play tracks in succession)
366
- n <track number> put a track in the queue
375
+ n <track number> put a track in the queue; can be a range, e.g. 3-5
367
376
  c clear the queue
368
377
  g start playing tracks in the queue
369
378
  k skip to next track in queue
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itunes-command
3
3
  version: !ruby/object:Gem::Version
4
- version: "1.5"
4
+ version: "1.6"
5
5
  platform: universal-darwin-9
6
6
  authors:
7
7
  - Daniel Choi