Before the end of 2017 the board will be down for a brief period of time for an upgrade.
Past experience says less than 30 minutes but I can't predict the future.
Also, there is a high probability that the forum will move to a different host, but that will not happen in 2017.
Thanks,
Doug

Convert bitrate to integer

Discuss using and your tips/tricks for CATraxx
ckoiner
Posts: 2
Joined: Mon Jul 17, 2017 3:26 pm

Convert bitrate to integer

Postby ckoiner » Mon Jul 17, 2017 3:33 pm

Years ago, I requested and received a way to add a bitrate field to my html export.

<xsl:value-of select="sum(../trackdata/disc/side/track/audiosample/bitrate) div (count(../trackdata /disc/side/track/audiosample[bitrate>0]))"/>

In my previous html exports, the bitrate has shown up as an integer (example www.myalbumcollection.com).

I recently updated to the newest version of CATraxx, and when I use the same code, the bitrate field lists decimal places, not just an integer.

Can anyone give me any help in correcting or updating the code so that reports the bitrate field as an integer? Many thanks!

User avatar
LotsOCds
Posts: 169
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Convert bitrate to integer

Postby LotsOCds » Tue Jul 18, 2017 1:43 pm

I am far away from my CATraxx computer so I can't test it, however this should work:

Code: Select all

<xsl:value-of select="round(sum(../trackdata/disc/side/track/audiosample/bitrate) div (count(../trackdata /disc/side/track/audiosample[bitrate>0])))"/>
Cheers,
Dave

ckoiner
Posts: 2
Joined: Mon Jul 17, 2017 3:26 pm

Re: Convert bitrate to integer

Postby ckoiner » Wed Jul 19, 2017 4:10 am

Worked great! Thank you so much!


Return to “Using CATraxx”

Who is online

Users browsing this forum: No registered users and 1 guest