changeset 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 f7a8c1280ef6
files ChangeLog src/pls/pls.c src/xspf/xspf.c
diffstat 3 files changed, 15 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Dec 11 02:55:54 2006 -0800
+++ b/ChangeLog	Mon Dec 11 05:13:54 2006 -0800
@@ -1,3 +1,11 @@
+2006-12-11 10:55:54 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [788]
+  - build fix.
+  
+  trunk/src/pls/pls.c |    4 ++--
+  1 file changed, 2 insertions(+), 2 deletions(-)
+
+
 2006-12-11 09:13:09 +0000  William Pitcock <nenolod@nenolod.net>
   revision [786]
   - support Title[0-9,{1-4}] entries.
--- 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();
 
--- a/src/xspf/xspf.c	Mon Dec 11 02:55:54 2006 -0800
+++ b/src/xspf/xspf.c	Mon Dec 11 05:13:54 2006 -0800
@@ -56,6 +56,7 @@
 	xmlNode *nptr;
 	TitleInput *tuple;
 	gchar *location = NULL, *b64filename = NULL, *locale_uri = NULL;
+	Playlist *playlist = playlist_get_active();
 
 	tuple = bmp_title_input_new();
 
@@ -162,7 +163,7 @@
 		tuple->file_path = g_path_get_dirname(locale_uri);
 		tuple->file_ext = g_strdup(strrchr(locale_uri, '.'));
 		// add file to playlist
-		playlist_load_ins_file_tuple(locale_uri, filename, pos, tuple);
+		playlist_load_ins_file_tuple(playlist, locale_uri, filename, pos, tuple);
 		pos++;
 	}