Personal Video Database

English => Development => Scripts and Templates => Topic started by: Isolki on July 30, 2012, 08:16:37 pm

Title: CDUniverse script
Post by: Isolki on July 30, 2012, 08:16:37 pm
Hello everyone,

I just registered on this forum and i wanted to post a script i made for CDUniverse.
It's not that easy to handle all particular pages, so there may be error messages sometimes  :-[
For now, only the following movie fields are updated from the website :
- Poster, URL, Original title, Studio, Actors and Year

Isolki

[attachment deleted by admin]
Title: Re: CDUniverse script
Post by: Ivek23 on August 01, 2012, 03:25:27 pm
Thank you, Isolki.
You can add anything else, for example Rating, Running Time or the Release Date.

For Release Date  use this one piece of code:
Code: [Select]
AddFieldValueXML('release', lText);
To help the attached list.

PVD XML List attached.

[attachment deleted by admin]
Title: Re: CDUniverse script
Post by: Isolki on August 01, 2012, 03:56:06 pm
You're welcome  :)
I've just added the fields you told me about.
The following fields are now updated from the website :
- Poster, URL, Original title, Orig Year, Category, Studio, Rating, Description, Duration and Release Date.

I've also improved the Actors import.
Here is the version 0.2.0.0

[attachment deleted by admin]
Title: Re: CDUniverse script
Post by: Ivek23 on August 01, 2012, 04:45:04 pm
Rating does not work.

It is necessary to add this one piece of code,
Code: [Select]
//AddFieldValue(K_MOVIE_MPAA, lText);
AddFieldValueXML('mpaa', lText);
or example, this
Code: [Select]
{ Movie mpaa }
lPosition := Pos(K_MOVIE_MPAA_TRT, HTML);
lText := TextBetween(HTML, K_MOVIE_MPAA_BGN, K_MOVIE_MPAA_END, False, lPosition);
//AddFieldValue(K_MOVIE_MPAA, lText);
AddFieldValueXML('mpaa', lText);
LogMessage('lMoviempaa : ' + lText);
and will it work this time.

You can add this -  DVD Features:
Code: [Select]
K_MOVIE_DVD_TRT = ' DVD Features</span></span></h2>';
K_MOVIE_DVD_BGN = '<p>';
K_MOVIE_DVD_END = '</p></div>';
        .
        .
        .
        .
        .
{ Movie dvd }
lPosition := Pos(K_MOVIE_DVD_TRT, HTML);
lPosBgn := PosFrom(K_MOVIE_DVD_BGN, HTML, lPosition);
lPosEnd := PosFrom(K_MOVIE_DVD_END, HTML, lPosBgn);
lText := Trim(Copy(HTML, lPosBgn+3, lPosEnd - lPosBgn-3));
AddFieldValue(K_MOVIE_FEATURES, lText);
LogMessage('lMovieDvd : ' + lText);
Title: Re: CDUniverse script
Post by: Ivek23 on August 03, 2012, 12:31:05 pm
Duration also does not work.

It is necessary to add this one piece of code,
Code: [Select]
//K_MOVIE_RUNNING_TIME_TRT = '">Running Time</td>';
//K_MOVIE_RUNNING_TIME_BGN = '<td>';
//K_MOVIE_RUNNING_TIME_END = ' Minutes</td></tr>';
        .
        .
        .
        .
        .
{ Movie running time }
lText := FloatToStr(StrToFloat(HTMLValues2(HTML, '">Running Time</td>', '</tr>', '<td>', ' Minutes</td></tr>', ', ', lPosEnd)) * 60); 
AddFieldValueXML('length', lText);
LogMessage('Running time : ' + lText);
and will it work this time.
Title: Re: CDUniverse script
Post by: Isolki on August 14, 2012, 03:01:44 am
Thank you for your review Ivek !

I have modified duration and rating in order to use 'length' and 'mpaa' fields.
I've also added DVD features.

The following fields should now be updated correctly from the website :
- Poster, URL, Original title, Orig Year, Category, Studio, Rating, Description, Duration, Release Date and DVD Features.

Here is the version 0.3.0.0

[attachment deleted by admin]
Title: Re: CDUniverse script
Post by: Ivek23 on August 14, 2012, 02:37:15 pm
Thank you for your review Ivek !

Welcome and thank you to modify the script.

The comment field could be put together the following information:
- DVD Encoding
- Discs
- Movie Details


Code: [Select]
AddFieldValueXML('comment', fullinfo);
How to combine multiple information in one field, it is a nice illustrated in the following scripts:

IAFD people (http://www.videodb.info/download.php?ftype=1&file=iafd_people.zip) or
Egafd people+ script (http://www.videodb.info/forum_en/index.php/topic,3080.0.html) or
Egafd movie+ script (http://www.videodb.info/forum_en/index.php/topic,3081.0.html)

Title: Re: CDUniverse script
Post by: AimHere on May 09, 2013, 10:15:50 pm
Whatever happened to this script, anyway? Any further updates?
Title: Re: CDUniverse script
Post by: Isolki on September 09, 2013, 10:42:27 pm
Hi again!

I've just added the number of Discs and the Movie Details into the comments section.
I'm not sure of what you are talking about with DVD Encoding.
Are you talking about the DVD Region ?

Thanks again for your feedback.
Title: Re: CDUniverse script
Post by: Ivek23 on September 10, 2013, 07:03:19 am
Hi again!

I've just added the number of Discs and the Movie Details into the comments section.

Thank you.

I'm not sure of what you are talking about with DVD Encoding.
Are you talking about the DVD Region ?

Yes, exactly what I had in mind.
Title: Re: CDUniverse script
Post by: Ivek23 on September 10, 2013, 08:00:10 am
In Movie MPAA replace this code
Code: [Select]
{ Movie MPAA }
lPosition := Pos(K_MOVIE_MPAA_TRT, HTML);
lText := TextBetween(HTML, K_MOVIE_MPAA_BGN, K_MOVIE_MPAA_END, False, lPosition);
AddFieldValueXML('mpaa', lText);
LogMessage('+ Movie MPAA : ' + lText);
replace with this code
Code: [Select]
{ Movie MPAA }
lPosition := Pos(K_MOVIE_MPAA_TRT, HTML);
lText := TextBetween(HTML, K_MOVIE_MPAA_BGN, K_MOVIE_MPAA_END, False, lPosition);
lText := StringReplace(lText, ' (MPAA)', '', true, false, true);
AddFieldValueXML('mpaa', lText);
LogMessage('+ Movie MPAA : ' + lText);
and will remove part of the word (MPAA) [see picture].

The data is written to the standard MPAA field and this word is there is totally unnecessary.
Title: Re: CDUniverse script
Post by: Ivek23 on March 20, 2016, 04:16:48 pm
I fixed the error, now the script again transferred to the movie information, but there are errors in the transfer of posters, which often cduniverse script blocks and then does not transmit any information.

Mainly due to these errors is added cduniverse1 script, where these problems are now no longer exist and as a consequence, no longer blocking the transmission of information, because the blocked part of the code in the script for download posters.

If anyone from users can correct this error in cduniverse script, this solution is very welcome.

cduniverse script and cduniverse1 script and the script is attached.