Personal Video Database

English => Support => Topic started by: Ivek23 on June 11, 2011, 10:38:09 am

Title: Movieplayer script does not transfer most of the data [SOLVED]
Post by: Ivek23 on June 11, 2011, 10:38:09 am
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.
Title: Re: Movieplayer script does not transfer most of the data
Post by: Ivek23 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).
Title: Re: Movieplayer script does not transfer most of the data
Post by: Ivek23 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.
Title: Re: Movieplayer script does not transfer most of the data
Post by: Ivek23 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.
Title: Re: Movieplayer script does not transfer most of the data [SOLVED]
Post by: Ivek23 on January 16, 2012, 11:02:35 am
Now there is a new version here (http://www.videodb.info/forum_en/index.php/topic,3066.0.html#new), so the theme here is closed and locked.