chiark / gitweb /
Merge from Disobedience branch
[disorder] / disobedience / queue.c
index fe9e707386be63ccf8ba1534c746d00af5ae5fcd..d69b34dd3e444218af2ce0936c8b9b6b9886fe26 100644 (file)
@@ -32,10 +32,10 @@ struct queue_entry *playing_track;
 time_t last_playing;
 
 static void queue_completed(void *v,
-                            const char *error,
+                            const char *err,
                             struct queue_entry *q);
 static void playing_completed(void *v,
-                              const char *error,
+                              const char *err,
                               struct queue_entry *q);
 
 /** @brief Called when either the actual queue or the playing track change */
@@ -75,10 +75,10 @@ static void queue_playing_changed(void) {
 
 /** @brief Update the queue itself */
 static void queue_completed(void attribute((unused)) *v,
-                            const char *error,
+                            const char *err,
                             struct queue_entry *q) {
-  if(error) {
-    popup_protocol_error(0, error);
+  if(err) {
+    popup_protocol_error(0, err);
     return;
   }
   actual_queue = q;
@@ -87,10 +87,10 @@ static void queue_completed(void attribute((unused)) *v,
 
 /** @brief Update the playing track */
 static void playing_completed(void attribute((unused)) *v,
-                              const char *error,
+                              const char *err,
                               struct queue_entry *q) {
-  if(error) {
-    popup_protocol_error(0, error);
+  if(err) {
+    popup_protocol_error(0, err);
     return;
   }
   actual_playing_track = q;
@@ -198,9 +198,9 @@ struct queuelike ql_queue = {
 static int queue_drag_target = -1;
 
 static void queue_move_completed(void attribute((unused)) *v,
-                                 const char *error) {
-  if(error) {
-    popup_protocol_error(0, error);
+                                 const char *err) {
+  if(err) {
+    popup_protocol_error(0, err);
     return;
   }
   /* The log should tell us the queue changed so we do no more here */
@@ -345,6 +345,8 @@ int queued(const char *track) {
   struct queue_entry *q;
 
   D(("queued %s", track));
+  /* Queue will contain resolved name */
+  track = namepart_resolve(track);
   for(q = ql_queue.q; q; q = q->next)
     if(!strcmp(q->track, track))
       return 1;