Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - afrocuban

Pages: [1] 2 3 4 5 6 ... 24
1
Support / Re: List of custom fields
« on: November 21, 2024, 01:48:37 am »
Thank you. Another tip: if you filter column "J" for "For Script", and column "L" for "blanks", you can see what custom fields in your PVD are not in any script stated in the table (thus most probably in any other, but for sure not in any active, because I extracted from a lot of scripts and from all currently active), so you might want to delete those fields from your PVD as useless. Of course, be extremely careful.

2
Support / Re: List of custom fields
« on: November 19, 2024, 05:54:19 am »
Here's the most comprehensive list of both original and custom fields through many active and obsolete scripts, I have managed to gather.


If you want me to add fields from any other script please do not post links to the script, upload script here, or I won't be able to add it to the list. That is how we will easier track which additional scripts are added.

Probably very interesting column is column D which shows if script field is active or inactive ("hidden") in the script, so you might want to change the script if you find some inactive field in active script for yourself, and you even didn't know it's there. Not every hidden field will import data when activated, be aware, so if you're not sure, better ask Ivek.

List of my custom films is in column H. Yours is different so change it carefully if you want to know which custom fields from scripts you don't have added to your PVD. For this filter either column B or G for "No Custom Field Added in PVD for This Field".


There are many formulas in the file in order to help automation of future adding, as well as for better visibility inside the file, so be careful with any customization especially because of array formulas and conditional formatting.


It would be nice someone to change exclusively in column B what types of PVD fields are those in column A, with "No Custom Field Added in PVD for This Field" in column B. Please do not change this in column G. I added column B intentionally for this change only.


If you have any question, I'll do my best to respond.

3
Support / Re: Poster field
« on: November 18, 2024, 05:39:11 am »
And then, I thought that maybe multiple posters can be imported by the script at once to imagelist field, beside poster which is not in imagelist? For this we would need probably something like multiple-downpage-UTF8_NO_BOM.htm and the rest to be defined...

4
Support / Re: Poster field
« on: November 18, 2024, 05:06:50 am »
Thanks for the responses. We could probably achieve this by mimicking nextposterbtn clicking after each import. That would also need to rewrite ahk autioit script, and all of that would be way to over headed

5
Support / Re: Poster field
« on: November 16, 2024, 11:00:36 pm »
Hi afrocuban,
PVD can handle multiple images for the same type (poster, disk cover, etc..) but from scripts I have never been able to upload more than 1 per type.

Hmmm, yes, me too. I'm trying but what ever I try, script won't compile, and it should. For example, this:
Code: [Select]

type
  TPosterInfo = record
    ImageURL: string;
    Caption: string;
    Height: Integer; // Included height in the record for clarity
  end;


Function ParsePage_IMDBMovieBASE(HTML: String): Cardinal; //BlockOpen
  //Returns:
  // Result:=prFinished; Script has finished gathering data
  // Result:=prError; If ¿any big problem? with exit;
  // Retrieve: ~title~, ~year~, ~origtitle~, ~poster~ / ~imdbrating~, ~IMDB_Votes~ (Custom Field) / ~TOP_250~ (Custom Field) /
  // If Not(GET_FULL_CREDIT): ~crew~ ctDirectors, ctWriters, ctComposers, ctProducers (Not in base page), ctActors
  // ~description~ / ~category~ "keywords" / ~tagline~ / ~genre~
  // If Not(GET_FULL_MPAA) ~mpaa~
  // ~country~ / ~rdate~ in contry provider local IP geolocation
  // If Not(GET_FULL_AKA) ~aka~.
  // ~budget~ / ~money~ / ~studio~ "Production Co"
Var
  curPos, endPos, index, debug_pos1: Integer;
  StartPos, Hours, Minutes: Integer;
  ItemValue, ItemValue0, ItemValue1, ItemValue2, ItemValue99, ItemList, ImageFile: String;
  MovieURL, titleValue, yearValue, yearsValue: String;
  Name, Role, PersonURL: String;
  ItemList2, ItemList12, day_s, month_s, year_s: String;
  ItemList1, ItemList11: String;
  ItemArray: TWideArray;
  Posters: array of TPosterInfo; // Declared Posters here
  PosterURL, TempURL: String;    // Added for poster handling
  TempHeight: Integer;           // Added for poster handling


Begin
  LogMessage('Function ParsePage_IMDBMovieBASE BEGIN======================|');
  Result := prFinished;  // It will change to prError if any big problem with exit;
  //Because the script doesn't retrieve the data in order, a token search for the first curPos position or block select is mandatory
  //Get ~title~, ~year~, ~origtitle~, ~poster~
  //Get all "raw" title summary (in raw because we need the hidden links, we avoid "complete" token in strings which opens/closes)   // (* *) 
  //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') + ' ||');
  //Get ~script info~
  //Get ~rdate~ in country provider local IP geolocation. See: http://sobizarre-en.blogspot.fr/2014/12/how-to-easily-defeat-imdb-geolocation.html
  //Get ~imdbrating~, ~IMDB_Votes~ (Two tries)
  ItemList := TextBetWeenFirst(HTML, '<script type="application/ld+json"', '}</script>'); //WEB_SPECIFIC.
  //LogMessage('           Parse results (' + IntToStr(curPos) + ',' + IntToStr(endPos) + ') complex ItemList: ' + '<script type="application/ld+json"' + ItemList + '}</script>' + '||');
  If (Length(ItemList) > 0) Then Begin   
    //Get ~IMDb Url~   
    //MovieURL:='http://www.imdb.com' + TextBetWeenFirst(ItemList, '","url":"', '","name":"');
    MovieURL := TextBetWeenFirst(ItemList, '","url":"', '","name":"');
    MovieURL := StringReplace(MovieURL, 'https://', 'http://', True, False, True);
    AddFieldValueXML('url', MovieURL);
    LogMessage('   *   Get result url 1:' + MovieURL + ' ||');
    LogMessage('  *  Get result MovieURL: ' + MovieURL);
    // IMDB_FIELD = 'IMDB';
    if PosFrom('imdb', MovieURL, 1) > 0 then AddCustomFieldValueByName(IMDB_FIELD, '-1');   
    //Get ~title~
    titleValue := TextBetWeenFirst(ItemList, '","name":"', '","');       //Strings which opens/closes the data. WEB_SPECIFIC
    If titleValue = '0' then titleValue := '';
    //If titleValue = '' then titleValue := TextBetWeenFirst(ItemList, '<h1 class="long">', '<');       //Strings which opens/closes the data. WEB_SPECIFIC
    if GET_ORIGINAL_TITLE then AddFieldValueXML('title', titleValue);
    AddCustomFieldValueByName('Title', titleValue);
    AddCustomFieldValueByName('Localized title', titleValue);   
    LogMessage('      Get result title:' + titleValue + '||');   
    //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 as 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 GET_LOCAL_TITLE then AddFieldValueXML('title', ItemValue);
    if ItemValue <> '' then LogMessage('      Get result alternatetitle:' + ItemValue + '||');   
    If ItemValue <> '' then AddCustomFieldValueByName('Imdb_Title', ItemValue + #13 + titleValue + '  (original title)')
    Else AddCustomFieldValueByName('Imdb_Title', titleValue);                                                                                               
    //Get ~IMDB_Movietype~
    ItemValue := TextBetWeenFirst(ItemList, '","@type":"', '","');   //Strings which opens/closes the data. WEB_SPECIFIC
    MediaType := ItemValue;
    MediaType := StringReplace(MediaType, 'TVEpisode', 'TV Episode', True, False, True);
    MediaType := StringReplace(MediaType, 'TVSeries', 'TV Series', True, False, True);
    AddCustomFieldValueByName('IMDB_Movietype', MediaType);
    AddCustomFieldValueByName('Tv 0', MediaType);
    if ItemValue <> '' then LogMessage('      Get result MediaType (CF~IMDB_Movietype~):' + MediaType + '||');
    //Get ~IMDB_MPAA~ 
    ItemValue := TextBetWeenFirst(ItemList, ',"contentRating":"', '","');   //Strings which opens/closes the data. WEB_SPECIFIC   
    AddCustomFieldValueByName('IMDB_MPAA', ItemValue);
    if ItemValue <> '' then LogMessage('      Get result ContentRating (CF~IMDB_MPAA~):' + ItemValue + '||');   
   
    // Start of the new poster-related code
    procedure AddPoster(const URL: string; Height: Integer);
    begin
      SetLength(Posters, Length(Posters) + 1);
      Posters[High(Posters)].ImageURL := URL;
      Posters[High(Posters)].Caption := 'Poster'; // Adjust this as needed
      Posters[High(Posters)].Height := Height; // Added to ensure height is stored
    end;
    repeat
      PosterURL := TextBetWeenFirst(ItemList, BASE_URL_IMAGE_PRE_TRUE, '.'); // Adjust this to match actual URLs
      if PosterURL <> '' then
      begin
        TempURL := BASE_URL_IMAGE_PRE_TRUE + PosterURL + '.jpg';
        TempHeight := StrToIntDef(TextBetWeenFirst(PosterURL, '_V1_UY', '_'), 0);
        AddPoster(TempURL, TempHeight);
      end;
    until (PosterURL = '');


    // Import the posters up to the specified limit
        PosterCount := Min(5, Length(Posters)); // Up to 5 posters
    for index := 0 to PosterCount - 1 do
    begin
      ImageFile := GetAppPath + 'Scripts\' + BASE_DOWNLOAD_FILE_IMAGE_NAME + '-Poster-' + IntToStr(index + 1) + '.jpg';
      if (1 = DownloadImage(Posters[index].ImageURL + '._V1_UY' + IntToStr(Posters[index].Height) + '_.jpg', ImageFile)) then
      begin
        AddImageURL(itPoster, ImageFile);
        LogMessage('Imported poster: ' + Posters[index].ImageURL + '._V1_UY' + IntToStr(Posters[index].Height) + '_.jpg' + ' || Height: ' + IntToStr(Posters[index].Height));
      end
      else if (1 = DownloadImage(Posters[index].ImageURL + '.jpg', ImageFile)) then
      begin
        AddImageURL(itPoster, ImageFile);
        LogMessage('Imported poster: ' + Posters[index].ImageURL + '.jpg' + ' || Height: ' + IntToStr(Posters[index].Height));
      end;
    end;
    // End of the new poster-related code
  End;


Begin
  LoadPosters;
  // Additional code to integrate with PVD if needed
End.
       
      //~description~   



The log complains with this
Quote

(11/16/2024 1:17:20 PM) Could not compile script: IMDB_2c_afro-Custom Cast + more.psf

[Error] (731:5): Identifier expected

Line 731 is  procedure AddPoster(const URL: string; Height: Integer);



6
Support / Re: Poster field
« on: November 16, 2024, 11:42:31 am »
To add further questions, so you could answer in one post:
If you have a definitive answer (yes or no), how do you know that, is it your experience?
If it's not experience, is there any resource on this forum that I am able to see and find, but I can't succeed to find such info?
If there's some resource out of this forum, or here but I don't have access to it, and which would provide me to analyze capabilities of database and PVD itself, but you have an access to such resource I'd highly appreciate if you could, would or are allowed and be willing to share it with me.

Thank you in advance.

7
Support / Poster field
« on: November 16, 2024, 11:17:53 am »
Hello again, Ivek. I'm further customizing your script. I've got that custom director's field, but I will not post the script until some point when I will be satisfied with the level of customization.


Now I'm working on a possibility to import more than one poster at once from the site (let's say, IMDb site). Do you by any chance know if database or PVD itself allows that, so with the proper script coding, multiple posters would be parsed and populated to poster field?

8
Support / Re: Custom actors and directors field
« on: November 13, 2024, 11:09:09 pm »

This code of yours does not work for me. Can you attach your version of the script so I can see how it looks and works.


Of course. Just to let you know that at the moment I'm working on Directors custom field. So, for now only IMDb Cast custom field works

9
Support / Re: Custom actors and directors field
« on: November 13, 2024, 11:06:21 pm »
IMDB_[EN][HTTPS]_TEST_2c(Cast&Crew)_(afrocuban) script is attached.

Just to confirm that your script works! Thank you so much!

10
Support / Re: Custom actors and directors field
« on: November 13, 2024, 06:05:17 pm »
Of course it doesn't transfer the correct information because this feature is not disabled. You probably have a setting to transfer information to "Cast" ~actors~ ctActors from the Full Cast&Crew website. Find this feature in the Script Options section at the top of the script and change the settings as shown below.
Code: [Select]
  //GET_FULL_CREDIT  = True ;  //Download Cast or Credit provider page for retreive the info. Otherwise only the info of the principal movie page.
  GET_FULL_CREDIT  = False ;  //Download Cast or Credit provider page for retreive the info. Otherwise only the info of the principal movie page.

I will edit a special script for this, maybe today for you.

Here is a special IMDB_[EN][HTTPS]_TEST_2c(Cast&Crew)_(afrocuban) script for you, which is set up to transfer information to "Cast" ~actors~ ctActors from the Full Cast&Crew website. You can also edit other person information using it.

The IMDB_[EN][HTTPS]_TEST_2c script cannot transfer all person information from the primary IMDb movie pages, because it will need to make some corrections or updates to properly transfer all information again,  because some changes were made to the source code of the IMDb pages again.


IMDB_[EN][HTTPS]_TEST_2c(Cast&Crew)_(afrocuban) script is attached.

Oh, you were faster then me. My replying window was open while I was coding, so wasn't aware of your response. Thank you so much, but as I wrote, let's spare you when you are needed for global script, not for mine only! Humbly grateful.

11
Support / Re: Custom actors and directors field
« on: November 13, 2024, 06:03:07 pm »
Of course it doesn't transfer the correct information because this feature is not disabled. You probably have a setting to transfer information to "Cast" ~actors~ ctActors from the Full Cast&Crew website. Find this feature in the Script Options section at the top of the script and change the settings as shown below.
Code: [Select]
  //GET_FULL_CREDIT  = True ;  //Download Cast or Credit provider page for retreive the info. Otherwise only the info of the principal movie page.
  GET_FULL_CREDIT  = False ;  //Download Cast or Credit provider page for retreive the info. Otherwise only the info of the principal movie page.

Oh, I see! Thank you for fantastic assistance!!! It works now! Here's the code (it imports only up to 15 actors into custom field because of the design of my skin):

Code: [Select]

If GET_FULL_CREDIT Then Begin
    //Get ~crew~ctDirectors,ctWriters,ctComposers,ctProducers
       curPos:=Pos('<li role="presentation" class="ipc-metadata-list__item" data-testid="title-pc-principal-credit"><span class="ipc-metadata-list-item__label">Director',HTML); // Strings start which opens the block content data. WEB_SPECIFIC
       curPos:=PosFrom('<div class="ipc-metadata-list-item__content-container"><ul class="ipc-inline-list ipc-inline-list--show-dividers ipc-inline-list--inline ipc-metadata-list-item__list-content baseAlt" role="presentation">',HTML,curPos); // Strings end which opens the block content data. WEB_SPECIFIC
       curPos:=curPos+Length('<div class="ipc-metadata-list-item__content-container"><ul class="ipc-inline-list ipc-inline-list--show-dividers ipc-inline-list--inline ipc-metadata-list-item__list-content baseAlt" role="presentation">'); // Strings end which opens the block content data. WEB_SPECIFIC
       //Get all "raw" crew summary (in raw because we need the hidden person links) May one person or severals in the ~crew~
       endPos:=PosFrom('</li></ul><>',HTML,curPos); // Strings which opens/closes the data. WEB_SPECIFIC
       ItemList:=Copy(HTML,curPos,endPos-curPos);
       //LogMessage('           Parse results ('+IntToStr(curPos)+','+IntToStr(endPos)+') complex ItemList:'+ItemList+'||');
       curPos:=Pos('<a class="ipc-metadata-list-item__list-content-item ipc-metadata-list-item__list-content-item--link" rel="" href="/name/',ItemList); // String which opens the subList data. WEB_SPECIFIC
       index:=1;
       While curPos>0 Do Begin
          If (index>PEOPLE_LIMITS) Then break; // Limited depassed.
          //Get PersonURL (Always must it has)
          PersonURL:=BASE_URL_PERSON_PRE + TextBetWeen(ItemList,'<a class="ipc-metadata-list-item__list-content-item ipc-metadata-list-item__list-content-item--link" rel="" href="/name/','/?ref_=tt_ov_dr',false,curPos) + BASE_URL_SUF; // Strings which opens/closes the data. WEB_SPECIFIC
          LogMessage('      Parse Results PersonURL:'+PersonURL+'||');
          //Get Name (Always must it has)
          Name:=TextBetWeen(ItemList,'/?ref_=tt_ov_dr">','<',false,curPos); // Strings which opens/closes the data. WEB_SPECIFIC
          LogMessage('      Get result Name:'+Name+'||');
          //Get Role NO: PVD don't save Role in crew people
          If Pos('http://www.imdb.com/name//' ,PersonURL) < 1 then
             AddMoviePerson(Name,'','',PersonURL,ctDirectors);
          LogMessage('      Get results Director:#'+IntToStr(index)+'|'+Name+'|'+PersonURL+'||ctDirectors'); 
          curPos:=PosFrom('<a class="ipc-metadata-list-item__list-content-item ipc-metadata-list-item__list-content-item--link" rel="" href="/name/',ItemList,curPos); // String which opens the subList data. WEB_SPECIFIC
          index:=index+1;
       End;   
    //Go to "Writer:" or "Writers:" ~crew~ctWriters
       curPos:=Pos('">Writer',HTML); // Strings start which opens the block content data. WEB_SPECIFIC
       curPos:=PosFrom('<div class="ipc-metadata-list-item__content-container"><ul class="ipc-inline-list ipc-inline-list--show-dividers ipc-inline-list--inline ipc-metadata-list-item__list-content baseAlt" role="presentation">',HTML,curPos); // Strings end which opens the block content data. WEB_SPECIFIC
       curPos:=curPos+Length('<div class="ipc-metadata-list-item__content-container"><ul class="ipc-inline-list ipc-inline-list--show-dividers ipc-inline-list--inline ipc-metadata-list-item__list-content baseAlt" role="presentation">'); // Strings end which opens the block content data. WEB_SPECIFIC
       //Get all "raw" crew summary (in raw because we need the hidden person links) May one person or severals in the ~crew~
       endPos:=PosFrom('</li></ul><>',HTML,curPos); // Strings which opens/closes the data. WEB_SPECIFIC
       ItemList:=Copy(HTML,curPos,endPos-curPos);
       //LogMessage('           Parse results ('+IntToStr(curPos)+','+IntToStr(endPos)+') complex ItemList:'+ItemList+'||');
       curPos:=Pos('<a class="ipc-metadata-list-item__list-content-item ipc-metadata-list-item__list-content-item--link" rel="" href="/name/',ItemList); // String which opens the subList data. WEB_SPECIFIC
       index:=1;
       While curPos>0 Do Begin
          If (index>PEOPLE_LIMITS) Then break; // Limited depassed
          //Get PersonURL (Always must it has)
          PersonURL:=BASE_URL_PERSON_PRE + TextBetWeen(ItemList,'<a class="ipc-metadata-list-item__list-content-item ipc-metadata-list-item__list-content-item--link" rel="" href="/name/','/?ref_=tt_ov_wr',false,curPos) + BASE_URL_SUF; // Strings which opens/closes the data. WEB_SPECIFIC
          LogMessage('      Parse Results PersonURL:'+PersonURL+'||');
          //Get Name (Always must it has)
          Name:=TextBetWeen(ItemList,'/?ref_=tt_ov_wr">','<',false,curPos); // Strings which opens/closes the data. WEB_SPECIFIC
          LogMessage('      Get result Name:'+Name+'||');
          //Get Role NO: PVD don't save Role in crew people
          AddMoviePerson(Name,'','',PersonURL,ctWriters);
          LogMessage('      Get results Writer:#'+IntToStr(index)+'|'+Name+'|'+PersonURL+'||ctWriters'); 
          curPos:=PosFrom('<a class="ipc-metadata-list-item__list-content-item ipc-metadata-list-item__list-content-item--link" rel="" href="/name/',ItemList,curPos); // String which opens the subList data. WEB_SPECIFIC
          index:=index+1;
       End; 
//Go to "Soundtracks" ~crew~ctComposers
       curPos:=Pos('/soundtrack/?ref_=tt_trv_snd" target="">Soundtracks</a>',HTML); // Strings start which opens the block content data. WEB_SPECIFIC
       curPos:=curPos+Length('/soundtrack/?ref_=tt_trv_snd" target="">Soundtracks</a>'); // Strings end which opens the block content data. WEB_SPECIFIC
       //Get all "raw" crew summary (in raw because we need the hidden person links) May one person or severals in the ~crew~
       endPos:=PosFrom('/soundtrack/?ref_=tt_trv_snd" aria-label="See more" target="">',HTML,curPos); // Strings which opens/closes the data. WEB_SPECIFIC
       ItemList:=Copy(HTML,curPos,endPos-curPos);
       //LogMessage('           Parse results ('+IntToStr(curPos)+','+IntToStr(endPos)+') complex ItemList:'+ItemList+'||');
       curPos:=Pos('</span><span class="soundtrack-comment-1">',ItemList); // String which opens the subList data. WEB_SPECIFIC
       index:=1;
       While curPos>0 Do Begin
          If (index>PEOPLE_LIMITS) Then break; // Limited depassed.
          //Get PersonURL (Always must it has)
          PersonURL:=BASE_URL_PERSON_PRE + TextBetWeen(ItemList,'" href="/name/','/?ref_=tt_trv_snd">',false,curPos) + BASE_URL_SUF; // Strings which opens/closes the data. WEB_SPECIFIC
          //Get Name (Always must it has)
          Name:=TextBetWeen(ItemList,'/?ref_=tt_trv_snd">','<',false,curPos); // Strings which opens/closes the data. WEB_SPECIFIC
          //Get Role NO: PVD don't save Role in crew people
          If Pos('http://www.imdb.com/name//' ,PersonURL) < 1 then
             AddMoviePerson(Name,'','',PersonURL,ctComposers);
          LogMessage('      Get results Composers:#'+IntToStr(index)+'|'+Name+'|'+PersonURL+'||ctComposers'); 
          curPos:=PosFrom('Composed by',ItemList,curPos); // String which opens the subList data. WEB_SPECIFIC
          index:=index+1;
       End; 
    //Go to "Producers" ~crew~ctProducers
       //No Producers in principal page. 
       LogMessage('      Get No results Producers'+#13);
    //Get to "Cast" ~actors~ ctActors
       // Start the cast extraction process
LogMessage('Starting cast extraction process.');
curPos:=Pos('<h3 class="ipc-title__text">Top cast',HTML); // Start of cast block
curPos:=curPos+Length('<div class="ipc-avatar ipc-avatar--base ipc-avatar--dynamic-width" role="group">'); // Strings end which opens the block content data. WEB_SPECIFIC


// Get all "raw" crew summary (in raw because we need the hidden person links) May one person or severals in the ~crew~
endPos:=PosFrom('</li></ul><><><><>',HTML,curPos); // Strings which opens/closes the data. WEB_SPECIFIC
ItemList:=Copy(HTML,curPos,endPos-curPos);
//LogMessage('Parse results ('+IntToStr(curPos)+','+IntToStr(endPos)+') complex ItemList:'+ItemList+'||');
curPos:=Pos('" class="ipc-image" loading="',ItemList); // String which opens the subList data. WEB_SPECIFIC
index:=1;
ItemValue1:=''; // Initialize the custom IMDb Cast field


While (curPos > 0) and (index <= 15) Do Begin
    // Get PersonURL (Always must it has)
    ItemValue:=TextBetWeen(ItemList,'<a data-testid="title-cast-item__actor" href="/name/','?ref_=tt_cl_t_',false,curPos);
    PersonURL:=BASE_URL_PERSON_PRE + ItemValue + BASE_URL_SUF; // Strings which opens/closes the data. WEB_SPECIFIC
    LogMessage('Parse Results PersonURL:'+PersonURL+'||');


    // Get Name (Always must it has)
    Name:=TextBetWeen(ItemList,'">','</a><div class="title-cast-item__characters-list">',false,curPos); // Strings which opens/closes the data. WEB_SPECIFIC
    LogMessage('Parse Results Name:'+Name+'||');


    // Custom field: IMDb Cast (names only, separated by " • ")
    If ItemValue1='' Then
        ItemValue1:=Name
    Else
        ItemValue1:=ItemValue1+' • '+Name;


    curPos:=PosFrom('<a data-testid="title-cast-item__actor" href="',ItemList,curPos); // Move to the next actor's block
    index:=index+1;
End;


// Add custom field IMDb Cast
AddCustomFieldValueByName('IMDb Cast', ItemValue1);
// Log the IMDb Cast field for verification
LogMessage('IMDb Cast: '+ItemValue1);


// Log message and end block as in your script
LogMessage('Completed cast extraction process.');
LogMessage(#13+'');
End;


    //Get "plot_summary" as ~comment~ //debug_pos1-1







I will edit a special script for this, maybe today for you.


I don't want to bother you! This is only for my needs so far, so let's spare you!!!

12
Support / Re: Custom actors and directors field
« on: November 12, 2024, 11:48:44 pm »
Thanks for a feedback, Ivek.
I understood your points, and this is what I did


Code: [Select]

    //Get  to "Cast" ~actors~ ctActors
       //Go Cast list
       curPos:=Pos('<h3 class="ipc-title__text">Top cast',HTML);                                     //Strings start which opens the block content data. WEB_SPECIFIC
       curPos:=curPos+Length('<div class="ipc-avatar ipc-avatar--base ipc-avatar--dynamic-width" role="group">');                                //Strings end which opens the block content data.  WEB_SPECIFIC
       //Get all "raw" crew summary (in raw because we need the hidden person links) May one person or severals in the ~crew~
       endPos:=PosFrom('</li></ul><><><><>',HTML,curPos);                                             //Strings which opens/closes the data. WEB_SPECIFIC
       ItemList:=Copy(HTML,curPos,endPos-curPos);
       //LogMessage('           Parse results ('+IntToStr(curPos)+','+IntToStr(endPos)+') complex ItemList:'+ItemList+'||');
       curPos:=Pos('" class="ipc-image" loading="',ItemList)                               //String which opens the subList data. WEB_SPECIFIC
       index:=1;
ItemValue1:=''; // Initialize the custom IMDb Cast field


       While curPos>0 Do Begin
          If (index>PEOPLE_LIMITS) Then break;     //Limited depassed.
          //Get PersonURL (Always must it has)
          ItemValue:=TextBetWeen(ItemList,'<a data-testid="title-cast-item__actor" href="/name/','?ref_=tt_cl_t_',false,curPos);
          PersonURL:=BASE_URL_PERSON_PRE + ItemValue + BASE_URL_SUF; //Strings which opens/closes the data. WEB_SPECIFIC
          LogMessage('      Parse Results PersonURL:'+PersonURL+'||');
       //Get Name (Always must it has) 
          //Name:=TextBetWeen(ItemList,'?ref_=tt_cl_t_'+IntToStr(index)+'" class="StyledComponents__ActorName-y9ygcu-1 eyqFnv"','</a><div class="title-cast-item__characters-list">',false,curPos);
        Name:=TextBetWeen(ItemList,'">','</a><div class="title-cast-item__characters-list">',false,curPos);  //Strings which opens/closes the data. WEB_SPECIFIC
          //Name:=Trim(StringReplace(Name,'>','',True,False,True));
        LogMessage('      Parse Results Name:'+Name+'||');
          //Get Role YES: PVD save Role in cast (actors) people (Not always has link)       
        Role:=TextBetWeen(ItemList,' title-cast-item__char" data-testid="cast-item-characters-link">','</span><span data-testid="cast-item-characters-with-as" class="',false,curPos);  //Strings which opens/closes the data. WEB_SPECIFIC
          //Role:=Trim(StringReplace(Role,'>','',True,False,True));
          ///Role:=StringReplace(Role,Chr(13),'',True,False,True);
          ///Role:=StringReplace(Role,'  ','',True,False,True);
          LogMessage('      Parse Results Role:'+Role+'||');
        If Pos('http://www.imdb.com/name//' ,PersonURL) < 1 then
        AddMoviePerson(Name,'',Role,PersonURL,ctActors);
          LogMessage('      Get results cast:#'+IntToStr(index)+'|'+Name+'|'+Role+'|'+PersonURL+'||ctActors');                                               


    // Custom field: IMDb Cast (names only, separated by "  •  ")
    If ItemValue1='' Then
        ItemValue1:=Name
    Else
        ItemValue1:=ItemValue1+'  •  '+Name;
          //curPos:=PosFrom('" class="ipc-image" loading="',ItemList,curPos);                          //String which opens the Web Result item List data. WEB_SPECIFIC
          index:=index+1;
       End;
      //LogMessage(#13+'');
    End;   
   //*)     
   //(*         
      LogMessage(#13+'');
   //*)     


// Add custom field IMDb Cast
AddCustomFieldValueByName('IMDb Cast', ItemValue1);
// Log the IMDb Cast field for verification
LogMessage('IMDb Cast: '+ItemValue1);


    //Get "plot_summary" as ~comment~ //debug_pos1-1


Mysteriously and hilariously, instead of importing Cast, it imports Tv2 value into IMDb Cast field! It's some problem with ItemValue1 value that I'm trying to define, but I am not able to grasp what I'm doing wrong, so it pulls ItemValue1 from the first previous segment where it's used, and that is exactly Tv2 field in the script.


If you're willing to review and suggest snippet change, it would be appreciated as always.


P.S. Forum won't accept in the code section / div, but it's there in


<><><><>


so it's actually < / div >< / div >< / div >< / div >, without space inside, of course.

13
Support / Custom actors and directors field
« on: November 12, 2024, 04:14:57 am »
Hello Ivek.


I'm creating a new skin, pretty much different than anything seen here so far. As a teaser, It'll contain all the custom fields I'm aware of, around 160 as I already mentioned earlier.


For it to work properly, I need 2 custom fields: for IMDb actors without role and directors, with values separated with: "  •  ", or with double/triple space, even better.


I can't use existing human fields for those two, because they're by design of a link memo type, and with link memo it is impossible (at least for me) to achieve even simple goals in skin engineering.


I am more than willing to learn to do it myself with your help, of course. I can recognize patterns, and I already changed separator for Tv2 custom field with aforementioned, instead comma.


Thank you in advance

14
Support / Skin Engine Help Needed
« on: November 11, 2024, 12:35:30 am »
So, if I select too many values in a multiselect list, concatenated result in a skin is that the line exceeds skin (section) width. For example, for many Netflix's movies, there are too many subtitles, so once the file is scanned, I can't see all subtitles, but only those which fit skin width.


I have tried to set "wordwrap=true" attribute both to field and to column in which the field reside, but to no avail. This might be expected, because according to Skin Engine Help Manual, "wordwrap" is mentioned only in section about labels.


Is there a way to "wordwrap" Multiselect List field, so I could see all the values?

15
Support / Re: List of custom fields
« on: November 09, 2024, 10:22:00 am »
Oh, great I now remember that topic, thanks Ivek! I am already doing that, but then realized it's better to ask to avoid possible redundance, so I can prepare some list. I have identified over 160 custom fields so far. Some of them are obsolete, some are mine personal (for offline, physical, manual tracing movies), and the rest I've extracted from scripts.


I'll keep them all for archive reasons. I'll probably create some sheet with at least five columns: Name, Type, Skin (Movie/People), Public/Personal, Obsolete/Not and will publish it at some point then, so we could fine tuning it afterward.

16
Support / Re: Merging skins
« on: November 09, 2024, 04:16:44 am »

My goal would be to add people photos (thumbnails) for people listed in Movie skin's movie record, similar like on the website(s). Is that possible, anyone has an idea?

We would like to have pictures of the actors or other people along with the list of actors, just like on IMDb websites, where there is, for example, a Top Cast list of actors or Full Cast & Crew pages. Unfortunately, this cannot be done in movies skins, nor does the PVD program allow or support such an option. It is possible to use movies skin or people skins separately, but not in combinations of both at once.

I guessed so. Thanks for a feedback, Ivek.

17
Support / List of custom fields
« on: November 09, 2024, 01:48:31 am »
Hello Ivek.


Is there a way we can get a full comprehensive list of custom fields, at least from IMDb scripts, with names and types of fields?
I'd like to get it because my goal is to create a skin which will include all the fields I'm able to collect. I want to split custom fields to different tabs with different names, unlike Classic skin where all the custom fields are generated in a single section.


Thank you in advance.

18
Support / Imdb People script issues
« on: November 08, 2024, 05:09:10 pm »
Does anyone have the issue with this skin, as I do. Namely, when downloading a person's photo is taking a place, it freezes, I cannot cancel import, and the only way to continue is to kill viddb.exe process, and to restart PVD.


Thanks a bunch for a feedback.

19
Support / Re: Merging skins
« on: November 08, 2024, 05:03:07 pm »
Sorry, now I see I wasn't clear. I meant to somehow have photos that can been downloaded to People skin in the Movie skin too by "merging" photo parts of the People skin's code to Movie skin's code, and downloaded to Movie record by using parts of the code from People script in charge of downloading photos, to Movie script too (all Imdb, of course)...

20
Support / Merging skins
« on: November 05, 2024, 07:10:57 am »

My goal would be to add people photos (thumbnails) for people listed in Movie skin's movie record, similar like on the website(s). Is that possible, anyone has an idea?

Pages: [1] 2 3 4 5 6 ... 24
anything