How to keep original filenames with utorrent-postprocess

Any questions? Need some help?
Post Reply
ohadbenita
Posts: 9
Joined: 26 Nov 2012, 07:38

How to keep original filenames with utorrent-postprocess

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to keep original filenames with utorrent-postprocess

Post 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.
:idea: Please read the FAQ and How to Request Help.
ohadbenita
Posts: 9
Joined: 26 Nov 2012, 07:38

Re: How to keep original filenames with utorrent-postprocess

Post 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"}'''
]
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to keep original filenames with utorrent-postprocess

Post 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}'''
]
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to keep original filenames with utorrent-postprocess

Post 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. ;)
:idea: Please read the FAQ and How to Request Help.
ohadbenita
Posts: 9
Joined: 26 Nov 2012, 07:38

Re: How to keep original filenames with utorrent-postprocess

Post 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
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to keep original filenames with utorrent-postprocess

Post 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}"
:idea: Please read the FAQ and How to Request Help.
ohadbenita
Posts: 9
Joined: 26 Nov 2012, 07:38

Re: How to keep original filenames with utorrent-postprocess

Post by ohadbenita »

Thanks, it worked :-)
Next thing on my to-do is donate.
Post Reply