The branch, dharma has been updated
via 6cec520b52c551d8c356ed0ce72c7f06b0b12f94 (commit)
from 1d2d463ba0c4b82e77ef17e26530e9909e568eec (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=6cec520b52c551d8c356ed0ce72c7f06b0b12f94
commit 6cec520b52c551d8c356ed0ce72c7f06b0b12f94
Author: taxigps <[email protected]>
Date: Sun Jan 16 11:25:57 2011 +0800
[plugin.program.utorrent] fixed: split torrent items wrong when commas in
the torrent name
diff --git a/plugin.program.utorrent/addon.xml
b/plugin.program.utorrent/addon.xml
index 143f3f6..b7a0cb9 100644
--- a/plugin.program.utorrent/addon.xml
+++ b/plugin.program.utorrent/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.program.utorrent"
name="uTorrent"
- version="1.0.2"
+ version="1.0.3"
provider-name="Taxigps">
<requires>
<import addon="xbmc.python" version="1.0"/>
diff --git a/plugin.program.utorrent/changelog.txt
b/plugin.program.utorrent/changelog.txt
index f7b60e9..4e54b61 100644
--- a/plugin.program.utorrent/changelog.txt
+++ b/plugin.program.utorrent/changelog.txt
@@ -1,5 +1,8 @@
-[B]1.0.2 (2011.1.16)[/B]
-chaged: use xbmc.log to log debug message
+[B]1.0.3 (2011.1.16)[/B]
+fixed: split torrent items wrong when commas in the torrent name
+
+[B]1.0.2 (2011.1.15)[/B]
+chaged: use xbmc.log() to log debug message
[B]1.0.1 (2011.1.8)[/B]
fixed: rssfeeds cause error in updateList()
diff --git a/plugin.program.utorrent/default.py
b/plugin.program.utorrent/default.py
index 4d3bd18..b69e0c0 100644
--- a/plugin.program.utorrent/default.py
+++ b/plugin.program.utorrent/default.py
@@ -1,7 +1,7 @@
import urllib, sys, os, re, time
import xbmcaddon, xbmcplugin, xbmcgui, xbmc
-# uTorrent Plugin v1.0.2
+# uTorrent Plugin v1.0.3
# Plugin constants
__addonname__ = "uTorrent"
@@ -45,7 +45,7 @@ def getToken():
return token
-def getList():
+def updateList():
token = getToken()
url = baseurl + token + '&list=1'
data = myClient.HttpCmd(url)
@@ -53,43 +53,35 @@ def getList():
torrentList = []
for line in data:
if '\"rssfeeds\"' in line:
- xbmc.log( "%s::getList - %s" % ( __addonname__, 'break with
\"rssfeeds\"' ), xbmc.LOGDEBUG )
+ xbmc.log( "%s::updateList - %s" % ( __addonname__, 'break with
\"rssfeeds\"' ), xbmc.LOGDEBUG )
break
if len(line) > 80:
- torrentList.append(line)
- xbmc.log( "%s::getList - %d: %s" % ( __addonname__,
len(torrentList), line ), xbmc.LOGDEBUG )
+ tor = re.findall('\"[^\"]*\"|[0-9\-]+', line)
+ xbmc.log( "%s::updateList - %d: %s" % ( __addonname__,
len(torrentList), str(tor) ), xbmc.LOGDEBUG )
+ hashnum = tor[0][1:-1]
+ status = tor[1]
+ torname = tor[2]
+ complete = tor[4]
+ complete = int(complete)
+ complete = complete / 10.0
+ size = int(tor[3]) / (1024*1024)
+ if (size >= 1024.00):
+ size_str = str(round(size / 1024.00,2)) +"Gb"
+ else:
+ size_str = str(size) + "Mb"
+ up_rate = round(float(tor[8]) / (1024),2)
+ down_rate = round(float(tor[9]) / (1024),2)
+ remain = int(tor[10]) / 60
+ if (remain >=60):
+ remain_str = str(remain//60) +
__language__(30006).encode('utf8') + str(remain%60) +
__language__(30007).encode('utf8')
+ elif(remain == -1):
+ remain_str = __language__(30008).encode('utf8')
+ else:
+ remain_str = str(remain) + __language__(30007).encode('utf8')
+ tup = (hashnum, status, torname, complete, size_str, up_rate,
down_rate,remain_str)
+ torrentList.append(tup)
return torrentList
-def updateList():
- torrentList = getList()
- tupList = []
- for line in torrentList:
- tor = line.split(',')
- hashnum = tor[0]
- hashnum = hashnum[2:-1]
- status = tor[1]
- torname = tor[2]
- complete = tor[4]
- complete = int(complete)
- complete = complete / 10.0
- size = int(tor[3]) / (1024*1024)
- if (size >= 1024.00):
- size_str = str(round(size / 1024.00,2)) +"Gb"
- else:
- size_str = str(size) + "Mb"
- up_rate = round(float(tor[8]) / (1024),2)
- down_rate = round(float(tor[9]) / (1024),2)
- remain = int(tor[10]) / 60
- if (remain >=60):
- remain_str = str(remain//60) + __language__(30006).encode('utf8') +
str(remain%60) + __language__(30007).encode('utf8')
- elif(remain == -1):
- remain_str = __language__(30008).encode('utf8')
- else:
- remain_str = str(remain) + __language__(30007).encode('utf8')
- tup = (hashnum, status, torname, complete, size_str, up_rate,
down_rate,remain_str)
- tupList.append(tup)
- return tupList
-
def listTorrents():
tupList = updateList()
mode = 1
-----------------------------------------------------------------------
Summary of changes:
plugin.program.utorrent/addon.xml | 2 +-
plugin.program.utorrent/changelog.txt | 7 +++-
plugin.program.utorrent/default.py | 62 ++++++++++++++------------------
3 files changed, 33 insertions(+), 38 deletions(-)
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons