searching through playlist

I notice that searching through a playlist using '/' only lets you search all the songs that are below the current playing song. If I hit 'home' to return to the first song, then hit '/' again, i can search through all the songs. Is this intended behavior or what? I'd like to be able to search the playlist anywhere :)

I can't see that.

You say about songs that are below the currently _played_ song and the behaviour can be fixed by pressing the home key, but doing so will not play the first song, are you sure that the search is limited to the files below the played file?

--
Damian Pietras - MOC developer

Yes. I have tested this many times. My playlist is unusually large though, it contains about 5000+ entries, which could be the cause. If you get online sometime, I can attach you to a screen on my machine so that you can see this for yourself.

I've made a playlist with 2000+ entries and can see it now. I'll try to fix when I have some more time.

--
Damian Pietras - MOC developer

Still no time? :(

I was trying to let it seach like 'jump to file' in winamp (search for each word in the pattern), and I hope that it solves that problem too. Here is the diff file:

<br /> $ diff menu.c original/menu.c<br /> 66a67,97<br /> &gt; /*<br /> &gt; * Checks whether each token in needle (separated by a space)<br /> &gt; * is a substring of haystack.<br /> &gt; */<br /> &gt; static int entry_matches(const char *haystack, const char *needle)<br /> &gt; {<br /> &gt; char* needle_cpy = strdup(needle);<br /> &gt; char *start = needle_cpy, *end = needle_cpy;<br /> &gt; int not_found = 0;<br /> &gt;<br /> &gt; while (! not_found) {<br /> &gt;<br /> &gt; // end goes to the next space<br /> &gt; while (*end &amp;&amp; *end != ' ')<br /> &gt; end++;<br /> &gt;<br /> &gt; if (*end == ' ') {<br /> &gt; *end = '\0';<br /> &gt; not_found = strcasestr(haystack, start) == NULL;<br /> &gt; *end = ' ';<br /> &gt; start = end = end+1;<br /> &gt; } else {<br /> &gt; not_found = strcasestr(haystack, start) == NULL;<br /> &gt; break;<br /> &gt; }<br /> &gt; }<br /> &gt; free(needle_cpy);<br /> &gt; return ! not_found;<br /> &gt; }<br /> &gt;<br /> &gt;<br /> 552,553c583,584<br /> &lt; for (mi = menu-&gt;top; mi; mi = mi-&gt;next)<br /> &lt; if (strcasestr(mi-&gt;title, pattern))<br /> ---<br /> &gt; for (mi = menu-&gt;items; mi; mi = mi-&gt;next)<br /> &gt; if (entry_matches(mi-&gt;title, pattern))<br />

I changed menu->top to menu->items. I didn't get any performance problem with 1000 songs.

Yes, this is the problem, thanks!

ftp://ftp.daper.net/pub/soft/moc/patches/search-2.4.0.patch

--
Damian Pietras - MOC developer