Page 2 of 2
Re: Lots of questions about basic custom formats
Posted: 14 May 2016, 12:29
by kim
Maybe this will help
Code: Select all
{def FirstLanguage = languages[0]; (FirstLanguage =~ 'French') ? 'French Films'+'/'+localize.French.name+'('+y+')'+'/'+fn : ((FirstLanguage =~ 'English') ? 'English Movies'+'/'+localize.English.name+'('+y+')'+'/'+fn : 'Unknown')}
try
e.g.
Code: Select all
{localize.English.SpokenLanguages.join('')}
Re: Lots of questions about basic custom formats
Posted: 17 May 2016, 20:03
by macdalor
I'm back

I am running the following script
Code: Select all
{languages[0] =~ 'Spanish|French' ? localize[languages[0]].name : n} ({y})
{def FirstLanguage = languages[0]; (FirstLanguage =~ 'French') ? 'French Films'+'/'+localize.French.name+'('+y+')'+'/'+fn : ((FirstLanguage =~ 'English') ? 'English Movies'+'/'+localize.English.name+'('+y+')'+'/'+fn : 'Unknown')}
and I am getting the following result
http://s32.postimg.org/s8rtqyndh/Screen ... _50_33.jpg
I wanted to show you what I tried to explain above regarding the folders creation, file by file...
What is it I am not doing correctly?
Re: Lots of questions about basic custom formats
Posted: 17 May 2016, 20:06
by rednoah
Do you expect me to hack into your machine just so I can see the screenshot you saved on your desktop, Mr Producer? Sry, can't be bothered. Try again. This time try uploading the screenshot somewhere, ok?
PS: You did not read or understand
how {expressions} work.
Re: Lots of questions about basic custom formats
Posted: 17 May 2016, 20:08
by macdalor
rednoah wrote:Do you expect me to hack into your machine just so I can see the screenshot you saved on your desktop, Mr Producer? Sry, can't be bothered. Try again. This time try uploading the screenshot somewhere, ok?


I like to sense of humour...
I saw this about the img and currently trying sorting out...bear with me please

Re: Lots of questions about basic custom formats
Posted: 17 May 2016, 20:16
by macdalor
here you go
ps: thx for your patience

Re: Lots of questions about basic custom formats
Posted: 17 May 2016, 20:28
by rednoah
* What do you want?
* How is it different from what you get?
* Which part of the format does not behave the way you'd expect?
Answer these questions using specific examples.
Re: Lots of questions about basic custom formats
Posted: 17 May 2016, 20:35
by macdalor
I haven't read this yet...bed time reading I guess

Re: Lots of questions about basic custom formats
Posted: 17 May 2016, 20:47
by rednoah
If the first language is neither French nor German, the your second {expression} will yield just "Unknown", not a folder structure like in the other two cases.
EDIT:
Sigh, at this point, just giving you the solution would have more cost-effective for me...
Part 1:
Code: Select all
{any{[French: 'French Films', English: 'English Movies'][languages[0]]}{'Foreign Movies'}}
Part 2:
Code: Select all
{any{localize[languages[0].match(/Spanish|French/)].name}{n}} ({y})
Part 3:
Copy & paste these things together, add some / in between, however you want. I already don't remember your exact rules.
Now you owe me a tutorial where you explain what you've learned, or a donation, your choice.
Re: Lots of questions about basic custom formats
Posted: 19 May 2016, 19:25
by kim
Why / how does this work ?
{[French: 'French Films', English: 'English Movies'][languages[0]]}
([LinkedHashMap] [arraylist])
is it a filebot thing or "org. code" ?
do you have a link ?
is there a way to write it, so I know how it works ?
Re: Lots of questions about basic custom formats
Posted: 19 May 2016, 19:37
by rednoah
Re: Lots of questions about basic custom formats
Posted: 19 May 2016, 19:56
by kim
sry still don't get why/how it works?
under "Filtering and searching" ?
same?
{def lang = [French: 'French Films', English: 'English Movies'].findAll{ it.key == languages[0]}; lang.values().join('')}
or
{[French: 'French Films', English: 'English Movies'].get(languages[0])}
Re: Lots of questions about basic custom formats
Posted: 19 May 2016, 20:07
by rednoah
map[x] is the same as map.get(x)
Code: Select all
assert map.get('name') == 'Gromit'
assert map['name'] == 'Gromit'
Re: Lots of questions about basic custom formats
Posted: 19 May 2016, 20:27
by kim
thx
Re: Lots of questions about basic custom formats
Posted: 25 May 2016, 08:52
by macdalor
rednoah wrote:Now you owe me a tutorial where you explain what you've learned, or a donation, your choice.
Rednoah, although I am still testing this script (have been away much recently) & don't have all elements still, I'll donate for your great help and patience as I think it'll help you more than a tutorial from someone who doesn't understand much (although highly willing to!)...it'll just take a bit of time as I'm not very often home or with time to take care of this...but I'll do it at some point...

Re: Lots of questions about basic custom formats
Posted: 25 May 2016, 09:43
by rednoah
No worries. My tutorials are detailed and technical so pretty hard to understand if you don't have certain basics.
Just write it as if you'd explain it to a friend. I'm sure many people will appreciate newbie oriented tutorials and explanations. If something is wrong, I'll just correct it for you.

Re: Lots of questions about basic custom formats
Posted: 25 May 2016, 10:16
by macdalor
rednoah wrote:No worries. My tutorials are detailed and technical so pretty hard to understand if you don't have certain basics.
Just write it as if you'd explain it to a friend. I'm sure many people will appreciate newbie oriented tutorials and explanations. If something is wrong, I'll just correct it for you.

so you prefer a newbie tut than a donation then...

Re: Lots of questions about basic custom formats
Posted: 25 May 2016, 10:37
by rednoah
Pretty much.
