Exemplo n.º 1
0
static void
currently_playing_request_info (currently_playing_t *entry)
{
	xmmsc_connection_t *conn = cli_context_xmms_sync (entry->ctx);
	gint current_id = cli_context_current_id (entry->ctx);

	if (current_id > 0) {
		XMMS_CALL_CHAIN (XMMS_CALL_P (xmmsc_medialib_get_info, conn, current_id),
		                 FUNC_CALL_P (currently_playing_update_info, entry, XMMS_PREV_VALUE));
	}
}
Exemplo n.º 2
0
/* TODO: Not really a part of the server sub-command, but in the future it
 *       can be refactored to just call "xmms2 server property" and let that
 *       do the printing
 */
gboolean
cli_info (cli_context_t *ctx, command_t *cmd)
{
	xmmsc_connection_t *conn = cli_context_xmms_sync (ctx);
	playlist_positions_t *positions;
	xmmsv_t *query;

	gint current_position = cli_context_current_position (ctx);
	gint current_id = cli_context_current_id (ctx);

	if (command_arg_positions_get (cmd, 0, &positions, current_position)) {
		cli_info_print_positions (ctx, positions);
		playlist_positions_free (positions);
	} else if (command_arg_pattern_get (cmd, 0, &query, FALSE)) {
		XMMS_CALL_CHAIN (XMMS_CALL_P (xmmsc_coll_query_ids, conn, query, NULL, 0, 0);
		                 FUNC_CALL_P (cli_info_print_list, ctx, XMMS_PREV_VALUE));
		xmmsv_unref (query);
	} else {