summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntti Ajanki <antti.ajanki@iki.fi>2011-03-26 19:21:20 +0200
committerAntti Ajanki <antti.ajanki@iki.fi>2011-03-27 11:00:12 +0300
commit2f2186b5418bd591589287242911ef9af27fce16 (patch)
treee4178f3d2dfe993ddd10869ec8b073d221c25294
parentc9c6e4c7f52cbac62dd6101af61921fd20426525 (diff)
downloadvdr-plugin-webvideo-2f2186b5418bd591589287242911ef9af27fce16.tar.gz
vdr-plugin-webvideo-2f2186b5418bd591589287242911ef9af27fce16.tar.bz2
Remove SVT Play module
-rw-r--r--README4
-rw-r--r--TODO2
-rw-r--r--src/unittest/testwebvi.py19
-rw-r--r--templates/svtplay.se/categories.xsl19
-rw-r--r--templates/svtplay.se/description.xsl41
-rw-r--r--templates/svtplay.se/navigation.xsl74
-rw-r--r--templates/svtplay.se/programmenu.xsl56
-rw-r--r--templates/svtplay.se/service.xml7
-rw-r--r--templates/svtplay.se/videopage.xsl24
-rw-r--r--templates/video.google.com/searchresults.xsl8
10 files changed, 1 insertions, 253 deletions
diff --git a/README b/README
index b2670a7..3cfbf1d 100644
--- a/README
+++ b/README
@@ -17,12 +17,11 @@ Supported video sites:
* MTV3 Katsomo
* ruutu.fi [2]
* Subtv
-* SVT Play
* Vimeo
* YLE Areena [2]
* YouTube
-[1] Only videos hosted by Google, YouTube, Vimeo and SVT
+[1] Only videos hosted by Google, YouTube, Vimeo
[2] Requires rtmpdump-yle
(http://users.tkk.fi/~aajanki/rtmpdump-yle/index.html). Streaming
@@ -30,7 +29,6 @@ Supported video sites:
Known problems:
-SVT Play: not all videos are working
MTV3 Katsomo and Subtv: often the connection is lost before the
video is fully downloaded.
diff --git a/TODO b/TODO
index 0e24365..118f2f5 100644
--- a/TODO
+++ b/TODO
@@ -6,8 +6,6 @@ Show a poster image next to video's name
plugin: scrolling does not work on video description pages
-SVTPlay: add search
-
metacafe: fails to find video URL for videos with ID sy-*, cb-*
(others?). The videos are probably hosted on some other sites (like
yt-* -> youtube).
diff --git a/src/unittest/testwebvi.py b/src/unittest/testwebvi.py
index 2aaf394..814a1c4 100644
--- a/src/unittest/testwebvi.py
+++ b/src/unittest/testwebvi.py
@@ -173,25 +173,6 @@ class TestServiceModules(unittest.TestCase):
self.assertNotEqual(resultref, None)
self.downloadAndExtractLinks(resultref, 1, 'search result')
- def testSVTPlay(self):
- # Category page
- ref = self.getServiceReference('../../templates/svtplay.se')
- links = self.downloadAndExtractLinks(ref, 3, 'category')
-
- # Navigation page
- navigationref = links[0].ref
- links = self.downloadAndExtractLinks(navigationref, 2, 'navigation')
-
- # Single program
- programref = links[0].ref
- links = self.downloadAndExtractLinks(programref, 1, 'program')
-
- # Video link
- videolink = links[0]
- self.assertNotEqual(videolink.stream, None, 'No media object in a video link')
- self.assertNotEqual(videolink.ref, None, 'No description page in a video link')
- self.checkMediaUrl(videolink.stream)
-
def testMetacafe(self):
# Category page
ref = self.getServiceReference('../../templates/www.metacafe.com')
diff --git a/templates/svtplay.se/categories.xsl b/templates/svtplay.se/categories.xsl
deleted file mode 100644
index 751a9e5..0000000
--- a/templates/svtplay.se/categories.xsl
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:template match="/">
-<wvmenu>
- <title>SVT Play</title>
-
- <xsl:for-each select="//div[@id='categorylist']//ul/li//a">
- <link>
- <label><xsl:value-of select="span[@class='category-header']"/></label>
- <ref>wvt:///svtplay.se/navigation.xsl?srcurl=<xsl:value-of select="@href"/></ref>
- </link>
- </xsl:for-each>
-</wvmenu>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/templates/svtplay.se/description.xsl b/templates/svtplay.se/description.xsl
deleted file mode 100644
index f3c3ae6..0000000
--- a/templates/svtplay.se/description.xsl
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:template match="div[@class='info']/ul">
- <textarea>
- <label>
- <xsl:value-of select="normalize-space(li[@class='title']/div)"/>
- </label>
- </textarea>
- <textarea>
- <label>
- <xsl:value-of select="normalize-space(li[@class='episode']/div)"/>
- </label>
- </textarea>
- <textarea>
- <label>
- <xsl:value-of select="concat(normalize-space(li[1]/span[2]), ' ', normalize-space(li/span[2]/following-sibling::text()))"/>
- </label>
- </textarea>
-</xsl:template>
-
-<xsl:template match="/">
-<wvmenu>
- <title>
- <xsl:choose>
- <xsl:when test="normalize-space(//h1/a/img/@alt)">
- <xsl:value-of select="concat(normalize-space(//h1/a/img/@alt), ' ', //div[@class='info']//h2)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(normalize-space(//h1/a), ' ', //div[@class='info']//h2)"/>
- </xsl:otherwise>
- </xsl:choose>
- </title>
-
- <xsl:apply-templates select="//div[@class='info']/ul"/>
-</wvmenu>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/templates/svtplay.se/navigation.xsl b/templates/svtplay.se/navigation.xsl
deleted file mode 100644
index c3e43ba..0000000
--- a/templates/svtplay.se/navigation.xsl
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:str="http://exslt.org/strings">
-
-<xsl:template match="text()" />
-
-<xsl:template match="div[@id='pb']">
- <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="div[@id='sb']">
- <xsl:apply-templates/>
-</xsl:template>
-
-<xsl:template match="div[@id='se']">
- <xsl:apply-templates/>
-</xsl:template>
-
-<!-- Programs -->
-<xsl:template match="div[@class='content']//ul/li/a[1]">
- <link>
- <label><xsl:value-of select="normalize-space(span)"/></label>
- <ref>wvt:///svtplay.se/programmenu.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref>
- </link>
-</xsl:template>
-
-<!-- next/prev links -->
-<xsl:template match="div[@class='footer']/div[@class='pagination']/ul[@class='pagination program']/li">
- <xsl:if test="@class='prev '">
- <link>
- <label><xsl:value-of select="a/img/@alt"/></label>
- <ref>wvt:///svtplay.se/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref>
- </link>
- </xsl:if>
-
- <xsl:if test="@class='next '">
- <link>
- <label><xsl:value-of select="a/img/@alt"/></label>
- <ref>wvt:///svtplay.se/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref>
- </link>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="/">
-<wvmenu>
- <title>
- <xsl:choose>
- <xsl:when test="normalize-space(//h1)">
- <xsl:value-of select="normalize-space(//h1)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="normalize-space(//h1/a/img/@alt)"/>
- </xsl:otherwise>
- </xsl:choose>
- </title>
-
- <!-- In most categories the content is in pb and se nodes, except
- for Nyheter and Sport, where the content is in sb and se nodes.
- On the other hand, we can't match sb unconditionally because in
- Öppet arkiv sb contains klips instead of programs! -->
- <xsl:choose>
- <xsl:when test="//div[@id='pb']">
- <xsl:apply-templates select="//div[@id='pb']|//div[@id='se']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="//div[@id='sb']|//div[@id='se']"/>
- </xsl:otherwise>
- </xsl:choose>
-</wvmenu>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/templates/svtplay.se/programmenu.xsl b/templates/svtplay.se/programmenu.xsl
deleted file mode 100644
index baf88c4..0000000
--- a/templates/svtplay.se/programmenu.xsl
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:str="http://exslt.org/strings">
-
-<xsl:template match="text()" />
-
-<xsl:template match="div[@id='pb']">
- <xsl:apply-templates/>
-</xsl:template>
-
-<!-- Broadcasts -->
-<xsl:template match="div[@class='content']//ul/li/a">
- <link>
- <label><xsl:value-of select="normalize-space(span)"/></label>
- <ref>wvt:///svtplay.se/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref>
- <stream>wvt:///svtplay.se/videopage.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></stream>
- </link>
-</xsl:template>
-
-<!-- next/prev links -->
-<xsl:template match="div[@class='footer']/div[@class='pagination']/ul[@class='pagination program']/li">
- <xsl:if test="@class='prev '">
- <link>
- <label><xsl:value-of select="a/img/@alt"/></label>
- <ref>wvt:///svtplay.se/programmenu.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref>
- </link>
- </xsl:if>
-
- <xsl:if test="@class='next '">
- <link>
- <label><xsl:value-of select="a/img/@alt"/></label>
- <ref>wvt:///svtplay.se/programmenu.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref>
- </link>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="/">
-<wvmenu>
- <title>
- <xsl:choose>
- <xsl:when test="normalize-space(//h1/a)">
- <xsl:value-of select="normalize-space(//h1/a)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="normalize-space(//h1/a/img/@alt)"/>
- </xsl:otherwise>
- </xsl:choose>
- </title>
-
- <xsl:apply-templates select="//div[@id='sb']"/>
-</wvmenu>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/templates/svtplay.se/service.xml b/templates/svtplay.se/service.xml
deleted file mode 100644
index 92d2725..0000000
--- a/templates/svtplay.se/service.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<service>
- <title>SVT Play</title>
- <ref>wvt:///svtplay.se/categories.xsl?srcurl=http://svtplay.se/kategorier</ref>
- <description>Swedish Television, online TV service</description>
-</service>
diff --git a/templates/svtplay.se/videopage.xsl b/templates/svtplay.se/videopage.xsl
deleted file mode 100644
index af6aeb9..0000000
--- a/templates/svtplay.se/videopage.xsl
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:template match="/">
-<mediaurl>
- <title>
- <xsl:choose>
- <xsl:when test="normalize-space(//h1/a/img/@alt)">
- <xsl:value-of select="concat(normalize-space(//h1/a/img/@alt), ' ', //div[@class='info']//h2)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(normalize-space(//h1/a), ' ', //div[@class='info']//h2)"/>
- </xsl:otherwise>
- </xsl:choose>
- </title>
-
- <url priority="50"><xsl:value-of select="substring-before(substring-after((//object/param[@name='flashvars'])[1]/@value, 'pathflv='), '&amp;')"/></url>
- <url priority="40"><xsl:value-of select="//a[@class='external-player']/@href"/></url>
-</mediaurl>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/templates/video.google.com/searchresults.xsl b/templates/video.google.com/searchresults.xsl
index 806c60e..d1524c7 100644
--- a/templates/video.google.com/searchresults.xsl
+++ b/templates/video.google.com/searchresults.xsl
@@ -52,14 +52,6 @@
</link>
</xsl:when>
- <xsl:when test="starts-with(@href, 'http://svtplay.se/')">
- <link>
- <label><xsl:value-of select="normalize-space(.)"/></label>
- <stream>wvt:///svtplay.se/videopage.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></stream>
- <ref>wvt:///svtplay.se/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref>
- </link>
- </xsl:when>
-
</xsl:choose>
</xsl:for-each>