excaluber
09-07-2008, 09:02 PM
Hi,
I was previously using music collector, but i wasn't happy with the way they build the database....so i'm looking to convert to OrangeCD.
I had a template made up in Music collector so that i could export my collection for use on my Popcornhour (its a networked media tank). It takes the file link, and restructures the link for use on the popcornhour....
i notice the orangeCD template is very different tho, so i was hoping someone might be able to teach me a little bit on how to convert this XSL code for use in orangeCD.
ANY help would be appreciated
Heres a sample of the code...
<xsl:for-each select="{audiofile}">
<xsl:variable name="trailerlocation3">
<xsl:call-template name="converturlmusic">
<xsl:with-param name="audiofile" select="audiofile" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="music_ext"><xsl:call-template name="substring-after-last"><xsl:with-param name="string" select="audiofile" /><xsl:with-param name="delimiter" select="'.'" /></xsl:call-template></xsl:variable>
<!-- <xsl:choose>
<xsl:when test="$templatetype!='view'">
<xsl:call-template name="Music">
<xsl:with-param name="name" select="{$music_ext}"/>
<xsl:with-param name="path">../</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="Music">
<xsl:with-param name="name" select="{$music_ext}"/>
<xsl:with-param name="path"></xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose> -->
<xsl:choose>
<xsl:when test="$music_ext='mp3'">
<a href="{$trailerlocation3}" name="link1" class="playlabel" aod="">Play</a>
</xsl:when>
<xsl:when test="$music_ext='m4v' or $movie_ext='M4V'">
<a href="{$trailerlocation3}" name="link1" class="playlabel" vod="">Play</a>
</xsl:when>
<xsl:when test="$music_ext='mpg' or $movie_ext='MPG'">
<a href="{$trailerlocation3}" name="link1" class="playlabel" vod="">Play</a>
</xsl:when>
<xsl:when test="$music_ext='jsp' or $movie_ext='JSP'">
<a href="{$trailerlocation3}" name="link1" class="playlabel" aod="playlist">Play</a>
</xsl:when>
<xsl:when test="$music_ext='m4a'">
<a href="{$trailerlocation3}" name="link1" class="playlabel" aod="">Play</a>
</xsl:when>
<!-- OTHER FORMATS (wma, ...) -->
<xsl:otherwise>
<a class="playlabel" href="{$trailerlocation3}" name="link1" type="audio" aod="">Play</a> </xsl:otherwise>
</xsl:choose>
</xsl:for-each>
I was previously using music collector, but i wasn't happy with the way they build the database....so i'm looking to convert to OrangeCD.
I had a template made up in Music collector so that i could export my collection for use on my Popcornhour (its a networked media tank). It takes the file link, and restructures the link for use on the popcornhour....
i notice the orangeCD template is very different tho, so i was hoping someone might be able to teach me a little bit on how to convert this XSL code for use in orangeCD.
ANY help would be appreciated
Heres a sample of the code...
<xsl:for-each select="{audiofile}">
<xsl:variable name="trailerlocation3">
<xsl:call-template name="converturlmusic">
<xsl:with-param name="audiofile" select="audiofile" />
</xsl:call-template>
</xsl:variable>
<xsl:variable name="music_ext"><xsl:call-template name="substring-after-last"><xsl:with-param name="string" select="audiofile" /><xsl:with-param name="delimiter" select="'.'" /></xsl:call-template></xsl:variable>
<!-- <xsl:choose>
<xsl:when test="$templatetype!='view'">
<xsl:call-template name="Music">
<xsl:with-param name="name" select="{$music_ext}"/>
<xsl:with-param name="path">../</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="Music">
<xsl:with-param name="name" select="{$music_ext}"/>
<xsl:with-param name="path"></xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose> -->
<xsl:choose>
<xsl:when test="$music_ext='mp3'">
<a href="{$trailerlocation3}" name="link1" class="playlabel" aod="">Play</a>
</xsl:when>
<xsl:when test="$music_ext='m4v' or $movie_ext='M4V'">
<a href="{$trailerlocation3}" name="link1" class="playlabel" vod="">Play</a>
</xsl:when>
<xsl:when test="$music_ext='mpg' or $movie_ext='MPG'">
<a href="{$trailerlocation3}" name="link1" class="playlabel" vod="">Play</a>
</xsl:when>
<xsl:when test="$music_ext='jsp' or $movie_ext='JSP'">
<a href="{$trailerlocation3}" name="link1" class="playlabel" aod="playlist">Play</a>
</xsl:when>
<xsl:when test="$music_ext='m4a'">
<a href="{$trailerlocation3}" name="link1" class="playlabel" aod="">Play</a>
</xsl:when>
<!-- OTHER FORMATS (wma, ...) -->
<xsl:otherwise>
<a class="playlabel" href="{$trailerlocation3}" name="link1" type="audio" aod="">Play</a> </xsl:otherwise>
</xsl:choose>
</xsl:for-each>