PDA

View Full Version : Odd behavior using [Gac]:GoSearch([search])



emmee
March 12th, 2006, 03:34 PM
I'm using the following action in a button definition in my CCF that's based on the default NR CCF in NR 1.1.0.44. I'm running J River's MC with MediaBridge.


mygacl:GoSearch(NetRemote.GetVariable('MP.Artist') );

The search is working but the results include all instances of all words in the 'MP.Artist'" variable. For example if 'MP.Artist' == "David Byrne" the resuts include all atrists containing "david". If I use the search page in the default CCF I get the reults I'm after - that is, the search string is treated as a phrase and only exact matches result. (search results contain only tracks containing "david byrne".)

The interesting thing is that when using the search page of the CCF, if I enclose the search string in double quotes (i.e. "David Byrne") the search returns all artists containong "david". Just the opposite of what one might expect.

Searching in MC gives the same results with and without quotes and only returns exact matches of "david byrne" so MC is doing the right thing.

How can I use the GoSearch request to get the exact phrase matches I'm looking for?

Ben S
March 12th, 2006, 04:25 PM
This sounds like a bug. I'll take a deeper look.

emmee
April 4th, 2006, 07:08 PM
Any news on this issue?

Ben S
April 5th, 2006, 03:52 PM
Continuing to look, but did notice that ...


david and byrne

Works.

Ben S
April 5th, 2006, 04:11 PM
Okay, found the problem.

Fixed by this lua file (Drop in your lua directory).

Updated to include Play of search results fix too

emmee
April 5th, 2006, 04:49 PM
Thanks Ben, but it doesn't wotk for me. Im getting the following error when trying to use GoSearch:

The error also shows up when I click a button with the following lua action:

mygacl:GoScheme(NetRemote.GetVariable('MP.AlbumsRo ot'))

Ben S
April 5th, 2006, 05:07 PM
Ah, this includes other changes made for NR 2.0.

Okay, to make the same fixes in the NR 1.1 lua file,

Change this line:



varname = 'MP.'..self.var..'.Items['..param..'].Filename';


to



varname = 'MP.'..self.var..'.Items['..index..'].Filename';


to fix the search play bug.

and change this block:


msg = 'GAC+ "'..self.scheme..'" "'..self.fields..'" "ItemImageSize='..self.imageSize..',IncludeSubCount ='..self.includeSubItemCount..',ItemMax='..self.co unt..',ItemStart='..self.start..',VarPrefix='..sel f.var..',GroupByAlbum='..self.GroupByAlbum..'"';
if (self.startLetter) then
msg = msg .. ',ItemStartLetter='..self.startLetter;
self.startLetter = nil;
end;
if (self.search) then
msg = msg .. ',Search='..self.search;
end;


to this



msg = 'GAC+ "'..self.scheme..'" "'..self.fields..'" "ItemImageSize='..self.imageSize..',IncludeSubCount ='..self.includeSubItemCount..',ItemMax='..self.co unt..',ItemStart='..self.start..',VarPrefix='..sel f.var..',GroupByAlbum='..self.GroupByAlbum;
if (self.startLetter) then
msg = msg .. ',ItemStartLetter='..self.startLetter;
self.startLetter = nil;
end;
if (self.search) then
msg = msg .. ',Search='..self.search;
end;
msg = msg .. '"';

emmee
April 5th, 2006, 06:50 PM
Sorry, Ben,

My GAC.lua doesn't have these lines of code in it. Here's my file:

I'm on version 1.1.0.44 and the file is dated 8/1/2005.


EDIT:
I re-instralled NR and the GAC.lua file (dated8/27/05) has the lines you've quoted. I'll try your suggested changes and report back.

There is one difference though. My file has this line:

"ItemImageSize='..self.imageSize..',IncludeSubCount ='..self.includeSubItemCount..',ItemMax='..self.co unt..',ItemStart='..self.start..',VarPrefix='..sel f.var..'"';

compared to your quote:

"ItemImageSize='..self.imageSize..',IncludeSubCount ='..self.includeSubItemCount..',ItemMax='..self.co unt..',ItemStart='..self.start..',VarPrefix='..sel f.var..',GroupByAlbum='..self.GroupByAlbum..'"';

Ben S
April 6th, 2006, 06:39 PM
GroupByAlbum is new (to 2.0), so you should be good.

Please let me know if all is well.

emmee
April 7th, 2006, 09:39 PM
Ben,

I've had a chance to try this again with limited success. One thing I noticed is that I was using MB 2.1.0.35 instead of 2.1.0.36, so I changed to .36 for this testing.

Search results play just fine now, so thanks for that fix!

Unfortunately the problem with search results described at the beginning of this thread still exists. You mentioned that searching on "david and byrne" works, but I get the same results with and without the and. Also, searcing on "david byrne" and "david sanborn" gives the exact same results.

I've also found the following strange behaviors:

1) When the Albums scheme is displayed, JumpToLetter takes you to the beginning of the list for all letter choices.
2) When the Artist/Album scheme is displayed, JumpToLetter only works for letters A-D. For all letters E thru Z, the jump goes near the end of the D's.
3) Jumps work OK in the Genres scheme.

I found that changing to this line:

varname = 'MP.'..self.var..'.Items['..index..'].Filename';
fixed the playing problem, but the other change had no impact.


Any more ideas?

Ben S
April 8th, 2006, 03:59 AM
The Jump To Letter problem is because you have tracks that start which strange characters which it can't jump past. Let me look into it, as perhaps I should be ignoring characters that aren't A-Z.

Can you post the complete lua file here again?

emmee
April 9th, 2006, 03:46 PM
Ben,

I think you're half right about the jump issue. My Album scheme has square bracket characters in one album name, which sorts to the top of the list.

My Artist/Album scheme that seems to get stuck does not have any odd characters in the D-E area where jump is not working. I'm attaching a screen capture of this list as well as my GAC.lua file.

Thanks for your help....

maxthebuilder
May 8th, 2008, 08:24 PM
bump..

I have a lot of titles with "strange" characters (non-English) - Jump to Letter does not work for me...

Is there any chance to fix this? Any workaround?

Thanks!


The Jump To Letter problem is because you have tracks that start which strange characters which it can't jump past. Let me look into it, as perhaps I should be ignoring characters that aren't A-Z.

Can you post the complete lua file here again?