The branch, dharma has been updated
       via  3ef9ef39cca01fcf67d6e7d39337e18a66bc68a1 (commit)
      from  6b14238cf5acba34d8ab99a6d42994c5ca0d309e (commit)

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

commit 3ef9ef39cca01fcf67d6e7d39337e18a66bc68a1
Author: spiff <[email protected]>
Date:   Mon Apr 11 10:04:38 2011 +0200

    [plugin.video.mediathek] updated to version 0.1.8

diff --git a/plugin.video.mediathek/addon.xml b/plugin.video.mediathek/addon.xml
index 4494d10..42d5a4a 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.1.7"
+  version="0.1.8"
   name="Mediathek"
   provider-name="Raptor 2101 [[email protected]]">
   <requires>
diff --git a/plugin.video.mediathek/changelog.txt 
b/plugin.video.mediathek/changelog.txt
index 1b594c9..7df93c2 100644
--- a/plugin.video.mediathek/changelog.txt
+++ b/plugin.video.mediathek/changelog.txt
@@ -1,3 +1,4 @@
+0.1.8 - ZDF Changes their Interface, reimplement it
 0.1.7 - Adding ORF
 0.1.6 - FIXES: Arty playback now functional, RTMP set as default, Sorting of 
Items in Bayrisches Fernsehen
         ADD: Searching for  ARTE, ARD, ZDF, 3Sat
diff --git a/plugin.video.mediathek/default.py 
b/plugin.video.mediathek/default.py
index 976664d..4b7a5ee 100644
--- a/plugin.video.mediathek/default.py
+++ b/plugin.video.mediathek/default.py
@@ -76,13 +76,12 @@ else:
     mediathek = XmlReader(mediathekName,gui);
     
   if(action == "openTopicPage"):
-    link = urllib.unquote_plus(params.get("link", ""))
-    gui.log(link)
+    link = urllib.unquote_plus(params.get("link", ""));
+    gui.log(link);
     mediathek.buildPageMenu(link);
   elif(action == "openPlayList"):
-    
-    link = urllib.unquote_plus(params.get("link", ""))
-    gui.log(link)
+    link = urllib.unquote_plus(params.get("link", ""));
+    gui.log(link);
     remotePlaylist = mediathek.loadPage(link);
     gui.playPlaylist(remotePlaylist);
   elif(action == "openMenu"):
diff --git a/plugin.video.mediathek/mediathek/zdf.py 
b/plugin.video.mediathek/mediathek/zdf.py
index 150efa3..90e7be8 100644
--- a/plugin.video.mediathek/mediathek/zdf.py
+++ b/plugin.video.mediathek/mediathek/zdf.py
@@ -18,7 +18,7 @@
 import re,math,traceback,time
 from mediathek import *
 from xml.dom import minidom
-
+from xml.dom import Node;
     
 class ZDFMediathek(Mediathek):
   def __init__(self, simpleXbmcGui):
@@ -182,7 +182,6 @@ class ZDFMediathek(Mediathek):
         links = {};
         for streamObject in configXml.getElementsByTagName("formitaet"):
           baseType = streamObject.getAttribute("basetype")
-          self.gui.log(baseType);
           if(baseType.find("asx_http")>-1):
             quality = 
streamObject.getElementsByTagName("quality")[0].childNodes[0].data;
             url = 
streamObject.getElementsByTagName("url")[0].childNodes[0].data;
@@ -208,16 +207,40 @@ class ZDFMediathek(Mediathek):
   
   def getRtmpLinks(self, url, size):
     links = {};
+    hostConfig = {};
     smilPage = self.loadPage(url);
     if(not smilPage.startswith("<?xml")):
       return None;
-      
+    
     xmlDocument = minidom.parseString(smilPage);
-    for ref in xmlDocument.getElementsByTagName("ref"):
-      quality = ref.getElementsByTagName("param")[0].getAttribute("value");
-      urlString = ref.getAttribute("src");
-      array = urlString.split("mp4:");
-      link = SimpleLink(array[0]+" playPath=mp4:/"+array[1],size);
+    
+    self.cleanupNodes(xmlDocument.documentElement);
+    xmlDocument.documentElement.normalize() 
+    
+    #extract hostData
+    for paramGroup in xmlDocument.getElementsByTagName("paramGroup"):
+      groupName = paramGroup.getAttribute("xml:id");
+      print paramGroup.toxml()
+      host = "";
+      app = ""
+      for param in paramGroup.childNodes:
+        
+        paramName = param.getAttribute("name");
+        if(paramName == "app"): app = param.getAttribute("value");
+        if(paramName == "host"): host = param.getAttribute("value");
+      hostConfig[groupName] = "rtmp://"+host+"/"+app+"/";
+      
+    
+    videoNodes = xmlDocument.getElementsByTagName("video");
+   
+    for videoNode in videoNodes:
+      quality = 
videoNode.getElementsByTagName("param")[0].getAttribute("value");
+      paramGroupName = videoNode.getAttribute("paramGroup");
+      
+      hostString = hostConfig[paramGroupName];
+      urlString = videoNode.getAttribute("src");
+      
+      link = SimpleLink(hostString+" playPath="+urlString,size);
       if(quality == "low"):
         links[0] = link
       elif(quality == "high"):
@@ -241,4 +264,11 @@ class ZDFMediathek(Mediathek):
         titles.append(title);
       while len(titles) < 2:
         titles.append("");
-      
self.gui.buildVideoLink(DisplayObject(titles[0],titles[1],pictureLink,"",videoPageLink,False),self);
\ No newline at end of file
+      
self.gui.buildVideoLink(DisplayObject(titles[0],titles[1],pictureLink,"",videoPageLink,False),self);
+  
+  def cleanupNodes(self, rootNode):
+    for node in rootNode.childNodes:
+      if node.nodeType == Node.TEXT_NODE:
+        node.data = node.data.strip()
+      else:
+        self.cleanupNodes(node);
\ No newline at end of file
diff --git a/plugin.video.mediathek/simplexbmc.py 
b/plugin.video.mediathek/simplexbmc.py
index a2bba34..226c0dd 100644
--- a/plugin.video.mediathek/simplexbmc.py
+++ b/plugin.video.mediathek/simplexbmc.py
@@ -19,7 +19,7 @@ import xbmc, xbmcgui, xbmcplugin,xbmcaddon, sys, urllib, os, 
time, re
 from html import transformHtmlCodes
 from xml.dom import minidom
 
-regex_findLink = re.compile("mms://.*wmv");
+regex_findLink = re.compile("mms://[^\"]*wmv");
 
 __plugin__ = "Mediathek"
 
@@ -146,17 +146,20 @@ class SimpleXbmcGui(object):
       return "";
       
   def playPlaylist(self, remotePlaylist):
-    playerItem = xbmcgui.ListItem("RemotePlayList")
-    playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)    
+    xbmc.executebuiltin("Playlist.Clear");
+    player = xbmc.Player();
+    
+    playerItem = xbmcgui.ListItem(remotePlaylist);
+    playlist = xbmc.PlayList(xbmc.PLAYLIST_MUSIC)
+    print "playPlaylist";
     
     for link in regex_findLink.findall(remotePlaylist):
       print link;
-      listItem=xbmcgui.ListItem("NoOne");
+      listItem=xbmcgui.ListItem(link);
       listItem.setProperty("PlayPath", link);
-      
       playlist.add(url=link, listitem=listItem);
-    xbmc.Player().play(playlist);
-    xbmc.executebuiltin("PreviousMenu");
+    
+    player.play(playlist, playerItem);
       
   def errorOK(self,title="", msg=""):
     e = str( sys.exc_info()[ 1 ] )

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

Summary of changes:
 plugin.video.mediathek/addon.xml        |    2 +-
 plugin.video.mediathek/changelog.txt    |    1 +
 plugin.video.mediathek/default.py       |    9 ++---
 plugin.video.mediathek/mediathek/zdf.py |   48 +++++++++++++++++++++++++------
 plugin.video.mediathek/simplexbmc.py    |   17 ++++++----
 5 files changed, 55 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to