Kodi Community Forum

Full Version: skin option/function xbmc.ActivateWindow(Videos,<title query>)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello All,

I have a fair size (1000+) movie library that takes ages to load (especially on the weak-er devices such as ATV2)
And I'm looking for ways to reduce amount of movie entries loaded when browsing the movie library

I would like to modify a skin so that once an option (ex: "Movies") is selected, it first presents buttons from A to Z
with each button only listing movies, videos (or music ) that starts with that letter.

ex: pressing "B" would list:
- A Beautiful Mind
- A Dogs Breakfast
- Adjustment Bureau
etc...

Ideally this would be accomplished in a skin by coding a button with :
"xbmc.ActivateWindow(Videos,<some SQL like query>)"

but that would be too easy wouldn't it Wink

Anyone has any ideas on how to accomplish this without setting up a smart playlist for every single letter for every single media type ?

Thanks a lot.
Damian
Direct sql queries are out of the question.

But there is a way:
In nightlies You can use Custom video nodes (wiki) and create nodes for each letter with such rule: (replacing 'a' for each letter)
Code:
<rule field="title" operator="startswith">a</rule>

This would just check first letter of title (not first letter of each word), but if you are determined, know c++ and sql a little you could try to add rule to xbmc that would check start of each word
Thanks very much for the pointer and a peak to what's coming. Smile
I will start with the rule you provided and if/when/once that works start looking at adding my own.
Hey pieh,

Is there any way to have a skin come with pre-made nodes? Like the A-Z suggested here.
Besides making python copy them to /userdata/Database/video/movies/ on install?
A nodes folder in the skin might not be such a bad idea.
contains " a" or startswith "a" (two separate rules) would do the trick for first word.