diff options
author | Antti Ajanki <antti.ajanki@iki.fi> | 2012-06-02 09:36:33 +0300 |
---|---|---|
committer | Antti Ajanki <antti.ajanki@iki.fi> | 2012-06-02 09:36:33 +0300 |
commit | 926338d8fb01c3ba0ae238dcdda987340f2f7c94 (patch) | |
tree | 0e30050a417456c6d10db44a13dd68f52bb2f376 | |
parent | c3c5ed0a8745ff885ac7029b2896bbd83f9b4c71 (diff) | |
download | vdr-plugin-webvideo-926338d8fb01c3ba0ae238dcdda987340f2f7c94.tar.gz vdr-plugin-webvideo-926338d8fb01c3ba0ae238dcdda987340f2f7c94.tar.bz2 |
Remove broken Vimeo module
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | src/unittest/testwebvi.py | 29 | ||||
-rw-r--r-- | templates/video.google.com/searchresults.xsl | 8 | ||||
-rw-r--r-- | templates/vimeo.com/channels.xsl | 33 | ||||
-rw-r--r-- | templates/vimeo.com/description.xsl | 60 | ||||
-rw-r--r-- | templates/vimeo.com/groups.xsl | 33 | ||||
-rw-r--r-- | templates/vimeo.com/mainmenu.xsl | 32 | ||||
-rw-r--r-- | templates/vimeo.com/navigation.xsl | 22 | ||||
-rw-r--r-- | templates/vimeo.com/search.xsl | 31 | ||||
-rw-r--r-- | templates/vimeo.com/searchresults.xsl | 49 | ||||
-rw-r--r-- | templates/vimeo.com/service.xml | 7 | ||||
-rw-r--r-- | templates/vimeo.com/video.xsl | 22 | ||||
-rw-r--r-- | templates/vimeo.com/videopage.xsl | 20 | ||||
-rw-r--r-- | templates/www.vimeo.com/videopage.xsl | 20 |
15 files changed, 1 insertions, 371 deletions
@@ -16,11 +16,10 @@ Supported video sites: * Metacafe * MTV3 Katsomo * ruutu.fi [2] -* Vimeo * YLE Areena [2] * YouTube -[1] Only videos hosted by Google, YouTube, Vimeo +[1] Only videos hosted by Google, YouTube, Metacafe [2] Requires rtmpdump-yle (http://users.tkk.fi/~aajanki/rtmpdump-yle/index.html). @@ -29,7 +28,6 @@ Known problems: * 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 sites quite easily. See doc/developers.txt for more information. @@ -15,6 +15,4 @@ when using external downloader process (YLE Areena) Fix support for mplayer plugin -Fix Vimeo search - Kill external downloader process when the player stops mid-stream diff --git a/src/unittest/testwebvi.py b/src/unittest/testwebvi.py index 8f9430d..9d0382d 100644 --- a/src/unittest/testwebvi.py +++ b/src/unittest/testwebvi.py @@ -217,35 +217,6 @@ class TestServiceModules(unittest.TestCase): self.assertNotEqual(resultref, None) self.downloadAndExtractLinks(resultref, 1, 'search result') - def testVimeo(self): - # Category page - ref = self.getServiceReference('../../templates/vimeo.com') - links = self.downloadAndExtractLinks(ref, 2, 'Vimeo main page') - - # The first "Channels" and the second is "Groups" - channelsref = links[0].ref - groupsref = links[1].ref - - # Channels page - links = self.downloadAndExtractLinks(channelsref, 2, 'channels') - - # Navigation page - links = self.downloadAndExtractLinks(links[0].ref, 2, 'channels navigation') - - # 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') - queries, params = self.extractQueryParams(videolink.stream) - self.assertTrue('srcurl' in queries, 'Required parameter missing in video link') - self.checkMediaUrl(videolink.stream) - - # User groups - links = self.downloadAndExtractLinks(groupsref, 2, 'channel list') - - # Navigation page - links = self.downloadAndExtractLinks(links[0].ref, 2, 'groups navigation') - def testYLEAreena(self): # Category page ref = self.getServiceReference('../../templates/areena.yle.fi') diff --git a/templates/video.google.com/searchresults.xsl b/templates/video.google.com/searchresults.xsl index 8bd2146..a65b8a6 100644 --- a/templates/video.google.com/searchresults.xsl +++ b/templates/video.google.com/searchresults.xsl @@ -46,14 +46,6 @@ </link> </xsl:when> - <xsl:when test="starts-with($url, 'http://vimeo.com/')"> - <link> - <label><xsl:value-of select="normalize-space(.)"/></label> - <stream>wvt:///vimeo.com/video.xsl?srcurl=http://www.vimeo.com/moogaloop/load/clip:<xsl:value-of select="substring-after($url, 'http://vimeo.com/')"/>&HTTP-header=user-agent,Wget/1.2%20%28linux-gnu%29</stream> - <ref>wvt:///vimeo.com/description.xsl?srcurl=http://vimeo.com/api/v2/video/<xsl:value-of select="substring-after($url, 'http://vimeo.com/')"/>.xml</ref> - </link> - </xsl:when> - </xsl:choose> </xsl:for-each> diff --git a/templates/vimeo.com/channels.xsl b/templates/vimeo.com/channels.xsl deleted file mode 100644 index c8b3e18..0000000 --- a/templates/vimeo.com/channels.xsl +++ /dev/null @@ -1,33 +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"> - -<xsl:template match="/"> -<wvmenu> - <title>Vimeo Channels</title> - - <xsl:for-each select="//div[@class='title']/a"> - <link> - <label><xsl:value-of select="."/></label> - <ref>wvt:///vimeo.com/navigation.xsl?srcurl=http://vimeo.com/api/v2/channel/<xsl:value-of select="str:split(@href, '/')[last()]"/>/videos.xml</ref> - </link> - </xsl:for-each> - - <xsl:for-each select="//div[@class='pagination']/ul/li[@class='arrow']/a"> - <link> - <xsl:if test="img/@alt = 'previous'"> - <label>Previous</label> - </xsl:if> - <xsl:if test="img/@alt = 'next'"> - <label>Next</label> - </xsl:if> - <ref>wvt:///vimeo.com/channels.xsl?srcurl=<xsl:value-of select="./@href"/></ref> - </link> - </xsl:for-each> - -</wvmenu> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/vimeo.com/description.xsl b/templates/vimeo.com/description.xsl deleted file mode 100644 index 01dc1bb..0000000 --- a/templates/vimeo.com/description.xsl +++ /dev/null @@ -1,60 +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"> - -<!-- Convert $seconds to hours:min:sec format --> -<xsl:template name="pretty-print-seconds"> - <xsl:param name="seconds"/> - - <xsl:variable name="sec" select="$seconds mod 60"/> - <xsl:variable name="min" select="floor($seconds div 60) mod 60"/> - <xsl:variable name="hour" select="floor($seconds div 3600)"/> - - <xsl:value-of select="concat($hour, ':', format-number($min, '00'), ':', format-number($sec, '00'))"/> -</xsl:template> - -<xsl:template match="/"> -<wvmenu> - <title><xsl:value-of select="/videos/video/title"/></title> - <textarea> - <label><xsl:value-of select="/videos/video/description"/></label> - </textarea> - - <textarea> - <label>Duration: <xsl:call-template name="pretty-print-seconds"> - <xsl:with-param name="seconds"> - <xsl:value-of select="/videos/video/duration"/> - </xsl:with-param> - </xsl:call-template> - </label> - </textarea> - - <textarea> - <label>Views: <xsl:value-of select="/videos/video/stats_number_of_plays"/></label> - </textarea> - - <textarea> - <label>Likes: <xsl:value-of select="/videos/video/stats_number_of_likes"/></label> - </textarea> - - <textarea> - <label>Published: <xsl:value-of select="/videos/video/upload_date"/></label> - </textarea> - - <link> - <label>More videos by <xsl:value-of select="/videos/video/user_name"/></label> - <ref>wvt:///vimeo.com/navigation.xsl?srcurl=http://vimeo.com/api/v2/<xsl:value-of select="str:split(/videos/video/user_url, '/')[last()]"/>/videos.xml</ref> - </link> - - <link> - <label>Download this video</label> - <stream>wvt:///vimeo.com/video.xsl?srcurl=http://www.vimeo.com/moogaloop/load/clip:<xsl:value-of select="/videos/video/id"/>&HTTP-header=user-agent,Wget/1.2%20%28linux-gnu%29</stream> - </link> - -</wvmenu> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/vimeo.com/groups.xsl b/templates/vimeo.com/groups.xsl deleted file mode 100644 index 8c955da..0000000 --- a/templates/vimeo.com/groups.xsl +++ /dev/null @@ -1,33 +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"> - -<xsl:template match="/"> -<wvmenu> - <title>Vimeo Groups</title> - - <xsl:for-each select="//div[@class='title']/a"> - <link> - <label><xsl:value-of select="."/></label> - <ref>wvt:///vimeo.com/navigation.xsl?srcurl=http://vimeo.com/api/v2/group/<xsl:value-of select="str:split(@href, '/')[last()]"/>/videos.xml</ref> - </link> - </xsl:for-each> - - <xsl:for-each select="//div[@class='pagination']/ul/li[@class='arrow']/a"> - <link> - <xsl:if test="img/@alt = 'previous'"> - <label>Previous</label> - </xsl:if> - <xsl:if test="img/@alt = 'next'"> - <label>Next</label> - </xsl:if> - <ref>wvt:///vimeo.com/groups.xsl?srcurl=<xsl:value-of select="./@href"/></ref> - </link> - </xsl:for-each> - -</wvmenu> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/vimeo.com/mainmenu.xsl b/templates/vimeo.com/mainmenu.xsl deleted file mode 100644 index bdd4d34..0000000 --- a/templates/vimeo.com/mainmenu.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"> - -<xsl:template match="/"> -<wvmenu> - <title>Vimeo</title> - -<!-- Disabled 08082011 --> -<!-- "The requested URL returned error" when retrieving the results --> -<!-- - <link> - <label>Search</label> - <ref>wvt:///vimeo.com/search.xsl?srcurl=http://vimeo.com/</ref> - </link> ---> - - <link> - <label>Channels</label> - <ref>wvt:///vimeo.com/channels.xsl?srcurl=http://vimeo.com/channels/all</ref> - </link> - - <link> - <label>Groups</label> - <ref>wvt:///vimeo.com/groups.xsl?srcurl=http://vimeo.com/groups/all</ref> - </link> - -</wvmenu> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/vimeo.com/navigation.xsl b/templates/vimeo.com/navigation.xsl deleted file mode 100644 index 9639686..0000000 --- a/templates/vimeo.com/navigation.xsl +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<xsl:stylesheet version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - -<xsl:template match="video"> - <link> - <label><xsl:value-of select="title"/></label> - <stream>wvt:///vimeo.com/video.xsl?srcurl=http://www.vimeo.com/moogaloop/load/clip:<xsl:value-of select="id"/>&HTTP-header=user-agent,Wget/1.2%20%28linux-gnu%29</stream> - <ref>wvt:///vimeo.com/description.xsl?srcurl=http://vimeo.com/api/v2/video/<xsl:value-of select="id"/>.xml</ref> - </link> -</xsl:template> - -<xsl:template match="/"> -<wvmenu> - <title>Vimeo videos</title> - - <xsl:apply-templates select="/videos/video"/> -</wvmenu> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/vimeo.com/search.xsl b/templates/vimeo.com/search.xsl deleted file mode 100644 index 386beaa..0000000 --- a/templates/vimeo.com/search.xsl +++ /dev/null @@ -1,31 +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>Vimeo Search</title> - - <textfield name="keywords"> - <label>Search terms</label> - </textfield> - - <itemlist name="orderby"> - <label>Show me</label> - <item value="">most relevant</item> - <item value="/sort:newest">newest</item> - <item value="/sort:plays">most played</item> - <item value="/sort:likes">most liked</item> - </itemlist> - - <button> - <label>Search</label> - <submission>wvt:///vimeo.com/searchresults.xsl?srcurl=<xsl:value-of select="concat(str:encode-uri('http://vimeo.com/search/videos/search:', true()), '{keywords}/', substring(id('xsrft')/@value, 0, 9), '{orderby}')"/>&HTTP-header=cookie,uid%3D0;searchtoken%3D<xsl:value-of select="substring(id('xsrft')/@value, 0, 9)"/>&param=searchtoken,<xsl:value-of select="substring(id('xsrft')/@value, 0, 9)"/></submission> - </button> -</wvmenu> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/vimeo.com/searchresults.xsl b/templates/vimeo.com/searchresults.xsl deleted file mode 100644 index 1cf8381..0000000 --- a/templates/vimeo.com/searchresults.xsl +++ /dev/null @@ -1,49 +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="searchtoken"/> - -<xsl:template match="/"> -<wvmenu> - <title>Search results</title> - - <xsl:for-each select="//div[@class='title']/a"> - <link> - <xsl:variable name="clipid"> - <xsl:choose> - <xsl:when test="contains(@href, '?')"> - <xsl:value-of select="str:split(substring-before(@href, '?'), '/')[last()]"/> - </xsl:when> - - <xsl:otherwise> - <xsl:value-of select="str:split(@href, '/')[last()]"/> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <label><xsl:value-of select="."/></label> - <stream>wvt:///vimeo.com/video.xsl?srcurl=http://www.vimeo.com/moogaloop/load/clip:<xsl:value-of select="$clipid"/>&HTTP-header=user-agent,Wget/1.2%20%28linux-gnu%29</stream> - <ref>wvt:///vimeo.com/description.xsl?srcurl=http://vimeo.com/api/v2/video/<xsl:value-of select="$clipid"/>.xml</ref> - </link> - </xsl:for-each> - - <xsl:for-each select="//div[@class='pagination']/ul/li[@class='arrow']/a"> - <link> - <xsl:if test="img/@alt = 'previous'"> - <label>Previous</label> - </xsl:if> - <xsl:if test="img/@alt = 'next'"> - <label>Next</label> - </xsl:if> - <ref>wvt:///vimeo.com/searchresults.xsl?srcurl=<xsl:value-of select="translate(./@href, ' ', '+')"/>&HTTP-header=cookie,uid%3D0;searchtoken%3D<xsl:value-of select="$searchtoken"/>&param=searchtoken,<xsl:value-of select="$searchtoken"/></ref> - </link> - </xsl:for-each> - -</wvmenu> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/vimeo.com/service.xml b/templates/vimeo.com/service.xml deleted file mode 100644 index 544ad97..0000000 --- a/templates/vimeo.com/service.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<service> - <title>Vimeo</title> - <ref>wvt:///vimeo.com/mainmenu.xsl</ref> - <description>Vimeo is a video-centric social networking site</description> -</service> diff --git a/templates/vimeo.com/video.xsl b/templates/vimeo.com/video.xsl deleted file mode 100644 index 7e15eb1..0000000 --- a/templates/vimeo.com/video.xsl +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<xsl:stylesheet version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - -<xsl:template name="mediaurl"> -<mediaurl> - <title><xsl:value-of select="/xml/video/caption"/></title> - - <url priority="50">http://www.vimeo.com/moogaloop/play/clip:<xsl:value-of select="/xml/video/nodeId"/>/<xsl:value-of select="/xml/request_signature"/>/<xsl:value-of select="/xml/request_signature_expires"/>/?q=sd</url> -</mediaurl> -</xsl:template> - -<xsl:template match="/"> - <xsl:call-template name="mediaurl"/> -</xsl:template> - -<xsl:template match="/" mode="included"> - <xsl:call-template name="mediaurl"/> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/vimeo.com/videopage.xsl b/templates/vimeo.com/videopage.xsl deleted file mode 100644 index 251f731..0000000 --- a/templates/vimeo.com/videopage.xsl +++ /dev/null @@ -1,20 +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:variable name="videoid"> - <xsl:value-of select="substring-after($docurl, 'http://vimeo.com/')"/> - </xsl:variable> - - <xsl:if test="$videoid"> - <xsl:apply-templates select="document(concat('http://www.vimeo.com/moogaloop/load/clip:', $videoid))" mode="included"/> - </xsl:if> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/www.vimeo.com/videopage.xsl b/templates/www.vimeo.com/videopage.xsl deleted file mode 100644 index 39cc3f3..0000000 --- a/templates/www.vimeo.com/videopage.xsl +++ /dev/null @@ -1,20 +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="../vimeo.com/video.xsl"/> - -<xsl:param name="docurl"/> - -<xsl:template match="/"> - <xsl:variable name="videoid"> - <xsl:value-of select="substring-after($docurl, 'http://www.vimeo.com/')"/> - </xsl:variable> - - <xsl:if test="$videoid"> - <xsl:apply-templates select="document(concat('http://www.vimeo.com/moogaloop/load/clip:', $videoid))" mode="included"/> - </xsl:if> -</xsl:template> - -</xsl:stylesheet> |