Page 1 of 1

If English is the one and only audio than move to specific folder

Posted: 02 Oct 2019, 11:11
by Burak
Hi,

First of all, English is not my primary language. So, sorry for my bad language.

I have a question.

I want to separate folders with this rule:

If English is the one and only audio language than move the file English Movies.

Thanks for help

Re: If English is the one and only audio than move to specific folder

Posted: 02 Oct 2019, 12:47
by rednoah
e.g.

Code: Select all

{audioLanguages ==~ /.eng./ ? 'English Movies' : 'Other Movies'}

Re: If English is the one and only audio than move to specific folder

Posted: 02 Oct 2019, 13:01
by Burak
thank you, it worked!

Re: If English is the one and only audio than move to specific folder

Posted: 15 Oct 2019, 17:26
by fireheart2008
it looks like this is an old topic however it piqued my interest , i think i can improve on the given reply.
while using tmdb as database for movies or series , if you want to categorize based on language then the best and most accurate binding to use should be

Code: Select all

info.OriginalLanguage
some examples from my own formula

Code: Select all

{info.OriginalLanguage=~ /ar/ ? '[Arabic]/' :null}

Code: Select all

{'Animation' in genres ? '[Animation]/' : (!(info.OriginalLanguage=~ /ar/) && !(info.OriginalLanguage=~ /en/) ) ? '[Non-English]/' : null}

Code: Select all

{if (info.OriginalLanguage=~ /ar/)  (primaryTitle) else norm(n)}

Code: Select all

{episode.special ? n + ' S00E'+special.pad(2) : languages[0]=~ /jpn/ && genres.contains('Animation') ? n +' E' + absolute.pad(2) : n+' '+s00e00}

Re: If English is the one and only audio than move to specific folder

Posted: 15 Oct 2019, 17:29
by fireheart2008
or what the original poster asks for

Code: Select all

{(info.OriginalLanguage=~ /en/) ? 'English Movies' : 'Other Movies'}

Re: If English is the one and only audio than move to specific folder

Posted: 15 Oct 2019, 17:46
by rednoah
The choice between audioLanguages and info.OriginalLanguage is ultimately up to the user. It's Apples and Bananas, pick the one that you want to eat. :lol:

audioLanguages is based on the MediaInfo / Audio Stream(s) of the given file (regardless of matched movie object)

info.OriginalLanguage is whatever has been entered on TheMovieDB for the particular matched movie object (regardless of what audio streams are actually available inside the given file)