AMC not working with Transmission

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
WilDieteren
Posts: 12
Joined: 24 Nov 2015, 11:29

AMC not working with Transmission

Post by WilDieteren »

L.S.,

I have only today started using FileBot and am still figuring things out. I have tried to setup AMC with Transmission but cannot seem to get it to work. I am on OSX 10.11, Transmission 2.84 and FileBot 4.6. Reading through the Automatic Media Center in the forum for mutorrent there is a mention of looking at log files, is there something similar for Transmission, or is there some other way to figure out what is going wrong?

Below is the shell script I am using:

#!/bin/bash
filebot -script fn:amc --output “/Users/WilDieteren/AMC“ --log-file amc.log --action duplicate --conflict auto --def subtitles=nl,en artwork=y storeReport=y excludeList=amc.txt unsorted=y “ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"

Any help would be greatly appreciated.

Wil Dieteren
User avatar
rednoah
The Source
Posts: 19349
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC not working with Transmission

Post by rednoah »

Please read Shell Script Debugging for Beginners:
viewtopic.php?f=3&t=3067

Follow this link, it'll help you narrow down the problem.



PS: whatever that is, it sure is is not the same as this " ...
:idea: Please read the FAQ and How to Request Help.
WilDieteren
Posts: 12
Joined: 24 Nov 2015, 11:29

Re: AMC not working with Transmission

Post by WilDieteren »

Rednoah,

The scripts in Shell Script Debugging for Beginners run, however I am not sure what the next step should is. Should I add them to the amc script, and if so at the beginning of the script or at the end of the script?

Just to be clear (if it was not so already): I have no previous experience with scripts. I had hoped to get the amc script working by "smart copy\pasting" the example script, which obviously has not worked. Maybe I should just give up on the idea?

Wil Dieteren
User avatar
rednoah
The Source
Posts: 19349
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC not working with Transmission

Post by rednoah »

Ideally, it'll just work, but if it doesn't then you'll need to figure out why, or give up. That being said, knowing the very basics about unix scripting hasn't hurt anyone. ;)

The things you need to do are:
1. Make sure your script is actually called
2. Make sure to collect all the output so you can see what's going on

Assuming the script is called, there will be some sort of output, errors or otherwise. The next step is to post that output here in the forums.
:idea: Please read the FAQ and How to Request Help.
WilDieteren
Posts: 12
Joined: 24 Nov 2015, 11:29

Re: AMC not working with Transmission

Post by WilDieteren »

Rednoah,

I am willing to stick with it and try to figure it out, but repeating my question: where to add the scripts in Shell Script Debugging for Beginners?

Wil Dieteren
User avatar
rednoah
The Source
Posts: 19349
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC not working with Transmission

Post by rednoah »

So this is probably what you've tried, and something is not working:
http://www.filebot.net/forums/viewtopic ... 1561#p3380


You just have to modify /path/to/transmission-postprocess and make it do other things that help you confirm what's working and what's not.


Original:

/path/to/transmission-postprocess

Code: Select all

#!/bin/bash
filebot -script fn:amc --output "$HOME/Media" --log-file amc.log --action duplicate --conflict override -non-strict --def music=y artwork=y "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"
Step 1:

/path/to/transmission-postprocess

Code: Select all

#!/bin/bash
whoami > "/path/to/log.txt"
Instead of transmission-postprocess call filebot, we have it execute a very simple command that creates a file instead. If this file is created, then we know that transmission is calling transmission-postprocess.

Step 2:
/path/to/transmission-postprocess

Code: Select all

#!/bin/bash
filebot -script fn:sysenv > "/path/to/log.txt" 2>&1
Now we have transmission-postprocess call a simple filebot script that creates a file. If this files is created, then we know that transmission is calling transmission-postprocess which is calling filebot. Even if the filebot call fails, there will still be output in the log.txt file.


Not that you need to replace /path/to/ with a real path to an existing/writable folder.


Each of these scripts, when called by transmission, will create a log.txt file and you're supposed to look at and send me the contents of that log.txt file.


Also:
PS: whatever that “ is, it sure is is not the same as this " ...
Did you address this issue? If you use wierd quotation marks then the script will not work. Do not use Microsoft Word or whatnot to write scripts. Use a text editor.
:idea: Please read the FAQ and How to Request Help.
WilDieteren
Posts: 12
Joined: 24 Nov 2015, 11:29

Re: AMC not working with Transmission

Post by WilDieteren »

Rednoah,

Thanks for the clarification, will give it I try and get back to you, much appreciating your help.

Wil Dieteren
WilDieteren
Posts: 12
Joined: 24 Nov 2015, 11:29

Re: AMC not working with Transmission

Post by WilDieteren »

Rednoah,

Step 2 fails, below both the shell script and the log file.

Wil Dieteren

script:
#!/bin/bash
filebot -script fn:sysenv > "/Users/WilDieteren/Media/step 2.log" 2>&1

log file:
/Users/WilDieteren/Media/test step 2.sh: line 2: filebot: command not found
User avatar
rednoah
The Source
Posts: 19349
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC not working with Transmission

Post by rednoah »

filebot isn't installed correctly. How did you install FileBot? brew cask?

@see viewtopic.php?f=4&t=2049

If you have $PATH issues, try using the absolute path /usr/local/bin/filebot instead of using filebot let letting the shell figure it out.
:idea: Please read the FAQ and How to Request Help.
WilDieteren
Posts: 12
Joined: 24 Nov 2015, 11:29

Re: AMC not working with Transmission

Post by WilDieteren »

Rednoah,

I bought FileBot from the App Store, and I installed brew cask exactly as described in the topic you are referring to. I will try using the absolute path and see what happens.

Wil Dieteren
User avatar
rednoah
The Source
Posts: 19349
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC not working with Transmission

Post by rednoah »

Using /usr/local/bin/filebot should solve the filebot: command not found issue.


Have you confirmed that filebot is working?

Code: Select all

filebot -version

Code: Select all

/usr/local/bin/filebot -version
:idea: Please read the FAQ and How to Request Help.
WilDieteren
Posts: 12
Joined: 24 Nov 2015, 11:29

Re: AMC not working with Transmission

Post by WilDieteren »

Rednoah,

Yes FileBot seems to be working, running "filebot -version" in a Terminal window returns 'FileBot 4.6.1 (r3315) / Java(TM) SE Runtime Environment 1.8.0_66'. Also I have used to GUI to rename files (not sure if that is relevant).

Wil Dieteren
User avatar
rednoah
The Source
Posts: 19349
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC not working with Transmission

Post by rednoah »

Does using /usr/local/bin/filebot -script fn:sysenv make it work from Transmission? Or do you get another error?
:idea: Please read the FAQ and How to Request Help.
WilDieteren
Posts: 12
Joined: 24 Nov 2015, 11:29

Re: AMC not working with Transmission

Post by WilDieteren »

Rednoah,

I have not gotten that far yet, first trying whether it helps when running the "step 2" script.

Wil Dieteren
WilDieteren
Posts: 12
Joined: 24 Nov 2015, 11:29

Re: AMC not working with Transmission

Post by WilDieteren »

Rednoah,

The amc script just ran OK, at least as far as I can tell, so using /usr/local/bin/filebot seems to have done the trick. Thanks for all your help, where best to look for the available options, the mutorrent entry for amc?

Wil Dieteren
Post Reply