queue: implement song "priorities"

Sorts remaining songs by priority.  This can be used for the
much-demanded "queue feature".
This commit is contained in:
Max Kellermann
2011-07-19 00:34:33 +02:00
parent a222c4879c
commit b159bc0c5f
10 changed files with 701 additions and 6 deletions
+4
View File
@@ -41,6 +41,10 @@ queue_print_song_info(struct client *client, const struct queue *queue,
song_print_info(client, queue_get(queue, position));
client_printf(client, "Pos: %u\nId: %u\n",
position, queue_position_to_id(queue, position));
uint8_t priority = queue_get_priority_at_position(queue, position);
if (priority != 0)
client_printf(client, "Prio: %u\n", priority);
}
void