• 1
  • 48
  • 49
  • 50(current)
  • 51
  • 52
  • 53
[RELEASE] Random and last items smartplaylist script for Skins
I'm using 2.2.2 with Helix/Aeon Shednox 4.1.9.9 on a firetv. When using the smart playlist manager to add latest widgets and random backgrounds for smart playlists, I have to drill to the absolute path of the playlists. The "special://" notation doesn't appear. As such, the widgets don't get populated, although no error shows on screen.

I noticed in the changelog that there was a fix for Gotham special:// paths, is the same required for Helix?

Thanks in advance
Reply
The smart playlist manager have nothing to do with this addon.

I think it's a skin issue.
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
This is still working?
Created smartplaylist Tomer.xsp :
Code:
<smartplaylist type="movies">
    <name>Tomer</name>
    <match>all</match>
    <rule field="year" operator="is">
        <value>2013</value>
    </rule>
</smartplaylist>

put this on startup.xml
Code:
<onload>RunScript(script.randomandlastitems,limit=10,method=Last,playlist=special://masterprofile/playlists/video/Tomer.xsp,menu=Menu1)</onload>

using this label:
Code:
$INFO[Window(Home).Property(PlaylistLastMovieMenu1.1.Title)]
or
$INFO[Window(Home).Property(PlaylistLast.MovieMenu1.1.Title)]
or
$INFO[Window(Home).Property(Menu1.1.Title)]

cant get nothing...
Helix
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
hey buddy Smile Thx for this script, but i have some problems with FC´s after i come back to main menu after i navigate through the menus
Skin: latest Shednox mod
Script: 2.2.2 ( latest from repo )

here is the error from log:

PHP Code:
ERROREXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - 
NOTEIGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            
Error Type: <type 'exceptions.RuntimeError'>
                                            
Error Contentsaccess_violation
                                            Traceback 
(most recent call last):
                                              
File "C:\Users\schimi2k\AppData\Roaming\Kodi\addons\script.randomandlastitems\randomandlastitems.py"line 852in <module>
                                                
_getEpisodesFromPlaylist()
                                              
File "C:\Users\schimi2k\AppData\Roaming\Kodi\addons\script.randomandlastitems\randomandlastitems.py"line 429in _getEpisodesFromPlaylist
                                                _setEpisodeProperties 
_episode_count )
                                              
File "C:\Users\schimi2k\AppData\Roaming\Kodi\addons\script.randomandlastitems\randomandlastitems.py"line 619in _setEpisodeProperties
                                                _json_query 
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodeDetails", "params": {"properties": ["streamdetails"], "episodeid":%s }, "id": 1}' %(_episode['id']))
                                            
RuntimeErroraccess_violation
                                            
-->End of Python script error report<-- 

maybe u have an idea ?
thx in advance mate
Reply
@tomer :

This is how the script is called in Aeon Nox (Shedrock for Helix) :

Code:
RunScript(script.randomandlastitems,type=Movie,playlist=special://profile/playlists/video/Cartoons.xsp,method=Last,limit=10,unwatched=False,resume=False,property=SmartPlaylist1)

and how properties are used in skin :

Code:
<label>$INFO[Window(Home).Property(SmartPlaylist1.1.Title)]</label>

It's easier to use property= parameter in order to specifie property name and not to let script used default one.

But with "menu=Menu1" instead of "property=" parameter, properties returned are :

Code:
11:45:28 T:6932  NOTICE: ('PlaylistLastMovieMenu1.1.Title', u'La l\xe9gende de Manolo')
11:45:28 T:6932  NOTICE: ('PlaylistLastMovieMenu1.2.Title', u'Planes 2')
11:45:29 T:6932  NOTICE: ('PlaylistLastMovieMenu1.3.Title', u'1001 Pattes')
11:45:29 T:6932  NOTICE: ('PlaylistLastMovieMenu1.4.Title', u'Dragons 2')
11:45:29 T:6932  NOTICE: ('PlaylistLastMovieMenu1.5.Title', u'Khumba')
11:45:29 T:6932  NOTICE: ('PlaylistLastMovieMenu1.6.Title', u'M. Peabody et Sherman : Les Voyages dans le temps')
11:45:29 T:6932  NOTICE: ('PlaylistLastMovieMenu1.7.Title', u'Monster High - Frisson, Cam\xe9ra, Action !')
11:45:29 T:6932  NOTICE: ('PlaylistLastMovieMenu1.8.Title', u'Tarzan')
11:45:29 T:6932  NOTICE: ('PlaylistLastMovieMenu1.9.Title', u'Rio 2')
11:45:29 T:6932  NOTICE: ('PlaylistLastMovieMenu1.10.Title', u'Jack et la M\xe9canique du Coeur')

So $INFO[Window(Home).Property(PlaylistLastMovieMenu1.1.Title)] should be fine.

You can add debug by duplicating line 196 in randomandlastitems.py file (in Random And Last Items addon folder) and modifing it :

BEFORE :

Code:
_setProperty( "%s.%d.Title"           % ( PROPERTY, _count ), _movie.get('title',''))
            _setProperty( "%s.%d.OriginalTitle"   % ( PROPERTY, _count ), _movie.get('originaltitle',''))

AFTER :

Code:
_setProperty( "%s.%d.Title"           % ( PROPERTY, _count ), _movie.get('title',''))
            print( "%s.%d.Title"           % ( PROPERTY, _count ), _movie.get('title',''))
            _setProperty( "%s.%d.OriginalTitle"   % ( PROPERTY, _count ), _movie.get('originaltitle',''))

CAUTION : Take care of indentation, snippets are not aligned but it's due to forum display.

@schimi2k : acces_violation, wow !! I have no idea why this FC can occur Sad
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
mikebzh44 many thanks to you.
buy still not working.
I'll show you step by step.

Here is the smartplaylist (I made it simple for the example, only movies from 2013):

Image

Here is the startup.xml -> copied from your message (only changed Cartoons to Tomer):
http://pastebin.com/79zELm2c
Image

and here is the label control in "View-Fanart.xml":
http://pastebin.com/DRUxkUCG
Image

Restart Kodi, Then goes to Movies Libary and I can only see: a123 b456 (without nothing in the middle).

also modified the .py script with the "print" command like you said and all I can see is those stange lines:
http://pastebin.com/5J1SLpym
and I found in google this table: http://www.utf8-chartable.de/unicode-utf...ng-literal

any ideas?

etc, the libary is Mysql libary
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
Hello

Small help.

Is it possible to call pvr channels with script.randomandlastitems in home menu to present name of channels and icon
Reply
I don't know, "\xe2\x80\x8b" : ZERO WIDTH SPACE

http://utf8-chartable.de/unicode-utf8-ta...ng-literal

Maybe a wrong copy/paste.

But as you are running Windows in hebrew, it's normal to get u'\u05e1\u05d5\u05e3' which mean :

ImageImageImage

http://www.charbase.com/05e1-unicode-heb...ter-samekh
http://www.charbase.com/05d5-unicode-hebrew-letter-vav
http://www.charbase.com/05e3-unicode-heb...r-final-pe

So I think script return title and other properties in Hebrew and Kodi can't display it.

Your Kodi is set in Hebrew or England ?

(2015-01-22, 14:03)senna99 Wrote: Hello

Small help.

Is it possible to call pvr channels with script.randomandlastitems in home menu to present name of channels and icon
No.
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
Indeed Hebrew.... any solution ?
all of the other functions in kodi works great in hebrew, all the scripts (random items\recent albums etc)
any idea how to solve it ?

ok problem solved by changing property=SmartPlaylist1 to property=smart1
which now works great and also dispay the title in hebrew correctly.
changed it because I saw in the log "'SmartPla\xe2\x80\x8bylist1.10.Title'" so I changed it to "smart1" and now its working :]
Phenomenal™ Skin • ForumWebsiteGitHub
Reply
OK, I think that SmartPlaylist1 was not the problem. I think that you have an unprintable character the first time you type SmartPlaylist (bad copy/paste from this thread ?)

But if smart1 work, you can keep it Wink
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
Hello, i have an problem with this script.
I used it with aeon nox mania skin and a constellation with windows 8.1, mysql db, kodi 14.2 rc1 and intel nuc i5.
When i have live dvd background in combi with an smart playlist in the home menu, i get 80% cpu used.
Without the andomlastitem, the cpu used is 9%.
Reply
Hi.

How many movies in library ?
How many custom menu based on smart playlist ?
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
I have about 30 Blu-Ray, 20 3Ds and 120 Klassic Blu-Rays...etc
In addition Comedy Series, Drama Series and dokus. (About 120 Series - over 5000 Episodes)
Complete i have 4 custom menus for Blu-Rays and 5 custom menus for series.

The problem is, that i can only choose 5 custom smart playlists for the LiveDVD background.
Reply
(2014-10-29, 15:14)mikebzh44 Wrote: @skinners : Did you continue to use this script for Helix release of your skins ?

I know that a lot of skinners prefere to use plugin:// to load smart playlist and then populate widget because it's much more lighter in XML code.

The only advantage for this script is to provide stats on smart playlist (number of items, number of items watched, ...) but maybe Helix will provide this too.

Thanks.

Still my favourite script for a number of reasons, one being the ability to return the type of playlist being run on.

Will you be maintaining it through the Helix cycle ?
Noli illegitimi carborundum


Reply
Just a quick test. I have download Kodi 15.0 Alpha 1, install Aeon Nox Shedrock and building a custom menu based on smart playlist and add LiveBG cases work great.

So maybe that this script is already "Isengard ready".
Sorry for my english, but, you know, I'm French so ...

Main HTPC : Odroid-C2 running CoreELEC with Titan Bingie
Secondary HTPC : Freebox Mini 4K running Android TV with Titan Bingie
Reply
  • 1
  • 48
  • 49
  • 50(current)
  • 51
  • 52
  • 53

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Random and last items smartplaylist script for Skins1