$OpenBSD: patch-src_plugin_list_cpp,v 1.3 2010/07/08 06:35:13 dcoppa Exp $

fixes from upstream svn:
give each item in the RAM playlist a unique id
mark asx files with ENTRY in them as non-playable

--- src/plugin_list.cpp.orig	Tue Feb 23 17:12:37 2010
+++ src/plugin_list.cpp	Tue Mar 23 17:14:09 2010
@@ -215,6 +215,7 @@ void list_dump(GList * list)
                 printf("id = %i\n", item->id);
                 printf("hrefid = %i\n", item->hrefid);
                 printf("play = %i\n", item->play);
+                printf("played = %i\n", item->played);
                 printf("path = %s\n", item->path);
                 printf("controlid = %i\n", item->controlid);
                 printf("playerready = %i\n", item->playerready);
@@ -603,6 +604,7 @@ asx_start_element(GMarkupParseContext * context,
         }
     }
     if (g_ascii_strcasecmp(element_name, "ENTRY") == 0) {
+        parser_item->play = 0;
         entry_id = entry_id + 100;
     }
 }
@@ -713,7 +715,7 @@ GList *list_parse_ram(GList * list, ListItem * item)
     if (item->localsize < (16 * 1024)) {
         if (g_file_get_contents(item->local, &data, &datalen, NULL)) {
             if (data != NULL) {
-                output = g_strsplit(data, "\n", 0);
+                output = g_strsplit_set(data, "\n\r", 0);
                 parser_list = list;
                 parser_item = item;
                 i = 0;
@@ -755,7 +757,7 @@ GList *list_parse_ram(GList * list, ListItem * item)
                                 newitem->src[3] = g_ascii_tolower(newitem->src[3]);
                             }
                             newitem->play = TRUE;
-                            newitem->id = entry_id;
+                            newitem->id = ++entry_id;
                             newitem->controlid = parser_item->controlid;
                             g_strlcpy(newitem->path, parser_item->path, 1024);
                             parser_list = g_list_append(parser_list, newitem);
