English > Support

mymovies.it rating:custom items

(1/2) > >>

Ivek23:
I wonder if possible that is even mymovies.it rating to edit the script that will be visible in custom items and what to enter where.

Thanks

Ivek23:
For those who would like to have Mymovies rating in custom fields (custom section)
here is a solution

instead, the original

 //Rating

 curPos := Pos('http://www.mymovies.it/v7/img/mymonetro_incassi_sopra.png', HTML);
 curPos := PosFrom('margin:0px 11px 7px 11px">', HTML, curPos);
 if curPos > 0 then begin
  curPos := curPos + 26;
  EndPos := PosFrom('<', HTML, curPos);
  AddFieldValue(mfRating, FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2));  
  LogMessage('Rating:' + FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2));
 end else
  curPos := EndPos;
end;


paste this

 //Rating

 curPos := Pos('http://www.mymovies.it/v7/img/mymonetro_incassi_sopra.png', HTML);
 AddCustomFieldValueByName('MyMovies Rating', '0');
 curPos := PosFrom('margin:0px 11px 7px 11px">', HTML, curPos);
 if curPos > 0 then begin
  curPos := curPos + 26;
  EndPos := PosFrom('<', HTML, curPos);
 AddCustomFieldValueByName('MyMovies Rating', FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2));  
  LogMessage('Rating:' + FloatToStr(StrToFloat(Copy(HTML, curPos, EndPos - curPos)) * 2));
 end else
  curPos := EndPos;
end;

and this should work

at my work
as seen on picture



[attachment deleted by admin]

Ivek23:
Let the Internet address does not interfere because it is in the script
and must be otherwise you script will not work.

Cheers

Zacca:
Thanks for the info....i'll test it  :)

Ivek23:

--- Quote from: Zacca on March 20, 2010, 12:30:08 pm ---Thanks for the info....i'll test it  :)

--- End quote ---

How they work script

Navigation

[0] Message Index

[#] Next page

Go to full version