Personal Video Database

English => Support => Topic started by: Ivek23 on December 13, 2011, 06:47:37 pm

Title: Year, Country, Duration for in the movie or people script
Post by: Ivek23 on December 13, 2011, 06:47:37 pm
Sorry if already posted the same topic.

I help edit the script (for people), but they are certain problems about data transfer for the year.

I know it helps me a part of this code for example 
Code: [Select]
if Pos('1978', TmpStr) > 0 then TmpStr1 := TmpStr1 + 'b. 1978';
TmpStr := StringReplace(TmpStr, '1978', '', true, true, true);
 
but it is quite time-consuming work by Whereas this piece of code re-need to write at least a hundred times.
It is necessary to insert all years between 1900 and 2000 .
I wonder if this is possible to edit in a different and more simple way.
Title: Re: Year for in the people script
Post by: nostra on December 15, 2011, 01:30:46 am
I do not understand the question :/
Do you need to find years in the source code of a web page or do you need to produce years from 1900 to 2000 for some other purpose?
Title: Re: Year, Country, Duration for in the movie or people script
Post by: Ivek23 on January 15, 2012, 07:46:29 am
I do not understand the question :/
Do you need to find years in the source code of a web page or do you need to produce years from 1900 to 2000 for some other purpose?

For both mentioned.

It would need to function of year for birthday and death fields.
When it appears in the info data for example, such data   b. 1911   and  d. 1986  then transferred to the above mentioned fields.
Title: Re: Year, Country, Duration for in the movie or people script
Post by: Ivek23 on January 15, 2012, 07:46:53 am
The question of different records for the length of the movies:

Example 1:
The source code the length of the movie the web site:
Code: [Select]
<tr><td valign="top">Notes: </td><td width="100%" class="notes">72 mins</td>or
Code: [Select]
<tr><td valign="top">Notes: </td><td width="100%" class="notes">72 minutes</td>or
Code: [Select]
<tr><td valign="top">Notes: </td><td width="100%" class="notes">1 hr 12 mins</td>or
Code: [Select]
<tr><td valign="top">Notes: </td><td width="100%" class="notes">Doll Prod., 72 mins.</td>or
Code: [Select]
<tr><td valign="top">Notes: </td><td width="100%" class="notes">Doll Prod., 1 hr 12 mins.</td>
Example 2:
The source code the length of the movie the web site:
Code: [Select]
<tr><td valign="top">Notes: </td><td width="100%" class="notes">112 mins</td>or
Code: [Select]
<tr><td valign="top">Notes: </td><td width="100%" class="notes">112 minutes</td>or
Code: [Select]
<tr><td valign="top">Notes: </td><td width="100%" class="notes">1 hr 52 mins</td>or
Code: [Select]
<tr><td valign="top">Notes: </td><td width="100%" class="notes">Video, 112 mins.</td>or
Code: [Select]
<tr><td valign="top">Notes: </td><td width="100%" class="notes">Video, 1 hr 52 mins.</td>
This code
Code: [Select]
//Duration
curpos := Pos('<td valign="top">Notes: ' , HTML);
LogMessage('getting durations')
EndPos := PosFrom(' min', HTML, curPos);
curPos := EndPos - 2;
Tmp := IntToStr(StrToInt(Copy(HTML, curPos, 2)));
LogMessage('Duration: ' + Tmp);
If Tmp <> '' then AddFieldValue(mfDuration, Tmp);

in example 1 works only for first source code, the second source code and for the fourth source code, in example 2 works only for first source code, the second source code and for the fourth source code, but there appears only what is in minutes.
I wonder or it may be in one piece of code, if it is of course possible to do.