Album Rating

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

popper
Posts: 34
Joined: Mon Feb 21, 2005 5:10 pm
Location: Germany

Making it compatible to non-english versions of Windows

Post by popper »

Risser wrote:Here's what I came up with. Shamelessly cribbed from Pablo's Magic Nodes script.
Risser, thanks a lot for sharing this with us.

One little problem though: as in Pablo's script before version 1.2b, the formatting of the rating value will not work correctly when the default decimal delimiter is not a dot but a comma, like it is e.g. in Germany. So I, too, used a snippet from Pablo's Magic Nodes script to fix that problem.

Put the following below the "DummyFunct":

Code: Select all

Function FormatNumberInt(n, decimals)
	Dim pos 
	pos = InStr(n,".")
	If pos = 0 Then
		FormatNumberInt = n & "." & String(decimals,"0")
	Else
		Dim oldDecimals
		oldDecimals = Len(n) - pos
		If decimals > oldDecimals Then
			FormatNumberInt = n & String(decimals-oldDecimals,"0")
		Else
			FormatNumberInt = Left(n,pos+decimals)
		End If
	End if
End Function
... and then change the following line:

Code: Select all

      
'formattedScore = FormatNumber(avgScore, 2)
formattedScore = FormatNumberInt(avgScore, 2)
popper
istanbul
Posts: 15
Joined: Tue Oct 02, 2007 11:51 am

Post by istanbul »

Would anyone be interested in updating this script for MM3?
crabby7
Posts: 6
Joined: Sun May 18, 2008 3:47 pm

Post by crabby7 »

Would be great... I've posted a question in magic nodes thread to see if there was a chance to have it working within magic nodes.
Post Reply