diff options
Diffstat (limited to 'templates/katsomo.fi/program.xsl')
-rw-r--r-- | templates/katsomo.fi/program.xsl | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/templates/katsomo.fi/program.xsl b/templates/katsomo.fi/program.xsl index f1c527a..63def55 100644 --- a/templates/katsomo.fi/program.xsl +++ b/templates/katsomo.fi/program.xsl @@ -6,6 +6,23 @@ exclude-result-prefixes="str"> <xsl:template match="div[contains(@class, 'item')]"> + <xsl:variable name="episodetitle"> + <xsl:value-of select="normalize-space(div[@class='row2']/a)"/> + </xsl:variable> + <xsl:variable name="programtitle"> + <xsl:value-of select="normalize-space(id('program_content')/h1)"/> + </xsl:variable> + <xsl:variable name="title"> + <xsl:choose> + <xsl:when test="$programtitle = $episodetitle"> + <xsl:value-of select="$programtitle"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="concat($programtitle, ': ', $episodetitle)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:choose> <xsl:when test="div[@class='row1']/span[@class='live']"> <xsl:variable name="upcoming" select="concat(div[@class='row1']/span[@class='live'], ' ', div[@class='row1']/span[contains(@class, 'time')])"/> @@ -19,7 +36,7 @@ <link> <label><xsl:value-of select="div[@class='row2']/a"/></label> <ref>wvt:///katsomo.fi/description.xsl?srcurl=<xsl:value-of select="str:encode-uri(div[@class='row2']/a/@href, true())"/></ref> - <stream>wvt:///katsomo.fi/video.xsl?param=pid,<xsl:value-of select="substring-after(div[@class='row2']/a/@href, 'progId=')"/>&param=title,<xsl:value-of select="normalize-space(str:encode-uri(concat(id('program_content')/h1, ' ', div[@class='row2']/a), true()))"/></stream> + <stream>wvt:///katsomo.fi/video.xsl?param=pid,<xsl:value-of select="substring-after(div[@class='row2']/a/@href, 'progId=')"/>&param=title,<xsl:value-of select="str:encode-uri($title, true())"/></stream> </link> </xsl:otherwise> </xsl:choose> |