The branch, eden has been updated
       via  3f32f2cda2f578121ac1fc9d19993f7b5d54ecd5 (commit)
      from  119751aab88a8c0d313a76253a0c038f4785ae4a (commit)

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

commit 3f32f2cda2f578121ac1fc9d19993f7b5d54ecd5
Author: beenje <[email protected]>
Date:   Sun Apr 28 22:08:07 2013 +0200

    [plugin.video.tageswebschau] updated to version 1.0.3

diff --git a/plugin.video.tageswebschau/addon.xml 
b/plugin.video.tageswebschau/addon.xml
index 246e8fc..7ee38b5 100644
--- a/plugin.video.tageswebschau/addon.xml
+++ b/plugin.video.tageswebschau/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<addon id="plugin.video.tageswebschau" name="TagesWEBschau" version="1.0.2" 
provider-name="AddonScriptorDE">
+<addon id="plugin.video.tageswebschau" name="TagesWEBschau" version="1.0.3" 
provider-name="AddonScriptorDE">
     <requires>
         <import addon="xbmc.python" version="2.0"/>
     </requires>
@@ -13,6 +13,9 @@
         <language>de</language>
         <description lang="de">Die neuesten Web-Nachrichten</description>
         <description lang="en">Latest Web-News</description>
-    <platform>all</platform>
+        <website></website>
+        
<source>https://github.com/AddonScriptorDE/plugin.video.tageswebschau</source>
+        <forum>http://forum.xbmc.org/showthread.php?tid=132563</forum>
+        <email>AddonScriptorDE at yahoo dot de</email>
     </extension>
 </addon>
diff --git a/plugin.video.tageswebschau/changelog.txt 
b/plugin.video.tageswebschau/changelog.txt
index 4eab0bc..07b59ba 100644
--- a/plugin.video.tageswebschau/changelog.txt
+++ b/plugin.video.tageswebschau/changelog.txt
@@ -1,3 +1,8 @@
-1.0.0 - First Try
-1.0.1 - Added latest shows
-1.0.2 - Fixed site changes
\ No newline at end of file
+1.0.0
+- First Try
+1.0.1
+- Added latest shows
+1.0.2
+- Fixed site changes
+1.0.3
+- Fixed site changes
diff --git a/plugin.video.tageswebschau/default.py 
b/plugin.video.tageswebschau/default.py
index c084560..bf8b665 100644
--- a/plugin.video.tageswebschau/default.py
+++ b/plugin.video.tageswebschau/default.py
@@ -1,72 +1,81 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
-import urllib,urllib2,re,xbmc,xbmcgui,xbmcaddon,xbmcplugin
+import urllib
+import urllib2
+import re
+import xbmc
+import xbmcgui
+import xbmcaddon
+import xbmcplugin
 
 pluginhandle = int(sys.argv[1])
 
+
 def index():
-        content = 
getUrl("http://www.radiobremen.de/extranet/tws/json/tws_toc.json?_=1338860844174";)
-        spl=content.split('{\n         "titel" : ')
-        for i in range(1,len(spl),1):
-          entry=spl[i]
-          match=re.compile('"(.+?)"', re.DOTALL).findall(entry)
-          title=match[0]
-          title=cleanTitle(title)
-          match=re.compile('"img" : "(.+?)"', re.DOTALL).findall(entry)
-          thumb=match[0]
-          title=cleanTitle(title)
-          match=re.compile('"jsonurl" : "(.+?)"', re.DOTALL).findall(entry)
-          url="http://www.radiobremen.de"+match[0]
-          addLink(title,url,'playVideo',thumb)
-        xbmcplugin.endOfDirectory(pluginhandle)
+    content = 
getUrl("http://www.radiobremen.de/extranet/tws/json/tws_toc.json?_=1367168129910";)
+    spl = content.split('{\n   "titel" : ')
+    for i in range(1, len(spl), 1):
+        entry = spl[i]
+        match = re.compile('"(.+?)"', re.DOTALL).findall(entry)
+        title = match[0]
+        title = cleanTitle(title)
+        match = re.compile('"img" : "(.+?)"', re.DOTALL).findall(entry)
+        thumb = match[0]
+        title = cleanTitle(title)
+        match = re.compile('"jsonurl" : "(.+?)"', re.DOTALL).findall(entry)
+        url = "http://www.radiobremen.de"+match[0]
+        addLink(title, url, 'playVideo', thumb)
+    xbmcplugin.endOfDirectory(pluginhandle)
+
 
 def playVideo(url):
-        content = getUrl(url)
-        match1=re.compile('"url" : "http://(.+?)_L.mp4"', 
re.DOTALL).findall(content)
-        match2=re.compile('"url":"http://(.+?)_L.mp4"', 
re.DOTALL).findall(content)
-        if len(match1)>0:
-          url="http://"+match1[0]+"_L.mp4";
-        elif len(match2)>0:
-          url="http://"+match2[0]+"_L.mp4";
-        listitem = xbmcgui.ListItem(path=url)
-        return xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)
+    content = getUrl(url)
+    match1 = re.compile('"url" : "http://(.+?)_L.mp4"', 
re.DOTALL).findall(content)
+    match2 = re.compile('"url":"http://(.+?)_L.mp4"', 
re.DOTALL).findall(content)
+    if match1:
+        url = "http://"+match1[0]+"_L.mp4";
+    elif match2:
+        url = "http://"+match2[0]+"_L.mp4";
+    listitem = xbmcgui.ListItem(path=url)
+    xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)
+
 
 def cleanTitle(title):
-        return 
title.replace("&lt;","<").replace("&gt;",">").replace("&amp;","&").replace("&#039;","\\").replace("&quot;","\"").strip()
+    return title.replace("&lt;", "<").replace("&gt;", ">").replace("&amp;", 
"&").replace("&#039;", "\\").replace("&quot;", "\"").strip()
+
 
 def getUrl(url):
-        req = urllib2.Request(url)
-        req.add_header('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) 
Gecko/20100101 Firefox/11.0')
-        response = urllib2.urlopen(req)
-        link=response.read()
-        response.close()
-        return link
+    req = urllib2.Request(url)
+    req.add_header('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; rv:19.0) 
Gecko/20100101 Firefox/19.0')
+    response = urllib2.urlopen(req)
+    link = response.read()
+    response.close()
+    return link
+
 
 def parameters_string_to_dict(parameters):
-        ''' Convert parameters encoded in a URL to a dict. '''
-        paramDict = {}
-        if parameters:
-            paramPairs = parameters[1:].split("&")
-            for paramsPair in paramPairs:
-                paramSplits = paramsPair.split('=')
-                if (len(paramSplits)) == 2:
-                    paramDict[paramSplits[0]] = paramSplits[1]
-        return paramDict
+    paramDict = {}
+    if parameters:
+        paramPairs = parameters[1:].split("&")
+        for paramsPair in paramPairs:
+            paramSplits = paramsPair.split('=')
+            if (len(paramSplits)) == 2:
+                paramDict[paramSplits[0]] = paramSplits[1]
+    return paramDict
+
 
-def addLink(name,url,mode,iconimage):
-        u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)
-        ok=True
-        liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png", 
thumbnailImage=iconimage)
-        liz.setInfo( type="Video", infoLabels={ "Title": name } )
-        liz.setProperty('IsPlayable', 'true')
-        
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz)
-        return ok
+def addLink(name, url, mode, iconimage):
+    u = sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)
+    ok = True
+    liz = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", 
thumbnailImage=iconimage)
+    liz.setInfo(type="Video", infoLabels={"Title": name})
+    liz.setProperty('IsPlayable', 'true')
+    ok = xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=u, 
listitem=liz)
+    return ok
 
-params=parameters_string_to_dict(sys.argv[2])
-mode=params.get('mode')
-url=params.get('url')
-if type(url)==type(str()):
-  url=urllib.unquote_plus(url)
+params = parameters_string_to_dict(sys.argv[2])
+mode = urllib.unquote_plus(params.get('mode', ''))
+url = urllib.unquote_plus(params.get('url', ''))
 
 if mode == 'playVideo':
     playVideo(url)

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

Summary of changes:
 plugin.video.tageswebschau/addon.xml     |    7 ++-
 plugin.video.tageswebschau/changelog.txt |   11 ++-
 plugin.video.tageswebschau/default.py    |  115 ++++++++++++++++--------------
 3 files changed, 75 insertions(+), 58 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to