changeset 20834:e00250fc2b51

Skip empty lines in front of winamp playlist. Fixes http://www.radioseven.se/radioseven.pls
author rtogni
date Fri, 10 Nov 2006 20:35:54 +0000
parents 2e2b3abb2dad
children 60e80b52abdd
files playtreeparser.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/playtreeparser.c	Fri Nov 10 20:06:43 2006 +0000
+++ b/playtreeparser.c	Fri Nov 10 20:35:54 2006 +0000
@@ -251,9 +251,13 @@
   play_tree_t *list = NULL, *entry = NULL, *last_entry = NULL;
 
   mp_msg(MSGT_PLAYTREE,MSGL_V,"Trying Winamp playlist...\n");
-  if (!(line = play_tree_parser_get_line(p)))
+  while((line = play_tree_parser_get_line(p))) {
+    strstrip(line);
+    if(strlen(line))
+      break;
+  }
+  if (!line)
     return NULL;
-  strstrip(line);
   if(strcasecmp(line,"[playlist]"))
     return NULL;
   mp_msg(MSGT_PLAYTREE,MSGL_V,"Detected Winamp playlist format\n");