Beispiel #1
0
static int
directoryPrintSongInfo(struct song *song, void *data)
{
	struct client *client = data;
	song_print_info(client, song);
	return 0;
}
Beispiel #2
0
static bool
print_visitor_song_info(struct song *song, void *data,
			G_GNUC_UNUSED GError **error_r)
{
	struct client *client = data;
	song_print_info(client, song);
	return true;
}
Beispiel #3
0
static int
searchInDirectory(struct song *song, void *_data)
{
	struct search_data *data = _data;

	if (locate_song_search(song, data->criteria))
		song_print_info(data->client, song);

	return 0;
}
Beispiel #4
0
static bool
find_visitor_song(struct song *song, void *_data,
		  G_GNUC_UNUSED GError **error_r)
{
	struct search_data *data = _data;

	if (locate_song_match(song, data->criteria))
		song_print_info(data->client, song);

	return true;
}
Beispiel #5
0
/**
 * Send detailed information about a range of songs in the queue to a
 * client.
 *
 * @param client the client which has requested information
 * @param start the index of the first song (including)
 * @param end the index of the last song (excluding)
 */
static void
queue_print_song_info(struct client *client, const struct queue *queue,
		      unsigned position)
{
	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);
}
Beispiel #6
0
static int
song_print_info_x(struct song *song, void *data)
{
	struct client *client = data;
	return song_print_info(client, song);
}