Support hⓂ️s format for duration on CSV import

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2016-09-24 08:18:03 +03:00 committed by Dirk Hohndel
parent f4ca863a91
commit 71273945c6

View file

@ -183,7 +183,14 @@
<xsl:value-of select="$duration * 60"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$duration"/>
<xsl:choose>
<xsl:when test="string-length(translate($duration, translate($duration, ':', ''), '')) = 2">
<xsl:value-of select="concat(substring-before($duration, ':') * 60 + substring-before(substring-after($duration, ':'), ':'), ':', substring-after(substring-after($duration, ':'), ':'))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$duration"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>