The branch, dharma has been updated
via 8cdd794e596a6e8eacb83804f8ddd8acc4ce96de (commit)
from c5aad56f197cda6b17bad933d241f038df070480 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=8cdd794e596a6e8eacb83804f8ddd8acc4ce96de
commit 8cdd794e596a6e8eacb83804f8ddd8acc4ce96de
Author: spiff <[email protected]>
Date: Sat Feb 5 14:38:43 2011 +0100
[plugin.video.mediathek] updated to version 0.1.7
diff --git a/plugin.video.mediathek/addon.xml b/plugin.video.mediathek/addon.xml
index 9b3f851..4494d10 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.6"
+ version="0.1.7"
name="Mediathek"
provider-name="Raptor 2101 [[email protected]]">
<requires>
@@ -17,11 +17,11 @@
<summary lang="en">Gives acces to the most video-platforms from german
public service broadcaster</summary>
<description lang="de">Ermöglicht den zugriff auf alle deutschen
Mediatheken der öffentlich Rechtlichen.
Aktuell implementiert sind:
- 3Sat, ARD, ZDF, ARTE, Bayrisches Fernsehen
+ 3Sat, ARD, ZDF, ARTE, Bayrisches Fernsehen, ORF
</description>
<description lang="en">Gives acces to the most video-platforms from german
public service broadcaster.
Currently implemented:
- 3Sat, ARD, ZDF, ARTE, Bayrisches Fernsehen
+ 3Sat, ARD, ZDF, ARTE, Bayrisches Fernsehen, ORF
</description>
<platform>all</platform>
</extension>
diff --git a/plugin.video.mediathek/changelog.txt
b/plugin.video.mediathek/changelog.txt
index 84514e3..1b594c9 100644
--- a/plugin.video.mediathek/changelog.txt
+++ b/plugin.video.mediathek/changelog.txt
@@ -1,3 +1,4 @@
+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
0.1.5 - Bypassing Arte-FalshVersion check
diff --git a/plugin.video.mediathek/default.py
b/plugin.video.mediathek/default.py
index c08c6a5..976664d 100644
--- a/plugin.video.mediathek/default.py
+++ b/plugin.video.mediathek/default.py
@@ -45,9 +45,8 @@ action=params.get("action", "")
gui.log("DirectAccess: %s"%gui.directAccess);
gui.log("Quality: %s"%gui.quality);
-
-
-
+gui.log("argv[0]: %s"%sys.argv[0]);
+gui.log("argv[1]: %s"%sys.argv[0]);
gui.openMenuContext();
factory = MediathekFactory();
@@ -80,6 +79,12 @@ else:
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)
+ remotePlaylist = mediathek.loadPage(link);
+ gui.playPlaylist(remotePlaylist);
elif(action == "openMenu"):
path = params.get("path", "0");
mediathek.buildMenu(path)
diff --git a/plugin.video.mediathek/mediathek/factory.py
b/plugin.video.mediathek/mediathek/factory.py
index d040477..4bae652 100644
--- a/plugin.video.mediathek/mediathek/factory.py
+++ b/plugin.video.mediathek/mediathek/factory.py
@@ -20,6 +20,7 @@ from mediathek.zdf import *
from mediathek.arte import *
from mediathek.dreisat import *
from mediathek.bayerisches import *
+from mediathek.orf import *
class MediathekFactory(object):
def __init__(self):
@@ -29,6 +30,7 @@ class MediathekFactory(object):
ARTEMediathek.name():ARTEMediathek,
DreiSatMediathek.name():DreiSatMediathek,
BayerischesFSMediathek.name():BayerischesFSMediathek,
+ ORFMediathek.name():ORFMediathek,
}
def getAvaibleMediathekTypes(self):
return sorted(self.avaibleMediathekes.keys())
diff --git a/plugin.video.mediathek/simplexbmc.py
b/plugin.video.mediathek/simplexbmc.py
index fb0969e..a2bba34 100644
--- a/plugin.video.mediathek/simplexbmc.py
+++ b/plugin.video.mediathek/simplexbmc.py
@@ -15,8 +15,11 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import xbmc, xbmcgui, xbmcplugin,xbmcaddon, sys, urllib, os, time
+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");
__plugin__ = "Mediathek"
@@ -50,37 +53,47 @@ class SimpleXbmcGui(object):
listItem=xbmcgui.ListItem(title, iconImage="DefaultFolder.png",
thumbnailImage=displayObject.picture)
if(displayObject.isPlayable):
- self.log(displayObject.title);
- listItem.setProperty('IsPlayable', 'true');
- if(self.quality in displayObject.link):
- link = displayObject.link[self.quality];
+ if(displayObject.isPlayable == "PlayList"):
+ link = displayObject.link[0]
+
+ url = "%s?type=%s&action=openPlayList&link=%s" %
(sys.argv[0],mediathek.name(), urllib.quote_plus(link.basePath))
+
+ self.log(url);
+
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=listItem,isFolder=True)
else:
- selectedKey = -1;
- for key in displayObject.link.keys():
- if(key < self.quality and key > selectedKey):
- selectedKey = key;
- if(selectedKey > -1):
- link = displayObject.link[selectedKey];
+ self.log(displayObject.title);
+ if(self.quality in displayObject.link):
+ link = displayObject.link[self.quality];
else:
- selectedKey = displayObject.link.keys()[0];
+ selectedKey = -1;
for key in displayObject.link.keys():
- if(key < selectedKey):
+ if(key < self.quality and key > selectedKey):
selectedKey = key;
- link = displayObject.link[selectedKey];
-
- if(type(link).__name__ == "ComplexLink"):
- self.log("PlayPath:"+ link.playPath);
- listItem.setProperty("PlayPath", link.playPath);
+ if(selectedKey > -1):
+ link = displayObject.link[selectedKey];
+ else:
+ selectedKey = displayObject.link.keys()[0];
+ for key in displayObject.link.keys():
+ if(key < selectedKey):
+ selectedKey = key;
+ link = displayObject.link[selectedKey];
+
+ if(type(link).__name__ == "ComplexLink"):
+ self.log("PlayPath:"+ link.playPath);
+ listItem.setProperty("PlayPath", link.playPath);
- self.log("URL:"+ link.basePath);
- listItem.setInfo("video",{
- "size": link.size,
- "date": time.strftime("%d.%m.%Y",displayObject.date),
- "year": int(time.strftime("%Y",displayObject.date)),
- "title": title,
- "plot": transformHtmlCodes(displayObject.description)
- });
-
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=link.basePath,listitem=listItem,isFolder=False)
+ self.log("URL:"+ link.basePath);
+ listItem.setInfo("video",{
+ "size": link.size,
+ "date": time.strftime("%d.%m.%Y",displayObject.date),
+ "year": int(time.strftime("%Y",displayObject.date)),
+ "title": title,
+ "plot": transformHtmlCodes(displayObject.description)
+ });
+
+
+ listItem.setProperty('IsPlayable', 'true');
+
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=link.basePath,listitem=listItem,isFolder=False)
else:
url = "%s?type=%s&action=openTopicPage&link=%s" %
(sys.argv[0],mediathek.name(), urllib.quote_plus(displayObject.link))
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=listItem,isFolder=True)
@@ -124,7 +137,27 @@ class SimpleXbmcGui(object):
else:
url = "%s?action=search" % (sys.argv[0])
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=listItem,isFolder=True)
+
+ def readText(self,node,textNode):
+ try:
+ node = node.getElementsByTagName(textNode)[0].firstChild;
+ return unicode(node.data);
+ except:
+ return "";
+
+ def playPlaylist(self, remotePlaylist):
+ playerItem = xbmcgui.ListItem("RemotePlayList")
+ playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
+ for link in regex_findLink.findall(remotePlaylist):
+ print link;
+ listItem=xbmcgui.ListItem("NoOne");
+ listItem.setProperty("PlayPath", link);
+
+ playlist.add(url=link, listitem=listItem);
+ xbmc.Player().play(playlist);
+ xbmc.executebuiltin("PreviousMenu");
+
def errorOK(self,title="", msg=""):
e = str( sys.exc_info()[ 1 ] )
self.log(e)
diff --git a/plugin.video.mediathek/simplexml.py
b/plugin.video.mediathek/simplexml.py
index 1b0b037..cea54bb 100644
--- a/plugin.video.mediathek/simplexml.py
+++ b/plugin.video.mediathek/simplexml.py
@@ -32,20 +32,20 @@ class XmlWriter(object):
for node in xmlSettings.getElementsByTagName("setting"):
id = node.getAttribute("id");
if (id == "quality"):
- self.quality = int(node.getAttribute("value"));
+ self.quality = int(node.getAttribute("value"));
elif (id == "mode"):
- self.directAccess = node.getAttribute("value");
+ self.directAccess = node.getAttribute("value");
elif (id == "preferedStreamType"):
- self.preferedStreamTyp = int(node.getAttribute("value"));
+ self.preferedStreamTyp = int(node.getAttribute("value"));
def log(self, msg):
if type(msg) not in (str, unicode):
print(type(msg));
else:
try:
- print(msg.encode('utf8'));
+ print(msg.encode('utf8'));
except:
- print(msg);
+ print(msg);
def createLinkNode(self, links):
rootNode = self.xmlDocument.createElement('Link');
@@ -57,19 +57,18 @@ class XmlWriter(object):
linkNode.setAttribute("quality",unicode(quality));
if(type(link).__name__ == "ComplexLink"):
- basePath = self.xmlDocument.createElement('BasePath');
- value = self.xmlDocument.createTextNode(link.basePath);
- basePath.appendChild(value);
- playPath = self.xmlDocument.createElement('PlayPath');
- value = self.xmlDocument.createTextNode(link.playPath);
- playPath.appendChild(value);
-
- linkNode.appendChild(basePath);
- linkNode.appendChild(playPath);
+ basePath = self.xmlDocument.createElement('BasePath');
+ value = self.xmlDocument.createTextNode(link.basePath);
+ basePath.appendChild(value);
+ playPath = self.xmlDocument.createElement('PlayPath');
+ value = self.xmlDocument.createTextNode(link.playPath);
+ playPath.appendChild(value);
+
+ linkNode.appendChild(basePath);
+ linkNode.appendChild(playPath);
else:
- value = self.xmlDocument.createTextNode(link.basePath);
- linkNode.appendChild(value);
-
+ value = self.xmlDocument.createTextNode(link.basePath);
+ linkNode.appendChild(value);
rootNode.appendChild(linkNode);
return rootNode;
@@ -179,11 +178,11 @@ class XmlReader (object):
isPlayable =
menuNode.getElementsByTagName('IsPlayable')[0].childNodes[0].data;
if(isPlayable=="True"):
- link = self.readLinkNode(menuNode.getElementsByTagName('Link')[0]);
- displayObject = DisplayObject(title,"",picture,"",link,True);
+ link = self.readLinkNode(menuNode.getElementsByTagName('Link')[0]);
+ displayObject = DisplayObject(title,"",picture,"",link,True);
else:
- link = menuNode.getElementsByTagName('Link')[0].childNodes[0].data;
- displayObject = DisplayObject(title,"",picture,"",link,False);
+ link = menuNode.getElementsByTagName('Link')[0].childNodes[0].data;
+ displayObject = DisplayObject(title,"",picture,"",link,False);
self.gui.buildVideoLink(displayObject, self.mediathek);
def readLinkNode(self, rootNode):
@@ -191,12 +190,12 @@ class XmlReader (object):
for linkNode in rootNode.childNodes:
quality = int(linkNode.getAttribute("quality"));
if(linkNode.tagName == "ComplexLink"):
- basePath =
linkNode.getElementsByTagName('BasePath')[0].childNodes[0].data
- playPath =
linkNode.getElementsByTagName('PlayPath')[0].childNodes[0].data
- link = ComplexLink(basePath,playPath);
+ basePath =
linkNode.getElementsByTagName('BasePath')[0].childNodes[0].data
+ playPath =
linkNode.getElementsByTagName('PlayPath')[0].childNodes[0].data
+ link = ComplexLink(basePath,playPath);
else:
- basePath = linkNode.childNodes[0].data
- link = SimpleLink(basePath);
+ basePath = linkNode.childNodes[0].data
+ link = SimpleLink(basePath);
links[quality] = link;
return links;
def displayMenuNodes(self,rootNode):
-----------------------------------------------------------------------
Summary of changes:
plugin.video.mediathek/addon.xml | 6 +-
plugin.video.mediathek/changelog.txt | 1 +
plugin.video.mediathek/default.py | 11 +-
plugin.video.mediathek/mediathek/factory.py | 2 +
plugin.video.mediathek/mediathek/orf.py | 198 +++++++++++++++++++++++++++
plugin.video.mediathek/simplexbmc.py | 87 ++++++++----
plugin.video.mediathek/simplexml.py | 51 ++++----
7 files changed, 297 insertions(+), 59 deletions(-)
create mode 100644 plugin.video.mediathek/mediathek/orf.py
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons