Kodi Community Forum

Full Version: [RELEASE] Random and last items smartplaylist script for Skins
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Yes great workNod
Modded Confluence can handle this, too...
Currently predefined for documentary, but custom entry will follow tomorrow...

Cheers,
mad-max
mikebzh44 Wrote:Shaktoo, are you a skinner and do you want to add my script to your skin ?
Only In My Dreams !!Laugh
Just a user !
So you have to use Glass SVN or Modded Confluence.

I don't know Modded Confluence but Glass let you define custom menus and you can activate for each one my script to display random items or last added items.

Do you want a little How-to ?
mike I have already tried it in Glass SVN and Nox Git ( which utilises the script) in glass I have configured it and i Can see the widget but it remains empty and dosent show anything , unfortunately in Nox home screen dosent even shows the widgets , its as if the skin isnt even calling the script
I'll post a few screens when I get back home to explain further
Which version of Glass ? I'm running v112.

In the Glass directory skin.glass.svn, could you open includes.xml and search for :

Code:
randomanlastitems

If you have :
Code:
unwatched=True
or
Code:
resume=True

Please change to :
Code:
unwatched=False
or
Code:
resume=False

In Glass settings, did you have done this :

System > Skin
Menu customizer
Customize Menu 1
Set label and playlist

Home window options
Show recently added items
Set same playlist as above for customized menu
Show Random items
Set same playlist as above for customized menu
shaktoo Wrote:mike I have already tried it in Glass SVN and Nox Git ( which utilises the script) in glass I have configured it and i Can see the widget but it remains empty and dosent show anything , unfortunately in Nox home screen dosent even shows the widgets , its as if the skin isnt even calling the script

I have a similar problem with modded confluense right now.
I just made this logfile for that skin but since its about this script and it seems to be on two different skins I'll post this here aswell.

http://pastebin.com/nZcMZ5bT

The error show up here:
Code:
14:06:24 T:3600   DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "Files.GetDirectory", "params": {"directory": "special://masterprofile/playlists/video/custom1.xsp", "media": "video", "properties": ["year", "runtime", "file", "playcount", "rating", "plot", "fanart", "thumbnail", "resume", "trailer"]}, "id": 1}
14:06:24 T:3600   DEBUG: JSONRPC: Calling files.getdirectory
14:06:24 T:3600 WARNING: CUtil::GetMatchingSource... no matching source found for [special://masterprofile/playlists/video/custom1.xsp]
14:06:24 T:3600 WARNING: Previous line repeats 4 times.
14:06:24 T:3600   ERROR: Error loading Smart playlist special://masterprofile/playlists/video/custom1.xsp (failed to read file)
14:06:24 T:3600   ERROR: Previous line repeats 1 times.
14:06:24 T:3600   ERROR: XFILE::CDirectory::GetDirectory - Error getting special://masterprofile/playlists/video/custom1.xsp
14:06:24 T:3600  NOTICE: [RandomAndLastItems] ## PLAYLIST special://masterprofile/playlists/video/custom1.xsp COULD NOT BE LOADED ##
14:06:24 T:3600  NOTICE: ('[RandomAndLastItems] JSON RESULT ', {u'jsonrpc': u'2.0', u'id': 1, u'error': {u'message': u'Invalid params.', u'code': -32602}})
14:06:24 T:3600    INFO: Scriptresult: Success
14:06:24 T:3600    INFO: Python script stopped

EDIT: Now looking at the code, my playlist isn't "custom1.xsp" its "AppData\Roaming\XBMC\userdata\playlists\video\film.xsp"
custom1 is the custom homebutton I have placed "film.xsp" in. changing the playlists filename to custom1 made it work.
Your playlist custom1 has been created and you browse it ?

Because in the log, you can see :

Code:
14:06:24 T:3600   ERROR: Error loading Smart playlist special://masterprofile/playlists/video/custom1.xsp (failed to read file)
14:06:24 T:3600   ERROR: XFILE::CDirectory::GetDirectory - Error getting special://masterprofile/playlists/video/custom1.xsp

For me, it's not a script issue but a skin issue.
mikebzh44 Wrote:Your playlist custom1 has been created and you browse it ?

Because in the log, you can see :

Code:
14:06:24 T:3600   ERROR: Error loading Smart playlist special://masterprofile/playlists/video/custom1.xsp (failed to read file)
14:06:24 T:3600   ERROR: XFILE::CDirectory::GetDirectory - Error getting special://masterprofile/playlists/video/custom1.xsp

For me, it's not a script issue but a skin issue.

Already solved...
His playlist was named "fi lm" and not "custom1"...
Your script is working fine! Awesome work...

BTW&OT: Saw some small issues with viewtype installer in 720p...
Will fix them and then send you the file

cheers,
mad-max
Good news.

New version will provide some cool extra features Wink
mikebzh44 Wrote:New version will provide some cool extra features Wink

Can't wait for it Wink
Yes you can , I finish to add everything in Glass, beforeLaugh
fmronan Wrote:Yes you can , I finish to add everything in Glass, beforeLaugh

Haha...this is definetly NOT funny... Laugh
I think especially since we do not have the same humor.
However, this also allows most testing to be done before offering you the script