diff options
author | Antti Ajanki <antti.ajanki@iki.fi> | 2012-01-29 15:52:41 +0200 |
---|---|---|
committer | Antti Ajanki <antti.ajanki@iki.fi> | 2012-01-29 15:52:41 +0200 |
commit | c5c8695ff8615e4517300d234eedb6824bea4850 (patch) | |
tree | 1d5de2522ae7f3bb26bd5e07cfefa2ed7a8080bc | |
parent | a930faf82b35e77b81a4e61175ebd08f4007a8c7 (diff) | |
download | vdr-plugin-webvideo-c5c8695ff8615e4517300d234eedb6824bea4850.tar.gz vdr-plugin-webvideo-c5c8695ff8615e4517300d234eedb6824bea4850.tar.bz2 |
Removed SubTV
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | README | 5 | ||||
-rw-r--r-- | src/unittest/testwebvi.py | 27 | ||||
-rw-r--r-- | src/vdr-plugin/timer.c | 1 | ||||
-rw-r--r-- | templates/www.sub.fi/description.xsl | 32 | ||||
-rw-r--r-- | templates/www.sub.fi/mainmenu.xsl | 21 | ||||
-rw-r--r-- | templates/www.sub.fi/navigation.xsl | 42 | ||||
-rw-r--r-- | templates/www.sub.fi/service.xml | 7 | ||||
-rw-r--r-- | templates/www.sub.fi/video.xsl | 24 | ||||
-rw-r--r-- | templates/www.sub.fi/videopage.xsl | 16 |
10 files changed, 3 insertions, 173 deletions
@@ -255,3 +255,4 @@ Video site modules: 2012-01-29: Version 0.4.5 - Fixed Youtube breakage +- Removed SubTV support, SubTV programs are available in Katsomo @@ -16,7 +16,6 @@ Supported video sites: * Metacafe * MTV3 Katsomo * ruutu.fi [2] -* Subtv * Vimeo * YLE Areena [2] * YouTube @@ -28,8 +27,8 @@ Supported video sites: Known problems: -* MTV3 Katsomo and Subtv: often the connection is lost before the - video is fully downloaded. +* MTV3 Katsomo: often the connection is lost before the video is fully + downloaded. * Vimeo: Streaming does not work. Because of the modular design it is possible to add support for new diff --git a/src/unittest/testwebvi.py b/src/unittest/testwebvi.py index 1bf1044..2af3c16 100644 --- a/src/unittest/testwebvi.py +++ b/src/unittest/testwebvi.py @@ -392,33 +392,6 @@ class TestServiceModules(unittest.TestCase): # self.assertNotEqual(resultref, None) # self.downloadAndExtractLinks(resultref, 1, 'search result') - def testSubtv(self): - # Category page - ref = self.getServiceReference('../../templates/www.sub.fi') - links = self.downloadAndExtractLinks(ref, 4, 'series') - - # Program page - plinks = [] - for li in links: - plinks = self.downloadAndExtractLinks(li.ref, 0, 'program') - if plinks: - break - if not plinks: - self.assertTrue(False, 'None of the program pages has links') - - # Video link - videolink = plinks[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') - - # Direct video page link - queries, params = self.extractQueryParams(plinks[0].stream) - self.assertTrue('srcurl' in queries and 'pid' in params, 'Required parameter missing in video link') - videopageurl = queries['srcurl'] + '?' + params['pid'] - videopageref = self.urlToWvtref(videopageurl) - self.checkMediaUrl(videopageref) - - if __name__ == '__main__': testnames = sys.argv[1:] diff --git a/src/vdr-plugin/timer.c b/src/vdr-plugin/timer.c index b5a5c2b..6346763 100644 --- a/src/vdr-plugin/timer.c +++ b/src/vdr-plugin/timer.c @@ -323,7 +323,6 @@ char *cWebviTimerManager::UpgradedTemplatePath(char *ref) { {"wvt:///metacafe/", "wvt:///www.metacafe.com/"}, {"wvt:///vimeo/", "wvt:///www.vimeo.com/"}, {"wvt:///katsomo/", "wvt:///www.katsomo.fi/"}, - {"wvt:///subtv/", "wvt:///www.sub.fi/"}, {"wvt:///ruutufi/", "wvt:///www.ruutu.fi/"}, {"wvt:///google/", "wvt:///video.google.com/"}, {"wvt:///yleareena/", "wvt:///areena.yle.fi/"}}; diff --git a/templates/www.sub.fi/description.xsl b/templates/www.sub.fi/description.xsl deleted file mode 100644 index 9aeacf0..0000000 --- a/templates/www.sub.fi/description.xsl +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<xsl:stylesheet version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:str="http://exslt.org/strings" - exclude-result-prefixes="str"> - -<xsl:param name="title"/> -<xsl:param name="desc"/> -<xsl:param name="pubdate"/> -<xsl:param name="pid"/> - -<xsl:template match="/"> -<wvmenu> - <title><xsl:value-of select="$title"/></title> - - <textarea> - <label><xsl:value-of select="$desc"/></label> - </textarea> - - <textarea> - <label><xsl:value-of select="$pubdate"/></label> - </textarea> - - <link> - <label>Lataa</label> - <stream>wvt:///www.sub.fi/video.xsl?param=pid,<xsl:value-of select="$pid"/>&param=title,<xsl:value-of select="str:encode-uri($title, true())"/></stream> - </link> -</wvmenu> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/www.sub.fi/mainmenu.xsl b/templates/www.sub.fi/mainmenu.xsl deleted file mode 100644 index c865ae0..0000000 --- a/templates/www.sub.fi/mainmenu.xsl +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<xsl:stylesheet version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:str="http://exslt.org/strings" - exclude-result-prefixes="str"> - -<xsl:template match="/"> -<wvmenu> - <title>Subin netti-TV</title> - - <xsl:for-each select="//div[@class='netissakaikki']/ul/li/a"> - <link> - <label><xsl:value-of select="."/></label> - <ref>wvt:///www.sub.fi/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> - </link> - </xsl:for-each> -</wvmenu> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/www.sub.fi/navigation.xsl b/templates/www.sub.fi/navigation.xsl deleted file mode 100644 index 274355f..0000000 --- a/templates/www.sub.fi/navigation.xsl +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<xsl:stylesheet version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:str="http://exslt.org/strings" - exclude-result-prefixes="str"> - -<xsl:param name="docurl"/> -<xsl:variable name="programname" select="id('page')/div[@class='ohjelma_yla ohjelmanavi']/h1"/> - -<xsl:template match="li"> - <xsl:variable name="progId" select="substring-after(div[@class='outerwrap']//a/@href, '?')"/> - <xsl:variable name="title" select="concat($programname, ' - ', normalize-space(.//h5))"/> - - <xsl:if test="$progId"> - <link> - <label><xsl:value-of select="normalize-space(.//h5)"/></label> - <stream>wvt:///www.sub.fi/video.xsl?srcurl=<xsl:value-of select="str:encode-uri($docurl, true())"/>&param=pid,<xsl:value-of select="$progId"/>&param=title,<xsl:value-of select="str:encode-uri($title, true())"/></stream> - <ref>wvt:///www.sub.fi/description.xsl?param=title,<xsl:value-of select="str:encode-uri($title, true())"/>&param=desc,<xsl:value-of select="str:encode-uri(.//span[@class='verho_content']/div, true())"/>&param=pubdate,<xsl:value-of select="str:encode-uri(p[@class='julkaistu'], true())"/>&param=pid,<xsl:value-of select="$progId"/></ref> - </link> - </xsl:if> -</xsl:template> - -<xsl:template match="/"> -<wvmenu> - <title><xsl:value-of select="$programname"/></title> - - <xsl:choose> - <xsl:when test="id('uusimmat')/li"> - <xsl:apply-templates select="id('uusimmat')/li"/> - </xsl:when> - <xsl:otherwise> - <textarea> - <label>Ei jaksoja</label> - </textarea> - </xsl:otherwise> - </xsl:choose> - -</wvmenu> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/www.sub.fi/service.xml b/templates/www.sub.fi/service.xml deleted file mode 100644 index 432855f..0000000 --- a/templates/www.sub.fi/service.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<service> - <title>Subtv</title> - <ref>wvt:///www.sub.fi/mainmenu.xsl?srcurl=http%3A//www.sub.fi/katsonetista/</ref> - <description>Sub is the third biggest commercial tv channel in Finland.</description> -</service> diff --git a/templates/www.sub.fi/video.xsl b/templates/www.sub.fi/video.xsl deleted file mode 100644 index 4448905..0000000 --- a/templates/www.sub.fi/video.xsl +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - -<xsl:param name="title"/> -<xsl:param name="pid"/> - -<xsl:template name="mediaurl"> -<xsl:param name="title"/> -<xsl:param name="pid"/> -<mediaurl> - <title><xsl:value-of select="$title"/></title> - <url><xsl:value-of select="concat('http://www.katsomo.fi/metafile.asx?p=', $pid, '&bw=800')"/></url> -</mediaurl> -</xsl:template> - -<xsl:template match="/"> - <xsl:call-template name="mediaurl"> - <xsl:with-param name="title" select="$title"/> - <xsl:with-param name="pid" select="$pid"/> - </xsl:call-template> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/www.sub.fi/videopage.xsl b/templates/www.sub.fi/videopage.xsl deleted file mode 100644 index 11cd0ef..0000000 --- a/templates/www.sub.fi/videopage.xsl +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - -<xsl:import href="video.xsl"/> - -<xsl:param name="docurl"/> - -<xsl:template match="/"> - <xsl:call-template name="mediaurl"> - <xsl:with-param name="title" select="/html/head/title"/> - <xsl:with-param name="pid" select="substring-after($docurl, '?')"/> - </xsl:call-template> -</xsl:template> - -</xsl:stylesheet> |