The branch, eden has been updated
       via  33fe695600a1d9aa07b8815599ba94ab365ac304 (commit)
       via  e1e4e6401653a5d1bcfad6bcb0e003660000204b (commit)
      from  6b65c0be99d333b9e23f2c3ab89033adc032665f (commit)

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

commit 33fe695600a1d9aa07b8815599ba94ab365ac304
Author: amet <[email protected]>
Date:   Wed Apr 18 17:29:12 2012 +0400

    [script.facebook.media] -v 0.6.9
    
    *** 0.6.9 ***
    
    New authorization method.
    
    *** 0.6.8 ***
    
    Added debug option in settings (Currently only prints HTML to log when auth 
fails)
    Fixed skin customizing for 1080 skins.
    Removed *args,**kwargs from window __init__'s to get rid of deprecation 
warning
    Added logging of version
    
    *** 0.6.7 ***
    
    Fixed a bug causing an error when showing comments/likes
    
    *** 0.6.6 ***
    
    Added ability to disable auto-login during authorization
    Improved response to failed/unfinished authorization
    
    *** 0.6.5 ***
    
    Add sharing and feeds for ShareSocial interaction

diff --git a/script.facebook.media/addon.xml b/script.facebook.media/addon.xml
index 8f51492..d1a5b60 100644
--- a/script.facebook.media/addon.xml
+++ b/script.facebook.media/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="script.facebook.media"
        name="Facebook Media"
-       version="0.6.4"
+       version="0.6.9"
        provider-name="Rick Phillips (ruuk)">
   <requires>
     <import addon="xbmc.python" version="2.0"/>
diff --git a/script.facebook.media/changelog.txt 
b/script.facebook.media/changelog.txt
index 5143043..ceb20f1 100644
--- a/script.facebook.media/changelog.txt
+++ b/script.facebook.media/changelog.txt
@@ -1,6 +1,6 @@
 Facebook Media Changelog
 
-Current Version : 0.6.4
+Current Version : 0.6.9
 
 Known Issues/TODO:
        -Needs to handle mouse control better (ie no access to photo/video menu)
@@ -9,6 +9,30 @@ Known Issues/TODO:
        -Exit photo/tags view with same photo selected (option?)
        -Go to tagged friend when selecting tag from photo/tags view
 
+*** 0.6.9 ***
+
+New authorization method.
+
+*** 0.6.8 ***
+
+Added debug option in settings (Currently only prints HTML to log when auth 
fails)
+Fixed skin customizing for 1080 skins.
+Removed *args,**kwargs from window __init__'s to get rid of deprecation warning
+Added logging of version
+
+*** 0.6.7 ***
+
+Fixed a bug causing an error when showing comments/likes
+
+*** 0.6.6 ***
+
+Added ability to disable auto-login during authorization
+Improved response to failed/unfinished authorization
+
+*** 0.6.5 ***
+
+Add sharing and feeds for ShareSocial interaction
+
 *** 0.6.4 ***
 
 Restart interval when pressing prev/next or moving through tags during 
slideshow
diff --git a/script.facebook.media/default.py b/script.facebook.media/default.py
index 7b212c0..9b3b0d1 100644
--- a/script.facebook.media/default.py
+++ b/script.facebook.media/default.py
@@ -16,7 +16,7 @@ from facebook import GraphAPIError, GraphWrapAuthError
 __author__ = 'ruuk (Rick Phillips)'
 __url__ = 'http://code.google.com/p/facebook-media/'
 __date__ = '01-26-2012'
-__version__ = '0.6.4'
+__version__ = '0.6.9'
 __addon__ = xbmcaddon.Addon(id='script.facebook.media')
 __lang__ = __addon__.getLocalizedString
 
@@ -61,6 +61,8 @@ def DONOTHING(text):
 def LOG(message):
        print 'FACEBOOK MEDIA: %s' % ENCODE(str(message))
        
+LOG('Version: ' + __version__)
+
 def ERROR(message):
        LOG(message)
        traceback.print_exc()
@@ -244,6 +246,8 @@ class SlideshowTagsWindow(BaseWindow):
                                self.startSlideshow()
                elif action == ACTION_STOP:
                        self.stopSlideshow()
+               elif action == ACTION_CONTEXT_MENU:
+                       
self.session.showPhotoDialog(self.currentPhoto().source(''))
                else:
                        self.resetSlideshow()
                        
self.getControl(150).setAnimations([('conditional','effect=fade start=100 end=0 
time=400 delay=2000 condition=Control.IsVisible(150)')])
@@ -410,33 +414,27 @@ class FacebookSession:
 
                self.endProgress()
                
-       def start(self):
+       def start(self,noApp=False):
                user = self.getCurrentUser()
                if not user:
                        if not self.openAddUserWindow(): return False
                        user = self.getCurrentUser()
                
-               self.graph = self.newGraph(     user.email,
-                                                                       
user.password,
-                                                                       user.id,
-                                                                       
user.token,
-                                                                       
self.newTokenCallback )
+               self.graph = newGraph(  user.email,
+                                                               user.password,
+                                                               user.id,
+                                                               user.token,
+                                                               
self.newTokenCallback )
                
                #print user.username
                #print user.email
-               
+               if noApp: return
                self.loadOptions()
                self.CATEGORIES()
                self.setCurrentState()
                self.setUserDisplay()
                return True
                
-       def 
newGraph(self,email,password,uid=None,token=None,new_token_callback=None):
-               graph = 
facebook.GraphWrap(token,new_token_callback=new_token_callback)
-               
graph.setAppData('150505371652086',scope='user_photos,friends_photos,user_videos,friends_videos,publish_stream')
-               graph.setLogin(email,password,uid)
-               return graph
-               
        def newTokenCallback(self,token):
                self.token = token
                if self.currentUser: self.currentUser.updateToken(token)
@@ -614,6 +612,40 @@ class FacebookSession:
                self.imageURLCache[ID] = tn_url
                return tn_url
                
+       def sharePhoto(self,url):
+               LOG('Sharing Photo')
+               try:
+                       import ShareSocial #@UnresolvedImport
+               except:
+                       return
+               
+               share = ShareSocial.getShare('script.facebook.media','image')
+               share.content = url
+               share.name = 'Facebook Media'
+               share.title = 'Facebook Media Photo'
+               share.share()
+               
+       def showPhotoDialog(self,url):
+               options = []
+               optionIDs = []
+               try:
+                       import ShareSocial #@UnresolvedImport
+                       if 
ShareSocial.shareTargetAvailable('image','script.facebook.media'):
+                               options.append(__lang__(30056))
+                               optionIDs.append('share')
+               except:
+                       pass
+               if not options:
+                       options.append(__lang__(30058))
+                       optionIDs.append('NOOPTIONS')
+               idx = xbmcgui.Dialog().select(__lang__(30057),options)
+               if idx < 0:
+                       return
+               else:
+                       option = optionIDs[idx]
+               if option == 'share':
+                       self.sharePhoto(url)
+               
        def ALBUMS(self,item):
                LOG('ALBUMS - STARTED')
                uid = item.getProperty('uid')
@@ -1246,7 +1278,7 @@ class FacebookSession:
                        self.progAutoCt+=1
                        ct = self.progAutoCt
                        
message=self.progAutoMessage.replace('@CT',str(ct)).replace('@TOT',str(total))
-               if not self.progressVisible: return
+               if not self.progressVisible: return True
                if self.cancel_progress: return False
                try:
                        if ct < 0 or ct > total:
@@ -1411,12 +1443,19 @@ class FacebookSession:
                        self.newUserCache = None
                        return
                
+               if not token:
+                       LOG('addUser(): Failed to get authorization token')
+                       xbmcgui.Dialog().ok(__lang__(30035),__lang__(30060))
+                       self.closeWindow()
+                       self.newUserCache = None
+                       return
+               
                LOG("ADD USER PART 2")
                self.window.getControl(112).setVisible(False)
                self.window.getControl(121).setVisible(False)
                #email,password = self.newUserCache
                self.newUserCache = None
-               graph = self.newGraph(email, password,token=token)
+               graph = newGraph(email, password,token=token)
                #graph.getNewToken()
                self.window.getControl(122).setVisible(False)
                self.window.getControl(131).setVisible(False)
@@ -1512,12 +1551,19 @@ class FacebookSession:
                if not setting: return default
                if type(default) == type(0):
                        return int(float(setting))
+               elif isinstance(default,bool):
+                       return default == 'true'
                return setting
-               
-       def getAuth(self,email='',password='',graph=None):
+       
+       def getAuth(self,email='',password='',graph=None,no_auto=False):
+               xbmcgui.Dialog().ok('Authorize','Goto 
xbmc.2ndmind.net/fb','Authorize the addon, and write down the pin.','Click OK 
when done')
+               token = doKeyboard('Enter the 4 digit pin')
+               return token
+       
+       def getAuthOld(self,email='',password='',graph=None,no_auto=False):
                redirect = 
urllib.quote('http://2ndmind.com/facebookphotos/complete.html')
-               scope = 
urllib.quote('user_photos,friends_photos,user_photo_video_tags,friends_photo_video_tags,user_videos,friends_videos,publish_stream')
-               url = 
'https://graph.facebook.com/oauth/authorize?client_id=150505371652086&redirect_uri=%s&type=user_agent&scope=%s'
 % (redirect,scope)
+               scope = 
urllib.quote('user_photos,friends_photos,user_photo_video_tags,friends_photo_video_tags,user_videos,friends_videos,publish_stream,read_stream')
+               url = 
'https://graph.facebook.com/oauth/authorize?client_id=150505371652086&redirect_uri=%s&display=page&scope=%s'
 % (redirect,scope)
                from webviewer import webviewer #@UnresolvedImport
                login = {'action':'login.php'}
                if email and password:
@@ -1526,10 +1572,15 @@ class FacebookSession:
                autoForms = [login,{'action':'uiserver.php'}]
                autoClose = 
{'url':'.*access_token=.*','heading':__lang__(30049),'message':__lang__(30050)}
                webviewer.WR.browser._ua_handlers["_cookies"].cookiejar.clear()
-               url,html = 
webviewer.getWebResult(url,autoForms=autoForms,autoClose=autoClose) 
#@UnusedVariable
+               if no_auto or self.getSetting('disable_auto_login', False):
+                       url,html = webviewer.getWebResult(url) #@UnusedVariable
+               else:
+                       url,html = 
webviewer.getWebResult(url,autoForms=autoForms,autoClose=autoClose) 
#@UnusedVariable
+               
+               if self.getSetting('debug', False): print html
                
                if not graph: graph = self.graph
-               if not graph: graph = self.newGraph(email, password)
+               if not graph: graph = newGraph(email, password)
                token = graph.extractTokenFromURL(url)
                if graph.tokenIsValid(token):
                        return token
@@ -1545,15 +1596,17 @@ def doKeyboard(prompt,default='',hidden=False):
 def createWindowFile(skin_name):
        if not skin_name: raise Exception
        from elementtree import ElementTree as etree #@UnresolvedImport
-       fonts_xml = open(os.path.join(SKIN_PATH,'720p','Font.xml')).read()
+       
+       path = os.path.join(SKIN_PATH,'720p','Font.xml')
+       if not os.path.exists(path): path = 
os.path.join(SKIN_PATH,'1080i','Font.xml')
+       if not os.path.exists(path): return
+       
+       fonts_xml = open(path).read()   
        fonts_dom = etree.fromstring(fonts_xml)
        curr_fonts = {  'font10_title':12,
                                        'font12_title':16,
-                                       'font12_title':20,
-                                       'font24_title':24,
-                                       'font28_title':28,
-                                       'font30_title':30,
-                                       'WeatherTemp':80}
+                                       'font13_title':20,
+                                       'font24_title':24}
        
        new_fonts = {}
        
@@ -1611,7 +1664,29 @@ def openWindow(window_name,session=None,**kwargs):
                        return #Won't happen :)
                w.doModal()                     
                del w
-               
+
+def newGraph(email,password,uid=None,token=None,new_token_callback=None):
+       graph = facebook.GraphWrap(token,new_token_callback=new_token_callback)
+       
graph.setAppData('150505371652086',scope='user_photos,friends_photos,user_videos,friends_videos,publish_stream,read_stream')
+       graph.setLogin(email,password,uid)
+       return graph
+       
+def registerAsShareTarget():
+       try:
+               import ShareSocial #@UnresolvedImport
+       except:
+               LOG('Could not import ShareSocial')
+               return
+       
+       target = ShareSocial.getShareTarget()
+       target.addonID = 'script.facebook.media'
+       target.name = 'Facebook'
+       target.importPath = 'share'
+       target.shareTypes = 
['image','audio','video','imagefile','videofile','status']
+       target.provideTypes = ['feed']
+       ShareSocial.registerShareTarget(target)
+       LOG('Registered as share target with ShareSocial')
+       
 XBMC_VERSION = xbmc.getInfoLabel('System.BuildVersion')
 SKIN_PATH = xbmc.translatePath('special://skin')
 if SKIN_PATH.endswith(os.path.sep): SKIN_PATH = SKIN_PATH[:-1]
@@ -1619,4 +1694,6 @@ CURRENT_SKIN = os.path.basename(SKIN_PATH)
 LOG('XBMC Version: %s' % XBMC_VERSION)
 LOG('XBMC Skin: %s' % CURRENT_SKIN)
 
-openWindow('main')
+if __name__ == '__main__':
+       registerAsShareTarget()
+       openWindow('main')
diff --git a/script.facebook.media/facebook.py 
b/script.facebook.media/facebook.py
index 6da8688..40f9e29 100644
--- a/script.facebook.media/facebook.py
+++ b/script.facebook.media/facebook.py
@@ -32,10 +32,15 @@ usage of this module might look like this:
                friends = graph.get_connections("me", "friends")
 
 """
-
+from poster.encode import multipart_encode
+import poster.streaminghttp
 import urllib, urllib2
 import sys, re
+from urllib2 import HTTPError
 from cgi import parse_qs
+
+poster.streaminghttp.register_openers()
+
 # Find a JSON parser
 try:
        import json
@@ -62,17 +67,17 @@ def ENCODE(string):
 
 def LOG(string):
        try:
-               print 'WEBVIEWER:facebook.py - %s' % ENCODE(str(string))
+               print 'FACEBOOK MEDIA:facebook.py - %s' % ENCODE(str(string))
                return
        except:
-               print "WEBVIEWER:facebook.py - COULDN'T ENCODE FOR LOG - 
RETRYING"
+               print "FACEBOOK MEDIA:facebook.py - COULDN'T ENCODE FOR LOG - 
RETRYING"
        
        try:
-               print 'WEBVIEWER:facebook.py - %s' % str(string)
+               print 'FACEBOOK MEDIA:facebook.py - %s' % str(string)
                return
        except:
-               print "WEBVIEWER:facebook.py - COULDN'T ENCODE FOR LOG - FINAL"
-       
+               print "FACEBOOK MEDIA:facebook.py - COULDN'T ENCODE FOR LOG - 
FINAL"
+
 class GraphAPI(object):
        """A client for the Facebook Graph API.
 
@@ -183,22 +188,56 @@ class GraphAPI(object):
                we send a POST request to the given path with the given 
arguments.
                """
                if not args: args = {}
+               headers = None
+               post_data = None
                if self.access_token:
-                       if post_args is not None:
-                               post_args["access_token"] = self.access_token
-                       else:
+                       if post_args is None:
                                args["access_token"] = self.access_token
-               if post_args is None: post_data = None
-               else: post_data = urllib.urlencode(post_args)
+                               post_data = None
+                       else:
+                               post_args["access_token"] = self.access_token
+                               post_data, headers = multipart_encode(post_args)
+               
                pre = "https://graph.facebook.com/";
                args = "?" + urllib.urlencode(args)
                if path.startswith('http'):
                        pre = ''
                        args = ''
-               fileob = urllib.urlopen(pre + path + args, post_data)
+                       
+               url = pre + path + args
+               try:
+                       if headers:
+                               request = urllib2.Request(url, post_data, 
headers)
+                               fileob = urllib2.urlopen(request)
+                       else:
+                               fileob = urllib2.urlopen(url,post_data)
+               except HTTPError, e:
+                       if e.code == 400:
+                               reason = e.headers.get('WWW-Authenticate')
+                               LOG('\nMessage: %s\nReason: %s' % 
(e.msg,reason))
+                               if 'invalid_token' in reason or 
'invalid_request' in reason:
+                                       raise GraphAPIError(    
'OAuthException',
+                                                                               
        'Expired/bad token')
+                       raise
                if update_prog: self.updateProgress(30)
                try:
-                       response = _parse_json(fileob.read())
+                       data = ''
+                       try:
+                               total = int(fileob.info()['content-length'])
+                       except:
+                               total = 1
+                               update_prog = False
+                       chunk = 4096
+                       sofar = 0
+                       while True:
+                               d = fileob.read(chunk)
+                               if not d: break
+                               data += d
+                               if update_prog:
+                                       sofar += chunk
+                                       prog = int((sofar * 40) / total)
+                                       if update_prog and not 
self.updateProgress(30 + prog): return
+                       response = _parse_json(data)
                finally:
                        fileob.close()
                
@@ -206,6 +245,9 @@ class GraphAPI(object):
                        raise GraphAPIError(response["error"]["type"],
                                                                
response["error"]["message"])
                return response
+       
+       def updateProgress(self,pct):
+               return True
 
 
 class GraphAPIError(Exception):
@@ -227,6 +269,9 @@ class Connections(list):
                self.progress = progress
                self.previous = ''
                self.next = ''
+               self.count = 0
+               if connections:
+                       self.count = connections.get('count',0)
                if connections: self.processConnections(connections)
                
        def processConnections(self,connections):
@@ -269,6 +314,14 @@ class Connections(list):
                except:
                        return limit
                
+import UserDict
+class UTF8DictWrap(UserDict.UserDict):
+       def get(self,key,failobj=None):
+               val = UserDict.UserDict.get(self, key, failobj)
+               if hasattr(val,'encode'): return val.encode('utf-8')
+               return val
+       
+                       
 class GraphObject:
        def __init__(self,ID=None,graph=None,data=None,**args):
                if (not ID) and data:
@@ -329,6 +382,8 @@ class GraphObject:
                                        return self._toJSON(val)
                                else:
                                        return 
Connections(self.graph,val,progress=False)
+                       return UTF8DictWrap(val)
+               if hasattr(val,'encode'): return val.encode('utf-8')
                return val
        
        def _getObjectData(self,ID,**args):
@@ -433,8 +488,10 @@ class GraphWrap(GraphAPI):
                self._progModifier = 1
                self._progTotal = 100
                self._progMessage = ''
+               self.uid = None
        
        def withProgress(self,callback,modifier=1,total=100,message=''):
+               poster.streaminghttp.PROGRESS_CALLBACK = callback
                self._progCallback = callback
                self._progModifier = modifier
                self._progTotal = total
@@ -444,7 +501,8 @@ class GraphWrap(GraphAPI):
        def updateProgress(self,level):
                if self._progCallback:
                        level *= self._progModifier
-                       
self._progCallback(int(level),self._progTotal,self._progMessage)
+                       return 
self._progCallback(int(level),self._progTotal,self._progMessage)
+               return True
                        
        def fromJSON(self,json_string):
                if not json_string: return None
@@ -455,7 +513,39 @@ class GraphWrap(GraphAPI):
                        elif 'id' in data_obj:
                                return GraphObject(graph=self,data=data_obj)
                return data_obj
-                       
+               
+       def putWallPost(self,message, attachment={}, profile_id="me"):
+               fail = False
+               try:
+                       return self.put_wall_post(message, attachment, 
profile_id)
+               except GraphAPIError,e:
+                       LOG(e.type)
+                       if not e.type == 'OAuthException': raise
+                       fail = True
+       
+               if fail:
+                       LOG("ERROR POSTING TO WALL - GETTING NEW TOKEN")
+                       if not self.getNewToken():
+                               if self.access_token: raise 
GraphWrapAuthError('RENEW_TOKEN_FAILURE','Failed to get new token')
+                               else: return None
+                       return self.put_wall_post(message, attachment, 
profile_id)
+               
+       def putObject(self,parent_object, connection_name, **data):
+               fail = False
+               try:
+                       return self.put_object(parent_object, connection_name, 
**data)
+               except GraphAPIError,e:
+                       LOG(e.type)
+                       if not e.type == 'OAuthException': raise
+                       fail = True
+       
+               if fail:
+                       LOG("ERROR POSTING OBJECT - GETTING NEW TOKEN")
+                       if not self.getNewToken():
+                               if self.access_token: raise 
GraphWrapAuthError('RENEW_TOKEN_FAILURE','Failed to get new token')
+                               else: return None
+                       return self.put_object(parent_object, connection_name, 
**data)
+               
        def getObject(self,ID,**args):
                return GraphObject(ID,self,**args)
        
@@ -557,9 +647,7 @@ class GraphWrap(GraphAPI):
                if not self.tokenIsValid(token):
                        #if script: LOG("HTML:" + html)
                        return False
-               LOG("|--------------------")
-               LOG("|TOKEN: %s" % token)
-               LOG("|--------------------")
+               LOG("\n|--------------------\n|TOKEN: 
%s\n|--------------------"  % token)
                self.saveToken(token)
                return token
                
diff --git a/script.facebook.media/resources/language/English/strings.xml 
b/script.facebook.media/resources/language/English/strings.xml
index 0e5dafa..007c4f2 100644
--- a/script.facebook.media/resources/language/English/strings.xml
+++ b/script.facebook.media/resources/language/English/strings.xml
@@ -67,6 +67,12 @@
        <string id="30053">Slideshow Interval</string>
        <string id="30054">Slideshow: ON</string>
        <string id="30055">Slideshow: OFF</string>
+       <string id="30056">Share...</string>
+       <string id="30057">Photo Options</string>
+       <string id="30058">-No Options-</string>
+       <string id="30059">Disable Browser Authorization Auto-Login</string>
+       <string id="30060">Failed To Get Authorization Token</string>
+       <string id="30061">Debug Logging</string>
                
     <string id="3001">No Tags</string>
 </strings>
diff --git a/script.facebook.media/resources/settings.xml 
b/script.facebook.media/resources/settings.xml
index fac45d2..e044d36 100644
--- a/script.facebook.media/resources/settings.xml
+++ b/script.facebook.media/resources/settings.xml
@@ -4,5 +4,8 @@
   <category label="30000">
     <setting label="30052" type="slider" id="photo_limit" default="200" 
range="30,10,500" option="int"/>
     <setting label="30053" type="slider" id="slideshow_interval" default="5" 
range="1,1,60" option="int"/>
+    <setting type="sep" />
+    <setting id="disable_auto_login" type="bool" label="30059" default="false" 
/>
+    <setting id="debug" type="bool" label="30061" default="false" />
   </category>
 </settings>
\ No newline at end of file

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

commit e1e4e6401653a5d1bcfad6bcb0e003660000204b
Author: amet <[email protected]>
Date:   Wed Apr 18 17:25:56 2012 +0400

    [script.image.bigpictures] -v 3.0.3
    
    3.0.3
      Fixed TheSacramentoBee
      Fixed Time.com: LightBox
      Added Czech Translation (thx to Spike)
    
    3.0.2
      Fix for startup error (default->Default)

diff --git a/script.image.bigpictures/addon.py 
b/script.image.bigpictures/addon.py
index e8f46b5..4b37239 100644
--- a/script.image.bigpictures/addon.py
+++ b/script.image.bigpictures/addon.py
@@ -8,8 +8,8 @@ Addon = xbmcaddon.Addon('script.image.bigpictures')
 __addon_name__ = Addon.getAddonInfo('name')
 __version__ = Addon.getAddonInfo('version')
 
-ADDON_PATH = Addon.getAddonInfo('path')
-CACHE_PATH = xbmc.translatePath(Addon.getAddonInfo('profile'))
+ADDON_PATH = Addon.getAddonInfo('path').decode('utf-8')
+CACHE_PATH = xbmc.translatePath(Addon.getAddonInfo('profile').decode('utf-8'))
 SCRAPERS_PATH = os.path.join(ADDON_PATH, 'resources', 'lib', 'scrapers')
 
 
diff --git a/script.image.bigpictures/addon.xml 
b/script.image.bigpictures/addon.xml
index 78c6c45..62b5781 100644
--- a/script.image.bigpictures/addon.xml
+++ b/script.image.bigpictures/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.image.bigpictures" name="The Big Picture" version="3.0.2" 
provider-name="Tristan Fischer ([email protected])">
+<addon id="script.image.bigpictures" name="The Big Picture" version="3.0.3" 
provider-name="Tristan Fischer ([email protected])">
     <requires>
         <import addon="xbmc.python" version="2.0"/>
         <import addon="script.module.beautifulsoup" version="3.0.8"/>
@@ -10,10 +10,12 @@
     </extension>
     <extension point="xbmc.addon.metadata">
         <platform>all</platform>
+        <summary lang="cs">Fotoreportáže</summary>
         <summary lang="de">Fotojournalismus</summary>
         <summary lang="en">Photojournalism</summary>
         <summary lang="fr">Photojournalisme</summary>
         <summary lang="nl">Fotojournalisme</summary>
+        <description lang="cs">Tento doplněk poskytuje přístup k 
nádherným albům a fotografiím z vybraných webových stránek s 
fotoreportážemi.[CR]- Boston.com: The Big Picture[CR]- The Atlantic: In 
Focus[CR]- Sacramento Bee: The Frame[CR]- Wallstreetjournal: The Photo 
Journal[CR]- TotallyCoolPix.com[CR]- Time.com: LightBox - Closeup</description>
         <description lang="de">Dieses Addon bietet schöne Alben und Photos 
von Fotojournalismus Webseiten.[CR][CR]- Boston.com: The Big Picture[CR]- The 
Atlantic: In Focus[CR]- Sacramento Bee: The Frame[CR]- Wallstreetjournal: The 
Photo Journal[CR]- TotallyCoolPix.com[CR]- Time.com: LightBox - 
Closeup</description>
         <description lang="en">This addon provides beautiful albums and photos 
from some nice photojournalism websites.[CR]- Boston.com: The Big Picture[CR]- 
The Atlantic: In Focus[CR]- Sacramento Bee: The Frame[CR]- Wallstreetjournal: 
The Photo Journal[CR]- TotallyCoolPix.com[CR]- Time.com: LightBox - 
Closeup</description>
         <description lang="fr">Cet addon affiche de magnifiques albums et 
photos de plusieurs sites Web de photojournalisme.[CR]- Boston.com: The Big 
Picture[CR]- The Atlantic: In Focus[CR]- Sacramento Bee: The Frame[CR]- 
Wallstreetjournal: The Photo Journal[CR]- TotallyCoolPix.com[CR]- Time.com: 
LightBox - Closeup</description>
diff --git a/script.image.bigpictures/changelog.txt 
b/script.image.bigpictures/changelog.txt
index 04ca724..8697a7a 100644
--- a/script.image.bigpictures/changelog.txt
+++ b/script.image.bigpictures/changelog.txt
@@ -1,6 +1,11 @@
-3.0.1
-  default - > Default
-   
+3.0.3
+  Fixed TheSacramentoBee
+  Fixed Time.com: LightBox 
+  Added Czech Translation (thx to Spike)
+
+3.0.2
+  Fix for startup error (default->Default)
+
 3.0.0
   Complete code rewrite
   Added: Slideshow feature (press play)
@@ -47,7 +52,7 @@
   Fixed: The Big Pictures remove Hash at the end of the Description
   Changed: The usage help is now replaced by a settings "help"-section
   Cosmetic: more pep8 conformity
-  
+
 1.4.2
   Fixed: Error with external Python and os.makedirs(cachedir) with cachedir = 
"special://..."
   Fixed TheSacramentoBee wasn't able to get Photos
@@ -85,7 +90,7 @@
   Added: New Scraper 'Sacramento Bee: The Frame'
   Changed: The Layout and content of the help texts
   Fixed: TBP-Scraper: Remove the image-number within the description text
-  Fixed: TBP-Scraper: removed #-sign at the end of the picture  
+  Fixed: TBP-Scraper: removed #-sign at the end of the picture
   Improved: Changes to the icon.png (more padding)
 
 1.2.0
@@ -93,6 +98,6 @@
   Added: German Translation
   Changed: Addon ported from plugin which called script to native script
   Added: New icon.png
-  
+
 1.1.2
   Released as plugin for camelot by rwparris2
\ No newline at end of file
diff --git a/script.image.bigpictures/resources/lib/scrapers/3_sbb.py 
b/script.image.bigpictures/resources/lib/scrapers/3_sbb.py
index 4e48649..f72975e 100644
--- a/script.image.bigpictures/resources/lib/scrapers/3_sbb.py
+++ b/script.image.bigpictures/resources/lib/scrapers/3_sbb.py
@@ -13,8 +13,7 @@ class Scraper(ScraperPlugin):
         for id, album in enumerate(albums):
             title = album.find('a').string
             album_url = album.find('a')['href']
-            s = 'width: 980px; padding: 5px; text-align: left;'
-            d = album.find('div', {'style': s}).contents
+            d = album.find('div', {'class': 'caption'}).contents
             description = self._collapse(d)
             pic = album.find('img')['src']
             self.albums.append({'title': title,
@@ -28,13 +27,11 @@ class Scraper(ScraperPlugin):
         self.photos = []
         tree = self._get_tree(album_url)
         album_title = tree.find('div', 'asset-name entry-title title').a.string
-        s = 'background: rgb(224, 224, 224); width: 982px; padding: 4px;'
-        images = tree.findAll('div', {'style': s})
-        s = 'background: rgb(224, 224, 224); width: 970px; padding: 10px;'
-        descriptions = tree.findAll('div', {'style': s})
+        images = tree.findAll('div', {'class': 'frame-image'})
         for id, photo in enumerate(images):
             pic = photo.find('img')['src']
-            description = self._collapse(descriptions[id]).replace('  ', ' ')
+            d = photo.find('div', {'class': 'caption'})
+            description = self._collapse(d)
             self.photos.append({'title': '%d - %s' % (id + 1, album_title),
                                 'album_title': album_title,
                                 'photo_id': id,
diff --git a/script.image.bigpictures/resources/lib/scrapers/6_time.py 
b/script.image.bigpictures/resources/lib/scrapers/6_time.py
index 59ddcbb..cf465b7 100644
--- a/script.image.bigpictures/resources/lib/scrapers/6_time.py
+++ b/script.image.bigpictures/resources/lib/scrapers/6_time.py
@@ -30,7 +30,7 @@ class Scraper(ScraperPlugin):
         tree = self._get_tree(album_url)
         album_title = tree.find('h1').string
         js_code = tree.find('text/javascript', text=re.compile('var images'))
-        json_photos = re.search('var images = (\[.*?\])', js_code).group(1)
+        json_photos = re.search('var images = (\[.*?"ID":0.*?\])', 
js_code).group(1)
         photos = json.loads(json_photos)
         for id, photo in enumerate(photos):
             if u'post_mime_type' in photo:
@@ -53,4 +53,4 @@ class Scraper(ScraperPlugin):
 
 
 def register(id):
-    return Scraper(id)
+    return Scraper(id)
\ No newline at end of file
diff --git a/script.image.bigpictures/resources/lib/script.py 
b/script.image.bigpictures/resources/lib/script.py
index 6cd4187..c94a949 100644
--- a/script.image.bigpictures/resources/lib/script.py
+++ b/script.image.bigpictures/resources/lib/script.py
@@ -2,7 +2,6 @@ import urllib
 
 import xbmc
 import xbmcgui
-import xbmcvfs
 import downloader
 
 from addon import Addon, log, SCRAPERS_PATH

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

Summary of changes:
 script.facebook.media/addon.xml                    |    2 +-
 script.facebook.media/changelog.txt                |   26 ++-
 script.facebook.media/default.py                   |  137 +++++--
 script.facebook.media/facebook.py                  |  124 +++++-
 script.facebook.media/poster/__init__.py           |   32 ++
 script.facebook.media/poster/encode.py             |  414 ++++++++++++++++++++
 script.facebook.media/poster/streaminghttp.py      |  234 +++++++++++
 .../resources/language/English/strings.xml         |    6 +
 script.facebook.media/resources/settings.xml       |    3 +
 ...e.xml => facebook-media-main-skin.aeon.nox.xml} |   20 +-
 ... => facebook-media-main-skin.xperience1080.xml} |    0
 script.facebook.media/share.py                     |  224 +++++++++++
 script.image.bigpictures/addon.py                  |    4 +-
 script.image.bigpictures/addon.xml                 |    4 +-
 script.image.bigpictures/changelog.txt             |   17 +-
 .../resources/language/Czech/strings.xml           |   29 ++
 .../resources/lib/scrapers/3_sbb.py                |   11 +-
 .../resources/lib/scrapers/6_time.py               |    4 +-
 script.image.bigpictures/resources/lib/script.py   |    1 -
 19 files changed, 1213 insertions(+), 79 deletions(-)
 create mode 100644 script.facebook.media/poster/__init__.py
 create mode 100644 script.facebook.media/poster/encode.py
 create mode 100644 script.facebook.media/poster/streaminghttp.py
 copy 
script.facebook.media/resources/skins/Default/720p/{facebook-media-main-skin.confluence.xml
 => facebook-media-main-skin.aeon.nox.xml} (98%)
 copy 
script.facebook.media/resources/skins/Default/720p/{facebook-media-main-skin.confluence.xml
 => facebook-media-main-skin.xperience1080.xml} (100%)
 create mode 100644 script.facebook.media/share.py
 create mode 100644 
script.image.bigpictures/resources/language/Czech/strings.xml


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to