diff options
author | Antti Ajanki <antti.ajanki@iki.fi> | 2010-10-24 21:05:47 +0300 |
---|---|---|
committer | Antti Ajanki <antti.ajanki@iki.fi> | 2010-10-24 21:05:47 +0300 |
commit | 4770a7e7d1a06fcea280382c546ae38cf4fd084e (patch) | |
tree | 9fd5b235a907edf4c76ceaf769d0cdbe501399c6 | |
parent | 439024953d1abe71fd5adce26fac4f17c1aa9f96 (diff) | |
download | vdr-plugin-webvideo-4770a7e7d1a06fcea280382c546ae38cf4fd084e.tar.gz vdr-plugin-webvideo-4770a7e7d1a06fcea280382c546ae38cf4fd084e.tar.bz2 |
rename template directories and add videopage.xsl to each template
-rw-r--r-- | templates/areena.yle.fi/description.xsl (renamed from templates/yleareena/description.xsl) | 0 | ||||
-rw-r--r-- | templates/areena.yle.fi/livebroadcasts.xsl (renamed from templates/yleareena/livebroadcasts.xsl) | 4 | ||||
-rw-r--r-- | templates/areena.yle.fi/livestream.xsl (renamed from templates/yleareena/livestream.xsl) | 0 | ||||
-rw-r--r-- | templates/areena.yle.fi/mainmenu.xsl (renamed from templates/yleareena/mainmenu.xsl) | 8 | ||||
-rw-r--r-- | templates/areena.yle.fi/navigation.xsl (renamed from templates/yleareena/navigation.xsl) | 10 | ||||
-rw-r--r-- | templates/areena.yle.fi/programlist.xsl (renamed from templates/yleareena/programlist.xsl) | 2 | ||||
-rw-r--r-- | templates/areena.yle.fi/search.xsl (renamed from templates/yleareena/search.xsl) | 2 | ||||
-rw-r--r-- | templates/areena.yle.fi/service.xml (renamed from templates/yleareena/service.xml) | 2 | ||||
-rw-r--r-- | templates/areena.yle.fi/video.xsl (renamed from templates/yleareena/video.xsl) | 15 | ||||
-rw-r--r-- | templates/areena.yle.fi/videopage.xsl | 16 | ||||
-rw-r--r-- | templates/katsomo.fi/mainmenu.xsl (renamed from templates/katsomo/mainmenu.xsl) | 4 | ||||
-rw-r--r-- | templates/katsomo.fi/navigation.xsl (renamed from templates/katsomo/navigation.xsl) | 4 | ||||
-rw-r--r-- | templates/katsomo.fi/search.xsl (renamed from templates/katsomo/search.xsl) | 2 | ||||
-rw-r--r-- | templates/katsomo.fi/searchresults.xsl (renamed from templates/katsomo/searchresults.xsl) | 2 | ||||
-rw-r--r-- | templates/katsomo.fi/service.xml (renamed from templates/katsomo/service.xml) | 2 | ||||
-rw-r--r-- | templates/katsomo.fi/video.xsl (renamed from templates/katsomo/video.xsl) | 0 | ||||
-rw-r--r-- | templates/moontv.fi/description.xsl (renamed from templates/moontv/description.xsl) | 0 | ||||
-rw-r--r-- | templates/moontv.fi/mainmenu.xsl (renamed from templates/moontv/mainmenu.xsl) | 4 | ||||
-rw-r--r-- | templates/moontv.fi/navigation.xsl (renamed from templates/moontv/navigation.xsl) | 4 | ||||
-rw-r--r-- | templates/moontv.fi/programlist.xsl (renamed from templates/moontv/programlist.xsl) | 2 | ||||
-rw-r--r-- | templates/moontv.fi/rss.xsl (renamed from templates/moontv/rss.xsl) | 4 | ||||
-rw-r--r-- | templates/moontv.fi/service.xml (renamed from templates/moontv/service.xml) | 2 | ||||
-rw-r--r-- | templates/moontv.fi/videopage.xsl (renamed from templates/moontv/video.xsl) | 0 | ||||
-rw-r--r-- | templates/ruutufi/mainmenu.xsl | 34 | ||||
-rw-r--r-- | templates/ruutufi/search.xsl | 23 | ||||
-rw-r--r-- | templates/ruutufi/video2.xsl | 15 | ||||
-rw-r--r-- | templates/subtv/video.xsl | 19 | ||||
-rw-r--r-- | templates/svtplay.se/categories.xsl (renamed from templates/svtplay/categories.xsl) | 2 | ||||
-rw-r--r-- | templates/svtplay.se/description.xsl (renamed from templates/svtplay/description.xsl) | 0 | ||||
-rw-r--r-- | templates/svtplay.se/navigation.xsl (renamed from templates/svtplay/navigation.xsl) | 6 | ||||
-rw-r--r-- | templates/svtplay.se/programmenu.xsl (renamed from templates/svtplay/programmenu.xsl) | 8 | ||||
-rw-r--r-- | templates/svtplay.se/service.xml (renamed from templates/svtplay/service.xml) | 2 | ||||
-rw-r--r-- | templates/svtplay.se/videopage.xsl (renamed from templates/svtplay/video.xsl) | 0 | ||||
-rw-r--r-- | templates/video.google.com/description.xsl (renamed from templates/google/description.xsl) | 0 | ||||
-rw-r--r-- | templates/video.google.com/search.xsl (renamed from templates/google/search.xsl) | 2 | ||||
-rw-r--r-- | templates/video.google.com/searchresults.xsl (renamed from templates/google/searchresults.xsl) | 22 | ||||
-rw-r--r-- | templates/video.google.com/service.xml (renamed from templates/google/service.xml) | 2 | ||||
-rw-r--r-- | templates/video.google.com/videopage.xsl (renamed from templates/google/video.xsl) | 0 | ||||
-rw-r--r-- | templates/vimeo.com/channels.xsl (renamed from templates/vimeo/channels.xsl) | 4 | ||||
-rw-r--r-- | templates/vimeo.com/description.xsl (renamed from templates/vimeo/description.xsl) | 4 | ||||
-rw-r--r-- | templates/vimeo.com/groups.xsl (renamed from templates/vimeo/groups.xsl) | 4 | ||||
-rw-r--r-- | templates/vimeo.com/mainmenu.xsl (renamed from templates/vimeo/mainmenu.xsl) | 6 | ||||
-rw-r--r-- | templates/vimeo.com/navigation.xsl (renamed from templates/vimeo/navigation.xsl) | 4 | ||||
-rw-r--r-- | templates/vimeo.com/search.xsl (renamed from templates/vimeo/search.xsl) | 2 | ||||
-rw-r--r-- | templates/vimeo.com/searchresults.xsl (renamed from templates/vimeo/searchresults.xsl) | 6 | ||||
-rw-r--r-- | templates/vimeo.com/service.xml (renamed from templates/vimeo/service.xml) | 2 | ||||
-rw-r--r-- | templates/vimeo.com/video.xsl (renamed from templates/vimeo/video.xsl) | 2 | ||||
-rw-r--r-- | templates/vimeo.com/videopage.xsl | 20 | ||||
-rw-r--r-- | templates/www.metacafe.com/categories.xsl (renamed from templates/metacafe/categories.xsl) | 6 | ||||
-rw-r--r-- | templates/www.metacafe.com/channellist.xsl (renamed from templates/metacafe/channellist.xsl) | 2 | ||||
-rw-r--r-- | templates/www.metacafe.com/description.xsl (renamed from templates/metacafe/description.xsl) | 0 | ||||
-rw-r--r-- | templates/www.metacafe.com/navigation.xsl (renamed from templates/metacafe/navigation.xsl) | 6 | ||||
-rw-r--r-- | templates/www.metacafe.com/search.xsl (renamed from templates/metacafe/search.xsl) | 2 | ||||
-rw-r--r-- | templates/www.metacafe.com/service.xml (renamed from templates/metacafe/service.xml) | 2 | ||||
-rw-r--r-- | templates/www.metacafe.com/videopage.xsl (renamed from templates/metacafe/video.xsl) | 0 | ||||
-rw-r--r-- | templates/www.ruutu.fi/description.xsl (renamed from templates/ruutufi/description.xsl) | 2 | ||||
-rw-r--r-- | templates/www.ruutu.fi/mainmenu.xsl | 34 | ||||
-rw-r--r-- | templates/www.ruutu.fi/program.xsl (renamed from templates/ruutufi/program.xsl) | 10 | ||||
-rw-r--r-- | templates/www.ruutu.fi/search.xsl | 23 | ||||
-rw-r--r-- | templates/www.ruutu.fi/series.xsl (renamed from templates/ruutufi/series.xsl) | 2 | ||||
-rw-r--r-- | templates/www.ruutu.fi/service.xml (renamed from templates/ruutufi/service.xml) | 2 | ||||
-rw-r--r-- | templates/www.ruutu.fi/video.xsl (renamed from templates/ruutufi/video.xsl) | 6 | ||||
-rw-r--r-- | templates/www.ruutu.fi/videopage.xsl | 20 | ||||
-rw-r--r-- | templates/www.sub.fi/description.xsl (renamed from templates/subtv/description.xsl) | 2 | ||||
-rw-r--r-- | templates/www.sub.fi/mainmenu.xsl (renamed from templates/subtv/mainmenu.xsl) | 2 | ||||
-rw-r--r-- | templates/www.sub.fi/navigation.xsl (renamed from templates/subtv/navigation.xsl) | 4 | ||||
-rw-r--r-- | templates/www.sub.fi/service.xml (renamed from templates/subtv/service.xml) | 2 | ||||
-rw-r--r-- | templates/www.sub.fi/video.xsl | 24 | ||||
-rw-r--r-- | templates/www.sub.fi/videopage.xsl | 16 | ||||
-rw-r--r-- | templates/www.vimeo.com/videopage.xsl | 20 | ||||
-rw-r--r-- | templates/www.youtube.com/categories.xsl (renamed from templates/youtube/categories.xsl) | 4 | ||||
-rw-r--r-- | templates/www.youtube.com/description.xsl (renamed from templates/youtube/description.xsl) | 6 | ||||
-rw-r--r-- | templates/www.youtube.com/navigation.xsl (renamed from templates/youtube/navigation.xsl) | 10 | ||||
-rw-r--r-- | templates/www.youtube.com/search.xsl (renamed from templates/youtube/search.xsl) | 2 | ||||
-rw-r--r-- | templates/www.youtube.com/service.xml (renamed from templates/youtube/service.xml) | 2 | ||||
-rw-r--r-- | templates/www.youtube.com/video.xsl (renamed from templates/youtube/video.xsl) | 26 | ||||
-rw-r--r-- | templates/www.youtube.com/videopage.xsl | 19 |
77 files changed, 330 insertions, 204 deletions
diff --git a/templates/yleareena/description.xsl b/templates/areena.yle.fi/description.xsl index 2340cb2..2340cb2 100644 --- a/templates/yleareena/description.xsl +++ b/templates/areena.yle.fi/description.xsl diff --git a/templates/yleareena/livebroadcasts.xsl b/templates/areena.yle.fi/livebroadcasts.xsl index 865fcee..c29ad09 100644 --- a/templates/yleareena/livebroadcasts.xsl +++ b/templates/areena.yle.fi/livebroadcasts.xsl @@ -9,7 +9,7 @@ <xsl:template match="div[@class='ongoing']//div[@class='showlistitem-description']"> <link> <label><xsl:value-of select="a"/></label> - <stream>wvt:///yleareena/livestream.xsl?param=stream,<xsl:value-of select='substring-before(substring-after(a/@onclick, "stream', '"), "'")'/></stream> + <stream>wvt:///areena.yle.fi/livestream.xsl?param=stream,<xsl:value-of select='substring-before(substring-after(a/@onclick, "stream', '"), "'")'/></stream> </link> </xsl:template> @@ -17,7 +17,7 @@ <xsl:template match="div[contains(@class, 'live-container')]"> <link> <label><xsl:value-of select="h2/span/a"/></label> - <stream>wvt:///yleareena/livestream.xsl?param=stream,<xsl:value-of select='substring-before(substring-after(h2/span/a/@onclick, "stream', '"), "'")'/></stream> + <stream>wvt:///areena.yle.fi/livestream.xsl?param=stream,<xsl:value-of select='substring-before(substring-after(h2/span/a/@onclick, "stream', '"), "'")'/></stream> </link> </xsl:template> diff --git a/templates/yleareena/livestream.xsl b/templates/areena.yle.fi/livestream.xsl index b6d7ee2..b6d7ee2 100644 --- a/templates/yleareena/livestream.xsl +++ b/templates/areena.yle.fi/livestream.xsl diff --git a/templates/yleareena/mainmenu.xsl b/templates/areena.yle.fi/mainmenu.xsl index d17ede6..e16ae0b 100644 --- a/templates/yleareena/mainmenu.xsl +++ b/templates/areena.yle.fi/mainmenu.xsl @@ -10,23 +10,23 @@ <link> <label>Haku</label> - <ref>wvt:///yleareena/search.xsl?srcurl=http://areena.yle.fi/haku</ref> + <ref>wvt:///areena.yle.fi/search.xsl?srcurl=http://areena.yle.fi/haku</ref> </link> <link> <label>Suorat lähetykset</label> - <ref>wvt:///yleareena/livebroadcasts.xsl?srcurl=http://areena.yle.fi/live</ref> + <ref>wvt:///areena.yle.fi/livebroadcasts.xsl?srcurl=http://areena.yle.fi/live</ref> </link> <link> <label>Kaikki ohjelmat</label> - <ref>wvt:///yleareena/programlist.xsl?srcurl=http://areena.yle.fi/ohjelmat</ref> + <ref>wvt:///areena.yle.fi/programlist.xsl?srcurl=http://areena.yle.fi/ohjelmat</ref> </link> <xsl:for-each select="//div[h4='Sisältö aihealueittain']/ul/li/a"> <link> <label><xsl:value-of select="."/></label> - <ref><xsl:value-of select="concat('wvt:///yleareena/navigation.xsl?srcurl=', str:encode-uri(concat(./@href, '/feed/rss'), true()))"/></ref> + <ref><xsl:value-of select="concat('wvt:///areena.yle.fi/navigation.xsl?srcurl=', str:encode-uri(concat(./@href, '/feed/rss'), true()))"/></ref> </link> </xsl:for-each> </wvmenu> diff --git a/templates/yleareena/navigation.xsl b/templates/areena.yle.fi/navigation.xsl index bbf0ad7..7e3c4a3 100644 --- a/templates/yleareena/navigation.xsl +++ b/templates/areena.yle.fi/navigation.xsl @@ -31,13 +31,13 @@ <link> <label>Edellinen</label> - <ref>wvt:///yleareena/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri($prevurl, true())"/></ref> + <ref>wvt:///areena.yle.fi/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri($prevurl, true())"/></ref> </link> <xsl:if test="count(/rss/channel/item) >= 20"> <link> <label>Seuraava</label> - <ref>wvt:///yleareena/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri($nexturl, true())"/></ref> + <ref>wvt:///areena.yle.fi/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri($nexturl, true())"/></ref> </link> </xsl:if> </xsl:when> @@ -63,7 +63,7 @@ <link> <label>Seuraava</label> - <ref>wvt:///yleareena/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri($nexturl, true())"/></ref> + <ref>wvt:///areena.yle.fi/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri($nexturl, true())"/></ref> </link> </xsl:if> @@ -77,8 +77,8 @@ <xsl:template match="/rss/channel/item"> <link> <label><xsl:value-of select="title"/></label> - <ref>wvt:///yleareena/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(link, true())"/></ref> - <stream>wvt:///yleareena/video.xsl?srcurl=<xsl:value-of select="str:encode-uri(link, true())"/>&param=title,<xsl:value-of select="str:encode-uri(concat(title, '-', str:split(pubDate, ' ')[2], '-', str:split(pubDate, ' ')[3], '-', str:split(pubDate, ' ')[4]), true())"/></stream> + <ref>wvt:///areena.yle.fi/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(link, true())"/></ref> + <stream>wvt:///areena.yle.fi/video.xsl?srcurl=<xsl:value-of select="str:encode-uri(link, true())"/>&param=title,<xsl:value-of select="str:encode-uri(concat(title, '-', str:split(pubDate, ' ')[2], '-', str:split(pubDate, ' ')[3], '-', str:split(pubDate, ' ')[4]), true())"/></stream> </link> </xsl:template> diff --git a/templates/yleareena/programlist.xsl b/templates/areena.yle.fi/programlist.xsl index 0a4ece4..58b3243 100644 --- a/templates/yleareena/programlist.xsl +++ b/templates/areena.yle.fi/programlist.xsl @@ -7,7 +7,7 @@ <xsl:template match="tr"> <link> <label><xsl:value-of select="td[1]/a"/></label> - <ref>wvt:///yleareena/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(concat(td[1]/a/@href, '/feed/rss'), true())"/>&param=title,<xsl:value-of select="str:encode-uri(td[1]/a, true())"/></ref> + <ref>wvt:///areena.yle.fi/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(concat(td[1]/a/@href, '/feed/rss'), true())"/>&param=title,<xsl:value-of select="str:encode-uri(td[1]/a, true())"/></ref> </link> </xsl:template> diff --git a/templates/yleareena/search.xsl b/templates/areena.yle.fi/search.xsl index fa487f4..7508615 100644 --- a/templates/yleareena/search.xsl +++ b/templates/areena.yle.fi/search.xsl @@ -37,7 +37,7 @@ <button> <label>Hae</label> - <submission>wvt:///yleareena/navigation.xsl?srcurl=http%3A//areena.yle.fi/haku/{category}/uusimmat/hakusana/{keyword}/kanava/{channel}/media/{mediatype}/julkaistu/{date}/kieli/{language}/naytetaan_ulkomailla/{naytetaan_ulkomailla}/feed/rss</submission> + <submission>wvt:///areena.yle.fi/navigation.xsl?srcurl=http%3A//areena.yle.fi/haku/{category}/uusimmat/hakusana/{keyword}/kanava/{channel}/media/{mediatype}/julkaistu/{date}/kieli/{language}/naytetaan_ulkomailla/{naytetaan_ulkomailla}/feed/rss</submission> </button> </wvmenu> </xsl:template> diff --git a/templates/yleareena/service.xml b/templates/areena.yle.fi/service.xml index 0d7aa03..ff7a193 100644 --- a/templates/yleareena/service.xml +++ b/templates/areena.yle.fi/service.xml @@ -2,6 +2,6 @@ <service> <title>YLE Areena</title> - <ref>wvt:///yleareena/mainmenu.xsl?srcurl=http%3A//areena.yle.fi/</ref> + <ref>wvt:///areena.yle.fi/mainmenu.xsl?srcurl=http%3A//areena.yle.fi/</ref> <description>Video service by YLE, the Finland's national public service broadcasting company</description> </service> diff --git a/templates/yleareena/video.xsl b/templates/areena.yle.fi/video.xsl index f0c2d6a..efe3441 100644 --- a/templates/yleareena/video.xsl +++ b/templates/areena.yle.fi/video.xsl @@ -7,12 +7,21 @@ <xsl:param name="title"/> <xsl:param name="docurl"/> -<xsl:template match="/"> +<xsl:template name="mediaurl"> + <xsl:param name="streamtitle"/> + <mediaurl> - <title><xsl:value-of select="$title"/></title> + <title> + <xsl:value-of select="$streamtitle"/> + </title> <url>wvt:///bin/yle-dl?contenttype=video/x-flv&arg=<xsl:value-of select="str:encode-uri($docurl, true())"/></url> -</mediaurl> + </mediaurl> +</xsl:template> +<xsl:template match="/"> + <xsl:call-template name="mediaurl"> + <xsl:with-param name="streamtitle" select="$title"/> + </xsl:call-template> </xsl:template> </xsl:stylesheet> diff --git a/templates/areena.yle.fi/videopage.xsl b/templates/areena.yle.fi/videopage.xsl new file mode 100644 index 0000000..aac373a --- /dev/null +++ b/templates/areena.yle.fi/videopage.xsl @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<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="streamtitle" select="normalize-space(concat(//div[@class='basic']/h1, ' - ', //li[contains(text(), 'Julkaistu:')]/span))"/> + </xsl:call-template> +</xsl:template> + +</xsl:stylesheet> diff --git a/templates/katsomo/mainmenu.xsl b/templates/katsomo.fi/mainmenu.xsl index b7ba1cf..2bf3d3a 100644 --- a/templates/katsomo/mainmenu.xsl +++ b/templates/katsomo.fi/mainmenu.xsl @@ -11,13 +11,13 @@ <link> <label>Haku</label> - <ref>wvt:///katsomo/search.xsl</ref> + <ref>wvt:///katsomo.fi/search.xsl</ref> </link> <xsl:for-each select="id('mainMenu')/li[a/@href != '/']"> <link> <label><xsl:value-of select="a"/></label> - <ref>wvt:///katsomo/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref> + <ref>wvt:///katsomo.fi/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref> </link> </xsl:for-each> </wvmenu> diff --git a/templates/katsomo/navigation.xsl b/templates/katsomo.fi/navigation.xsl index e43753d..15aa98f 100644 --- a/templates/katsomo/navigation.xsl +++ b/templates/katsomo.fi/navigation.xsl @@ -10,7 +10,7 @@ <xsl:template match="ol[@class='categoryList']/li"> <link> <label><xsl:value-of select="normalize-space(a)"/></label> - <ref>wvt:///katsomo/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref> + <ref>wvt:///katsomo.fi/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref> </link> </xsl:template> @@ -21,7 +21,7 @@ <link> <label><xsl:value-of select="$title"/></label> - <stream>wvt:///katsomo/video.xsl?srcurl=<xsl:value-of select="str:encode-uri(concat('http://katsomo.fi/showContent.do?treeId=', $treeId, '&progId=', $progId, '&adData=%7B%22ad%22%3A%20%7B%7D%7D&ajax=true&serial=1'), true())"/>&param=title,<xsl:value-of select="str:encode-uri($title, true())"/>&HTTP-header=cookie,webtv.bandwidth%3D1000%3BautoFullScreen%3Dfalse%3Bwebtv.playerPlatform%3D0</stream> + <stream>wvt:///katsomo.fi/video.xsl?srcurl=<xsl:value-of select="str:encode-uri(concat('http://katsomo.fi/showContent.do?treeId=', $treeId, '&progId=', $progId, '&adData=%7B%22ad%22%3A%20%7B%7D%7D&ajax=true&serial=1'), true())"/>&param=title,<xsl:value-of select="str:encode-uri($title, true())"/>&HTTP-header=cookie,webtv.bandwidth%3D1000%3BautoFullScreen%3Dfalse%3Bwebtv.playerPlatform%3D0</stream> </link> </xsl:template> diff --git a/templates/katsomo/search.xsl b/templates/katsomo.fi/search.xsl index c963b71..aaecfd6 100644 --- a/templates/katsomo/search.xsl +++ b/templates/katsomo.fi/search.xsl @@ -15,7 +15,7 @@ <button> <label>Hae</label> - <submission>wvt:///katsomo/searchresults.xsl?srcurl=<xsl:value-of select="str:encode-uri('http://katsomo.fi/search.do?keywords={query}&treeId=9992', true())"/></submission> + <submission>wvt:///katsomo.fi/searchresults.xsl?srcurl=<xsl:value-of select="str:encode-uri('http://katsomo.fi/search.do?keywords={query}&treeId=9992', true())"/></submission> </button> </wvmenu> </xsl:template> diff --git a/templates/katsomo/searchresults.xsl b/templates/katsomo.fi/searchresults.xsl index 2747afc..3b0ab8d 100644 --- a/templates/katsomo/searchresults.xsl +++ b/templates/katsomo.fi/searchresults.xsl @@ -11,7 +11,7 @@ <link> <label><xsl:value-of select="$title"/></label> - <stream>wvt:///katsomo/video.xsl?srcurl=<xsl:value-of select="str:encode-uri(concat('http://katsomo.fi/showContent.do?progId=', $progId, '&adData=%7B%22ad%22%3A%20%7B%7D%7D&ajax=true&serial=1'), true())"/>&param=title,<xsl:value-of select="str:encode-uri($title, true())"/>&HTTP-header=cookie,webtv.bandwidth%3D1000%3BautoFullScreen%3Dfalse%3Bwebtv.playerPlatform%3D0</stream> + <stream>wvt:///katsomo.fi/video.xsl?srcurl=<xsl:value-of select="str:encode-uri(concat('http://katsomo.fi/showContent.do?progId=', $progId, '&adData=%7B%22ad%22%3A%20%7B%7D%7D&ajax=true&serial=1'), true())"/>&param=title,<xsl:value-of select="str:encode-uri($title, true())"/>&HTTP-header=cookie,webtv.bandwidth%3D1000%3BautoFullScreen%3Dfalse%3Bwebtv.playerPlatform%3D0</stream> </link> </xsl:template> diff --git a/templates/katsomo/service.xml b/templates/katsomo.fi/service.xml index b1bd0bc..b8f1763 100644 --- a/templates/katsomo/service.xml +++ b/templates/katsomo.fi/service.xml @@ -2,6 +2,6 @@ <service> <title>MTV3 Katsomo</title> - <ref>wvt:///katsomo/mainmenu.xsl?srcurl=http%3A//katsomo.fi/</ref> + <ref>wvt:///katsomo.fi/mainmenu.xsl?srcurl=http%3A//katsomo.fi/</ref> <description>Net TV service of the Finnish broadcasting company MTV3</description> </service> diff --git a/templates/katsomo/video.xsl b/templates/katsomo.fi/video.xsl index 9d20c49..9d20c49 100644 --- a/templates/katsomo/video.xsl +++ b/templates/katsomo.fi/video.xsl diff --git a/templates/moontv/description.xsl b/templates/moontv.fi/description.xsl index 6665f7f..6665f7f 100644 --- a/templates/moontv/description.xsl +++ b/templates/moontv.fi/description.xsl diff --git a/templates/moontv/mainmenu.xsl b/templates/moontv.fi/mainmenu.xsl index fea995b..d0fc6d3 100644 --- a/templates/moontv/mainmenu.xsl +++ b/templates/moontv.fi/mainmenu.xsl @@ -10,11 +10,11 @@ <link> <label>MoonTV ohjelmat</label> - <ref>wvt:///moontv/programlist.xsl?srcurl=http://moontv.fi/ohjelmat</ref> + <ref>wvt:///moontv.fi/programlist.xsl?srcurl=http://moontv.fi/ohjelmat</ref> </link> <link> <label>MoonTV uusimmat videot</label> - <ref>wvt:///moontv/rss.xsl?srcurl=http://feeds.feedburner.com/Moontv?format=rss</ref> + <ref>wvt:///moontv.fi/rss.xsl?srcurl=http://feeds.feedburner.com/Moontv?format=rss</ref> </link> </wvmenu> diff --git a/templates/moontv/navigation.xsl b/templates/moontv.fi/navigation.xsl index 4ec54a7..2230251 100644 --- a/templates/moontv/navigation.xsl +++ b/templates/moontv.fi/navigation.xsl @@ -10,8 +10,8 @@ <xsl:for-each select="//div[@class='entry']"> <link> <label><xsl:value-of select="h3"/></label> - <ref>wvt:///moontv/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(h3/a/@href, true())"/></ref> - <stream>wvt:///moontv/video.xsl?srcurl=<xsl:value-of select="str:encode-uri(h3/a/@href, true())"/></stream> + <ref>wvt:///moontv.fi/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(h3/a/@href, true())"/></ref> + <stream>wvt:///moontv.fi/videopage.xsl?srcurl=<xsl:value-of select="str:encode-uri(h3/a/@href, true())"/></stream> </link> </xsl:for-each> </wvmenu> diff --git a/templates/moontv/programlist.xsl b/templates/moontv.fi/programlist.xsl index cbea52a..33dc0ef 100644 --- a/templates/moontv/programlist.xsl +++ b/templates/moontv.fi/programlist.xsl @@ -11,7 +11,7 @@ <xsl:for-each select="//ul[@id='ohjelmat-list']/li/h5/a"> <link> <label><xsl:value-of select="."/></label> - <ref>wvt:///moontv/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(concat('http://moontv.fi',@href), true())"/></ref> + <ref>wvt:///moontv.fi/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(concat('http://moontv.fi',@href), true())"/></ref> </link> </xsl:for-each> </wvmenu> diff --git a/templates/moontv/rss.xsl b/templates/moontv.fi/rss.xsl index bb42d7a..c89c8c9 100644 --- a/templates/moontv/rss.xsl +++ b/templates/moontv.fi/rss.xsl @@ -9,9 +9,9 @@ <xsl:template match="/rss/channel/item"> <link> <label><xsl:value-of select="concat(category, ': ',title)"/></label> - <ref>wvt:///moontv/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(link, true())"/></ref> + <ref>wvt:///moontv.fi/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(link, true())"/></ref> <!-- MoonTV rss-linkit --> - <stream>wvt:///moontv/video.xsl?srcurl=<xsl:value-of select="link"/></stream> + <stream>wvt:///moontv.fi/videopage.xsl?srcurl=<xsl:value-of select="link"/></stream> </link> </xsl:template> diff --git a/templates/moontv/service.xml b/templates/moontv.fi/service.xml index aa1a5bd..386e410 100644 --- a/templates/moontv/service.xml +++ b/templates/moontv.fi/service.xml @@ -2,6 +2,6 @@ <service> <title>MoonTV</title> - <ref>wvt:///moontv/mainmenu.xsl?srcurl=http%3A//moontv.fi/ohjelmat</ref> + <ref>wvt:///moontv.fi/mainmenu.xsl?srcurl=http%3A//moontv.fi/ohjelmat</ref> <description>Video service by MoonTV, a Finnish online video channel</description> </service> diff --git a/templates/moontv/video.xsl b/templates/moontv.fi/videopage.xsl index 9fa6108..9fa6108 100644 --- a/templates/moontv/video.xsl +++ b/templates/moontv.fi/videopage.xsl diff --git a/templates/ruutufi/mainmenu.xsl b/templates/ruutufi/mainmenu.xsl deleted file mode 100644 index e241924..0000000 --- a/templates/ruutufi/mainmenu.xsl +++ /dev/null @@ -1,34 +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>Ruutu.fi</title> - -<!-- - <link> - <label>Haku</label> - <ref>wvt:///ruutufi/search.xsl</ref> - </link> ---> - - <link> - <label>Listaa sarjat</label> - <ref>wvt:///ruutufi/series.xsl?srcurl=http://www.ruutu.fi/ajax/media_get_netti_tv_series_list/all/false&postprocess=json2xml</ref> - </link> - - <link> - <label>Uusimmat</label> - <ref>wvt:///ruutufi/program.xsl?srcurl=http://www.ruutu.fi/ajax/media_get_nettitv_media/all/video_episode/__/latestdesc/0/25/true/__&postprocess=json2xml</ref> - </link> - - <link> - <label>Katsotuimmat</label> - <ref>wvt:///ruutufi/program.xsl?srcurl=http://www.ruutu.fi/ajax/media_get_nettitv_media/all/video_episode/__/most_watched/0/25/true/__&postprocess=json2xml</ref> - </link> -</wvmenu> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/ruutufi/search.xsl b/templates/ruutufi/search.xsl deleted file mode 100644 index 07f2700..0000000 --- a/templates/ruutufi/search.xsl +++ /dev/null @@ -1,23 +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>Haku</title> - - <textfield name="query"> - <label>Hakusana</label> - </textfield> - - <button> - <label>Hae</label> - <submission>wvt:///ruutufi/program.xsl?srcurl=<xsl:value-of select="str:encode-uri('http://www.ruutu.fi/search/search_new.php?params=%7B%22search%22%3A%22{query}%22%2C%22groups%22%3A%7B%22video%22%3A%7B%22types%22%3A%5B%22video_clip%22%5D%7D%2C%22video_episode%22%3A%7B%22types%22%3A%5B%22video_episode%22%5D%7D%2C%22audio%22%3A%7B%22types%22%3A%5B%22audio%22%5D%7D%7D%7D', true())"/>&postprocess=json2xml</submission> - </button> -</wvmenu> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/ruutufi/video2.xsl b/templates/ruutufi/video2.xsl deleted file mode 100644 index 39bef06..0000000 --- a/templates/ruutufi/video2.xsl +++ /dev/null @@ -1,15 +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="/"> -<mediaurl> - <title><xsl:value-of select="concat(id('ruutuVideoInfo')/p[@class='name'], ' ', id('ruutuVideoInfo')/p[@class='timeStamp'])"/></title> - - <url priority="50">wvt:///bin/ruutu-dl?contenttype=video/x-flv&arg=<xsl:value-of select='substring-before(substring-after(//script[contains(., "vplayer1")], "providerURL', '"), "'")'/>&arg=<xsl:value-of select="str:encode-uri($docurl, true())"/></url> -</mediaurl> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/subtv/video.xsl b/templates/subtv/video.xsl deleted file mode 100644 index 32e5b1e..0000000 --- a/templates/subtv/video.xsl +++ /dev/null @@ -1,19 +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="pid"/> - -<xsl:template match="/"> -<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:stylesheet> diff --git a/templates/svtplay/categories.xsl b/templates/svtplay.se/categories.xsl index bd64abd..751a9e5 100644 --- a/templates/svtplay/categories.xsl +++ b/templates/svtplay.se/categories.xsl @@ -10,7 +10,7 @@ <xsl:for-each select="//div[@id='categorylist']//ul/li//a"> <link> <label><xsl:value-of select="span[@class='category-header']"/></label> - <ref>wvt:///svtplay/navigation.xsl?srcurl=<xsl:value-of select="@href"/></ref> + <ref>wvt:///svtplay.se/navigation.xsl?srcurl=<xsl:value-of select="@href"/></ref> </link> </xsl:for-each> </wvmenu> diff --git a/templates/svtplay/description.xsl b/templates/svtplay.se/description.xsl index f3c3ae6..f3c3ae6 100644 --- a/templates/svtplay/description.xsl +++ b/templates/svtplay.se/description.xsl diff --git a/templates/svtplay/navigation.xsl b/templates/svtplay.se/navigation.xsl index 7071dfe..c3e43ba 100644 --- a/templates/svtplay/navigation.xsl +++ b/templates/svtplay.se/navigation.xsl @@ -22,7 +22,7 @@ <xsl:template match="div[@class='content']//ul/li/a[1]"> <link> <label><xsl:value-of select="normalize-space(span)"/></label> - <ref>wvt:///svtplay/programmenu.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> + <ref>wvt:///svtplay.se/programmenu.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> </link> </xsl:template> @@ -31,14 +31,14 @@ <xsl:if test="@class='prev '"> <link> <label><xsl:value-of select="a/img/@alt"/></label> - <ref>wvt:///svtplay/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref> + <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/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref> + <ref>wvt:///svtplay.se/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref> </link> </xsl:if> </xsl:template> diff --git a/templates/svtplay/programmenu.xsl b/templates/svtplay.se/programmenu.xsl index 4bd120c..baf88c4 100644 --- a/templates/svtplay/programmenu.xsl +++ b/templates/svtplay.se/programmenu.xsl @@ -14,8 +14,8 @@ <xsl:template match="div[@class='content']//ul/li/a"> <link> <label><xsl:value-of select="normalize-space(span)"/></label> - <ref>wvt:///svtplay/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> - <stream>wvt:///svtplay/video.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> + <stream>wvt:///svtplay.se/videopage.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></stream> </link> </xsl:template> @@ -24,14 +24,14 @@ <xsl:if test="@class='prev '"> <link> <label><xsl:value-of select="a/img/@alt"/></label> - <ref>wvt:///svtplay/programmenu.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref> + <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/programmenu.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref> + <ref>wvt:///svtplay.se/programmenu.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/></ref> </link> </xsl:if> </xsl:template> diff --git a/templates/svtplay/service.xml b/templates/svtplay.se/service.xml index 86a36f6..92d2725 100644 --- a/templates/svtplay/service.xml +++ b/templates/svtplay.se/service.xml @@ -2,6 +2,6 @@ <service> <title>SVT Play</title> - <ref>wvt:///svtplay/categories.xsl?srcurl=http://svtplay.se/kategorier</ref> + <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/video.xsl b/templates/svtplay.se/videopage.xsl index af6aeb9..af6aeb9 100644 --- a/templates/svtplay/video.xsl +++ b/templates/svtplay.se/videopage.xsl diff --git a/templates/google/description.xsl b/templates/video.google.com/description.xsl index b7cab19..b7cab19 100644 --- a/templates/google/description.xsl +++ b/templates/video.google.com/description.xsl diff --git a/templates/google/search.xsl b/templates/video.google.com/search.xsl index 6f1e343..07dbda6 100644 --- a/templates/google/search.xsl +++ b/templates/video.google.com/search.xsl @@ -28,7 +28,7 @@ <button> <label>Search</label> - <submission>wvt:///google/searchresults.xsl?srcurl=<xsl:value-of select="str:encode-uri('http://www.google.com/search?q={q}&tbs=vid:1{dur}{so}', true())"/>&HTTP-header=User-Agent,Mozilla/5.0</submission> + <submission>wvt:///video.google.com/searchresults.xsl?srcurl=<xsl:value-of select="str:encode-uri('http://www.google.com/search?q={q}&tbs=vid:1{dur}{so}', true())"/>&HTTP-header=User-Agent,Mozilla/5.0</submission> </button> </wvmenu> </xsl:template> diff --git a/templates/google/searchresults.xsl b/templates/video.google.com/searchresults.xsl index 2eb5e77..5069825 100644 --- a/templates/google/searchresults.xsl +++ b/templates/video.google.com/searchresults.xsl @@ -23,40 +23,40 @@ <xsl:when test="starts-with(@href, 'http://www.youtube.com/')"> <link> <label><xsl:value-of select="normalize-space(.)" /></label> - <stream>wvt:///youtube/video.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></stream> - <ref>wvt:///youtube/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(concat('http://gdata.youtube.com/feeds/api/videos/', substring-after(@href, 'v='), '?v=2'), true())"/></ref> + <stream>wvt:///www.youtube.com/videopage.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></stream> + <ref>wvt:///www.youtube.com/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(concat('http://gdata.youtube.com/feeds/api/videos/', substring-after(@href, 'v='), '?v=2'), true())"/></ref> </link> </xsl:when> <xsl:when test="starts-with(@href, 'http://video.google.com/')"> <link> <label><xsl:value-of select="normalize-space(.)"/></label> - <stream>wvt:///google/video.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></stream> - <ref>wvt:///google/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> + <stream>wvt:///video.google.com/videopage.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></stream> + <ref>wvt:///video.google.com/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> </link> </xsl:when> <xsl:when test="starts-with(@href, 'http://www.metacafe.com/')"> <link> <label><xsl:value-of select="normalize-space(.)"/></label> - <stream>wvt:///metacafe/video.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></stream> - <ref>wvt:///metacafe/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> + <stream>wvt:///www.metacafe.com/videopage.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></stream> + <ref>wvt:///www.metacafe.com/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> </link> </xsl:when> <xsl:when test="starts-with(@href, 'http://vimeo.com/')"> <link> <label><xsl:value-of select="normalize-space(.)"/></label> - <stream>wvt:///vimeo/video.xsl?srcurl=http://www.vimeo.com/moogaloop/load/clip:<xsl:value-of select="substring-after(@href, 'http://vimeo.com/')"/></stream> - <ref>wvt:///vimeo/description.xsl?srcurl=http://vimeo.com/api/v2/video/<xsl:value-of select="substring-after(@href, 'http://vimeo.com/')"/>.xml</ref> + <stream>wvt:///www.vimeo.com/video.xsl?srcurl=http://www.vimeo.com/moogaloop/load/clip:<xsl:value-of select="substring-after(@href, 'http://vimeo.com/')"/></stream> + <ref>wvt:///www.vimeo.com/description.xsl?srcurl=http://vimeo.com/api/v2/video/<xsl:value-of select="substring-after(@href, 'http://vimeo.com/')"/>.xml</ref> </link> </xsl:when> <xsl:when test="starts-with(@href, 'http://svtplay.se/')"> <link> <label><xsl:value-of select="normalize-space(.)"/></label> - <stream>wvt:///svtplay/video.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></stream> - <ref>wvt:///svtplay/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> + <ref>wvt:///svtplay.se/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> </link> </xsl:when> @@ -66,7 +66,7 @@ <xsl:for-each select="id('nav')//td[@class='b']/a"> <link> <label><xsl:value-of select="span[2]/text()"/></label> - <ref>wvt:///google/searchresults.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> + <ref>wvt:///video.google.com/searchresults.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> </link> </xsl:for-each> </xsl:otherwise> diff --git a/templates/google/service.xml b/templates/video.google.com/service.xml index 3e02e93..4e41372 100644 --- a/templates/google/service.xml +++ b/templates/video.google.com/service.xml @@ -2,6 +2,6 @@ <service> <title>Google Video</title> - <ref>wvt:///google/search.xsl</ref> + <ref>wvt:///video.google.com/search.xsl</ref> <description>Google video search</description> </service> diff --git a/templates/google/video.xsl b/templates/video.google.com/videopage.xsl index 52d6d98..52d6d98 100644 --- a/templates/google/video.xsl +++ b/templates/video.google.com/videopage.xsl diff --git a/templates/vimeo/channels.xsl b/templates/vimeo.com/channels.xsl index ae3c0d8..c8b3e18 100644 --- a/templates/vimeo/channels.xsl +++ b/templates/vimeo.com/channels.xsl @@ -11,7 +11,7 @@ <xsl:for-each select="//div[@class='title']/a"> <link> <label><xsl:value-of select="."/></label> - <ref>wvt:///vimeo/navigation.xsl?srcurl=http://vimeo.com/api/v2/channel/<xsl:value-of select="str:split(@href, '/')[last()]"/>/videos.xml</ref> + <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> @@ -23,7 +23,7 @@ <xsl:if test="img/@alt = 'next'"> <label>Next</label> </xsl:if> - <ref>wvt:///vimeo/channels.xsl?srcurl=<xsl:value-of select="./@href"/></ref> + <ref>wvt:///vimeo.com/channels.xsl?srcurl=<xsl:value-of select="./@href"/></ref> </link> </xsl:for-each> diff --git a/templates/vimeo/description.xsl b/templates/vimeo.com/description.xsl index a8797cd..907d6ad 100644 --- a/templates/vimeo/description.xsl +++ b/templates/vimeo.com/description.xsl @@ -45,12 +45,12 @@ <link> <label>More videos by <xsl:value-of select="/videos/video/user_name"/></label> - <ref>wvt:///vimeo/navigation.xsl?srcurl=http://vimeo.com/api/v2/<xsl:value-of select="str:split(/videos/video/user_url, '/')[last()]"/>/videos.xml</ref> + <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/video.xsl?srcurl=http://www.vimeo.com/moogaloop/load/clip:<xsl:value-of select="/videos/video/id"/></stream> + <stream>wvt:///vimeo.com/video.xsl?srcurl=http://www.vimeo.com/moogaloop/load/clip:<xsl:value-of select="/videos/video/id"/></stream> </link> </wvmenu> diff --git a/templates/vimeo/groups.xsl b/templates/vimeo.com/groups.xsl index 2379058..8c955da 100644 --- a/templates/vimeo/groups.xsl +++ b/templates/vimeo.com/groups.xsl @@ -11,7 +11,7 @@ <xsl:for-each select="//div[@class='title']/a"> <link> <label><xsl:value-of select="."/></label> - <ref>wvt:///vimeo/navigation.xsl?srcurl=http://vimeo.com/api/v2/group/<xsl:value-of select="str:split(@href, '/')[last()]"/>/videos.xml</ref> + <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> @@ -23,7 +23,7 @@ <xsl:if test="img/@alt = 'next'"> <label>Next</label> </xsl:if> - <ref>wvt:///vimeo/groups.xsl?srcurl=<xsl:value-of select="./@href"/></ref> + <ref>wvt:///vimeo.com/groups.xsl?srcurl=<xsl:value-of select="./@href"/></ref> </link> </xsl:for-each> diff --git a/templates/vimeo/mainmenu.xsl b/templates/vimeo.com/mainmenu.xsl index 3667ed7..2517ba6 100644 --- a/templates/vimeo/mainmenu.xsl +++ b/templates/vimeo.com/mainmenu.xsl @@ -9,17 +9,17 @@ <link> <label>Search</label> - <ref>wvt:///vimeo/search.xsl?srcurl=http://www.vimeo.com/</ref> + <ref>wvt:///vimeo.com/search.xsl?srcurl=http://vimeo.com/</ref> </link> <link> <label>Channels</label> - <ref>wvt:///vimeo/channels.xsl?srcurl=http://www.vimeo.com/channels/all</ref> + <ref>wvt:///vimeo.com/channels.xsl?srcurl=http://vimeo.com/channels/all</ref> </link> <link> <label>Groups</label> - <ref>wvt:///vimeo/groups.xsl?srcurl=http://www.vimeo.com/groups/all</ref> + <ref>wvt:///vimeo.com/groups.xsl?srcurl=http://vimeo.com/groups/all</ref> </link> </wvmenu> diff --git a/templates/vimeo/navigation.xsl b/templates/vimeo.com/navigation.xsl index 8583212..ecc40b8 100644 --- a/templates/vimeo/navigation.xsl +++ b/templates/vimeo.com/navigation.xsl @@ -6,8 +6,8 @@ <xsl:template match="video"> <link> <label><xsl:value-of select="title"/></label> - <stream>wvt:///vimeo/video.xsl?srcurl=http://www.vimeo.com/moogaloop/load/clip:<xsl:value-of select="id"/></stream> - <ref>wvt:///vimeo/description.xsl?srcurl=http://vimeo.com/api/v2/video/<xsl:value-of select="id"/>.xml</ref> + <stream>wvt:///vimeo.com/video.xsl?srcurl=http://www.vimeo.com/moogaloop/load/clip:<xsl:value-of select="id"/></stream> + <ref>wvt:///vimeo.com/description.xsl?srcurl=http://vimeo.com/api/v2/video/<xsl:value-of select="id"/>.xml</ref> </link> </xsl:template> diff --git a/templates/vimeo/search.xsl b/templates/vimeo.com/search.xsl index 0ae42b3..eb99f03 100644 --- a/templates/vimeo/search.xsl +++ b/templates/vimeo.com/search.xsl @@ -22,7 +22,7 @@ <button> <label>Search</label> - <submission>wvt:///vimeo/searchresults.xsl?srcurl=<xsl:value-of select="concat(str:encode-uri('http://vimeo.com/videos/search:', true()), '{keywords}/', substring(id('xsrft')/@value, 0, 9), '{orderby}')"/>&HTTP-header=cookie,xsrft%3D<xsl:value-of select="substring(id('xsrft')/@value, 0, 9)"/>;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> + <submission>wvt:///vimeo.com/searchresults.xsl?srcurl=<xsl:value-of select="concat(str:encode-uri('http://vimeo.com/videos/search:', true()), '{keywords}/', substring(id('xsrft')/@value, 0, 9), '{orderby}')"/>&HTTP-header=cookie,xsrft%3D<xsl:value-of select="substring(id('xsrft')/@value, 0, 9)"/>;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> diff --git a/templates/vimeo/searchresults.xsl b/templates/vimeo.com/searchresults.xsl index 2b390cd..c5af5ab 100644 --- a/templates/vimeo/searchresults.xsl +++ b/templates/vimeo.com/searchresults.xsl @@ -13,8 +13,8 @@ <xsl:for-each select="//div[@class='title']/a"> <link> <label><xsl:value-of select="."/></label> - <stream>wvt:///vimeo/video.xsl?srcurl=http://www.vimeo.com/moogaloop/load/clip:<xsl:value-of select="str:split(@href, '/')[last()]"/></stream> - <ref>wvt:///vimeo/description.xsl?srcurl=http://vimeo.com/api/v2/video/<xsl:value-of select="str:split(@href, '/')[last()]"/>.xml</ref> + <stream>wvt:///vimeo.com/video.xsl?srcurl=http://www.vimeo.com/moogaloop/load/clip:<xsl:value-of select="str:split(@href, '/')[last()]"/></stream> + <ref>wvt:///vimeo.com/description.xsl?srcurl=http://vimeo.com/api/v2/video/<xsl:value-of select="str:split(@href, '/')[last()]"/>.xml</ref> </link> </xsl:for-each> @@ -26,7 +26,7 @@ <xsl:if test="img/@alt = 'next'"> <label>Next</label> </xsl:if> - <ref>wvt:///vimeo/searchresults.xsl?srcurl=<xsl:value-of select="./@href"/>&HTTP-header=cookie,xsrft%3D<xsl:value-of select="$searchtoken"/>;searchtoken%3D<xsl:value-of select="$searchtoken"/>&param=searchtoken,<xsl:value-of select="$searchtoken"/></ref> + <ref>wvt:///vimeo.com/searchresults.xsl?srcurl=<xsl:value-of select="./@href"/>&HTTP-header=cookie,xsrft%3D<xsl:value-of select="$searchtoken"/>;searchtoken%3D<xsl:value-of select="$searchtoken"/>&param=searchtoken,<xsl:value-of select="$searchtoken"/></ref> </link> </xsl:for-each> diff --git a/templates/vimeo/service.xml b/templates/vimeo.com/service.xml index 77af401..544ad97 100644 --- a/templates/vimeo/service.xml +++ b/templates/vimeo.com/service.xml @@ -2,6 +2,6 @@ <service> <title>Vimeo</title> - <ref>wvt:///vimeo/mainmenu.xsl</ref> + <ref>wvt:///vimeo.com/mainmenu.xsl</ref> <description>Vimeo is a video-centric social networking site</description> </service> diff --git a/templates/vimeo/video.xsl b/templates/vimeo.com/video.xsl index 3b1b7a9..c23acc8 100644 --- a/templates/vimeo/video.xsl +++ b/templates/vimeo.com/video.xsl @@ -3,7 +3,7 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -<xsl:template match="/"> +<xsl:template match="/" mode="included"> <mediaurl> <title><xsl:value-of select="/xml/video/caption"/></title> diff --git a/templates/vimeo.com/videopage.xsl b/templates/vimeo.com/videopage.xsl new file mode 100644 index 0000000..251f731 --- /dev/null +++ b/templates/vimeo.com/videopage.xsl @@ -0,0 +1,20 @@ +<?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/metacafe/categories.xsl b/templates/www.metacafe.com/categories.xsl index 7dc155e..d140939 100644 --- a/templates/metacafe/categories.xsl +++ b/templates/www.metacafe.com/categories.xsl @@ -9,12 +9,12 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <link> <label>Search</label> - <ref>wvt:///metacafe/search.xsl</ref> + <ref>wvt:///www.metacafe.com/search.xsl</ref> </link> <link> <label>Most viewed channels</label> - <ref>wvt:///metacafe/channellist.xsl?srcurl=/api/channels/</ref> + <ref>wvt:///www.metacafe.com/channellist.xsl?srcurl=/api/channels/</ref> </link> <xsl:for-each select="id('LeftCol')/ul/li/a"> @@ -23,7 +23,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:if test="@title != '18+ Only'"> <link> <label><xsl:value-of select="@title"/></label> - <ref>wvt:///metacafe/navigation.xsl?srcurl=/api/videos/-/<xsl:value-of select="substring-after(@href, '/videos/')"/></ref> + <ref>wvt:///www.metacafe.com/navigation.xsl?srcurl=/api/videos/-/<xsl:value-of select="substring-after(@href, '/videos/')"/></ref> </link> </xsl:if> </xsl:for-each> diff --git a/templates/metacafe/channellist.xsl b/templates/www.metacafe.com/channellist.xsl index 2bb74ec..b363c1a 100644 --- a/templates/metacafe/channellist.xsl +++ b/templates/www.metacafe.com/channellist.xsl @@ -7,7 +7,7 @@ xmlns:str="http://exslt.org/strings"> <xsl:template match="item"> <link> <label><xsl:value-of select="title" /> (<xsl:value-of select="videos"/> videos, avg. rank: <xsl:value-of select="avg_rank"/>)</label> - <ref>wvt:///metacafe/navigation.xsl?srcurl=/api/users/<xsl:value-of select="str:encode-uri(translate(title, ' ', '+'), true())"/>/channel?time=all_time</ref> + <ref>wvt:///www.metacafe.com/navigation.xsl?srcurl=/api/users/<xsl:value-of select="str:encode-uri(translate(title, ' ', '+'), true())"/>/channel?time=all_time</ref> </link> </xsl:template> diff --git a/templates/metacafe/description.xsl b/templates/www.metacafe.com/description.xsl index 3cb7f2b..3cb7f2b 100644 --- a/templates/metacafe/description.xsl +++ b/templates/www.metacafe.com/description.xsl diff --git a/templates/metacafe/navigation.xsl b/templates/www.metacafe.com/navigation.xsl index 4ff821a..a4cb8e0 100644 --- a/templates/metacafe/navigation.xsl +++ b/templates/www.metacafe.com/navigation.xsl @@ -8,14 +8,14 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <label><xsl:value-of select="title" /></label> <xsl:choose> <xsl:when test="starts-with(id, 'yt-')"> - <stream>wvt:///youtube/video.xsl?srcurl=http%3A//www.youtube.com/watch%3Fv=<xsl:value-of select="substring(id, 4)"/></stream> + <stream>wvt:///www.youtube.com/video.xsl?srcurl=http://www.youtube.com/get_video_info?video_id=<xsl:value-of select="substring(id, 4)"/></stream> </xsl:when> <xsl:otherwise> - <stream>wvt:///metacafe/video.xsl?srcurl=<xsl:value-of select="link"/></stream> + <stream>wvt:///www.metacafe.com/videopage.xsl?srcurl=<xsl:value-of select="link"/></stream> </xsl:otherwise> </xsl:choose> - <ref>wvt:///metacafe/description.xsl?srcurl=/api/item/<xsl:value-of select="id"/></ref> + <ref>wvt:///www.metacafe.com/description.xsl?srcurl=/api/item/<xsl:value-of select="id"/></ref> </link> </xsl:template> diff --git a/templates/metacafe/search.xsl b/templates/www.metacafe.com/search.xsl index 205bd98..2807152 100644 --- a/templates/metacafe/search.xsl +++ b/templates/www.metacafe.com/search.xsl @@ -28,7 +28,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <button> <label>Search</label> - <submission>wvt:///metacafe/navigation.xsl?srcurl=http%3A//www.metacafe.com/api/videos%3Fvq=%7Bvq%7D%26orderby=%7Borderby%7D%26time=%7Btime%7D</submission> + <submission>wvt:///www.metacafe.com/navigation.xsl?srcurl=http%3A//www.metacafe.com/api/videos%3Fvq=%7Bvq%7D%26orderby=%7Borderby%7D%26time=%7Btime%7D</submission> </button> </wvmenu> </xsl:template> diff --git a/templates/metacafe/service.xml b/templates/www.metacafe.com/service.xml index 8e9fc33..19303f5 100644 --- a/templates/metacafe/service.xml +++ b/templates/www.metacafe.com/service.xml @@ -2,6 +2,6 @@ <service> <title>Metacafe</title> - <ref>wvt:///metacafe/categories.xsl?srcurl=http%3A//www.metacafe.com/videos/</ref> + <ref>wvt:///www.metacafe.com/categories.xsl?srcurl=http%3A//www.metacafe.com/videos/</ref> <description>Video sharing site specializing in short-form original content</description> </service> diff --git a/templates/metacafe/video.xsl b/templates/www.metacafe.com/videopage.xsl index 884e87f..884e87f 100644 --- a/templates/metacafe/video.xsl +++ b/templates/www.metacafe.com/videopage.xsl diff --git a/templates/ruutufi/description.xsl b/templates/www.ruutu.fi/description.xsl index ad04d79..aa5326d 100644 --- a/templates/ruutufi/description.xsl +++ b/templates/www.ruutu.fi/description.xsl @@ -43,7 +43,7 @@ <link> <label>Lataa</label> - <stream>wvt:///ruutufi/video.xsl?srcurl=<xsl:value-of select="str:encode-uri($docurl, true())"/></stream> + <stream>wvt:///www.ruutu.fi/video.xsl?srcurl=<xsl:value-of select="str:encode-uri($docurl, true())"/></stream> </link> </wvmenu> </xsl:template> diff --git a/templates/www.ruutu.fi/mainmenu.xsl b/templates/www.ruutu.fi/mainmenu.xsl new file mode 100644 index 0000000..a8b051b --- /dev/null +++ b/templates/www.ruutu.fi/mainmenu.xsl @@ -0,0 +1,34 @@ +<?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>Ruutu.fi</title> + +<!-- + <link> + <label>Haku</label> + <ref>wvt:///www.ruutu.fi/search.xsl</ref> + </link> +--> + + <link> + <label>Listaa sarjat</label> + <ref>wvt:///www.ruutu.fi/series.xsl?srcurl=http://www.ruutu.fi/ajax/media_get_netti_tv_series_list/all/false&postprocess=json2xml</ref> + </link> + + <link> + <label>Uusimmat</label> + <ref>wvt:///www.ruutu.fi/program.xsl?srcurl=http://www.ruutu.fi/ajax/media_get_nettitv_media/all/video_episode/__/latestdesc/0/25/true/__&postprocess=json2xml</ref> + </link> + + <link> + <label>Katsotuimmat</label> + <ref>wvt:///www.ruutu.fi/program.xsl?srcurl=http://www.ruutu.fi/ajax/media_get_nettitv_media/all/video_episode/__/most_watched/0/25/true/__&postprocess=json2xml</ref> + </link> +</wvmenu> +</xsl:template> + +</xsl:stylesheet> diff --git a/templates/ruutufi/program.xsl b/templates/www.ruutu.fi/program.xsl index 593036f..6487b9e 100644 --- a/templates/ruutufi/program.xsl +++ b/templates/www.ruutu.fi/program.xsl @@ -35,8 +35,8 @@ <xsl:variable name="videourl">http://www.nelonen.fi/utils/video_config/%3Fq%3D<xsl:value-of select="$mediatype"/>/<xsl:value-of select="$videoid"/>%26site%3Dwww.ruutu.fi%26ageCheckURL%3Dhttp://sso.nelonenmedia.fi/ajax/check_age/%26current_page%3Dhttp://www.ruutu.fi/video</xsl:variable> - <ref>wvt:///ruutufi/description.xsl?srcurl=<xsl:value-of select="$videourl"/></ref> - <stream>wvt:///ruutufi/video.xsl?srcurl=<xsl:value-of select="$videourl"/></stream> + <ref>wvt:///www.ruutu.fi/description.xsl?srcurl=<xsl:value-of select="$videourl"/></ref> + <stream>wvt:///www.ruutu.fi/video.xsl?srcurl=<xsl:value-of select="$videourl"/></stream> </link> </xsl:template> @@ -76,7 +76,7 @@ <xsl:if test="contains($docurl, '/video_episode/') and ($start = 0)"> <link> <label>Klipit</label> - <ref>wvt:///ruutufi/program.xsl?srcurl=<xsl:value-of select="str:replace($docurl, '/video_episode/', '/video/')"/>&postprocess=json2xml</ref> + <ref>wvt:///www.ruutu.fi/program.xsl?srcurl=<xsl:value-of select="str:replace($docurl, '/video_episode/', '/video/')"/>&postprocess=json2xml</ref> </link> </xsl:if> @@ -103,14 +103,14 @@ <xsl:if test="$start > 0"> <link> <label>Edellinen</label> - <ref>wvt:///ruutufi/program.xsl?srcurl=<xsl:value-of select="str:encode-uri(str:replace($docurl, concat(string($start), $urlend), concat($prevstart, $urlend)), true())"/>&postprocess=json2xml</ref> + <ref>wvt:///www.ruutu.fi/program.xsl?srcurl=<xsl:value-of select="str:encode-uri(str:replace($docurl, concat(string($start), $urlend), concat($prevstart, $urlend)), true())"/>&postprocess=json2xml</ref> </link> </xsl:if> <xsl:if test="$start + 25 < $total"> <link> <label>Seuraava</label> - <ref>wvt:///ruutufi/program.xsl?srcurl=<xsl:value-of select="str:encode-uri(str:replace($docurl, concat(string($start), $urlend), concat(string($start+25), $urlend)), true())"/>&postprocess=json2xml</ref> + <ref>wvt:///www.ruutu.fi/program.xsl?srcurl=<xsl:value-of select="str:encode-uri(str:replace($docurl, concat(string($start), $urlend), concat(string($start+25), $urlend)), true())"/>&postprocess=json2xml</ref> </link> </xsl:if> diff --git a/templates/www.ruutu.fi/search.xsl b/templates/www.ruutu.fi/search.xsl new file mode 100644 index 0000000..decda54 --- /dev/null +++ b/templates/www.ruutu.fi/search.xsl @@ -0,0 +1,23 @@ +<?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>Haku</title> + + <textfield name="query"> + <label>Hakusana</label> + </textfield> + + <button> + <label>Hae</label> + <submission>wvt:///www.ruutu.fi/program.xsl?srcurl=<xsl:value-of select="str:encode-uri('http://www.ruutu.fi/search/search_new.php?params=%7B%22search%22%3A%22{query}%22%2C%22groups%22%3A%7B%22video%22%3A%7B%22types%22%3A%5B%22video_clip%22%5D%7D%2C%22video_episode%22%3A%7B%22types%22%3A%5B%22video_episode%22%5D%7D%2C%22audio%22%3A%7B%22types%22%3A%5B%22audio%22%5D%7D%7D%7D', true())"/>&postprocess=json2xml</submission> + </button> +</wvmenu> +</xsl:template> + +</xsl:stylesheet> diff --git a/templates/ruutufi/series.xsl b/templates/www.ruutu.fi/series.xsl index 2e8f4d2..217d8be 100644 --- a/templates/ruutufi/series.xsl +++ b/templates/www.ruutu.fi/series.xsl @@ -11,7 +11,7 @@ <xsl:if test="is_video=1"> <link> <label><xsl:value-of select="name"/></label> - <ref>wvt:///ruutufi/program.xsl?srcurl=http://www.ruutu.fi/ajax/media_get_nettitv_video/all/video_episode/<xsl:value-of select="str:encode-uri(str:encode-uri(url_encode_name, true()), true())"/>/latestdesc/0/25/true/__&postprocess=json2xml</ref> + <ref>wvt:///www.ruutu.fi/program.xsl?srcurl=http://www.ruutu.fi/ajax/media_get_nettitv_video/all/video_episode/<xsl:value-of select="str:encode-uri(str:encode-uri(url_encode_name, true()), true())"/>/latestdesc/0/25/true/__&postprocess=json2xml</ref> <!-- Yes, ruutu.fi really expects url_encode_name to be double-url-encoded! --> </link> </xsl:if> diff --git a/templates/ruutufi/service.xml b/templates/www.ruutu.fi/service.xml index 7a106aa..0f0b0f2 100644 --- a/templates/ruutufi/service.xml +++ b/templates/www.ruutu.fi/service.xml @@ -2,6 +2,6 @@ <service> <title>ruutu.fi</title> - <ref>wvt:///ruutufi/mainmenu.xsl?srcurl=http%3A//www.ruutu.fi/</ref> + <ref>wvt:///www.ruutu.fi/mainmenu.xsl?srcurl=http%3A//www.ruutu.fi/</ref> <description>Net TV service of the Finnish broadcasting company Nelonen</description> </service> diff --git a/templates/ruutufi/video.xsl b/templates/www.ruutu.fi/video.xsl index a0d212b..55fa9a5 100644 --- a/templates/ruutufi/video.xsl +++ b/templates/www.ruutu.fi/video.xsl @@ -5,7 +5,7 @@ xmlns:str="http://exslt.org/strings" exclude-result-prefixes="str"> -<xsl:template match="/"> +<xsl:template name="mediaurl"> <mediaurl> <title><xsl:value-of select="concat(/Playerdata/Behavior/Program/@program_name, ' ', /Playerdata/Behavior/Program/@episode_name)"/></title> @@ -24,4 +24,8 @@ </mediaurl> </xsl:template> +<xsl:template match="/"> + <xsl:call-template name="mediaurl"/> +</xsl:template> + </xsl:stylesheet> diff --git a/templates/www.ruutu.fi/videopage.xsl b/templates/www.ruutu.fi/videopage.xsl new file mode 100644 index 0000000..7060eba --- /dev/null +++ b/templates/www.ruutu.fi/videopage.xsl @@ -0,0 +1,20 @@ +<?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="/" mode="video_config"> + <xsl:call-template name="mediaurl"/> +</xsl:template> + +<xsl:template match="/"> + <xsl:param name="mediatype" select="substring-before(substring-after($docurl, 'vt='), '&vid=')"/> + <xsl:param name="videoid" select="substring-after($docurl, '&vid=')"/> + <xsl:variable name="videourl">http://www.nelonen.fi/utils/video_config/?q=<xsl:value-of select="$mediatype"/>/<xsl:value-of select="$videoid"/>&site=www.ruutu.fi&ageCheckURL=http://sso.nelonenmedia.fi/ajax/check_age/&current_page=http://www.ruutu.fi/video</xsl:variable> + <xsl:apply-templates select="document($videourl)" mode="video_config"/> +</xsl:template> + +</xsl:stylesheet> diff --git a/templates/subtv/description.xsl b/templates/www.sub.fi/description.xsl index c914f3b..9aeacf0 100644 --- a/templates/subtv/description.xsl +++ b/templates/www.sub.fi/description.xsl @@ -24,7 +24,7 @@ <link> <label>Lataa</label> - <stream>wvt:///subtv/video.xsl?param=pid,<xsl:value-of select="$pid"/>&param=title,<xsl:value-of select="str:encode-uri($title, true())"/></stream> + <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> diff --git a/templates/subtv/mainmenu.xsl b/templates/www.sub.fi/mainmenu.xsl index 2158295..c865ae0 100644 --- a/templates/subtv/mainmenu.xsl +++ b/templates/www.sub.fi/mainmenu.xsl @@ -12,7 +12,7 @@ <xsl:for-each select="//div[@class='netissakaikki']/ul/li/a"> <link> <label><xsl:value-of select="."/></label> - <ref>wvt:///subtv/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> + <ref>wvt:///www.sub.fi/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> </link> </xsl:for-each> </wvmenu> diff --git a/templates/subtv/navigation.xsl b/templates/www.sub.fi/navigation.xsl index 3c0b039..274355f 100644 --- a/templates/subtv/navigation.xsl +++ b/templates/www.sub.fi/navigation.xsl @@ -15,8 +15,8 @@ <xsl:if test="$progId"> <link> <label><xsl:value-of select="normalize-space(.//h5)"/></label> - <stream>wvt:///subtv/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:///subtv/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> + <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> diff --git a/templates/subtv/service.xml b/templates/www.sub.fi/service.xml index 6a7a44f..432855f 100644 --- a/templates/subtv/service.xml +++ b/templates/www.sub.fi/service.xml @@ -2,6 +2,6 @@ <service> <title>Subtv</title> - <ref>wvt:///subtv/mainmenu.xsl?srcurl=http%3A//www.sub.fi/katsonetista/</ref> + <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 new file mode 100644 index 0000000..4448905 --- /dev/null +++ b/templates/www.sub.fi/video.xsl @@ -0,0 +1,24 @@ +<?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 new file mode 100644 index 0000000..11cd0ef --- /dev/null +++ b/templates/www.sub.fi/videopage.xsl @@ -0,0 +1,16 @@ +<?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> diff --git a/templates/www.vimeo.com/videopage.xsl b/templates/www.vimeo.com/videopage.xsl new file mode 100644 index 0000000..39cc3f3 --- /dev/null +++ b/templates/www.vimeo.com/videopage.xsl @@ -0,0 +1,20 @@ +<?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> diff --git a/templates/youtube/categories.xsl b/templates/www.youtube.com/categories.xsl index 080218b..096328d 100644 --- a/templates/youtube/categories.xsl +++ b/templates/www.youtube.com/categories.xsl @@ -14,13 +14,13 @@ <link> <label>Search</label> - <ref>wvt:///youtube/search.xsl</ref> + <ref>wvt:///www.youtube.com/search.xsl</ref> </link> <xsl:for-each select="/app:categories/atom:category[yt:browsable]"> <link> <label><xsl:value-of select="@label"/></label> - <ref>wvt:///youtube/navigation.xsl?srcurl=http://gdata.youtube.com/feeds/api/standardfeeds/most_popular_<xsl:value-of select="str:encode-uri(@term, true())"/>%3Fmax-results%3D20%26v%3D2</ref> + <ref>wvt:///www.youtube.com/navigation.xsl?srcurl=http://gdata.youtube.com/feeds/api/standardfeeds/most_popular_<xsl:value-of select="str:encode-uri(@term, true())"/>%3Fmax-results%3D20%26v%3D2</ref> </link> </xsl:for-each> </wvmenu> diff --git a/templates/youtube/description.xsl b/templates/www.youtube.com/description.xsl index e728961..6567adb 100644 --- a/templates/youtube/description.xsl +++ b/templates/www.youtube.com/description.xsl @@ -51,20 +51,20 @@ <xsl:if test="/atom:entry/atom:link[@rel='http://gdata.youtube.com/schemas/2007#video.responses']"> <link> <label>Video responses</label> - <ref>wvt:///youtube/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(/atom:entry/atom:link[@rel='http://gdata.youtube.com/schemas/2007#video.responses']/@href, true())"/></ref> + <ref>wvt:///www.youtube.com/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(/atom:entry/atom:link[@rel='http://gdata.youtube.com/schemas/2007#video.responses']/@href, true())"/></ref> </link> </xsl:if> <xsl:if test="/atom:entry/atom:link[@rel='http://gdata.youtube.com/schemas/2007#video.related']"> <link> <label>Related videos</label> - <ref>wvt:///youtube/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(/atom:entry/atom:link[@rel='http://gdata.youtube.com/schemas/2007#video.related']/@href, true())"/></ref> + <ref>wvt:///www.youtube.com/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(/atom:entry/atom:link[@rel='http://gdata.youtube.com/schemas/2007#video.related']/@href, true())"/></ref> </link> </xsl:if> <link> <label>Download this video</label> - <stream>wvt:///youtube/video.xsl?srcurl=http://www.youtube.com/watch?v=<xsl:value-of select="/atom:entry/media:group/yt:videoid"/></stream> + <stream>wvt:///www.youtube.com/video.xsl?srcurl=http://www.youtube.com/get_video_info?video_id=<xsl:value-of select="/atom:entry/media:group/yt:videoid"/></stream> </link> </wvmenu> diff --git a/templates/youtube/navigation.xsl b/templates/www.youtube.com/navigation.xsl index a9df76f..91f6189 100644 --- a/templates/youtube/navigation.xsl +++ b/templates/www.youtube.com/navigation.xsl @@ -11,8 +11,8 @@ <xsl:template match="atom:entry"> <link> <label><xsl:value-of select="atom:title"/></label> - <stream>wvt:///youtube/video.xsl?srcurl=http://www.youtube.com/get_video_info?video_id=<xsl:value-of select="media:group/yt:videoid"/></stream> - <ref>wvt:///youtube/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(atom:link[@rel='self']/@href, true())"/></ref> + <stream>wvt:///www.youtube.com/video.xsl?srcurl=http://www.youtube.com/get_video_info?video_id=<xsl:value-of select="media:group/yt:videoid"/></stream> + <ref>wvt:///www.youtube.com/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(atom:link[@rel='self']/@href, true())"/></ref> </link> </xsl:template> @@ -20,14 +20,14 @@ <xsl:if test="@rel = 'previous'"> <link> <label>Previous</label> - <ref>wvt:///youtube/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> + <ref>wvt:///www.youtube.com/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref> </link> </xsl:if> <xsl:if test="@rel = 'next'"> <link> <label>Next</label> - <ref>wvt:///youtube/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref>a + <ref>wvt:///www.youtube.com/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(@href, true())"/></ref>a </link> </xsl:if> </xsl:template> @@ -39,7 +39,7 @@ <xsl:if test="/atom:feed/atom:link[@rel='http://schemas.google.com/g/2006#spellcorrection']"> <link> <label>Did you mean <xsl:value-of select="/atom:feed/atom:link[@rel='http://schemas.google.com/g/2006#spellcorrection']/@title"/>?</label> - <ref>wvt:///youtube/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(/atom:feed/atom:link[@rel='http://schemas.google.com/g/2006#spellcorrection']/@href, true())"/></ref> + <ref>wvt:///www.youtube.com/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri(/atom:feed/atom:link[@rel='http://schemas.google.com/g/2006#spellcorrection']/@href, true())"/></ref> </link> </xsl:if> diff --git a/templates/youtube/search.xsl b/templates/www.youtube.com/search.xsl index d28e3c6..c6589b2 100644 --- a/templates/youtube/search.xsl +++ b/templates/www.youtube.com/search.xsl @@ -31,7 +31,7 @@ <button> <label>Search</label> - <submission>wvt:///youtube/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri('http://gdata.youtube.com/feeds/api/videos?q={q}&orderby={orderby}&time={time}&max-results=20&safeSearch=none&format=5&v=2', true())"/></submission> + <submission>wvt:///www.youtube.com/navigation.xsl?srcurl=<xsl:value-of select="str:encode-uri('http://gdata.youtube.com/feeds/api/videos?q={q}&orderby={orderby}&time={time}&max-results=20&safeSearch=none&format=5&v=2', true())"/></submission> </button> </wvmenu> </xsl:template> diff --git a/templates/youtube/service.xml b/templates/www.youtube.com/service.xml index f5719a6..9c5b33c 100644 --- a/templates/youtube/service.xml +++ b/templates/www.youtube.com/service.xml @@ -2,6 +2,6 @@ <service> <title>YouTube</title> - <ref>wvt:///youtube/categories.xsl?srcurl=http://gdata.youtube.com/schemas/2007/categories.cat</ref> + <ref>wvt:///www.youtube.com/categories.xsl?srcurl=http://gdata.youtube.com/schemas/2007/categories.cat</ref> <description>Video sharing service on which users worldwide can upload their videos</description> </service> diff --git a/templates/youtube/video.xsl b/templates/www.youtube.com/video.xsl index f2791da..12e1cf5 100644 --- a/templates/youtube/video.xsl +++ b/templates/www.youtube.com/video.xsl @@ -45,28 +45,40 @@ </xsl:if> </xsl:template> -<xsl:template match="/"> +<xsl:template name="mediaurl"> +<xsl:param name="videoinfo"/> +<xsl:param name="title"/> + <mediaurl> <title> <xsl:variable name="titleparam"> <xsl:choose> - <xsl:when test="contains(substring-after(., '&title='), '&')"> - <xsl:value-of select="substring-before(substring-after(., '&title='), '&')"/> + <xsl:when test="$title"> + <xsl:value-of select="$title"/> </xsl:when> - <xsl:otherwise> - <xsl:value-of select="substring-after(., '&title=')"/> - </xsl:otherwise> + <xsl:when test="contains(substring-after($videoinfo, '&title='), '&')"> + <xsl:value-of select="substring-before(substring-after($videoinfo, '&title='), '&')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="substring-after($videoinfo, '&title=')"/> + </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:value-of select="str:decode-uri(str:replace($titleparam, '+', ' '))"/> </title> - <xsl:for-each select="str:split(str:decode-uri(substring-before(substring-after(., '&fmt_url_map='), '&')), ',')"> + <xsl:for-each select="str:split(str:decode-uri(substring-before(substring-after($videoinfo, '&fmt_url_map='), '&')), ',')"> <xsl:call-template name="fmturl"/> </xsl:for-each> </mediaurl> </xsl:template> +<xsl:template match="/"> + <xsl:call-template name="mediaurl"> + <xsl:with-param name="videoinfo" select="."/> + </xsl:call-template> +</xsl:template> + </xsl:stylesheet> diff --git a/templates/www.youtube.com/videopage.xsl b/templates/www.youtube.com/videopage.xsl new file mode 100644 index 0000000..5f1b174 --- /dev/null +++ b/templates/www.youtube.com/videopage.xsl @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + +<xsl:import href="video.xsl"/> + +<xsl:template match="/"> + <xsl:variable name="videoinfo"> + <xsl:value-of select="substring-before(substring-after(//script[contains(., 'flashvars=\"')], 'flashvars=\"'), '\"')"/> + </xsl:variable> + + <xsl:call-template name="mediaurl"> + <xsl:with-param name="videoinfo" select="$videoinfo"/> + <xsl:with-param name="title" select="/html/head/meta/@content"/> + </xsl:call-template> +</xsl:template> + +</xsl:stylesheet> |