Page 1 of 1

How to keep original filenames with utorrent-postprocess

Posted: 26 Nov 2012, 07:44
by ohadbenita
Hi,

Basically what I want to do is keep the exact same name of the source file such as the source on the target (file move operation).
Is there any option to do that in the utorrent-postprocess script ?

I'm currently using the following cmd :

Code: Select all

cmd /c filebot -script fn:utorrent-postprocess --output "A:/" --action copy --conflict override -non-strict --def subtitles=y artwork=n "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S" --def gmail=name:pass --def mailto=myEmail >> "c:\Dropbox\Media Center\logs\FileBot.log" 2>&1

Re: How to keep original filenames with utorrent-postprocess

Posted: 26 Nov 2012, 08:30
by rednoah
Nope, you'll need to run your own mod of that script. Just need to modify the format. You're gonna wanna use the {fn} variable.

Re: How to keep original filenames with utorrent-postprocess

Posted: 26 Nov 2012, 08:32
by ohadbenita
Thanks for the quick response, can you please refer me to the place in the script ?

[EDITED]

I now see a hint in the format regular expression, what should I change here in order to keep the original file name (in all cases) ?

Code: Select all

def format = [
	tvs:   '''TV Shows/{n}/{episode.special ? "Special" : "Season "+s}/{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t}''',
	anime: '''Anime/{n}/{n} - {sxe} - {t}''',
	mov:   '''Movies/{n} ({y})/{n} ({y}){" CD$pi"}{".$lang"}'''
]

Re: How to keep original filenames with utorrent-postprocess

Posted: 26 Nov 2012, 08:53
by rednoah

Code: Select all

def format = [
   tvs:   '''TV Shows/{n}/{episode.special ? "Special" : "Season "+s}/{fn}''',
   anime: '''Anime/{n}/{fn}''',
   mov:   '''Movies/{n} ({y})/{fn}'''
]

Re: How to keep original filenames with utorrent-postprocess

Posted: 28 Nov 2012, 15:33
by rednoah
Added support for overriding the default naming formats via --def:
--def "seriesFormat=TV/…"
--def "animeFormat=Anime/…"
--def "movieFormat=Movies/…"

Not gonna advertise that much since everybody will mess up the cmdline with unescaped quotes, so be careful with that those. ;)

Re: How to keep original filenames with utorrent-postprocess

Posted: 01 Dec 2012, 16:24
by ohadbenita
Thanks !

What should I do next ? where should I download an updated FileBot version from ?
The usage is as I you wrote :
--def "seriesFormat=TV/…"
of should I change anything ?

Again - thanks for all your help,
it's highly appreciated :D

Re: How to keep original filenames with utorrent-postprocess

Posted: 01 Dec 2012, 18:33
by rednoah
No need, if you're running with fn:utorrent-postprocess then FileBot will always run the latest script that's online.

Of course you'll need to specify the whole format line, e.g.

Code: Select all

--def "seriesFormat=TV/{n}/{fn}"

Re: How to keep original filenames with utorrent-postprocess

Posted: 01 Dec 2012, 19:44
by ohadbenita
Thanks, it worked :-)
Next thing on my to-do is donate.