Recent Posts

Pages: 1 ... 5 6 7 8 9 [10]
91
Thank you very much Ivek for your work.
I don't especially pride of the search subroutine.
Because I planned change all the subroutine and the bug is easily "roundabout-ed" I wait to change de subroutine to correct it.
Stay tuned.
92
Script Links / Re: TheMovieDB [ES] Links
« Last post by Ivek23 on August 08, 2017, 05:26:30 pm »
93
Scripts and Templates / Re: Script: TheMovieDB [ES] (Easy API Script)
« Last post by Ivek23 on August 08, 2017, 05:24:57 pm »
CHANGE LOG :
            V 0.2.0.8 (27/07/2017)  VVV:Eliminated GET_PERSON_INFO_URL option (for KODI better use TheMovieDB People [ES])
                                                       Fixed bug with ~genre~ field (the field name is in singular not in plural) and directors url.

Attached the new version.

Works great.
94
Scripts and Templates / Re: Script: TheMovieDB People [ES] (Easy API Script)
« Last post by Ivek23 on August 08, 2017, 05:18:11 pm »
CHANGE LOG (27/07/2017):
            v 0.2.0.0   VVV: Search improvements for API order independence.

It works, but there is still an error in finding results when there are multiple hits for one person. This is the case, for example, for a person (John Wayne), who does not show the first hit with John Wayne.
The error is in the part of the code:
PersonId is the original version under PhotoURL - it's not correct
PersonId is the original version of PhotoURL - correctly

At the same time, the correction of the first line of code in Get the first item '' curPos: = PosFrom ('{' popularity ':', HTML, curPos) ''


Original  part of the code:
Code: [Select]
          //Get first item
          curPos:=PosFrom('{',HTML,curPos)                       //String which opens the Web Result List data. WEB_SPECIFIC
          while curPos>0 do begin
            NumbResult:=NumbResult+1;         
            LogMessage('Parsing search Persons |'+IntToStr(NumbResult)+'| results in '+IntToStr(curPos)+' ...');
            //Get information
            PhotoURL:='';                                 
            PersonId:='';
            PersonURL:='';
            Name:='';
            ItemValue:=TextBetWeen(HTML,'"profile_path":',',',false,curPos);    //WEB_SPECIFIC
            if ((0=Pos('null',ItemValue)) and (2<Length(ItemValue))) then begin      //WEB_SPECIFIC
               ItemValue:=StringReplace(ItemValue,'\','',True,True,False);      //Eliminate '\'
               ItemValue:=StringReplace(ItemValue,'"','',True,True,False);      //Eliminate '"'
               PhotoURL:='http://image.tmdb.org/t/p/w92'+ItemValue;             //WEB_SPECIFIC. w45,w92,w185,w300,w342,original.
               LogMessage('      Parse Results PreviewURL:'+PhotoURL+'||');
            end;
            PersonId:=TextBetWeen(HTML,'"id":',',',false,curPos);              //WEB_SPECIFIC
            PersonURL:=BASE_API_URL_PREFIX+PersonId+BASE_API_URL_SUFIX+LANG_API_STR;
            LogMessage('      Parse Results MovieURL:'+PersonURL+'||');
            ItemValue:=TextBetWeen(HTML,'"name":',',',false,curPos);                 //WEB_SPECIFIC
            if ((0=Pos('null',ItemValue)) and (2<Length(ItemValue))) then begin      //WEB_SPECIFIC
               Name:=StringReplace(ItemValue,'"','',True,True,False);      //Eliminate ""
               LogMessage('      Parse Results Name:'+Name+'||');
            end;
            AddSearchResult(Name,'','',PersonURL,PhotoURL); 
            //Just to check the website (Only to check the web page) not PVdB valid result.
            AddSearchResult('  Just to check the website (not PVdB valid) '+#8729+'  '+Name,'','',BASE_URL_TRUE+PersonId,'');
            curPos:=PosFrom('{',HTML,curPos)                                     //WEB_SPECIFIC
          end;

Corrected part of the code:
Code: [Select]
          //Get first item
          curPos:=PosFrom('{"popularity":',HTML,curPos)                       //String which opens the Web Result List data. WEB_SPECIFIC
          while curPos>0 do begin
            NumbResult:=NumbResult+1;         
            LogMessage('Parsing search Persons |'+IntToStr(NumbResult)+'| results in '+IntToStr(curPos)+' ...');
            //Get information                               
            PersonId:='';
            PersonURL:='';
            PhotoURL:='';
            Name:='';
            PersonId:=TextBetWeen(HTML,'"id":',',',false,curPos);              //WEB_SPECIFIC
            PersonURL:=BASE_API_URL_PREFIX+PersonId+BASE_API_URL_SUFIX+LANG_API_STR;
            LogMessage('      Parse Results MovieURL:'+PersonURL+'||');
            ItemValue:=TextBetWeen(HTML,'"profile_path":',',',false,curPos);    //WEB_SPECIFIC
            if ((0=Pos('null',ItemValue)) and (2<Length(ItemValue))) then begin      //WEB_SPECIFIC
               ItemValue:=StringReplace(ItemValue,'\','',True,True,False);      //Eliminate '\'
               ItemValue:=StringReplace(ItemValue,'"','',True,True,False);      //Eliminate '"'
               PhotoURL:='http://image.tmdb.org/t/p/w92'+ItemValue;             //WEB_SPECIFIC. w45,w92,w185,w300,w342,original.
               LogMessage('      Parse Results PreviewURL:'+PhotoURL+'||');
            end;
            //PersonId:=TextBetWeen(HTML,'"id":',',',false,curPos);              //WEB_SPECIFIC
            //PersonURL:=BASE_API_URL_PREFIX+PersonId+BASE_API_URL_SUFIX+LANG_API_STR;
            //LogMessage('      Parse Results MovieURL:'+PersonURL+'||');
            ItemValue:=TextBetWeen(HTML,'"name":',',',false,curPos);                 //WEB_SPECIFIC
            if ((0=Pos('null',ItemValue)) and (2<Length(ItemValue))) then begin      //WEB_SPECIFIC
               Name:=StringReplace(ItemValue,'"','',True,True,False);      //Eliminate ""
               LogMessage('      Parse Results Name:'+Name+'||');
            end;
            AddSearchResult(Name,'','',PersonURL,PhotoURL); 
            //Just to check the website (Only to check the web page) not PVdB valid result.
            AddSearchResult('  Just to check the website (not PVdB valid) '+#8729+'  '+Name,PersonId,'',BASE_URL_TRUE+PersonId,'');
            curPos:=PosFrom('{"popularity":',HTML,curPos)                                     //WEB_SPECIFIC
          end;

Corrected part of the code now also finds the first hit, and at the same time locates (displays) all the hits for the person in the search for results.
95
Scripts and Templates / Re: Script: TheMovieDB [ES] (Easy API Script)
« Last post by Ivek23 on July 28, 2017, 05:39:43 pm »
In the message ... ;D

I just doing a little changes without change the version.
You are very fast Ivek23  ;D

It was just a coincidence.
96
CHANGE LOG (27/07/2017):
            v 0.2.0.0   VVV: Search improvements for API order independence.

Attached the new versión.

(Edito: New version down)
97
In the message ... ;D

I just doing a little changes without change the version.
You are very fast Ivek23  ;D
98
Scripts and Templates / Re: Script: TheMovieDB [ES] (Easy API Script)
« Last post by Ivek23 on July 28, 2017, 02:19:27 pm »
Attached the new version.

Where is this new version?
99
CHANGE LOG :
            V 0.2.0.8 (27/07/2017)  VVV:Eliminated GET_PERSON_INFO_URL option (for KODI better use TheMovieDB People [ES])
                                                       Fixed bug with ~genre~ field (the field name is in singular not in plural) and directors url.

Attached the new version.

(Edito: New version down)
100
Thank you, Ivek23 for the alert.
I take the subject and I'll try to solve early ;D
Pages: 1 ... 5 6 7 8 9 [10]