I think I Fix it
xmmsv_t *
create_native_value(char *value)
{
xmmsv_t *ret;
ret = xmmsv_new_list();
xmmsv_list_append(ret, xmmsv_new_string(value));
return ret;
}
res = xmmsc_coll_query_infos(sd->connection, universe,
create_native_value("artist"),
0, 0, create_native_value("artist"),
create_native_value("artist"));
xmmsc_result_notifier_set(res, _update_artists, NULL);
BUT,I can't get the string by:
static void _update_artists(xmmsv_t *res, void *userdata)
{
gchar *artist, *album;
gint id;
gchar artist_tmp[192] = "", album_tmp[192] = "";
int pl_size = xmmsv_list_get_size( res );
int i;
for ( i = 0; i < pl_size; i++ )
{
> xmmsv_t *infos;
xmmsv_t *dict_entry;
infos = xmmsv_propdict_to_dict (res, NULL);
> xmmsv_dict_get (infos, "artist", &dict_entry);
xmmsv_get_string (dict_entry, &artist);
INF("%s", infos);
How can I make it??
2010/4/27 rui kou <[email protected]>
> Thanks
>
> I just got a git clone from
> xmms2-devel.git<http://?p=xmms2-devel.git;a=summary>
>
> and The python reference build from this clone work well.
>
> 2010/4/27 Daniel Svensson <[email protected]>
>
>> 2010/4/27 rui kou <[email protected]>:
>>
>> > I am using C so I tried this:
>> >> xmmsc_coll_t *universe;
>> >> const gchar *properties[] = { "album", NULL };
>> >> const gchar *group_by[] = { "album", NULL };
>> >> universe = xmmsc_coll_universe();
>> >> result = xmmsc_coll_query_infos(connection, universe, group_by,
>> >> 0, 0, properties, group_by);
>> > It is expected to be right, but I got:
>> >> * xmms_ipc_msg_put_value raised a fatal error: Tried to serialize
>> value
>> >> of unsupported type
>> >> * This is probably a bug in XMMS2
>>
>> My guess is that you have a mix of XMMS2 versions installed. The
>> client library you link against is either newer or older than the
>> server you're trying to communicate with. Is one of them perhaps a
>> snapshot from git?
>>
>> Also, in the future, make sure you use 'Reply All' in your email
>> client so that the conversation stays on the list.
>>
>> --
>> Daniel Svensson
>>
>
>
--
_______________________________________________
Xmms2-devel mailing list
[email protected]
http://lists.xmms.se/cgi-bin/mailman/listinfo/xmms2-devel