First: WARNING the function 

Error MusicCatalog::AddSong(const char *url)

says "delete meta;" inside and after the look... twice...segfault

STRONG SUGGESTION : after a call to delete set the pointer to NULL.
Only exception is if it is manifestly obvious from looking at the
screen that it cannot possibly screw up.  (like a two line function).

Setting meta=NULL after a delete prevents this problem here.

I am hacking other things too much to sumbit a patch yet.

On Tue, Sep 26, 2000 at 06:38:07PM -0500, David A. Walker wrote:
> I couldn't help but notice that there is not much support for searching a
> playlist. I've seen the proposals for regexp-based searching and having a
> dialog of search results, but that method does not work well for the
> text-based interfaces. I was wondering if it would be appropriate to add a
> simple FindSong method to the PlaylistManager that would find the next
> song whose name (URL) contained the search string. If so, when is it
> necessary to acquire the mutex? Looking through the PlaylistManager source
> has not made it clear exactly which operations need to be guaranteed
> thread-safe.
> 
> -- 
> =D ave
> 

Each interface could do whatever it wanted.

Adding FindSong?  Do it like this:

One method : StartSearch fills a pointer to a vector of search results
(As pointers).  The user can then iterator over the container.  That
way several search result sets can be returned.

Or something.

Feature request: easily toggle case sensitivity and ability to use
some kind of wildcard (? and * or full regexp) matching.
_______________________________________________
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev

Reply via email to