The branch, frodo has been updated
       via  a097ee7dc15a9db3bc93e798c7a34e893ec9fac3 (commit)
       via  3985806d47220fd46e982429aaeed718c16649f0 (commit)
      from  0cc20e32923a2b24a47bf2da6a55697162078724 (commit)

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

commit a097ee7dc15a9db3bc93e798c7a34e893ec9fac3
Author: beenje <[email protected]>
Date:   Fri Dec 13 23:33:30 2013 +0100

    [plugin.image.picasa] updated to version 1.0.1

diff --git a/plugin.image.picasa/addon.py b/plugin.image.picasa/addon.py
index f67b286..4a32ec1 100644
--- a/plugin.image.picasa/addon.py
+++ b/plugin.image.picasa/addon.py
@@ -37,6 +37,17 @@ class AddonHelper:
                self._xbmcaddon = xbmcaddon
                return xbmcaddon
                
+       def addon(self):
+               if self.__settings__: return self.__settings__
+               self.__settings__ = self.xbmcaddon().Addon(id=self._pluginID)
+               return self.__settings__
+       
+       def addonInfo(self,info):
+               return self.addon().getAddonInfo(info)
+       
+       def version(self):
+               return self.addonInfo('version')
+               
        def urllib2(self):
                if self._urllib2: return self._urllib2
                import urllib2
diff --git a/plugin.image.picasa/addon.xml b/plugin.image.picasa/addon.xml
index 5081ecc..1b66d3c 100644
--- a/plugin.image.picasa/addon.xml
+++ b/plugin.image.picasa/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.image.picasa"
        name="PicasaWeb"
-       version="1.0.0"
+       version="1.0.1"
        provider-name="Rick Phillips (ruuk)">
   <requires>
     <import addon="xbmc.python" version="2.1.0"/>
diff --git a/plugin.image.picasa/changelog.txt 
b/plugin.image.picasa/changelog.txt
index fd29345..9fc8e7d 100644
--- a/plugin.image.picasa/changelog.txt
+++ b/plugin.image.picasa/changelog.txt
@@ -1,6 +1,10 @@
 picasaPhotos Changelog
        
-Current Version : 1.0.0
+Current Version : 1.0.1
+
+*** 1.0.1 ***
+
+Fix for errors trying to view next page of images
 
 *** 1.0.0 ***
 
diff --git a/plugin.image.picasa/default.py b/plugin.image.picasa/default.py
index 1592263..2b83b6f 100644
--- a/plugin.image.picasa/default.py
+++ b/plugin.image.picasa/default.py
@@ -4,9 +4,6 @@ from addon import AddonHelper
 
 __plugin__ =  'picasa'
 __author__ = 'ruuk'
-__url__ = 'http://code.google.com/p/picasaphotos-xbmc/'
-__date__ = '01-22-2012'
-__version__ = '1.0.0'
 
 #xbmc.executebuiltin("Container.SetViewMode(500)")
 
@@ -153,7 +150,7 @@ class picasaPhotosSession(AddonHelper):
                                
        def process(self,mode,url,name,user,terms):
                if mode==None or url==None or len(url)<1:
-                       print 'plugin.image.picasa - Version: ' + __version__ 
+                       print 'plugin.image.picasa - Version: %s' % 
self.version() 
                        self.CATEGORIES()
                elif mode==1:
                        self.ALBUMS(user=url)
@@ -231,18 +228,18 @@ class picasaPhotosSession(AddonHelper):
                                                                ]
                        content = p.media.content[-1]
                        mtype = 'pictures'
-                       url = p.content.src
-                       first,second = url.rsplit('/',1)
-                       url = '/'.join([first,'s0',second]) + '&t=' + 
str(time.time()) #without this, photos larger than 2048w XBMC says: "Texture 
manager unable to load file:" - Go Figure
-                       #url = self.urllib().quote(url)
-                       #url = 'plugin://plugin.image.picasa/?photo_url=' + url
-                       #print url,p.media.description.text
+                       img_url = p.content.src
+                       first,second = img_url.rsplit('/',1)
+                       img_url = '/'.join([first,'s0',second]) + '&t=' + 
str(time.time()) #without this, photos larger than 2048w XBMC says: "Texture 
manager unable to load file:" - Go Figure
+                       #img_url = self.urllib().quote(img_url)
+                       #img_url = 'plugin://plugin.image.picasa/?photo_url=' + 
img_url
+                       #print img_url,p.media.description.text
                        title = p.media.description.text or p.title.text or 
p.media.title.text
                        title = title.replace('\n',' ')
                        if content.medium == 'video':
                                mtype = 'video'
-                               url = content.url
-                       
contextMenu.append(('Download','XBMC.RunScript(special://home/addons/plugin.image.picasa/default.py,download,%s)'
 % url))
+                               img_url = content.url
+                       
contextMenu.append(('Download','XBMC.RunScript(special://home/addons/plugin.image.picasa/default.py,download,%s)'
 % img_url))
                        if p.media.thumbnail and len(p.media.thumbnail) > 2:
                                thumb = p.media.thumbnail[2].url
                        else:
@@ -367,6 +364,7 @@ class picasaPhotosSession(AddonHelper):
        def ALBUM(self,aid,user='default'):
                start = self.getParamInt('start_index',1)
                uri = '/data/feed/api/user/%s/albumid/%s?kind=photo' % 
(user,aid)
+               print uri
                photos = 
self.api().GetFeed(uri,limit=self.maxPerPage(),start_index=start)
                self.addPhotos(photos,mode=101,user=user)
                

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

commit 3985806d47220fd46e982429aaeed718c16649f0
Author: beenje <[email protected]>
Date:   Fri Dec 13 16:58:09 2013 +0100

    [plugin.video.jworg] updated to version 0.3.2

diff --git a/plugin.video.jworg/addon.py b/plugin.video.jworg/addon.py
index adf35c9..b50ab98 100644
--- a/plugin.video.jworg/addon.py
+++ b/plugin.video.jworg/addon.py
@@ -3,6 +3,7 @@
 # for utf-8 see http://www.python.org/dev/peps/pep-0263/
 
 import jw_config
+import jw_common
 
 from video import jw_video
 
@@ -65,27 +66,27 @@ if content_type == "audio" :
 
        if mode == "open_music_index" :
                start = params["start"][0]
-               jw_audio_music.showMusicIndex( start);
+               jw_audio_music.showMusicIndex( start)
 
        if mode == "open_music_json" : 
                json_url = params["json_url"][0]
-               jw_audio.showAudioJson(json_url);
+               jw_audio.showAudioJson(json_url)
 
        if mode == "open_drama_index" :
                start = params["start"][0]
-               jw_audio_drama.showDramaIndex( start);
+               jw_audio_drama.showDramaIndex( start)
 
        if mode == "open_drama_json" : 
                json_url = params["json_url"][0]
-               jw_audio.showAudioJson(json_url);
+               jw_audio.showAudioJson(json_url)
 
        if mode == "open_dramatic_reading_index": 
                start = params["start"][0]
-               jw_audio_dramatic_reading.showDramaticReadingIndex( start);
+               jw_audio_dramatic_reading.showDramaticReadingIndex( start)
 
        if mode == "open_dramatic_reading_json" : 
                json_url = params["json_url"][0]
-               jw_audio.showAudioJson(json_url);
+               jw_audio.showAudioJson(json_url)
 
        if mode == "open_magazine_index" :
                try: pub_filter = params["pub_filter"][0]
@@ -94,42 +95,46 @@ if content_type == "audio" :
                except : year_filter = None
 
                if year_filter is None :
-                       jw_audio_magazine.showMagazineFilterIndex(pub_filter);
+                       jw_audio_magazine.showMagazineFilterIndex(pub_filter)
                else :
-                       jw_audio_magazine.showMagazineFilteredIndex(pub_filter, 
year_filter);
+                       jw_audio_magazine.showMagazineFilteredIndex(pub_filter, 
year_filter)
 
        if mode == "open_magazine_json" :
                json_url = params["json_url"][0]
-               jw_audio.showAudioJson(json_url);               
+               jw_audio.showAudioJson(json_url)
 
+       if mode == "play_mp3" :
+               url = params["file_url"][0]
+               jw_common.playMp3(url)
+               
 
 if content_type == "executable" :
        if mode is None : 
-               jw_exec_index.showExecIndex();
+               jw_exec_index.showExecIndex()
 
        if mode == "open_daily_text" : 
                date = params["date"][0]
-               jw_exec_daily_text.showDailyText(date); 
+               jw_exec_daily_text.showDailyText(date)
 
        if mode == "open_news_index" :
-               jw_exec_news.showNewsIndex();
+               jw_exec_news.showNewsIndex()
 
        if mode == "open_news_page" :
                url = params["url"][0]
-               jw_exec_news.showNewsPage(url);
+               jw_exec_news.showNewsPage(url)
 
        if mode == "open_week_program" :
                date = params["date"][0]
-               jw_exec_week_program.showWeekProgram(date);
+               jw_exec_week_program.showWeekProgram(date)
 
        if mode == "open_activity_index" :
-               jw_exec_activity.showActivityIndex();
+               jw_exec_activity.showActivityIndex()
 
        if mode == "open_activity_section" :            
                url = params["url"][0]
-               jw_exec_activity.showActivitySection(url);
+               jw_exec_activity.showActivitySection(url)
 
        if mode == "open_activity_article" :
                url = params["url"][0]
-               jw_exec_activity.showArticle(url);
+               jw_exec_activity.showArticle(url)
 
diff --git a/plugin.video.jworg/addon.xml b/plugin.video.jworg/addon.xml
index 59b8f19..5ffd806 100644
--- a/plugin.video.jworg/addon.xml
+++ b/plugin.video.jworg/addon.xml
@@ -2,7 +2,7 @@
 <addon 
     id="plugin.video.jworg" 
     name="Jw.org audio/video browser" 
-    version="0.3.1" 
+    version="0.3.2" 
     provider-name="Realtebo">
     <requires>
         <import addon="xbmc.python" version="2.1.0"/>
diff --git a/plugin.video.jworg/audio/jw_audio.py 
b/plugin.video.jworg/audio/jw_audio.py
index e1c3b34..795015c 100644
--- a/plugin.video.jworg/audio/jw_audio.py
+++ b/plugin.video.jworg/audio/jw_audio.py
@@ -37,7 +37,7 @@ def showAudioIndex():
 
         # Case Afrikaans: has no bible audio !
         if item["enable"] == False :
-            continue;
+            continue
 
         listItem    = xbmcgui.ListItem( item["title"] )     
         params      = {
@@ -70,12 +70,21 @@ def showAudioJson(json_url):
     cover_image     = json["pubImage"]["url"]
     
     for mp3 in json["files"][language_code]["MP3"]:
-        url     = mp3["file"]["url"]
-        title   = jw_common.cleanUpText(mp3["title"])
 
         # Skip 'zip' files
         if mp3["mimetype"] != "audio/mpeg":
-            continue;
+            continue
+
+        params = {
+            "content_type"  : "audio", 
+            "mode"          : "play_mp3", 
+            "file_url"      : mp3["file"]["url"]
+        }
+
+        #url     = mp3["file"]["url"]
+        url = jw_config.plugin_name + '?' + urllib.urlencode(params)    
+
+        title   = jw_common.cleanUpText(mp3["title"])
 
         listItem = xbmcgui.ListItem(
             label           = title,
@@ -87,6 +96,8 @@ def showAudioJson(json_url):
             infoLabels  = {'Title': title }
         )
 
+        listItem.setProperty("IsPlayable","true")
+
         xbmcplugin.addDirectoryItem(
             handle      = jw_config.plugin_pid, 
             url         = url, 
@@ -99,7 +110,7 @@ def showAudioJson(json_url):
     if len(json["files"][language_code]["MP3"]) == 1 :
 
         xbmc.Player().play(item=url, listitem=listItem)
-        return;
+        return
 
 
     xbmcplugin.endOfDirectory(handle=jw_config.plugin_pid)    
\ No newline at end of file
diff --git a/plugin.video.jworg/audio/jw_audio_bible.py 
b/plugin.video.jworg/audio/jw_audio_bible.py
index 711247e..708ef7a 100644
--- a/plugin.video.jworg/audio/jw_audio_bible.py
+++ b/plugin.video.jworg/audio/jw_audio_bible.py
@@ -73,9 +73,17 @@ def showAudioBibleBookJson(book_num):
 
                # Skip 'zip' files
                if mp3["mimetype"] != "audio/mpeg":
-                       continue;
+                       continue
+
+               params = {
+                       "content_type"  : "audio", 
+                       "mode"          : "play_mp3", 
+                       "file_url"      : mp3["file"]["url"]
+               }
+
+               #url = mp3["file"]["url"]
+               url = jw_config.plugin_name + '?' + urllib.urlencode(params)    
 
-               url = mp3["file"]["url"]
                title = book_name + " - " + mp3["title"]
 
                listItem = xbmcgui.ListItem(
@@ -88,6 +96,8 @@ def showAudioBibleBookJson(book_num):
                        infoLabels      = {'Title': title }
                )
 
+               listItem.setProperty("IsPlayable","true")
+
                xbmcplugin.addDirectoryItem(
                        handle          = jw_config.plugin_pid, 
                        url                     = url, 
diff --git a/plugin.video.jworg/changelog.txt b/plugin.video.jworg/changelog.txt
index 55b3c14..024d976 100644
--- a/plugin.video.jworg/changelog.txt
+++ b/plugin.video.jworg/changelog.txt
@@ -1,3 +1,18 @@
+0.3.2
+-----
+
+Bug fixes:
++ Modified "Newsroom" to react (again) to changes in jw.org html code
++ Modified "Activities" to react (again) to changes in jw.org html code
+
+Code:
++ Change audio list play mode; now addon is ultrafast in listing audio item ! 
++ Changed print into xbmc.log
++ Switched from xbmcplugin to xbmcaddon in the setting related code
+
+Small enhancements:
++ Auto save of language if detected a supported language; user can see the 
right language setted when opening for the first time th addon setting window
+
 0.3.1
 -----
 
diff --git a/plugin.video.jworg/jw_common.py b/plugin.video.jworg/jw_common.py
index 62640f4..1184444 100644
--- a/plugin.video.jworg/jw_common.py
+++ b/plugin.video.jworg/jw_common.py
@@ -43,7 +43,7 @@ def setNextPageLink(html, mode, type, param_name = None, 
param_value = None):
                return 
 
        next_start  = next_link[0][0]
-       title           = t(30001);     
+       title           = t(30001)
        listItem        = xbmcgui.ListItem(title)
        params          = {
                "content_type"  : type, 
@@ -100,15 +100,15 @@ def loadNotCachedJsonFromUrl(url, ajax):
                data = json.loads(response)
 
        except urllib2.URLError, e: 
-               print "JWORG http error"
-               print e.code
-               print e.read()
+               xbmc.log ("JWORG http error", xbmc.LOGERROR)
+               xbmc.log (e.code, xbmc.LOGERROR)
+               xbmc.log (e.read(), xbmc.LOGERROR)
                pass
                
        except urllib2.HTTPError, e:
-               print "JWORG http error"
-               print e.code
-               print e.read()
+               xbmc.log ("JWORG http error", xbmc.LOGERROR)
+               xbmc.log (e.code, xbmc.LOGERROR)
+               xbmc.log (e.read(), xbmc.LOGERROR)
                pass
 
        # other exception give exceptions
@@ -125,3 +125,10 @@ URL HELPER
 def getUrl(language):
        return jw_config.main_url + jw_config.const[language]["url_lang_code"]  
+ "/" 
 
+
+"""
+AUDIO HELPER
+"""
+def playMp3(url):
+       item = xbmcgui.ListItem(path=url)
+       xbmcplugin.setResolvedUrl(handle=jw_config.plugin_pid, succeeded=True, 
listitem=item)
\ No newline at end of file
diff --git a/plugin.video.jworg/jw_config.py b/plugin.video.jworg/jw_config.py
index 899c424..2f22c9f 100644
--- a/plugin.video.jworg/jw_config.py
+++ b/plugin.video.jworg/jw_config.py
@@ -2,7 +2,7 @@
 
 import xbmc
 import xbmcgui
-import xbmcplugin
+import xbmcaddon
 
 import sys
 import urlparse
@@ -11,22 +11,28 @@ import os
 import jw_common
 
 # key is english name, value is the name of the locale IN the locale
-# used for first run if no language setted; it takes XBMC language setting
+# used for first run if no language setted. It takes XBMC language setting
 # and convert into "our" locale settings
+
+# <setting id="language" type="labelenum" label="30002" 
+# 
values="Afrikaans|Deutsch|English|Español|Français|Ελληνική|Italiano|Magyar|Nederlands|Polski|Português"
  />
+
+# *** IMPORTANT: keep it in the same order of the "language" setting values
 locale_2_lang = {
-       "Italian"                               : "Italiano",
-       "Polish"                                : "Polski",
-       "Dutch"                                 : "Nederlands",
-       "Spanish"                               : "Español",
-       "German"                                : "Deutsch",
-       "Portuguese"                    : "Português",
-       "Portuguese (Brazil)"   : "Português",
        "Afrikaans"                             : "Afrikaans",
-       "Greek"                                 : "Ελληνική",
+       "German"                                : "Deutsch",
+       "English"                               : "English",
+       "Spanish"                               : "Español",
        "French"                                : "Français",
+       "Greek"                                 : "Ελληνική",
+       "Italian"                               : "Italiano",
        "Hungarian"                             : "Magyar",
+       "Dutch"                                 : "Nederlands",
+       "Polish"                                : "Polski",
+       "Portuguese"                    : "Português",
 }
 
+
 main_url = "http://www.jw.org/";
 app_url ="http://www.jw.org/apps/";
 wol_url = "http://wol.jw.org/wol/";
@@ -238,6 +244,7 @@ plugin_pid          = int(sys.argv[1])
 plugin_params  = urlparse.parse_qs((sys.argv[2])[1:])
 skin_used              = xbmc.getSkinDir()
 dir_media              = os.path.dirname(__file__) + os.sep + "resources" + 
os.sep + "media" + os.sep
+addon                  = xbmcaddon.Addon("plugin.video.jworg")
 
 try: 
        emulating = xbmcgui.Emulating
@@ -250,11 +257,11 @@ except:
        from resources.lib import storageserverdummy as StorageServer
         
 cache                  = StorageServer.StorageServer(plugin_name, 24)  # 2 
hour cache
-audio_sorting  = str(int(xbmcplugin.getSetting(plugin_pid, "audio_sorting")) + 
1)
-video_sorting  = str(int(xbmcplugin.getSetting(plugin_pid, "video_sorting")) + 
1)
+audio_sorting  = str(int(addon.getSetting("audio_sorting")) + 1)
+video_sorting  = str(int(addon.getSetting("video_sorting")) + 1)
 
 # if language is set, it used a localized language name, like "Italiano" or 
"Polski"
-language               = xbmcplugin.getSetting(plugin_pid, "language")
+language               = addon.getSetting("language")
 
 # AUTODETECT LANGUAGE IF MISSING
 # if not set, language will be read from system, where it uses english 
language name
@@ -265,11 +272,7 @@ if language == "":
        actual_locale = xbmc.getLanguage()
        if actual_locale in locale_2_lang :
                language = locale_2_lang[actual_locale]
+               addon.setSetting("language", language)
        else :
                language = "English"
 
-       print "JWORG: Auto setting locale to: " + language
-       xbmcplugin.setSetting(plugin_pid, "language", language)
-
-
-
diff --git a/plugin.video.jworg/program/jw_exec_activity.py 
b/plugin.video.jworg/program/jw_exec_activity.py
index 4c533b0..348caac 100644
--- a/plugin.video.jworg/program/jw_exec_activity.py
+++ b/plugin.video.jworg/program/jw_exec_activity.py
@@ -21,52 +21,23 @@ def showActivityIndex():
 
        html            = jw_common.loadUrl(url)
 
-       # see_all[n][0] = section index relative url
-       # see_all[n][1] = section title
-       # see_all[n][2] = "See all" localized
-       regexp_see_all = '<p class="seeAll"><a href="([^"]+)" 
title="([^"]+)">(.*)</a></p>'
-       see_all = re.findall(regexp_see_all, html)
+       # sections[n][0] = section link
+       # sections[n][1] = section title
 
-       # highlight[n][0] = lastest news relative link
-       # highlight[n][2] = option title attribute
-       # highlight[n][1] = lastest news title
-       regexp_highlight = '<h3><a href="([^"]+)"( 
title="[^"]+")*>(.*)</a></h3>'
-       highlight = re.findall (regexp_highlight, html)
+    # <p><a href="/it/testimoni-di-geova/attivit%C3%A0/ministero/" 
title="Ministero pubblico" class="btnLink">
+    # VEDI TUTTO</a></p>
 
+       regexp_section = '<p><a href="([^"]+)" title="([^"]+)" 
class="btnLink">[^<]+</a></p>'
+       sections = re.findall (regexp_section, html)
 
        # iages[n][0] = full url of thumb
-       regexp_images = "data-img-size-md='([^']+)'"
-       images = re.findall (regexp_images, html)
-
-       # separated highlight
+       regexp_images = "data-img-size-sm='([^']+)'"
+       images = re.findall (regexp_images, html)       
 
-       count = 0
-       # Show  lastest news from this section, like on website
-       title = jw_common.cleanUpText( highlight[count][2] ) 
-       title = jw_common.removeHtml(title)
-       listItem = xbmcgui.ListItem( 
-               label                   = "[COLOR=FF00B7EB]" + title + 
"[/COLOR]",
-               thumbnailImage  = images[count],
-       )       
-       params = {
-               "content_type"  : "executable", 
-               "mode"                  : "open_activity_article", 
-               "url"                   : highlight[count][0]
-       } 
-       url = jw_config.plugin_name + '?' + urllib.urlencode(params)
-       xbmcplugin.addDirectoryItem(
-               handle          = jw_config.plugin_pid, 
-               url                     = url, 
-               listitem        = listItem, 
-               isFolder        = True 
-       ) 
-
-       count = 1
-       for section in see_all :
-
-               title = jw_common.cleanUpText( section[1] + " (" + section[2] + 
") ") 
+       for section  in sections :
+               title = jw_common.cleanUpText( section[1] ) 
                listItem = xbmcgui.ListItem( 
-                       label                   = "[B]" + title + "[/B]",
+                       label                   = title,
                        # no thumbnail available from website, will be used 
standard folder icon
                )       
                params = {
@@ -81,31 +52,13 @@ def showActivityIndex():
                        listitem        = listItem, 
                        isFolder        = True 
                ) 
+               
+               count = 0
 
-               # Show lastest news from this section, like on website
-               title = jw_common.cleanUpText( "--> " + highlight[count][2] ) 
-               title = jw_common.removeHtml(title)
-               listItem = xbmcgui.ListItem( 
-                       label                   = "[COLOR=FF00B7EB]" + title + 
"[/COLOR]",
-                       thumbnailImage  = images[count],
-               )       
-               params = {
-                       "content_type"  : "executable", 
-                       "mode"                  : "open_activity_article", 
-                       "url"                   : highlight[count][0]
-               } 
-               url = jw_config.plugin_name + '?' + urllib.urlencode(params)
-               xbmcplugin.addDirectoryItem(
-                       handle          = jw_config.plugin_pid, 
-                       url                     = url, 
-                       listitem        = listItem, 
-                       isFolder        = True 
-               ) 
-
-               count = count +1
+       xbmcplugin.endOfDirectory(handle=jw_config.plugin_pid)
 
+       return;
 
-       xbmcplugin.endOfDirectory(handle=jw_config.plugin_pid)
 
 
 def showActivitySection(url):
@@ -160,8 +113,8 @@ def showArticle(url):
        html    = jw_common.loadUrl(url)
 
        activity = Activity()
-       activity.customInit(html);
-       activity.doModal();
+       activity.customInit(html)
+       activity.doModal()
        del activity
        xbmc.executebuiltin('Action("back")')
 
@@ -183,7 +136,7 @@ class Activity(xbmcgui.WindowDialog):
 
        def customInit(self, text):
 
-               border = 50; # px relative to 1280/720 fixed grid resolution
+               border = 50 # px relative to 1280/720 fixed grid resolution
 
                # width is always 1280, height is always 720.
                bg_image = jw_config.dir_media + "blank.png"
@@ -224,26 +177,26 @@ class Activity(xbmcgui.WindowDialog):
                if action == ACTION_MOVE_UP:
                        if y > 0:
                                return
-                       y = y + 50;
+                       y = y + 50
                        self.ctrlText.setPosition(x,y)
                        return
 
                if action == ACTION_MOVE_DOWN:
                        (x,y) =  self.ctrlText.getPosition()
-                       y = y - 50;
+                       y = y - 50
                        self.ctrlText.setPosition(x,y)
                        return
 
                if action == ACTION_PAGE_UP:
                        if y > 0:
                                return
-                       y = y + 500;
+                       y = y + 500
                        self.ctrlText.setPosition(x,y)
                        return
 
                if action == ACTION_PAGE_DOWN:
                        (x,y) =  self.ctrlText.getPosition()
-                       y = y - 500;
+                       y = y - 500
                        self.ctrlText.setPosition(x,y)
                        return
 
diff --git a/plugin.video.jworg/program/jw_exec_daily_text.py 
b/plugin.video.jworg/program/jw_exec_daily_text.py
index 1069979..19e9ecb 100644
--- a/plugin.video.jworg/program/jw_exec_daily_text.py
+++ b/plugin.video.jworg/program/jw_exec_daily_text.py
@@ -25,8 +25,8 @@ def showDailyText(date):
     text        = jw_common.cleanUpText(text)
 
     dialog = DailiyText()
-    dialog.customInit(text);
-    dialog.doModal();
+    dialog.customInit(text)
+    dialog.doModal()
     del dialog
     xbmc.executebuiltin('Action("back")')
 
@@ -39,7 +39,7 @@ class DailiyText(xbmcgui.WindowDialog):
 
     def customInit(self, text):
         
-        border = 50; # px relative to 1280/720 fixed grid resolution
+        border = 50 # px relative to 1280/720 fixed grid resolution
 
         # width is always 1280, height is always 720.
         # getWidth() and getHeight() instead read the REAL screen resolution
@@ -70,9 +70,9 @@ class DailiyText(xbmcgui.WindowDialog):
         self.addControl (self.ctrlScripture)
         self.addControl (self.ctrlComment)
 
-        self.ctrlDate.setText( self.getDateLine(text) );
-        self.ctrlScripture.setText( self.getScriptureLine(text) );
-        self.ctrlComment.setText( self.getComment(text) );
+        self.ctrlDate.setText( self.getDateLine(text) )
+        self.ctrlScripture.setText( self.getScriptureLine(text) )
+        self.ctrlComment.setText( self.getComment(text) )
 
     #get actioncodes from 
https://github.com/xbmc/xbmc/blob/master/xbmc/guilib/Key.h
     def onAction(self, action):
diff --git a/plugin.video.jworg/program/jw_exec_news.py 
b/plugin.video.jworg/program/jw_exec_news.py
index d30f2ef..5704d78 100644
--- a/plugin.video.jworg/program/jw_exec_news.py
+++ b/plugin.video.jworg/program/jw_exec_news.py
@@ -21,7 +21,7 @@ def showNewsIndex():
        url             = url + jw_config.const[language]["news_index"] 
        
        html            = jw_common.loadUrl(url)
-
+       
        regexp_title = '<h3 class="tsrTtle"><a href="([^"]+)"( 
title="[^"]+")?>([^<]+)</a></h3>'
        news_found = re.findall(regexp_title, html)
 
@@ -33,10 +33,16 @@ def showNewsIndex():
        for news in news_found:
 
                title = jw_common.cleanUpText( news[2] ) 
+
+               # Stop news parsing at the first lateral link (an head) found
+               if "/?v=" in news[0] :
+                       break;
+
                listItem = xbmcgui.ListItem( 
                        label                   = title,
                        thumbnailImage  = images[count][2]
                )       
+
                params = {
                        "content_type"  : "executable", 
                        "mode"                  : "open_news_page", 
@@ -60,8 +66,8 @@ def showNewsPage(url):
        html    = jw_common.loadUrl(url)
 
        new = News()
-       new.customInit(html);
-       new.doModal();
+       new.customInit(html)
+       new.doModal()
        del new
        xbmc.executebuiltin('Action("back")')
 
@@ -82,7 +88,7 @@ class News(xbmcgui.WindowDialog):
 
        def customInit(self, text):
 
-               border = 50; # px relative to 1280/720 fixed grid resolution
+               border = 50 # px relative to 1280/720 fixed grid resolution
 
                # width is always 1280, height is always 720.
                bg_image = jw_config.dir_media + "blank.png"
@@ -123,26 +129,26 @@ class News(xbmcgui.WindowDialog):
                if action == ACTION_MOVE_UP:
                        if y > 0:
                                return
-                       y = y + 50;
+                       y = y + 50
                        self.ctrlText.setPosition(x,y)
                        return
 
                if action == ACTION_MOVE_DOWN:
                        (x,y) =  self.ctrlText.getPosition()
-                       y = y - 50;
+                       y = y - 50
                        self.ctrlText.setPosition(x,y)
                        return
 
                if action == ACTION_PAGE_UP:
                        if y > 0:
                                return
-                       y = y + 500;
+                       y = y + 500
                        self.ctrlText.setPosition(x,y)
                        return
 
                if action == ACTION_PAGE_DOWN:
                        (x,y) =  self.ctrlText.getPosition()
-                       y = y - 500;
+                       y = y - 500
                        self.ctrlText.setPosition(x,y)
                        return
 
diff --git a/plugin.video.jworg/program/jw_exec_week_program.py 
b/plugin.video.jworg/program/jw_exec_week_program.py
index e4e0e61..25245ac 100644
--- a/plugin.video.jworg/program/jw_exec_week_program.py
+++ b/plugin.video.jworg/program/jw_exec_week_program.py
@@ -28,8 +28,8 @@ def showWeekProgram(date):
     text  = jw_common.cleanUpText(text).encode("utf8") 
 
     dialog = WeekProgram()
-    dialog.customInit(text);
-    dialog.doModal();
+    dialog.customInit(text)
+    dialog.doModal()
     del dialog
 
     xbmc.executebuiltin('Action("back")')
@@ -43,7 +43,7 @@ class WeekProgram(xbmcgui.WindowDialog):
 
     def customInit(self, text):
         
-        border = 30; # px relative to 1280/720 fixed grid resolution
+        border = 30 # px relative to 1280/720 fixed grid resolution
 
         # width is always 1280, height is always 720.
         # getWidth() and getHeight() instead read the REAL screen resolution
@@ -62,7 +62,7 @@ class WeekProgram(xbmcgui.WindowDialog):
         self.addControl (self.ctrlBackgound)
         self.addControl (self.ctrlText)
 
-        self.ctrlText.setText( self.getProgram(text) );
+        self.ctrlText.setText( self.getProgram(text) )
 
     #get actioncodes from 
https://github.com/xbmc/xbmc/blob/master/xbmc/guilib/Key.h
     def onAction(self, action):
diff --git a/plugin.video.jworg/resources/lib/empty_cache.py 
b/plugin.video.jworg/resources/lib/empty_cache.py
index 98815dd..76249e5 100644
--- a/plugin.video.jworg/resources/lib/empty_cache.py
+++ b/plugin.video.jworg/resources/lib/empty_cache.py
@@ -10,7 +10,7 @@ except:
        import storageserverdummy as StorageServer
 
 cache = StorageServer.StorageServer("plugin://plugin.video.jworg/", 24) 
-cache.delete("%");
+cache.delete("%")
 
 dialog = xbmcgui.Dialog()
 
diff --git a/plugin.video.jworg/video/jw_video.py 
b/plugin.video.jworg/video/jw_video.py
index 33a9e8d..39732cd 100644
--- a/plugin.video.jworg/video/jw_video.py
+++ b/plugin.video.jworg/video/jw_video.py
@@ -142,9 +142,7 @@ def showVideoJsonUrl(json_url, thumb):
 
        # Try do autodetect the video to play basaed on user setting of
        # default video resolution
-       list_only = False;
-       
-       print "JWORG: max_resolution: '" + max_resolution + "'"
+       list_only = False
 
        if (max_resolution != "0" and max_resolution != "") or max_resolution 
is None :
        
@@ -173,10 +171,10 @@ def showVideoJsonUrl(json_url, thumb):
 
                        xbmc.Player().play(item=url_to_play, listitem=listItem)
 
-                       return;
+                       return
                # This is an error condition, could not verify never ...
                elif  len(right_resoluction_dict) == 0 :
-                       print "JWORG: NO  one video at res " + max_resolution
+                       xbmc.log("JWORG: NO  one video at res " + 
max_resolution, xbmc.LOGERROR)
                # There are many video at the right res: enable listing of ONLY 
these
                else :
                        list_only = max_resolution
@@ -194,7 +192,7 @@ def showVideoJsonUrl(json_url, thumb):
                        # if user has choosen a res, and there are more than 
one video on this res
                        # I skip every video of different resolution, but show 
a list
                        # of all available video of this resolution
-                       continue;
+                       continue
 
                listItem = xbmcgui.ListItem(
                        label                   = title,

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

Summary of changes:
 plugin.image.picasa/addon.py                       |   11 +++
 plugin.image.picasa/addon.xml                      |    2 +-
 plugin.image.picasa/changelog.txt                  |    6 +-
 plugin.image.picasa/default.py                     |   22 ++---
 plugin.video.jworg/addon.py                        |   39 +++++----
 plugin.video.jworg/addon.xml                       |    2 +-
 plugin.video.jworg/audio/jw_audio.py               |   21 ++++-
 plugin.video.jworg/audio/jw_audio_bible.py         |   14 +++-
 plugin.video.jworg/changelog.txt                   |   15 +++
 plugin.video.jworg/jw_common.py                    |   21 +++--
 plugin.video.jworg/jw_config.py                    |   39 +++++----
 plugin.video.jworg/program/jw_exec_activity.py     |   91 +++++---------------
 plugin.video.jworg/program/jw_exec_daily_text.py   |   12 ++--
 plugin.video.jworg/program/jw_exec_news.py         |   22 +++--
 plugin.video.jworg/program/jw_exec_week_program.py |    8 +-
 plugin.video.jworg/resources/lib/empty_cache.py    |    2 +-
 plugin.video.jworg/video/jw_video.py               |   10 +--
 17 files changed, 179 insertions(+), 158 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to