BinaryWorks.it Official Forum
BinaryWorks.it Official Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
 All Forums
 eXtreme Movie Manager (Rel. 7), No More Updates
 Scripts
 Decimal separator bug - rating acquisition
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

natta
Starting Member

5 Posts

Posted - 15 Sep 2009 :  09:57:49  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I have a bug probably due to numeric conventions across countries; it happens with a specific script but I guess it's generic

I uses "mymovies.it script” to grab info such as the movie rating. This is a number which is a single float from 0 to 5 with 2 digit decimals. Such rating is acquired directly from the website. However, the number is truncated to the integer digit, say in stead of a "3,65" rating, it becames just "3" after the script grabs it and send to the DB the single float.

It might be due to the fact that an Italian language website uses "," as a decimal separator and not “.” So the Ex Mv Mgr function called from the script to translate the “rating string” acquired in the HTML to single float DB field is confused by having a "," as a decimal separator unlike english. Hence it probably stops there the conversion.

Is this a known issue ? Any solution ? On a 5 point ratings, decimal are important !! Steve

JDommi
Administrator

Germany
4683 Posts

Posted - 15 Sep 2009 :  11:06:13  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Just replace the #RATING# part with this code. It only replaces the decimal comma with a decimal point, if that's the only problem is...

#RATING#
#STARTREADWEB#
#FINDLINE#=<i>mymonetro</i>#12# #ONERROR#=*STOP*
#FIND#=</i>#01# #ONERROR#=*STOP*
#FIND#=>#01# #ONERROR#=*STOP*
#FIND#=,#02# #ONERROR#=*STOP*
#TAKEWORD#=#03#,#01#,#02#
#FIND#= stelle#01# #ONERROR#=*STOP*
#TAKEWORD#=#04#,#02#,#01#
#STRING#=#03#=#03#.#04#
#TAKERATING#=#03#
#RESTOREMAIN#
#ENDRATING#


In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

natta
Starting Member

5 Posts

Posted - 15 Sep 2009 :  11:40:37  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by JDommi

Just replace the #RATING# part with this code. It only replaces the decimal comma with a decimal point, if that's the only problem is...



Ehy ... JDommi it works !!!! It is now taking the 2 digit decimals ! Perfect. Thanks a lot.

That was the problem. It should be part of the default code mymovies code now :-) Where do I suggesto to make this change change official for Mymoves.txt script ?

Ciao
Go to Top of Page

JDommi
Administrator

Germany
4683 Posts

Posted - 15 Sep 2009 :  11:46:16  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Just send the updated script to alessioviti@binaryworks.it and he will put it in the updates ;)

In order to achieve what is possible, you have to try the impossible over and over again.
Hermann Hesse
Go to Top of Page

natta
Starting Member

5 Posts

Posted - 15 Sep 2009 :  15:40:31  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

Done, crediting you. He should upload the new one.

quote:
Originally posted by JDommi

Just send the updated script to alessioviti@binaryworks.it and he will put it in the updates ;)

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BinaryWorks.it Official Forum © Binaryworks.it Go To Top Of Page
Generated in 0.12 sec. Powered By: Snitz Forums 2000 Version 3.4.07