libsaria: Fix removing songs from queue

If I'm going to attempt to remove the song id from the queue whenever a
song song is loaded, I need to check if the song is in the queue before
trying to remove it.
This commit is contained in:
Bryan Schumaker 2011-04-20 19:19:27 -04:00
parent 5ab592dcda
commit a8421b8226

View File

@ -21,8 +21,9 @@ def add_ids(ids):
add_id(id)
def rm_id(id):
queue.remove(id)
song_set.remove(id)
if id in queue:
queue.remove(id)
song_set.remove(id)
def rm_ids(ids):
for id in ids: