Mercurial > audlegacy-plugins
diff src/pls/pls.c @ 361:f201074bf69a trunk
[svn] - update playlist code. M3U was simple and did not require anything special.
| author | nenolod |
|---|---|
| date | Mon, 11 Dec 2006 05:13:54 -0800 |
| parents | 5f1196c2c0d4 |
| children | a91923634161 |
line wrap: on
line diff
--- a/src/pls/pls.c Mon Dec 11 02:55:54 2006 -0800 +++ b/src/pls/pls.c Mon Dec 11 05:13:54 2006 -0800 @@ -44,6 +44,7 @@ guint i, count, added_count = 0; gchar line_key[10], title_key[10]; gchar *line, *title; + Playlist *playlist = playlist_get_active(); g_return_if_fail(filename != NULL); @@ -65,12 +66,12 @@ g_snprintf(title_key, sizeof(title_key), "Title%d", i); if ((title = read_ini_string(filename, "playlist", title_key))) - playlist_load_ins_file(line, filename, pos, title, -1); + playlist_load_ins_file(playlist, line, filename, pos, title, -1); else - playlist_load_ins_file(line, filename, pos, NULL, -1); + playlist_load_ins_file(playlist, line, filename, pos, NULL, -1); } else - playlist_load_ins_file(line, filename, pos, NULL, -1); + playlist_load_ins_file(playlist, line, filename, pos, NULL, -1); added_count++; @@ -91,7 +92,7 @@ g_return_if_fail(file != NULL); vfs_fprintf(file, "[playlist]\n"); - vfs_fprintf(file, "NumberOfEntries=%d\n", playlist_get_length()); + vfs_fprintf(file, "NumberOfEntries=%d\n", playlist_get_length(playlist_get_active())); PLAYLIST_LOCK();
