XBMC Community Forum
[RELEASE] Random and last items smartplaylist script for Skins - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Skin Development (/forumdisplay.php?fid=12)
+--- Thread: [RELEASE] Random and last items smartplaylist script for Skins (/showthread.php?tid=122448)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46


- MarcosQui - 2012-03-02 15:36

I found a bug, how to reproduce:

- Create two playlists, one with 1 or 2 movies, another with several movies.
- Add a playlist with several movies in the Menu. Go to Home and see the corresponding list, all right.
- Return the settings and add the small playlist in the same menu. Go to Home and see the corresponding list, the old items listed are still there, under this current list.

The only way the list be updated is closing and opening the skin.

I believe it affects all skins.


- mikebzh44 - 2012-03-02 15:40

Oups ! I have put the cleaning properties in comment.

You can edit the script and remove # before :

#_clearProperties()


- mikebzh44 - 2012-03-02 15:45

Version 1.1.4 released

v1.1.4
- [Fix] Properties were not cleaned between two call


- MarcosQui - 2012-03-02 16:35

I appreciate your attention but unfortunately the problem remains.


- mikebzh44 - 2012-03-02 16:38

Sorry. The ZIP uploaded was incorrect.

Now, every thing is fixed.


Some performace issues - sdaconceicao - 2012-03-02 16:56

I'm using the current version of the script in the Fusion Migma skin, and I've noticed 2 things with it.
On my 10/15 series playlists, it takes about 45s-1 minute to run, which isn't that bad. On my 220 series 5500 episode playlist, it takes 45 minutes. I'm using a MySQL db if that makes any difference.

I've also noticed that if the script is run, pretty much any addon(video or program) takes between 1-5 minutes to initialize. Without it enabled, they take 2-5 seconds. The worst in my experience are Advanced Launcher and The Trailers.


- Martijn - 2012-03-02 17:10

sdaconceicao Wrote:I'm using the current version of the script in the Fusion Migma skin, and I've noticed 2 things with it.
On my 10/15 series playlists, it takes about 45s-1 minute to run, which isn't that bad. On my 220 series 5500 episode playlist, it takes 45 minutes. I'm using a MySQL db if that makes any difference.

I've also noticed that if the script is run, pretty much any addon(video or program) takes between 1-5 minutes to initialize. Without it enabled, they take 2-5 seconds. The worst in my experience are Advanced Launcher and The Trailers.

So what do you expect when running several addons at a time?

Especialy when using mysql, large library and probably a slow HTPC. Don't think that anything can be done about that


- mikebzh44 - 2012-03-02 17:11

You have a huge collection of th-shows and episodes !!!

To get "Recently added" episodes, the script have to :
-make a JSON request on the database (maybe MySQL is not the same as SQLite)
- get all your episodes (5500 !!)
- sort episodes by ID
- return properties

I don't know if I can make things better Confused


- mikebzh44 - 2012-03-02 17:16

Here is a video of my HTPC (Atom N330) with Glass skin.

http://www.youtube.com/watch?v=9tgAQYMYos0&feature=youtu.be

My script is called 4 times in parallel and evertthing is OK within a minut Frown.


- MarcosQui - 2012-03-02 17:27

mikebzh44 Wrote:Sorry. The ZIP uploaded was incorrect.

Now, every thing is fixed.

Thanks, it works fine now.


- Martijn - 2012-03-02 17:51

mikebzh44 Wrote:Here is a video of my HTPC (Atom N330) with Glass skin.

My script is called 4 times in parallel and evertthing is OK within a minut Frown.

Maybe using the commoncache module can speed some things up. Like keeping cached data of the json request for an hour or longer


- sdaconceicao - 2012-03-02 18:46

Martijn Wrote:So what do you expect when running several addons at a time?

Especialy when using mysql, large library and probably a slow HTPC. Don't think that anything can be done about that
I'm not sure what your attitude is for, I'm just commenting on a performance issue I ran into. To give an idea on my machine, it's a Pentium Dual Core, 8 GB ram, and 1 GB GPU, so it's not a Tandy as you're suggesting.

The normal recently added scripts for tv shows takes about 10 seconds to run, so I don't think it's unreasonable to say 45 minutes for less episodes would seem out of the ordinary and worth looking into.

I like the idea of the scripts, and I'm not making demands. I'm just mentioning a pretty significant performance issue. Feel free to ignore it.


- fmronan - 2012-03-02 18:59

the normal recently script read just the last 10 movie, but with playlist it must read all the database


- Projectzero - 2012-03-06 03:30

Is there a way to have the script run after certain events e.g. on xbmc startup and after a completed library update? Currently everytime you go to the main window it will run the script. This isn't terrible if you only call the script once and are hardwired to your network but more than a few calls and wireless it gets painfully slow with a large library. I completely understand that the script scans through the entire library which will lead to slowdowns but maybe this could help alleviate some of the issues?


- mikebzh44 - 2012-03-06 10:38

Martijn Wrote:Maybe using the commoncache module can speed some things up. Like keeping cached data of the json request for an hour or longer

I will have a closer look to commoncache but if you have set up parameters for display only unwatched movies for example, each time the script is called, I have to scan all the playlist/library to seach for unwatched movies. And what's happen when you add a new source to your library ?

Projectzero Wrote:Is there a way to have the script run after certain events e.g. on xbmc startup and after a completed library update? Currently everytime you go to the main window it will run the script. This isn't terrible if you only call the script once and are hardwired to your network but more than a few calls and wireless it gets painfully slow with a large library. I completely understand that the script scans through the entire library which will lead to slowdowns but maybe this could help alleviate some of the issues?

Maybe there is a JSON method to known if database has been updated, I will ask to the specific thread.