English > Support

Movieplayer script does not transfer most of the data [SOLVED]

(1/1)

Ivek23:
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: ---strDescription := Trim(HTMLToText(StringReplace(Copy(HTML, curPos, EndPos - curPos), '<p class="_film_plot">', '',true,false,false)));

--- End code ---

I replaced it with this code


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

--- End code ---

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.

Ivek23:
mfYear

For field mfYear I have this code

--- Code: ---
//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;


--- End code ---

replace with this code


--- Code: ---
//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;


--- End code ---

and now works correctly.

mfCountry

For field mfCountry I have this code

--- Code: ---
//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;


--- End code ---

replace with this code


--- Code: ---
 //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;



--- End code ---

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

Ivek23:

--- Quote from: Ivek23 on June 14, 2011, 04:37:48 pm ---mfYear

For field mfYear I have this code

--- Code: ---
//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;


--- End code ---

replace with this code


--- Code: ---
//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;


--- End code ---

and now works correctly.

mfCountry

For field mfCountry I have this code

--- Code: ---
//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;


--- End code ---

replace with this code


--- Code: ---
 //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;



--- End code ---

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


--- End quote ---

Only partly is solved this problem.

Ivek23:

--- Quote ---mfYear

For field mfYear I have this code

--- Code: ---
//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;


--- End code ---

replace with this code


--- Code: ---
//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;


--- End code ---

and now works correctly.

--- End quote ---

Correction:

mfYear

For field mfYear I have this code

--- Code: ---
//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;


--- End code ---

replace with this code


--- Code: ---
//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;


--- End code ---

and now works correctly, and I hope that is now solved this problem and hope it works properly.

Ivek23:
Now there is a new version here, so the theme here is closed and locked.

Navigation

[0] Message Index

Go to full version