English > Support

Personal Video Database 1.0.2.7 MOD

<< < (11/73) > >>

fmb64:
That’s very cool to interact with the programmer to help improving the software. :)


--- Quote ---Great new to have a German user.
--- End quote ---

Yes, in fact Swiss user but no matter  ;)

I corrected the german translation, it is a bit difficult because I think the English is not perfect, too   ;) ;)


--- Quote ---There are two way to control the saved of information in the PVD database.
--- End quote ---

Thank you very much, now I got it how to configure the script.

The launch of the configuration script does not work if PVD is stored in a path containing spaces (for example "D:\Personal Video Database")   see attached error. (how to embed the screenshot?)

On "Save Config" PVD restarts with the sample movie database instead of the last I had open.

BTW, the duration of the movie is imported to 'Features' instead of 'Duration'.


--- Quote ---This isn't easy because PVD interacts with the focus but I have understood your request: To work with PVD in second plane completely.
With this information I'll try to do something if possible.
--- End quote ---

That would be awesome, because I still prefer iMDb (a little bit)   :)

Ivek23:

--- Quote from: fmb64 on September 18, 2018, 02:53:36 pm ---BTW, the duration of the movie is imported to 'Features' instead of 'Duration'.
--- End quote ---

Yes, this is a mistake that will be corrected in the next IMDB_ [EN] [HTTPS] script version. Within a few days, the patches will be posted from my site (I need to do some tests because I've fixed the errors) in this topic and then the new IMDB_ [EN] [HTTPS] script version will be published.

fmb64:

--- Quote from: Ivek23 on September 18, 2018, 03:24:41 pm ---Yes, this is a mistake that will be corrected in the next IMDB_ [EN] [HTTPS] script version.

--- End quote ---

Thanks guys, I really appreciate your work for keeping this software alive.  :)

Ivek23:
IMDB_ [EN] [HTTPS] script


--- Quote ---//Download methods-------------------------------------------------------------------------------------------------------
  dmGET           = 0;
  dmPOST          = 1;
//Movie fields----------------------------------------------------------------------------------------------------------
  mfURL         = 0;
  mfTitle      = 1;
  mfOrigTitle   = 2;
  mfAka         = 3;
  mfYear         = 4;
  mfGenre      = 5;
  mfCategory      = 6;
  mfCountry      = 7;
  mfStudio      = 8;
  mfMPAA         = 9;
  mfRating      = 10;   //This is 'Additional rating', not 'Rating'
  mfTags         = 11;
  mfTagline      = 12;
  mfDescription   = 13;
  mfDuration      = 14;
  mfFeatures      = 15;
//Credits  types----------------------------------------------------------------------------------------------------------
--- End quote ---

This part of the code is required because otherwise the movie duration will not be added to the database. This part of the code is needed because of these two parts of the code in the script.

The first is for the following part:


--- Quote ---    //Get the original "Runtime" (in minutes) as ~length~ instead of the duration of the user movie copy
    If Not(PRESERVE_USER_MOVIE_CHARS) Then Begin
        curPos:=Pos('<h4 class="inline">Runtime:</h4>',HTML);                                      //WEB_SPECIFIC.
        If 0<curPos Then Begin 
            ItemValue:=TextBetWeen(HTML,'M">',' min</time>',false,curPos);  //Strings which opens/closes the data. WEB_SPECIFIC
            //ItemList:=ItemList+'Original Runtime: '+ItemValue+' min.<br>';
            //LogMessage('      Get result Original Runtime_1:'+ItemValue+'||');
            //AddFieldValueXML('length',ItemValue);
            AddFieldValue(mfDuration,ItemValue);      
            LogMessage('      Get result lenght:'+ItemValue+'||');
        End;
    End;
--- End quote ---

The second is for Function ParsePage_IMDBMovieTECHNICAL:


--- Quote ---Function ParsePage_IMDBMovieTECHNICAL(HTML:String):Cardinal; //BlockOpen
    //Returns:
    //     Result:=prFinished; Script has finished gathering data
    //     Result:=prError; If żany big problem? with exit
    //Retrieve: ~features~
  Var
    //curPos:Integer;
    curPos,endPos:Integer;
    ItemValue,ItemList:String;     
  Begin
    LogMessage('Function ParsePage_IMDBMovieTECHNICAL BEGIN=====================||');
    Result:=prFinished;  //It will change to prError if any big problem with exit; 
    //Get "Technical Specifications" info
    curPos:=Pos('<h1 class="header">Technical Specifications</h1>',HTML);
    if (curPos=0) then Exit;
    EndPos:=curPos; 
    //Get "Runtime" info
    curPos:=Pos('<td class="label"> Runtime </td>',HTML);                                      //WEB_SPECIFIC.
   If 0<curPos Then Begin 
      ItemValue:=TextBetWeen(HTML,' (',' min)',false,curPos);  //Strings which opens/closes the data. WEB_SPECIFIC
        LogMessage('      Get result lenght from Runtime:'+ItemValue+'||');
        If ItemValue <> '' then begin       
    //Get the original "Runtime" (in minutes) as ~length~ instead of the duration of the user movie copy
            If Not(PRESERVE_USER_MOVIE_CHARS) Then Begin 
                AddFieldValue(mfDuration,ItemValue);
                //AddFieldValueXML('length',ItemValue);
                LogMessage('      Get result lenght from Original Runtime:'+ItemValue+'||');
            End;
            //ItemList:=ItemList+'Runtime_1'+'<br>'+ItemValue+'<br><br>';
        End;
    End;                 
    //Get "Runtime" info
    ItemValue:=HTMLValues2(HTML,'Runtime','</tr>','<td>','</tr>','<br><br>',EndPos);
    ItemValue:=StringReplace(ItemValue,'                                ','<br>',True,False,True);
    ItemValue:=StringReplace(ItemValue,'                      ','<br>',True,False,True);
    ItemValue:=StringReplace(ItemValue,'          ','',True,False,True);
    If ItemValue <> '' then LogMessage('      Get result Runtime:'+ItemValue+'||');
    if ItemValue <> '' then ItemList:=ItemList+'Runtime'+'<br>'+ItemValue+'<br><br>';          
    //Get "Sound Mix" info
--- End quote ---

Here it is necessary to add a part of the code for  // Get "Runtime" info as I added it here because otherwise it will not correctly transfer the information for "Runtime".

Ivek23:
IMDB_ [EN] [HTTPS] script

A minor correction for ParsePage_IMDBSearchTitle code, where repeatedly did not show all hits when searching for results or did not show the year when movie release.


--- Quote ---Function ParsePage_IMDBSearchTitle(HTML:String):Cardinal; //BlockOpen
    //Returns:
    //     Result:=prDownload; (Global var DownloadURL=IMDB page) if there is one results.
    //     Result:=prList; if there are several results. (Don't work with Preferences/Plugings/Silent Mode).
    //     Result:=prError; If not results
  Var
      curPos,ResultsNumber:Integer;
     endPos:Integer;
      ItemValue,ImageFile:String;
      Title,Year,MovieURL,PreviewURL:String;
  Begin
.
.
.
            //Get MovieURL  (Always must it has)
            MovieURL:=TextBetWeen(HTML,'<a href="/title/','/',false,curPos);               //Strings which opens/closes the data. WEB_SPECIFIC
            MovieURL:= BASE_URL_PRE+MovieURL+BASE_URL_SUF;
            LogMessage('      Parse Results URL:'+MovieURL+'||');
            //If true HTPPS link PVdB gives "Socket Error # 11001"
            //If ancient http, get redirected and give "IOHandler value is not valid
            //If invalid url, "HTTP/1.1 400 Bad Request"               
            MovieURL:=CHEAT_PREFIX_URL+MovieURL;                 //'Cheat' URL for avoid HTTPS issue in GET return.
            LogMessage('      Parse Results CHEAT URL:'+MovieURL+'||');
            //Get Title (Always must it has)
            Title:=TextBetWeen(HTML,'>','<',false,curPos);                               //Strings which opens/closes the data. WEB_SPECIFIC
            LogMessage('      Parse Results Title:'+Title+'||');
            //Get Year
            //Year:=TextBetWeen(HTML,'(',')',false,curPos);                               //Strings which opens/closes the data. WEB_SPECIFIC
            endPos:=PosFrom('</span>',HTML,curPos);
            curPos:=endPos-5;
            Year:=IntToStr(StrToInt(Copy(HTML,curPos,4)));
            LogMessage('      Parse Results in Year:'+Year+'||');
            AddSearchResult(Title,'',Year,MovieURL,PreviewURL);
            //Just to check the website (Only to check the web page) not PVdB valid result.
            if CHECK_WEBSITE then AddSearchResult('                             '+#8729+' Just to check the website: '+StringReplace(MovieURL,CHEAT_PREFIX_URL,'',True,False,False),'','',StringReplace(MovieURL,CHEAT_PREFIX_URL,'',True,False,False),'');
            curPos:=PosFrom('<div class="lister-item mode-simple">',HTML,curPos)          //String which opens the Web Result item List data. WEB_SPECIFIC
        End;

--- End quote ---

For ~ Metascore: ~ information must be all part of the code because the web pages share different parts of the source code for Metascore data.


--- Quote ---    //~Metascore:~
    curPos := PosFrom('> <div class="metacriticScore score_favorable titleReviewBarSubItem">',HTML,EndPos);
    if curPos>0 then begin
        curPos:=curPos+Length('> <div class="metacriticScore score_favorable titleReviewBarSubItem">');      
        EndPos:=PosFrom('</span>',HTML,curPos);
        ItemValue:=RemoveTags(Copy(HTML,curPos,endPos-curPos+2),false);
        ItemValue:=StringReplace(ItemValue,'0</',',0',True,False,True);
        ItemValue:=StringReplace(ItemValue,'1</',',1',True,False,True);
        ItemValue:=StringReplace(ItemValue,'2</',',2',True,False,True);
        ItemValue:=StringReplace(ItemValue,'3</',',3',True,False,True);
        ItemValue:=StringReplace(ItemValue,'4</',',4',True,False,True);
        ItemValue:=StringReplace(ItemValue,'5</',',5',True,False,True);
        ItemValue:=StringReplace(ItemValue,'6</',',6',True,False,True);
        ItemValue:=StringReplace(ItemValue,'7</',',7',True,False,True);
        ItemValue:=StringReplace(ItemValue,'8</',',8',True,False,True);
        ItemValue:=StringReplace(ItemValue,'9</',',9',True,False,True);
        AddCustomFieldValueByName('Metascore',FloatToStr((StrToFloat(ItemValue) * 1)));
        LogMessage('      Get result custom field Metascore_0:'+ItemValue+'||');
    End;   
    //Get ~Metascore~
    curPos:=PosFrom('> <div class="metacriticScore score_unfavorable titleReviewBarSubItem">',HTML,EndPos);
    if curPos>0 then begin
        curPos:=curPos+Length('> <div class="metacriticScore score_unfavorable titleReviewBarSubItem">');
        EndPos:=PosFrom('</span>',HTML,curPos);
        ItemValue:=RemoveTags(Copy(HTML, curPos,endPos-curPos+2),false);
        ItemValue:=StringReplace(ItemValue,'0</',',0',True,False,True);
        ItemValue:=StringReplace(ItemValue,'1</',',1',True,False,True);
        ItemValue:=StringReplace(ItemValue,'2</',',2',True,False,True);
        ItemValue:=StringReplace(ItemValue,'3</',',3',True,False,True);
        ItemValue:=StringReplace(ItemValue,'4</',',4',True,False,True);
        ItemValue:=StringReplace(ItemValue,'5</',',5',True,False,True);
        ItemValue:=StringReplace(ItemValue,'6</',',6',True,False,True);
        ItemValue:=StringReplace(ItemValue,'7</',',7',True,False,True);
        ItemValue:=StringReplace(ItemValue,'8</',',8',True,False,True);
        ItemValue:=StringReplace(ItemValue,'9</',',9',True,False,True);
        AddCustomFieldValueByName('Metascore',FloatToStr((StrToFloat(ItemValue) * 1)));
        LogMessage('      Get result custom field Metascore:'+ItemValue+'||');
    End;
    //~Metascore:~
    curPos := PosFrom('> <div class="metacriticScore score_mixed titleReviewBarSubItem">',HTML,EndPos);
    if curPos>0 then begin
        curPos:=curPos+Length('> <div class="metacriticScore score_mixed titleReviewBarSubItem">');      
        EndPos:=PosFrom('</span>',HTML,curPos);
        ItemValue:=RemoveTags(Copy(HTML,curPos,endPos-curPos+2),false);
        ItemValue:=StringReplace(ItemValue,'0</',',0',True,False,True);
        ItemValue:=StringReplace(ItemValue,'1</',',1',True,False,True);
        ItemValue:=StringReplace(ItemValue,'2</',',2',True,False,True);
        ItemValue:=StringReplace(ItemValue,'3</',',3',True,False,True);
        ItemValue:=StringReplace(ItemValue,'4</',',4',True,False,True);
        ItemValue:=StringReplace(ItemValue,'5</',',5',True,False,True);
        ItemValue:=StringReplace(ItemValue,'6</',',6',True,False,True);
        ItemValue:=StringReplace(ItemValue,'7</',',7',True,False,True);
        ItemValue:=StringReplace(ItemValue,'8</',',8',True,False,True);
        ItemValue:=StringReplace(ItemValue,'9</',',9',True,False,True);
        AddCustomFieldValueByName('Metascore',FloatToStr((StrToFloat(ItemValue) * 1)));
        LogMessage('      Get result custom field Metascore_1:'+ItemValue+'||');
    End;
--- End quote ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version