Author Topic: mymovies.it rating:custom items  (Read 12704 times)

0 Members and 1 Guest are viewing this topic.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2740
    • View Profile
mymovies.it rating:custom items
« on: March 19, 2010, 01:05:14 pm »
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
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2740
    • View Profile
Re: mymovies.it rating:custom items
« Reply #1 on: March 19, 2010, 08:07:07 pm »
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]
« Last Edit: March 19, 2010, 08:21:53 pm by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2740
    • View Profile
Re: mymovies.it rating:custom items
« Reply #2 on: March 19, 2010, 08:19:25 pm »
Let the Internet address does not interfere because it is in the script
and must be otherwise you script will not work.

Cheers
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Zacca

  • User
  • ***
  • Posts: 117
    • View Profile
Re: mymovies.it rating:custom items
« Reply #3 on: March 20, 2010, 12:30:08 pm »
Thanks for the info....i'll test it  :)

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2740
    • View Profile
Re: mymovies.it rating:custom items
« Reply #4 on: March 23, 2010, 07:01:04 pm »
Thanks for the info....i'll test it  :)

How they work script
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline Zacca

  • User
  • ***
  • Posts: 117
    • View Profile
Re: mymovies.it rating:custom items
« Reply #5 on: March 26, 2010, 06:27:41 pm »
opps sorry
I'v test it and it work fine  ;D
Thanks for the mod

 

anything