Page 1 of 1

Sorting Folder movies by Subtitile or not

Posted: 05 Mar 2014, 13:56
by neriox
hello, I'm trying to mount one final scheme, which can separate my movies at 2 big folders: one folder with the movies they already own subtitle ( External srt files, without being included in the MKV or embedded) and a folder with movies without caption.
I'm trying to use the function:
folder.list().find
but I'm not getting results. Using the text function, which only works on MKV and other packages (and does not work in avi, which I also use), I can not, because many come with subitiles but text caption in English, and I would like to share based on criteria external subtitle and Portuguese.
At the moment this is my pattern:

Code: Select all

\{n} [{y}]{"[$vf]"}{"[$rating]"}{"$genres"}\{fn}{".$lang"}
Is there some other way?

Example:

Code: Select all

Movie1.avi
Movie1.pob.srt  
Movie2.mkv
After:

Code: Select all

Folder Movies\
------------------\With Subtitle\Movie1 [2014] [Action,Drama]\Movie1.avi
------------------\With Subtitle\Movie1 [2014] [Action,Drama]\Movie1.pob.srt
------------------\Without Subtitle\Movie2 [2013] [Action,Comedy]\Movie1.mkv

Re: Sorting Folder movies by Subtitile or not

Posted: 05 Mar 2014, 14:11
by rednoah
Like this:

Code: Select all

{folder.listFiles().any{ it =~ /[.]srt/ } ? '/With Subtitles' : '/Without Subtitles'}