Page 1 of 1

Script not working as i thought....

Posted: 20 Feb 2015, 01:05
by stuartgreig1978
filebot -script fn:amc --output "M:\Video" --log-file amc.log --action copy --conflict override -non-strict --def music=n subtitles=en artwork=y xbmc=localhost "movieFormat={fn =~ /3D/ ? '3D Movies' : 'Movies'}/{n.space('.')}.({y}){fn =~ /3D/ ? '.3D.Bluray' : ''}/{n.space('.')}.({y}).({hpi}){fn =~ /3D/ ? '3D.Bluray' : ''}{' CD'+pi}" deleteAfterExtract=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"

At the moment it partially does what i want it to. When i download a 3D movies it automatically downloads the 3D movies to the "3D Movies" folder and names them correctly the rest of the downloads go to the "Movies" folder. Just checked my movies folder and the 2D moves aren't being named correctly. At present for example i have:-

Rocky.Balboa.(2006).
Scarface.(1983).

Ideally i would want:-

Rocky.Balboa.[1080p].(2006).Bluray
Scarface.[1080p].(1983).Bluray

Also if possible if i download a family/kids movie can they be moved to a "Kids Movies" folder with the files name in the same format as above?

Anyone Help??

Re: Script not working as i thought....

Posted: 21 Feb 2015, 03:01
by rednoah
You will find answers for all your queries in other posts. It's simple once you understand how the format works. ;)

Re: Script not working as i thought....

Posted: 16 Mar 2015, 19:07
by stuartgreig1978
Thanks. Still struggling though even after I've tried understanding the code???

Re: Script not working as i thought....

Posted: 17 Mar 2015, 05:33
by rednoah

Code: Select all

{fn =~ /3D/ ? '.3D.Bluray' : ''}
This part only works if the original filename {fn} contains the String '3D'

Code: Select all

.({hpi})
This is a typical noob mistake. It works but it's not robust.

@see viewtopic.php?f=5&t=1895
Thanks. Still struggling though even after I've tried understanding the code???
So what seems to be the problem?

Re: Script not working as i thought....

Posted: 17 Mar 2015, 10:26
by stuartgreig1978
My problem isn't really with the 3D files. They rename correctly and go into the correct folder no problem. My issues is with the renaming of the 2D files. At present for example I have The.Dark.Knight.(2008.().mkv

I want it to look like this The.Dark.Knight.(2008).(Bluray).mkv.

I cant seem to find the part of my script that deals with renaming the 2D files and inserting the Bluray inside the ()??

Any ideas?

Re: Script not working as i thought....

Posted: 17 Mar 2015, 14:44
by rednoah

Code: Select all

.({hpi})
What happens if {hpi} fails? Yes, the result is ".()" like what you're seeing.

The link I posted does explain this problem in detail and will explain how to write formats that deal with failures correctly.