# HG changeset patch # User nenolod # Date 1155261857 25200 # Node ID 56536f498eb8736a46ea07838dec905597186628 # Parent 51c1bf500d3fff994da83cba8ac3f6c35f525830 [svn] - sanity checking for saving diff -r 51c1bf500d3f -r 56536f498eb8 ChangeLog --- a/ChangeLog Thu Aug 10 19:03:21 2006 -0700 +++ b/ChangeLog Thu Aug 10 19:04:17 2006 -0700 @@ -1,3 +1,15 @@ +2006-08-11 02:03:21 +0000 William Pitcock + revision [2022] + - some experimental shit + + + Changes: Modified: + +1 -0 trunk/audacious/Makefile + +12 -48 trunk/audacious/playlist.c + +4 -0 trunk/audacious/playlist.h + +100 -0 trunk/audacious/playlist_pls.c + + 2006-08-11 01:49:44 +0000 William Pitcock revision [2020] - saving now uses PlaylistContainer class. diff -r 51c1bf500d3f -r 56536f498eb8 audacious/playlist.c --- a/audacious/playlist.c Thu Aug 10 19:03:21 2006 -0700 +++ b/audacious/playlist.c Thu Aug 10 19:04:17 2006 -0700 @@ -1287,28 +1287,6 @@ PLAYLIST_UNLOCK(); } -static void -playlist_save_pls(FILE * file) -{ - GList *node; - - g_return_if_fail(file != NULL); - - g_fprintf(file, "[playlist]\n"); - g_fprintf(file, "NumberOfEntries=%d\n", playlist_get_length()); - - PLAYLIST_LOCK(); - - for (node = playlist; node; node = g_list_next(node)) { - PlaylistEntry *entry = PLAYLIST_ENTRY(node->data); - - g_fprintf(file, "File%d=%s\n", g_list_position(playlist, node) + 1, - entry->filename); - } - - PLAYLIST_UNLOCK(); -} - gboolean playlist_save(const gchar * filename) { @@ -1324,6 +1302,9 @@ if ((plc = playlist_container_find(ext)) == NULL) return FALSE; + if (plc->plc_write == NULL) + return FALSE; + plc->plc_write(filename, 0); return TRUE;