bt
Back Forum Reply New

Updated Unbehagen's ZDF-Mediathek for use with XBMC for Linux

Hello all,

          i am running XBMC on Hardy Heron and wanted to use Unbehagen's ZDF-Mediathek plugin. So i added a few hacks in order to get it running. All the changes should be backward compatible, so that it should still be running on the good old Xbox.

Since i could't find the maintainer's email address, i post the changes here and hope that the changes will perhaps be integrated. Feel free to contact me on any questions.

Here is my joox.plx file:

Code:
version=1
background=default
title=ZDF-Mediathek
type=rss
name=Die Mediathek vom ZDF
thumb=default
ucl=from--www.zdf.de/ZDFmediathek/sendungen?view=navJson
Here is the patch to default.py

Code:
--- /home/gee/build/temp/plugins/video/ZDF mediathek/default.py2008-05-02 15:44:08.732169984  0200
    default.py2008-05-02 15:46:28.036577952  0200
@@ -4,8  4,8 @@
#
#############################################################################

-
from string import *
from ntpath import pathsep
import codecs
import xbmcplugin
import sys, os.path
@@ -14,13  14,16 @@
import xbmc, xbmcgui
import re, os, time, datetime, traceback
import htmlentitydefs

Version='1' #program version
SubVersion='3'

RootDir = os.getcwd()
-if RootDir[-1]==';': RootDir=RootDir[0:-1]
-if RootDir[-1]!='\\': RootDir=RootDir '\\'
-cacheDir = RootDir   quot;\\cache\\quot;
if RootDir[-1]==';':
     RootDir = RootDir[0:-1]

RootDir = RootDir   os.path.sep
cacheDir = RootDir   quot;cachequot;   os.path.sep

def decode3(line):
         dic=htmlentitydefs.name2codepoint
@@ -101,30  104,10 @@
                 self.localfile = ucl
                 self.state = 0 #success
         else: #assuming relative path
-                self.localfile = RootDir   '\\'   ucl
                 self.localfile = RootDir   ucl.strip()
                 self.state = 0 #success


-
-#    def load2(self, ucl, localfile):
-#        print ucl
-#        if ucl[:4] == 'from':
-#            try:
-#                loc = ucllib1.uclopener()
-#                loc.retrieve(ucl, localfile)
-#            except IOError:
-#                traceback.print_exc(file=sys.stdout)
-#                self.state = -1 #failed
-#                return
-#            self.state = 0 #success
-#            self.localfile = localfile
-#        elif ucl[1] == ':': #abolsute path
-#            self.localfile = ucl
-#            self.state = 0 #success
-#        else: #assuming relative path
-#            self.localfile = RootDir   '\\'   ucl
-#            self.state = 0 #success
-
######################################################################
# Description: Playlist class. Contains CMediaItem objects
######################################################################
@@ -350,7  333,7 @@
             self.state_busy = 1

            #load the playlist
-            ext = self.getFileEntension(ucl)
             ext = self.getFileExtension(ucl)
             if ext == 'plx':
                 result = self.playlist.load_plx(ucl)
             else: #assume rss feed
@@ -469,10  452,10 @@
         # Parameters : filename=local path   file name
         # Return     : -
         ######################################################################
-        def getFileEntension(self, filename):
         def getFileExtension(self, filename):
             ext_pos = filename.rfind('.') #find last '.' in the string
             if ext_pos != -1:
-                return filename[ext_pos 1:]
                 return filename[ext_pos 1:].strip()
             else:
                 return ''

@@ -526,8  509,6 @@
                     dialog = xbmcgui.Dialog()
                     dialog.ok(quot;Errorquot;, quot;Error running script.\n\nReason:\nquot; str(e))

-
-
win = Main()
win.run()
cheers

    GeE
¥
Back Forum Reply New