The branch, eden has been updated
via 7e84693a29b934cba6f2dfca4b2506e9fbdd1a1e (commit)
from f948514687660c5894db81e70b088e605f74e6a5 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=7e84693a29b934cba6f2dfca4b2506e9fbdd1a1e
commit 7e84693a29b934cba6f2dfca4b2506e9fbdd1a1e
Author: amet <[email protected]>
Date: Tue Oct 9 11:04:04 2012 +0400
[script.common.plugin.cache] -v1.3.0
[B]Version 1.2.0[/B]
- Minor fixes
[B]Version 1.1.0[/B]
- Minor fixes
diff --git a/script.common.plugin.cache/addon.xml
b/script.common.plugin.cache/addon.xml
index d23abe2..4fd4d49 100644
--- a/script.common.plugin.cache/addon.xml
+++ b/script.common.plugin.cache/addon.xml
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
-<addon id='script.common.plugin.cache' version='1.1.0' name='Common plugin
cache' provider-name='TheCollective'>
+<addon id='script.common.plugin.cache' version='1.3.0' name='Common plugin
cache' provider-name='TheCollective'>
<requires>
<import addon='xbmc.python' version='2.0'/>
</requires>
@@ -10,4 +10,4 @@
<summary lang='en'>Common caching api for xbmc plugins.</summary>
</extension>
<extension point='xbmc.python.module' library='lib' />
-</addon>
\ No newline at end of file
+</addon>
diff --git a/script.common.plugin.cache/changelog.txt
b/script.common.plugin.cache/changelog.txt
index d1b4042..2659718 100644
--- a/script.common.plugin.cache/changelog.txt
+++ b/script.common.plugin.cache/changelog.txt
@@ -1,3 +1,9 @@
+[B]Version 1.2.0[/B]
+- Minor fixes
+
+[B]Version 1.1.0[/B]
+- Minor fixes
+
[B]Version 1.0.0[/B]
- Minor fixes
diff --git a/script.common.plugin.cache/lib/StorageServer.py
b/script.common.plugin.cache/lib/StorageServer.py
index aaa23bb..20510af 100644
--- a/script.common.plugin.cache/lib/StorageServer.py
+++ b/script.common.plugin.cache/lib/StorageServer.py
@@ -33,7 +33,7 @@ except: pass
class StorageServer():
def __init__(self, table=None, timeout=24, instance=False):
- self.version = "1.1.0"
+ self.version = "1.3.0"
self.plugin = "StorageClient-" + self.version
self.instance = instance
self.die = False
@@ -83,6 +83,7 @@ class StorageServer():
self.platform = sys.platform
self.modules = sys.modules
+ self.network_buffer_size = 4096
if isinstance(table, str) and len(table) > 0:
self.table = ''.join(c for c in table if c in "%s%s" %
(string.ascii_letters, string.digits))
@@ -227,7 +228,7 @@ class StorageServer():
self._runCommand(data)
idle_since = time.time()
- self._log("Done", 3)
+ self._log("Done")
self._log("Closing down")
sock.close()
@@ -248,7 +249,7 @@ class StorageServer():
while data[len(data) - 2:] != "\r\n" or not idle:
try:
if idle:
- recv_buffer = sock.recv(4096)
+ recv_buffer = sock.recv(self.network_buffer_size)
idle = False
i += 1
self._log("got data : " + str(i) + " - " + repr(idle) + "
- " + str(len(data)) + " + " + str(len(recv_buffer)) + " | " +
repr(recv_buffer)[len(recv_buffer) - 5:], 4)
@@ -290,8 +291,8 @@ class StorageServer():
send_buffer = " "
try:
if idle:
- if len(data) > 4096:
- send_buffer = data[:4096]
+ if len(data) > self.network_buffer_size:
+ send_buffer = data[:self.network_buffer_size]
else:
send_buffer = data + "\r\n"
@@ -306,8 +307,8 @@ class StorageServer():
i -= 1
idle = True
- if len(data) > 4096:
- data = data[4096:]
+ if len(data) > self.network_buffer_size:
+ data = data[self.network_buffer_size:]
else:
data = ""
@@ -459,7 +460,7 @@ class StorageServer():
def _evaluate(self, data):
try:
- data = eval(data)
+ data = eval(data) # Test json.loads vs eval
return data
except:
self._log("Couldn't evaluate message : " + repr(data))
@@ -511,6 +512,8 @@ class StorageServer():
def _setCache(self, cache, name, ret_val):
self._log("")
if len(ret_val) > 0:
+ if not isinstance(cache, dict):
+ cache = {}
cache[name] = {"timestamp": time.time(),
"timeout": self.timeout,
"res": ret_val}
diff --git a/script.common.plugin.cache/xbmcvfsdummy.py
b/script.common.plugin.cache/xbmcvfsdummy.py
index fe467f9..e69de29 100644
--- a/script.common.plugin.cache/xbmcvfsdummy.py
+++ b/script.common.plugin.cache/xbmcvfsdummy.py
@@ -1,18 +0,0 @@
-'''
- XBMCVFS override for Dharma.
- Version: 1.0
-'''
-
-import os, sys, time, errno
-
-def exists(target):
- return os.path.exists(target)
-
-def rename(origin, target):
- return os.rename(origin, target)
-
-def delete(target):
- if os.path.isfile(target) and not os.path.isdir(target):
- return os.unlink(target)
- return False
-
-----------------------------------------------------------------------
Summary of changes:
script.common.plugin.cache/addon.xml | 4 ++--
script.common.plugin.cache/changelog.txt | 6 ++++++
script.common.plugin.cache/lib/StorageServer.py | 19 +++++++++++--------
script.common.plugin.cache/xbmcvfsdummy.py | 18 ------------------
4 files changed, 19 insertions(+), 28 deletions(-)
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons