Help me simplify this please
Posted: 06 Oct 2017, 17:37
Hi,
I want my movies to end up in different folders based on some of the keywords found in the title. So far I have got this
This seems to be working, however for 3D and UHD there usually is Remux in the title as well, so movies end up going to
'3DRemux' instead of '3D' and
'4k-uhdRemux' instead of '4k-uhd'
because it seems to evaluate all the conditions, wondering if there is a way to break if one of the conditions is satisifed? Also am I writing this "if this then that" condition the wrong way?
Appreciate the help. Thanks
I want my movies to end up in different folders based on some of the keywords found in the title. So far I have got this
Code: Select all
--def movieFormat=$moviePath"/{fn =~ /3D/ ? '3D' : null}{fn =~ /2160p|.UHD./ ? '4k-uhd' : null}{fn =~ /REMUX|remux|Remux/ ? 'Remux' : null}{fn =~ /webdl|web-dl|WEB-DL|WEBDL/ ? 'WEB-DL' : null}//{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /\$2, \$1/)} ({y})/{fn}" \
'3DRemux' instead of '3D' and
'4k-uhdRemux' instead of '4k-uhd'
because it seems to evaluate all the conditions, wondering if there is a way to break if one of the conditions is satisifed? Also am I writing this "if this then that" condition the wrong way?
Appreciate the help. Thanks