The branch, eden has been updated
       via  4acb8fb111852de61095d1f1dd14cfaaade35477 (commit)
       via  058fa41b890ca9759b8ca797320f1663de97edf5 (commit)
       via  3c45dfad895633ce06de05e23f75b1c045ccfc42 (commit)
      from  2290ee7341a5320217a6bebdf1b0140fccc77216 (commit)

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

commit 4acb8fb111852de61095d1f1dd14cfaaade35477
Author: spiff <[email protected]>
Date:   Sun Mar 4 20:13:45 2012 +0100

    [plugin.video.mediathek] updated to version 0.4.0

diff --git a/plugin.video.mediathek/addon.xml b/plugin.video.mediathek/addon.xml
index 49b924b..f32f1f9 100644
--- a/plugin.video.mediathek/addon.xml
+++ b/plugin.video.mediathek/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <addon
   id="plugin.video.mediathek"
-  version="0.3.9"
+  version="0.4.0"
   name="Mediathek"
   provider-name="Raptor 2101 [[email protected]]">
   <requires>
diff --git a/plugin.video.mediathek/changelog.txt 
b/plugin.video.mediathek/changelog.txt
index 18a8866..8621733 100644
--- a/plugin.video.mediathek/changelog.txt
+++ b/plugin.video.mediathek/changelog.txt
@@ -1,3 +1,4 @@
+0.4.0 - FIX: Commit FIX from soern 
 0.3.9 - ADD: KIKA (Without Kikaninchen)
 0.3.8 - FIX: 3SAT Broken Link
         ADD: NDR
@@ -25,4 +26,4 @@
 0.1.3 - Adjust ARD Parsing - ard now works fine
 0.1.2 - Now RTMP playback is avaible under Windows !!!
 0.1.1 - added script to extract Media-Information, Added timeout while 
downloading something.
-0.1.0 - initial release
\ No newline at end of file
+0.1.0 - initial release
diff --git a/plugin.video.mediathek/mediathek/dreisat.py 
b/plugin.video.mediathek/mediathek/dreisat.py
index 0e477be..2912ce7 100644
--- a/plugin.video.mediathek/mediathek/dreisat.py
+++ b/plugin.video.mediathek/mediathek/dreisat.py
@@ -85,11 +85,11 @@ class DreiSatMediathek(Mediathek):
     link = "/mediathek/mediathek.php\\?obj=\\d+";
     self.regex_searchResult = re.compile("href=\""+link+"\" 
class=\"media_result_thumb\"");
     self.regex_searchResultLink = re.compile(link)
-    self.regex_searchLink = re.compile("http://wstreaming.zdf.de/.*?\\.asx";)
+    self.regex_searchLink = 
re.compile("http://(w|f)streaming.zdf.de/.*?(\\.asx|\\.smil)")
     self.regex_searchTitle = re.compile("<h2>.*</h2>");
     self.regex_searchDetail = re.compile("<span class=\"text\">.*");
     self.regex_searchDate = re.compile("\\d{2}.\\d{2}.\\d{4}");
-    self.regex_searchImage = 
re.compile("/dynamic/mediathek/stills/\\d*_big\\.jpg");
+    self.regex_searchImage = 
re.compile("(/dynamic/mediathek/stills/|/mediaplayer/stills/)\\d*_big\\.jpg");
     self.replace_html = re.compile("<.*?>");
     
   def buildPageMenu(self, link, initCount):
@@ -126,6 +126,7 @@ class DreiSatMediathek(Mediathek):
       videoLink = self.rootLink+objectLink+"&mode=play";
       videoPage = self.loadPage(videoLink);
       video = self.regex_searchLink.search(videoPage).group();
+      video = video.replace("fstreaming","wstreaming").replace(".smil",".asx");
       links = {}
       links[2] = SimpleLink(video,0)
       self.gui.buildVideoLink(DisplayObject(title,"",self.rootLink + 
image,detail,links,True, pubDate),self,len(results));
@@ -180,5 +181,6 @@ class DreiSatMediathek(Mediathek):
         links[1] = SimpleLink(url, size);
       else:
         links[2] = SimpleLink(url, size);
-    
self.gui.buildVideoLink(DisplayObject(title,"",picture,description,links,True, 
pubDate),self,nodeCount);
+    if links:
+      
self.gui.buildVideoLink(DisplayObject(title,"",picture,description,links,True, 
pubDate),self,nodeCount);
       

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

commit 058fa41b890ca9759b8ca797320f1663de97edf5
Author: spiff <[email protected]>
Date:   Sun Mar 4 20:12:36 2012 +0100

    [plugin.video.dr.dk.bonanza] updated to version 2.1.1

diff --git a/plugin.video.dr.dk.bonanza/addon.py 
b/plugin.video.dr.dk.bonanza/addon.py
index 45e52a1..6a1d9ec 100644
--- a/plugin.video.dr.dk.bonanza/addon.py
+++ b/plugin.video.dr.dk.bonanza/addon.py
@@ -1,10 +1,30 @@
+#
+#      Copyright (C) 2012 Tommy Winther
+#      http://tommy.winther.nu
+#
+#  This Program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2, or (at your option)
+#  any later version.
+#
+#  This Program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this Program; see the file LICENSE.txt.  If not, write to
+#  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+#  http://www.gnu.org/copyleft/gpl.html
+#
 import os
 import re
 import sys
 import simplejson
-import cgi as urlparse
+import urlparse
 import urllib2
 from htmlentitydefs import name2codepoint
+import buggalo
 
 import xbmc
 import xbmcgui
@@ -12,6 +32,10 @@ import xbmcplugin
 import xbmcaddon
 
 BASE_URL = 'http://www.dr.dk/Bonanza/'
+TOTAL_PLAYS_URL = 'http://www.dr.dk/bonanzapp/Service.svc/getTotalPlays'
+
+class BonanzaException(Exception):
+    pass
 
 class Bonanza(object):
     def search(self):
@@ -24,14 +48,29 @@ class Bonanza(object):
 
 
     def showCategories(self):
+        items = list()
         html = self._downloadUrl(BASE_URL)
 
+        try:
+            u = urllib2.urlopen(TOTAL_PLAYS_URL)
+            playCount = int(u.read()[65:-6])
+            u.close()
+
+            item = xbmcgui.ListItem(ADDON.getLocalizedString(30003) % 
playCount, iconImage = ICON)
+            item.setProperty('Fanart_Image', FANART)
+            xbmcplugin.addDirectoryItem(HANDLE, '', item)
+        except Exception:
+            pass # ignore
+
         item = xbmcgui.ListItem(ADDON.getLocalizedString(30001), iconImage = 
ICON)
         item.setProperty('Fanart_Image', FANART)
         xbmcplugin.addDirectoryItem(HANDLE, PATH + '?mode=search', item, True)
         item = xbmcgui.ListItem(ADDON.getLocalizedString(30002), iconImage = 
ICON)
         item.setProperty('Fanart_Image', FANART)
         xbmcplugin.addDirectoryItem(HANDLE, PATH + '?mode=recommend', item, 
True)
+        item = xbmcgui.ListItem(ADDON.getLocalizedString(30004), iconImage = 
ICON)
+        item.setProperty('Fanart_Image', FANART)
+        xbmcplugin.addDirectoryItem(HANDLE, PATH + '?mode=latest', item, True)
 
         for m in re.finditer('<a href="(/Bonanza/kategori/.*\.htm)">(.*)</a>', 
html):
             path = m.group(1)
@@ -43,29 +82,32 @@ class Bonanza(object):
                 'title' : title
             })
             url = PATH + '?mode=subcat&url=http://www.dr.dk' + path
-            xbmcplugin.addDirectoryItem(HANDLE, url, item, True)
+            items.append((url, item, True))
 
+        xbmcplugin.addDirectoryItems(HANDLE, items)
         xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_TITLE)
         xbmcplugin.endOfDirectory(HANDLE)
 
 
     def showRecommendations(self):
         html = self._downloadUrl(BASE_URL)
+        tab = self._getTab(html, 'redaktionens favoritter')
+        self.addSubCategories(tab)
+        xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_TITLE)
+        xbmcplugin.endOfDirectory(HANDLE)
 
-        # remove anything but 'Redaktionens favoritter'
-        html = html[html.find('<span class="tabTitle">Redaktionens 
Favoritter</span>'):]
-        self.addSubCategories(html)
+    def showLatest(self):
+        html = self._downloadUrl(BASE_URL)
+        tab = self._getTab(html, 'senest tilf.*?bonanza')
+        self.addSubCategories(tab)
         xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_TITLE)
         xbmcplugin.endOfDirectory(HANDLE)
 
 
     def showSubCategories(self, url):
         html = self._downloadUrl(url.replace(' ', '+'))
-
-        # remove 'Redaktionens favoritter' as they are located on every page
-        html = html[:html.find('<span class="tabTitle">Redaktionens 
Favoritter</span>')]
-
-        self.addSubCategories(html)
+        tab = self._getTab(html, '') # will return first tab found
+        self.addSubCategories(tab)
         xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_TITLE)
         xbmcplugin.endOfDirectory(HANDLE)
 
@@ -93,6 +135,7 @@ class Bonanza(object):
 
 
     def addContent(self, html):
+        items = list()
         for m in re.finditer('newPlaylist\(([^"]+)"', html):
             raw = m.group(1)[:-2].replace('&quot;', '"')
             json = simplejson.loads(raw)
@@ -112,21 +155,34 @@ class Bonanza(object):
                 infoLabels['year'] = int(json['FirstPublished'][:4])
             if json.has_key('Duration') and json['Duration'] is not None:
                 infoLabels['duration'] = 
self._secondsToDuration(int(json['Duration']) / 1000)
+            infoLabels['studio'] = ADDON.getAddonInfo('name')
 
-            item = xbmcgui.ListItem(infoLabels['title'], iconImage = 
self.findFileLocation(json, 'Thumb'))
+            thumb = self.findFileLocation(json, 'Thumb')
+            if thumb is None:
+                thumb = ICON
+            item = xbmcgui.ListItem(infoLabels['title'], iconImage=thumb, 
thumbnailImage=thumb)
             item.setProperty('Fanart_Image', FANART)
             item.setInfo('video', infoLabels)
 
-            rtmp_url = self.findFileLocation(json, 'VideoHigh')
-            if rtmp_url is None:
-                rtmp_url = self.findFileLocation(json, 'VideoMid')
-            if rtmp_url is None:
-                rtmp_url = self.findFileLocation(json, 'VideoLow')
+            url = self.findFileLocation(json, 'VideoHigh')
+            if url is None:
+                url = self.findFileLocation(json, 'VideoMid')
+            if url is None:
+                url = self.findFileLocation(json, 'VideoLow')
+            # Also check for audio
+            if url is None:
+                url = self.findFileLocation(json, 'Audio')
+
+            if url is None:
+                continue
+
+            if url[0:4] == 'rtmp':
+                # patch url to work with mplayer
+                m = re.match('(rtmp://.*?)/(.*)', url)
+                url = '%s/bonanza/%s' % (m.group(1), m.group(2))
 
-            # patch rtmp_url to work with mplayer
-            m = re.match('(rtmp://.*?)/(.*)', rtmp_url)
-            rtmp_url = '%s/bonanza/%s' % (m.group(1), m.group(2))
-            xbmcplugin.addDirectoryItem(HANDLE, rtmp_url, item, False)
+            items.append((url, item, False))
+        xbmcplugin.addDirectoryItems(HANDLE, items)
 
     def findFileLocation(self, json, type):
         for file in json['Files']:
@@ -135,10 +191,13 @@ class Bonanza(object):
         return None
     
     def _downloadUrl(self, url):
-        u = urllib2.urlopen(url)
-        data = u.read()
-        u.close()
-        return data
+        try:
+            u = urllib2.urlopen(url)
+            data = u.read()
+            u.close()
+            return data
+        except Exception, ex:
+            raise BonanzaException(ex)
 
     def _decodeHtmlEntities(self, string):
         """Decodes the HTML entities found in the string and returns the 
modified string.
@@ -150,6 +209,9 @@ class Bonanza(object):
         string -- the string with HTML entities
 
         """
+        if type(string) not in [str, unicode]:
+            return string
+
         def substituteEntity(match):
             ent = match.group(3)
             if match.group(1) == "#":
@@ -185,6 +247,16 @@ class Bonanza(object):
         return "%02d:%02d:%02d" % (hours, minutes, seconds)
 
 
+    def _getTab(self, html, tabLabel):
+        m = re.search('(<div id="tabWrapper" class="tabWrapper"><span 
class="tabTitle">' + tabLabel + '.*?</div>)', html, re.DOTALL + re.IGNORECASE)
+        return m.group(1)
+
+    def showError(self, message):
+        heading = buggalo.getRandomHeading()
+        line1 = ADDON.getLocalizedString(30900)
+        line2 = ADDON.getLocalizedString(30901)
+        xbmcgui.Dialog().ok(heading, line1, line2, message)
+
 if __name__ == '__main__':
     ADDON = xbmcaddon.Addon(id = 'plugin.video.dr.dk.bonanza')
     PATH = sys.argv[0]
@@ -194,15 +266,26 @@ if __name__ == '__main__':
     ICON = os.path.join(ADDON.getAddonInfo('path'), 'icon.png')
     FANART = os.path.join(ADDON.getAddonInfo('path'), 'fanart.jpg')
 
+    buggalo.SUBMIT_URL = 'http://tommy.winther.nu/exception/submit.php'
     b = Bonanza()
-    if PARAMS.has_key('mode') and PARAMS['mode'][0] == 'subcat':
-        b.showSubCategories(PARAMS['url'][0])
-    elif PARAMS.has_key('mode') and PARAMS['mode'][0] == 'content':
-        b.showContent(PARAMS['url'][0])
-    elif PARAMS.has_key('mode') and PARAMS['mode'][0] == 'search':
-        b.search()
-    elif PARAMS.has_key('mode') and PARAMS['mode'][0] == 'recommend':
-        b.showRecommendations()
-    else:
-        b.showCategories()
+    try:
+        if PARAMS.has_key('mode') and PARAMS['mode'][0] == 'subcat':
+            b.showSubCategories(PARAMS['url'][0])
+        elif PARAMS.has_key('mode') and PARAMS['mode'][0] == 'content':
+            b.showContent(PARAMS['url'][0])
+        elif PARAMS.has_key('mode') and PARAMS['mode'][0] == 'search':
+            b.search()
+        elif PARAMS.has_key('mode') and PARAMS['mode'][0] == 'recommend':
+            b.showRecommendations()
+        elif PARAMS.has_key('mode') and PARAMS['mode'][0] == 'latest':
+            b.showLatest()
+        else:
+            b.showCategories()
+
+    except BonanzaException, ex:
+        b.showError(str(ex))
+
+    except Exception:
+        buggalo.onExceptionRaised()
+
 
diff --git a/plugin.video.dr.dk.bonanza/addon.xml 
b/plugin.video.dr.dk.bonanza/addon.xml
index 130d913..7629f22 100644
--- a/plugin.video.dr.dk.bonanza/addon.xml
+++ b/plugin.video.dr.dk.bonanza/addon.xml
@@ -1,11 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<addon id="plugin.video.dr.dk.bonanza"
-       version="2.0.0"
-       name="DR.dk Bonanza"
-       provider-name="twinther [[email protected]]">
+<addon id="plugin.video.dr.dk.bonanza" version="2.1.1" name="DR.dk Bonanza" 
provider-name="twinther [[email protected]]">
     <requires>
         <import addon="xbmc.python" version="2.0"/>
         <import addon="script.module.simplejson" version="2.0.10"/>
+        <import addon="script.module.buggalo" version="1.0.0"/>
     </requires>
     <extension point="xbmc.python.pluginsource" library="addon.py">
         <provides>video</provides>
diff --git a/plugin.video.dr.dk.bonanza/changelog.txt 
b/plugin.video.dr.dk.bonanza/changelog.txt
index d9550a1..71e698a 100644
--- a/plugin.video.dr.dk.bonanza/changelog.txt
+++ b/plugin.video.dr.dk.bonanza/changelog.txt
@@ -1,3 +1,13 @@
+[B]Version 2.1.1 - 2012-02-23[/B]
+- Fixed minor problems with parsing data from Bonanza
+
+[B]Version 2.1.0 - 2012-02-15[/B]
+- Introduced usage of script.module.buggalo for improved error handling
+  with option for the user to submit exceptions/bugs
+- Added support for some radio content
+- Added support for Recently added
+- Fixed problem with missing Editors favourites (once again)
+
 [B]Version 2.0.0 - 2011-07-28[/B]
 - Removed support for Dharma
 - Otherwise same changes as 1.1.0
diff --git a/plugin.video.dr.dk.bonanza/resources/language/Danish/strings.xml 
b/plugin.video.dr.dk.bonanza/resources/language/Danish/strings.xml
index d9f3b76..92a7d32 100644
--- a/plugin.video.dr.dk.bonanza/resources/language/Danish/strings.xml
+++ b/plugin.video.dr.dk.bonanza/resources/language/Danish/strings.xml
@@ -2,4 +2,10 @@
 <strings>
        <string id="30001">Søg i Bonanza</string>
        <string id="30002">Redaktionens favoritter</string>
+    <string id="30003">%d klip set på Bonanza</string>
+    <string id="30004">Senest tilføjet på Bonanza</string>
+
+    <string id="30900">Der er sket en fejl i kommunikationen med 
Bonanza.</string>
+    <string id="30901">Prøv igen senere. Fejlen er:</string>
+
 </strings>
diff --git a/plugin.video.dr.dk.bonanza/resources/language/English/strings.xml 
b/plugin.video.dr.dk.bonanza/resources/language/English/strings.xml
index a804e1e..92a68b1 100644
--- a/plugin.video.dr.dk.bonanza/resources/language/English/strings.xml
+++ b/plugin.video.dr.dk.bonanza/resources/language/English/strings.xml
@@ -2,4 +2,9 @@
 <strings>
        <string id="30001">Search Bonanza</string>
        <string id="30002">Editors favourites</string>
+       <string id="30003">%d videos seen on Bonanza</string>
+    <string id="30004">Recently added on Bonanza</string>
+
+    <string id="30900">There was an error while communication with 
Bonanza.</string>
+    <string id="30901">Please try again later. Error message is:</string>
 </strings>

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

commit 3c45dfad895633ce06de05e23f75b1c045ccfc42
Author: spiff <[email protected]>
Date:   Sun Mar 4 20:23:21 2012 +0100

    [plugin.video.onside.tv] updated to version 2.0.0

diff --git a/.gitignore b/.gitignore
index 69a9e22..6b6e8fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -80,3 +80,5 @@ plugin.video.ted.talks/.git
 plugin.video.ted.talks/.gitignore
 plugin.video.wimp/.git
 plugin.video.gamestar/.git
+plugin.video.onside.tv/.git
+plugin.video.onside.tv/.idea

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

Summary of changes:
 .gitignore                                         |    2 +
 plugin.video.dr.dk.bonanza/addon.py                |  151 +++++++++++++++-----
 plugin.video.dr.dk.bonanza/addon.xml               |    6 +-
 plugin.video.dr.dk.bonanza/changelog.txt           |   10 ++
 .../resources/language/Danish/strings.xml          |    6 +
 .../resources/language/English/strings.xml         |    5 +
 plugin.video.mediathek/addon.xml                   |    2 +-
 plugin.video.mediathek/changelog.txt               |    3 +-
 plugin.video.mediathek/mediathek/dreisat.py        |    8 +-
 .../LICENSE.txt                                    |    0
 plugin.video.onside.tv/addon.py                    |  123 ++++++++++++++++
 plugin.video.onside.tv/addon.xml                   |   22 +++
 plugin.video.onside.tv/changelog.txt               |   15 ++
 plugin.video.onside.tv/fanart.jpg                  |  Bin 0 -> 23041 bytes
 plugin.video.onside.tv/icon.png                    |  Bin 0 -> 19550 bytes
 .../resources/language/Danish/strings.xml          |   10 ++
 .../resources/language/English/strings.xml         |   10 ++
 .../resources/settings.xml                         |    5 +-
 18 files changed, 333 insertions(+), 45 deletions(-)
 copy {plugin.audio.abradio.cz => plugin.video.onside.tv}/LICENSE.txt (100%)
 create mode 100644 plugin.video.onside.tv/addon.py
 create mode 100644 plugin.video.onside.tv/addon.xml
 create mode 100644 plugin.video.onside.tv/changelog.txt
 create mode 100644 plugin.video.onside.tv/fanart.jpg
 create mode 100644 plugin.video.onside.tv/icon.png
 create mode 100644 plugin.video.onside.tv/resources/language/Danish/strings.xml
 create mode 100644 
plugin.video.onside.tv/resources/language/English/strings.xml
 copy {plugin.video.drnu => plugin.video.onside.tv}/resources/settings.xml (50%)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to