joshmcarthur / on-the-spot

A web-controllable searching and queueing system for Spotify
9 stars 4 forks source link

Queue should not allow duplicate song entries. #8

Closed chrisrbnelson closed 12 years ago

chrisrbnelson commented 12 years ago

When adding a song to the queue, it should check if it already exists. If so, it can simply report back its place in the queue, otherwise use current behaviour.

joshmcarthur commented 12 years ago

This should be pretty easy, in controllers/queue_controller#create:

if $redis.lindex(params[:uri]).nil?
# Add to queue
end 

http://redis.io/commands/lindex