Automated Media Center-script not working in Sierra/qBittorrent

Support for macOS users
Post Reply
Mattityahu
Posts: 13
Joined: 17 Feb 2018, 00:57

Automated Media Center-script not working in Sierra/qBittorrent

Post by Mattityahu »

I simply cannot get the amc-script for an automated media center to work in my qBittorrent client. I have tried several changes in the script code for the last week, but nothing seems to work. I have tried 3 different versions of the code provided in the guide by rednoah, but the result is the same: Nothing happens with the files when my torrents are done downloading.

My setup:
- Mac OS Sierra running on a Mac Mini mid 2011
- qBittorrent v4.0.4 (the latest so far)
- Filebot installed both via App Store and via this guide as I thought that might help (however it didn't): viewtopic.php?f=4&t=2049

Here are the exact three configurations of the script I have tried:

Code: Select all

/Applications/FileBot.app/Contents/MacOS/filebot.launcher -script fn:amc --output "/Volumes/Drobo" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L”

Code: Select all

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

Code: Select all

/usr/local/bin/filebot -script fn:amc --output "/Volumes/Drobo" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L"
Here is a screenshot of the error message that I'm getting everytime: https://prnt.sc/ihx4qi

I have checked several times that the path for the filebot app and the path for my media actually DOES exist, so I don't understand the error message that I'm getting everytime. Furthermore, I've checked my log for any error informations, but I can't find anything related to qBittorrent trying to run the amc script.

Really hope that someone can help me find a solution since the post-processing of files is the only thing I'm currently missing to have a fully automated system :(

Thx in advance!
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by rednoah »

:idea: filebot and /usr/local/bin/filebot are effectively the same and should work. filebot.launcher is not a command-line tool and can't be used to call the filebot command-line tool.


:arrow: The first step would be to make sure that filebot is working. Open Terminal and run filebot -script fn:sysinfo and post the output.


:arrow: Once we have confirmed that filebot is working, we'd move on to confirm that qBT is calling the commands we want, along these lines:
viewtopic.php?f=4&t=3067


EDIT:

I don't know if the qBT error message has any meaning, but I do like to point out that the following file (a file path that ends with a double quote) most certainly does not exist:

Code: Select all

/Applications/FileBot.app/Contents/MacOS/filebot.launcher -script fn:amc --output "
In your screenshot, I can't see the full command you pasted into qBT, but that error message leads me to believe that there's a double quote " at the very beginning of the command you pasted into qBT that messes everything up:
viewtopic.php?f=4&t=1899
:idea: Please read the FAQ and How to Request Help.
Mattityahu
Posts: 13
Joined: 17 Feb 2018, 00:57

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by Mattityahu »

Thx for fast reponse, rednoah. I ran the command in terminal and this is what I'm getting as a result. I'm not an expert in this area, but it doesn't seem right?

Code: Select all

Last login: Wed Feb 21 17:17:43 on console
Mac-Mini-MS:~ mads$ filebot -script fn:sysinfo
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/usr/local/Caskroom/filebot/4.7.9/FileBot.app/Contents/Java/FileBot_4.7.9.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Fetch failed: Try again in 5 seconds (2 more) => java.net.UnknownHostException: app.filebot.net
Fetch failed: Try again in 10 seconds (1 more) => java.net.UnknownHostException: app.filebot.net
Fetch failed: https://app.filebot.net/scripts/m1.jar.xz
java.net.UnknownHostException: app.filebot.net
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at net.filebot.web.WebRequest.fetch(WebRequest.java:143)
	at net.filebot.CachedResource.lambda$fetchIfModified$9(CachedResource.java:215)
	at net.filebot.CachedResource.lambda$null$0(CachedResource.java:87)
	at net.filebot.CachedResource.retry(CachedResource.java:121)
	at net.filebot.CachedResource.retry(CachedResource.java:133)
	at net.filebot.CachedResource.retry(CachedResource.java:133)
	at net.filebot.CachedResource.lambda$get$1(CachedResource.java:87)
	at net.filebot.Cache.computeIf(Cache.java:90)
	at net.filebot.CachedResource.get(CachedResource.java:82)
	at net.filebot.MemoizedResource.get(Resource.java:36)
	at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:32)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:119)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
	at net.filebot.Main.main(Main.java:115)
Caused by: java.net.UnknownHostException: app.filebot.net
	at net.filebot.web.WebRequest.fetch(WebRequest.java:140)
	... 14 more

app.filebot.net
java.net.UnknownHostException: app.filebot.net
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at net.filebot.web.WebRequest.fetch(WebRequest.java:143)
	at net.filebot.CachedResource.lambda$fetchIfModified$9(CachedResource.java:215)
	at net.filebot.CachedResource.lambda$null$0(CachedResource.java:87)
	at net.filebot.CachedResource.retry(CachedResource.java:121)
	at net.filebot.CachedResource.retry(CachedResource.java:133)
	at net.filebot.CachedResource.retry(CachedResource.java:133)
	at net.filebot.CachedResource.lambda$get$1(CachedResource.java:87)
	at net.filebot.Cache.computeIf(Cache.java:90)
	at net.filebot.CachedResource.get(CachedResource.java:82)
	at net.filebot.MemoizedResource.get(Resource.java:36)
	at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:32)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:119)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
	at net.filebot.Main.main(Main.java:115)
Caused by: java.net.UnknownHostException: app.filebot.net
	at net.filebot.web.WebRequest.fetch(WebRequest.java:140)
	... 14 more

Failure (°_°)
Concerning the line in my screenshot, this is the entire script line that I'm using right now:

Code: Select all

filebot -script fn:amc --output "/Volumes/Drobo" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L”
Is anything wrong with this also? I just copied that from your guide in the Automated Media System guide.
ZeroByDivide
Posts: 170
Joined: 16 Dec 2014, 01:39

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by ZeroByDivide »

- qBittorrent v4.0.4 (the latest so far)
This is more than likely your issue right here, execution on torrent completion is currently broken on 4.0.4 for qbittorrent, you will have to downgrade to 4.0.3 and wait for 4.0.5 to be released.
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by rednoah »

1.
Are you connected to the internet? The log shows that DNS was broken at the time, and so it couldn't download the script jar, and so it didn't run the script:

Code: Select all

java.net.UnknownHostException: app.filebot.net

2.
Are you sure you didn't copy & paste the command into some word processor that broke everything before copy & pasting further into qBT?

YES (see example code)

Code: Select all

"ut_label=%L"
NO (see your code)

Code: Select all

"ut_label=%L”
Please read the Avoid non-ASCII characters section Cmdline and Argument Passing for details.
:idea: Please read the FAQ and How to Request Help.
Mattityahu
Posts: 13
Joined: 17 Feb 2018, 00:57

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by Mattityahu »

ZeroByDivide wrote: 22 Feb 2018, 01:15
- qBittorrent v4.0.4 (the latest so far)
This is more than likely your issue right here, execution on torrent completion is currently broken on 4.0.4 for qbittorrent, you will have to downgrade to 4.0.3 and wait for 4.0.5 to be released.
I really don't think so. I've tried get it to work for a couple of weeks now, including on the v. 4.0.3, but let me double check it again just to be sure.

rednoah wrote: 22 Feb 2018, 02:34 1.
Are you connected to the internet? The log shows that DNS was broken at the time, and so it couldn't download the script jar, and so it didn't run the script:

Code: Select all

java.net.UnknownHostException: app.filebot.net

2.
Are you sure you didn't copy & paste the command into some word processor that broke everything before copy & pasting further into qBT?

YES (see example code)

Code: Select all

"ut_label=%L"
NO (see your code)

Code: Select all

"ut_label=%L”
Please read the Avoid non-ASCII characters section Cmdline and Argument Passing for details.
1. Yes, I am connected to the internet. Although, I figured out that my VPN was enabled when I tried to run the command at the first time (since I'm also using a VPN on my torrenting machine). Then I tried to disable the VPN and then run the command you wrote. Now I'm getting this report back in Terminal when running filebot -script fn:sysinfo:

Code: Select all

Last login: Thu Feb 22 04:18:15 on ttys000
Mac-Mini-MS:~ mads$ filebot -script fn:sysinfo
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/usr/local/Caskroom/filebot/4.7.9/FileBot.app/Contents/Java/FileBot_4.7.9.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.93
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-02-04 (r514)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 9.0.4
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 1 GB Max Memory / 40 MB Used Memory
OS: Mac OS X (x86_64)
Package: APP
uname: Darwin Mac-Mini-MS.lan 16.7.0 Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64 x86_64
Done ヾ(@⌒ー⌒@)ノ
Is that any better? I don't understand much of it, but shouldn't the script be able to work despite having a VPN connection enabled? :(

2. Just checked again, and yes, I have used the correct quotation marks in qBittorent. The wrong one that is evident in my example above was just caused by the fact that I had all three lines copied into a Word document before posting them here, but I've just copied this exact code into the qBittorent client again without any success:

Code: Select all

filebot -script fn:amc --output "/Volumes/Drobo" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L"
Really hope you can help me further. This is so frustrating when everyone else seems to have it work out of the box with no issues :cry:
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by rednoah »

1.
The sysinfo log shows that filebot scripting is generally working now.


2.
The next step is to make sure that the amc script is working as expected:

Code: Select all

filebot -script fn:amc --output "/Volumes/Drobo" --action duplicate --conflict skip -non-strict --log-file /Volumes/Drobo/amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_dir=/Volumes/Drobo/TEST_FOLDER" "ut_kind=multi" "ut_title=TEST" "ut_label=TEST"
If you run this command in Terminal, then you will see the console output, so you can see what it's doing and if it's working. As you can see, I've just replace the qBT variables with actual values for our specific test case, and change --log-file so that the log file is written to a known file path.


3.
Assuming that qBT has been calling FileBot all along, you should be able to find your amc.log file in the application data folder:

Code: Select all

$HOME/Library/Containers/net.filebot.FileBot/Data/Library/Application Support/User Data
Logs from previous calls may tell you right away why it keeps not working.
:idea: Please read the FAQ and How to Request Help.
Mattityahu
Posts: 13
Joined: 17 Feb 2018, 00:57

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by Mattityahu »

rednoah wrote: 22 Feb 2018, 05:14 1.
The sysinfo log shows that filebot scripting is generally working now.


2.
The next step is to make sure that the amc script is working as expected:

Code: Select all

filebot -script fn:amc --output "/Volumes/Drobo" --action duplicate --conflict skip -non-strict --log-file /Volumes/Drobo/amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_dir=/Volumes/Drobo/TEST_FOLDER" "ut_kind=multi" "ut_title=TEST" "ut_label=TEST"
If you run this command in Terminal, then you will see the console output, so you can see what it's doing and if it's working. As you can see, I've just replace the qBT variables with actual values for our specific test case, and change --log-file so that the log file is written to a known file path.


3.
Assuming that qBT has been calling FileBot all along, you should be able to find your amc.log file in the application data folder:

Code: Select all

$HOME/Library/Containers/net.filebot.FileBot/Data/Library/Application Support/User Data
Logs from previous calls may tell you right away why it keeps not working.
OK, first I ran the test in terminal with your first code like this:

Code: Select all

filebot -script fn:amc --output "/Volumes/Drobo" --action duplicate --conflict skip -non-strict --log-file /Volumes/Drobo/amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_dir=/Volumes/Drobo/TV-Shows/Narcos/Season 02" "ut_kind=multi" "ut_title=TEST" "ut_label=TEST"
It actually worked pretty well, the season 02 and it's episodes where renamed and other data like fanart etc. were fetched. However, it created a whole new folder with the Narcos series and in my Drobo folder, which is not ideal, but for now it's just a detail.

I think I located the two log files also. The first log in /Volumes/Drobo/amc.log shows this:

Code: Select all

Run script [fn:amc] at [Thu Feb 22 10:38:20 CET 2018]
Parameter: excludeList = amc.excludes
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: ut_dir = /Volumes/Drobo/TEST_FOLDER
Parameter: ut_kind = multi
Parameter: ut_title = TEST
Parameter: ut_label = TEST
Use excludes: /Volumes/Drobo/amc.excludes
No files selected for processing
Done ヾ(@⌒ー⌒@)ノ
Run script [fn:amc] at [Thu Feb 22 10:41:58 CET 2018]
Parameter: excludeList = amc.excludes
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: ut_dir = /Volumes/Drobo/TV-Shows/Narcos/Season 02
Parameter: ut_kind = multi
Parameter: ut_title = TEST
Parameter: ut_label = TEST
Use excludes: /Volumes/Drobo/amc.excludes (1)
Ignore hidden: /Volumes/Drobo/TV-Shows/Narcos/Season 02/.DS_Store
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E01.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E01.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E01.NORDiC.1080p.BluRay.x264-DBRETAiL.no.srt
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E02.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E02.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E03.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E03.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E04.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E04.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E05.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E06.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E06.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E07.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E07.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E08.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E08.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E09.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E09.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E10.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt
Input: /Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E10.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv
Group: [tvs:narcos] => [Narcos.S02E01.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt, Narcos.S02E01.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv, Narcos.S02E01.NORDiC.1080p.BluRay.x264-DBRETAiL.no.srt, Narcos.S02E02.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt, Narcos.S02E02.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv, Narcos.S02E03.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt, Narcos.S02E03.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv, Narcos.S02E04.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt, Narcos.S02E04.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv, Narcos.S02E05.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv, Narcos.S02E06.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt, Narcos.S02E06.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv, Narcos.S02E07.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt, Narcos.S02E07.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv, Narcos.S02E08.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt, Narcos.S02E08.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv, Narcos.S02E09.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt, Narcos.S02E09.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv, Narcos.S02E10.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt, Narcos.S02E10.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Narcos]
Fetching episode data for [Narcos]
Auto-detected query: [Narcos]
Fetching episode data for [Narcos]
Auto-detected query: [Narcos]
Fetching episode data for [Narcos]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E01.NORDiC.1080p.BluRay.x264-DBRETAiL.no.srt] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E01 - Free at Last.nor.srt]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E01.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E01 - Free at Last.dan.srt]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E02.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E02 - Cambalache.dan.srt]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E03.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E03 - Our Man in Madrid.dan.srt]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E04.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E04 - The Good, The Bad and The Dead.dan.srt]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E06.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E06 - Los Pepes.dan.srt]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E07.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E07 - Deutschland 93.dan.srt]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E08.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E08 - Exit El Patrón.dan.srt]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E09.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E09 - Nuestra Finca.dan.srt]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E10.NORDiC.1080p.BluRay.x264-DBRETAiL.da.srt] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E10 - Al Fin Cayó.dan.srt]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E05.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E05 - The Enemies of My Enemy.mkv]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E01.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E01 - Free at Last.mkv]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E02.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E02 - Cambalache.mkv]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E03.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E03 - Our Man in Madrid.mkv]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E04.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E04 - The Good, The Bad and The Dead.mkv]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E06.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E06 - Los Pepes.mkv]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E07.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E07 - Deutschland 93.mkv]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E08.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E08 - Exit El Patrón.mkv]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E09.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E09 - Nuestra Finca.mkv]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/Narcos/Season 02/Narcos.S02E10.NORDiC.1080p.BluRay.x264-DBRETAiL.mkv] to [/Volumes/Drobo/TV Shows/Narcos/Season 02/Narcos - S02E10 - Al Fin Cayó.mkv]
Processed 20 files
Fetching series artwork for [Narcos / Season 2] to [/Volumes/Drobo/TV Shows/Narcos/Season 02]
Generate Series NFO: Narcos [282670]
Fetching /Volumes/Drobo/TV Shows/Narcos/poster.jpg => [poster/680x1000, en, 7.9286, http://thetvdb.com/banners/posters/282670-13.jpg]
Fetching /Volumes/Drobo/TV Shows/Narcos/banner.jpg => [series/graphical, en, 8.0, http://thetvdb.com/banners/graphical/282670-g.jpg]
Fetching /Volumes/Drobo/TV Shows/Narcos/fanart.jpg => [fanart/1920x1080, en, 10.0, http://thetvdb.com/banners/fanart/original/282670-21.jpg]
Fetching /Volumes/Drobo/TV Shows/Narcos/Season 02/poster.jpg => [season/season/2, en, 6.3333, http://thetvdb.com/banners/seasons/282670-2-2.jpg]
Fetching /Volumes/Drobo/TV Shows/Narcos/Season 02/banner.jpg => [season/seasonwide/2, es, http://thetvdb.com/banners/seasonswide/282670-2.jpg]
Fetching /Volumes/Drobo/TV Shows/Narcos/clearart.png => [hdclearart, en, 5.0, https://assets.fanart.tv/fanart/tv/282670/hdclearart/narcos-55ec341099b59.png]
Fetching /Volumes/Drobo/TV Shows/Narcos/logo.png => [hdtvlogo, en, 5.0, https://assets.fanart.tv/fanart/tv/282670/hdtvlogo/narcos-55d867df26dd3.png]
Fetching /Volumes/Drobo/TV Shows/Narcos/landscape.jpg => [tvthumb, en, 4.0, https://assets.fanart.tv/fanart/tv/282670/tvthumb/narcos-55d7e8d99c35c.jpg]
Fanart not found: /Volumes/Drobo/TV Shows/Narcos/Season 02/landscape.jpg / seasonthumb
Done ヾ(@⌒ー⌒@)ノ
Second, when opening the log from $HOME/Library/Containers/net.filebot.FileBot/Data/Library/Application Support/User Data/logs path, this is what it reveals:

Code: Select all

Illegal Argument: java.nio.file.NoSuchFileException: /Volumes/Drobo/TV-Shows/Broen/Season (/Volumes/Drobo/TV-Shows/Broen/Season)
Illegal Argument: java.nio.file.NoSuchFileException: /Users/ms-macmini/Library/Containers/net.filebot.FileBot/Data/04/Broen.S04E08.DANiSH.720p.WEB-DL.AAC2.0.H.264-DBRETAiL (04/Broen.S04E08.DANiSH.720p.WEB-DL.AAC2.0.H.264-DBRETAiL)
Fetch failed: Try again in 5 seconds (2 more) => java.net.UnknownHostException: app.filebot.net
Fetch failed: Try again in 10 seconds (1 more) => java.net.UnknownHostException: app.filebot.net
Fetch failed: https://app.filebot.net/scripts/m1.jar.xz
java.net.UnknownHostException: app.filebot.net
	at net.filebot.web.WebRequest.fetch(WebRequest.java:143)
	at net.filebot.CachedResource.lambda$fetchIfModified$9(CachedResource.java:215)
	at net.filebot.CachedResource.lambda$null$0(CachedResource.java:87)
	at net.filebot.CachedResource.retry(CachedResource.java:121)
	at net.filebot.CachedResource.retry(CachedResource.java:133)
	at net.filebot.CachedResource.retry(CachedResource.java:133)
	at net.filebot.CachedResource.lambda$get$1(CachedResource.java:87)
	at net.filebot.Cache.computeIf(Cache.java:90)
	at net.filebot.CachedResource.get(CachedResource.java:82)
	at net.filebot.MemoizedResource.get(Resource.java:36)
	at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:32)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:127)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
	at net.filebot.Main.main(Main.java:111)
Caused by: java.net.UnknownHostException: app.filebot.net
	at net.filebot.web.WebRequest.fetch(WebRequest.java:140)
	... 14 more

app.filebot.net
java.net.UnknownHostException: app.filebot.net
	at net.filebot.web.WebRequest.fetch(WebRequest.java:143)
	at net.filebot.CachedResource.lambda$fetchIfModified$9(CachedResource.java:215)
	at net.filebot.CachedResource.lambda$null$0(CachedResource.java:87)
	at net.filebot.CachedResource.retry(CachedResource.java:121)
	at net.filebot.CachedResource.retry(CachedResource.java:133)
	at net.filebot.CachedResource.retry(CachedResource.java:133)
	at net.filebot.CachedResource.lambda$get$1(CachedResource.java:87)
	at net.filebot.Cache.computeIf(Cache.java:90)
	at net.filebot.CachedResource.get(CachedResource.java:82)
	at net.filebot.MemoizedResource.get(Resource.java:36)
	at net.filebot.cli.ScriptBundle.getScript(ScriptBundle.java:32)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:74)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:127)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
	at net.filebot.Main.main(Main.java:111)
Caused by: java.net.UnknownHostException: app.filebot.net
	at net.filebot.web.WebRequest.fetch(WebRequest.java:140)
	... 14 more

Failure (°_°)
Even though I'm far from being an expert, I can't see from the logs whats going wrong. Hope I provided the right logs you asked for? :/
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by rednoah »

Based on the logs, we can tell that filebot is working. The other log only shows errors, so that's most likely from when you tried with the GUI, because there's no console output from the amc script there.

Next step is to try with qBT:

Code: Select all

/usr/local/bin/filebot -script fn:amc --output "/Volumes/Drobo" --action duplicate --conflict skip -non-strict --log-file "/Volumes/Drobo/amc.log" --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L"
Delete /Volumes/Drobo/amc.log and then wait for qBT to call FileBot and FileBot to create a new amc.log file. That log will show us that it's working, or why it's not working.
:idea: Please read the FAQ and How to Request Help.
Mattityahu
Posts: 13
Joined: 17 Feb 2018, 00:57

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by Mattityahu »

All right, so now I think I got it to run the command after a torrent completion by using the last script you posted. So far, so good. Here is the new amc.log file:

Code: Select all

Run script [fn:amc] at [Thu Feb 22 18:40:16 CET 2018]
Parameter: excludeList = amc.excludes
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: ut_dir = /Volumes/Drobo/TV-Shows/The Flash/
Parameter: ut_kind = multi
Parameter: ut_title = The.Flash.S04E12.Custom.DKsubs.720p.WEBRip.x264-SUBSTANCE
Parameter: ut_label = 
Use excludes: /Volumes/Drobo/amc.excludes
Ignore hidden: /Volumes/Drobo/TV-Shows/The Flash/.b35e238b67393db8a9f5711917193f4d8fed049a.parts
Input: /Volumes/Drobo/TV-Shows/The Flash/The.Flash.S04E12.Custom.DKsubs.720p.WEBRip.x264-SUBSTANCE.mkv
Input: /Volumes/Drobo/TV-Shows/The Flash/The.Flash.S04E12.Custom.DKsubs.720p.WEBRip.x264-SUBSTANCE.srt
Group: [tvs:the flash] => [The.Flash.S04E12.Custom.DKsubs.720p.WEBRip.x264-SUBSTANCE.mkv, The.Flash.S04E12.Custom.DKsubs.720p.WEBRip.x264-SUBSTANCE.srt]
Rename episodes using [TheTVDB]
Auto-detected query: [The Flash]
Fetching episode data for [The Flash]
Fetching episode data for [The Flash (2014)]
Fetching episode data for [The Flash (1967)]
Auto-detected query: [The Flash]
Fetching episode data for [The Flash]
Fetching episode data for [The Flash (2014)]
Fetching episode data for [The Flash (1967)]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/The Flash/The.Flash.S04E12.Custom.DKsubs.720p.WEBRip.x264-SUBSTANCE.srt] to [/Volumes/Drobo/TV Shows/The Flash (2014)/Season 04/The Flash (2014) - S04E12 - Honey, I Shrunk Team Flash.dan.srt]
[DUPLICATE] From [/Volumes/Drobo/TV-Shows/The Flash/The.Flash.S04E12.Custom.DKsubs.720p.WEBRip.x264-SUBSTANCE.mkv] to [/Volumes/Drobo/TV Shows/The Flash (2014)/Season 04/The Flash (2014) - S04E12 - Honey, I Shrunk Team Flash.mkv]
Processed 2 files
Fetching series artwork for [The Flash (2014) / Season 4] to [/Volumes/Drobo/TV Shows/The Flash (2014)/Season 04]
Generate Series NFO: The Flash (2014) [279121]
Fetching /Volumes/Drobo/TV Shows/The Flash (2014)/poster.jpg => [poster/680x1000, en, 6.2344, http://thetvdb.com/banners/posters/279121-37.jpg]
Fetching /Volumes/Drobo/TV Shows/The Flash (2014)/banner.jpg => [series/graphical, en, 9.5, http://thetvdb.com/banners/graphical/279121-g12.jpg]
Fetching /Volumes/Drobo/TV Shows/The Flash (2014)/fanart.jpg => [fanart/1920x1080, en, 6.7455, http://thetvdb.com/banners/fanart/original/279121-9.jpg]
Fetching /Volumes/Drobo/TV Shows/The Flash (2014)/Season 04/poster.jpg => [season/season/4, en, 10.0, http://thetvdb.com/banners/seasons/279121-4-2.jpg]
Banner not found: /Volumes/Drobo/TV Shows/The Flash (2014)/Season 04/banner.jpg / seasonwide:seasonwide
Fetching /Volumes/Drobo/TV Shows/The Flash (2014)/clearart.png => [hdclearart, en, 16.0, https://assets.fanart.tv/fanart/tv/279121/hdclearart/the-flash-2014-566c7bd0772f6.png]
Fetching /Volumes/Drobo/TV Shows/The Flash (2014)/logo.png => [hdtvlogo, en, 16.0, https://assets.fanart.tv/fanart/tv/279121/hdtvlogo/the-flash-2014-53786eca2610e.png]
Fetching /Volumes/Drobo/TV Shows/The Flash (2014)/landscape.jpg => [tvthumb, en, 6.0, https://assets.fanart.tv/fanart/tv/279121/tvthumb/the-flash-2014-54c8f7b74e4f2.jpg]
Fanart not found: /Volumes/Drobo/TV Shows/The Flash (2014)/Season 04/landscape.jpg / seasonthumb
Done ヾ(@⌒ー⌒@)ノ
However, the renaming, subtitle fetching etc. did not quite went as I imagined. Here is the original folder path where qBittorrent saved the file: https://pasteboard.co/H8T2lvc.png

Apparently, the script made a whole new folder on its own for that single episode that I downloaded, which was not what I hoped for: https://pasteboard.co/H8T4iyr.png

Is there any way to tweak the script line so that it just renames the original files in the original destination folder instead of making a complete new folder with the same files? I mean, so it just takes the (in this case) two files in this path /Volumes/Drobo/TV Shows/The Flash (2014)/ and simply renames them? If possible, I would like not to have the same files as duplicates. Hope you understand what I mean, otherwise just tell me.

Finally, if I don't want the script to grab stuff like fan art, posters, logos etc., do I then just replace the y's in the the script with an x or? THANKS!
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by rednoah »

1.
No, the whole point of the amc script is to create a new well-organized file structure. Why would you want to rename files in place? That makes no sense. qBT wouldn't be able to seed either if you move/rename the files.

:idea: Note that you can have the same file twice (or more times) in your filesystem without using any additional physical disk space: https://en.wikipedia.org/wiki/Hard_link#Example

You'll want to clearly separate well-organized files from your Downloads / Complete folder:

Code: Select all

--output /Volumes/Drobo/Media


2.
You can remove the artwork=y part from your command altogether. Alternatively, you can use set artwork=n (n for no).
:idea: Please read the FAQ and How to Request Help.
Mattityahu
Posts: 13
Joined: 17 Feb 2018, 00:57

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by Mattityahu »

1. Good point. Makes sense, and I didn't even think about the seeding part, but was only worried about the space issue, but if it can have the same two files without using more than one's space, it's just great.

A question about the new "organisation system" you're suggesting: Just to make it clear, do you mean that I should put all the organised media that I have right now into

Code: Select all

/Volumes/Drobo/Media
and then create a new folder on my Drobo or somewhere else and set qBT to put all future torrents into that specific 'Downloads / Complete' folder? Or am I getting your suggestion wrong?

2. Great. Thanks! Will do.


Note: Sorry if I'm a slow learner! Really appreciating all the help you provide, rednoah! :)
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by rednoah »

1.
Let's assume you have a folder called /Volumes/Drobo/Downloads where you download files, or manually copy in files. The you set the amc script to process this folder and duplcate / hardlink files into a new structure at /Volumes/Drobo/Media. That means that the Media folder is never touched by a human, only by FileBot who creates folders / files / hardlinks and media players like Plex that read files from there.

i.e. qBT only reads/writes to and from Downloads. FileBot only reads from Downloads and writes to Media. Plex only reads from Media. That means that only qBT makes changes in Downloads, and only FileBot moves files to Media. It's clean and simple, and that means minimal effort for you, with unmodified originals in Downloads, and always pristine folder structure in Media.
:idea: Please read the FAQ and How to Request Help.
Mattityahu
Posts: 13
Joined: 17 Feb 2018, 00:57

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by Mattityahu »

Wonderful idea! That makes perfectly sense, so I will do it exactly that way!

There's just one thing I need to get clear about the hardlink thing. When you say:
set the amc script to process this folder and duplcate / hardlink files into a new structure
... does this mean that I have to do something in order to hardlink the files so they don't take double space? Or is the hardlink trick automatically done by the amc script? I think I understand the principle of hardlinking, but I'm not sure how to tell my computer to do it or if the script does it for me. :?
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Automated Media Center-script not working in Sierra/qBittorrent

Post by rednoah »

You can use --action hardlink to either create a hardlink or fail. --action duplicate also creates hardlinks, if possible, but will failover to creating physical copies if hardlinks are not supported.

:idea: You can easily tell what's happening by the speed of processing. Creating a hardlink is always instant regardless of file size. Creating a physical copy always takes time because it'll have to read/write hundreds of MBs for each file.
:idea: Please read the FAQ and How to Request Help.
Post Reply