The branch, eden has been updated
       via  651b95039fb3bc5e24dbffc7eb62708866e18c69 (commit)
      from  a8fa9b6d667ef65e1f9a0cc2f56ace70995949c3 (commit)

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

commit 651b95039fb3bc5e24dbffc7eb62708866e18c69
Author: spiff <[email protected]>
Date:   Fri Apr 13 15:58:50 2012 +0200

    [plugin.video.fernsehkritik_tv] updated to version 1.0.2

diff --git a/plugin.video.fernsehkritik_tv/addon.xml 
b/plugin.video.fernsehkritik_tv/addon.xml
index 8bb4908..fc746ae 100644
--- a/plugin.video.fernsehkritik_tv/addon.xml
+++ b/plugin.video.fernsehkritik_tv/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<addon id="plugin.video.fernsehkritik_tv" name="Fernsehkritik.tv" 
version="1.0.1" provider-name="AddonScriptorDE">
+<addon id="plugin.video.fernsehkritik_tv" name="Fernsehkritik.tv" 
version="1.0.2" provider-name="AddonScriptorDE">
     <requires>
         <import addon="xbmc.python" version="2.0"/>
     </requires>
diff --git a/plugin.video.fernsehkritik_tv/changelog.txt 
b/plugin.video.fernsehkritik_tv/changelog.txt
index c1328c5..69c86c6 100644
--- a/plugin.video.fernsehkritik_tv/changelog.txt
+++ b/plugin.video.fernsehkritik_tv/changelog.txt
@@ -1,3 +1,3 @@
-1.0.0
- - First Try
-1.0.1 - Changed addon.xml
\ No newline at end of file
+1.0.0 - First Try
+1.0.1 - Changed addon.xml
+1.0.2 - Fixxed TV-Magazin Episode 1-66
\ No newline at end of file
diff --git a/plugin.video.fernsehkritik_tv/default.py 
b/plugin.video.fernsehkritik_tv/default.py
index f1ddf99..a26622b 100644
--- a/plugin.video.fernsehkritik_tv/default.py
+++ b/plugin.video.fernsehkritik_tv/default.py
@@ -6,16 +6,20 @@ import sys
 import urllib, urllib2
 import re
 import random
+import xbmcaddon
 
 thisPlugin = int(sys.argv[1])
 
+settings = xbmcaddon.Addon(id='plugin.video.fernsehkritik_tv')
+translation = settings.getLocalizedString
+
 def index():
         
addDir("TV-Magazin","http://fernsehkritik.tv/tv-magazin/komplett/",1,"";)
         addDir("Pantoffelkino-TV","http://fernsehkritik.tv/pktv/",1,"";)
-        addDir("Extras: Alle Extras","http://fernsehkritik.tv/extras/",1,"";)
-        addDir("Extras: Aktuell im 
Gespräch","http://fernsehkritik.tv/extras/aktuell/",1,"";)
-        addDir("Extras: Schlechte Filme 
TV","http://fernsehkritik.tv/extras/sftv/",1,"";)
-        addDir("Extras: Pantoffelkino-TV 
Pannen","http://fernsehkritik.tv/extras/pktv/",1,"";)
+        addDir(str(translation(30001))+": 
"+str(translation(30002)),"http://fernsehkritik.tv/extras/",1,"";)
+        addDir(str(translation(30001))+": Aktuell im 
Gespräch","http://fernsehkritik.tv/extras/aktuell/",1,"";)
+        addDir(str(translation(30001))+": Schlechte Filme 
TV","http://fernsehkritik.tv/extras/sftv/",1,"";)
+        addDir(str(translation(30001))+": Pantoffelkino-TV 
Pannen","http://fernsehkritik.tv/extras/pktv/",1,"";)
         xbmcplugin.endOfDirectory(thisPlugin)
         if (xbmc.getSkinDir() == "skin.confluence" or xbmc.getSkinDir() == 
"skin.touched"): xbmc.executebuiltin('Container.SetViewMode(50)')
 
@@ -36,36 +40,46 @@ def listVideos(url):
             elif url.find("#extra-")==0:
               newUrl=url[7:]
             else:
-              newUrl="http://fernsehkritik.tv"+url+"Start/";
+              newUrl="http://fernsehkritik.tv"+url
             addLink(title,newUrl,2,"http://fernsehkritik.tv"+thumb)
         xbmcplugin.endOfDirectory(thisPlugin)
         if (xbmc.getSkinDir() == "skin.confluence" or xbmc.getSkinDir() == 
"skin.touched"): xbmc.executebuiltin('Container.SetViewMode(500)')
 
-def playVideo(url):
-        if url.find("http://";)==0:
-          content = getUrl(url)
-          match=re.compile("var flattr_tle = '(.+?)'", 
re.DOTALL).findall(content)
-          title=match[0]
-          if content.find('playlist = [')>=0:
-            content=content[content.find('playlist = ['):]
-            content=content[:content.find('];')]
-            match=re.compile("\\{ url:(.+?)'(.+?)' \\}", 
re.DOTALL).findall(content)
-            playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
-            playlist.clear()
-            i=1
-            for temp,filename in match:
-              
url="http://dl"+str(random.randint(1,3))+".fernsehkritik.tv/fernsehkritik"+filename
-              listitem = xbmcgui.ListItem(title+" 
("+str(i)+"/"+str(len(match))+")")
-              i=i+1
-              playlist.add(url,listitem)
-            xbmc.executebuiltin('XBMC.Playlist.PlayOffset(-1)')
-          else:
-            match=re.compile("file=='(.+?)'", re.DOTALL).findall(content)
-            filename=match[0]
-            listitem = 
xbmcgui.ListItem(path="http://dl"+str(random.randint(1,3))+".fernsehkritik.tv/antik/"+filename)
+def playVideo(urlOne):
+        if urlOne.find("http://";)==0:
+          content = getUrl(urlOne)
+          match=re.compile('<a href="(.+?)">', re.DOTALL).findall(content)
+          filename=""
+          for url in match:
+            if url.find(".mov")>=0:
+              filename=url
+          if filename!="":
+            listitem = xbmcgui.ListItem(path=filename)
             return xbmcplugin.setResolvedUrl(thisPlugin, True, listitem)
+          else:
+            content = getUrl(urlOne+"/Start")
+            match=re.compile("var flattr_tle = '(.+?)'", 
re.DOTALL).findall(content)
+            title=match[0]
+            if content.find('playlist = [')>=0:
+              content=content[content.find('playlist = ['):]
+              content=content[:content.find('];')]
+              match=re.compile("\\{ url:(.+?)'(.+?)' \\}", 
re.DOTALL).findall(content)
+              playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
+              playlist.clear()
+              i=1
+              for temp,filename in match:
+                
url="http://dl"+str(random.randint(1,3))+".fernsehkritik.tv/fernsehkritik"+filename
+                listitem = xbmcgui.ListItem(title+" 
("+str(i)+"/"+str(len(match))+")")
+                i=i+1
+                playlist.add(url,listitem)
+              xbmc.executebuiltin('XBMC.Playlist.PlayOffset(-1)')
+            else:
+              match=re.compile("file=='(.+?)'", re.DOTALL).findall(content)
+              filename=match[0]
+              listitem = 
xbmcgui.ListItem(path="http://dl"+str(random.randint(1,3))+".fernsehkritik.tv/antik/"+filename)
+              return xbmcplugin.setResolvedUrl(thisPlugin, True, listitem)
         else:
-          content = 
getUrl("http://fernsehkritik.tv/swf/extras_cfg.php?id="+url)
+          content = 
getUrl("http://fernsehkritik.tv/swf/extras_cfg.php?id="+urlOne)
           match=re.compile('"file":"(.+?)"', re.DOTALL).findall(content)
           file=match[0]
           listitem = xbmcgui.ListItem(path=file)
@@ -73,6 +87,7 @@ def playVideo(url):
 
 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()

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

Summary of changes:
 plugin.video.fernsehkritik_tv/addon.xml            |    2 +-
 plugin.video.fernsehkritik_tv/changelog.txt        |    6 +-
 plugin.video.fernsehkritik_tv/default.py           |   71 ++++++++++++--------
 .../resources/language/English/strings.xml         |    5 ++
 .../resources/language/German/strings.xml          |    5 ++
 5 files changed, 57 insertions(+), 32 deletions(-)
 create mode 100644 
plugin.video.fernsehkritik_tv/resources/language/English/strings.xml
 create mode 100644 
plugin.video.fernsehkritik_tv/resources/language/German/strings.xml


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to