The branch, dharma has been updated
       via  189a77d40a516b79d47f2680a7c7ce9729110c16 (commit)
       via  9e5081b7d5e2c2df1f19c5803da5299a36b9098e (commit)
       via  5e984c7e3f3f811b51081ab3dad1eb45e14d9695 (commit)
      from  afbc959005f5fe41829b1ebe680f286be75da985 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=189a77d40a516b79d47f2680a7c7ce9729110c16

commit 189a77d40a516b79d47f2680a7c7ce9729110c16
Author: spiff <[email protected]>
Date:   Sun Feb 20 20:41:37 2011 +0100

    [plugin.video.svtplay] updated to version 1.0.2

diff --git a/plugin.video.svtplay/addon.xml b/plugin.video.svtplay/addon.xml
index 0690220..b0cbea2 100644
--- a/plugin.video.svtplay/addon.xml
+++ b/plugin.video.svtplay/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.video.svtplay"
        name="SVT Play"
-       version="1.0.1"
+       version="1.0.2"
        provider-name="nilzen">
   <requires>
     <import addon="xbmc.python" version="1.0"/>
diff --git a/plugin.video.svtplay/changelog.txt 
b/plugin.video.svtplay/changelog.txt
index e00aa33..d06cbf2 100644
--- a/plugin.video.svtplay/changelog.txt
+++ b/plugin.video.svtplay/changelog.txt
@@ -1,3 +1,12 @@
+Version 1.0.2
+-------------
+- Added subtitle support (by kokangit)
+- Added video descriptions (by kokangit)
+
+Version 1.0.1
+-------------
+- Added debug menu (by TsUPeR)
+
 Version 1.0.0
 -------------
 - Initial release
\ No newline at end of file
diff --git a/plugin.video.svtplay/default.py b/plugin.video.svtplay/default.py
index 9232f29..b4b10c1 100644
--- a/plugin.video.svtplay/default.py
+++ b/plugin.video.svtplay/default.py
@@ -1,5 +1,6 @@
 # -*- coding: utf-8 -*-
 import os
+import time
 import urllib
 import urllib2
 import xbmcgui
@@ -17,6 +18,7 @@ SETTINGS_MAX_ITEMS_PER_PAGE = [20, 50, 100, 
200][int(__settings__.getSetting("li
 SETTINGS_DEBUG = __settings__.getSetting("debug")
 SETTINGS_CONTEXT_MENU =__settings__.getSetting("context_menu")
 SETTINGS_COMMAND = __settings__.getSetting("command")
+SETTINGS_SUBTITLES = __settings__.getSetting("subtitles")
 
 TEXT_NEXT_PAGE = __language__(30200)
 
@@ -28,6 +30,7 @@ MODE_SEARCH_TITLE = "searchtitle"
 MODE_SEARCH_VIDEO = "searchfull"
 MODE_SEARCH_CLIP = "searchsample"
 MODE_DEBUG = "debug"
+MODE_PLAY = "play"
 
 BASE_URL_TEASER = "http://xml.svtplay.se/v1/teaser/list/";
 BASE_URL_TITLE = "http://xml.svtplay.se/v1/title/list/";
@@ -134,10 +137,20 @@ def video_list(ids="", url="", offset=1, list_size=0):
                if list_size < SETTINGS_MAX_ITEMS_PER_PAGE:
                
                        media = get_media_content(item)
+                       subtitle = get_media_subtitle(item)
                        thumb = get_media_thumbnail(item)
                        title = get_node_value(media, "title", NS_MEDIA)
-
-                       params = { "url": media.getAttribute("url") }
+                       description = get_node_value(item, "description")
+                       pubDate = get_node_value(item, "pubDate")
+                       # TODO: parse date/time
+                       # TODO: add label "date" (string (%d.%m.%Y / 
01.01.2009) - file date)
+                       # TODO: add label "premiered" (string (2005-03-04))
+                       infoLabels = { "Title": title,
+                                      "Plot": description }
+
+                       params = { "url": media.getAttribute("url"),
+                                  "subtitle": subtitle,
+                                  "mode": MODE_PLAY }
                        
                        thumbnail = None
                        
@@ -148,12 +161,12 @@ def video_list(ids="", url="", offset=1, list_size=0):
                        offset += 1
                        #Check if live stream and if debug is enabled
                        if media.getAttribute("expression") == "nonstop":
-                               params = { "url": media.getAttribute("url"), 
"live": "true"}
+                               params["live"] = "true"
                        elif SETTINGS_DEBUG:
                                media_debug = get_media_content(item, 
SETTINGS_HIGHEST_BITRATE_DEBUG)
-                               params = { "url": media.getAttribute("url"), 
"url_debug": media_debug.getAttribute("url")}
-
-                       add_directory_item(title, params, thumbnail, False)
+                               params["url_debug"] = 
media_debug.getAttribute("url")
+                       add_directory_item(title, params, thumbnail, False,
+                                          infoLabels)
 
        pager(doc, ids, url, offset, list_size, MODE_VIDEO_LIST, video_list)
 
@@ -199,9 +212,14 @@ def get_child_outlines(node):
 
 def get_node_value(parent, name, ns=""):
        if ns:
-               return parent.getElementsByTagNameNS(ns, 
name)[0].childNodes[0].data
+               if parent.getElementsByTagNameNS(ns, name) and \
+                           parent.getElementsByTagNameNS(ns, 
name)[0].childNodes:
+                       return parent.getElementsByTagNameNS(ns, 
name)[0].childNodes[0].data
        else:
-               return parent.getElementsByTagName(name)[0].childNodes[0].data
+               if parent.getElementsByTagName(name) and \
+                           parent.getElementsByTagName(name)[0].childNodes:
+                       return 
parent.getElementsByTagName(name)[0].childNodes[0].data
+       return None
 
 def get_offset_url(url, offset):
        if offset == 0:
@@ -272,18 +290,27 @@ def get_media_content(node, settings_bitrate = 
SETTINGS_HIGHEST_BITRATE):
                                
        return content
        
-def add_directory_item(name, params={}, thumbnail=None, isFolder=True):
+def get_media_subtitle(node):
+       subtitles = node.getElementsByTagNameNS(NS_MEDIA, "subTitle")
+       if subtitles:
+               return subtitles[0].getAttribute('href')
+       # Do not return None: urllib.urlencode() will translate to the string 
None
+       return ""
+
+def add_directory_item(name, params={}, thumbnail=None, isFolder=True,
+                      infoLabels=None):
 
        li = xbmcgui.ListItem(name)
 
        if not thumbnail is None:
                li.setThumbnailImage(thumbnail)
        
-       if isFolder == True:
-               url = sys.argv[0] + '?' + urllib.urlencode(params)
-       else:
-               url = params["url"]
-               li.setInfo(type="Video", infoLabels={ "Title": name })
+       url = sys.argv[0] + '?' + urllib.urlencode(params)
+       if isFolder == False:
+               li.setProperty('IsPlayable', 'true')
+               if not infoLabels:
+                       infoLabels = { "Title": name }
+               li.setInfo(type="Video", infoLabels=infoLabels)
                #Check if it's a live stream or if debug is enabled
                if params.has_key('live'):
                        li.setProperty("IsLive", "true")
@@ -377,6 +404,22 @@ def load_xml(url):
        except:
                xbmc.log("unable to load url: " + url)
 
+def play(url, subtitle):
+       item = xbmcgui.ListItem(path=url)
+       xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)
+       if SETTINGS_SUBTITLES and (subtitle == None or len(subtitle) == 0):
+               xbmc.log("No subtitles for " + url)
+       elif SETTINGS_SUBTITLES:
+               # The player must be started to set subtitle, wait for player 
to start
+               tries = 20
+               while tries > 0:
+                       tries -= 1
+                       time.sleep(2)
+                       if xbmc.Player().isPlayingVideo():
+                               xbmc.Player().setSubtitles(subtitle)
+                               return
+               xbmc.log("Failed to set subtitle", xbmc.LOGERROR)
+
 params = parameters_string_to_dict(sys.argv[2])
 
 mode = params.get("mode", None)
@@ -385,9 +428,12 @@ offset = int(params.get("offset",  "1"))
 path = urllib.unquote_plus(params.get("path", ""))
 url = urllib.unquote_plus(params.get("url",  ""))
 name = urllib.unquote_plus(params.get("name",  ""))
+subtitle = urllib.unquote_plus(params.get("subtitle", ""))
 
 if not sys.argv[2] or not mode:
        deviceconfiguration()
+elif mode == MODE_PLAY:
+       play(url, subtitle)
 elif mode == MODE_DEVICECONFIG:
        deviceconfiguration(None, path)
 elif mode == MODE_TEASER_LIST:
@@ -401,4 +447,5 @@ elif mode == MODE_SEARCH_TITLE or mode == MODE_SEARCH_VIDEO 
or mode == MODE_SEAR
 elif mode == MODE_DEBUG:
        debug(url, name)
 
-xbmcplugin.endOfDirectory(int(sys.argv[1]), succeeded=True, cacheToDisc=True)
\ No newline at end of file
+if mode != MODE_PLAY:
+       xbmcplugin.endOfDirectory(int(sys.argv[1]), succeeded=True, 
cacheToDisc=True)
diff --git a/plugin.video.svtplay/resources/language/English/strings.xml 
b/plugin.video.svtplay/resources/language/English/strings.xml
index 6e5e388..2d42a1f 100644
--- a/plugin.video.svtplay/resources/language/English/strings.xml
+++ b/plugin.video.svtplay/resources/language/English/strings.xml
@@ -19,4 +19,5 @@
        <string id="30501">Context menu label</string>
        <string id="30502">URL video quality</string>
        <string id="30503">Command</string>
-</strings>
\ No newline at end of file
+       <string id="30504">Subtitles</string>
+</strings>
diff --git a/plugin.video.svtplay/resources/language/Swedish/strings.xml 
b/plugin.video.svtplay/resources/language/Swedish/strings.xml
index 9475a05..682fe52 100644
--- a/plugin.video.svtplay/resources/language/Swedish/strings.xml
+++ b/plugin.video.svtplay/resources/language/Swedish/strings.xml
@@ -19,4 +19,5 @@
        <string id="30501">Snabbmenytext</string>
        <string id="30502">URL videokvalitet</string>
        <string id="30503">Kommando</string>
-</strings>
\ No newline at end of file
+       <string id="30504">Textning</string>
+</strings>
diff --git a/plugin.video.svtplay/resources/settings.xml 
b/plugin.video.svtplay/resources/settings.xml
index e34d0a9..2db2f8f 100644
--- a/plugin.video.svtplay/resources/settings.xml
+++ b/plugin.video.svtplay/resources/settings.xml
@@ -2,9 +2,10 @@
 <settings>
     <setting id="highest_bitrate" type="enum" label="30000" 
lvalues="30100|30101|30102|30103" default="3" />
     <setting id="list_size" type="enum" label="30001" values="20|50|100|200" 
default="1" />
+    <setting id="subtitles" type="bool" label="30504" default="false" />
     <setting id="debug" type="bool" label="30500" default="false" />
     <setting type="sep" />
     <setting id="context_menu" type="text" enable="eq(-2,true)" label="30501" 
default="DEBUG" />
     <setting id="highest_bitrate_debug" type="enum" enable="eq(-3,true)" 
label="30502" lvalues="30100|30101|30102|30103" default="3"/>
     <setting id="command" type="text" enable="eq(-4,true)" label="30503" 
default="echo &quot;URL %s NAME %s&quot;" />
-</settings>
\ No newline at end of file
+</settings>

http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=9e5081b7d5e2c2df1f19c5803da5299a36b9098e


http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=5e984c7e3f3f811b51081ab3dad1eb45e14d9695

commit 5e984c7e3f3f811b51081ab3dad1eb45e14d9695
Author: spiff <[email protected]>
Date:   Sun Feb 20 19:10:46 2011 +0100

    [plugin.program.rtorrent] updated to version 0.10.4

diff --git a/plugin.program.rtorrent/addon.xml 
b/plugin.program.rtorrent/addon.xml
index a96a312..04ca1a5 100644
--- a/plugin.program.rtorrent/addon.xml
+++ b/plugin.program.rtorrent/addon.xml
@@ -1,20 +1,20 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.program.rtorrent"
-       name="rTorrent"
-       version="0.10.3"
-       provider-name="Daniel Jolly">
-  <requires>
-    <import addon="xbmc.python" version="1.0"/>
-  </requires>
-  <extension point="xbmc.python.pluginsource" library="default.py">
-         <provides>executable</provides>
-  </extension> 
-  <extension point="xbmc.addon.metadata">
-    <platform>all</platform>
-    <summary lang="en">rTorrent Control Plugin</summary>
-       <summary lang="de">rTorrent Plugin</summary>
-       <summary lang="nl">Controleplugin voor rTorrent</summary>
-    <description lang="en">Manages your rTorrent queue from within XBMC!
+               name="rTorrent"
+               version="0.10.4"
+               provider-name="Daniel Jolly">
+       <requires>
+               <import addon="xbmc.python" version="1.0"/>
+       </requires>
+       <extension point="xbmc.python.pluginsource" library="default.py">
+               <provides>executable</provides>
+       </extension> 
+       <extension point="xbmc.addon.metadata">
+               <platform>all</platform>
+               <summary lang="en">rTorrent Control Plugin</summary>
+               <summary lang="de">rTorrent Plugin</summary>
+               <summary lang="nl">Controleplugin voor rTorrent</summary>
+               <description lang="en">Manages your rTorrent queue from within 
XBMC!
 
 Quickly and easily start, stop, erase, play and change priority of torrents 
managed in rTorrent.
 
@@ -25,7 +25,7 @@ Instructions
 
 Any issues, ideas or any other comments, please visit:
 http://wiki.github.com/djcode/XBMC-rTorrent-Plugin/</description>
-       <description lang="de">Verwalte deine rTorrent queue aus XBMC heraus!
+               <description lang="de">Verwalte deine rTorrent queue aus XBMC 
heraus!
 
 Starte, stoppe, lösche, gebe wieder und ändere die Priorität deiner 
Torrents von rTorrent.
 
@@ -36,7 +36,7 @@ Anleitung
 
 Bei Problemen, Fragen oder Anregungen, schaut bei:
 http://wiki.github.com/djcode/XBMC-rTorrent-Plugin/</description>
-       <description lang="nl">Beheer uw rTorrentsessie vanuit XBMC!
+               <description lang="nl">Beheer uw rTorrentsessie vanuit XBMC!
 
 Met deze plugin kunt u snel en makkelijk torrents starten, stoppen en 
verwijderen, en hun prioriteit wijzigen.
 
@@ -47,5 +47,5 @@ Instructies
 
 Indien u problemen, vragen of suggesties hebt, bezoek dan de site:
 http://wiki.github.com/djcode/XBMC-rTorrent-Plugin/</description>
-  </extension>
+       </extension>
 </addon>
\ No newline at end of file
diff --git a/plugin.program.rtorrent/changelog.txt 
b/plugin.program.rtorrent/changelog.txt
index fdc5e8d..3116c3e 100644
--- a/plugin.program.rtorrent/changelog.txt
+++ b/plugin.program.rtorrent/changelog.txt
@@ -1,3 +1,6 @@
+0.10.4 - 2011/02/11
+* Fixed bug that will speed up viewing files.
+
 0.10.3 - 2010/11/03
 * Added more padding around the icon
 
diff --git a/plugin.program.rtorrent/icon.png b/plugin.program.rtorrent/icon.png
old mode 100755
new mode 100644
index 347b701..4dbeeb6
Binary files a/plugin.program.rtorrent/icon.png and 
b/plugin.program.rtorrent/icon.png differ
diff --git a/plugin.program.rtorrent/resources/lib/mode_files.py 
b/plugin.program.rtorrent/resources/lib/mode_files.py
index f4f5f7d..23cd6f8 100644
--- a/plugin.program.rtorrent/resources/lib/mode_files.py
+++ b/plugin.program.rtorrent/resources/lib/mode_files.py
@@ -8,10 +8,10 @@ import xbmc
 
 #Files inside a multi-file torrent code
 def main(hash,numfiles):
-       for i in range(0,numfiles):
-               f = []
-               f = 
g.rtc.f.multicall(hash,1,"f.get_path=","f.get_completed_chunks=","f.get_size_chunks=","f.get_priority=","f.get_size_bytes=")
-               f = f[i]
+       files = []
+       files = 
g.rtc.f.multicall(hash,1,"f.get_path=","f.get_completed_chunks=","f.get_size_chunks=","f.get_priority=","f.get_size_bytes=")
+       i=0
+       for f in files: 
                f_name = f[0]
                f_completed_chunks = int(f[1])
                f_size_chunks = int(f[2])
@@ -38,6 +38,7 @@ def main(hash,numfiles):
                if not xbmcplugin.addDirectoryItem(int(sys.argv[1]), \
                        sys.argv[0]+"?mode=play&arg1="+str(i)+"&hash="+hash, \
                        li,totalItems=numfiles): break
+               i=i+1
        xbmcplugin.addSortMethod(int(sys.argv[1]), 
sortMethod=xbmcplugin.SORT_METHOD_TITLE )
        xbmcplugin.addSortMethod(int(sys.argv[1]), 
sortMethod=xbmcplugin.SORT_METHOD_SIZE )
        xbmcplugin.endOfDirectory(int(sys.argv[1]), cacheToDisc=False)
\ No newline at end of file

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

Summary of changes:
 plugin.program.rtorrent/addon.xml                  |   36 +++---
 plugin.program.rtorrent/changelog.txt              |    3 +
 plugin.program.rtorrent/icon.png                   |  Bin 93196 -> 79161 bytes
 .../resources/lib/mode_files.py                    |    9 +-
 plugin.video.gamesonnet/README                     |   15 +++
 plugin.video.gamesonnet/addon.xml                  |   24 ++++
 plugin.video.gamesonnet/changelog.txt              |    9 ++
 plugin.video.gamesonnet/default.py                 |   18 +++
 plugin.video.gamesonnet/icon.png                   |  Bin 0 -> 36042 bytes
 plugin.video.gamesonnet/resources/__init__.py      |    1 +
 plugin.video.gamesonnet/resources/images/logo.png  |  Bin 0 -> 34052 bytes
 .../resources/images/next-page.png                 |  Bin 14529 -> 14529 bytes
 .../resources/language/English/strings.xml         |   27 ++++
 plugin.video.gamesonnet/resources/lib/__init__.py  |    1 +
 .../resources/lib/gamesonnet_list.py               |  110 ++++++++++++++++
 .../resources/lib/gamesonnet_play.py               |  132 ++++++++++++++++++++
 plugin.video.gamesonnet/resources/settings.xml     |   12 ++
 plugin.video.svtplay/addon.xml                     |    2 +-
 plugin.video.svtplay/changelog.txt                 |    9 ++
 plugin.video.svtplay/default.py                    |   77 +++++++++---
 .../resources/language/English/strings.xml         |    3 +-
 .../resources/language/Swedish/strings.xml         |    3 +-
 plugin.video.svtplay/resources/settings.xml        |    3 +-
 23 files changed, 453 insertions(+), 41 deletions(-)
 mode change 100755 => 100644 plugin.program.rtorrent/icon.png
 create mode 100644 plugin.video.gamesonnet/README
 create mode 100644 plugin.video.gamesonnet/addon.xml
 create mode 100644 plugin.video.gamesonnet/changelog.txt
 create mode 100644 plugin.video.gamesonnet/default.py
 create mode 100644 plugin.video.gamesonnet/icon.png
 create mode 100644 plugin.video.gamesonnet/resources/__init__.py
 create mode 100644 plugin.video.gamesonnet/resources/images/logo.png
 copy {plugin.image.icanhascheezburger.com => 
plugin.video.gamesonnet}/resources/images/next-page.png (100%)
 create mode 100644 
plugin.video.gamesonnet/resources/language/English/strings.xml
 create mode 100644 plugin.video.gamesonnet/resources/lib/__init__.py
 create mode 100644 plugin.video.gamesonnet/resources/lib/gamesonnet_list.py
 create mode 100644 plugin.video.gamesonnet/resources/lib/gamesonnet_play.py
 create mode 100644 plugin.video.gamesonnet/resources/settings.xml


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to