rename movie file

Any questions? Need some help?
Post Reply
maortal
Posts: 31
Joined: 16 Dec 2012, 11:18

rename movie file

Post by maortal »

hey
i am using the amc.groovy and i want to know how can i rename only movies pattern
currently what i use is this
mov: tryQuietly{ movieFormat } ?: '''Movies/{n} ({y})/{fn}'''

but lately alot of movie release groups extract their movie file names to something that doesnt have much meanings so when searching for subtitles using filename its kinda difficult since its really different than the actual release name

is there anyway to create a pattern that instead of {fn} it will use {ut_title} as the new filename or something?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: rename movie file

Post by rednoah »

ut_title is a variable in the script NOT a binding in the format expression.

You can hard-code the ut_title value into the format string of course:

Code: Select all

'''Movies/{n} ({y})/''' + ut_title
:idea: Please read the FAQ and How to Request Help.
maortal
Posts: 31
Joined: 16 Dec 2012, 11:18

Re: rename movie file

Post by maortal »

yeah i figured that was the problem but i didnt know how the rename function would react to that kind...

btw another thing i noticed is now the cleaner script is abit broken..
after the amc.groovy update it seems you create dirs inside dir for extraction
the problem is that the cleaner script will not delete dirs that contain empty dirs...

ex:
if i have 2 nested dirs tmpFolder1, tmpFolder2 (c:\tmpFolder1\tmpFolder2\)
both of them are empty

the cleaner will remove only tmpFolder2 and keep c:\tmpFolder1


i changed it to

args.getFolders{ it.listFiles().length <= 1 }.each { if (it.isDirectory()) clean(it) }

it seem to fixed it not sure if thats the safest way to do it but it works :)
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: rename movie file

Post by rednoah »

cleaner.groovy fixed and commited with r1611
:idea: Please read the FAQ and How to Request Help.
Post Reply