Actor List by Alpha, then all actors from metadata

Post Reply
NYNMCA
Posts: 1
Joined: Sun Jun 02, 2013 11:00 pm

Actor List by Alpha, then all actors from metadata

Post by NYNMCA »

Eugene - You posted an answer to the "Actor List too long" of:

Post subject: Re: Actor List too longPostPosted: Tue Jan 22, 2013 9:26 am

UpperCase(Copy(mpActor, 1, 1)) + '\' + ExtractWord(1, mpActor, ',')


and this worked great to create an alpha listing (a, b, c, etc.) with actors listed by first name and then their movies under each actor listed. But, it only pulls the first actor listed in the list of actors for a respective movie, all other actors in that list are ignored. Is it possible to have a script pull each actor listed for a movie pulled and placed within the a-b-c structure created above? I tried to experiment with the 'ExtractSubstr' function but can't get it to work (I'm not familiar with Pascal, so I'm just guessing at this).

Thanks!
Eugene
Posts: 2940
Joined: Tue Nov 17, 2009 8:05 pm

Re: Actor List by Alpha, then all actors from metadata

Post by Eugene »

The folder "Collections" - Actor (or similar) - Grouping - Expression - right click - Edit - "Expression grouping" - Edit

Code: Select all

var
  ActorList: TStringList;  
  i: Integer;
begin
  ActorList := TStringList.Create;  
  try  
    ActorList.Text := ReplaceStr(mpActor, ',', #13#10);
    for i := 0 to ActorList.Count - 1 do
      ActorList[i] := Copy(Trim(ActorList[i]), 1, 1) + '\' + Trim(ActorList[i]);     
    FolderPath := ActorList.Text        
  finally    
    ActorList.Free
  end  
end.            
Post Reply