Code: Select all
{['C:', 'D:', 'E:'].collect{ (it+'/TV/'+n) as File }.sort{ a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{episode}
I've modified it slightly because my TV shows names are bilingual :
Code: Select all
{['D:', 'E:'].collect{ (it+'/TV/'+info.network =~ (/Canal+|Arte|OCS|France 4/) ? localize.French.n : n) as File }.sort{ a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}
For the ones that are on my C: drive Filebot shows this.
When i remove the ternary operator it works fine for those C: files. The same ternary operator works well outside of this snippet too. What am i missing?