[RELEASE] RandomItems (Random Items) Script

  Thread Rating:
  • 2 Votes - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Hitcher Offline
Skilled Skinner
Posts: 9,933
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #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.

[Image: sig_zps3af3b48e.jpg]
find quote
ppic Offline
Skilled Python Coder
Posts: 2,663
Joined: Feb 2009
Reputation: 10
Location: France idf
Post: #12
ha !!!
ok !!!

should be easy so far, i'll check that and keep you in touch Wink

[Image: widget]
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)
find quote
ppic Offline
Skilled Python Coder
Posts: 2,663
Joined: Feb 2009
Reputation: 10
Location: France idf
Post: #13
http://pastebin.com/nQMESKKM

try this

[Image: widget]
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)
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,933
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #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.

[Image: sig_zps3af3b48e.jpg]
find quote
ppic Offline
Skilled Python Coder
Posts: 2,663
Joined: Feb 2009
Reputation: 10
Location: France idf
Post: #15
well i don't know this function, i'll try and see

[Image: widget]
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)
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,933
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #16
Here's the script -

http://pastebin.com/n6F7KQ72

I did have a quick play around earlier but got errors on this part -

PHP Code:
command "XBMC.RunScript(%s,limit=%d&partial=%s&albums=%s&unplayed=%s&totals=%s&trailer=%s&alarm=%d)" % ( os.path.joinos.getcwd(), __file__ ), self.LIMITstrnot self.RECENT ), strself.ALBUMS ), strself.UNPLAYED ), strself.TOTALS ), strself.PLAY_TRAILER ), self.ALARM, ) 

[Image: sig_zps3af3b48e.jpg]
find quote
mcborzu Offline
Skilled Skinner
Posts: 3,381
Joined: Feb 2009
Reputation: 15
Location: dsf
Post: #17
What would be the correct way to have this run every time you enter home? just thinking people might like it to change every time the enter/exit Home...

As of now I'm running it like so:

Quote:<control type="button" id="8999">
<description>Run Recently added</description>
<posx>-20</posx>
<posy>-20</posy>
<width>1</width>
<height>1</height>
<label>-</label>
<font>-</font>
<onfocus>XBMC.RunScript(script.recentlyadded,limit=6)</onfocus>
<onfocus>XBMC.RunScript(script.randomitems,limit=10&amp;unplayed=True)</onfocus>
<onfocus>SetFocus(9000)</onfocus>
<texturenofocus>-</texturenofocus>
<texturefocus>-</texturefocus>
</control>

BTW...very cool script!

[Image: widget]

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,933
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #18
It's as simple as removing any visible conditions.

[Image: sig_zps3af3b48e.jpg]
find quote
ppic Offline
Skilled Python Coder
Posts: 2,663
Joined: Feb 2009
Reputation: 10
Location: France idf
Post: #19
so no need to modify the script?

[Image: widget]
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)
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,933
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #20
I've added the TRUE patch but it might still be good idea to add the timer function, that is if you want to of course.
Like I said, I added all the 'alarm' parts from the recentlyadded script and only had trouble with one line.

[Image: sig_zps3af3b48e.jpg]
find quote
Post Reply