Author Topic: Movieplayer script does not transfer most of the data [SOLVED]  (Read 8014 times)

0 Members and 1 Guest are viewing this topic.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Movieplayer script does not transfer most of the data.

Movie filds, which transmit the data:
mfDescription
where I made ​​an adjustment to now properly transfer data;

this code

Code: [Select]
strDescription := Trim(HTMLToText(StringReplace(Copy(HTML, curPos, EndPos - curPos), '<p class="_film_plot">', '',true,false,false)));

I replaced it with this code

Code: [Select]
strDescription := Trim(HTMLToText(StringReplace(Copy(HTML, curPos+49, EndPos - curPos-49), '<p class="_film_plot">', '',true,false,false)));

now works correctly.

mfOrigTitle,
mfURL,
mfGenre
and
smPoster
.

Other movie filds, does not work, would do well if this is corrected by it will then work properly.
Thanks.
« Last Edit: January 16, 2012, 10:59:29 am 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: 2711
    • View Profile
Re: Movieplayer script does not transfer most of the data
« Reply #1 on: June 14, 2011, 04:37:48 pm »
mfYear

For field mfYear I have this code
Code: [Select]

//Anno
 curPos := Pos('> del', HTML);
 if curPos > 0 then begin
  curPos := curPos + 6;
  EndPos := PosFrom(',', HTML, curPos);
  AddFieldValue(mfYear, Trim(Copy(HTML, curPos , Endpos - curPos )));
  LogMessage('Anno: ' + Trim(Copy(HTML, curPos , Endpos - curPos )));
 end;


replace with this code

Code: [Select]

//Anno
 curPos := Pos('Prodotto nel', HTML);
 if curPos > 0 then begin
  curPos := curPos + 12;
  EndPos := PosFrom('.', HTML, curPos) - 7;
  AddFieldValue(mfYear, Trim(Copy(HTML, curPos , Endpos - curPos )));
  LogMessage('Anno: ' + Trim(Copy(HTML, curPos , Endpos - curPos )));
 end;


and now works correctly.

mfCountry

For field mfCountry I have this code
Code: [Select]

//Country
 curPos := Pos('Prodotto in', HTML);
 if curPos > 0 then begin
  curPos := curPos + 12;
  EndPos := PosFrom('.', HTML, curPos);
  AddFieldValue(mfCountry, Trim(Copy(HTML, curPos , Endpos - curPos )));
  LogMessage('Country: ' + Trim(Copy(HTML, curPos , Endpos - curPos )));
 end;


replace with this code

Code: [Select]

 //Country
 curPos := Pos('Prodotto nel', HTML);
 if curPos > 0 then begin
  curPos := curPos + 21;
  EndPos := PosFrom('.', HTML, curPos);
  AddFieldValue(mfCountry, Trim(Copy(HTML, curPos , Endpos - curPos )));
  LogMessage('Country: ' + Trim(Copy(HTML, curPos , Endpos - curPos )));
  //AddCustomFieldValueByName('Country2', Trim(Copy(HTML, curPos , Endpos - curPos)));
 end;



and now works correctly, the rest do not know (yet).
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: 2711
    • View Profile
Re: Movieplayer script does not transfer most of the data
« Reply #2 on: June 14, 2011, 06:33:07 pm »
mfYear

For field mfYear I have this code
Code: [Select]

//Anno
 curPos := Pos('> del', HTML);
 if curPos > 0 then begin
  curPos := curPos + 6;
  EndPos := PosFrom(',', HTML, curPos);
  AddFieldValue(mfYear, Trim(Copy(HTML, curPos , Endpos - curPos )));
  LogMessage('Anno: ' + Trim(Copy(HTML, curPos , Endpos - curPos )));
 end;


replace with this code

Code: [Select]

//Anno
 curPos := Pos('Prodotto nel', HTML);
 if curPos > 0 then begin
  curPos := curPos + 12;
  EndPos := PosFrom('.', HTML, curPos) - 7;
  AddFieldValue(mfYear, Trim(Copy(HTML, curPos , Endpos - curPos )));
  LogMessage('Anno: ' + Trim(Copy(HTML, curPos , Endpos - curPos )));
 end;


and now works correctly.

mfCountry

For field mfCountry I have this code
Code: [Select]

//Country
 curPos := Pos('Prodotto in', HTML);
 if curPos > 0 then begin
  curPos := curPos + 12;
  EndPos := PosFrom('.', HTML, curPos);
  AddFieldValue(mfCountry, Trim(Copy(HTML, curPos , Endpos - curPos )));
  LogMessage('Country: ' + Trim(Copy(HTML, curPos , Endpos - curPos )));
 end;


replace with this code

Code: [Select]

 //Country
 curPos := Pos('Prodotto nel', HTML);
 if curPos > 0 then begin
  curPos := curPos + 21;
  EndPos := PosFrom('.', HTML, curPos);
  AddFieldValue(mfCountry, Trim(Copy(HTML, curPos , Endpos - curPos )));
  LogMessage('Country: ' + Trim(Copy(HTML, curPos , Endpos - curPos )));
  //AddCustomFieldValueByName('Country2', Trim(Copy(HTML, curPos , Endpos - curPos)));
 end;



and now works correctly, the rest do not know (yet).


Only partly is solved this problem.
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: 2711
    • View Profile
Re: Movieplayer script does not transfer most of the data
« Reply #3 on: June 14, 2011, 06:52:58 pm »
Quote
mfYear

For field mfYear I have this code
Code: [Select]

//Anno
 curPos := Pos('> del', HTML);
 if curPos > 0 then begin
  curPos := curPos + 6;
  EndPos := PosFrom(',', HTML, curPos);
  AddFieldValue(mfYear, Trim(Copy(HTML, curPos , Endpos - curPos )));
  LogMessage('Anno: ' + Trim(Copy(HTML, curPos , Endpos - curPos )));
 end;


replace with this code

Code: [Select]

//Anno
 curPos := Pos('Prodotto nel', HTML);
 if curPos > 0 then begin
  curPos := curPos + 12;
  EndPos := PosFrom('.', HTML, curPos) - 7;
  AddFieldValue(mfYear, Trim(Copy(HTML, curPos , Endpos - curPos )));
  LogMessage('Anno: ' + Trim(Copy(HTML, curPos , Endpos - curPos )));
 end;


and now works correctly.

Correction:

mfYear

For field mfYear I have this code
Code: [Select]

//Anno
 curPos := Pos('> del', HTML);
 if curPos > 0 then begin
  curPos := curPos + 6;
  EndPos := PosFrom(',', HTML, curPos);
  AddFieldValue(mfYear, Trim(Copy(HTML, curPos , Endpos - curPos )));
  LogMessage('Anno: ' + Trim(Copy(HTML, curPos , Endpos - curPos )));
 end;


replace with this code

Code: [Select]

//Anno
 curPos := Pos('Prodotto nel', HTML);
 if curPos > 0 then begin
  curPos := curPos + 12;
  EndPos := PosFrom('in', HTML, curPos);
  AddFieldValue(mfYear, Trim(Copy(HTML, curPos , Endpos - curPos )));
  LogMessage('Anno: ' + Trim(Copy(HTML, curPos , Endpos - curPos )));
 end;


and now works correctly, and I hope that is now solved this problem and hope it works properly.
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: 2711
    • View Profile
Re: Movieplayer script does not transfer most of the data [SOLVED]
« Reply #4 on: January 16, 2012, 11:02:35 am »
Now there is a new version here, so the theme here is closed and locked.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD