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

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+---- Forum: Skin helper addons (https://forum.kodi.tv/forumdisplay.php?fid=300)
---- Thread: [RELEASE] Random and last items smartplaylist script for Skins (/showthread.php?tid=122448)



RE: [RELEASE] Random and last items smartplaylist script for Skins - denywinarto - 2013-04-30

Problem solved, it's skin-related Smile


RE: [RELEASE] Random and last items smartplaylist script for Skins - butchabay - 2013-05-02

Hi dudes, just wondering, can Property(RunTime) be added for tv shows / episodes ?

Thanx


RE: [RELEASE] Random and last items smartplaylist script for Skins - denywinarto - 2013-05-04

Hi Mike, i have a question,
is it possible to filter the result with ratings ?

e.g

return 10 random movies with ratings above 6.0 ?

I'm trying to make some kind of recommendations for high-rated movies


RE: [RELEASE] Random and last items smartplaylist script for Skins - `Black - 2013-05-04

Create a smart playlist with all your movies with rating >= 6.0, then use that playlist and return random results.


RE: [RELEASE] Random and last items smartplaylist script for Skins - denywinarto - 2013-05-04

(2013-05-04, 13:19)`Black Wrote: Create a smart playlist with all your movies with rating >= 6.0, then use that playlist and return random results.

Thanks i just remembered your answer from other thread lol


RE: [RELEASE] Random and last items smartplaylist script for Skins - mikebzh44 - 2013-05-04

(2013-05-02, 21:26)butchabay Wrote: Hi dudes, just wondering, can Property(RunTime) be added for tv shows / episodes ?

Thanx

Sure but I'm on holidays ;)

Remind me after monday 13th may.


RE: [RELEASE] Random and last items smartplaylist script for Skins - tomska - 2013-05-04

Would it be possible to also allow random selection of tv shows, not tv show episodes?

I'm using it with Aeon Nox to display random fanart background for my smart-playlist-powered home menu items. My problem is that I've got one show with nearly as many episodes as all other shows together, so it's fanart is displayed about 50% of the time.


RE: [RELEASE] Random and last items smartplaylist script for Skins - denywinarto - 2013-05-06

Hi Mike, just a quick question, is this the correct way to call your script?
PHP Code:
<onload condition="System.HasAddon(script.randomandlastitems) + !IsEmpty(skin.string(vpl1.path))">RunScript(script.randomandlastitems,limit=1,method=Random,playlist=special://masterprofile/playlists/video/Recommended_Barat.xsp,menu=Menu51)</onload> 

(vpl1.path is the path to the first video playlist)

It's supposed to call a widget that shows Movies with rating > 6
And the script runs when one of the left menu is on focus..
If the number of movie is one everytime the script runs, then the limit is 1 correct?

I set the parameters like this :

PHP Code:
<include name="rec_contentvpl1">
    <
control type="panel" id="510"><!--- Playlist de Video 1 Recommended -->
    <include 
condition="SubString(skin.string(menu),vertical)">panel_video_v</include>
    <include 
condition="SubString(skin.string(menu),horizontal)">panel_video_h</include>
    <
visible>Container(9000).HasFocus(31)</visible>
    <include>
panel_videolayout</include>
    <
content>
    <
item>
    <
label>$INFO[Window(0).Property(PlaylistLastMovieMenu51.1.Title)]</label>
    <
label2>$INFO[Window(0).Property(PlaylistLastMovieMenu51.1.Tagline)]</label2>
    <
icon>$INFO[Window(0).Property(PlaylistLastMovieMenu51.1.Art(poster))]</icon>
    <
property name="Fanart">$INFO[Window(0).Property(PlaylistLastMovieMenu51.1.Art(fanart))]</property>
    <
property name="Genre">$INFO[Window(0).Property(PlaylistLastMovieMenu51.1.Genre)]</property>
    <
property name="Runtime">$INFO[Window(0).Property(PlaylistLastMovieMenu51.1.Runtime)]</property>
    <
property name="Rating">$INFO[Window(0).Property(PlaylistLastMovieMenu51.1.Rating)]</property>
    <
property name="Plot">$INFO[Window(0).Property(PlaylistLastMovieMenu51.1.Plot)]</property>
    <
property name="Year">$INFO[Window(0).Property(PlaylistLastMovieMenu51.1.Year)]</property>
    <
property name="Mpaa">$INFO[Window(0).Property(PlaylistLastMovieMenu51.1.MPAA)]</property>
    <
onclick>Skin.SetString(custom_play,$INFO[Window(0).Property(PlaylistLastMovieMenu51.1.Play)])</onclick>
    <
onclick>Skin.SetString(custom_trailer,$INFO[Window(0).Property(PlaylistLastMovieMenu51.1.Trailer)])</onclick>
    <
onclick condition="!IsEmpty(Window(0).Property(PlaylistLastMovieMenu51.1.Trailer))">ActivateWindow(623)</onclick>
    <
onclick condition="IsEmpty(Window(0).Property(PlaylistLastMovieMenu51.1.Trailer))">$INFO[Window(0).Property(PlaylistLastMovieMenu51.1.Play)]</onclick>
    <
visible>!IsEmpty(Window(0).Property(PlaylistLastMovieMenu51.1.Title))</visible>
    </
item>
    </
content>
    </
control>
    </include> 

I can't get it to work though..
This is the complete thread..
http://forum.xbmc.org/showthread.php?tid=164103&pid=1413793#pid1413793


RE: [RELEASE] Random and last items smartplaylist script for Skins - `Black - 2013-05-06

If you call it with method=Random, the properties are PlaylistRandomMovieMenu51.


RE: [RELEASE] Random and last items smartplaylist script for Skins - denywinarto - 2013-05-06

(2013-05-06, 12:03)`Black Wrote: If you call it with method=Random, the properties are PlaylistRandomMovieMenu51.

Thanks black, changed it, but it still doesn't fix the problem..
It's still showing blank panel
Is everything else on my thread correct?


RE: [RELEASE] Random and last items smartplaylist script for Skins - mikebzh44 - 2013-05-06

Sorry, I'm on holydays. If you know how to do, put some print of properties in python script to see what script return.


RE: [RELEASE] Random and last items smartplaylist script for Skins - schumi2004 - 2013-05-07

Hi all,

I'm playing with the resume = True/False | resume=True to filter only partially watched items parameter but it's unclear for me how (and which) parameters to use.

If i look at example i think it should look like this

XBMC.RunScript(script.RandomAndLastItems,resume=True,playlist=special://masterprofile/playlists/video/children.xsp,menu=Menu1)

I removed type since it is read from playlist according wiki, also removed limit since it would only show 1 item (and default would be 10) and not sure if Method is needed for it? If it's needed i would say it should be set to Last?


RE: [RELEASE] Random and last items smartplaylist script for Skins - denywinarto - 2013-05-08

Hi, i kinda figured out the last problem..

But i run into another prob..

Just wanna ask 1 quick question :
Is it possible to run both random and last at the same time ?
The bottom panel in the skin will run random and the upper will run last

something like this :

PHP Code:
    <include name="RecommendedFocus">
    <
onfocus condition="Container(9000).HasFocus(31) + !IsEmpty(Container(9000).ListItem.Property(RunScript_OnFocus)">RunScript(script.randomandlastitems,limit=12,method=Last,playlist=$INFO[Skin.String(vpl1.path)],menu=Menu31)</onfocus>
    <
onfocus condition="Container(9000).HasFocus(31) + !IsEmpty(Container(9000).ListItem.Property(RunScript_OnFocus)">RunScript(script.randomandlastitems,limit=1,method=Random,playlist=special://masterprofile/playlists/video/Recommended_Barat.xsp,menu=Menu31)</onfocus>
    
<visible allowhiddenfocus="true">false</visible>
    </include> 

each uses different playlist... and both have same condition, onfocus


RE: [RELEASE] Random and last items smartplaylist script for Skins - butchabay - 2013-05-13

(2013-05-04, 21:31)mikebzh44 Wrote:
(2013-05-02, 21:26)butchabay Wrote: Hi dudes, just wondering, can Property(RunTime) be added for tv shows / episodes ?

Thanx

Sure but I'm on holidays Wink

Remind me after monday 13th may.


Reminder Wink


RE: [RELEASE] Random and last items smartplaylist script for Skins - mikebzh44 - 2013-05-13

Thanks for reminding me Wink

You can try the latest release from GITHUB :

https://github.com/XBMC-Addons/script.randomandlastitems

Property Runtime is returned for Episodes / TV shows.

No bugs on my side but I just put some debug print in my log, tell me if on the skinner side, every thing is OK.

Thanks.


This forum uses Lukasz Tkacz MyBB addons.