• 1
  • 11
  • 12
  • 13(current)
  • 14
  • 15
  • 23
[RELEASE] RandomItems (Random Items) Script
the script was tested and optimized, you have to see if you can add it in the next update of the script.Nodhttp://glass.googlecode.com/files/RandomItems.py
thank you
Reply
fmronan Wrote:the script was tested and optimized, you have to see if you can add it in the next update of the script.Nodhttp://glass.googlecode.com/files/RandomItems.py
thank you
bad file ronan Smile

this is good zip http://code.google.com/p/glass/downloads...p&can=2&q=
For my bad English, sorry. I am French Canadian.
Admin @ Passion-XBMC.org
Reply
FrostBox Wrote:bad file ronan Smile

this is good zip http://code.google.com/p/glass/downloads...p&can=2&q=

thanx a bunch for the improvements frost!

i really like this one:
Code:
try: import json # Use speedup
except: import simplejson as json # No speed

might be worth adding it to all the other scripts that use json as well :-)


since i really would like to avoid the file existence checks (which would cause my drives to spin up each time the script runs),
wouldn't it be possible to check for the cached thumb instead?
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
maybe add season banners as well when you're at it.

So json is faster as simplejson? Will you need to make much changes to the coding to use it that way?
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
Martijn Wrote:So json is faster as simplejson?
json uses a binary lib to speed things up, so yeah it's faster.

it might not be available on all platforms though.

Martijn Wrote:Will you need to make much changes to the coding to use it that way?

change:
Code:
import simplejson
to:
Code:
try: import json as simplejson
except: import simplejson
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
ronie Wrote:change:
Code:
import simplejson
to:
Code:
try: import json as simplejson
except: import simplejson

Why aren't things always this easy
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
ronie Wrote:since i really would like to avoid the file existence checks (which would cause my drives to spin up each time the script runs),
wouldn't it be possible to check for the cached thumb instead?

hi,
my drives no spin up, but ok I look this week...
for me, this function "self._fetch_song_info()" is not good. jsonrpc freeze xbmc 2 seconds, because I have 3000 songs. :p


for a moment, I added params to get extra images "extraimages=True" default False and removed file existence checks in addons info

Code:
- changed: [addon info] file existence checks for "fnmatch - Unix filename pattern matching"
- changed/added: setting param 'extraimages=True' to retrieve extra images for episode (Warning: possible hard drive spin up on check existence)
                 RunScript(script.randomitems,limit=10&unplayed=True&alarm=30&extraimages=True)
- updated README.txt
I created branches on my svn, for history change/diff
http://code.google.com/p/passion-xbmc/so...ail?r=1039

3.0.8 http://code.google.com/p/passion-xbmc/so...y&old=1037

3.0.9 http://code.google.com/p/passion-xbmc/so...y&old=1038

Martijn Wrote:maybe add season banners as well when you're at it.

Not sure for save method season banner :confused2: ! do you want explain a little bit Smile
For my bad English, sorry. I am French Canadian.
Admin @ Passion-XBMC.org
Reply
FrostBox Wrote:hi,
my drives no spin up, but ok I look this week...
well, if you use xbmcvfs.exists(), it has to spin up the drive to check if the file exists :-)

i've double-checked it on my end,
before running the script:
Code:
root@xbmc:/home/xbmc# hdparm -C /dev/sdb

/dev/sdb:
drive state is:  standby
after running the script:
Code:
root@xbmc:/home/xbmc# hdparm -C /dev/sdb

/dev/sdb:
drive state is:  active/idle

FrostBox Wrote:for me, this function "self._fetch_song_info()" is not good. jsonrpc freeze xbmc 2 seconds, because I have 3000 songs. :p

i have about 12000 songs in my library, but have never experienced any lockups...

FrostBox Wrote:for a moment, I added params to get extra images "extraimages=True" default False and removed file existence checks in addons info

nice, having it as an option would be the way to go, if we can't do it by checking for the cached thumbs instead.
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
stupid question, but is there any way I could map a button on my remote to launch this? Eden Beta 3 here if that matters.
Reply
quebert Wrote:stupid question, but is there any way I could map a button on my remote to launch this? Eden Beta 3 here if that matters.
Code:
<button>RunScript(addon.id)</button>
mad-max
- - - Tribute to Metallica - - -
If I managed to help you, please click my reputation
Reply
mad-max Wrote:
Code:
<button>RunScript(addon.id)</button>
mad-max

Thanks for the reply, that's not doing anything for me though. I tried what you posted, and since I'm running Eden I tried XBMC.RunScript, no dice. Isn't the XBMC. needed when you're using Eden?
And I tried

<m mod="ctrl">XBMC.RunScript(script.randomitems,limit=1&amp;albums=False&amp;unplayed=True)</m>

edited my keyboard.xml and it's definitely mapped to a valid key, this is the latest thing I tried
<m mod="ctrl">RunScript(script.randomitems,limit=1&amp;unplayed=True&amp;alarm=30)</m>

I used just (script.randomitems) with no luck. I tried 3 different skins, I selected the "play random movie" option in Alaska, so I know it is working. I just can't figure out how to map it Sad
Reply
That only runs the script to generate a list of random items not to actually play them. For that you'll need to add to that button (if that's possible) or to another one this -

PHP Code:
PlayMedia(&quot;$INFO[Window.Property(RandomMovie.1.Path)]&quot;) 
Reply
hi,

i'm having trouble with my random items in xperiece1080 skin. Can anyone tell me what's wrong? I tried removing the script, downloading it and reinstalling. Here's the pastebin:

http://pastebin.com/dzYMv7v0

thnx
Reply
It's not been run in that log?
Reply
I found a bug when playing a multi cd movie from this script: it only shows the first cd. Playing it from library goes without problems.

I've attached a debug log to pastebin: here

what i did was:
- startup
- start al multi cd movie from Spotlight (randomitems script in Xperience1080)
- forward to the end (which is just the end of cd one)
- look up the movie in Movies and start it from there (then it plays normal, the complete 2cds)

Hope this helps!


Thx, LoL
Reply
  • 1
  • 11
  • 12
  • 13(current)
  • 14
  • 15
  • 23

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