FAQ  •  Register  •  Login

[Solved] Mediabrowser search limit setting at 12?

<<

kittmaster

DLNA master

Posts: 194

Joined: Mon Aug 21, 2017 4:34 am

Post Sun Aug 27, 2017 4:17 pm

[Solved] Mediabrowser search limit setting at 12?

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.
Last edited by kittmaster on Mon Aug 28, 2017 1:49 pm, edited 1 time in total.
<<

kittmaster

DLNA master

Posts: 194

Joined: Mon Aug 21, 2017 4:34 am

Post Mon Aug 28, 2017 4:43 am

Re: Mediabrowser search limit setting at 12?

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
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Aug 28, 2017 7:31 am

Re: Mediabrowser search limit setting at 12?

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.
<<

kittmaster

DLNA master

Posts: 194

Joined: Mon Aug 21, 2017 4:34 am

Post Mon Aug 28, 2017 11:09 am

Re: Mediabrowser search limit setting at 12?

I'm just curious, why would something like that be hard coded down? Is it a free vs pro thing?

Thank you.
<<

kittmaster

DLNA master

Posts: 194

Joined: Mon Aug 21, 2017 4:34 am

Post Mon Aug 28, 2017 1:49 pm

Re: Mediabrowser search limit setting at 12?

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
<<

mikeww1

Serviio newbie

Posts: 7

Joined: Thu Jul 16, 2015 5:43 am

Post Mon Sep 18, 2017 2:36 pm

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

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 ?
<<

actionsoft

User avatar

Serviio newbie

Posts: 18

Joined: Mon Jul 28, 2014 2:19 pm

Post Thu Sep 21, 2017 12:56 pm

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

Excelent job! Thank You! :P I wish this can be added as a configurable parameter in future versions!! Totally useful!!! :!:
<<

kittmaster

DLNA master

Posts: 194

Joined: Mon Aug 21, 2017 4:34 am

Post Sun Oct 08, 2017 12:31 am

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

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.

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 27 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.