English > Scripts and Templates

Silent Mode

<< < (2/3) > >>

mgpw4me@yahoo.com:
I nearly have the IMDB person verification code complete on the script for image searches.  The configuration settings I have planned are as follows:

// CONFIGURATION:     Configuration settings supported by this script:
//                    IMAGE_LARGE     'False'    default value. Images under 1024 X 768 are preferred.
//                                            'True'     images 1024 X 768 or larger are preferred.
//                    IMDB_IMAGES     'False'    default value, Images from IMDB won't be included.
//                                            'True'     search will include IMDB images.
//                    IMDB_VALIDATE  'True'     default value. Person must be listed in IMDB for images to be downloaded.
//                                            'False'    IMDB data will be used, if available, but isn't required.
//                    NUDITY              'False'    default value.  Sites with nudity will not be listed.
//                                            'True'     Nudity sites are allowed, but listed last.
//                    SEARCH_AKA       'False'    default value.  AKAs for people will not be searched.
//                                            'True'     searches will be repeated for AKAs on each site, if nothing is found for the 'primary' name.
//                    MAX_LINKS         '50'       default value.  Limit results to 50 image gallery links.

I'd appreciate feedback from any interested party on both the configuration options, as well as their default values.  Suggestions for other options I've missed would be even better.

nostra:
Oh man, for a programmer you talk pretty much :)

1. You can't check if Silent mode is on from the script, but. in fact, I do not see any problems here as PVD only automatically retrieves entries having [bold]1 100% match[/bold], so if you pass multiple identical entries the whole movie/person will be skipped preventing retrieving wrong data.
2. You can retrieve the contents of most fields by calling GetFieldValue(FieldID : Integer);
Here are those ids:
--- Code: ---mfMID          = 0;
  mfNum          = 1;
  mfTitle        = 2;
  mfOrigtitle    = 3;
  mfAka          = 4;
  mfYear         = 5;
  mfMPAA         = 6;
  mfRelease      = 7;
  mfURL          = 8;
  mfIMDBRating   = 9;
  mfRating       = 10;
  mfOtherRating  = 11;
  mfOtherName    = 12;
  mfLocation     = 13;
  mfTagline      = 14;
  mfDescription  = 15;
  mfComment      = 16;
  mfDateAdded    = 17;
  mfModDate      = 18;
  mfReleaseDate  = 19;
  mfBudget       = 20;
  mfMoney        = 21;
  mfAspectRatio  = 22;
  mfOrigLang     = 23;
  mfQuality      = 24;
  mfLength       = 25;
  mfResolution   = 26;
  mfFrameRate    = 27;
  mfVideoCodec   = 28;
  mfVideoBitrate = 29;
  mfSize         = 30;
  mfPath         = 31;
  mfMediaType    = 32;
  mfMediaCount   = 33;
  mfFeatures     = 34;
  mfBarcode      = 35;
  mfViewed       = 36;
  mfViewDate     = 37;
  mfWish         = 38;
  mfBookmark     = 39;
  mfLoaned       = 40;
  mfSeries       = 41;
  mfEPID         = 42;
  mfVisible      = 43;
  mfParentSeason = 44;
  mfEpisode      = 45;
  mfSeason       = 46;
  mfGenres       = 47;
  mfCountries    = 48;
  mfCategory     = 49;
  mfLabels       = 50;
  mfSubs         = 51;
  mfStudios      = 52;
  mfTags         = 53;
  mfActors       = 54;
  mfDirectors    = 55;
  mfWriters      = 56;
  mfComposers    = 57;
  mfProducers    = 58;
  mfBorrower     = 59;
  mfLoanDate     = 60;
  mfLoanPeriod   = 61;
  mfUserMail     = 62;
  mfLinks        = 63;
  mfAwards       = 64;
  mfAudioStreams = 65;
  mfPoster       = 66;
  mfScreenshots  = 67;
  mfFrontCover   = 68;
  mfCDCover      = 69;
  mfCredits      = 70;
  mfEpisodes     = 71;
  mfLanguages    = 72;
  mfTranslations = 73;
  mfAudioBitrate = 74;
  mfAudioCodec   = 75;
  mfChannels     = 76;
  mfSampling     = 77;
  mfAudioCount   = 78;
  mfExtension    = 79;
  mfImageList    = 80;
  mfAwardWon     = 81;
  mfAwardEvent   = 82;
  mfAwardYear    = 83;
  mfAwardCat     = 84;

  //Person values
  pfPID          = 0;
  pfName         = 1;
  pfTransName    = 2;
  pfAltNames     = 3;
  pfBirthday     = 4;
  pfDeath        = 5;
  pfBirthplace   = 6;
  pfURL          = 7;
  pfRating       = 8;
  pfDateAdded    = 9;
  pfModDate      = 10;
  pfBio          = 11;
  pfComment      = 12;
  pfBookmark     = 13;
  pfVisible      = 14;
  pfGenres       = 15;
  pfAge          = 16;
  pfFilmography  = 17;
  pfCareer       = 18;
  pfAwards       = 19;
  pfPhoto        = 20;
  pfImageList    = 21;
--- End code ---
3. I do not really like the idea of multiple sources in one script. I think it is better to have multiple scripts which you can combine using batch files...


--- Quote ---If I had access to the url via script, I'd actually write a script to pull all the images from IMDB and put up a list to select from.  I'd write a dll and just deal with the whole thing, but I'm using the free c++ builder and it doesn't support adding components.  My old c++ builder supports components, but it's version 1.0 so current component structures aren't supported (ie. can't be added).
--- End quote ---

Why don't you want to use Visual Studio Express??? It's free and pretty full featured for this task. There are some C++ headers already made by another user some time ago: http://www.videodb.info/forum_en/index.php?topic=1211.0 (could be not quite compatible with the current configuration, but still a good point to start)

mgpw4me@yahoo.com:

--- Quote from: nostra on January 16, 2010, 02:04:06 am ---Oh man, for a programmer you talk pretty much :)

1. You can't check if Silent mode is on from the script, but. in fact, I do not see any problems here as PVD only automatically retrieves entries having [bold]1 100% match[/bold], so if you pass multiple identical entries the whole movie/person will be skipped preventing retrieving wrong data.
2. You can retrieve the contents of most fields by calling GetFieldValue(FieldID : Integer);
Here are those ids:
--- Code: ---mfMID          = 0;
  mfNum          = 1;
  mfTitle        = 2;
  mfOrigtitle    = 3;
  mfAka          = 4;
  mfYear         = 5;
  mfMPAA         = 6;
  mfRelease      = 7;
  mfURL          = 8;
  mfIMDBRating   = 9;
  mfRating       = 10;
  mfOtherRating  = 11;
  mfOtherName    = 12;
  mfLocation     = 13;
  mfTagline      = 14;
  mfDescription  = 15;
  mfComment      = 16;
  mfDateAdded    = 17;
  mfModDate      = 18;
  mfReleaseDate  = 19;
  mfBudget       = 20;
  mfMoney        = 21;
  mfAspectRatio  = 22;
  mfOrigLang     = 23;
  mfQuality      = 24;
  mfLength       = 25;
  mfResolution   = 26;
  mfFrameRate    = 27;
  mfVideoCodec   = 28;
  mfVideoBitrate = 29;
  mfSize         = 30;
  mfPath         = 31;
  mfMediaType    = 32;
  mfMediaCount   = 33;
  mfFeatures     = 34;
  mfBarcode      = 35;
  mfViewed       = 36;
  mfViewDate     = 37;
  mfWish         = 38;
  mfBookmark     = 39;
  mfLoaned       = 40;
  mfSeries       = 41;
  mfEPID         = 42;
  mfVisible      = 43;
  mfParentSeason = 44;
  mfEpisode      = 45;
  mfSeason       = 46;
  mfGenres       = 47;
  mfCountries    = 48;
  mfCategory     = 49;
  mfLabels       = 50;
  mfSubs         = 51;
  mfStudios      = 52;
  mfTags         = 53;
  mfActors       = 54;
  mfDirectors    = 55;
  mfWriters      = 56;
  mfComposers    = 57;
  mfProducers    = 58;
  mfBorrower     = 59;
  mfLoanDate     = 60;
  mfLoanPeriod   = 61;
  mfUserMail     = 62;
  mfLinks        = 63;
  mfAwards       = 64;
  mfAudioStreams = 65;
  mfPoster       = 66;
  mfScreenshots  = 67;
  mfFrontCover   = 68;
  mfCDCover      = 69;
  mfCredits      = 70;
  mfEpisodes     = 71;
  mfLanguages    = 72;
  mfTranslations = 73;
  mfAudioBitrate = 74;
  mfAudioCodec   = 75;
  mfChannels     = 76;
  mfSampling     = 77;
  mfAudioCount   = 78;
  mfExtension    = 79;
  mfImageList    = 80;
  mfAwardWon     = 81;
  mfAwardEvent   = 82;
  mfAwardYear    = 83;
  mfAwardCat     = 84;

  //Person values
  pfPID          = 0;
  pfName         = 1;
  pfTransName    = 2;
  pfAltNames     = 3;
  pfBirthday     = 4;
  pfDeath        = 5;
  pfBirthplace   = 6;
  pfURL          = 7;
  pfRating       = 8;
  pfDateAdded    = 9;
  pfModDate      = 10;
  pfBio          = 11;
  pfComment      = 12;
  pfBookmark     = 13;
  pfVisible      = 14;
  pfGenres       = 15;
  pfAge          = 16;
  pfFilmography  = 17;
  pfCareer       = 18;
  pfAwards       = 19;
  pfPhoto        = 20;
  pfImageList    = 21;
--- End code ---
3. I do not really like the idea of multiple sources in one script. I think it is better to have multiple scripts which you can combine using batch files...


--- Quote ---If I had access to the url via script, I'd actually write a script to pull all the images from IMDB and put up a list to select from.  I'd write a dll and just deal with the whole thing, but I'm using the free c++ builder and it doesn't support adding components.  My old c++ builder supports components, but it's version 1.0 so current component structures aren't supported (ie. can't be added).
--- End quote ---

Why don't you want to use Visual Studio Express??? It's free and pretty full featured for this task. There are some C++ headers already made by another user some time ago: http://www.videodb.info/forum_en/index.php?topic=1211.0 (could be not quite compatible with the current configuration, but still a good point to start)

--- End quote ---

Too much government work...meetings are easy money.  Wait 'til you see my code...comments are everywhere, and have a debug mode built-in.  Should be a good source for future reference and easy (as it gets) to maintain.

Thanks for the very useful comments.

1) With the ability to verify people info against the html, silent mode isn't an issue.

2) Kewl.  I have IMDB parsed out, but will be able to reduce my code size significantly with this.

3) That was my original intent.  If you prefer this, I also do.  Multiple sources are very messy to deal with.  This also eliminates the need to do more than document the type of content on each site.

I'll backtrack and start churning out scripts.  I'll post them in batches of 6.

I'll have to look at Visual Studio Express sometime.  That's the Microsoft product?  If so, I have it on my hard drive somewhere.  I won't do any of the image gathering via dll though.  Well commented scripts will be much easier to maintain and I can't say I'll always be around to fix any issues that come up.

I'm on it right now.

rick.ca:

--- Quote ---3) That was my original intent.  If you prefer this, I also do.  Multiple sources are very messy to deal with.  This also eliminates the need to do more than document the type of content on each site.
--- End quote ---

I understand why a separate script for each source is preferable, but I don't think many users are going to realize the full potential of your efforts if you leave it that way. Can you not do a "front-end" script that determines the user's choices (i.e., sources, quality, number of photos, etc.) and then calls the necessary scripts? Also, a person record can have multiple photos, but if I try to add one with a plugin (run on a selection of records), it will replace the existing photo. Maybe this is also something you can deal with in a front-end script, combining the user's instructions for add/replace, desired number of photos, etc.

What I'm imagining is something that make it very easy to experiment with settings to discover how to get a (or several) good photos in a reasonable time. If I knew the perfect settings, creating a batch file would be easy. But discovering those settings with experimental batch files would be rather cumbersome.

mgpw4me@yahoo.com:
Spot on as usual.

The main thing right now is that the functionality doesn't exist at all.  It will definitely be unfriendly from a user perspective, but given the front-end that is required, it would hugely difficult for anyone without significant experience to deal with any issues that come up.

I'd definitely like to pre-process the information from PVD against the list of available sites, hit the best ones first and make it easy for the user.  This is a big task.  I can turn out a script in a very short time...it's just a copy / paste and change a few lines.

I haven't programmed in Pascal since Turbo Pascal days, and went to Turbo C immediately when it became available.  Part of this is my lack of knowledge of Pascal and the learning curve to do a proper implementation.  People that don't know what they're doing end up building ugly code that can't be maintained.

If I could simply call one routine from another, that would be great.  I don't see any mechanism for this, but maybe Nostra can help with that.  Given that scripts are byte-code, it would require a separate area in memory for each, which I have no idea the implications of.

At any rate, I do intend to follow the project to a point where I can (as a user) deal with it in a reasonable manner.  I don't see batch files as anything other than a stop-gap until I can call the scripts from a single source.  That may be a dll.  At this point, I admit I'm clueless about this.

Status Quo.  We'll find a better solution and a better implementation.  I'm all ears....

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version