• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 23
  • Next 
 
Thread Rating:
  • 2 Vote(s) - 4 Average
[RELEASE] RandomItems (Random Items) Script
#1
Thumbs Up 
Superseded by the Skin Widgets Addon post 4th Oct 2012.

Based on Nuka1195's RecentlyAdded script.

Uses -
  • Alternative to Recently Added items (ie Welo's 'Random Items')
  • Additional to Recently Added items (ie Fusion's 'Featured Items')


Parameters (separated by &) -

PHP Code:
limit=#         ; # to limit returned results (default=5)
unplayed=True   True to return only items (not supported for albumsthat have not been played (default=False)
trailer=True    True to play the trailer (if available) (default=False)
alarm=#         ; # number of minutes before running again (default=Off) 

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"
"RandomMovie.%d.Rating"
"RandomMovie.%d.Year"
"RandomMovie.%d.Plot"
"RandomMovie.%d.RunningTime"
"RandomMovie.%d.Path"
"RandomMovie.%d.Trailer"
"RandomMovie.%d.Fanart"
"RandomMovie.%d.Thumb"
"RandomMovie.Count" 

PHP Code:
"RandomEpisode.%d.ShowTitle"
"RandomEpisode.%d.EpisodeTitle"
"RandomEpisode.%d.EpisodeNo"
"RandomEpisode.%d.EpisodeSeason"
"RandomEpisode.%d.EpisodeNumber"
"RandomEpisode.%d.Plot"
"RandomEpisode.%d.Rating"
"RandomEpisode.%d.Path"
"RandomEpisode.%d.Fanart"
"RandomEpisode.%d.Thumb"
"RandomEpisode.Count" 


PHP Code:
"RandomMusicVideo.%d.Title"
"RandomMusicVideo.%d.Year"
"RandomMusicVideo.%d.Plot"
"RandomMusicVideo.%d.RunningTime"
"RandomMusicVideo.%d.Path"
"RandomMusicVideo.%d.Artist"
"RandomMusicVideo.%d.Fanart"
"RandomMusicVideo.%d.Thumb"
"RandomMusicVideo.Count" 

PHP Code:
"RandomAlbum.%d.Title"
"RandomAlbum.%d.Year"
"RandomAlbum.%d.Artist"
"RandomAlbum.%d.Path"
"RandomAlbum.%d.Fanart"
"RandomAlbum.%d.Thumb"
"RandomAlbum.%d.Rating"
"RandomAlbum.Count" 

PHP Code:
"RandomSong.%d.Title"
"RandomSong.%d.Year"
"RandomSong.%d.Artist"
"RandomSong.%d.Album"
"RandomSong.%d.Path"
"RandomSong.%d.Fanart"
"RandomSong.%d.Thumb"
"RandomSong.%d.Rating"
"RandomSong.Count" 

PHP Code:
"RandomAddon.%d.Name"
"RandomAddon.%d.Author"
"RandomAddon.%d.Summary"
"RandomAddon.%d.Version"
"RandomAddon.%d.Path"
"RandomAddon.%d.Type"
"RandomAddon.%d.Fanart"
"RandomAddon.%d.Thumb"
"RandomAddon.Count" 

Download:
XBMC EDEN: http://mirrors.xbmc.org/addons/eden-pre/...ndomitems/
Frodo Nightly Builds: https://github.com/XBMC-Addons/script.ra.../downloads

IF YOU HAVE ANY ISSUES, ALWAYS INCLUDE A FULL Debug Log WITH YOUR REPORT

Thanks to ppic and ronie for all the updates.
Reply
#2
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">
            <
description>trigger</description>
            <
onfocus>ReplaceWindow(Home)</onfocus>
            <
onfocus>XBMC.RunScript(script.randomitems,limit=10&amp;unplayed=True)</onfocus>
            <
texturenofocus>-</texturenofocus>
            <
texturefocus>-</texturefocus>
    </
control

And this is the property fields:

Quote:<label>$INFO[Window.Property(RandomMovie.1.Title)]</label>
<label>$INFO[Window.Property(RandomMovie.2.Title)]</label>
Etc..

Am I missing something?
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#3
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.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
Sorry guys, I forgot to mention you need &amp;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.
Reply
#5
For systems that run all the time, is there a way to make this run every 24 hours?
[Image: sigpic_51354_dedd3c5dac45dcc8f6b4ccc9d9ad3429.png]
To learn more, click here.
Reply
#6
i don't understand what the problem is ?
can you explain, if i catch it, i'll take a look Wink
Image
Passion-XBMC Repository Download your SVN skins and addons
TvTunes Addon Download Play your theme while browsing library
TVshow Next Aired display next aired infos from tvrage.com
Logo Downloader Script download Logo/clearart/show thumbs/poster/banner
Bande-Annonce Allociné plugin watch trailers in french and vo
SportLive Script Live score match info in XBMC (not compatible dharma)
Reply
#7
ppic Wrote:i don't understand what the problem is ?
can you explain, if i catch it, i'll take a look Wink

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.
[Image: sigpic_51354_dedd3c5dac45dcc8f6b4ccc9d9ad3429.png]
To learn more, click here.
Reply
#8
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.
Reply
#9
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.

For your problem you could use the 'AlarmClock' function.

Such as:

<onfocus>AlarmClock(Random,XBMC.RunScript(script.randomitems,limit=10&amp;unplayed=True&amp;random=True),24:00[,silent])</onfocus>
[Image: sigpic_51354_dedd3c5dac45dcc8f6b4ccc9d9ad3429.png]
To learn more, click here.
Reply
#10
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
Image
Passion-XBMC Repository Download your SVN skins and addons
TvTunes Addon Download Play your theme while browsing library
TVshow Next Aired display next aired infos from tvrage.com
Logo Downloader Script download Logo/clearart/show thumbs/poster/banner
Bande-Annonce Allociné plugin watch trailers in french and vo
SportLive Script Live score match info in XBMC (not compatible dharma)
Reply
#11
ppic Wrote: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
As it's for random items only I'd like to remove the need to add anything.

Thanks.
Reply
#12
ha !!!
ok !!!

should be easy so far, i'll check that and keep you in touch Wink
Image
Passion-XBMC Repository Download your SVN skins and addons
TvTunes Addon Download Play your theme while browsing library
TVshow Next Aired display next aired infos from tvrage.com
Logo Downloader Script download Logo/clearart/show thumbs/poster/banner
Bande-Annonce Allociné plugin watch trailers in french and vo
SportLive Script Live score match info in XBMC (not compatible dharma)
Reply
#13
http://pastebin.com/nQMESKKM

try this
Image
Passion-XBMC Repository Download your SVN skins and addons
TvTunes Addon Download Play your theme while browsing library
TVshow Next Aired display next aired infos from tvrage.com
Logo Downloader Script download Logo/clearart/show thumbs/poster/banner
Bande-Annonce Allociné plugin watch trailers in french and vo
SportLive Script Live score match info in XBMC (not compatible dharma)
Reply
#14
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.
Reply
#15
well i don't know this function, i'll try and see
Image
Passion-XBMC Repository Download your SVN skins and addons
TvTunes Addon Download Play your theme while browsing library
TVshow Next Aired display next aired infos from tvrage.com
Logo Downloader Script download Logo/clearart/show thumbs/poster/banner
Bande-Annonce Allociné plugin watch trailers in french and vo
SportLive Script Live score match info in XBMC (not compatible dharma)
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 23
  • Next 
 
Thread Rating:
  • 2 Vote(s) - 4 Average



Logout Mark Read Team Forum Stats Members Help
[RELEASE] RandomItems (Random Items) Script42