Page 1 of 1

automation with uTorrent

Posted: 30 Dec 2013, 01:59
by Amishman
Hello,

I am having a little trouble getting uTorrent to run the AMC script. I followed the tutorial for uTorrent but I don't have something right. When I run the script from CLI, it works great except for how it names the season folder (which I will talk about in a minute). uTorrent tries to execute the script but it doesn't do anything.

Here is the script I have entered into uTorrent:

Code: Select all

filebot.launcher -script fn:amc --output "Z:/" --log-file amc.log --action move --conflict override -non-strict --def music=n artwork=n --def "seriesFormat=TV/{n}/{\"Season \${s.pad(2)}\"}/{s00e00} {t}/{n} {s00e00} {t}" "movieFormat=Movies/{n} ({y}) {\"[\$vf]\"}/{n} ({y})" --def clean=y --def plex=localhost "ut_dir=%D" "ut_file=%F" "ut_kind=%K" "ut_title=%N" "ut_label=%L" "ut_state=%S"
uTorrent's Logger tab shows:

Code: Select all

[2013-12-29 20:23:43]  Executing: filebot.launcher -script fn:amc --output "Z:/" --log-file amc.log --action move --conflict override -non-strict --def music=n artwork=n --def "seriesFormat=TV/{n}/{\"Season \${s.pad(2)}\"}/{s00e00} {t}/{n} {s00e00} {t}" "movieFormat=Movies/{n} ({y}) {\"[\$vf]\"}/{n} ({y})" --def clean=y --def plex=localhost "ut_dir=C:\Users\Amishman\Downloads" "ut_file=The.Big.Bang.Theory.S07E11.HDTV.x264-LOL.mp4" "ut_kind=single" "ut_title=The.Big.Bang.Theory.S07E11.HDTV.x264-LOL.mp4" "ut_label=" "ut_state=5"
It doesn't do anything. I'm missing something.

This is the CLI script:

Code: Select all

C:\Users\Amishman>filebot -script fn:amc "C:/1_test" --output "Z:/" --log-file a
mc.log --action move --conflict override -non-strict --def music=n subtitles=en
artwork=n --def "seriesFormat=TV/{n}/{\"Season \${s.pad(2)}\"}/{s00e00} {t}/{n}{s00e00} {t}" "movieFormat=Movies/{n} ({y}) {\"[\$vf]\"}/{n} ({y})" --def clean=y --def plex=localhost
This is the output I get when I use the CLI:
Z:\TV\The Big Bang Theory\Season ${s.pad(2)}\S07E11 The Cooper Extraction\The Big Ba
ng Theory S07E11 The Cooper Extraction.mp4
Everything looks just the way I want it except for the season folder. I don't know why it shows as Season ${s.pad(2)}

Any help is greatly appreciated.

Re: automation with uTorrent

Posted: 30 Dec 2013, 06:02
by rednoah
Maybe $ doesn't need escaping for cmd, thus gets passed into Groovy and escapes the $ within the Groovy string:

Just write it like this and avoid worrying about escape rules:

Code: Select all

{'Season '+s.pad(2)}

Have you tried pasting this into cmd?

Code: Select all

filebot.launcher -script fn:amc --output "Z:/" --log-file amc.log --action move --conflict override -non-strict --def music=n artwork=n --def "seriesFormat=TV/{n}/{\"Season \${s.pad(2)}\"}/{s00e00} {t}/{n} {s00e00} {t}" "movieFormat=Movies/{n} ({y}) {\"[\$vf]\"}/{n} ({y})" --def clean=y --def plex=localhost "ut_dir=C:\Users\Amishman\Downloads" "ut_file=The.Big.Bang.Theory.S07E11.HDTV.x264-LOL.mp4" "ut_kind=single" "ut_title=The.Big.Bang.Theory.S07E11.HDTV.x264-LOL.mp4" "ut_label=" "ut_state=5"
It'll be without output but it should be doing something. If you wanna see output use filebot instead of filebot.launcher, first you make it work with filebot, so you can see if and what is going on. Only then you try filebot.launcher which hides everything. Also what's the log? amc.log should say something. If there is logging filebot is called. If there is no logging we know filebot wasn't called.

Re: automation with uTorrent

Posted: 30 Dec 2013, 10:53
by Amishman
Thanks for you help.

The season code worked perfect.

I did as you said and change from filebot.launcher to filebot. I ran it a couple more times through uTorrent and the CLI. I checked the amc.log. the log is only being written to when I use the CLI.

I don't know if this makes a difference since everything still works but I receive a warning when using the code through CLI.

Code: Select all

WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

Re: automation with uTorrent

Posted: 30 Dec 2013, 16:02
by rednoah
That's just a warning. Feel free to ignore that.

If running with "filebot" is working then just use that. You could try "C:\path\to\filebot.launcher.exe" but as long as "filebot" works the issue is solved. There is other ways to hide the cmd window if you really need to.

Re: automation with uTorrent

Posted: 30 Dec 2013, 17:16
by Amishman
When I run the script through CLI, it works but it does not work when uTorrent executes it.

uTorrent shows that it is executing it but nothing happens.

Re: automation with uTorrent

Posted: 30 Dec 2013, 17:23
by rednoah
Something always happens...

Is FileBot called? Yes? No?
Is FileBot called but then fails? What is the error message?

Does it only work if you call it with cmd? Well, try cmd /c filebot ... if it's really doing "nothing" then that's a severe bug in utorrent and I doubt that. :P

Re: automation with uTorrent

Posted: 31 Dec 2013, 13:49
by Amishman
I was finally able to get it to work. I had to use "C:\path\to\filebot.exe" and give it an input path "C:\path\to\download".

Thank you for all your help rednoah and this great program.

Re: automation with uTorrent

Posted: 31 Dec 2013, 21:25
by rednoah
--def excludeList=amc-input.txt Keep a list of previously processed files to be ignored in future runs (if you run this script on the same files repeatedly you must enable this option)

You MUST set this if you just call filebot on a fixed folder all the time.