| 105 xmlnode_insert_data(xmlnode_new_child(tunenode, "source"),tuneinfo->album,-1); |
105 xmlnode_insert_data(xmlnode_new_child(tunenode, "source"),tuneinfo->album,-1); |
| 106 if(tuneinfo->url) |
106 if(tuneinfo->url) |
| 107 xmlnode_insert_data(xmlnode_new_child(tunenode, "uri"),tuneinfo->url,-1); |
107 xmlnode_insert_data(xmlnode_new_child(tunenode, "uri"),tuneinfo->url,-1); |
| 108 if(tuneinfo->time >= 0) { |
108 if(tuneinfo->time >= 0) { |
| 109 char *length = g_strdup_printf("%d", tuneinfo->time); |
109 char *length = g_strdup_printf("%d", tuneinfo->time); |
| 110 xmlnode_insert_data(xmlnode_new_child(tunenode, "length"),tuneinfo->artist,-1); |
110 xmlnode_insert_data(xmlnode_new_child(tunenode, "length"),length,-1); |
| 111 g_free(length); |
111 g_free(length); |
| 112 } |
112 } |
| 113 if(tuneinfo->track >= 0) { |
113 if(tuneinfo->track) |
| 114 char *track = g_strdup_printf("%d", tuneinfo->year); |
|
| 115 xmlnode_insert_data(xmlnode_new_child(tunenode, "track"),tuneinfo->track,-1); |
114 xmlnode_insert_data(xmlnode_new_child(tunenode, "track"),tuneinfo->track,-1); |
| 116 g_free(track); |
|
| 117 } |
|
| 118 } |
115 } |
| 119 |
116 |
| 120 jabber_pep_publish(js, publish); |
117 jabber_pep_publish(js, publish); |
| 121 /* publish is freed by jabber_pep_publish -> jabber_iq_send -> jabber_iq_free |
118 /* publish is freed by jabber_pep_publish -> jabber_iq_send -> jabber_iq_free |
| 122 (yay for well-defined memory management rules) */ |
119 (yay for well-defined memory management rules) */ |