Page 1 of 1

"Original Name" issues & swapping first name last name

Posted: 12 Jun 2015, 15:09
by 4go3jm92
Hello,

Firstly, thanks for such great software!

I have a lot of foreign films and currently I am using this:

Code: Select all

{director} - {y} - {info.OriginalName} ({n})
which gives me this:
Emir Kusturica - 1985 - Otac na sluzbenom putu (When Father Was Away on Business)

However for my english language films it gives me this:
David Lynch - 1990 - Wild at Heart (Wild at Heart)

Is there anyway to get rid of the repeating english title?

Also, I can't seem to find how to swap director's first name & last name to get this:

Kusturica, Emir - 1985 - Otac na sluzbenom putu (When Father Was Away on Business)

Any thoughts!? Thank you

Re: "Original Name" issues & swapping first name last name

Posted: 12 Jun 2015, 15:38
by rednoah
Easy, just use conditions:

Code: Select all

{n == primaryTitle ? n : "$primaryTitle ($n)"}

Re: "Original Name" issues & swapping first name last name

Posted: 12 Jun 2015, 16:48
by 4go3jm92
rednoah wrote:Easy, just use conditions:

Code: Select all

{n == primaryTitle ? n : "$primaryTitle ($n)"}
thanks rednoah,

The repeating english title is solved. Works great, and is it possible to swap first name, last name of director ie.

Kusturica, Emir - 1985 - Otac na sluzbenom putu (When Father Was Away on Business)

Re: "Original Name" issues & swapping first name last name

Posted: 12 Jun 2015, 16:54
by rednoah
Easy:

Code: Select all

{director.split(/\s/).reverse().join(', ')}
Though, as your personal programmer I do somewhat expect a donation now. ;)

Re: "Original Name" issues & swapping first name last name

Posted: 12 Jun 2015, 17:19
by 4go3jm92
ok i made a donation!

and for future reference here is the code:

Code: Select all

{director.split(/\s/).reverse().join(', ')} - {y} - {n == primaryTitle ? n : "$primaryTitle ($n)"}
that creates:

Kusturica, Emir - 1985 - Otac na sluzbenom putu (When Father Was Away on Business)

thanks again

Re: "Original Name" issues & swapping first name last name

Posted: 04 Dec 2022, 14:56
by motorpsycho
Hello, I know this topic it's pretty old now... but I was wondering if it's possible to have the surname in all caps format (eg KUSTURICA, Emir).

With

Code: Select all

{director.upper().split(/\s/).reverse().join(', ')
it would go uppercase both name and surname...
any suggestion?

Re: "Original Name" issues & swapping first name last name

Posted: 04 Dec 2022, 16:33
by rednoah
e.g.

Code: Select all

{ 
	director.split(/\s/).reverse().join(', ').replaceFirst(/\w+/) { it.upper() }
}

Re: "Original Name" issues & swapping first name last name

Posted: 05 Dec 2022, 19:12
by motorpsycho
rednoah wrote: 04 Dec 2022, 16:33 e.g.

Code: Select all

{ 
	director.split(/\s/).reverse().join(', ').replaceFirst(/\w+/) { it.upper() }
}
YEEEESSSS!!!!
Thank you!!! :)