changeset 359:2d13a1d0b7b6 trunk

[svn] - support Title[0-9,{1-4}] entries.
author nenolod
date Mon, 11 Dec 2006 01:13:09 -0800
parents bc3bae2880ec
children 5f1196c2c0d4
files ChangeLog src/pls/pls.c
diffstat 2 files changed, 31 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Dec 10 22:50:34 2006 -0800
+++ b/ChangeLog	Mon Dec 11 01:13:09 2006 -0800
@@ -1,3 +1,17 @@
+2006-12-11 06:50:34 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [784]
+  - add support for projectM
+  
+  trunk/configure.ac                 |   27 +-
+  trunk/mk/rules.mk.in               |    2 
+  trunk/src/projectm/Makefile        |   16 +
+  trunk/src/projectm/main.c          |  466 +++++++++++++++++++++++++++++++++++++
+  trunk/src/projectm/sdltoprojectM.h |  148 +++++++++++
+  trunk/src/projectm/video_init.c    |  198 +++++++++++++++
+  trunk/src/projectm/video_init.h    |    5 
+  7 files changed, 859 insertions(+), 3 deletions(-)
+
+
 2006-12-11 06:10:32 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [782]
   - fix for potential bug.
--- a/src/pls/pls.c	Sun Dec 10 22:50:34 2006 -0800
+++ b/src/pls/pls.c	Mon Dec 11 01:13:09 2006 -0800
@@ -42,8 +42,8 @@
 playlist_load_pls(const gchar * filename, gint pos)
 {
     guint i, count, added_count = 0;
-    gchar key[10];
-    gchar *line;
+    gchar line_key[10], title_key[10];
+    gchar *line, *title;
 
     g_return_if_fail(filename != NULL);
 
@@ -57,9 +57,21 @@
     g_free(line);
 
     for (i = 1; i <= count; i++) {
-        g_snprintf(key, sizeof(key), "File%d", i);
-        if ((line = read_ini_string(filename, "playlist", key))) {
-            playlist_load_ins_file(line, filename, pos, NULL, -1);
+        g_snprintf(line_key, sizeof(line_key), "File%d", i);
+        if ((line = read_ini_string(filename, "playlist", line_key)))
+	{
+	    if (cfg.read_pl_metadata)
+	    {
+		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);
+		else
+		    playlist_load_ins_file(line, filename, pos, NULL, -1);
+	    }
+	    else
+		playlist_load_ins_file(line, filename, pos, NULL -1);
+
             added_count++;
 
             if (pos >= 0)