[mythtv-users] Re: AW: mythfilldatabase in Germany
Stefan Frank
sfr+lists at 6913304088794.gnuu.de
Thu Dec 18 08:16:50 EST 2003
Jost Schenck <jost.schenck at gmx.de> writes:
[ re: Ben Bukschs tvmovie listings grabber ]
> Ahh, works now. I obviously got something wrong here. Great, thank you!
> -Jost.
.
.
>> Works flawlessy here, ever did. I had to disable xml syntax checking in
>> config.py, but the resulting xmltv files are fine.
>>
>> Torsten
>
>
I'm also using it and changed some minor things in the xsl file.
I don't know much about xml, but it works for me.
The changes are:
Enabled subtitles for different shows. Character names were stored
together with the actors name and caused lots of duplicates. And a
change to the genre names to make coloured highlighting easier.
I have attached a patch in case somebody wants to give it a try.
Bye, Stefan
-------------- next part --------------
--- tvmovie.xsl.keep 2003-09-30 18:11:48.000000000 +0200
+++ tvmovie.xsl 2003-10-01 12:49:59.000000000 +0200
@@ -10,7 +10,7 @@
(libxslt, xsltproc et al). If you must use another processor, see the at
the URL above for XSLT stylesheet templates emulating this functionality.
-->
-<xsl:output method="xml" indent="yes"/>
+<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
@@ -26,7 +26,7 @@
<!-- "2003-04-05T00:45:00Z" -> "20030405004500 CET" -->
<xsl:template name="reformat-date">
<xsl:param name="$date"/>
- <xsl:value-of select="concat(substring($date, 1, 4), substring($date, 6, 2), substring($date, 9, 2), substring($date, 12, 2), substring($date, 15, 2), substring($date, 18, 2), ' CET')"/>
+ <xsl:value-of select="concat(substring($date, 1, 4), substring($date, 6, 2), substring($date, 9, 2), substring($date, 12, 2), substring($date, 15, 2), substring($date, 18, 2), ' +0100')"/>
</xsl:template>
<xsl:template match="Sendung">
@@ -52,16 +52,16 @@
<xsl:with-param name="date" select="$endtime" />
</xsl:call-template>
</xsl:attribute>
+ <!-- sfr, unknown attributes
<xsl:attribute name="duration">
- <!-- in minutes; nonstandard, but may be useful -->
+ in minutes; nonstandard, but may be useful
<xsl:value-of select="Dauer"/>
</xsl:attribute>
<xsl:if test="Showview">
<xsl:attribute name="showview">
<xsl:value-of select="Showview"/>
</xsl:attribute>
- </xsl:if>
-
+ </xsl:if> -->
<title lang="de">
<xsl:value-of select="Titel"/>
</title>
@@ -75,29 +75,43 @@
<xsl:call-template name="Descr"/>
</xsl:template>
<xsl:template match="Film">
+ <xsl:if test="UnterTitel">
+ <sub-title>
+ <xsl:value-of select="UnterTitel"/>
+ </sub-title>
+ </xsl:if>
<xsl:call-template name="Descr"/>
</xsl:template>
<xsl:template match="Kultur">
<xsl:call-template name="Descr"/>
</xsl:template>
<xsl:template match="TVShow">
+ <xsl:if test="UnterTitel">
+ <sub-title>
+ <xsl:value-of select="UnterTitel"/>
+ </sub-title>
+ </xsl:if>
<xsl:call-template name="Descr"/>
</xsl:template>
<xsl:template match="Sport">
<xsl:call-template name="Descr"/>
</xsl:template>
<xsl:template match="Folge">
+ <xsl:if test="UnterTitel">
<sub-title>
- <xsl:value-of select="UnterTitel"/> <!-- only appears in Folge -->
+ <xsl:value-of select="UnterTitel"/>
</sub-title>
+ </xsl:if>
<xsl:call-template name="Descr"/>
</xsl:template>
<xsl:template name="Descr">
<xsl:apply-templates select="OriginalTitel"/>
<category>
+<!-- sfr, one genre is enough
<xsl:value-of select="RZPKategorieID"/>
<xsl:text> - </xsl:text>
+-->
<xsl:value-of select="GenreText"/>
</category>
<desc>
@@ -154,7 +168,9 @@
<xsl:template match="FSK">
<xsl:if test="number(.) != 0">
<rating system="FSK">
+ <value>
<xsl:value-of select="."/>
+ </value>
</rating>
</xsl:if>
</xsl:template>
@@ -177,11 +193,13 @@
<xsl:value-of select="Vorname"/>
<xsl:text> </xsl:text>
<xsl:value-of select="Name"/>
+<!-- sfr character names lead to duplicate entries
<xsl:if test="RollenName">
<xsl:text> (</xsl:text>
<xsl:value-of select="RollenName"/>
<xsl:text>)</xsl:text>
</xsl:if>
+-->
</actor>
</xsl:when>
<xsl:when test="@Kategorie='Regisseur'">
-------------- next part --------------
--
It does me no injury for my neighbor to say there are twenty gods or no God.
It neither picks my pocket nor breaks my leg.
-- Thomas Jefferson
More information about the mythtv-users
mailing list