The branch, frodo has been updated
       via  561b325c4e62892794434471b03898e9bdfca272 (commit)
       via  4793b6936a0d5c0a9dc6c7eedad7d84fa9601a99 (commit)
       via  2de4b5ecf0b4bdd3cfb8076e695befd0a88dc4bf (commit)
      from  822c9bd0fc38741895ad09b50c2ca3e4df0c4f18 (commit)

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

commit 561b325c4e62892794434471b03898e9bdfca272
Author: beenje <[email protected]>
Date:   Wed Feb 6 21:43:55 2013 +0100

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

diff --git a/plugin.video.dr.dk.live/addon.py b/plugin.video.dr.dk.live/addon.py
index cc49194..d28ffc0 100644
--- a/plugin.video.dr.dk.live/addon.py
+++ b/plugin.video.dr.dk.live/addon.py
@@ -32,12 +32,13 @@ from channels import CHANNELS, CATEGORIES, QUALITIES
 
 TITLE_OFFSET = 31000
 
+
 class DanishLiveTV(object):
-    def showChannels(self, category = None):
+    def showChannels(self, category=None):
         try:
             quality = QUALITIES[int(ADDON.getSetting('quality'))]
         except ValueError:
-            quality = QUALITIES[0] # fallback for old settings value
+            quality = QUALITIES[0]  # fallback for old settings value
 
         if category is not None:
             channels = CATEGORIES[category]
@@ -54,14 +55,14 @@ class DanishLiveTV(object):
                 try:
                     idx = int(ADDON.getSetting(channel.get_config_key()))
                 except ValueError:
-                    idx = 0 # fallback for missing settings
+                    idx = 0  # fallback for missing settings
 
             if channel.get_url(quality, idx):
                 title = ADDON.getLocalizedString(TITLE_OFFSET + 
channel.get_id())
                 item = xbmcgui.ListItem(title, iconImage=icon, 
thumbnailImage=icon)
                 item.setInfo('video', infoLabels={
                     'title': title,
-                    'studio' : ADDON.getLocalizedString(channel.get_category())
+                    'studio': ADDON.getLocalizedString(channel.get_category())
                 })
                 item.setProperty('Fanart_Image', FANART)
                 item.setProperty('IsPlayable', 'true')
@@ -75,7 +76,7 @@ class DanishLiveTV(object):
             item = xbmcgui.ListItem(title, iconImage=ICON, thumbnailImage=ICON)
             item.setProperty('Fanart_Image', FANART)
             url = PATH + '?category=%d' % id
-            xbmcplugin.addDirectoryItem(HANDLE, url, item, isFolder = True)
+            xbmcplugin.addDirectoryItem(HANDLE, url, item, isFolder=True)
 
         xbmcplugin.endOfDirectory(HANDLE)
 
@@ -83,7 +84,7 @@ class DanishLiveTV(object):
         try:
             quality = QUALITIES[int(ADDON.getSetting('quality'))]
         except ValueError:
-            quality = QUALITIES[0] # fallback for old settings value
+            quality = QUALITIES[0]  # fallback for old settings value
 
         for channel in CHANNELS:
             if str(channel.get_id()) == id:
@@ -110,10 +111,10 @@ class DanishLiveTV(object):
 
     def imInDenmark(self):
         if ADDON.getSetting('warn.if.not.in.denmark') != 'true':
-            return # Don't bother checking
+            return  # Don't bother checking
 
         try:
-            u = 
urllib2.urlopen('http://www.dr.dk/nu/api/estoyendinamarca.json', timeout = 30)
+            u = 
urllib2.urlopen('http://www.dr.dk/nu/api/estoyendinamarca.json', timeout=30)
             response = u.read()
             u.close()
             imInDenmark = 'true' == response
@@ -144,9 +145,9 @@ if __name__ == '__main__':
     buggalo.SUBMIT_URL = 'http://tommy.winther.nu/exception/submit.php'
     try:
         danishTV = DanishLiveTV()
-        if PARAMS.has_key('playChannel'):
+        if 'playChannel' in PARAMS:
             danishTV.playChannel(PARAMS['playChannel'][0])
-        elif PARAMS.has_key('category'):
+        elif 'category' in PARAMS:
             danishTV.showChannels(int(PARAMS['category'][0]))
         elif ADDON.getSetting('group.by.category') == 'true':
             danishTV.imInDenmark()
diff --git a/plugin.video.dr.dk.live/addon.xml 
b/plugin.video.dr.dk.live/addon.xml
index 8dc2211..f93dfb6 100644
--- a/plugin.video.dr.dk.live/addon.xml
+++ b/plugin.video.dr.dk.live/addon.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <addon
-       id="plugin.video.dr.dk.live" version="2.1.8" name="Danish Live TV" 
provider-name="twinther [[email protected]]">
+       id="plugin.video.dr.dk.live" version="3.0.0" name="Danish Live TV" 
provider-name="twinther [[email protected]]">
        <requires>
-               <import addon="xbmc.python" version="2.0"/>
-        <import addon="script.module.buggalo" version="1.0.1"/>
+               <import addon="xbmc.python" version="2.1.0"/>
+        <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.dr.dk.live/changelog.txt 
b/plugin.video.dr.dk.live/changelog.txt
index ca189c5..c3c023c 100644
--- a/plugin.video.dr.dk.live/changelog.txt
+++ b/plugin.video.dr.dk.live/changelog.txt
@@ -1,3 +1,11 @@
+[B]Version 3.0.0 - 2013-01-30[/B]
+- Initial version for Frodo
+
+[B]Version 2.1.9 - 2013-01-30[/B]
+- Renamed DR HD to DR3
+- Minor fixes to channel logos
+- Fixed stream for Kanal sport
+
 [B]Version 2.1.8 - 2012-09-16[/B]
 - Updated streams for DR2, DR K and DR Ramasjang
 
diff --git a/plugin.video.dr.dk.live/channels.py 
b/plugin.video.dr.dk.live/channels.py
index 7ef8ddb..2251a61 100644
--- a/plugin.video.dr.dk.live/channels.py
+++ b/plugin.video.dr.dk.live/channels.py
@@ -19,10 +19,10 @@
 #
 import urllib2
 
-Q_BEST = 0   # 1700 kb/s
-Q_HIGH = 1   # 1000 kb/s
-Q_MEDIUM = 2 # 500 kb/s
-Q_LOW = 3    # 250 kb/s
+Q_BEST = 0    # 1700 kb/s
+Q_HIGH = 1    # 1000 kb/s
+Q_MEDIUM = 2  # 500 kb/s
+Q_LOW = 3     # 250 kb/s
 
 QUALITIES = [Q_BEST, Q_HIGH, Q_MEDIUM, Q_LOW]
 
@@ -33,6 +33,7 @@ CATEGORY_TV2_REG = 30202
 CATEGORY_MISC = 30203
 CATEGORIES = {CATEGORY_DR : list(), CATEGORY_TV2_REG : list(), CATEGORY_MISC : 
list()}
 
+
 class Channel(object):
     def __init__(self, id, category, config_key = None):
         self.id = id
@@ -77,6 +78,7 @@ class Channel(object):
     def get_config_key(self):
         return self.config_key
 
+
 class TV2RChannel(Channel):
     def get_url(self, quality, idx = 0):
         url = super(TV2RChannel, self).get_url(quality, idx)
@@ -93,10 +95,10 @@ class TV2RChannel(Channel):
                 u.close()
                 return s[9:]
             except Exception:
-                pass # probably timeout; retry
+                pass  # probably timeout; retry
         return 'unable.to.get.host.from.loadbalancer'
 
-# http://dr.dk/nu/embed/live?height=467&width=830
+# 
http://www.dr.dk/mu/Bundle?ChannelType=%24eq%28%22TV%22%29&BundleType=%24eq%28%22Channel%22%29&DrChannel=true&limit=0
 # DR1
 Channel(1, CATEGORY_DR, "dr1.stream").add_urls(
     high   = ['rtmp://livetv.gss.dr.dk/live/livedr01astream3 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr01bstream3 live=1'],
@@ -107,11 +109,16 @@ Channel(2, CATEGORY_DR, "dr2.stream").add_urls(
     high   = ['rtmp://livetv.gss.dr.dk/live/livedr02astream3 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr02bstream3 live=1'],
     medium = ['rtmp://livetv.gss.dr.dk/live/livedr02astream2 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr02bstream2 live=1'],
     low    = ['rtmp://livetv.gss.dr.dk/live/livedr02astream1 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr02bstream1 live=1'])
+# DR 3
+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).add_urls(#, "drupdate.stream").add_urls(
-    high   = 'rtmp://livetv.gss.dr.dk/live/livedr03astream3 live=1',
-    medium = 'rtmp://livetv.gss.dr.dk/live/livedr03astream2 live=1',
-    low    = 'rtmp://livetv.gss.dr.dk/live/livedr03astream1 live=1')
+Channel(3, CATEGORY_DR, "drupdate.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'])
 # DR K
 Channel(4, CATEGORY_DR, "drk.stream").add_urls(
     high   = ['rtmp://livetv.gss.dr.dk/live/livedr04astream3 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr04bstream3 live=1'],
@@ -122,11 +129,6 @@ Channel(5, CATEGORY_DR, "drramasjang.stream").add_urls(
     high   = ['rtmp://livetv.gss.dr.dk/live/livedr05astream3 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr05bstream3 live=1'],
     medium = ['rtmp://livetv.gss.dr.dk/live/livedr05astream2 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr05bstream2 live=1'],
     low    = ['rtmp://livetv.gss.dr.dk/live/livedr05astream1 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr05bstream1 live=1'])
-# DR HD
-Channel(6, CATEGORY_DR, "drhd.stream").add_urls(
-    best   = ['rtmp://livetv.gss.dr.dk/live/livedr06astream3 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr06bstream3 live=1'],
-    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/livedr06astream1 live=1', 
'rtmp://livetv.gss.dr.dk/live/livedr06bstream1 live=1'])
 
 # TV2 Fyn
 TV2RChannel(100, CATEGORY_TV2_REG).add_urls(
@@ -178,10 +180,5 @@ Channel(202, CATEGORY_MISC).add_urls(
 )
 # kanalsport.dk
 Channel(203, CATEGORY_MISC).add_urls(
-    best   = 
'http://lswb-de-08.servers.octoshape.net:1935/live/kanalsport/1000k/playlist.m3u8'
+    best   = 
'http://lswb-de-08.servers.octoshape.net:1935/live/kanalsport_1000k/playlist.m3u8'
 )
-
-# tv aarhus
-#Channel(204, CATEGORY_MISC).add_urls(
-#    best   = 
'http://flash.digicast.dk/clients_live/digicast/live/playlist.m3u8'
-#)
\ No newline at end of file
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 fbf4e52..a5ccd86 100644
--- a/plugin.video.dr.dk.live/resources/language/Danish/strings.xml
+++ b/plugin.video.dr.dk.live/resources/language/Danish/strings.xml
@@ -25,7 +25,7 @@
     <string id="31003">DR Update</string>
     <string id="31004">DR K</string>
     <string id="31005">DR Ramasjang</string>
-    <string id="31006">DR HD</string>
+    <string id="31006">DR3</string>
 
     <string id="31100">TV 2/FYN</string>
     <string id="31101">Lorry</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 ff8f31f..cd30adb 100644
--- a/plugin.video.dr.dk.live/resources/language/English/strings.xml
+++ b/plugin.video.dr.dk.live/resources/language/English/strings.xml
@@ -25,7 +25,7 @@
     <string id="31003">DR Update</string>
     <string id="31004">DR K</string>
     <string id="31005">DR Ramasjang</string>
-    <string id="31006">DR HD</string>
+    <string id="31006">DR3</string>
 
     <string id="31100">TV 2/FYN</string>
     <string id="31101">Lorry</string>
diff --git a/plugin.video.dr.dk.live/resources/logos/1.png 
b/plugin.video.dr.dk.live/resources/logos/1.png
index ce78d83..972d13e 100644
Binary files a/plugin.video.dr.dk.live/resources/logos/1.png and 
b/plugin.video.dr.dk.live/resources/logos/1.png differ
diff --git a/plugin.video.dr.dk.live/resources/logos/103.png 
b/plugin.video.dr.dk.live/resources/logos/103.png
index 619bfe5..7df974f 100644
Binary files a/plugin.video.dr.dk.live/resources/logos/103.png and 
b/plugin.video.dr.dk.live/resources/logos/103.png differ
diff --git a/plugin.video.dr.dk.live/resources/logos/104.png 
b/plugin.video.dr.dk.live/resources/logos/104.png
index 41ffc3f..ca491bc 100644
Binary files a/plugin.video.dr.dk.live/resources/logos/104.png and 
b/plugin.video.dr.dk.live/resources/logos/104.png differ
diff --git a/plugin.video.dr.dk.live/resources/logos/107.png 
b/plugin.video.dr.dk.live/resources/logos/107.png
index f9a79e7..00ed896 100644
Binary files a/plugin.video.dr.dk.live/resources/logos/107.png and 
b/plugin.video.dr.dk.live/resources/logos/107.png differ
diff --git a/plugin.video.dr.dk.live/resources/logos/108.png 
b/plugin.video.dr.dk.live/resources/logos/108.png
index 3c29502..f11192b 100644
Binary files a/plugin.video.dr.dk.live/resources/logos/108.png and 
b/plugin.video.dr.dk.live/resources/logos/108.png differ
diff --git a/plugin.video.dr.dk.live/resources/logos/2.png 
b/plugin.video.dr.dk.live/resources/logos/2.png
index 524f30a..d14cad9 100644
Binary files a/plugin.video.dr.dk.live/resources/logos/2.png and 
b/plugin.video.dr.dk.live/resources/logos/2.png differ
diff --git a/plugin.video.dr.dk.live/resources/logos/3.png 
b/plugin.video.dr.dk.live/resources/logos/3.png
index e99f3ce..71fd334 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/logos/4.png 
b/plugin.video.dr.dk.live/resources/logos/4.png
index b45c921..d1ba2b6 100644
Binary files a/plugin.video.dr.dk.live/resources/logos/4.png and 
b/plugin.video.dr.dk.live/resources/logos/4.png differ
diff --git a/plugin.video.dr.dk.live/resources/logos/5.png 
b/plugin.video.dr.dk.live/resources/logos/5.png
index 4f91b26..338da6a 100644
Binary files a/plugin.video.dr.dk.live/resources/logos/5.png and 
b/plugin.video.dr.dk.live/resources/logos/5.png differ
diff --git a/plugin.video.dr.dk.live/resources/logos/6.png 
b/plugin.video.dr.dk.live/resources/logos/6.png
index ef5d5c0..e2a9227 100644
Binary files a/plugin.video.dr.dk.live/resources/logos/6.png and 
b/plugin.video.dr.dk.live/resources/logos/6.png differ
diff --git a/plugin.video.dr.dk.live/resources/settings.xml 
b/plugin.video.dr.dk.live/resources/settings.xml
index b784af3..c42e221 100644
--- a/plugin.video.dr.dk.live/resources/settings.xml
+++ b/plugin.video.dr.dk.live/resources/settings.xml
@@ -9,10 +9,10 @@
         <setting type="lsep" label="30105" />
         <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="drupdate.stream" label="31003" 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="drk.stream" label="31004" type="enum" default="0" 
lvalues="30106|30107" />
         <setting id="drramasjang.stream" label="31005" type="enum" default="0" 
lvalues="30106|30107" />
-        <setting id="drhd.stream" label="31006" type="enum" default="1" 
lvalues="30106|30107" />
     </category>
     <category label="30108">
         <setting id="warn.if.not.in.denmark" label="30109" type="bool" 
default="true" />

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

commit 4793b6936a0d5c0a9dc6c7eedad7d84fa9601a99
Author: beenje <[email protected]>
Date:   Wed Feb 6 21:43:06 2013 +0100

    [plugin.video.nolife] updated to version 2.16.3

diff --git a/plugin.video.nolife/addon.xml b/plugin.video.nolife/addon.xml
index be91b42..40d7108 100644
--- a/plugin.video.nolife/addon.xml
+++ b/plugin.video.nolife/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.video.nolife"
        name="Nolife Online"
-       version="2.16.2"
+       version="2.16.3"
        provider-name="gormux">
   <requires>
     <import addon="xbmc.python" version="2.1.0"/>
diff --git a/plugin.video.nolife/default.py b/plugin.video.nolife/default.py
index 248acff..104ecff 100644
--- a/plugin.video.nolife/default.py
+++ b/plugin.video.nolife/default.py
@@ -205,11 +205,19 @@ def getlastVideos():
         i = i + 1
 
     for emission in emissions:
-        addlink(emission[1],
-                "plugin://plugin.video.nolife?id=" + emission[0],
-                emission[5],
-                emission[3],
-                emission[4] )
+        if emission[2] == '':
+            addlink(emission[1],
+                    "plugin://plugin.video.nolife?id=" + emission[0],
+                    emission[5],
+                    emission[3],
+                    emission[4] )
+
+        else:
+            addlink(emission[1] + ' - ' + emission[2],
+                    "plugin://plugin.video.nolife?id=" + emission[0],
+                    emission[5],
+                    emission[3],
+                    emission[4] )
 
 def getcategories():
     """Gets all categories and adds directories
@@ -362,6 +370,7 @@ def playvideo(requestHandler, video):
     """
     settings = xbmcaddon.Addon(id='plugin.video.nolife')
     quality  = settings.getSetting( "quality" )
+    autorefresh = settings.getSetting("autorefresh")
     if   quality == "HQ" or quality == "1":
         _video = video + "?quality=2"
     elif quality == "LQ" or quality == "0":
@@ -385,7 +394,8 @@ def playvideo(requestHandler, video):
                                    path=url )
 
     xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem)
-    xbmc.executebuiltin("Container.Refresh")
+    if autorefresh == "true":
+        xbmc.executebuiltin("Container.Refresh")
 
 def get_params():
     """
diff --git a/plugin.video.nolife/resources/language/english/strings.xml 
b/plugin.video.nolife/resources/language/english/strings.xml
index 9047ed6..d38b9cb 100644
--- a/plugin.video.nolife/resources/language/english/strings.xml
+++ b/plugin.video.nolife/resources/language/english/strings.xml
@@ -13,6 +13,7 @@
     <string id="33014">Quality</string>
     <string id="33015">Show already seen videos</string>
     <string id="33020">Number of shows in last shows</string>
+    <string id="33021">Autorefresh directories</string>
     
     <!-- List of shows messages -->
     <string id="33016">Last shows</string>
diff --git a/plugin.video.nolife/resources/language/french/strings.xml 
b/plugin.video.nolife/resources/language/french/strings.xml
index 993585d..dac2b55 100644
--- a/plugin.video.nolife/resources/language/french/strings.xml
+++ b/plugin.video.nolife/resources/language/french/strings.xml
@@ -13,6 +13,7 @@
     <string id="33014">Qualité vidéo</string>
     <string id="33015">Afficher les émissions déjà vues</string>
     <string id="33020">Nombre d'émissions dans les récentes</string>
+    <string id="33021">Rafraichir automatiquement les dossiers</string>
     
     <!-- Messages dans la liste -->
     <string id="33016">Dernières émissions</string>
diff --git a/plugin.video.nolife/resources/settings.xml 
b/plugin.video.nolife/resources/settings.xml
index d9cd0a6..338a356 100644
--- a/plugin.video.nolife/resources/settings.xml
+++ b/plugin.video.nolife/resources/settings.xml
@@ -14,7 +14,8 @@
         <setting id="showall" type="bool" label="33012" default="false"/>
         <setting id="show_n" subsetting="true" type="slider" label="33013" 
default="30" range="10,10,100" enable="!eq(-1,true)" option="int"/>
         <setting id="showseen" type="bool" label="33015" default="true"/>
-        <setting id="showlast" subsetting="true" type="slider" label="33020" 
default="30" range="10,10,100" option="int"/>
+        <setting id="showlast" subsetting="true" type="slider" label="33020" 
default="30" range="5,5,60" option="int"/>
+        <setting id="autorefresh" type="bool" label="33021" default="true"/>
         <setting id="quality" type="enum" label="33014" 
values="LQ|HQ|TV|720p|1080p" default="TV"/>
     </category>
 

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

commit 2de4b5ecf0b4bdd3cfb8076e695befd0a88dc4bf
Author: beenje <[email protected]>
Date:   Wed Feb 6 21:42:59 2013 +0100

    [plugin.video.svtplay] updated to version 3.1.5

diff --git a/plugin.video.svtplay/addon.xml b/plugin.video.svtplay/addon.xml
index aed42c1..3faf62f 100644
--- a/plugin.video.svtplay/addon.xml
+++ b/plugin.video.svtplay/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.video.svtplay"
        name="SVT Play"
-       version="3.1.4"
+       version="3.1.5"
        provider-name="nilzen">
   <requires>
     <import addon="script.module.parsedom" version="1.2.0"/>
diff --git a/plugin.video.svtplay/changelog.txt 
b/plugin.video.svtplay/changelog.txt
index 842481a..6beebd2 100644
--- a/plugin.video.svtplay/changelog.txt
+++ b/plugin.video.svtplay/changelog.txt
@@ -1,3 +1,8 @@
+Version 3.1.5
+-------------
+- Add new feature "Kanaler" from site (linqcan)
+- Restore broken A-Z listing (linqcan)
+
 Version 3.1.4
 -------------
 - Fixed playback for live programs (linqcan)
diff --git a/plugin.video.svtplay/default.py b/plugin.video.svtplay/default.py
index f0ff08c..e4f8d0e 100644
--- a/plugin.video.svtplay/default.py
+++ b/plugin.video.svtplay/default.py
@@ -10,7 +10,10 @@ import xbmcplugin
 import CommonFunctions
 import os
 import resources.lib.bestofsvt as bestof
+import resources.lib.helper as helper
+import resources.lib.svt as svt
 
+MODE_CHANNELS = "kanaler"
 MODE_A_TO_O = "a-o"
 MODE_PROGRAM = "pr"
 MODE_LIVE = "live"
@@ -29,10 +32,12 @@ MODE_VIEW_EPISODES = "view_episodes"
 MODE_VIEW_CLIPS = "view_clips"
 
 BASE_URL = "http://www.svtplay.se";
-SWF_URL = "http://www.svtplay.se/public/swf/video/svtplayer-2012.51.swf"; 
+SWF_URL = "http://www.svtplay.se/public/swf/video/svtplayer-2013.02.swf"; 
+JSON_SUFFIX = "?output=json"
 
 URL_A_TO_O = "/program"
 URL_CATEGORIES = "/kategorier"
+URL_CHANNELS = "/kanaler"
 URL_TO_LATEST = "?tab=episodes&sida=1"
 URL_TO_LATEST_NEWS = "?tab=news&sida=1"
 URL_TO_RECOMMENDED = "?tab=recommended&sida=1"
@@ -88,6 +93,7 @@ MAX_DIR_ITEMS = int(float(settings.getSetting("diritems")))
 
 def viewStart():
 
+  addDirectoryItem(localize(30008), { "mode": MODE_CHANNELS })
   addDirectoryItem(localize(30000), { "mode": MODE_A_TO_O })
   addDirectoryItem(localize(30001), { "mode": MODE_CATEGORIES })
   addDirectoryItem(localize(30005), { "mode": MODE_RECOMMENDED, "page": 1 })
@@ -98,9 +104,20 @@ def viewStart():
   addDirectoryItem(localize(30007), { "mode": MODE_BESTOF_CATEGORIES })
 
 
+def viewChannels():
+  channels = svt.getChannels(BASE_URL + URL_CHANNELS)
+  
+  params = {}
+  params["mode"] = MODE_VIDEO
+
+  for channel in channels:
+    params["url"] = channel["url"]
+    addDirectoryItem(channel["title"],params,channel["thumbnail"],False,True)
+    
+  
 
 def viewAtoO():
-  html = getPage(BASE_URL + URL_A_TO_O)
+  html = helper.getPage(BASE_URL + URL_A_TO_O)
 
   texts = common.parseDOM(html, "a" , attrs = { "class": 
"playAlphabeticLetterLink" })
   hrefs = common.parseDOM(html, "a" , attrs = { "class": 
"playAlphabeticLetterLink" }, ret = "href")
@@ -109,7 +126,7 @@ def viewAtoO():
     addDirectoryItem(common.replaceHTMLCodes(text), { "mode": MODE_PROGRAM, 
"url": hrefs[index], "page": 1 })
 
 def viewLive():
-  html = getPage(BASE_URL)
+  html = helper.getPage(BASE_URL)
 
   tabId = common.parseDOM(html, "a", attrs = { "class": 
"[^\"']*playButton-TabLive[^\"']*" }, ret = "data-tab")
 
@@ -134,12 +151,12 @@ def viewLive():
 
         if match:
 
-          url = match.group() + VIDEO_PATH_SUFFIX
+          url = match.group()
 
           addDirectoryItem(common.replaceHTMLCodes(text), { "mode": 
MODE_VIDEO, "url": url }, None, False, True)
 
 def viewCategories():
-  html = getPage(BASE_URL + URL_CATEGORIES)
+  html = helper.getPage(BASE_URL + URL_CATEGORIES)
 
   container = common.parseDOM(html, "ul", attrs = { "class": 
"[^\"']*svtGridBlock[^\"']*" })
 
@@ -157,21 +174,21 @@ def viewAlphaDirectories():
   Used to create the alphabetical A-Ö directory items.
   Addon setting has to be enabled for this to trigger.
   """
-  html = getPage(BASE_URL + URL_A_TO_O)
+  html = helper.getPage(BASE_URL + URL_A_TO_O)
 
   container = common.parseDOM(html, "div", attrs = { "id" : 
"playAlphabeticLetterList" })
 
-  letters = common.parseDOM(container, "h2", attrs = { "class" : 
"playAlphabeticLetterHeading " })
+  letters = common.parseDOM(container, "h3", attrs = { "class" : 
"playAlphabeticLetterHeading " })
 
   for letter in letters:
     url = letter
-    addDirectoryItem(convertChar(letter), { "mode": MODE_LETTER, "letter": url 
})
+    addDirectoryItem(helper.convertChar(letter), { "mode": MODE_LETTER, 
"letter": url })
 
 def viewProgramsByLetter(letter):
 
   letter = urllib.unquote(letter)
 
-  html = getPage(BASE_URL + URL_A_TO_O)
+  html = helper.getPage(BASE_URL + URL_A_TO_O)
 
   container = common.parseDOM(html, "div", attrs = { "id": 
"playAlphabeticLetterList" })
 
@@ -179,7 +196,7 @@ def viewProgramsByLetter(letter):
 
   for letterbox in letterboxes:
 
-    heading = common.parseDOM(letterbox, "h2")[0]
+    heading = common.parseDOM(letterbox, "h3")[0]
 
     if heading == letter:
       break
@@ -240,7 +257,7 @@ def createTabIndex(url):
   """
   Creates a directory item for each available tab; Klipp, Hela program, 
Programtitlar
   """
-  html = getPage(BASE_URL + url)
+  html = helper.getPage(BASE_URL + url)
   foundTab = False
  
   # Search for the "titles" tab. If it exists; create link to result directory 
  
@@ -293,7 +310,7 @@ def tabExists(url,tabname):
   """
   Check if a specific tab exists in the DOM.
   """
-  html = getPage(BASE_URL + url)
+  html = helper.getPage(BASE_URL + url)
   return elementExists(html,"div",{ "data-tabname": tabname})
 
 def elementExists(html,etype,attrs):
@@ -352,7 +369,7 @@ def viewBestOfCategory(url):
   params["mode"] = MODE_VIDEO
 
   for show in shows:
-    params["url"] = show["url"] + VIDEO_PATH_SUFFIX
+    params["url"] = show["url"]
     addDirectoryItem(show["title"], params, show["thumbnail"], False)
 
 def createDirectory(url,page,index,callertype,dirtype):
@@ -420,7 +437,7 @@ def parseAjaxUrlAndLastPage(url,tabname):
   common.log("url: " + url + ", tabname: " + tabname)
   classexp = "[^\"']*playShowMoreButton[^\"']*"
   dataname = "sida"
-  html = getPage(BASE_URL + url)
+  html = helper.getPage(BASE_URL + url)
 
   container = common.parseDOM(html,
                               "div",
@@ -503,7 +520,7 @@ def createDirItem(article,mode):
     folder = False
 
     if(mode == MODE_VIDEO):
-      params["url"] = url + VIDEO_PATH_SUFFIX
+      params["url"] = url
     elif mode == MODE_PROGRAM:
       folder = True
       params["page"] = 1
@@ -525,7 +542,7 @@ def getArticles(ajaxurl,page,tabname=None):
   else:
     pageurl = BASE_URL + ajaxurl 
   
-  html = getPage(pageurl)
+  html = helper.getPage(pageurl)
 
   if not tabname:
     container = common.parseDOM(html,
@@ -564,54 +581,24 @@ def getArticles(ajaxurl,page,tabname=None):
     info["title"] = title
     info["plot"] = plot
     info["aired"] = aired
-    info["duration"] = convertDuration(duration)
+    info["duration"] = helper.convertDuration(duration)
     newarticles.append((title,href,thumbnail,info))
     i += 1
  
   return newarticles
 
-def convertDuration(duration):
-  """
-  Converts SVT's duration format to XBMC friendly format (minutes).
-
-  SVT has the following format on their duration strings:
-  1 h 30 min
-  1 min 30 sek
-  1 min
-  """
-
-  match = re.match(r'(^(\d+)\sh)*(\s*(\d+)\smin)*(\s*(\d+)\ssek)*',duration)
-
-  dhours = 0
-  dminutes = 0
-  dseconds = 0
-
-  if match.group(1):
-    dhours = int(match.group(2)) * 60
-
-  if match.group(3):
-    dminutes = int(match.group(4))
- 
-  if match.group(5):
-    dseconds = int(match.group(6)) / 60
-
-  return str(dhours + dminutes + dseconds) 
 
 def startVideo(url):
 
   if not url.startswith("/"):
     url = "/" + url
 
+  url = url + JSON_SUFFIX
   common.log("url: " + url)
-  html = getPage(BASE_URL + url)
-
-  jsonString = common.parseDOM(html, "param", attrs = { "name": "flashvars" }, 
ret = "value")[0]
-
-  jsonString = jsonString.lstrip("json=")
-  jsonString = common.replaceHTMLCodes(jsonString)
+  html = helper.getPage(BASE_URL + url)
 
+  jsonString = common.replaceHTMLCodes(html)
   jsonObj = json.loads(jsonString)
-
   common.log(jsonString)
 
   subtitle = None
@@ -674,7 +661,7 @@ def startVideo(url):
 
   if videoUrl:
     
-    if args:
+    if args and not HLS_STRIP:
       common.log("Appending arguments: "+args)
       videoUrl = videoUrl + args
 
@@ -778,19 +765,6 @@ def hlsStrip(videoUrl):
     return newpath
 
 
-def getPage(url):
-
-  result = common.fetchPage({ "link": url })
-
-  if result["status"] == 200:
-       return result["content"]
-
-  if result["status"] == 500:
-    common.log("redirect url: %s" %result["new_url"])
-    common.log("header: %s" %result["header"])
-    common.log("content: %s" %result["content"])
-
-
 def addDirectoryItem(title, params, thumbnail = None, folder = True, live = 
False, info = None):
 
   li = xbmcgui.ListItem(title)
@@ -810,35 +784,7 @@ def addDirectoryItem(title, params, thumbnail = None, 
folder = True, live = Fals
   xbmcplugin.addDirectoryItem(pluginHandle, sys.argv[0] + '?' + 
urllib.urlencode(params), li, folder)
 
 
-def convertChar(char):
-  if char == "&Aring;":
-    return "Å"
-  elif char == "&Auml;":
-    return "Ä"
-  elif char == "&Ouml;":
-    return "Ö"
-  else:
-    return char
-
-def getUrlParameters(arguments):
-
-  params = {}
-
-  if arguments:
-    
-      start = arguments.find("?") + 1
-      pairs = arguments[start:].split("&")
-
-      for pair in pairs:
-
-        split = pair.split("=")
-
-        if len(split) == 2:
-          params[split[0]] = split[1]
-  
-  return params
-
-params = getUrlParameters(sys.argv[2])
+params = helper.getUrlParameters(sys.argv[2])
 
 mode = params.get("mode")
 url = urllib.unquote_plus(params.get("url", ""))
@@ -884,5 +830,7 @@ elif mode == MODE_BESTOF_CATEGORIES:
   viewBestOfCategories()
 elif mode == MODE_BESTOF_CATEGORY:
   viewBestOfCategory(url)
+elif mode == MODE_CHANNELS:
+  viewChannels()
 
 xbmcplugin.endOfDirectory(pluginHandle)
diff --git a/plugin.video.svtplay/resources/language/English/strings.xml 
b/plugin.video.svtplay/resources/language/English/strings.xml
index 1547aae..7be8903 100644
--- a/plugin.video.svtplay/resources/language/English/strings.xml
+++ b/plugin.video.svtplay/resources/language/English/strings.xml
@@ -8,6 +8,7 @@
   <string id="30005">Recommended</string>
   <string id="30006">Search</string>
   <string id="30007">BestOfSVT.se</string>
+  <string id="30008">Channels</string>
   <string id="30100">This program is only available at www.svtplay.se</string>
   <string id="30101">Show more...</string>
   <string id="30102">Search for:</string>
diff --git a/plugin.video.svtplay/resources/language/Swedish/strings.xml 
b/plugin.video.svtplay/resources/language/Swedish/strings.xml
index ab0843b..0adabcf 100644
--- a/plugin.video.svtplay/resources/language/Swedish/strings.xml
+++ b/plugin.video.svtplay/resources/language/Swedish/strings.xml
@@ -8,6 +8,7 @@
   <string id="30005">Rekommenderat</string>
   <string id="30006">Sök</string>
   <string id="30007">BestOfSVT.se</string>
+  <string id="30008">Kanaler</string>
   <string id="30100">Detta program är endast tillgängligt på 
www.svtplay.se</string>
   <string id="30101">Visa fler...</string>
   <string id="30102">Sök efter:</string>
diff --git a/plugin.video.svtplay/resources/lib/bestofsvt.py 
b/plugin.video.svtplay/resources/lib/bestofsvt.py
index 26a570e..2206402 100644
--- a/plugin.video.svtplay/resources/lib/bestofsvt.py
+++ b/plugin.video.svtplay/resources/lib/bestofsvt.py
@@ -1,4 +1,5 @@
 import CommonFunctions
+import helper as helper
 
 BESTOF_BASE_URL = "http://www.bestofsvt.se";
 common = CommonFunctions
@@ -9,7 +10,7 @@ def getCategories():
   """
   Returns all categories in the header menu
   """
-  html = getPage(BESTOF_BASE_URL)
+  html = helper.getPage(BESTOF_BASE_URL)
   
   menu = common.parseDOM(html, "ul", attrs = { "class": "menu_1"})[0]
 
@@ -29,7 +30,7 @@ def getShows(url):
   """
   Returns all shows in a category
   """
-  html = getPage(BESTOF_BASE_URL + url)
+  html = helper.getPage(BESTOF_BASE_URL + url)
 
   container = common.parseDOM(html, "div", attrs = 
{"class":"[^\"']*content_show_videos[^\"']*"})[0]
 
@@ -46,16 +47,3 @@ def getShows(url):
     shows.append({"title":title,"url":href,"thumbnail":thumb})
 
   return shows
-
-def getPage(url):
-
-  result = common.fetchPage({ "link": url })
-  
-  if result["status"] == 200:
-    return result["content"]
-
-  if result["status"] == 500:
-    common.log("redirect url: %s" &result["new_url"])
-    common.log("header: %s" %result["header"])
-    common.log("content: %s" %result["content"])
-    return None

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

Summary of changes:
 plugin.video.dr.dk.live/addon.py                   |   21 ++--
 plugin.video.dr.dk.live/addon.xml                  |    6 +-
 plugin.video.dr.dk.live/changelog.txt              |    8 ++
 plugin.video.dr.dk.live/channels.py                |   39 +++---
 .../resources/language/Danish/strings.xml          |    2 +-
 .../resources/language/English/strings.xml         |    2 +-
 plugin.video.dr.dk.live/resources/logos/1.png      |  Bin 37033 -> 35947 bytes
 plugin.video.dr.dk.live/resources/logos/103.png    |  Bin 42368 -> 42036 bytes
 plugin.video.dr.dk.live/resources/logos/104.png    |  Bin 40483 -> 39581 bytes
 plugin.video.dr.dk.live/resources/logos/107.png    |  Bin 54246 -> 53947 bytes
 plugin.video.dr.dk.live/resources/logos/108.png    |  Bin 38121 -> 37773 bytes
 plugin.video.dr.dk.live/resources/logos/2.png      |  Bin 37751 -> 36649 bytes
 plugin.video.dr.dk.live/resources/logos/3.png      |  Bin 39762 -> 38632 bytes
 plugin.video.dr.dk.live/resources/logos/4.png      |  Bin 41048 -> 39948 bytes
 plugin.video.dr.dk.live/resources/logos/5.png      |  Bin 56121 -> 54963 bytes
 plugin.video.dr.dk.live/resources/logos/6.png      |  Bin 39540 -> 37468 bytes
 plugin.video.dr.dk.live/resources/settings.xml     |    4 +-
 plugin.video.nolife/addon.xml                      |    2 +-
 plugin.video.nolife/default.py                     |   22 +++-
 .../resources/language/english/strings.xml         |    1 +
 .../resources/language/french/strings.xml          |    1 +
 plugin.video.nolife/resources/settings.xml         |    3 +-
 plugin.video.svtplay/addon.xml                     |    2 +-
 plugin.video.svtplay/changelog.txt                 |    5 +
 plugin.video.svtplay/default.py                    |  134 ++++++--------------
 .../resources/language/English/strings.xml         |    1 +
 .../resources/language/Swedish/strings.xml         |    1 +
 plugin.video.svtplay/resources/lib/bestofsvt.py    |   18 +---
 plugin.video.svtplay/resources/lib/helper.py       |   79 ++++++++++++
 plugin.video.svtplay/resources/lib/svt.py          |   31 +++++
 30 files changed, 227 insertions(+), 155 deletions(-)
 create mode 100644 plugin.video.svtplay/resources/lib/helper.py
 create mode 100644 plugin.video.svtplay/resources/lib/svt.py


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to