Issue with IF statement
Posted: 23 Apr 2017, 18:33
My arguments (movie processing):
args.txt (movie section)
I'm running Filebot on a VPS with Google Drive mounted into /GD. I'm running the above every hour and having some issues with dealing with some specific files. The files in question are these:
And this is what the report gives:
For some reason, it's resolving the IF statement to <null> which must somehow resolve the whole output (/GD/Media/Plex/Incoming/Film) to '/', which actually moves the files into the VPS root and trashes the files on Google Drive. Could someone point me the error in my statement?
Thanks!
PJ
Code: Select all
/usr/bin/filebot -script fn:amc --output "/GD/Media/Plex" --action move "/GD/Media/Plex/Incoming/Film" --def @/root/.filebot/args.txt --def excludeList -no-xattr --def subtitles=en --def pushbullet=[mykey] --def storeReport=y --def clean=y --def "ut_label=Movie" --def unsorted=y --log-file amc_movies.log --conflict override
Code: Select all
movieFormat={if (fn =~ /KORSUB|HC|HARDCODED/) 'Unsorted' else if (genre == 'Documentary') 'Documentaries' else 'Films'}/{n.space('.').upperInitial()}.({y})/{fn.space('.').upperInitial()}
Code: Select all
Don.Giovanni.2008.Part.1.BRRip.XviD.MP3-RARBG.avi
Don.Giovanni.2008.Part.2.BRRip.XviD.MP3-RARBG.avi
Code: Select all
Don.Giovanni.2008.Part.1.BRRip.XviD.MP3-RARBG.avi Don.Giovanni.2008.Part.1.BRRip.XviD.MP3-RARBG.avi /Don.Giovanni.(2008)
Don.Giovanni.2008.Part.2.BRRip.XviD.MP3-RARBG.avi Don.Giovanni.2008.Part.2.BRRip.XviD.MP3-RARBG.avi /Don.Giovanni.(2008)
Thanks!
PJ