Issues Getting AMC Script Working Again

Support for Windows users
Post Reply
User avatar
acp28783
Posts: 7
Joined: 16 Oct 2021, 21:29

Issues Getting AMC Script Working Again

Post by acp28783 »

Hello, I apologize if I'm overlooking something simple, as that's fairly routine for me. I had to restore Windows and didn't think to save my working qBittorent script, now I do not remember it and I cannot get anything I have tried to run Filebot upon torrent completion nor add any media to Plex.

Here is my current line:

Code: Select all

filebot -script fn:amc --output "E:/Videos/" --action move --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes --def plex=127.0.0.1:PRIVATEPLEXTOKEN deleteAfterExtract=y subtitles=en
My media locations:
Downloads: "E:/Videos/Downloads"
Movies: "E:/Videos/Movies"
TV Shows: "E:/Videos/TV Shows"

I have tried other variations such as including the port for Plex, linking directly to the filebot.exe, as well as a few different lines found from here and Reddit.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issues Getting AMC Script Working Again

Post by rednoah »

:?: What does the console output say when it doesn't work?


:idea: qBT integration will look something like this:
viewtopic.php?p=9774#p9774


:!: The qBT input variables are notably missing in your command-line template:

Code: Select all

--def "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"
:idea: Please read the FAQ and How to Request Help.
User avatar
acp28783
Posts: 7
Joined: 16 Oct 2021, 21:29

Re: Issues Getting AMC Script Working Again

Post by acp28783 »

rednoah wrote: 17 Oct 2021, 02:22 :?: What does the console output say when it doesn't work?


:idea: qBT integration will look something like this:
viewtopic.php?p=9774#p9774

:!: The qBT variables are notably missing in your command-line template:

Code: Select all

--def "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"
I'm not currently getting any console output at all, will add in that from the template as well as try another link to exe.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issues Getting AMC Script Working Again

Post by rednoah »

You can check the --log-file amc.log log file. If you can't find the log file, then use a more specific file path such as --log-file E:/Logs/amc.log instead so you can find the log file more easily.


:!: The command above can't work, because it'll run and then print Invalid usage: no input because you're not passing along input parameters:

Code: Select all

Invalid usage: no input

:idea: Please read the Troubleshooting section of the amc script manual. It'll explain how things work and how you can test them manually without qBT so you can see what's going on.
:idea: Please read the FAQ and How to Request Help.
User avatar
acp28783
Posts: 7
Joined: 16 Oct 2021, 21:29

Re: Issues Getting AMC Script Working Again

Post by acp28783 »

rednoah wrote: 17 Oct 2021, 02:32 You can check the --log-file amc.log log file. If you can't find the log file, then use a more specific file path such as --log-file E:/Logs/amc.log instead so you can find the log file more easily.


:!: The command above can't work, because it'll run and then print Invalid usage: no input because you're not passing along input parameters:

Code: Select all

Invalid usage: no input

:idea: Please read the Troubleshooting section of the amc script manual. It'll explain how things work and how you can test them manually without qBT so you can see what's going on.
I tried testing a little bit with cmd and along with your recommendations, I can at least get a log file now. I've read over the FAQ from your signature and the AMC page, but am still running into a bit of a headache. I'm not sure what to put for the variables so I'm certain my line is wrong, but here is what it is currently along with snippet from log file:

Code: Select all

"C:/Program Files/FileBot/filebot.exe" -script fn:amc --output "E:/Videos" --action move --conflict skip -non-strict --log-file E:/Videos/amc.log --def plex=127.0.0.1:PLEXTOKENHERE deleteAfterExtract=y --def "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=E:/Videos/Downloads"

Code: Select all

Bad ut_state value: %S
Bad ut_kind value: %K
Invalid usage: input folder [E:/Videos/Downloads] must not be inside output folder [E:\Videos] and vice versa
The filename, directory name, or volume label syntax is incorrect
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issues Getting AMC Script Working Again

Post by rednoah »

e.g. let's pretend to be uT:

Code: Select all

filebot -script fn:amc --output "D:/Organized Media" --log-file amc.log --action duplicate --conflict override -non-strict --def "ut_dir=D:\Media\Avatar" "ut_file=" "ut_kind=multi" "ut_title=Avatar" "ut_label=" "ut_state=5"
:idea: uT will take your command, replace the %variables with specific values for the completed download, and then call that command.

rednoah wrote: 01 Aug 2012, 13:04 Troubleshooting
If something is not working, please read the Notes above, then run the command manually in a new console window to see what is happening. You CANNOT run the command without replacing the VARIABLES. The variables have to be replaced with actual values first.

e.g.

Code: Select all

filebot -script fn:amc --output "D:/Organized Media" --log-file amc.log --action duplicate --conflict override -non-strict --def "ut_dir=D:\Media\Avatar" "ut_file=" "ut_kind=multi" "ut_title=Avatar" "ut_label=" "ut_state=5"
: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: Issues Getting AMC Script Working Again

Post by rednoah »

In any case, filebot likely works, you just didn't follow the qBT instructions:
viewtopic.php?p=9774#p9774


Step 1: Copy the qBT command template example:

Code: Select all

filebot -script fn:amc --output "X:/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes --def unsorted=y music=y artwork=y "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"

Step 2: Make the minimal number of modifications and do not make unnecessary modifications until you've confirmed things to be working:

Code: Select all

"C:/Program Files/FileBot/filebot.exe" -script fn:amc --output "E:/Media" --action duplicate --conflict skip -non-strict --log-file "E:/Media/amc.log" --def excludeList=amc.excludes --def unsorted=y music=y artwork=y "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"
:arrow: "C:/Program Files/FileBot/filebot.exe" will work around %PATH% issues but probably isn't necessary
:arrow: --output "E:/Media" is a new existing output folder that is distinct and separate from your input folder
:arrow: --log-file "E:/Media/amc.log" so you can find the log file easily


:!: Create a new E:/Media folder. DO NOT use E:/Videos as output folder because that's already your input folder where your Downloads are. If your input / output folder structure is bad, then the amc script will print an error and quit.
:idea: Please read the FAQ and How to Request Help.
User avatar
acp28783
Posts: 7
Joined: 16 Oct 2021, 21:29

Re: Issues Getting AMC Script Working Again

Post by acp28783 »

rednoah wrote: 17 Oct 2021, 04:14 In any case, filebot likely works, you just didn't follow the qBT instructions:
viewtopic.php?p=9774#p9774


Step 1: Copy the qBT command template example:

Code: Select all

filebot -script fn:amc --output "X:/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes --def unsorted=y music=y artwork=y "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"

Step 2: Make the minimal number of modifications and do not make unnecessary modifications until you've confirmed things to be working:

Code: Select all

"C:/Program Files/FileBot/filebot.exe" -script fn:amc --output "E:/Media" --action duplicate --conflict skip -non-strict --log-file E:/Media/amc.log --def excludeList=amc.excludes --def unsorted=y music=y artwork=y "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"

:!: Create a new E:/Media folder. DO NOT use E:/Videos as output folder because that's already your input folder where your Downloads are. If your input / output folder structure is bad, then the amc script will print an error and quit.
I know for sure Filebot isn't an issue, it's all my poor defining. I had actually began with the qBit instructions, but started changing stuff when I couldn't get it to work. I will make a Media and Download folder instead of Videos, but it previously worked with just the Video and Video/Downloads folders for some reason. Will report back with results soon.
User avatar
acp28783
Posts: 7
Joined: 16 Oct 2021, 21:29

Re: Issues Getting AMC Script Working Again

Post by acp28783 »

rednoah wrote: 17 Oct 2021, 04:14 In any case, filebot likely works, you just didn't follow the qBT instructions:
viewtopic.php?p=9774#p9774


Step 1: Copy the qBT command template example:

Code: Select all

filebot -script fn:amc --output "X:/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes --def unsorted=y music=y artwork=y "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"

Step 2: Make the minimal number of modifications and do not make unnecessary modifications until you've confirmed things to be working:

Code: Select all

"C:/Program Files/FileBot/filebot.exe" -script fn:amc --output "E:/Media" --action duplicate --conflict skip -non-strict --log-file "E:/Media/amc.log" --def excludeList=amc.excludes --def unsorted=y music=y artwork=y "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"
:arrow: "C:/Program Files/FileBot/filebot.exe" will work around %PATH% issues but probably isn't necessary
:arrow: --output "E:/Media" is a new existing output folder that is distinct and separate from your input folder
:arrow: --log-file "E:/Media/amc.log" so you can find the log file easily


:!: Create a new E:/Media folder. DO NOT use E:/Videos as output folder because that's already your input folder where your Downloads are. If your input / output folder structure is bad, then the amc script will print an error and quit.
Seems to be working now with the separately named folders and much less complicated than my last script line, thank you so much for all the help with it.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issues Getting AMC Script Working Again

Post by rednoah »

Cheers. From here on out you can easily make your customizations (e.g. --def plex) step by step. Make sure it works before the change. Make the change. Make sure it still works after the change. Rinse and repeat. It might seem cumbersome but it's actually very effective.
:idea: Please read the FAQ and How to Request Help.
User avatar
acp28783
Posts: 7
Joined: 16 Oct 2021, 21:29

Re: Issues Getting AMC Script Working Again

Post by acp28783 »

rednoah wrote: 17 Oct 2021, 04:51 Cheers. From here on out you can easily make your customizations (e.g. --def plex) step by step. Make sure it works before the change. Make the change. Make sure it still works after the change. Rinse and repeat. It might seem cumbersome but it's actually very effective.
Hi, my license key had expired and I just purchased another one today. Do you know why script is still not working currently even with new license? I haven't made any changes to script, directories, or Plex setup.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issues Getting AMC Script Working Again

Post by rednoah »

What does the log say?
:idea: Please read the FAQ and How to Request Help.
User avatar
acp28783
Posts: 7
Joined: 16 Oct 2021, 21:29

Re: Issues Getting AMC Script Working Again

Post by acp28783 »

rednoah wrote: 28 Apr 2022, 01:33 What does the log say?
I had wrongly assumed placing the license file into the Filebot directory and deleting the old one would replace the license after killing the program. Ran the license file and it's working now, sorry for not reading directions.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Issues Getting AMC Script Working Again

Post by rednoah »

acp28783 wrote: 28 Apr 2022, 01:41 I had wrongly assumed placing the license file into the Filebot directory and deleting the old one would replace the license after killing the program. Ran the license file and it's working now, sorry for not reading directions.
That should work, since filebot will do just that internally.


:arrow: That said, calling filebot is the recommended way installing a new license key for the filebot command-line tool:

Code: Select all

filebot --license
:idea: Please read the FAQ and How to Request Help.
Post Reply