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.
(2012-08-06, 18:35)mikebzh44 Wrote: [ -> ]@Sranshaft : I will have a look on it but it will take time as I think is due to JSON version in Frodo :

No worries mate. Just thought I'd check in. Like I said, everything other than music works flawlessly for now so I'm happy to live with the error until you have some more time for testing with Frodo.

@mikebzh44: Polite bump to ask if you've had any chance to update the script for Frodo. Due to recent changes regarding the duration field being changed to an integer instead of a string, the script is now throwing an error in Movies and TV shows as well now.

Code:
00:40:42 T:7796   ERROR: EXCEPTION: argument "value" for method "setProperty" must be unicode or str
00:40:42 T:7796   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: argument "value" for method "setProperty" must be unicode or str
                                            Traceback (most recent call last):
                                              File "C:\Users\Calvin\AppData\Roaming\XBMC\addons\script.randomandlastitems\randomandlastitems.py", line 643, in <module>
                                                _getMovies()
                                              File "C:\Users\Calvin\AppData\Roaming\XBMC\addons\script.randomandlastitems\randomandlastitems.py", line 191, in _getMovies
                                                _setProperty( "%s.%d.RunningTime" % ( PROPERTIE, _count ), runtime)
                                              File "C:\Users\Calvin\AppData\Roaming\XBMC\addons\script.randomandlastitems\randomandlastitems.py", line 600, in _setProperty
                                                WINDOW.setProperty ( _property, _value )
                                            TypeError: argument "value" for method "setProperty" must be unicode or str
                                            -->End of Python script error report<--
00:40:42 T:7940   ERROR: EXCEPTION: argument "value" for method "setProperty" must be unicode or str
00:40:42 T:7940   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.TypeError'>
                                            Error Contents: argument "value" for method "setProperty" must be unicode or str
                                            Traceback (most recent call last):
                                              File "C:\Users\Calvin\AppData\Roaming\XBMC\addons\script.randomandlastitems\randomandlastitems.py", line 648, in <module>
                                                _getEpisodesFromPlaylist()
                                              File "C:\Users\Calvin\AppData\Roaming\XBMC\addons\script.randomandlastitems\randomandlastitems.py", line 288, in _getEpisodesFromPlaylist
                                                _setEpisodeProperties ( _episode, _count )
                                              File "C:\Users\Calvin\AppData\Roaming\XBMC\addons\script.randomandlastitems\randomandlastitems.py", line 554, in _setEpisodeProperties
                                                _setProperty( "%s.%d.RunningTime"   % ( PROPERTIE, _count ), runtime)
                                              File "C:\Users\Calvin\AppData\Roaming\XBMC\addons\script.randomandlastitems\randomandlastitems.py", line 600, in _setProperty
                                                WINDOW.setProperty ( _property, _value )
                                            TypeError: argument "value" for method "setProperty" must be unicode or str
                                            -->End of Python script error report<--
Yes, I have to work on Frodo Big Grin may be next week.

I was waiting because Martijn will might include some of the features in his script : script.skin.widgets

(2012-11-28, 15:50)mikebzh44 Wrote: [ -> ]Yes, I have to work on Frodo Big Grin may be next week.

I was waiting because Martijn will might include some of the features in his script : script.skin.widgets

Ah, sweet. It'd be to nice to have all of these features rolled into one script - it makes it easier to keep everything up to date - so here's to hoping that happens. Cheers for the update. Big Grin

Cool - Have started to add into Hybrid, mostly works but as mentioned in this thread already, Music kicks up an error.
it will happen and hopefully with same speed increase Smile
(2012-11-28, 16:08)Martijn Wrote: [ -> ]it will happen and hopefully with same speed increase Smile

awesome news mate. i hate to be that guy but any idea on a rough ETA?
Is this script deprecated now and everything included in skin.widgets?
No not for the moment but I have to make a Frodo release.
(2012-12-01, 09:27)mikebzh44 Wrote: [ -> ]No not for the moment but I have to make a Frodo release.
Any news on this?

I checked this thread and the skin.widgets thread...
Unfortunately the script is broken in the betas...

cheers,
mad-max

Yes, just have to find some spare time Wink
Yeah, I know that problem Wink

Thanks for the fast answer...

mad-max
Thanks to Martijn, script was adapted to Frodo.

And a lot of properties were added.

Martijn is still working on it but for skinners who want to test, new script can be downloaded here :

https://dl.dropbox.com/u/7435592/script....titems.zip

Look into code to see new properties but there are the same as in script.skin.widget.
@mike

a big big THANKS, i love it.
@mike

I get script failed ! lastandrandomitems.py

any idea?