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.
- data/lib/itunes_command.rb +12 -3
- metadata +1 -1
data/lib/itunes_command.rb
CHANGED
@@ -287,8 +287,17 @@ class ItunesCommand
|
|
287
287
|
end
|
288
288
|
|
289
289
|
def queue(index)
|
290
|
-
|
291
|
-
|
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
|