INTERACT FORUM

More => Old Versions => JRiver Media Center 19 for Windows => Topic started by: fredele on March 07, 2014, 05:13:06 pm

Title: Combine 2 List to one
Post by: fredele on March 07, 2014, 05:13:06 pm
Hello !

This one is for the 'expression' specials :
Here's the problem, I've 2 list, one contains the actors of a film, the second the character
as an example

-for the actors :

Jack Nicholson
Faye Dunaway
John Huston
...

-for the Characters :

Jake Gittes
Evelyn Cross Mulray
Noah Cross
...

-And I want a Result as, you gess :

Jack Nicholson as Jake Gittes
Faye Dunaway as Evelyn Cross Mulray
John Huston as Noah Cross
...

It must be something like Listbuild( Listitem([Actor],i) , Listitem([Character],i)) , but there's no 'for' i to have a loop  :P ?

I must be near the thing, but  ...

Thanks for your help !
Title: Re: Combine 2 List to one
Post by: MrC on March 07, 2014, 05:17:26 pm
There's nothing to combine the way you want, since you can't iterate over items to create the 1-1 actor/role correspondence.  Assuming the actors and roles are in the correct position in each list, you could use a long sequence of ListItem() calls, one per actor/role pair.

Or you could use an external script (http://yabb.jriver.com/interact/index.php?topic=85990.0) to process the items for you.
Title: Re: Combine 2 List to one
Post by: fredele on March 07, 2014, 05:21:08 pm
OK , thanks, will take a look at that !

Always a so rapid answer, here.

Awesome, really !
 :D
Title: Re: Combine 2 List to one
Post by: MrC on March 07, 2014, 05:24:48 pm
You're welcome.  I just watched that classic recently.  "The future, Mr. Gittes. The future!"

Ask if you need a scriptlet to do the job.
Title: Re: Combine 2 List to one
Post by: fredele on March 07, 2014, 05:36:46 pm
I' ll try on my own.

The thing is, i' ve written a little app in Delphi, who connects to Themovie.org database, API JSON powered.
You'll here about that tomorrow on the french section, I worked with another guy from france, trying to make a stable thing.
I' m not a programmer,just a hobby guy, but more or less happy with what I've done : not perfect but does the trick.
So , adding a field or more, i'll compute it myself in the app.

This 'could' be a reasonnable 'add-on' for the european, cause the API is in french, german, italian , so forth .. ;D