Movie rating - decimals?
Hi,
I made the changes that I said (if I did not forget anything )
Can you check if it is better ?
I haven't tested the scripts, but it should work.
When reading rating, it can use a "." or the system-defined decimal separator (e.g. on my system it is a ",")
ftp://ftp2.antp.be/antp/temp/amc350.rar
The only thing that is not yet done is to not save each viewed movie if you modify one (so if you do not display decimals, modify one movie, all the next movies that you see will have their decimal removed)
I made the changes that I said (if I did not forget anything )
Can you check if it is better ?
I haven't tested the scripts, but it should work.
When reading rating, it can use a "." or the system-defined decimal separator (e.g. on my system it is a ",")
ftp://ftp2.antp.be/antp/temp/amc350.rar
The only thing that is not yet done is to not save each viewed movie if you modify one (so if you do not display decimals, modify one movie, all the next movies that you see will have their decimal removed)
OK, here are the problems I've found...
1)-script: you can read but not write to fieldRating (e.g. "SetField(fieldRating, '7.9');" {or '79' or '7,9' or even '7'} does not alter the rating value)
2)saving in xml saves rating in 7.9 format and when opening from xml rating can't be read
DivXManager Import worked OK, importing both digits...
waiting on the fixes...
1)-script: you can read but not write to fieldRating (e.g. "SetField(fieldRating, '7.9');" {or '79' or '7,9' or even '7'} does not alter the rating value)
2)saving in xml saves rating in 7.9 format and when opening from xml rating can't be read
DivXManager Import worked OK, importing both digits...
waiting on the fixes...
It was a stupid mistake in my code
here is a corrected version :
ftp://ftp2.antp.be/antp/temp/amc350.rar
here is a corrected version :
ftp://ftp2.antp.be/antp/temp/amc350.rar
I found this an important point when migrating to antmoviedb myself.
I've found that for some reason the import from imdb plugin imports numbers like xx.0 (78.0 instead of 7.8) no matter what I did to the code (when I tried to divide it by 10, it kept giving me an error - I guess that was because an integer cannot be a rational number). It did however import it into the database (the number 78.0) in grid view. But as soon as I looked at the same movie in non-grid view 78.0 changed to 10.0, and stayed that way. I wonder if there's something I've done wrong. I've also tried to use the said fieldRatingPercent variable, but it kept telling me there is no such thing. please help, if you can! thanks a million.
I've found that for some reason the import from imdb plugin imports numbers like xx.0 (78.0 instead of 7.8) no matter what I did to the code (when I tried to divide it by 10, it kept giving me an error - I guess that was because an integer cannot be a rational number). It did however import it into the database (the number 78.0) in grid view. But as soon as I looked at the same movie in non-grid view 78.0 changed to 10.0, and stayed that way. I wonder if there's something I've done wrong. I've also tried to use the said fieldRatingPercent variable, but it kept telling me there is no such thing. please help, if you can! thanks a million.
You should have read the whole conversation
I changed back to 0-10 ratings, but now with decimals.
So the script has to give e.g. '7.8' (as a string, with either a dot or Windows-defined decimal separator) and it will be kept '7.8' in the catalog except if you enable the new option that removes the decimal part
I haven't made yet any modification to IMDB script. I do not know what has been done or not by kolia ; I think he did not update the script for latest 3.5 version of AMC.
I changed back to 0-10 ratings, but now with decimals.
So the script has to give e.g. '7.8' (as a string, with either a dot or Windows-defined decimal separator) and it will be kept '7.8' in the catalog except if you enable the new option that removes the decimal part
I haven't made yet any modification to IMDB script. I do not know what has been done or not by kolia ; I think he did not update the script for latest 3.5 version of AMC.
As i said, I've already switched to amc3.5beta thus meaning that I have changed my Import script to get the new values...
just:
replace "Value := IntToStr(Round(StrToInt(StrGet(Line, BeginPos), 0) + (StrToInt(StrGet(Line, BeginPos + 2), 0) / 10)));"
with "Value := StrGet(Line, BeginPos) + '.' + StrGet(Line, BeginPos + 2);"
or replace "Value := StrGet(Line, BeginPos) + StrGet(Line, BeginPos + 2);"
with "Value := StrGet(Line, BeginPos) + '.' + StrGet(Line, BeginPos + 2);"
if you are using my earlier modification of the script...
very simple, wasn't it?
just:
replace "Value := IntToStr(Round(StrToInt(StrGet(Line, BeginPos), 0) + (StrToInt(StrGet(Line, BeginPos + 2), 0) / 10)));"
with "Value := StrGet(Line, BeginPos) + '.' + StrGet(Line, BeginPos + 2);"
or replace "Value := StrGet(Line, BeginPos) + StrGet(Line, BeginPos + 2);"
with "Value := StrGet(Line, BeginPos) + '.' + StrGet(Line, BeginPos + 2);"
if you are using my earlier modification of the script...
very simple, wasn't it?
the highest rated has 9
http://www.imdb.com/chart/top
http://www.imdb.com/chart/top