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 /templates/www.metacafe.com/description.xsl | |
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
Diffstat (limited to 'templates/www.metacafe.com/description.xsl')
-rw-r--r-- | templates/www.metacafe.com/description.xsl | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/templates/www.metacafe.com/description.xsl b/templates/www.metacafe.com/description.xsl new file mode 100644 index 0000000..3cb7f2b --- /dev/null +++ b/templates/www.metacafe.com/description.xsl @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<xsl:stylesheet version="1.0" +xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +xmlns:media="http://search.yahoo.com/mrss/"> + +<!-- 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="/rss/channel/item/title"/></title> + + <textarea> + <label><xsl:value-of select="/rss/channel/item/media:description"/></label> + </textarea> + + <textarea> + <label>Duration: <xsl:call-template name="pretty-print-seconds"> + <xsl:with-param name="seconds"> + <xsl:value-of select="/rss/channel/item/media:content/@duration"/> + </xsl:with-param> + </xsl:call-template> + </label> + </textarea> + + <textarea> + <label>Rating: <xsl:value-of select="/rss/channel/item/rank"/></label> + </textarea> + + <textarea> + <label>published: <xsl:value-of select="/rss/channel/item/pubDate"/></label> + </textarea> + + +</wvmenu> +</xsl:template> + +</xsl:stylesheet> |