summaryrefslogtreecommitdiff
path: root/templates/www.metacafe.com/navigation.xsl
diff options
context:
space:
mode:
authorAntti Ajanki <antti.ajanki@iki.fi>2010-10-24 21:05:47 +0300
committerAntti Ajanki <antti.ajanki@iki.fi>2010-10-24 21:05:47 +0300
commit4770a7e7d1a06fcea280382c546ae38cf4fd084e (patch)
tree9fd5b235a907edf4c76ceaf769d0cdbe501399c6 /templates/www.metacafe.com/navigation.xsl
parent439024953d1abe71fd5adce26fac4f17c1aa9f96 (diff)
downloadvdr-plugin-webvideo-4770a7e7d1a06fcea280382c546ae38cf4fd084e.tar.gz
vdr-plugin-webvideo-4770a7e7d1a06fcea280382c546ae38cf4fd084e.tar.bz2
rename template directories and add videopage.xsl to each template
Diffstat (limited to 'templates/www.metacafe.com/navigation.xsl')
-rw-r--r--templates/www.metacafe.com/navigation.xsl36
1 files changed, 36 insertions, 0 deletions
diff --git a/templates/www.metacafe.com/navigation.xsl b/templates/www.metacafe.com/navigation.xsl
new file mode 100644
index 0000000..a4cb8e0
--- /dev/null
+++ b/templates/www.metacafe.com/navigation.xsl
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:template match="item">
+ <link>
+ <label><xsl:value-of select="title" /></label>
+ <xsl:choose>
+ <xsl:when test="starts-with(id, 'yt-')">
+ <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:///www.metacafe.com/videopage.xsl?srcurl=<xsl:value-of select="link"/></stream>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <ref>wvt:///www.metacafe.com/description.xsl?srcurl=/api/item/<xsl:value-of select="id"/></ref>
+ </link>
+</xsl:template>
+
+<xsl:template match="/">
+<wvmenu>
+ <title><xsl:value-of select="/rss/channel/title"/></title>
+
+ <xsl:apply-templates select="/rss/channel/item"/>
+
+ <xsl:if test="count(/rss/channel/item) = 0">
+ <textarea>
+ <label>No matching results.</label>
+ </textarea>
+ </xsl:if>
+</wvmenu>
+</xsl:template>
+
+</xsl:stylesheet>