[RELEASE] RandomItems (Random Items) Script - 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] RandomItems (Random Items) Script (/showthread.php?tid=79378) |
[RELEASE] RandomItems (Random Items) Script - Hitcher - 2010-08-20 Superseded by the Skin Widgets Addon post 4th Oct 2012. Based on Nuka1195's RecentlyAdded script. Uses -
Parameters (separated by &) - PHP Code: limit=# ; # to limit returned results (default=5) For example - PHP Code: XBMC.RunScript(script.randomitems,limit=10&unplayed=True&alarm=30) will return 10 random, unplayed movies, episodes and songs every 30 minutes. Labels - PHP Code: "RandomMovie.%d.Title" PHP Code: "RandomEpisode.%d.ShowTitle" PHP Code: "RandomMusicVideo.%d.Title" PHP Code: "RandomAlbum.%d.Title" PHP Code: "RandomSong.%d.Title" PHP Code: "RandomAddon.%d.Name" Download: XBMC EDEN: http://mirrors.xbmc.org/addons/eden-pre/script.randomitems/ Frodo Nightly Builds: https://github.com/XBMC-Addons/script.randomitems/downloads IF YOU HAVE ANY ISSUES, ALWAYS INCLUDE A FULL Debug Log WITH YOUR REPORT Thanks to ppic and ronie for all the updates. - mcborzu - 2010-09-15 I'm just getting the same 3 movies while testing this out? At the moment I'm running it in startup.xml, also have run it as that 8999 button - PHP Code: <control type="button" id="10"> And this is the property fields: Quote:<label>$INFO[Window.Property(RandomMovie.1.Title)]</label> Am I missing something? - ronie - 2010-09-15 i only tested it briefly a while ago and had the same issue. furthermore, random episodes did not work for me...they all returned empty. random songs worked fine though. - Hitcher - 2010-09-15 Sorry guys, I forgot to mention you need &random=True because I couldn't work out how to set it to 'true' as default - I know next to nothing about Python. If anyone knows how to fix this then please let me know and I'll get it updated. - igotdvds - 2010-09-15 For systems that run all the time, is there a way to make this run every 24 hours? - ppic - 2010-09-15 i don't understand what the problem is ? can you explain, if i catch it, i'll take a look - igotdvds - 2010-09-15 ppic Wrote:i don't understand what the problem is ? I must be retarded or something, did I ask a dumb question. lol I was just wondering since some people leave their HTPC on all the time, was it possible to make the script run every 24 hours without them having to shutdown xbmc. I have it running in startup.xml. - Hitcher - 2010-09-15 I think he was talking about my problem with making it default to true so we don't have to add 'random=True' to the parameters. For your problem you could use the 'AlarmClock' function. - igotdvds - 2010-09-15 Hitcher Wrote:I think he was talking about my problem with making it default to true so we don't have to add 'random=True' to the parameters. Such as: <onfocus>AlarmClock(Random,XBMC.RunScript(script.randomitems,limit=10&unplayed=True&random=True),24:00[,silent])</onfocus> - ppic - 2010-09-15 ho ok !!! so hitcher, you want random=True if not specified in parameter ? so still allow to pass random=False if you don't want random - Hitcher - 2010-09-15 ppic Wrote:ho ok !!!As it's for random items only I'd like to remove the need to add anything. Thanks. - ppic - 2010-09-15 ha !!! ok !!! should be easy so far, i'll check that and keep you in touch - ppic - 2010-09-15 http://pastebin.com/nQMESKKM try this - Hitcher - 2010-09-15 Works perfectly, thanks. If you have the time do you think you could implement the alarm function that was used in the RecentlyAdded script that would help igotdvds to set a 24 hour check? Cheers. - ppic - 2010-09-15 well i don't know this function, i'll try and see |