diff options
author | Antti Ajanki <antti.ajanki@iki.fi> | 2012-09-24 21:03:38 +0300 |
---|---|---|
committer | Antti Ajanki <antti.ajanki@iki.fi> | 2012-09-24 21:03:38 +0300 |
commit | 315af10b62438e046799e69a125c9fd805167c89 (patch) | |
tree | 64fef5f1dd017030551e5a9724595503505aa490 | |
parent | 9dc83402c2162fe0be4e748a39613ebaaa0fd169 (diff) | |
download | vdr-plugin-webvideo-315af10b62438e046799e69a125c9fd805167c89.tar.gz vdr-plugin-webvideo-315af10b62438e046799e69a125c9fd805167c89.tar.bz2 |
fixed MoonTV
-rw-r--r-- | templates/moontv.fi/mainmenu.xsl | 9 | ||||
-rw-r--r-- | templates/moontv.fi/navigation.xsl | 13 | ||||
-rw-r--r-- | templates/moontv.fi/programlist.xsl | 7 | ||||
-rw-r--r-- | templates/moontv.fi/recent.xsl | 22 | ||||
-rw-r--r-- | templates/moontv.fi/rss.xsl | 28 | ||||
-rw-r--r-- | templates/moontv.fi/service.xml | 2 |
6 files changed, 39 insertions, 42 deletions
diff --git a/templates/moontv.fi/mainmenu.xsl b/templates/moontv.fi/mainmenu.xsl index d0fc6d3..24eda20 100644 --- a/templates/moontv.fi/mainmenu.xsl +++ b/templates/moontv.fi/mainmenu.xsl @@ -2,19 +2,20 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:str="http://exslt.org/strings"> + xmlns:str="http://exslt.org/strings" + exclude-result-prefixes="str"> <xsl:template match="/"> <wvmenu> - <title>Katsomo</title> + <title>MoonTV</title> <link> <label>MoonTV ohjelmat</label> - <ref>wvt:///moontv.fi/programlist.xsl?srcurl=http://moontv.fi/ohjelmat</ref> + <ref>wvt:///moontv.fi/programlist.xsl?srcurl=http://moontv.fi/ohjelmat&HTTP-header=User-Agent,Mozilla/5.0</ref> </link> <link> <label>MoonTV uusimmat videot</label> - <ref>wvt:///moontv.fi/rss.xsl?srcurl=http://feeds.feedburner.com/Moontv?format=rss</ref> + <ref>wvt:///moontv.fi/recent.xsl?srcurl=http://moontv.fi/ohjelmat&HTTP-header=User-Agent,Mozilla/5.0</ref> </link> </wvmenu> diff --git a/templates/moontv.fi/navigation.xsl b/templates/moontv.fi/navigation.xsl index 2230251..88ab667 100644 --- a/templates/moontv.fi/navigation.xsl +++ b/templates/moontv.fi/navigation.xsl @@ -2,16 +2,17 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:str="http://exslt.org/strings"> + xmlns:str="http://exslt.org/strings" + exclude-result-prefixes="str"> <xsl:template match="/"> <wvmenu> - <title><xsl:value-of select="//div[@id='content']/h2"/></title> - <xsl:for-each select="//div[@class='entry']"> + <title><xsl:value-of select="id('content')/h2"/></title> + <xsl:for-each select="id('wrapper')/div[@class='thumbnails'][1]/div"> <link> - <label><xsl:value-of select="h3"/></label> - <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> + <label><xsl:value-of select="h6"/></label> + <ref>wvt:///moontv.fi/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/>&HTTP-header=User-Agent,Mozilla/5.0</ref> + <stream>wvt:///moontv.fi/videopage.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/>&HTTP-header=User-Agent,Mozilla/5.0</stream> </link> </xsl:for-each> </wvmenu> diff --git a/templates/moontv.fi/programlist.xsl b/templates/moontv.fi/programlist.xsl index 33dc0ef..b65e280 100644 --- a/templates/moontv.fi/programlist.xsl +++ b/templates/moontv.fi/programlist.xsl @@ -2,16 +2,17 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:str="http://exslt.org/strings"> + xmlns:str="http://exslt.org/strings" + exclude-result-prefixes="str"> <xsl:template match="/"> <wvmenu> <title>MoonTV ohjelmat</title> - <xsl:for-each select="//ul[@id='ohjelmat-list']/li/h5/a"> + <xsl:for-each select="id('ohjelmat-list')/li/h5/a"> <link> <label><xsl:value-of select="."/></label> - <ref>wvt:///moontv.fi/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())"/>&HTTP-header=User-Agent,Mozilla/5.0</ref> </link> </xsl:for-each> </wvmenu> diff --git a/templates/moontv.fi/recent.xsl b/templates/moontv.fi/recent.xsl new file mode 100644 index 0000000..b6c8c29 --- /dev/null +++ b/templates/moontv.fi/recent.xsl @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<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>MoonTV uusimmat videot</title> + + <xsl:for-each select="//div[@class='thumbnails']/div"> + <link> + <label><xsl:value-of select="h6"/></label> + <ref>wvt:///moontv.fi/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/>&HTTP-header=User-Agent,Mozilla/5.0</ref> + <stream>wvt:///moontv.fi/videopage.xsl?srcurl=<xsl:value-of select="str:encode-uri(a/@href, true())"/>&HTTP-header=User-Agent,Mozilla/5.0</stream> + </link> + </xsl:for-each> +</wvmenu> +</xsl:template> + +</xsl:stylesheet> diff --git a/templates/moontv.fi/rss.xsl b/templates/moontv.fi/rss.xsl deleted file mode 100644 index c89c8c9..0000000 --- a/templates/moontv.fi/rss.xsl +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> - -<xsl:stylesheet version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:str="http://exslt.org/strings"> - -<xsl:param name="docurl"/> - -<xsl:template match="/rss/channel/item"> - <link> - <label><xsl:value-of select="concat(category, ': ',title)"/></label> - <ref>wvt:///moontv.fi/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(link, true())"/></ref> - <!-- MoonTV rss-linkit --> - <stream>wvt:///moontv.fi/videopage.xsl?srcurl=<xsl:value-of select="link"/></stream> - </link> -</xsl:template> - -<xsl:template match="/"> -<wvmenu> - <!-- Videolinkit --> - <xsl:if test="/rss"> - <title><xsl:value-of select="/rss/channel/title"/></title> - <xsl:apply-templates select="/rss/channel/item"/> - </xsl:if> -</wvmenu> -</xsl:template> - -</xsl:stylesheet> diff --git a/templates/moontv.fi/service.xml b/templates/moontv.fi/service.xml index 386e410..b7eb263 100644 --- a/templates/moontv.fi/service.xml +++ b/templates/moontv.fi/service.xml @@ -2,6 +2,6 @@ <service> <title>MoonTV</title> - <ref>wvt:///moontv.fi/mainmenu.xsl?srcurl=http%3A//moontv.fi/ohjelmat</ref> + <ref>wvt:///moontv.fi/mainmenu.xsl</ref> <description>Video service by MoonTV, a Finnish online video channel</description> </service> |