Mercurial > audlegacy-plugins
comparison src/xspf/xspf.c @ 384:a91923634161 trunk
[svn] - don't use deprecated function playlist_get().
author | nenolod |
---|---|
date | Fri, 15 Dec 2006 21:23:09 -0800 |
parents | f201074bf69a |
children | de15b9e09d2d |
comparison
equal
deleted
inserted
replaced
383:b211dcbec13f | 384:a91923634161 |
---|---|
218 playlist_save_xspf(const gchar *filename, gint pos) | 218 playlist_save_xspf(const gchar *filename, gint pos) |
219 { | 219 { |
220 xmlDocPtr doc; | 220 xmlDocPtr doc; |
221 xmlNodePtr rootnode, tmp, tracklist; | 221 xmlNodePtr rootnode, tmp, tracklist; |
222 GList *node; | 222 GList *node; |
223 Playlist *playlist = playlist_get_active(); | |
223 | 224 |
224 doc = xmlNewDoc("1.0"); | 225 doc = xmlNewDoc("1.0"); |
225 | 226 |
226 rootnode = xmlNewNode(NULL, XSPF_ROOT_NODE_NAME); | 227 rootnode = xmlNewNode(NULL, XSPF_ROOT_NODE_NAME); |
227 xmlSetProp(rootnode, "xmlns", XSPF_XMLNS); | 228 xmlSetProp(rootnode, "xmlns", XSPF_XMLNS); |
235 tracklist = xmlNewNode(NULL, "trackList"); | 236 tracklist = xmlNewNode(NULL, "trackList"); |
236 xmlAddChild(rootnode, tracklist); | 237 xmlAddChild(rootnode, tracklist); |
237 | 238 |
238 PLAYLIST_LOCK(); | 239 PLAYLIST_LOCK(); |
239 | 240 |
240 for (node = playlist_get(); node != NULL; node = g_list_next(node)) | 241 for (node = playlist->entries; node != NULL; node = g_list_next(node)) |
241 { | 242 { |
242 PlaylistEntry *entry = PLAYLIST_ENTRY(node->data); | 243 PlaylistEntry *entry = PLAYLIST_ENTRY(node->data); |
243 xmlNodePtr track, location; | 244 xmlNodePtr track, location; |
244 gchar *filename = NULL; | 245 gchar *filename = NULL; |
245 | 246 |