Re: Retrieve entire favorites hierarchy without recursion

philchillbill <philchillbill.a7rmwn-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]>
Newsgroups gmane.music.equipment.slimdevices.devel
Organization Logitech Squeezebox Forums
Message-ID <[email protected]>
mherger wrote: 
> > The thing is, the search variant ["favorites", "items", 0, 300,
> > "search:radio", "want_url: 1"] returns all matches regardless of
> level
> > but it won't take a wildcard for the search, nor will it take a
> regexp.
> 
> Checkout 
> https://github.com/Logitech/slimserver/blob/fe81659879fef1a51537fb579b8e57b6a7b987d9/Slim/Plugin/Favorites/Plugin.pm#L763
> 
> - it's where the recursive search is implemented.
> 
> As you'll see it's using the \Q...\E delimiters in the search expression
> 
> to explicitly disable use of user provided regexes. The problem is that
> 
> not doing so might accidentally break the search if somebody 
> accidentally used a character which might be interpreted as a regex.

So I was looking in the wrong file entirely :o 

Of course a /Q /E will destroy a regex. I stripped them from the perl
for an experiment and indeed a regex-search then works. One thing I
noticed is that using 'search' (either with or without the QuoteMeta)
will not return any of the items in On mysqueezebox.com whereas they do
show up if their item_id is specified. Is that expected behaviour?


------------------------------------------------------------------------
philchillbill's Profile: http://forums.slimdevices.com/member.php?userid=68920
View this thread: http://forums.slimdevices.com/showthread.php?t=115122
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.