Mission accomplished!
I've got everything working pretty much as intended.
You can download the MediaStream hack
here.
Just unzip the file to your XBMC directory and it will add Latest Movies & Latest TV panels to mediastream.
Don't forget... you will have to activate them from the skin settings to see anything!
Items of note...
- I've modified the script a bit to do a couple of extra things.
- Firstly it only grabs unwatched files as the default.
- Secondly it groups TV episodes by series (some tricky SQL was needed to get this working properly - it will break on the rare condition that 2 episodes have the same air date and they are episodes 9 and 10).
- Thirdly it clears the filenames for the first four TV & movie entries. Why? Well I use the filenames to determine the visibility of list items and if you watch a movie and your number of new items drops below four you need to flush the old data otherwise the menu still contains the old info on refreshing.
Nuka, you might want to take a look at this as my code is pretty hacky (I've never used Python or SQL before).
- I got the auto-refresh working by adding a button like Jezz_X suggested. You also have to alter the window's <defaultcontrol> to get it to focus on the new button as the default. Also, only buttons can have the <onfocus> tag applied to them.
- Some pictures just don't work. It's most strange and I can't work out why as there doesn't seem to be any pattern. I've added a static image as a default for when this happens so it still looks OK. If anyone can work out why this is happening that would be great.
Anyway, I've had a lot of fun getting this to work - thanks for all your awesome help! Let me know if you enjoy the mod (or spot any problems...)