So I'm trying to match all the sources of a single season. and if the match say what it is: DVDRip, BDRip, Etc. But if they are different between them, I want it to show Mixed. and if there is no source Listed, it should just say No Source.
So i'm using this:
Code: Select all
{def sources = model.findAll{ it.n == n && it.s == s }.source.minus(null).unique(); sources.size() >= 1 ? sources.size() == 1 ? "["+any{(csv('C:/FileBot Settings/Movies/MovieSource.csv').get(source))}{source}+"]" : '[Mixed]' : '[No Source]'}
It seems to work great except not when the case is different. so HDTV, and hdtv in the same folder returns [Mixed] instead of HDTV. and i'm not sure how to fix it, i'd assume it is the unique() in it. but taking that out didn't help. or if i could map that also to my CSV file so it can match hdtv to HDTV. then i'd guess that would work too. But i haven't been able to figure out how to get that to work either. boo.
the problem would also happen with any mixed case files, DVDRIP/DVDRip/BDRip/BDRIP/BdRip/etc
Any Suggestions?
The CSV File is so I can map my own source names and casing. also Pay no attention to the MovieSources.csv figure i'd use the same for movies and tv shows)
Thanks,
-Dev