Jump to content

Hacking search results UI


jasonb1

Recommended Posts

jasonb1

While waiting for possible future search UI improvements, I wanted to try a bit of hacking to remove the results limit.

I've done the limit removal in searchresults.js and it works in TV mode with the results scrolling "forever" horizontally.

In Desktop mode, there is a limit of 50 displayed cards but the server is likely returning all results and just dropping any past 50 in the UI.

Questions:

1. Is there a place where I can force  the TV mode to have the same search UI layout as Desktop mode (NxM grid instead of 1xN rows for each category)?

2. Where is the place in the code that stops building cards after 50 results when in Desktop mode? (I can't find a "50" directly hardcoded anywhere that might be the cause of this).

Thanks.

P.S. Is there a way to get browsers to re-download the .css files without cache clearing (normal force refresh [Ctrl+F5] doesn't seem to work)?

 - Jason

Link to comment
Share on other sites

Happy2Play

Have a look at the emby-itemscontainer.js.

 

Link to comment
Share on other sites

jasonb1

Ah, the emby-itemscontainer.js is where the 50 comes from (I don't know how I missed that while doing searches in the code for it). It's apparently the virtual chunk size. Now, to figure out why it doesn't "get more chunks" in the search results vs. a regular list. I guess it's maybe differences in search.html vs list.html? I'll play around trying to figure that out unless someone has another hint. 🙂

Link to comment
Share on other sites

chef
3 minutes ago, jasonb1 said:

Ah, the emby-itemscontainer.js is where the 50 comes from (I don't know how I missed that while doing searches in the code for it). It's apparently the virtual chunk size. Now, to figure out why it doesn't "get more chunks" in the search results vs. a regular list. I guess it's maybe differences in search.html vs list.html? I'll play around trying to figure that out unless someone has another hint. 🙂

You could check the data requests. 

Look for params in the url like "&StartIndex=", or "&Limit="...

Dunno might be something 😃

Link to comment
Share on other sites

visproduction

emby-itemscontainer.js - this might be where the limit 50 is declared:
 

function getVirtualChunkSize(elem,listOptions){var size=elem.virtualChunkSize;if(size)return size;!listOptions&&elem.getListOptions&&(listOptions=elem.getListOptions([]));var layout=listOptions?listOptions.virtualScrollLayout:elem.getAttribute("data-virtualscrolllayout");if(layout){if(layout.includes("horizontal"))return 12;var renderer=listOptions?listOptions.renderer:null;return renderer&&renderer!==cardBuilder?30:50}return null}

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...