The branch, eden has been updated
       via  e980c291962439b20b212d14662dd42335211a4b (commit)
      from  196006ebf8dad191df796a137d2ef263c6ea03fd (commit)

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

commit e980c291962439b20b212d14662dd42335211a4b
Author: Martijn Kaijser <[email protected]>
Date:   Fri Jul 6 23:45:03 2012 +0200

    [script.commands] -v1.0.2

diff --git a/script.commands/addon.xml b/script.commands/addon.xml
index 9a24bfc..0dff06d 100644
--- a/script.commands/addon.xml
+++ b/script.commands/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="script.commands"
        name="Commands"
-       version="1.0.1"
+       version="1.0.2"
        provider-name="AddonScriptorDE">
   <requires>
     <import addon="xbmc.python" version="2.0"/>
diff --git a/script.commands/changelog.txt b/script.commands/changelog.txt
index e09285d..203c739 100644
--- a/script.commands/changelog.txt
+++ b/script.commands/changelog.txt
@@ -1,4 +1,7 @@
 1.0.0
 - First Try
 1.0.1
-- Added parameter for mapping multiple buttons
\ No newline at end of file
+- Added parameter for mapping multiple buttons
+1.0.2
+- Added some commands to the list
+- Added support for command combinations
diff --git a/script.commands/commands.list b/script.commands/commands.list
index 1ca0cf8..9464297 100644
--- a/script.commands/commands.list
+++ b/script.commands/commands.list
@@ -1,32 +1,41 @@
 Sleep Timer###AlarmClock(Sleep Timer, ShutDown)
+Show Playlist###Action(playlist)
 Toggle Random###PlayerControl(Random)
 Cycle Repeat###PlayerControl(Repeat)
 Cycle Subtitles###Action(nextsubtitle)
+Toggle Subtitles###Action(showsubtitles)
 Cycle Languages###Action(audionextlanguage)
+Cycle Aspect Ratios###Action(aspectratio)
+Show Subtitle Delay###Action(subtitledelay)
+Show Audio Delay###Action(audiodelay)
 Take Screenshot###TakeScreenshot
 Refresh RSS feeds###RefreshRSS
 Eject Tray###EjectTray
 Play DVD###PlayDVD
-Rip CD###RipCD
+Rip Audio CD###RipCD
 Clean Playlist###Playlist.Clear
+Toggle Fullscreen###Action(togglefullscreen)
 Update Video DB###UpdateLibrary(video)
 Update Music DB###UpdateLibrary(music)
 Clean Video DB###CleanLibrary(video)
 Clean Music DB###CleanLibrary(music)
 Toggle Sort Direction###Container.SortDirection
 Cycle View Modes###Container.NextViewMode
-Force Addon Update###UpdateAddonRepos
+Update Addon Repos###UpdateAddonRepos
+Update Local Addons###UpdateLocalAddons
 Force Weather Refresh###Weather.Refresh
 Next Weather Location###Weather.LocationNext
 Search Video Library###VideoLibrary.Search
-Video Partymode###Partymode(video)
-Music Partymode###Partymode(music)
+Video Partymode###PlayerControl(Partymode(video))
+Music Partymode###PlayerControl(Partymode(music))
+Rotate Picture###Action(rotate)
+Reload Skin###ReloadSkin
 Reboot System###Reboot
 ShutDown System###ShutDown
 Hibernate System###Hibernate
 Suspend System###Suspend
 Restart XBMC###RestartApp
-Toggle Fullscreen###Action(togglefullscreen)
+Quit XBMC###Quit
 Show HOME###ActivateWindow(10000)
 Show Videos###ActivateWindow(10006)
 Show Video Addons###ActivateWindow(10025,addons://sources/video/)
@@ -39,5 +48,11 @@ Show System Info###ActivateWindow(10007)
 Show Settings###ActivateWindow(10004)
 Show Shutdown Menu###ActivateWindow(10111)
 Show Favourites###ActivateWindow(10134)
+Visualisation: Info###Action(ShowPreset)
+Visualisation: Menu###ActivateWindow(VisualisationPresetList)
+Visualisation: Lock###Action(LockPreset)
+Visualisation: Next###Action(nextpreset)
+Visualisation: Prev###Action(previouspreset)
 SimplePlaylists: 
Add###RunPlugin(plugin://script.simpleplaylists/?mode=addCurrentUrl)
 SimplePlaylists: 
View###RunPlugin(plugin://script.simpleplaylists/?mode=showPlaylists)
+Play Akinator###RunPlugin(plugin://plugin.program.akinator_com)
diff --git a/script.commands/default.py b/script.commands/default.py
index 681fbb5..61e6a36 100644
--- a/script.commands/default.py
+++ b/script.commands/default.py
@@ -39,7 +39,12 @@ def commandsMain(key):
           if entry.find("###")>=0:
             title = entry[:entry.find("###")]
             command = entry[entry.find("###")+3:]
-            xbmc.executebuiltin(command)
+            if command.find("#")==-1:
+              xbmc.executebuiltin(command)
+            else:
+              spl=command.split("#")
+              for temp in spl:
+                xbmc.executebuiltin(temp)
           if entry=="- "+translation(30001):
             addCommand(key)
           elif entry=="- "+translation(30005):
@@ -47,7 +52,7 @@ def commandsMain(key):
 
 def addCommand(key):
         dialog = xbmcgui.Dialog()
-        modes=[translation(30002),translation(30003),translation(30004)]
+        
modes=[translation(30002),translation(30003),translation(30004),translation(30012)]
         nr=dialog.select(translation(30001), modes)
         if nr>=0:
           mode = modes[nr]
@@ -57,9 +62,45 @@ def addCommand(key):
             addCommandFavs(key)
           elif mode==translation(30004):
             addCommandEnter(key)
+          elif mode==translation(30012):
+            global currentCombo
+            currentCombo=""
+            addCommandComboMain(key)
         else:
           commandsMain(key)
 
+def addCommandComboMain(key):
+        kb = xbmc.Keyboard("", translation(30010))
+        kb.doModal()
+        if kb.isConfirmed():
+          title=kb.getText()
+          addCommandCombo(title,key)
+
+def addCommandCombo(title,key):
+        global currentCombo
+        favs=[]
+        fh = open(commandsList, 'r')
+        for line in fh:
+            favs.append(line.replace("\n",""))
+        fh.close()
+        myCommandsTemp=[]
+        for temp in favs:
+          myCommandsTemp.append(temp[:temp.find("###")])
+        dialog = xbmcgui.Dialog()
+        nr=dialog.select(translation(30002), myCommandsTemp)
+        if nr>=0:
+          entry=favs[nr]
+          command = entry[entry.find("###")+3:]
+          currentCombo+=command+"#"
+          addCommandCombo(title,key)
+        else:
+          currentCombo=currentCombo[:len(currentCombo)-1]
+          if title+"###"+currentCombo not in myCommands:
+            fh = open(commandsFile+key, 'a')
+            fh.write(title+"###"+currentCombo+"\n")
+            fh.close()
+          commandsMain(key)
+
 def addCommandList(key):
         if os.path.exists(commandsList):
           favs=[]
diff --git a/script.commands/resources/language/English/strings.xml 
b/script.commands/resources/language/English/strings.xml
index 347e83c..ed6ebbf 100644
--- a/script.commands/resources/language/English/strings.xml
+++ b/script.commands/resources/language/English/strings.xml
@@ -11,4 +11,5 @@
   <string id="30009">Command</string>
   <string id="30010">Title</string>
   <string id="30011">New position</string>
+  <string id="30012">Combination</string>
 </strings>
diff --git a/script.commands/resources/language/German/strings.xml 
b/script.commands/resources/language/German/strings.xml
index 7606c58..c235c77 100644
--- a/script.commands/resources/language/German/strings.xml
+++ b/script.commands/resources/language/German/strings.xml
@@ -11,4 +11,5 @@
   <string id="30009">Befehl</string>
   <string id="30010">Titel</string>
   <string id="30011">Neue Position</string>
+  <string id="30012">Kombination</string>
 </strings>

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

Summary of changes:
 script.commands/addon.xml                          |    2 +-
 script.commands/changelog.txt                      |    5 ++-
 script.commands/commands.list                      |   25 +++++++++--
 script.commands/default.py                         |   45 +++++++++++++++++++-
 .../resources/language/English/strings.xml         |    1 +
 .../resources/language/German/strings.xml          |    1 +
 6 files changed, 70 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to