vagskal;560611 Wrote:
> I forgot to mention that SBS is running on a PC with Swedish Win XP and
> the language in SBS is set to Swedish. Could it be that the calculation
> is depending on the set locale and thus expect a (Swedish) decimal comma
> instead of a decimal point?
>
I think it's a bug in my code, there is currently the following section
in the code (CustomScan/Modules/RatingTag.pm):
Code:
--------------------
$ratingNumber = $tags->{$tag};
if($ratingNumber && $ratingNumber =~ /^\d+$/) {
$ratingNumber = floor($ratingNumber*100/$ratingtagmax);
if($ratingNumber>100) {
$ratingNumber=100;
}
}
--------------------
The problem should be the following part:
$ratingNumber =~ /^\d+$/
This means that it will only do the rescale calculation on digits, so
in your case it sets the rating to 4.5 instead of 90/100 and in the
database it can probably only store integer so I'm guessing it stores
it as just 4.
You can try replacing that part with this and see if it works better:
$ratingNumber =~ /^\d+.?\d*$/
If you try this let me know if it worked, if you don't I'll put it on
the todo list to check for a future Custom Scan release.
--
erland
Erland Isaksson
'My homepage' (http://erland.isaksson.info) (Install my plugins through
Extension Downloader)
(Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse,
Custom Scan, Custom Skip, Multi Library, Title Switcher and Database
Query plugins'
(http://wiki.erland.isaksson.info/index.php/Category:SlimServer))
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=80305
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins