English > Support

Personal Video Database 1.0.2.7 MOD

<< < (54/73) > >>

jondak:

--- Quote from: afrocuban on January 27, 2021, 03:33:45 am ---I would like, for example, Title1 to be shown in the left pane/tree view. Is that possible?




--- End quote ---

I don't know if it what you asking but you can add Orginal title in the left list:



you put something lie this:

%N. %O

This is for 0.9.9.21 but i suspect the 1.0.27 is the same.

Hope this helps.

afrocuban:
Thanks jondak. I can confirm it works with 1.0.0.27 mod as well. Only origtitle can be added (http://www.videodb.info/forum_en/index.php/topic,2116.html) and not custom title, but that is better than with title only, in my case and for my needs.
Cheers

Ivek23:
IMDB_[EN][HTTPS]V 1.4.2.0 script

Due to the new layout of the Main IMDb websites, it was necessary to fix the entire Function ParsePage_IMDBMovieBASE to now re-download the information from the Main IMDb websites. Certain information is no longer available in the new layout of the Main IMDb websites, such as Bottom 100, or has been modified or hidden, such as IMDB Votes. A hidden mid box and a visible numid box are now added to the script. These are now the custom number fields listed below. 
--- Quote ---    //Get ~MID ID:~ and ~NUM ID::~
   AddCustomFieldValueByName('MID ID:',GetFieldValueXML('mid'));
   LogMessage('  ** Movie MID ID: '+GetFieldValueXML('mid')+' **');
   if GetFieldValueXML('num') <> '0' then AddCustomFieldValueByName('NUM ID:',GetFieldValueXML('num'));
   if GetFieldValueXML('num') <> '0' then LogMessage('   * Movie NUM ID: '+GetFieldValueXML('num')+' ||');
--- End quote ---

The new origgitle and alternatetitle information have now also been added.
--- Quote ---        //Get ~origtitle~
        ItemValue:=TextBetWeenFirst(ItemList,'","name":"','","');          //Strings which opens/closes the data. WEB_SPECIFIC
        If (Length(ItemValue)=0) Then ItemValue:=titleValue;                           //Provider hides the original title if same that title. WEB_SPECIFIC
        AddFieldValueXML('origtitle',ItemValue);
      AddCustomFieldValueByName('Origtitle',ItemValue);
      LogMessage('      Get result origtitle:'+ItemValue+'||');

        //Get ~alternatetitle~
        ItemValue:=TextBetWeenFirst(ItemList,'","alternateName":"','","');          //Strings which opens/closes the data. WEB_SPECIFIC
      AddCustomFieldValueByName('Localized title',ItemValue);
        if ItemValue <> '' then LogMessage('      Get result alternatetitle:'+ItemValue+'||');
--- End quote ---

A custom Certification field is now added to the ParsePage_IMDBMovieMPAA Function to download the MPAA Certification List by country.
--- Quote ---   //Get "Certification" info
    curPos:=Pos('<td class="ipl-zebra-list__label">Certification</td>',HTML);
    if (curPos=0) then Exit;
    EndPos:=curPos;   
   //Get "Certification" info
   curPos:=Pos('<td class="ipl-zebra-list__label">Certification</td>',HTML);
   If 0<curPos Then Begin      
      EndPos:=curPos;   
        ItemValue1:=HTMLValues2(HTML,'<td class="ipl-zebra-list__label">Certification</td>','</section>','<li class="ipl-inline-list__item">','</li>','<br>   •   ',EndPos);  //WEB_SPECIFIC.
      ItemValue1:=StringReplace(ItemValue1,':',':  ',True,False,True);
      ItemValue1:=StringReplace(ItemValue1,'                                        (','    (',True,False,True);
      AddCustomFieldValueByName('Certification','Certification<br>   •   '+ItemValue1);
      LogMessage('      Certification:<br>'+ItemValue1+'||');
--- End quote ---

In the Function ParsePage_IMDBMoviePLOTSUMMARY, a custom IMDB Synopsis memo field is added because a function is added that is set to False by default to not transfer full IMDB Synopsis information to the comment field.
--- Quote ---//Script Options-------------------------------------------------------------------------------------------------------
  //Retreive Data Config
.
.
.
//  GET_FULL_PLOT_SUMMARY  = True ;  //Set to False to not wanted to Download full synopsis for Plot provider page for retreive the Synopsis info in Comment box. 
  GET_FULL_PLOT_SUMMARY  = False ;  //Set to True if to wanted to Download full synopsis for Plot provider page for retreive the Synopsis info in Comment box.
//  MAX_IMAGE_HEIGTH  = 1200; //Heigth limit of the stored posters.   
  MAX_IMAGE_HEIGTH  = 500; //Heigth limit of the stored posters.
  //Process Data Config

--- End quote ---

--- Quote ---   // ~Plot Summary~
   If (Pos('It looks like we don'+Chr(39)+'t have any Summaries for this title yet.',HTML)>0) then Exit;   
   //Get "Summaries" info (~Comment~)
   If Pos('<h1 class="header">Plot</h1>',HTML)>0 Then Begin
      curPos:=Pos('<h1 class="header">Plot</h1>',HTML);
      EndPos:=curPos;   
      ItemValue:=HTMLValues2(HTML,'Plot','See also','<li class="ipl-zebra-list__item" id="summary','</p>','<br><br>-------<br><br>',EndPos);   
      ItemValue:=StringReplace(ItemValue,'<a href='+Chr(39),'<link url="'+GetFieldValueXML('url'),True,False,True);
      ItemValue:=StringReplace(ItemValue,'?ref_='+Chr(39)+'>',+'">',True,False,True);
      ItemValue:=StringReplace(ItemValue,'</a>','</link>',True,False,True);
      LogMessage('      Get result ItemValue (~Comment~):'+ItemValue+'||');   
   End;
--- End quote ---

I also fixed the maximum poster size to 500 due to the smaller size that the database stores. because this also reduces the size of the database size itself. PVD therefore also works better.

Ivek23:
Here is the new final IMDB_ [EN] [HTTPS] V 1.4.2.0 script version.

In the IMDbMoviesUrl custom box you now also have a link to the OMDb API website


--- Quote ---//OBLIGATORY CALLBACK PRINCIPAL FUNCTION=========================================================================BlockOpen
Function ParsePage(HTML:String;URL:AnsiString):Cardinal; //BlockOpen
  Var
    MovieID,titleValue,yearValue:String;
    ResultTmp:Cardinal;
    Date:String;
    Fullinfo,Movie_URL,IMDB_URL: String;
    DateParts: TWideArray;
  Begin
    LogMessage('Function ParsePage BEGIN======================|');
    LogMessage('Global Var-Mode|'+IntToStr(Mode)+'|');
    LogMessage('Global Var-DownloadURL|'+DownloadURL+'|');
    LogMessage('      Local Var-URL|'+URL+'|');
//Parse return in mode 'Search Movie URL'--------------------------------------------------------------------------------
    If (Mode=smSearch) Then Begin
        titleValue:=GetFieldValueXML('origtitle');
        If (Length(titleValue)=0) Then titleValue:=GetFieldValueXML('title');
        yearValue:=GetFieldValueXML('year');       
        If yearValue='0' Then yearValue:=''; // Better no Year (blank) for the searches.
        LogMessage('  ParsePage smSearch|'+IntToStr(Mode)+'|. Searching DownloadURL for MovieTitle |'+ titleValue+'|'+' MovieYear |'+ yearValue+'|');
        //Download Provider search page.
        DownloadURL:=StringReplace(BASE_URL_SEARCH_PROV,'%s',titleValue,True,True,False);
        DownloadURL:=StringReplace(DownloadURL,' ','+',True,True,False);            //Better list of results without spaces.
        DownloadURL:=StringReplace(DownloadURL,'%y',yearValue,True,True,False);
        LogMessage('      Searching in Provider:|' + DownloadURL + '||');
        HTML:=DownloadPage(DownloadURL);  //True page for parsing the search
        //HTML:=FileToString( GetAppPath + '\Scripts\IMDB_[EN][HTTPS].v.1.0.0.0\' + 'V.1.0.0.0-IMDb-[Advanced.Search]-Padrino.htm'); //Debug
        HTML:=HTMLToText(HTML);
        Result:=ParsePage_IMDBSearchTitle(HTML);
        If ((Result=prError) and SEARCH_ENGINE) Then Begin  //No results or Redirection -> Search Engine needed
            LogMessage('        Not results or Redirection in Provider search, try with Bing');
            //Download Bing search page.
            DownloadURL:=StringReplace(BASE_URL_SEARCH_ENGI,'%p',BASE_URL_PRE_TRUE,True,True,False);   //WEB_SPECIFIC
            DownloadURL:=StringReplace(DownloadURL,'%s',titleValue,True,True,False);                 //WEB_SPECIFIC
            DownloadURL:=StringReplace(DownloadURL,' ','+',True,True,False);                         //Better list of results without spaces. WEB_SPECIFIC
            DownloadURL:=StringReplace(DownloadURL,'%y',yearValue,True,True,False);                  //WEB_SPECIFIC
            LogMessage('      Searching in Bing:|' + DownloadURL + '||');
            HTML:=DownloadPage(DownloadURL);  //True page for parsing the search
            HTML:=HTMLToText(HTML);
            Result:=ParsePage_BingSearch(HTML);
        End;
        //Parse the returned result of the search list.
        If Result=prError Then Begin //Not movie found, script finish in error.
            Mode:=smFinished;
            LogMessage('Function ParsePage smSearch-prError END======================|');
        End;
        If Result=prList Then Begin //One list of results loaded, needed user choice exit in the script mode (because HTTPS PVD NOT directly will download the user choice).
            Mode:=smSearchList;
            LogMessage('Function ParsePage smSearch-prList END======================|');
        End;
        If Result=prDownload Then Begin   //One results, exit needed only continue the script.
            Mode:=smNormal;
            LogMessage('Function ParsePage smSearch-prDownload END======================|');
        End;
        Exit;       
    End;     
//Parse return of 'SearchList Movie URL'-----------------------------------------------------------------------
    If (Mode=smSearchList) Then Begin       //The user have choose the link.
        LogMessage('  ParsePage mode smSearchList. Getting DownloadURL from the return of smSearchList');
      DownloadURL:=StringReplace(URL,CHEAT_PREFIX_URL,'',True,False,False);   //Eliminate the CHEAT_PREFIX_URL for get the true movie link
        DownloadURL:=StringReplace(DownloadURL,'http:','https:',True,True,False); //The direct url needed (no https redirection)
        LogMessage('     Global Var-DownloadURL|'+DownloadURL+'|');
        Mode:=smNormal;
        Result:=prDownload;  //But not exit needed for download the page because is HTTPS
        LogMessage('     With the good movie URL it demand download the movie page');
    End;
//Parse with the Movie URL 'smNormal'------------------------------------------------------------------------------------
    If (Mode=smNormal) Then Begin
        //Get the script Overwrite Options saved in pvdconf.ini (Remember that PVD only save the options on exit)
        //0=Do nothing,1=Set if Empty,2=Overwrite
        PVDConfigOptions:=TextBetWeenFirst(FileToString(GetAppPath+'pvdconf.ini'),'IMDB_[EN][HTTPS].psf=',Chr(13));
            //LogMessage('Stored Script PVDConfigOptions is:'+PVDConfigOptions+'||');
            //LogMessage('The Script option of position '+ IntToStr(opPoster) +' is:'+Copy(PVDConfigOptions,opPoster,1)+'||');
        Result:=prFinished;  //It will change to prError if any big problem with exit; 
        //Information in several page. Needs Provider MovieID
        MovieID:=TextBetWeenFirst(DownloadURL,BASE_URL_PRE_TRUE,BASE_URL_SUF);
        LogMessage('  ParsePage mode smNormal|'+IntToStr(Mode)+'|. Getting provider data for MovieID|'+ MovieID +'|');
        AddCustomFieldValueByName('IMDbID',MovieID);
      AddCustomFieldValueByName('IMDbID:',MovieID);
        LogMessage('      Get result IMDbID (CF~IMDbID~):'+MovieID+'||');
        //Get ~url~
        if (0=Pos(BASE_URL_PRE,StoredURL)) then begin   //Write the url if not exists
            AddFieldValueXML('url',StringReplace(DownloadURL,BASE_URL_PRE_TRUE,BASE_URL_PRE,True,False,False));
            LogMessage('      Get result url:'+StringReplace(DownloadURL,BASE_URL_PRE_TRUE,BASE_URL_PRE,True,False,False)+'||');
        end;
        //Get ~IMDb Movie Url~       
        Movie_URL:=StringReplace(DownloadURL,BASE_URL_PRE_TRUE,BASE_URL_PRE,True,False,False);
      AddCustomFieldValueByName('IMDb.com','<link url="'+Movie_URL+'">IMDb.com</link>');
      AddCustomFieldValueByName('IMDbMoviesUrl','<link url="'+Movie_URL+'">IMDb MovieUrl</link>  <link url="http://www.omdbapi.com/">OMDb API info</link>  <link url="http://www.omdbapi.com/apikey.aspx">OMDb API Key</link>');
      //AddCustomFieldValueByName('OMDbAPIUrl','<link url="'+Movie_URL+'">IMDb MovieUrl</link>  <link url="http://www.omdbapi.com/?i='+MovieID+'&apikey=[yourkey]&plot=short&tomatoes=true">OMDb API info for IMDb</link>  <link url="http://www.omdbapi.com/?i='+MovieID+'&apikey=[yourkey]&plot=full&tomatoes=true">OMDb API full info for IMDb</link>  <link url="http://www.omdbapi.com/?i='+MovieID+'&apikey=[yourkey]&plot=full&r=xml&tomatoes=true">OMDb API full xml info for IMDb</link>  <link url="http://www.omdbapi.com/?s='+GetFieldValueXML('title')+'&apikey=[yourkey]&plot=short&tomatoes=true">OMDb API Search for IMDb</link>');
        LogMessage('      Get result Movie_url: '+Movie_URL+' ||');
      LogMessage('      Get result OMDb API info_URL:'+#13+'<link url="http://www.omdbapi.com/">OMDb API info</link>  <link url="http://www.omdbapi.com/apikey.aspx">OMDb API Key</link>'+'||')
        Fullinfo:='';
        //Fullinfo:=Fullinfo+'<link url="'+Movie_UR+'">Maindetails</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'">MainPage</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'reference">Reference</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'fullcredits">Full Cast&Crew</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'awards">Awards</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'releaseinfo">ReleaseDates</link>  ';
        //Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'technical">TechnicalSpecs</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'technical">TechSpecs</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'parentalguide">ParentsGuide</link>  ';   
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'keywords">PlotKeywords</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'plotsummary">PlotSummary</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'locations">FilmLocations</link>  ';   
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'taglines">Taglines</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'companycredits">CompanyCredits</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'movieconnections">Connections</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'soundtrack">Soundtracks</link>  ';
        //Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'externalsites">Miscellaneous</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'externalsites">MiscSites</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'externalsites#photos">MiscPhoto</link>  ';
        Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'mediaindex">PhotoGallery</link>  ';
        //Fullinfo:=Fullinfo+'<link url="'+Movie_URLL+'externalsites#misc">MiscSites</link>  ';
        //Fullinfo:=Fullinfo+'<link url="'+Movie_URL+'externalsites#photos">MiscPhoto</link>  ';
        If Fullinfo <> '' then IMDB_URL:=Fullinfo;
        If IMDB_URL <> '' then AddCustomFieldValueByName('IMDb Movie Url',IMDB_URL);
        LogMessage('      Get result Fullinfo-IMDB_URL (CF~IMDb Movie Url~ ):'+#13+IMDB_URL+'||')
    //Parse principal provider page = BASE_URL_PRE_TRUE------------------------------------------------------------------
--- End quote ---

IMDB_[EN][HTTPS] script is attached.

Pacifist:
"The IMDbMoviesUrl custom field now also has a link to the OMDb API website."
Where is this "custom field" located? Can I have a screen, please!  :-[  ??? :-[

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version