Page 1 of 1

[Solved] Mediabrowser search limit setting at 12?

PostPosted: Sun Aug 27, 2017 4:17 pm
by kittmaster
Is there a way to increase the value for the number of returns the search brings back?

An example, I have 45 L.L. Cool J music videos in random folders, when I search for the term L.L. Cool J, I get 12 returns showing the different folders that they exist in, the search is not returning the 45 I actually have across the given folders.

But if I look at the folders, they are indexed and I can see them all against explorer where the counts do line up and are indexed.

It just seems the search return is locked to 12, I want to increase that number, how do I do it?

Thank you.

Re: Mediabrowser search limit setting at 12?

PostPosted: Mon Aug 28, 2017 4:43 am
by kittmaster
I've looked high and low inside the \lib .jar files (extracted) and I can't find any reference except "MAX_VALUE" which is used in several areas of the .class files. I've looked through the .js files too, not sure if I missed something there after I unminified them. I am looking to move it from 12 to like 60 or something like that so I can get the most results if not all the results when I search for something.

Anyone have any thoughts at all where I can look to fix this?

Thanks,
Chris

Re: Mediabrowser search limit setting at 12?

PostPosted: Mon Aug 28, 2017 7:31 am
by zip
yes, it's hardcoded in MediaBrowser. The code is scrambled so it'll be hard for you to find, but it's inside the mediabrowser.jar somewhere.

Re: Mediabrowser search limit setting at 12?

PostPosted: Mon Aug 28, 2017 11:09 am
by kittmaster
I'm just curious, why would something like that be hard coded down? Is it a free vs pro thing?

Thank you.

Re: Mediabrowser search limit setting at 12?

PostPosted: Mon Aug 28, 2017 1:49 pm
by kittmaster
Finally got this sorted, for those that want more than 12 results when searching a term and there are more than 12 possible hits:

Original code is:
  Code:
search:function(e,f){var g=a.secureUrl("/cds/search/"+c.profile()+"/"+b.lowercase(f)+"/"+e+"/0/12");


New code is:
  Code:
search:function(e,f){var g=a.secureUrl("/cds/search/"+c.profile()+"/"+b.lowercase(f)+"/"+e+"/0/5000");


This is found in the javascript file MediaBrowser-1.9.0-9.js that is compressed in the serviio-mediabrowser-web.jar file in \program files or \program files(x86)

This will return up to 5000 results instead of just 12, I have no idea of the ramifications on the system actually having the ability to return 5000 results without crashing, but this is what I am using for my setup based on my needs.....it will undergo testing and I'll update this thread if I ever see an issue. Thus far it has been able to return all 45 of my results without issue.

Hope this helps save someone some time.

Greetz

Re: [Solved] Mediabrowser search limit setting at 12?

PostPosted: Mon Sep 18, 2017 2:36 pm
by mikeww1
I would like to thank you very much for this helpful hint !
I never understood why mediabrowser did not find all related stuff. This was very annoying.
With your simple patch the mediabrowser search function does finally work for me !!!!!! :D

Now the only thing I would like to have is a possibility to sort the search results after date.
At the moment the results are alphabetic. Is there a way to change that ?

Re: [Solved] Mediabrowser search limit setting at 12?

PostPosted: Thu Sep 21, 2017 12:56 pm
by actionsoft
Excelent job! Thank You! :P I wish this can be added as a configurable parameter in future versions!! Totally useful!!! :!:

Re: [Solved] Mediabrowser search limit setting at 12?

PostPosted: Sun Oct 08, 2017 12:31 am
by kittmaster
mikeww1 wrote:I would like to thank you very much for this helpful hint !
I never understood why mediabrowser did not find all related stuff. This was very annoying.
With your simple patch the mediabrowser search function does finally work for me !!!!!! :D

Now the only thing I would like to have is a possibility to sort the search results after date.
At the moment the results are alphabetic. Is there a way to change that ?


I'm not sure, but I'll take a quick look, I assume there has to be something what field set to sort by. I would assume it can be done if it's reading the metadata correctly, but unsure if it will be an numeric or logical sort. If I find something I'll report back.