skin option/function xbmc.ActivateWindow(Videos,<title query>)
#1
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
Reply
#2
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
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#3
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.
Reply
#4
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.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#5
contains " a" or startswith "a" (two separate rules) would do the trick for first word.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
skin option/function xbmc.ActivateWindow(Videos,<title query>)0