Bug? .pls loads only 9 entries

When loading .pls playlist, having more than 9 entries, mocp displays only first nine.
Debian etch, moc 2.4.1 Build: Oct 21 2006 22:43:12

AFAIK this has been fixed in 2.5.0-alpha1.

For my personal use I made a shell-script as a workaround for 2.4.1 that worked for me (tm).
Tested with lists up to ~1500 entries...

If you are interested :
http://www.tzi.de/~hiben/moc/mocplaypls

Yes, it's fixed in 2.5.0-alpha1. Here is the patch if anybody is interested:

<br /> Index: playlist_file.c<br /> ===================================================================<br /> --- playlist_file.c (revision 1951)<br /> +++ playlist_file.c (revision 1952)<br /> @@ -30,6 +30,8 @@<br /> #include "interface.h"<br /> #include "decoder.h"</p> <p>+#define MAX(a,b) ((a) > (b) ? (a) : (b))<br /> +<br /> int is_plist_file (const char *name)<br /> {<br /> const char *ext = ext_pos (name);<br /> @@ -199,12 +201,15 @@<br /> char *line = NULL;<br /> int in_section = 0;<br /> char *value = NULL;<br /> + int key_len;</p> <p> if (fseek(file, 0, SEEK_SET)) {<br /> error ("File fseek() error: %s", strerror(errno));<br /> return NULL;<br /> }</p> <p>+ key_len = strlen (key);<br /> +<br /> while ((line = read_line(file))) {<br /> if (line[0] == '[') {<br /> if (in_section) {<br /> @@ -248,7 +253,8 @@<br /> break;<br /> }</p> <p>- if (!strncasecmp(line, key, t2 - line + 1)) {<br /> + if (!strncasecmp(line, key,<br /> + MAX(t2 - line + 1, key_len))) {<br /> value = t + 1;</p> <p> while (isblank(value[0]))</p> <p>

--
Damian Pietras - MOC developer