The branch, dharma has been updated
via 018c0b9cf6c6df604f3caaadcb460b377a636a20 (commit)
via e287d35c097419bd8eeb5cde6ddd740e9b68c31c (commit)
via f1aecc643171ccf1fc3930e3f632d48fd894075e (commit)
from 6cec520b52c551d8c356ed0ce72c7f06b0b12f94 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=018c0b9cf6c6df604f3caaadcb460b377a636a20
commit 018c0b9cf6c6df604f3caaadcb460b377a636a20
Author: spiff <[email protected]>
Date: Wed Jan 19 13:16:36 2011 +0100
[plugin.image.facebook] updated to version 0.9.7
diff --git a/plugin.image.facebook/addon.py b/plugin.image.facebook/addon.py
index e536fb1..7b7581c 100644
--- a/plugin.image.facebook/addon.py
+++ b/plugin.image.facebook/addon.py
@@ -13,6 +13,7 @@ class AddonHelper:
self._urllib2 = None
self._time = None
self._re = None
+ self._binascii = None
def xbmc(self):
if self._xbmc: return self._xbmc
@@ -93,9 +94,9 @@ class AddonHelper:
if self._params == None: self._getParams()
try:
if no_unquote:
- return self._params.get(key,default)
+ return
self._params.get(key,default).decode('utf-8')
else:
- return urllib.unquote_plus(self._params[key])
+ return
urllib.unquote_plus(self._params.get(key,default)).decode('utf-8')
except:
return default
@@ -126,12 +127,21 @@ class AddonHelper:
self.xbmcplugin().endOfDirectory(int(sys.argv[1]),succeeded=succeeded,updateListing=updateListing,cacheToDisc=cacheToDisc)
def getFile(self,url,target_file):
- request = self.urllib2().urlopen(url)
- f = open(target_file,"wb")
+ try:
+ request = self.urllib2().urlopen(url)
+ except:
+ print 'ERROR: AddonHelper - urlopen() in getFile()'
+ self.genericError()
+ return ''
+ f = open(target_file,"wb")
f.write(request.read())
f.close()
return target_file
+ def genericError(self):
+ print 'ERROR: %s::%s (%d) - %s' % (self.__class__.__name__
+ ,
sys.exc_info()[2].tb_frame.f_code.co_name, sys.exc_info()[2].tb_lineno,
sys.exc_info()[1])
+
def time(self):
if self._time: return self._time
import time
@@ -142,4 +152,10 @@ class AddonHelper:
if self._re: return self._re
import re
self._re = re
- return re
\ No newline at end of file
+ return re
+
+ def binascii(self):
+ if self._binascii: return self._binascii
+ import binascii
+ self._binascii = binascii
+ return binascii
\ No newline at end of file
diff --git a/plugin.image.facebook/addon.xml b/plugin.image.facebook/addon.xml
index 7fc1dfc..548e34d 100644
--- a/plugin.image.facebook/addon.xml
+++ b/plugin.image.facebook/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.image.facebook"
name="facebook"
- version="0.9.5"
+ version="0.9.7"
provider-name="Rick Phillips (ruuk)">
<requires>
<import addon="xbmc.python" version="1.0"/>
diff --git a/plugin.image.facebook/changelog.txt
b/plugin.image.facebook/changelog.txt
index e9479ca..9989806 100644
--- a/plugin.image.facebook/changelog.txt
+++ b/plugin.image.facebook/changelog.txt
@@ -1,6 +1,14 @@
facebookPhotos-XBMC Changelog
-Current Version : 0.9.5
+Current Version : 0.9.7
+
+*** 0.9.7 ***
+
+Bug fix: Album/Friend thunbnail caching was causing errors
+
+*** 0.9.6 ***
+
+More fixing for unicode characters
*** 0.9.5 ***
diff --git a/plugin.image.facebook/default.py b/plugin.image.facebook/default.py
index 65ea411..d0167dd 100644
--- a/plugin.image.facebook/default.py
+++ b/plugin.image.facebook/default.py
@@ -7,8 +7,8 @@ from addon import AddonHelper
__plugin__ = 'facebook'
__author__ = 'ruuk'
__url__ = 'http://code.google.com/p/facebookphotos-xbmc/'
-__date__ = '10-10-2010'
-__version__ = '0.9.5'
+__date__ = '01-18-2011'
+__version__ = '0.9.7'
def LOG(msg):
try:
@@ -16,6 +16,12 @@ def LOG(msg):
except:
fb.xbmc().log('FACEBOOKPHOTOS: ' +
msg.decode('utf-8','ignore').encode('ascii','replace'))
+def ERROR(message):
+ errtext = sys.exc_info()[1]
+ message = 'ERROR - %s::%s (%d) - %s' %
(message,sys.exc_info()[2].tb_frame.f_code.co_name,
sys.exc_info()[2].tb_lineno, errtext)
+ LOG(message)
+ return str(errtext)
+
class GraphWrapAuthError(Exception):
def __init__(self, type, message):
Exception.__init__(self, message)
@@ -95,8 +101,8 @@ class GraphWrap(facebook.GraphAPI):
res = br.open(url)
html = res.read()
except:
- self.genericError()
- return False
+ print "ERROR: TOKEN PAGE INITIAL READ"
+ raise
script = False
try:
@@ -120,10 +126,8 @@ class GraphWrap(facebook.GraphAPI):
url = res.geturl()
print "FORM"
except:
- self.genericError()
- #somethings wrong, abort
print "FORM ERROR"
- return False
+ raise
script = False
token = self.extractTokenFromURL(url)
@@ -233,7 +237,8 @@ class facebookSession(AddonHelper):
tot = len(albums['data'])
for a in albums['data']:
aid = a.get('id','')
- fn = os.path.join(self.CACHE_PATH,aid + '.jpg') #still
works even if image is not jpg - doesn't work without the extension
+ fbase = self.binascii().hexlify(aid.encode('utf-8'))
+ fn = os.path.join(self.CACHE_PATH,fbase + '.jpg')
#still works even if image is not jpg - doesn't work without the extension
tn =
"https://graph.facebook.com/"+aid+"/picture?access_token=" +
self.graph.access_token
if not os.path.exists(fn):
if self.get_album_photos: fn =
self.getFile(tn,fn)
@@ -261,7 +266,8 @@ class facebookSession(AddonHelper):
tot = len(srt)
for s in srt:
uid = show[s].get('id','')
- fn = os.path.join(self.CACHE_PATH,uid + '.jpg') #still
works even if image is not jpg - doesn't work without the extension
+ fbase = self.binascii().hexlify(uid.encode('utf-8'))
+ fn = os.path.join(self.CACHE_PATH,fbase + '.jpg')
#still works even if image is not jpg - doesn't work without the extension
tn =
"https://graph.facebook.com/"+uid+"/picture?type=large&access_token=" +
self.graph.access_token
if not os.path.exists(fn):
if self.get_friends_photos:
@@ -432,3 +438,11 @@ except GraphWrapAuthError,e:
xbmcgui.Dialog().ok(__language__(30111),__language__(30112),__language__(30113),__language__(30114))
token = getAuth()
if not token: facebookSession().getToken()
+except:
+ import xbmcgui,xbmcaddon #@UnresolvedImport @Reimport
+ __addon__ = xbmcaddon.Addon(id='plugin.image.facebook')
+ __language__ = __addon__.getLocalizedString
+
+ msg = ERROR('Unhandled')
+ xbmcgui.Dialog().ok(__language__(30108),__language__(30117),'',msg)
+ raise
diff --git a/plugin.image.facebook/resources/language/English/strings.xml
b/plugin.image.facebook/resources/language/English/strings.xml
index 9cce724..e044597 100644
--- a/plugin.image.facebook/resources/language/English/strings.xml
+++ b/plugin.image.facebook/resources/language/English/strings.xml
@@ -37,4 +37,6 @@
<string id="30115">Login Failure</string>
<string id="30116">Facebook Message: </string>
+
+ <string id="30117">Unhandled Error:</string>
</strings>
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=e287d35c097419bd8eeb5cde6ddd740e9b68c31c
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=f1aecc643171ccf1fc3930e3f632d48fd894075e
commit f1aecc643171ccf1fc3930e3f632d48fd894075e
Author: spiff <[email protected]>
Date: Wed Jan 19 13:14:25 2011 +0100
[plugin.video.revision3] updated to version 1.0.5
diff --git a/plugin.video.revision3/addon.xml b/plugin.video.revision3/addon.xml
index 020d09a..ec2deae 100644
--- a/plugin.video.revision3/addon.xml
+++ b/plugin.video.revision3/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.revision3"
name="Revision3"
- version="1.0.4"
+ version="1.0.5"
provider-name="stacked">
<requires>
<import addon="xbmc.python" version="1.0"/>
diff --git a/plugin.video.revision3/changelog.txt
b/plugin.video.revision3/changelog.txt
index 4400f9f..eee8c5f 100644
--- a/plugin.video.revision3/changelog.txt
+++ b/plugin.video.revision3/changelog.txt
@@ -1,3 +1,7 @@
+[B]Version 1.0.5[/B]
+
+- Cleaned up info labels
+
[B]Version 1.0.4[/B]
- Fixed settings error
diff --git a/plugin.video.revision3/default.py
b/plugin.video.revision3/default.py
index 1e657cf..ebfff6e 100644
--- a/plugin.video.revision3/default.py
+++ b/plugin.video.revision3/default.py
@@ -4,8 +4,8 @@ import xbmc, xbmcgui, xbmcplugin, urllib2, urllib, re, string,
sys, os, tracebac
__plugin__ = 'Revision3'
__author__ = 'stacked <[email protected]>'
__url__ = 'http://code.google.com/p/plugin/'
-__date__ = '01-05-2011'
-__version__ = '1.0.4'
+__date__ = '01-17-2011'
+__version__ = '1.0.5'
__settings__ = xbmcaddon.Addon(id='plugin.video.revision3')
def open_url(url):
@@ -35,19 +35,20 @@ def build_sub_directory(url, name):
data = open_url(url)
plot = re.compile('<content:encoded>\n(.+?)\n </content:encoded>',
re.DOTALL).findall(data)
number = re.compile('<guid
isPermaLink="false">(.+?)</guid>').findall(data)
- match = re.compile('<item>(.+?)<title>(.+?) - ',
re.DOTALL).findall(data)
+ match = re.compile('<item>(.+?)<title>(.+?)</title>',
re.DOTALL).findall(data)
link = re.compile('<enclosure url="(.+?)"').findall(data)
image = re.compile('</media:description>\n (<media:thumbnail
url="(.+?)" width="100" height="100" />\n )?<media:player url',
re.DOTALL).findall(data)
count = 0
if len(match) == 0:
dialog = xbmcgui.Dialog()
- ok = dialog.ok(__plugin__,
__settings__.getLocalizedString(30001) + '\n' +
__settings__.getSetting('quality') + __settings__.getLocalizedString(30002))
+ ok = dialog.ok(__plugin__, xbmc.getLocalizedString(30001) +
'\n' + __settings__.getSetting('quality') + xbmc.getLocalizedString(30002))
for title in match:
episode = int(number[count].rsplit('/', 2)[1].lstrip('0'))
url = link[count]
- listitem = xbmcgui.ListItem(label = clean(match[count][1]),
iconImage = image[count][1], thumbnailImage = image[count][1])
- listitem.setInfo( type = "Video", infoLabels = { "Title":
clean(match[count][1]), "Director": __plugin__, "Studio": genre, "Plot":
clean(plot[count]), "Episode": episode } )
- u = sys.argv[0] + "?mode=2&name=" +
urllib.quote_plus(clean(match[count][1])) + "&url=" + urllib.quote_plus(url) +
"&plot=" + urllib.quote_plus(clean(plot[count])) + "&genre=" +
urllib.quote_plus(genre) + "&episode=" + urllib.quote_plus(str(episode))
+ name = clean(match[count][1].rstrip(' - ' +
match[count][1].rsplit(' - ')[-1:][0]))
+ listitem = xbmcgui.ListItem(label = name, iconImage =
image[count][1], thumbnailImage = image[count][1])
+ listitem.setInfo( type = "Video", infoLabels = { "Title": name,
"Director": __plugin__, "Studio": genre, "Plot": clean(plot[count]), "Episode":
episode } )
+ u = sys.argv[0] + "?mode=2&name=" + urllib.quote_plus(name) +
"&url=" + urllib.quote_plus(url) + "&plot=" +
urllib.quote_plus(clean(plot[count])) + "&genre=" + urllib.quote_plus(genre) +
"&episode=" + urllib.quote_plus(str(episode))
ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url
= u, listitem = listitem, isFolder = False)
count += 1
xbmcplugin.addSortMethod( handle = int(sys.argv[ 1 ]), sortMethod =
xbmcplugin.SORT_METHOD_NONE )
-----------------------------------------------------------------------
Summary of changes:
plugin.image.facebook/addon.py | 26 +++-
plugin.image.facebook/addon.xml | 2 +-
plugin.image.facebook/changelog.txt | 10 ++-
plugin.image.facebook/default.py | 32 +++--
.../resources/language/English/strings.xml | 2 +
.../LICENSE.txt | 147 +++++++++-----------
.../addon.xml | 12 +-
plugin.video.day9/changelog.txt | 8 +
plugin.video.day9/day9.py | 72 ++++++++++
plugin.video.day9/default.py | 35 +++++
plugin.video.day9/fanart.jpg | Bin 0 -> 126127 bytes
plugin.video.day9/icon.png | Bin 0 -> 53607 bytes
plugin.video.revision3/addon.xml | 2 +-
plugin.video.revision3/changelog.txt | 4 +
plugin.video.revision3/default.py | 15 +-
15 files changed, 257 insertions(+), 110 deletions(-)
copy {plugin.video.vimeo => plugin.video.day9}/LICENSE.txt (86%)
copy {plugin.video.nascar => plugin.video.day9}/addon.xml (52%)
create mode 100644 plugin.video.day9/changelog.txt
create mode 100644 plugin.video.day9/day9.py
create mode 100644 plugin.video.day9/default.py
create mode 100644 plugin.video.day9/fanart.jpg
create mode 100644 plugin.video.day9/icon.png
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