The branch, gotham has been updated
       via  35443f445ebe529027910a70b73cd0c6686424b3 (commit)
      from  2590d4e02bcf887c4d67185f6d32bee2ee11e251 (commit)

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

commit 35443f445ebe529027910a70b73cd0c6686424b3
Author: Martijn Kaijser <[email protected]>
Date:   Wed Jun 11 19:22:51 2014 +0200

    [plugin.video.svtplay] 4.0.1

diff --git a/plugin.video.svtplay/addon.xml b/plugin.video.svtplay/addon.xml
index 41f1d0b..82a2191 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="4.0.0"
+       version="4.0.1"
        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 80a1b3a..6b124af 100644
--- a/plugin.video.svtplay/changelog.txt
+++ b/plugin.video.svtplay/changelog.txt
@@ -1,3 +1,7 @@
+Version 4.0.1
+-------------
+- Fix broken news category listing
+
 Version 4.0.0
 -------------
 - Rewrite script to support the new SVT Play site
diff --git a/plugin.video.svtplay/resources/lib/svt.py 
b/plugin.video.svtplay/resources/lib/svt.py
index 8dd12ce..1f5f421 100644
--- a/plugin.video.svtplay/resources/lib/svt.py
+++ b/plugin.video.svtplay/resources/lib/svt.py
@@ -80,6 +80,8 @@ def getProgramsForCategory(url):
   html = getPage(url)
 
   container = common.parseDOM(html, "div", attrs = { "id" : 
"[^\"']*playJs-alphabetic-list[^\"']*" })
+  if url == "/nyheter":
+    container = common.parseDOM(html, "div", attrs = { "id" : 
"[^\"']*playJs-title-pages[^\"']*" })
 
   if not container:
     common.log("Could not find container for URL "+url)
@@ -94,7 +96,7 @@ def getProgramsForCategory(url):
   programs = []
   for index, article in enumerate(articles):
     url = common.parseDOM(article, "a", ret="href")[0]
-    title = common.parseDOM(article, "span", attrs= { "class" : 
"play-link-sub"})[0]
+    title = common.parseDOM(article, "span", attrs= { "class" : 
"play-link-sub" })[0]
     title = common.replaceHTMLCodes(title)
     thumbnail = common.parseDOM(article, "img", ret="src")[0]
     program = { "title": title, "url": url, "thumbnail": thumbnail}
diff --git a/plugin.video.svtplay/tests/testSvt.py 
b/plugin.video.svtplay/tests/testSvt.py
index 2ba5b43..f87a951 100644
--- a/plugin.video.svtplay/tests/testSvt.py
+++ b/plugin.video.svtplay/tests/testSvt.py
@@ -43,16 +43,15 @@ class TestSvtModule(unittest.TestCase):
 
   def test_programs_for_category(self):
 
-    # Use the "Barn" category since is changes a lot
-    url = "/barn"
-
-    programs = svt.getProgramsForCategory(url)
+    categories = svt.getCategories()
+    for category in categories:
+      programs = svt.getProgramsForCategory(category["url"])
 
-    self.assertHasContent(programs)
+      self.assertHasContent(programs)
 
-    for program in programs:
-      for key in program.keys():
-        self.assertIsNotNone(program[key])
+      for program in programs:
+        for key in program.keys():
+          self.assertIsNotNone(program[key])
 
   def test_get_alphas(self):
 

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

Summary of changes:
 plugin.video.svtplay/addon.xml            |    2 +-
 plugin.video.svtplay/changelog.txt        |    4 ++++
 plugin.video.svtplay/resources/lib/svt.py |    4 +++-
 plugin.video.svtplay/tests/testSvt.py     |   15 +++++++--------
 4 files changed, 15 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to