XBMC uses randomandlastitems script to display random or last items added,
for details take a look here
[login to view URL]
I need to optimize this python-based script for several reasons :
- I have a huge collection of movies and It's way too slow for my library
- The script scans for watched/unwatched movie property, and it's no't needed for my case
I'm using Ace skin which displays 12 customizable movie widgets in the main menu,
the widgets are based on this script and can be switched between random and recently added
See here for details
[login to view URL]
.
For my case, i only use the following smartplaylist fields (and their combinations) in Ace : path, genre, ratiings.
([login to view URL])
e.g 12 Recently added movies in West Movie folder
12 random Asian movies with rating >6
12 last added comedy movies
12 Action movies with >6 ratings
So everything else in the script should be removed to optimize the script's speed.
The author (mikebzh44) said this can be optimized by adding limits to JSON queries,
a method implemented in skin widgets script
[login to view URL]
The result of this project is the optimized randomandlastitems script,
with acceptable processing times
and contains ONLY the code needed for my specifications.
I strongly suggest to attempt this only if you are familiar with XBMC .
thanks