diff playtreeparser.c @ 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 64d82a45a05d
children 36a474903e8a
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");