The branch, eden has been updated
       via  ccde8eac0a8f5106ba9fa9243df470a81ae2c172 (commit)
       via  0a696d93a06b98e8aadf19b79db9fd6202a7b435 (commit)
       via  eeb39ce4d0ed89cf150d0587e4d3d2a5b1f90ee8 (commit)
      from  a8161c487c0fee2eb913df1d00150e66d7d5ca58 (commit)

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

commit ccde8eac0a8f5106ba9fa9243df470a81ae2c172
Author: beenje <[email protected]>
Date:   Fri Mar 22 22:11:59 2013 +0100

    [plugin.video.glwiz] updated to version 0.0.9

diff --git a/plugin.video.glwiz/LICENSE.txt b/plugin.video.glwiz/LICENSE.txt
old mode 100644
new mode 100755
diff --git a/plugin.video.glwiz/addon.xml b/plugin.video.glwiz/addon.xml
old mode 100644
new mode 100755
index a368b73..74abdeb
--- a/plugin.video.glwiz/addon.xml
+++ b/plugin.video.glwiz/addon.xml
@@ -1,20 +1,20 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

-<addon id="plugin.video.glwiz"

-       name="GLWiZ"

-       version="0.0.8"

-       provider-name="babak">

-  <requires>

-    <import addon="xbmc.python" version="2.0"/>

-       <import addon="script.module.beautifulsoup" version="3.2.0"/>

-  </requires>

-  <extension point="xbmc.python.pluginsource"

-            library="default.py">

-        <provides>video</provides>

-  </extension>

-  <extension point="xbmc.addon.metadata">

-    <summary>GLWiZ</summary>

-    <description>GLWiZ Addon for XBMC</description>

-    <platform>all</platform>

-    <language>fa az hy tr</language>

-  </extension>

-</addon>

+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<addon id="plugin.video.glwiz"
+       name="GLWiZ"
+       version="0.0.9"
+       provider-name="babak">
+  <requires>
+    <import addon="xbmc.python" version="2.0"/>
+       <import addon="script.module.beautifulsoup" version="3.2.0"/>
+  </requires>
+  <extension point="xbmc.python.pluginsource"
+            library="default.py">
+        <provides>video</provides>
+  </extension>
+  <extension point="xbmc.addon.metadata">
+    <summary>GLWiZ</summary>
+    <description>GLWiZ Addon for XBMC</description>
+    <platform>all</platform>
+    <language>fa az hy tr</language>
+  </extension>
+</addon>
diff --git a/plugin.video.glwiz/default.py b/plugin.video.glwiz/default.py
index 4529934..f2894ec 100644
--- a/plugin.video.glwiz/default.py
+++ b/plugin.video.glwiz/default.py
@@ -1,26 +1,26 @@
-import urllib,urllib2,re,os,cookielib

-import xbmcplugin,xbmcgui,xbmcaddon

-from BeautifulSoup import BeautifulStoneSoup, BeautifulSoup, BeautifulSOAP

-

-addon = xbmcaddon.Addon('plugin.video.glwiz')

-profile = xbmc.translatePath(addon.getAddonInfo('profile'))

+import urllib,urllib2,re,os,cookielib
+import xbmcplugin,xbmcgui,xbmcaddon
+from BeautifulSoup import BeautifulStoneSoup, BeautifulSoup, BeautifulSOAP
+
+addon = xbmcaddon.Addon('plugin.video.glwiz')
+profile = xbmc.translatePath(addon.getAddonInfo('profile'))
 
 sys.path.append(os.path.join(addon.getAddonInfo('path'), 'resources'))
 import urllib3, workerpool
-

+
 __settings__ = xbmcaddon.Addon(id='plugin.video.glwiz')
-__language__ = __settings__.getLocalizedString

-
-home = __settings__.getAddonInfo('path')

-icon = xbmc.translatePath(os.path.join(home, 'icon.png'))

-

-if __settings__.getSetting('paid_account') == "true":

-        if (__settings__.getSetting('username') == "") or 
(__settings__.getSetting('password') == ""):

-                xbmc.executebuiltin("XBMC.Notification(" + 
__settings__.getAddonInfo('name') + "," + __language__(30000) + 
",30000,"+icon+")")

+__language__ = __settings__.getLocalizedString
+
+home = __settings__.getAddonInfo('path')
+icon = xbmc.translatePath(os.path.join(home, 'icon.png'))
+
+if __settings__.getSetting('paid_account') == "true":
+        if (__settings__.getSetting('username') == "") or 
(__settings__.getSetting('password') == ""):
+                xbmc.executebuiltin("XBMC.Notification(" + 
__settings__.getAddonInfo('name') + "," + __language__(30000) + 
",30000,"+icon+")")
                 __settings__.openSettings()
 
 cj = cookielib.CookieJar()
-opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))

+opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
 
 def login():
        resp = opener.open('http://www.glwiz.com/')
@@ -28,12 +28,13 @@ def login():
        soup = BeautifulSoup(html_data)
        eventVal = soup.find('input',id='__EVENTVALIDATION',type='hidden')
        viewState = soup.find('input',id='__VIEWSTATE',type='hidden')
-       loginURL = 
'http://www.glwiz.com/homepage.aspx?__EVENTARGUMENT=&__EVENTTARGET=&__EVENTVALIDATION=%s&__VIEWSTATE=%s&pageHeader%%24ScriptManager1=pageHeader%%24UpdatePanel1%%7CpageHeader%%24buttonLogin&pageHeader%%24buttonLogin=%%20&pageHeader%%24txtPassword=%s&pageHeader%%24txtUsername=%s'
 % (urllib.quote(eventVal['value']), urllib.quote(viewState['value']), 
urllib.quote(__settings__.getSetting('password')), 
urllib.quote(__settings__.getSetting('username')))

-       opener.open(loginURL)
+       loginURL = 'http://www.glwiz.com/homepage.aspx'
+       data = 
'__EVENTARGUMENT=&__EVENTTARGET=&__EVENTVALIDATION=%s&__VIEWSTATE=%s&pageHeader%%24ScriptManager1=pageHeader%%24UpdatePanel1%%7CpageHeader%%24buttonLogin&pageHeader%%24buttonLogin=%%20&pageHeader%%24txtPassword=%s&pageHeader%%24txtUsername=%s'
 % (urllib.quote(eventVal['value']), urllib.quote(viewState['value']), 
urllib.quote(__settings__.getSetting('password')), 
urllib.quote(__settings__.getSetting('username')))
+       opener.open(loginURL, data)
        resp = 
opener.open('http://www.glwiz.com/ajax.aspx?channel=tvlist&type=reg&genre=1')
        html_data = resp.read()
        return html_data != 'NoAccess'  
-

+
 def getCategories():
        if __settings__.getSetting('paid_account') == "true":
                while not login():
@@ -52,8 +53,8 @@ def getCategories():
                                addDir(name,dirurl,1)                   
                except:
                        return
-       else:

-               try:

+       else:
+               try:
                        resp = 
opener.open('http://www.glwiz.com/ajax.aspx?channel=tv&type=free&genre=1')
                        html_data = resp.read()
                        soup = BeautifulSoup(html_data)
@@ -62,10 +63,10 @@ def getCategories():
                        for li in categories:
                                name = li.contents[0].strip()
                                dirurl = 
'http://www.glwiz.com/ajax.aspx?channel=tv&genre=' + 
pattern.search(li['onclick']).groups()[0]
-                               addDir(name,dirurl,1)

+                               addDir(name,dirurl,1)
                except:
-                       return

-                        

+                       return
+                        
 class FetchJob(workerpool.Job):
         def __init__(self, span, pattern, http, cookies):
                 self.span = span
@@ -127,64 +128,64 @@ def getChannels(url):
         workers.shutdown()
         workers.wait()
 
-def get_params():

-        param=[]

-        paramstring=sys.argv[2]

-        if len(paramstring)>=2:

-                params=sys.argv[2]

-                cleanedparams=params.replace('?','')

-                if (params[len(params)-1]=='/'):

-                        params=params[0:len(params)-2]

-                pairsofparams=cleanedparams.split('&')

-                param={}

-                for i in range(len(pairsofparams)):

-                        splitparams={}

-                        splitparams=pairsofparams[i].split('=')

-                        if (len(splitparams))==2:

-                                param[splitparams[0]]=splitparams[1]

-                                

-        return param

-

-

-def addDir(name,url,mode):

-        
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)

-        ok=True

-        liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png", 
thumbnailImage="DefaultFolder.png")

-        liz.setInfo( type="Video", infoLabels={ "Title": name } )

-        
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)

-        return ok

-

-def addLink(url,name,iconimage):

-        ok=True

-        liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png", 
thumbnailImage=iconimage)

-        liz.setInfo( type="Video", infoLabels={ "Title": name } )

-        
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz)

-       return ok

-

-            

-params=get_params()

-url=None

-name=None

-mode=None

-

-try:

-        url=urllib.unquote_plus(params["url"])

-except:

-        pass

-try:

-        name=urllib.unquote_plus(params["name"])

-except:

-        pass

-try:

-        mode=int(params["mode"])

-except:

-        pass

-

-if mode==None:

-        getCategories()

-

-elif mode==1:

-        getChannels(url)

-        

+def get_params():
+        param=[]
+        paramstring=sys.argv[2]
+        if len(paramstring)>=2:
+                params=sys.argv[2]
+                cleanedparams=params.replace('?','')
+                if (params[len(params)-1]=='/'):
+                        params=params[0:len(params)-2]
+                pairsofparams=cleanedparams.split('&')
+                param={}
+                for i in range(len(pairsofparams)):
+                        splitparams={}
+                        splitparams=pairsofparams[i].split('=')
+                        if (len(splitparams))==2:
+                                param[splitparams[0]]=splitparams[1]
+                                
+        return param
+
+
+def addDir(name,url,mode):
+        
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)
+        ok=True
+        liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png", 
thumbnailImage="DefaultFolder.png")
+        liz.setInfo( type="Video", infoLabels={ "Title": name } )
+        
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
+        return ok
+
+def addLink(url,name,iconimage):
+        ok=True
+        liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png", 
thumbnailImage=iconimage)
+        liz.setInfo( type="Video", infoLabels={ "Title": name } )
+        
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz)
+       return ok
+
+            
+params=get_params()
+url=None
+name=None
+mode=None
+
+try:
+        url=urllib.unquote_plus(params["url"])
+except:
+        pass
+try:
+        name=urllib.unquote_plus(params["name"])
+except:
+        pass
+try:
+        mode=int(params["mode"])
+except:
+        pass
+
+if mode==None:
+        getCategories()
+
+elif mode==1:
+        getChannels(url)
+        
 xbmcplugin.addSortMethod(handle=int(sys.argv[1]), 
sortMethod=xbmcplugin.SORT_METHOD_LABEL)
-xbmcplugin.endOfDirectory(int(sys.argv[1]))

+xbmcplugin.endOfDirectory(int(sys.argv[1]))
diff --git a/plugin.video.glwiz/resources/settings.xml 
b/plugin.video.glwiz/resources/settings.xml
old mode 100644
new mode 100755
index 4d42aa9..4605476
--- a/plugin.video.glwiz/resources/settings.xml
+++ b/plugin.video.glwiz/resources/settings.xml
@@ -1,6 +1,6 @@
-<settings>

-   <setting id="paid_account" type="bool" label="30010" default="false"/>

+<settings>
+   <setting id="paid_account" type="bool" label="30010" default="false"/>
    <setting id="username" type="text"  label="30011" default="" 
enable="eq(-1,true)"/>
    <setting id="password" type="text"  label="30012" default="" 
enable="eq(-2,true)"/>
-   <setting id="show_thumbnail" type="bool" label="30013" default="true"/>   

+   <setting id="show_thumbnail" type="bool" label="30013" default="true"/>   
 </settings>

http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=0a696d93a06b98e8aadf19b79db9fd6202a7b435

commit 0a696d93a06b98e8aadf19b79db9fd6202a7b435
Author: beenje <[email protected]>
Date:   Fri Mar 22 21:47:24 2013 +0100

    [plugin.video.dr.dk.live] updated to version 2.1.10

diff --git a/plugin.video.dr.dk.live/addon.xml 
b/plugin.video.dr.dk.live/addon.xml
index e1d761d..036b79d 100644
--- a/plugin.video.dr.dk.live/addon.xml
+++ b/plugin.video.dr.dk.live/addon.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <addon
-       id="plugin.video.dr.dk.live" version="2.1.9" name="Danish Live TV" 
provider-name="twinther [[email protected]]">
+       id="plugin.video.dr.dk.live" version="2.1.10" name="Danish Live TV" 
provider-name="twinther [[email protected]]">
        <requires>
                <import addon="xbmc.python" version="2.0"/>
         <import addon="script.module.buggalo" version="1.1.2"/>
diff --git a/plugin.video.dr.dk.live/changelog.txt 
b/plugin.video.dr.dk.live/changelog.txt
index 9f90dba..29e7fbc 100644
--- a/plugin.video.dr.dk.live/changelog.txt
+++ b/plugin.video.dr.dk.live/changelog.txt
@@ -1,3 +1,7 @@
+[B]Version 2.1.10 - 2013-03-22[/B]
+- Added DR Ultra
+- Removed DR Update
+
 [B]Version 2.1.9 - 2013-01-30[/B]
 - Renamed DR HD to DR3
 - Minor fixes to channel logos
diff --git a/plugin.video.dr.dk.live/channels.py 
b/plugin.video.dr.dk.live/channels.py
index 2251a61..ac71b9f 100644
--- a/plugin.video.dr.dk.live/channels.py
+++ b/plugin.video.dr.dk.live/channels.py
@@ -114,8 +114,8 @@ Channel(6, CATEGORY_DR, "dr3.stream").add_urls(
     best   = ['rtmp://livetv.gss.dr.dk/live/livedr06astream2 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr06bstream2 live=1'], # DR has stream2 for 
all speeds - weird
     high   = ['rtmp://livetv.gss.dr.dk/live/livedr06astream2 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr06bstream2 live=1'],
     medium = ['rtmp://livetv.gss.dr.dk/live/livedr06astream2 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr06bstream2 live=1'])
-# DR Update
-Channel(3, CATEGORY_DR, "drupdate.stream").add_urls(
+# DR Ultra
+Channel(3, CATEGORY_DR, "drultra.stream").add_urls(
     high   = ['rtmp://livetv.gss.dr.dk/live/livedr03astream3 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr03bstream3 live=1',],
     medium = ['rtmp://livetv.gss.dr.dk/live/livedr03astream2 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr03bstream2 live=1'],
     low    = ['rtmp://livetv.gss.dr.dk/live/livedr03astream1 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr03bstream1 live=1'])
diff --git a/plugin.video.dr.dk.live/resources/language/Danish/strings.xml 
b/plugin.video.dr.dk.live/resources/language/Danish/strings.xml
index a5ccd86..62250be 100644
--- a/plugin.video.dr.dk.live/resources/language/Danish/strings.xml
+++ b/plugin.video.dr.dk.live/resources/language/Danish/strings.xml
@@ -22,7 +22,7 @@
 
     <string id="31001">DR1</string>
     <string id="31002">DR2</string>
-    <string id="31003">DR Update</string>
+    <string id="31003">DR Ultra</string>
     <string id="31004">DR K</string>
     <string id="31005">DR Ramasjang</string>
     <string id="31006">DR3</string>
diff --git a/plugin.video.dr.dk.live/resources/language/English/strings.xml 
b/plugin.video.dr.dk.live/resources/language/English/strings.xml
index cd30adb..0cb6764 100644
--- a/plugin.video.dr.dk.live/resources/language/English/strings.xml
+++ b/plugin.video.dr.dk.live/resources/language/English/strings.xml
@@ -22,7 +22,7 @@
 
     <string id="31001">DR1</string>
     <string id="31002">DR2</string>
-    <string id="31003">DR Update</string>
+    <string id="31003">DR Ultra</string>
     <string id="31004">DR K</string>
     <string id="31005">DR Ramasjang</string>
     <string id="31006">DR3</string>
diff --git a/plugin.video.dr.dk.live/resources/logos/3.png 
b/plugin.video.dr.dk.live/resources/logos/3.png
index 71fd334..227461a 100644
Binary files a/plugin.video.dr.dk.live/resources/logos/3.png and 
b/plugin.video.dr.dk.live/resources/logos/3.png differ
diff --git a/plugin.video.dr.dk.live/resources/settings.xml 
b/plugin.video.dr.dk.live/resources/settings.xml
index c42e221..148cb4e 100644
--- a/plugin.video.dr.dk.live/resources/settings.xml
+++ b/plugin.video.dr.dk.live/resources/settings.xml
@@ -10,7 +10,7 @@
         <setting id="dr1.stream" label="31001" type="enum" default="0" 
lvalues="30106|30107" />
         <setting id="dr2.stream" label="31002" type="enum" default="0" 
lvalues="30106|30107" />
         <setting id="dr3.stream" label="31006" type="enum" default="0" 
lvalues="30106|30107" />
-        <setting id="drupdate.stream" label="31003" type="enum" default="0" 
lvalues="30106|30107" />
+        <setting id="drultra.stream" label="31003" type="enum" default="0" 
lvalues="30106|30107" />
         <setting id="drk.stream" label="31004" type="enum" default="0" 
lvalues="30106|30107" />
         <setting id="drramasjang.stream" label="31005" type="enum" default="0" 
lvalues="30106|30107" />
     </category>

http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=eeb39ce4d0ed89cf150d0587e4d3d2a5b1f90ee8

commit eeb39ce4d0ed89cf150d0587e4d3d2a5b1f90ee8
Author: beenje <[email protected]>
Date:   Fri Mar 22 21:47:11 2013 +0100

    [plugin.video.drnu] updated to version 2.1.10

diff --git a/plugin.video.drnu/addon.py b/plugin.video.drnu/addon.py
index 88d3972..28e1c7d 100644
--- a/plugin.video.drnu/addon.py
+++ b/plugin.video.drnu/addon.py
@@ -1,5 +1,5 @@
 #
-#      Copyright (C) 2012 Tommy Winther
+#      Copyright (C) 2013 Tommy Winther
 #      http://tommy.winther.nu
 #
 #  This Program is free software; you can redistribute it and/or modify
@@ -21,7 +21,6 @@ import pickle
 import os
 import sys
 import urlparse
-import urllib2
 import re
 import datetime
 
@@ -34,6 +33,7 @@ import xbmcvfs
 import nuapi
 import buggalo
 
+
 class NuAddon(object):
     def __init__(self):
         self.api = nuapi.DrNuApi(CACHE_PATH, 60)
@@ -54,13 +54,12 @@ class NuAddon(object):
             except Exception:
                 pass
 
-
     def _save(self):
         # save favorites
         self.favorites.sort()
         pickle.dump(self.favorites, open(FAVORITES_PATH, 'wb'))
 
-        self.recentlyWatched = self.recentlyWatched[0:10] # Limit to ten items
+        self.recentlyWatched = self.recentlyWatched[0:25]  # Limit to ten items
         pickle.dump(self.recentlyWatched, open(RECENT_PATH, 'wb'))
 
     def showMainMenu(self):
@@ -68,47 +67,59 @@ class NuAddon(object):
 
         items = list()
         # A-Z Program Series
-        item = xbmcgui.ListItem(ADDON.getLocalizedString(30000), 
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'all.png'))
+        item = xbmcgui.ListItem(ADDON.getLocalizedString(30000),
+                                
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'all.png'))
         item.setProperty('Fanart_Image', fanartImage)
         items.append((PATH + '?show=azProgramSeries', item, True))
         # Program Series label
-        item = xbmcgui.ListItem(ADDON.getLocalizedString(30012), 
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'tag.png'))
+        item = xbmcgui.ListItem(ADDON.getLocalizedString(30012),
+                                
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'tag.png'))
         item.setProperty('Fanart_Image', fanartImage)
         items.append((PATH + '?show=programSeriesLabels', item, True))
         # Premiere
-        item = xbmcgui.ListItem(ADDON.getLocalizedString(30025), 
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'new.png'))
+        item = xbmcgui.ListItem(ADDON.getLocalizedString(30025),
+                                
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'new.png'))
         item.setProperty('Fanart_Image', fanartImage)
         items.append((PATH + '?show=premiere', item, True))
         # Latest
-        item = xbmcgui.ListItem(ADDON.getLocalizedString(30001), 
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'new.png'))
+        item = xbmcgui.ListItem(ADDON.getLocalizedString(30001),
+                                
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'new.png'))
         item.setProperty('Fanart_Image', fanartImage)
         items.append((PATH + '?show=newest', item, True))
         # Most viewed
-        item = xbmcgui.ListItem(ADDON.getLocalizedString(30011), 
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'eye.png'))
+        item = xbmcgui.ListItem(ADDON.getLocalizedString(30011),
+                                
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'eye.png'))
         item.setProperty('Fanart_Image', fanartImage)
         items.append((PATH + '?show=mostViewed', item, True))
         # Spotlight
-        item = xbmcgui.ListItem(ADDON.getLocalizedString(30002), 
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'star.png'))
+        item = xbmcgui.ListItem(ADDON.getLocalizedString(30002),
+                                
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'star.png'))
         item.setProperty('Fanart_Image', fanartImage)
         items.append((PATH + '?show=spotlight', item, True))
         # Highlights
-        item = xbmcgui.ListItem(ADDON.getLocalizedString(30021), 
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'star.png'))
+        item = xbmcgui.ListItem(ADDON.getLocalizedString(30021),
+                                
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'star.png'))
         item.setProperty('Fanart_Image', fanartImage)
         items.append((PATH + '?show=highlights', item, True))
         # Last chance
-        item = xbmcgui.ListItem(ADDON.getLocalizedString(30014), 
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'clock.png'))
+        item = xbmcgui.ListItem(ADDON.getLocalizedString(30014),
+                                
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'clock.png'))
         item.setProperty('Fanart_Image', fanartImage)
         items.append((PATH + '?show=lastChance', item, True))
         # Search videos
-        item = xbmcgui.ListItem(ADDON.getLocalizedString(30003), 
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'search.png'))
+        item = xbmcgui.ListItem(ADDON.getLocalizedString(30003),
+                                
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'search.png'))
         item.setProperty('Fanart_Image', fanartImage)
         items.append((PATH + '?show=search', item, True))
         # Recently watched Program Series
-        item = xbmcgui.ListItem(ADDON.getLocalizedString(30007), 
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'eye-star.png'))
+        item = xbmcgui.ListItem(ADDON.getLocalizedString(30007),
+                                
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons',
+                                                       'eye-star.png'))
         item.setProperty('Fanart_Image', fanartImage)
         items.append((PATH + '?show=recentlyWatched', item, True))
         # Favorite Program Series
-        item = xbmcgui.ListItem(ADDON.getLocalizedString(30008), 
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'plusone.png'))
+        item = xbmcgui.ListItem(ADDON.getLocalizedString(30008),
+                                
iconImage=os.path.join(ADDON.getAddonInfo('path'), 'resources', 'icons', 
'plusone.png'))
         item.setProperty('Fanart_Image', fanartImage)
         items.append((PATH + '?show=favorites', item, True))
 
@@ -147,20 +158,22 @@ class NuAddon(object):
 
             if video is not None:
                 videos.append(video)
-                
+
         if not videos:
-            xbmcplugin.endOfDirectory(HANDLE, succeeded = False)
-            xbmcgui.Dialog().ok(ADDON.getAddonInfo('name'), 
ADDON.getLocalizedString(30013), ADDON.getLocalizedString(30020))
+            xbmcplugin.endOfDirectory(HANDLE, succeeded=False)
+            xbmcgui.Dialog().ok(ADDON.getAddonInfo('name'), 
ADDON.getLocalizedString(30013),
+                                ADDON.getLocalizedString(30020))
         else:
             self.listVideos(videos)
 
-    def showProgramSeries(self, limitToSlugs = None, addToFavorites = True, 
label = None, letter = None):
+    def showProgramSeries(self, limitToSlugs=None, addToFavorites=True, 
label=None, letter=None):
         programs = self.api.getProgramSeries(limitToSlugs, label)
 
         if not programs:
-            xbmcplugin.endOfDirectory(HANDLE, succeeded = False)
+            xbmcplugin.endOfDirectory(HANDLE, succeeded=False)
             if not addToFavorites:
-                xbmcgui.Dialog().ok(ADDON.getAddonInfo('name'), 
ADDON.getLocalizedString(30013), ADDON.getLocalizedString(30018), 
ADDON.getLocalizedString(30019))
+                xbmcgui.Dialog().ok(ADDON.getAddonInfo('name'), 
ADDON.getLocalizedString(30013),
+                                    ADDON.getLocalizedString(30018), 
ADDON.getLocalizedString(30019))
             else:
                 xbmcgui.Dialog().ok(ADDON.getAddonInfo('name'), 
ADDON.getLocalizedString(30013))
         else:
@@ -173,7 +186,8 @@ class NuAddon(object):
                 if program['newestVideoPublishTime'] is not None:
                     publishTime = 
self.parseDate(program['newestVideoPublishTime'])
                     if publishTime:
-                        infoLabels['plotoutline'] = 
ADDON.getLocalizedString(30004) % publishTime.strftime('%d. %b %Y kl. %H:%M')
+                        infoLabels['plotoutline'] = 
ADDON.getLocalizedString(30004) % publishTime.strftime(
+                            '%d. %b %Y kl. %H:%M')
                         infoLabels['date'] = publishTime.strftime('%d.%m.%Y')
                         infoLabels['year'] = int(publishTime.strftime('%Y'))
                         infoLabels['aired'] = publishTime.strftime('%Y-%m-%d')
@@ -195,10 +209,12 @@ class NuAddon(object):
 
                 customThumbFile = self.getCustomThumbPath(program['slug'])
                 if os.path.exists(customThumbFile):
-                    menuItems.append((ADDON.getLocalizedString(30024), 
"XBMC.RunPlugin(plugin://plugin.video.drnu/?delthumb=%s)" % program['slug']))
+                    menuItems.append((ADDON.getLocalizedString(30024),
+                                      
"XBMC.RunPlugin(plugin://plugin.video.drnu/?delthumb=%s)" % program['slug']))
                     iconImage = customThumbFile
                 else:
-                    menuItems.append((ADDON.getLocalizedString(30023), 
"XBMC.RunPlugin(plugin://plugin.video.drnu/?setthumb=%s)" % program['slug']))
+                    menuItems.append((ADDON.getLocalizedString(30023),
+                                      
"XBMC.RunPlugin(plugin://plugin.video.drnu/?setthumb=%s)" % program['slug']))
                     iconImage = 
self.api.getProgramSeriesImageUrl(program['slug'], 256)
                 fanartImage = 
self.api.getProgramSeriesImageUrl(program['slug'], 1280, 720)
                 item = xbmcgui.ListItem(infoLabels['title'], 
iconImage=iconImage)
@@ -218,8 +234,9 @@ class NuAddon(object):
         programs = self.api.getProgramSeries()
 
         if not programs:
-            xbmcplugin.endOfDirectory(HANDLE, succeeded = False)
-            xbmcgui.Dialog().ok(ADDON.getAddonInfo('name'), 
ADDON.getLocalizedString(30013), ADDON.getLocalizedString(30018), 
ADDON.getLocalizedString(30019))
+            xbmcplugin.endOfDirectory(HANDLE, succeeded=False)
+            xbmcgui.Dialog().ok(ADDON.getAddonInfo('name'), 
ADDON.getLocalizedString(30013),
+                                ADDON.getLocalizedString(30018), 
ADDON.getLocalizedString(30019))
         else:
             items = list()
 
@@ -239,7 +256,7 @@ class NuAddon(object):
                     letter = program['title'][0].upper()
                     infoLabels = {'title': letter, 'count': count}
 
-                    item = xbmcgui.ListItem(letter, iconImage = iconImage)
+                    item = xbmcgui.ListItem(letter, iconImage=iconImage)
                     item.setInfo('video', infoLabels)
                     item.setProperty('Fanart_Image', fanartImage)
 
@@ -250,7 +267,6 @@ class NuAddon(object):
             xbmcplugin.addDirectoryItems(HANDLE, items)
             xbmcplugin.endOfDirectory(HANDLE)
 
-
     def showProgramSeriesLabels(self):
         iconImage = os.path.join(ADDON.getAddonInfo('path'), 'resources', 
'icons', 'tag.png')
         fanartImage = os.path.join(ADDON.getAddonInfo('path'), 'fanart.jpg')
@@ -260,14 +276,13 @@ class NuAddon(object):
         for label in labels:
             item = xbmcgui.ListItem(label.capitalize(), iconImage=iconImage)
             item.setProperty('Fanart_Image', fanartImage)
-            
+
             url = PATH + '?programSeriesLabel=' + label
             items.append((url, item, True))
 
         xbmcplugin.addDirectoryItems(HANDLE, items)
         xbmcplugin.endOfDirectory(HANDLE)
 
-
     def searchVideos(self):
         keyboard = xbmc.Keyboard('', ADDON.getLocalizedString(30003))
         keyboard.doModal()
@@ -275,7 +290,6 @@ class NuAddon(object):
             keyword = keyboard.getText()
             self.listVideos(self.api.search(keyword))
 
-
     def listVideos(self, videos):
         items = list()
 
@@ -288,7 +302,7 @@ class NuAddon(object):
             item.setInfo('video', infoLabels)
             item.setProperty('Fanart_Image', fanartImage)
             url = PATH + '?videoId=' + str(video['id'])
-            if video.has_key('chapters') and video['chapters'] and 
ADDON.getSetting('enable.chapters') == 'true':
+            if 'chapters' in video and video['chapters'] and 
ADDON.getSetting('enable.chapters') == 'true':
                 url += "&chapters=true"
                 items.append((url, item, True))
             else:
@@ -298,6 +312,7 @@ class NuAddon(object):
         xbmcplugin.addDirectoryItems(HANDLE, items)
         xbmcplugin.setContent(HANDLE, 'episodes')
         xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_DATE)
+        xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_TITLE)
         xbmcplugin.endOfDirectory(HANDLE)
 
     def listVideoChapters(self, videoId):
@@ -334,7 +349,7 @@ class NuAddon(object):
             startTime = startTimes[idx]
             if startTime:
                 duration = startTimes[idx + 1] - startTime
-                infoLabels['duration'] = str(duration.seconds)
+                infoLabels['duration'] = str(duration.seconds * 60)
 
             iconImage = self.api.getChapterImageUrl(str(chapter['id']), 256)
             fanartImage = self.api.getChapterImageUrl(str(chapter['id']), 
1280, 720)
@@ -351,28 +366,42 @@ class NuAddon(object):
         xbmcplugin.setContent(HANDLE, 'episodes')
         xbmcplugin.endOfDirectory(HANDLE)
 
-    def playVideo(self, videoId, startTime = None):
+    def playVideo(self, videoId, startTime=None):
         self._updateRecentlyWatched(videoId)
         video = self.api.getVideoById(videoId)
         if not video:
             raise nuapi.DrNuException('Video with ID %s not found!' % videoId)
 
-        try:
-            u = urllib2.urlopen(video['videoManifestUrl'])
-            rtmpUrl = u.read()
-            u.close()
-        except Exception, ex:
-            raise nuapi.DrNuException(ex)
+        if ADDON.getSetting('show.stream.selector') == 'true':
+            json = self.api._call_api(video['videoResourceUrl'])
+            options = []
+            links = sorted(json['links'], key=lambda link: 
link['bitrateKbps'], reverse=True)
+            for link in links:
+                options.append('%s (%s kbps)' % (link['linkType'], 
link['bitrateKbps']))
+
+            d = xbmcgui.Dialog()
+            idx = d.select(video['title'], options)
+            if idx == -1:
+                xbmcplugin.setResolvedUrl(HANDLE, False, xbmcgui.ListItem())
+                return
+            rtmpUrl = links[idx]['uri']
+
+        else:
+            rtmpUrl = self.api._http_request(video['videoManifestUrl'])
 
         if rtmpUrl[0:7] == '<script':
             d = xbmcgui.Dialog()
             d.ok(ADDON.getLocalizedString(30100), 
ADDON.getLocalizedString(30101), ADDON.getLocalizedString(30102))
         else:
-            rtmpUrl = rtmpUrl.replace('rtmp://vod.dr.dk/', 
'rtmp://vod.dr.dk/cms/')
+            m = re.search('(rtmp://vod.dr.dk/cms)/([^\?]+)(\?.*)', rtmpUrl)
+            rtmpUrl = m.group(1) + m.group(3)
+            rtmpUrl += ' playpath=' + m.group(2) + m.group(3)
+            rtmpUrl += ' app=cms' + m.group(3)
+
             if startTime:
                 rtmpUrl += ' start=' + startTime
             thumbnailImage = self.api.getVideoImageUrl(str(video['id']), 256)
-            item = xbmcgui.ListItem(path = rtmpUrl, thumbnailImage = 
thumbnailImage)
+            item = xbmcgui.ListItem(path=rtmpUrl, 
thumbnailImage=thumbnailImage)
             xbmcplugin.setResolvedUrl(HANDLE, True, item)
 
     def parseDate(self, dateString):
@@ -408,6 +437,15 @@ class NuAddon(object):
         except ValueError:
             return None
 
+    def parseDuration(self, duration):
+        try:
+            minutes = int(duration[0:2]) * 60
+            minutes += int(duration[3:5])
+            minutes += int(duration[6:8]) / 60
+            return str(minutes)
+        except:
+            return 0
+
     def formatStartTime(self, time):
         startTime = time.hour * 3600
         startTime += time.minute * 60
@@ -422,27 +460,29 @@ class NuAddon(object):
         else:
             infoLabels['title'] = ADDON.getLocalizedString(30006)
 
-        if video.has_key('spotSubTitle') and video['spotSubTitle'] is not None:
+        if 'spotSubTitle' in video and video['spotSubTitle'] is not None:
             infoLabels['plot'] = video['spotSubTitle']
-        elif video.has_key('description') and video['description'] is not None:
+        elif 'description' in video and video['description'] is not None:
             infoLabels['plot'] = video['description']
 
-        if video.has_key('duration') and video['duration'] is not None:
-            infoLabels['duration'] = video['duration']
-        if video.has_key('broadcastChannel') and video['broadcastChannel'] is 
not None:
+        if 'duration' in video and video['duration'] is not None:
+            infoLabels['duration'] = self.parseDuration(video['duration'])
+        if 'broadcastChannel' in video and video['broadcastChannel'] is not 
None:
             infoLabels['studio'] = video['broadcastChannel']
-        if video.has_key('broadcastTime') and video['broadcastTime'] is not 
None:
+        if 'broadcastTime' in video and video['broadcastTime'] is not None:
             broadcastTime = self.parseDate(video['broadcastTime'])
             if broadcastTime:
-                infoLabels['plotoutline'] = ADDON.getLocalizedString(30015) % 
broadcastTime.strftime('%d. %b %Y kl. %H:%M')
+                infoLabels['plotoutline'] = ADDON.getLocalizedString(30015) % 
broadcastTime.strftime(
+                    '%d. %b %Y kl. %H:%M')
                 infoLabels['date'] = broadcastTime.strftime('%d.%m.%Y')
                 infoLabels['aired'] = broadcastTime.strftime('%Y-%m-%d')
                 infoLabels['year'] = int(broadcastTime.strftime('%Y'))
-        if video.has_key('expireTime') and video['expireTime'] is not None:
+        if 'expireTime' in video and video['expireTime'] is not None:
             expireTime = self.parseDate(video['expireTime'])
             if expireTime:
-                infoLabels['plot'] += '[CR][CR]' + 
ADDON.getLocalizedString(30016) % expireTime.strftime('%d. %b %Y kl. %H:%M')
-        if video.has_key('isHq') and video['isHq']:
+                infoLabels['plot'] += '[CR][CR]' + 
ADDON.getLocalizedString(30016) % expireTime.strftime(
+                    '%d. %b %Y kl. %H:%M')
+        if 'isHq' in video and video['isHq']:
             infoLabels['overlay'] = xbmcgui.ICON_OVERLAY_HD
 
         return infoLabels
@@ -481,18 +521,19 @@ class NuAddon(object):
         self.recentlyWatched.insert(0, videoId)
         self._save()
 
-    def displayError(self, message = 'n/a'):
+    def displayError(self, message='n/a'):
         heading = buggalo.getRandomHeading()
         line1 = ADDON.getLocalizedString(30900)
         line2 = ADDON.getLocalizedString(30901)
         xbmcgui.Dialog().ok(heading, line1, line2, message)
 
-    def displayIOError(self, message = 'n/a'):
+    def displayIOError(self, message='n/a'):
         heading = buggalo.getRandomHeading()
         line1 = ADDON.getLocalizedString(30902)
         line2 = ADDON.getLocalizedString(30903)
         xbmcgui.Dialog().ok(heading, line1, line2, message)
 
+
 if __name__ == '__main__':
     ADDON = xbmcaddon.Addon()
     PATH = sys.argv[0]
@@ -510,7 +551,7 @@ if __name__ == '__main__':
     buggalo.addExtraData('cache_path', CACHE_PATH)
     nuAddon = NuAddon()
     try:
-        if PARAMS.has_key('show'):
+        if 'show' in PARAMS:
             if PARAMS['show'][0] == 'allProgramSeries':
                 nuAddon.showProgramSeries()
             elif PARAMS['show'][0] == 'azProgramSeries':
@@ -536,34 +577,34 @@ if __name__ == '__main__':
             elif PARAMS['show'][0] == 'recentlyWatched':
                 nuAddon.showRecentlyWatched()
 
-        elif PARAMS.has_key('programSeriesLabel'):
-            nuAddon.showProgramSeries(label = PARAMS['programSeriesLabel'][0])
+        elif 'programSeriesLabel' in PARAMS:
+            nuAddon.showProgramSeries(label=PARAMS['programSeriesLabel'][0])
 
-        elif PARAMS.has_key('programSeriesLetter'):
-            nuAddon.showProgramSeries(letter = 
PARAMS['programSeriesLetter'][0])
+        elif 'programSeriesLetter' in PARAMS:
+            nuAddon.showProgramSeries(letter=PARAMS['programSeriesLetter'][0])
 
-        elif PARAMS.has_key('listVideos'):
+        elif 'listVideos' in PARAMS:
             nuAddon.showProgramSeriesVideos(PARAMS['listVideos'][0])
 
-        elif PARAMS.has_key('videoId') and PARAMS.has_key('chapters'):
+        elif 'videoId' in PARAMS and 'chapters' in PARAMS:
             nuAddon.listVideoChapters(PARAMS['videoId'][0])
 
-        elif PARAMS.has_key('videoId') and PARAMS.has_key('startTime'):
+        elif 'videoId' in PARAMS and 'startTime' in PARAMS:
             nuAddon.playVideo(PARAMS['videoId'][0], PARAMS['startTime'][0])
 
-        elif PARAMS.has_key('videoId'):
+        elif 'videoId' in PARAMS:
             nuAddon.playVideo(PARAMS['videoId'][0])
 
-        elif PARAMS.has_key('addfavorite'):
+        elif 'addfavorite' in PARAMS:
             nuAddon.addFavorite(PARAMS['addfavorite'][0])
 
-        elif PARAMS.has_key('delfavorite'):
+        elif 'delfavorite' in PARAMS:
             nuAddon.delFavorite(PARAMS['delfavorite'][0])
 
-        elif PARAMS.has_key('setthumb'):
+        elif 'setthumb' in PARAMS:
             nuAddon.setCustomThumb(PARAMS['setthumb'][0])
 
-        elif PARAMS.has_key('delthumb'):
+        elif 'delthumb' in PARAMS:
             nuAddon.delCustomThumb(PARAMS['delthumb'][0])
 
         else:
@@ -577,4 +618,3 @@ if __name__ == '__main__':
 
     except Exception:
         buggalo.onExceptionRaised()
-
diff --git a/plugin.video.drnu/addon.xml b/plugin.video.drnu/addon.xml
index 5288577..6ec0a6c 100644
--- a/plugin.video.drnu/addon.xml
+++ b/plugin.video.drnu/addon.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<addon id="plugin.video.drnu" version="2.1.7" name="DR NU Player" 
provider-name="twinther [[email protected]]">
+<addon id="plugin.video.drnu" version="2.1.10" name="DR NU Player" 
provider-name="twinther [[email protected]]">
     <requires>
         <import addon="xbmc.python" version="2.0"/>
         <import addon="script.module.simplejson" version="2.0.10"/>
-        <import addon="script.module.buggalo" version="1.0.1"/>
+        <import addon="script.module.buggalo" version="1.1.2"/>
     </requires>
     <extension point="xbmc.python.pluginsource" library="addon.py">
         <provides>video</provides>
diff --git a/plugin.video.drnu/changelog.txt b/plugin.video.drnu/changelog.txt
index 9807079..c46d10a 100644
--- a/plugin.video.drnu/changelog.txt
+++ b/plugin.video.drnu/changelog.txt
@@ -1,3 +1,15 @@
+[B]Version 2.1.10 - 2013-03-22[/B]
+- Reconstruct rtmp:// url to fix playback problems
+
+[B]Version 2.1.9 - 2013-02-22[/B]
+- Fixed script error on Eden related to duration changes
+
+[B]Version 2.1.8 - 2013-02-19[/B]
+- Added option to show stream selector on video playback
+- Added option to sort videos by title (instead of default by date)
+- Fixed display of video durations
+- Changed fanart to high resolution
+
 [B]Version 2.1.7 - 2012-08-01[/B]
 - Updated date parsing rules to match changes in DR NU API
 
diff --git a/plugin.video.drnu/fanart.jpg b/plugin.video.drnu/fanart.jpg
index 7abd2ec..6edec57 100644
Binary files a/plugin.video.drnu/fanart.jpg and b/plugin.video.drnu/fanart.jpg 
differ
diff --git a/plugin.video.drnu/nuapi.py b/plugin.video.drnu/nuapi.py
index 1d153ac..d87c5c0 100644
--- a/plugin.video.drnu/nuapi.py
+++ b/plugin.video.drnu/nuapi.py
@@ -1,5 +1,5 @@
 #
-#      Copyright (C) 2011 Tommy Winther
+#      Copyright (C) 2013 Tommy Winther
 #      http://tommy.winther.nu
 #
 #  This Program is free software; you can redistribute it and/or modify
@@ -25,6 +25,7 @@ import urllib2
 
 API_URL = 'http://www.dr.dk/NU/api/%s'
 
+
 class DrNuApi(object):
     def __init__(self, cachePath, cacheMinutes):
         """
@@ -37,7 +38,7 @@ class DrNuApi(object):
         self.cachePath = cachePath
         self.cacheMinutes = cacheMinutes
 
-    def getProgramSeries(self, limitToSlugs = None, label = None):
+    def getProgramSeries(self, limitToSlugs=None, label=None):
         series = self._call_api('programseries', 'programseries.json')
         if limitToSlugs is not None:
             seriesWithSlug = list()
@@ -45,7 +46,7 @@ class DrNuApi(object):
                 for serie in series:
                     if slug == serie['slug']:
                         seriesWithSlug.append(serie)
-                        
+
             series = seriesWithSlug
 
         if label is not None:
@@ -77,7 +78,6 @@ class DrNuApi(object):
         list.sort(labels)
         return labels
 
-
     def getAllVideos(self):
         return self._call_api('videos/all', 'all.json') or list()
 
@@ -100,49 +100,52 @@ class DrNuApi(object):
         return self._call_api('videos/premiere', 'premiere.json') or list()
 
     def getProgramSeriesVideos(self, programSeriesSlug):
-        return self._call_api('programseries/%s/videos' % programSeriesSlug, 
'programseries-%s.json' % programSeriesSlug) or list()
+        return self._call_api('programseries/%s/videos' % programSeriesSlug,
+                              'programseries-%s.json' % programSeriesSlug) or 
list()
 
-    def getVideoById(self, id):
-        response = self._call_api('videos/%s' % id, 'videobyid-%s.json' % id)
+    def getVideoById(self, videoId):
+        response = self._call_api('videos/%s' % videoId, 'videobyid-%s.json' % 
videoId)
         if type(response) in [str, unicode]:
-            print 'Video with ID %s not found' % id
+            print 'Video with ID %s not found' % videoId
             return None
         else:
             return response
 
-    def search(self, term, limit = 100):
+    def search(self, term, limit=100):
         if not term:
             return list()
         return self._call_api('search/%s?limit=%d' % (urllib.quote(term), 
limit)) or list()
 
-    def getProgramSeriesImageUrl(self, programSlug, width, height = None):
+    def getProgramSeriesImageUrl(self, programSlug, width, height=None):
         if height is None:
             height = width
         return API_URL % ('programseries/%s/images/%dx%d.jpg' % (programSlug, 
width, height))
 
-    def getVideoImageUrl(self, id, width, height = None):
+    def getVideoImageUrl(self, videoId, width, height=None):
         if height is None:
             height = width
-        return API_URL % ('videos/%s/images/%dx%d.jpg' % (id, width, height))
+        return API_URL % ('videos/%s/images/%dx%d.jpg' % (videoId, width, 
height))
 
-    def getChapterImageUrl(self, id, width, height = None):
+    def getChapterImageUrl(self, chapterId, width, height=None):
         if height is None:
             height = width
-        return API_URL % ('chapters/%s/images/%dx%d.jpg' % (id, width, height))
+        return API_URL % ('chapters/%s/images/%dx%d.jpg' % (chapterId, width, 
height))
 
-    def _call_api(self, path, cacheFilename = None):
-        print "Calling API: " + API_URL % path
+    def _call_api(self, url, cacheFilename=None):
+        if url[0:7] != 'http://':
+            url = API_URL % url
+        print "Calling API: " + url
 
         if cacheFilename:
             cachePath = os.path.join(self.cachePath, cacheFilename)
             try:
                 cachedOn = os.path.getmtime(cachePath)
-            except OSError: # File not found
+            except OSError:  # File not found
                 cachedOn = 0
 
             if not os.path.exists(cachePath) or time.time() - 
self.cacheMinutes * 60 >= cachedOn:
                 # Cache expired or miss
-                content = self._http_request(path)
+                content = self._http_request(url)
 
                 if content:
                     try:
@@ -150,7 +153,7 @@ class DrNuApi(object):
                         f.write(content)
                         f.close()
                     except Exception:
-                        pass # just too bad if file system is read-only
+                        pass  # just too bad if file system is read-only
 
             else:
                 f = open(cachePath)
@@ -158,7 +161,7 @@ class DrNuApi(object):
                 f.close()
 
         else:
-            content = self._http_request(path)
+            content = self._http_request(url)
 
         if content is not None:
             try:
@@ -168,9 +171,9 @@ class DrNuApi(object):
         else:
             return []
 
-    def _http_request(self, path):
+    def _http_request(self, url):
         try:
-            u = urllib2.urlopen(API_URL % path, timeout = 30)
+            u = urllib2.urlopen(url, timeout=30)
             content = u.read()
             u.close()
         except Exception as ex:
@@ -181,9 +184,10 @@ class DrNuApi(object):
 class DrNuException(Exception):
     pass
 
+
 if __name__ == '__main__':
     api = DrNuApi('/tmp', 0)
-#    json =  api.getProgramSeriesVideos('paa-skinner')
-    json =  api.getVideoById(16746)
+    #    json =  api.getProgramSeriesVideos('paa-skinner')
+    json = api.getVideoById(16746)
     s = simplejson.dumps(json, sort_keys=True, indent='    ')
-    print '\n'.join([l.rstrip() for l in  s.splitlines()])
\ No newline at end of file
+    print '\n'.join([l.rstrip() for l in s.splitlines()])
\ No newline at end of file
diff --git a/plugin.video.drnu/resources/language/Danish/strings.xml 
b/plugin.video.drnu/resources/language/Danish/strings.xml
index db8a35a..7b02ef9 100644
--- a/plugin.video.drnu/resources/language/Danish/strings.xml
+++ b/plugin.video.drnu/resources/language/Danish/strings.xml
@@ -35,7 +35,8 @@
     <string id="30201">Fjern fra foretrukne programmer</string>
 
     <string id="30500">Generelt</string>
-    <string id="30501">Aktiver [I]kapitel[/I] navigation</string>
+    <string id="30501">Aktiver kapitel navigation</string>
+    <string id="30502">Vis kvalitetsvælger før videoen afspilles</string>
 
     <string id="30900">Der er sket en fejl i kommunikationen med DR 
NU.</string>
     <string id="30901">Prøv igen senere. Fejlen er:</string>
diff --git a/plugin.video.drnu/resources/language/English/strings.xml 
b/plugin.video.drnu/resources/language/English/strings.xml
index c336fcf..d51ec9d 100644
--- a/plugin.video.drnu/resources/language/English/strings.xml
+++ b/plugin.video.drnu/resources/language/English/strings.xml
@@ -35,7 +35,8 @@
     <string id="30201">Remove from favorite program series</string>
 
     <string id="30500">General</string>
-    <string id="30501">Enable [I]chapter[/I] navigation</string>
+    <string id="30501">Enable chapter navigation</string>
+    <string id="30502">Show quality chooser before starting video 
playback</string>
 
     <string id="30900">There was an error while communication with DR 
NU.</string>
     <string id="30901">Please try again later. Error message is:</string>
diff --git a/plugin.video.drnu/resources/settings.xml 
b/plugin.video.drnu/resources/settings.xml
index fc361ea..b4ac100 100644
--- a/plugin.video.drnu/resources/settings.xml
+++ b/plugin.video.drnu/resources/settings.xml
@@ -2,6 +2,7 @@
 <settings>
        <category label="30500">
                <setting id="enable.chapters" label="30501" type="bool" 
default="false" />
+        <setting id="show.stream.selector" label="30502" type="bool" 
default="false" />
        </category>
 </settings>
 

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

Summary of changes:
 plugin.video.dr.dk.live/addon.xml                  |    2 +-
 plugin.video.dr.dk.live/changelog.txt              |    4 +
 plugin.video.dr.dk.live/channels.py                |    4 +-
 .../resources/language/Danish/strings.xml          |    2 +-
 .../resources/language/English/strings.xml         |    2 +-
 plugin.video.dr.dk.live/resources/logos/3.png      |  Bin 38632 -> 48296 bytes
 plugin.video.dr.dk.live/resources/settings.xml     |    2 +-
 plugin.video.drnu/.gitignore                       |    2 -
 plugin.video.drnu/addon.py                         |  176 ++++++++++++--------
 plugin.video.drnu/addon.xml                        |    4 +-
 plugin.video.drnu/changelog.txt                    |   12 ++
 plugin.video.drnu/fanart.jpg                       |  Bin 362531 -> 165015 
bytes
 plugin.video.drnu/nuapi.py                         |   54 ++++---
 .../resources/language/Danish/strings.xml          |    3 +-
 .../resources/language/English/strings.xml         |    3 +-
 plugin.video.drnu/resources/settings.xml           |    1 +
 plugin.video.glwiz/addon.xml                       |   40 +++---
 plugin.video.glwiz/default.py                      |  169 ++++++++++----------
 plugin.video.glwiz/resources/settings.xml          |    6 +-
 19 files changed, 274 insertions(+), 212 deletions(-)
 delete mode 100644 plugin.video.drnu/.gitignore
 mode change 100644 => 100755 plugin.video.glwiz/LICENSE.txt
 mode change 100644 => 100755 plugin.video.glwiz/addon.xml
 mode change 100644 => 100755 plugin.video.glwiz/resources/settings.xml


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to