The branch, dharma has been updated
       via  3b1ada20f53809f6124307ac0f980ae30f3b8c8e (commit)
      from  735ada5d17fd54acc3d80ad42dab78e8dfb4f042 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=3b1ada20f53809f6124307ac0f980ae30f3b8c8e

commit 3b1ada20f53809f6124307ac0f980ae30f3b8c8e
Author: amet <a...@nospam>
Date:   Sun Dec 12 23:53:06 2010 +0400

    [script.randomitems] -v 1.0.7
    - Added a timer function thanks to ronie.

diff --git a/script.randomitems/RandomItems.py 
b/script.randomitems/RandomItems.py
index 977eb1a..6b60dd7 100644
--- a/script.randomitems/RandomItems.py
+++ b/script.randomitems/RandomItems.py
@@ -44,13 +44,23 @@ class Main:
         self.ALBUMS = params.get( "albums", "" ) == "True"
         self.UNPLAYED = params.get( "unplayed", "" ) == "True"
         self.PLAY_TRAILER = params.get( "trailer", "" ) == "True"
+        self.ALARM = int( params.get( "alarm", "0" ) )
         self.RANDOM_ORDER = "True"
 
+    def _set_alarm( self ):
+        # only run if user/skinner preference
+        if ( not self.ALARM ): return
+        # set the alarms command
+        command = 
"XBMC.RunScript(%s,limit=%d&albums=%s&unplayed=%s&trailer=%s&alarm=%d)" % ( 
os.path.join( os.getcwd(), __file__ ), self.LIMIT, str( self.ALBUMS ), str( 
self.UNPLAYED ), str( self.PLAY_TRAILER ), self.ALARM, )
+        xbmc.executebuiltin( "AlarmClock(RandomItems,%s,%d,true)" % ( command, 
self.ALARM, ) )
+
     def __init__( self ):
         # parse argv for any preferences
         self._parse_argv()
         # clear properties
         self._clear_properties()
+        # set any alarm
+        self._set_alarm()
         # format our records start and end
         xbmc.executehttpapi( "SetResponseFormat()" )
         xbmc.executehttpapi( "SetResponseFormat(OpenRecord,%s)" % ( 
"<record>", ) )
@@ -188,4 +198,4 @@ class Main:
             self.WINDOW.setProperty( "RandomSong.%d.Thumb" % ( count + 1, ), 
fields[ 27 ] )
 
 if ( __name__ == "__main__" ):
-    Main()
+    Main()
\ No newline at end of file
diff --git a/script.randomitems/addon.xml b/script.randomitems/addon.xml
index b2f9a30..a23d7d7 100644
--- a/script.randomitems/addon.xml
+++ b/script.randomitems/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

-<addon id="script.randomitems" name="Random Items script" version="1.0.6" 
provider-name="Hitcher">

+<addon id="script.randomitems" name="Random Items script" version="1.0.7" 
provider-name="Hitcher">

        <requires>

                <import addon="xbmc.python" version="1.0"/>

        </requires>


-----------------------------------------------------------------------

Summary of changes:
 script.randomitems/RandomItems.py |   12 +++++++++++-
 script.randomitems/addon.xml      |    2 +-
 2 files changed, 12 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to